|
|
@@ -125,6 +125,7 @@ public class InboundPurchaseService extends BaseService<Inbound> {
|
|
|
*/
|
|
|
@Transactional(rollbackFor = {Exception.class})
|
|
|
public ResponseResultVO<?> purchaseInboundInsert(InboundVO inboundVO) {
|
|
|
+
|
|
|
//region 查询当前公司的系统参数 自动办理信息 并赋值
|
|
|
Map<String, Object> map = new HashMap<>();
|
|
|
map.put("cpId", inboundVO.getCpId());
|
|
|
@@ -294,7 +295,6 @@ public class InboundPurchaseService extends BaseService<Inbound> {
|
|
|
}
|
|
|
//endregion
|
|
|
|
|
|
-
|
|
|
return ResponseResultUtil.success(inboundVO);
|
|
|
}
|
|
|
|
|
|
@@ -305,6 +305,7 @@ public class InboundPurchaseService extends BaseService<Inbound> {
|
|
|
*/
|
|
|
@Transactional(rollbackFor = {Exception.class})
|
|
|
public ResponseResultVO<?> purchaseInboundUpdate(InboundVO inboundVO) {
|
|
|
+
|
|
|
//region 小编辑
|
|
|
if (!inboundVO.getLimitEdit()) {
|
|
|
Inbound inbound = new Inbound();
|
|
|
@@ -326,6 +327,7 @@ public class InboundPurchaseService extends BaseService<Inbound> {
|
|
|
}
|
|
|
}
|
|
|
//endregion
|
|
|
+
|
|
|
//region 大编辑
|
|
|
else {
|
|
|
//region 根据id查询 此条入库单的数据还未更改前的数据
|
|
|
@@ -510,6 +512,7 @@ public class InboundPurchaseService extends BaseService<Inbound> {
|
|
|
}
|
|
|
//endregion
|
|
|
}
|
|
|
+ //endregion
|
|
|
|
|
|
//region 入账
|
|
|
if (inboundVO.getReceivableId() != null) {
|
|
|
@@ -637,7 +640,6 @@ public class InboundPurchaseService extends BaseService<Inbound> {
|
|
|
}
|
|
|
//endregion
|
|
|
|
|
|
-
|
|
|
//region 修改入库总单
|
|
|
Inbound inbound = new Inbound();
|
|
|
inbound.setIntoId(inboundVO.getIntoId());
|
|
|
@@ -677,6 +679,7 @@ public class InboundPurchaseService extends BaseService<Inbound> {
|
|
|
|
|
|
}
|
|
|
//endregion
|
|
|
+
|
|
|
return ResponseResultUtil.success(inboundVO);
|
|
|
}
|
|
|
|
|
|
@@ -687,6 +690,7 @@ public class InboundPurchaseService extends BaseService<Inbound> {
|
|
|
*/
|
|
|
@Transactional(rollbackFor = {Exception.class})
|
|
|
public ResponseResultVO<?> purchaseInboundRepeal(String intoId) {
|
|
|
+
|
|
|
//region 查询总单 查询明细
|
|
|
//根据id查询 此条入库单的数据还未更改前的数据
|
|
|
InboundResponse inboundResponse = inboundMapper.selectById(intoId);
|
|
|
@@ -697,6 +701,7 @@ public class InboundPurchaseService extends BaseService<Inbound> {
|
|
|
//region 自动办理参数为true 已入库编辑
|
|
|
//自动办理参数为true
|
|
|
if (Constant.FlgHandleSetting.TRUE.getValue().equals(inboundResponse.getFlgHandleSetting())) {
|
|
|
+
|
|
|
//region 退账
|
|
|
if (inboundResponse.getReceivableId() != null) {
|
|
|
accountService.reversePayable(inboundResponse.getIntoId(), Constant.InventoryDocCode.INTOBOUND.getTableName());
|
|
|
@@ -775,7 +780,6 @@ public class InboundPurchaseService extends BaseService<Inbound> {
|
|
|
throw new BaseBusinessException(ResponseCodeEnum.OPERATE_FAIL.getCode(), ErrorCodeEnum.INVENTORY_QUANTITY_EXCEEDED.getMessage());
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
//endregion
|
|
|
|
|
|
//region 入账
|
|
|
@@ -798,6 +802,7 @@ public class InboundPurchaseService extends BaseService<Inbound> {
|
|
|
//region 自动办理参数false 入库中编辑
|
|
|
//自动办理标识为false 并且 自动办理参数为false 入库中
|
|
|
if (!inboundResponse.getFlgAutoHandle() && Constant.FlgHandleSetting.FALSE.getValue().equals(inboundResponse.getFlgHandleSetting())) {
|
|
|
+
|
|
|
//region 修改明细
|
|
|
for (InboundItemResponse inboundItemResponse : inboundItemResponseList) {
|
|
|
//region 编辑明细 赋值
|
|
|
@@ -884,6 +889,7 @@ public class InboundPurchaseService extends BaseService<Inbound> {
|
|
|
*/
|
|
|
@Transactional(rollbackFor = {Exception.class})
|
|
|
public ResponseResultVO<?> purchaseHandleInbound(InboundVO inboundVO) {
|
|
|
+
|
|
|
//region 根据id查询 此条入库单的数据还未更改前的数据
|
|
|
InboundResponse inboundResponse = inboundMapper.selectById(inboundVO.getIntoId());
|
|
|
//endregion
|
|
|
@@ -1237,6 +1243,7 @@ public class InboundPurchaseService extends BaseService<Inbound> {
|
|
|
* @date : 2024/3/9 8:59
|
|
|
* @author : 寇珊珊
|
|
|
*/
|
|
|
+ @Transactional(rollbackFor = {Exception.class})
|
|
|
public String setIntoStatus(BigDecimal intoingQty, BigDecimal intoQty) {
|
|
|
//入库状态
|
|
|
String intoStatus = null;
|
|
|
@@ -1263,6 +1270,7 @@ public class InboundPurchaseService extends BaseService<Inbound> {
|
|
|
* @date : 2024/4/1 17:14
|
|
|
* @author : 寇珊珊
|
|
|
*/
|
|
|
+ @Transactional(rollbackFor = {Exception.class})
|
|
|
public String setIntoStatus(BigDecimal intoingQty, BigDecimal intoQty, BigDecimal sumQty) {
|
|
|
//入库状态
|
|
|
String intoStatus = null;
|