|
|
@@ -18,6 +18,8 @@ import com.dk.mdm.mapper.ivt.InboundItemMapper;
|
|
|
import com.dk.mdm.mapper.ivt.InboundMapper;
|
|
|
import com.dk.mdm.model.pojo.ivt.Inbound;
|
|
|
import com.dk.mdm.model.pojo.ivt.InboundItem;
|
|
|
+import com.dk.mdm.model.pojo.ivt.Outbound;
|
|
|
+import com.dk.mdm.model.pojo.ivt.OutboundItem;
|
|
|
import com.dk.mdm.model.pojo.pur.Purchase;
|
|
|
import com.dk.mdm.model.pojo.pur.PurchaseItem;
|
|
|
import com.dk.mdm.model.query.ivt.InboundItemQuery;
|
|
|
@@ -26,6 +28,7 @@ import com.dk.mdm.model.response.ivt.InboundItemResponse;
|
|
|
import com.dk.mdm.model.response.ivt.InboundResponse;
|
|
|
import com.dk.mdm.model.vo.ivt.InboundItemVO;
|
|
|
import com.dk.mdm.model.vo.ivt.InboundVO;
|
|
|
+import com.dk.mdm.model.vo.ivt.OutboundItemVO;
|
|
|
import com.dk.mdm.service.common.CommonService;
|
|
|
import com.dk.mdm.service.ivt.inventory.InventoryService;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
@@ -44,616 +47,637 @@ import java.util.UUID;
|
|
|
|
|
|
|
|
|
/**
|
|
|
- * @desc : 其他入库业务层
|
|
|
- * @date : 2024/3/7 14:11
|
|
|
* @author : 寇珊珊
|
|
|
+ * @desc : 其他入库业务层
|
|
|
+ * @date : 2024/3/7 14:11
|
|
|
*/
|
|
|
@Service
|
|
|
public class InboundOtherService extends BaseService<Inbound> {
|
|
|
|
|
|
- @Override
|
|
|
- public BaseMapper<Inbound> getRepository() {
|
|
|
- return inboundMapper;
|
|
|
- }
|
|
|
-
|
|
|
- @Autowired
|
|
|
- private InboundMapper inboundMapper;
|
|
|
-
|
|
|
- @Autowired
|
|
|
- private InboundConvert inboundConvert;
|
|
|
-
|
|
|
- @Autowired
|
|
|
- private InboundItemMapper inboundItemMapper;
|
|
|
-
|
|
|
- @Autowired
|
|
|
- private InboundItemConvert inboundItemConvert;
|
|
|
-
|
|
|
- @Autowired
|
|
|
- private CommonService commonService;
|
|
|
-
|
|
|
- @Autowired
|
|
|
- private CommonMapper commonMapper;
|
|
|
-
|
|
|
- @Autowired
|
|
|
- private InventoryService inventoryService;
|
|
|
-
|
|
|
-
|
|
|
- /**
|
|
|
- * @desc : 条件查询
|
|
|
- * @date : 2024/3/7 14:12
|
|
|
- * @author : 寇珊珊
|
|
|
- */
|
|
|
- @Pagination
|
|
|
- public ResponseResultVO<PageList<InboundResponse>> selectByCond(InboundQuery inboundQuery) {
|
|
|
- return super.mergeListWithCount(inboundQuery, inboundMapper.selectByCond(inboundQuery),
|
|
|
- inboundMapper.countByCond(inboundQuery));
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * @desc : 查询明细
|
|
|
- * @date : 2024/3/9 15:43
|
|
|
- * @author : 寇珊珊
|
|
|
- */
|
|
|
- @Pagination
|
|
|
- public ResponseResultVO<Map<String, Object>> selectOtherInboundItemInfoById(String id) {
|
|
|
- Map<String, Object> result = new HashMap<>();
|
|
|
- // 商品明细
|
|
|
- List<InboundItemResponse> inboundItemResponses = inboundItemMapper.selectByCond(new InboundItemQuery().setIntoId(id));
|
|
|
- result.put("itemList", inboundItemResponses);
|
|
|
- // 收款
|
|
|
-
|
|
|
- // 附件
|
|
|
- return ResponseResultUtil.success(result);
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- /**
|
|
|
- * @desc : 其他入库新建
|
|
|
- * @date : 2024/3/7 14:13
|
|
|
- * @author : 寇珊珊
|
|
|
- */
|
|
|
- @Transactional(rollbackFor = {Exception.class})
|
|
|
- public ResponseResultVO<?> otherInboundInsert(InboundVO inboundVO) {
|
|
|
- //region 查询当前公司的系统参数 自动办理信息 并赋值
|
|
|
- Map<String, Object> map = new HashMap<>();
|
|
|
- map.put("cpId", inboundVO.getCpId());
|
|
|
- map.put("code", "IVT_001");
|
|
|
- //自动办理标识
|
|
|
- String flgHandleSetting = commonMapper.getSettingValue(map);
|
|
|
- //自动办理标识为1 自动办理入库
|
|
|
- if(Constant.FlgAutoHandleStringType.ONE.getValue().equals(flgHandleSetting)){
|
|
|
- inboundVO.setFlgHandleSetting(Constant.FlgHandleSetting.TRUE.getValue());
|
|
|
- inboundVO.setFlgAutoHandle(Constant.FlgAutoHandle.TRUE.getValue());
|
|
|
- }
|
|
|
- //endregion
|
|
|
-
|
|
|
- //region 总单
|
|
|
- //获取 id/单号
|
|
|
- Map<String , Object> codeMap = commonService.getUniqueNoteCode(Constant.docNameConstant.OTHERINBOUND.getName(),false);
|
|
|
- inboundVO.setIntoId(codeMap.get("outId").toString()).
|
|
|
- setIntoNo(codeMap.get("outNote").toString());
|
|
|
- //入库类型
|
|
|
- inboundVO.setIntoType(Constant.IntoType.OTHER.getName());
|
|
|
- //自动入库标识
|
|
|
- if (inboundVO.getFlgAutoHandle()) {
|
|
|
- //已入库
|
|
|
- inboundVO.setIntoStatus(Constant.IntoStatus.YIRUKU.getName());
|
|
|
- } else {
|
|
|
- //入库中
|
|
|
- inboundVO.setIntoStatus(Constant.IntoStatus.RUKUZHONG.getName());
|
|
|
- }
|
|
|
- //入库状态等于已入库 更新合计入库数量/金额 = 入库中数量/入库中金额
|
|
|
- if (Constant.IntoStatus.YIRUKU.getName().equals(inboundVO.getIntoStatus())) {
|
|
|
- inboundVO.setIntoQty(inboundVO.getIntoingQty())
|
|
|
- .setIntoAmt(inboundVO.getIntoingAmt())
|
|
|
- .setIntoingQty(BigDecimal.ZERO)
|
|
|
- .setIntoingAmt(BigDecimal.ZERO)
|
|
|
- ;
|
|
|
- }else{
|
|
|
- inboundVO.setIntoQty(BigDecimal.ZERO)
|
|
|
- .setIntoAmt(BigDecimal.ZERO)
|
|
|
- ;
|
|
|
- }
|
|
|
- //实体转换
|
|
|
- Inbound inbound = inboundConvert.convertToPo(inboundVO);
|
|
|
- inboundMapper.insert(inbound);
|
|
|
- //endregion
|
|
|
-
|
|
|
- //region 明细
|
|
|
- //校验明细
|
|
|
- if (inboundVO.getItemList().size() == 0) {
|
|
|
- throw new BaseBusinessException(ErrorCodeEnum.INBOUND_ITEM_NOT_EXIST.getCode(),
|
|
|
- ErrorCodeEnum.INBOUND_ITEM_NOT_EXIST.getMessage());
|
|
|
- }
|
|
|
- for (InboundItemVO inboundItemVO : inboundVO.getItemList()) {
|
|
|
- //region 将库存需要的参数赋值
|
|
|
- inboundItemVO.setInventoryType(Constant.InventoryType.INBOUND.getName());
|
|
|
- inboundItemVO.setInventoryDocCode(Constant.InventoryDocCode.OTHER_INBOUND.getValue());
|
|
|
- //endregion
|
|
|
-
|
|
|
- //总单id
|
|
|
- inboundItemVO.setIntoId(inboundVO.getIntoId());
|
|
|
- //入库类型
|
|
|
- inboundItemVO.setIntoType(inboundVO.getIntoType());
|
|
|
- //出库数量
|
|
|
- inboundItemVO.setOutQty(BigDecimal.ZERO);
|
|
|
- //入库状态等于已入库 更新合计入库数量/金额 = 入库中数量/入库中金额
|
|
|
- if (Constant.IntoStatus.YIRUKU.getName().equals(inboundVO.getIntoStatus())) {
|
|
|
- inboundItemVO
|
|
|
- .setIntoQty(inboundItemVO.getIntoingQty())
|
|
|
- .setIntoAmt(inboundItemVO.getIntoingAmt())
|
|
|
- .setIntoingQty(BigDecimal.ZERO)
|
|
|
- .setIntoingAmt(BigDecimal.ZERO)
|
|
|
- .setCostPrice(inboundItemVO.getPriceInto())
|
|
|
- .setCostAmt(inboundItemVO.getOutQty().multiply(inboundItemVO.getPriceInto()).setScale(2, BigDecimal.ROUND_HALF_UP))
|
|
|
- ;
|
|
|
- }else{
|
|
|
- inboundItemVO
|
|
|
- .setIntoQty(BigDecimal.ZERO)
|
|
|
- .setIntoAmt(BigDecimal.ZERO);
|
|
|
- }
|
|
|
- //入库状态
|
|
|
- inboundItemVO.setIntoStatus(inboundVO.getIntoStatus());
|
|
|
- //实体转换
|
|
|
- InboundItem inboundItem = inboundItemConvert.convertToPo(inboundItemVO);
|
|
|
- inboundItemMapper.insert(inboundItem);
|
|
|
- }
|
|
|
- //endregion
|
|
|
-
|
|
|
-
|
|
|
- //todo 如果是已入库 调用库存 后续写库存这里补上
|
|
|
- //region 库存
|
|
|
- if(Constant.IntoStatus.YIRUKU.getName().equals(inboundVO.getIntoStatus())){
|
|
|
- Map<String, Object> invMap = new HashMap<>();
|
|
|
- map.put("intoDetail",inboundVO.getItemList());
|
|
|
- inventoryService.updateInventoryInformation(invMap);
|
|
|
- }
|
|
|
- //endregion
|
|
|
-
|
|
|
-
|
|
|
- return ResponseResultUtil.success(inboundVO);
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- /**
|
|
|
- * @desc : 其他入库编辑
|
|
|
- * @date : 2024/3/25 16:25
|
|
|
- * @author : 寇珊珊
|
|
|
- */
|
|
|
- @Transactional(rollbackFor = {Exception.class})
|
|
|
- public ResponseResultVO<?> otherInboundUpdate(InboundVO inboundVO) {
|
|
|
- //region 明细数量金额 求和
|
|
|
- BigDecimal sumQty = inboundVO.getItemList().stream().map(InboundItemVO::getIntoingQty).reduce(BigDecimal.ZERO, BigDecimal::add).setScale(6, BigDecimal.ROUND_HALF_UP);
|
|
|
- BigDecimal sumAmt = inboundVO.getItemList().stream().map(InboundItemVO::getIntoingAmt).reduce(BigDecimal.ZERO, BigDecimal::add).setScale(2, BigDecimal.ROUND_HALF_UP);
|
|
|
- //endregion
|
|
|
-
|
|
|
- //region 自动办理参数为true 已入库编辑
|
|
|
- //自动办理参数为true
|
|
|
- if (Constant.FlgHandleSetting.TRUE.getValue().equals(inboundVO.getFlgHandleSetting())) {
|
|
|
-
|
|
|
- //region 修改明细
|
|
|
- List<InboundItemVO> itemList = inboundVO.getItemList();
|
|
|
- for (InboundItemVO inboundItemVO : itemList) {
|
|
|
- //根据id查询
|
|
|
- InboundItemResponse inboundItemResponse = inboundItemMapper.selectById(inboundItemVO.getItemId());
|
|
|
- //region 将库存需要的参数赋值
|
|
|
- inboundItemVO.setInventoryType(Constant.InventoryType.INBOUND.getName());
|
|
|
- inboundItemVO.setInventoryDocCode(Constant.InventoryDocCode.PURCHASE_ORDER.getValue());
|
|
|
- //编辑之前的数
|
|
|
- inboundItemVO.setQtyBeforeUpdate(inboundItemResponse.getIntoQty());
|
|
|
- inboundItemVO.setAmtBeforeUpdate(inboundItemResponse.getIntoAmt());
|
|
|
- //编辑之后的数
|
|
|
- inboundItemVO.setIntoQty(inboundItemVO.getIntoQty());
|
|
|
- inboundItemVO.setIntoAmt(inboundItemVO.getIntoAmt());
|
|
|
-
|
|
|
- //endregion
|
|
|
-
|
|
|
- //赋值
|
|
|
- InboundItem inboundItem = new InboundItem();
|
|
|
- inboundItem.setItemId(inboundItemVO.getItemId());
|
|
|
- inboundItem.setIntoQty(inboundItemVO.getIntoingQty());
|
|
|
- inboundItem.setIntoAmt(inboundItemVO.getIntoingAmt());
|
|
|
- inboundItem.setCostPrice(inboundItemVO.getPriceInto());
|
|
|
- inboundItem.setCostAmt(inboundItemVO.getIntoQty().multiply(inboundItemVO.getPriceInto()).setScale(6, BigDecimal.ROUND_HALF_UP));
|
|
|
- //修改
|
|
|
- inboundItemMapper.update(inboundItem,
|
|
|
- new UpdateWrapper<InboundItem>().lambda()
|
|
|
- .eq(InboundItem::getItemId, UUID.fromString(inboundItem.getItemId()))
|
|
|
- );
|
|
|
- }
|
|
|
- //endregion
|
|
|
-
|
|
|
- //region 修改入库总单
|
|
|
- Inbound inbound = new Inbound();
|
|
|
- inbound.setIntoId(inboundVO.getIntoId());
|
|
|
- inbound.setIntoQty(sumQty);
|
|
|
- inbound.setIntoAmt(sumAmt);
|
|
|
- //修改
|
|
|
- inboundMapper.update(inbound,
|
|
|
- new UpdateWrapper<Inbound>().lambda().eq(Inbound::getIntoId, UUID.fromString(inbound.getIntoId()))
|
|
|
- );
|
|
|
- //endregion
|
|
|
-
|
|
|
- //region todo调用库存
|
|
|
- Map<String, Object> map = new HashMap<>();
|
|
|
- map.put("intoDetail", inboundVO.getItemList());
|
|
|
- inventoryService.updateInventoryInformation(map);
|
|
|
- //endregion
|
|
|
- }
|
|
|
- //endregion
|
|
|
-
|
|
|
- //region 自动办理参数false 入库中编辑
|
|
|
- //自动办理标识为false 并且 自动办理参数为false 入库中
|
|
|
- if (!inboundVO.getFlgAutoHandle() && Constant.FlgHandleSetting.FALSE.getValue().equals(inboundVO.getFlgHandleSetting())) {
|
|
|
- //region 修改明细
|
|
|
- List<InboundItemVO> itemList = inboundVO.getItemList();
|
|
|
- for (InboundItemVO inboundItemVO : itemList) {
|
|
|
- //赋值
|
|
|
- InboundItem inboundItem = new InboundItem();
|
|
|
- inboundItem.setItemId(inboundItemVO.getItemId());
|
|
|
- inboundItem.setIntoingQty(inboundItemVO.getIntoingQty());
|
|
|
- inboundItem.setIntoingAmt(inboundItemVO.getIntoingAmt());
|
|
|
- //修改
|
|
|
- inboundItemMapper.update(inboundItem,
|
|
|
- new UpdateWrapper<InboundItem>().lambda()
|
|
|
- .eq(InboundItem::getItemId, UUID.fromString(inboundItem.getItemId()))
|
|
|
- );
|
|
|
- }
|
|
|
- //endregion
|
|
|
- //region 修改入库总单
|
|
|
- Inbound inbound = new Inbound();
|
|
|
- inbound.setIntoId(inboundVO.getIntoId());
|
|
|
- inbound.setIntoingQty(sumQty);
|
|
|
- inbound.setIntoingAmt(sumAmt);
|
|
|
- //修改
|
|
|
- inboundMapper.update(inbound,
|
|
|
- new UpdateWrapper<Inbound>().lambda().eq(Inbound::getIntoId, UUID.fromString(inbound.getIntoId()))
|
|
|
- );
|
|
|
- //endregion
|
|
|
- }
|
|
|
- //endregion
|
|
|
-
|
|
|
- return ResponseResultUtil.success(inboundVO);
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * @desc : 其他入库作废
|
|
|
- * @date : 2024/3/25 16:25
|
|
|
- * @author : 寇珊珊
|
|
|
- */
|
|
|
- @Transactional(rollbackFor = {Exception.class})
|
|
|
- public ResponseResultVO<?> otherInboundRepeal(String intoId) {
|
|
|
- //region 查询总单 查询明细
|
|
|
- //根据id查询 此条入库单的数据还未更改前的数据
|
|
|
- InboundResponse inboundResponse = inboundMapper.selectById(intoId);
|
|
|
- //根据总单id查询
|
|
|
- List<InboundItemResponse> inboundItemResponseList = inboundItemMapper.selectByCond(new InboundItemQuery().setIntoId(inboundResponse.getIntoId()));
|
|
|
- //endregion
|
|
|
-
|
|
|
- //region 自动办理参数为true 已入库编辑
|
|
|
- //自动办理参数为true
|
|
|
- if (Constant.FlgHandleSetting.TRUE.getValue().equals(inboundResponse.getFlgHandleSetting())) {
|
|
|
- //region todo 退账 当单据红的账款id不为空说明有账, 要先退账才能进行操作
|
|
|
- if (inboundResponse.getReceivableId() != null) {
|
|
|
-
|
|
|
- }
|
|
|
- //endregion
|
|
|
-
|
|
|
- //region 修改明细
|
|
|
- for (InboundItemResponse inboundItemResponse : inboundItemResponseList) {
|
|
|
- //region 将库存需要的参数赋值
|
|
|
- inboundItemResponse.setInventoryType(Constant.InventoryType.INBOUND.getName());
|
|
|
- inboundItemResponse.setInventoryDocCode(Constant.InventoryDocCode.PURCHASE_ORDER.getValue());
|
|
|
- inboundItemResponse.setIntoQty(inboundItemResponse.getIntoQty().negate());
|
|
|
- inboundItemResponse.setIntoAmt(inboundItemResponse.getIntoAmt().negate());
|
|
|
- //endregion
|
|
|
-
|
|
|
- //赋值
|
|
|
- InboundItem inboundItem = new InboundItem();
|
|
|
- inboundItem.setItemId(inboundItemResponse.getItemId());
|
|
|
- inboundItem.setFlgValid(false);
|
|
|
- //修改
|
|
|
- inboundItemMapper.update(inboundItem,
|
|
|
- new UpdateWrapper<InboundItem>().lambda()
|
|
|
- .eq(InboundItem::getItemId, UUID.fromString(inboundItem.getItemId()))
|
|
|
- );
|
|
|
- }
|
|
|
- //endregion
|
|
|
-
|
|
|
- //region 修改入库总单
|
|
|
- Inbound inbound = new Inbound();
|
|
|
- inbound.setIntoId(inboundResponse.getIntoId());
|
|
|
- inbound.setFlgValid(false);
|
|
|
- //修改
|
|
|
- inboundMapper.update(inbound,
|
|
|
- new UpdateWrapper<Inbound>().lambda().eq(Inbound::getIntoId, UUID.fromString(inbound.getIntoId()))
|
|
|
- );
|
|
|
- //endregion
|
|
|
-
|
|
|
- //region
|
|
|
- Map<String, Object> map = new HashMap<>();
|
|
|
- map.put("intoDetail", inboundItemResponseList);
|
|
|
- inventoryService.updateInventoryInformation(map);
|
|
|
- //endregion
|
|
|
- }
|
|
|
- //endregion
|
|
|
-
|
|
|
- //region 自动办理参数false 入库中编辑
|
|
|
- //自动办理标识为false 并且 自动办理参数为false 入库中
|
|
|
- if (!inboundResponse.getFlgAutoHandle() && Constant.FlgHandleSetting.FALSE.getValue().equals(inboundResponse.getFlgHandleSetting())) {
|
|
|
- //region 修改明细
|
|
|
- for (InboundItemResponse inboundItemResponse : inboundItemResponseList) {
|
|
|
- //赋值
|
|
|
- InboundItem inboundItem = new InboundItem();
|
|
|
- inboundItem.setItemId(inboundItemResponse.getItemId());
|
|
|
- inboundItem.setIntoingQty(BigDecimal.ZERO);
|
|
|
- inboundItem.setIntoingAmt(BigDecimal.ZERO);
|
|
|
- //修改
|
|
|
- inboundItemMapper.update(inboundItem,
|
|
|
- new UpdateWrapper<InboundItem>().lambda()
|
|
|
- .eq(InboundItem::getItemId, UUID.fromString(inboundItem.getItemId()))
|
|
|
- );
|
|
|
- }
|
|
|
- //endregion
|
|
|
-
|
|
|
- //region 修改入库总单
|
|
|
- Inbound inbound = new Inbound();
|
|
|
- inbound.setIntoId(inboundResponse.getIntoId());
|
|
|
- inbound.setIntoingQty(BigDecimal.ZERO);
|
|
|
- inbound.setIntoAmt(BigDecimal.ZERO);
|
|
|
- //修改
|
|
|
- inboundMapper.update(inbound,
|
|
|
- new UpdateWrapper<Inbound>().lambda().eq(Inbound::getIntoId, UUID.fromString(inbound.getIntoId()))
|
|
|
- );
|
|
|
- //endregion
|
|
|
- }
|
|
|
- //endregion
|
|
|
-
|
|
|
- return ResponseResultUtil.success();
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- /**
|
|
|
- * @desc : 其他入库办理
|
|
|
- * @date : 2024/3/7 15:47
|
|
|
- * @author : 寇珊珊
|
|
|
- */
|
|
|
- @Transactional(rollbackFor = {Exception.class})
|
|
|
- public ResponseResultVO<?> otherHandleInbound(InboundVO inboundVO) {
|
|
|
- //region 编辑明细
|
|
|
- //校验明细
|
|
|
- if (inboundVO.getItemList().size() == 0) {
|
|
|
- throw new BaseBusinessException(ErrorCodeEnum.INBOUND_ITEM_NOT_EXIST.getCode(),
|
|
|
- ErrorCodeEnum.INBOUND_ITEM_NOT_EXIST.getMessage());
|
|
|
- }
|
|
|
- for (InboundItemVO inboundItemVO : inboundVO.getItemList()) {
|
|
|
- //region 将库存需要的参数赋值
|
|
|
- inboundItemVO.setInventoryType(Constant.InventoryType.INBOUND.getName());
|
|
|
- inboundItemVO.setInventoryDocCode(Constant.InventoryDocCode.OTHER_INBOUND.getValue());
|
|
|
- //endregion
|
|
|
- //region 修改明细
|
|
|
- if (inboundItemVO.getIntoId() != null) {
|
|
|
- InboundItemResponse inboundItemResponse = inboundItemMapper.selectById(inboundItemVO.getItemId());
|
|
|
- //region 校验数量是否超出
|
|
|
- if (inboundItemVO.getIntoingQty().compareTo(inboundItemResponse.getIntoingQty()) > 0) {
|
|
|
- throw new BaseBusinessException(ErrorCodeEnum.CANNOT_EXCEED_THE_QUANTITY_IN_THE_OUTBOUND_SHIPMENT.getCode(),
|
|
|
- ErrorCodeEnum.CANNOT_EXCEED_THE_QUANTITY_IN_THE_OUTBOUND_SHIPMENT.getMessage());
|
|
|
- }
|
|
|
- //endregion
|
|
|
-
|
|
|
- //region 编辑明细
|
|
|
- inboundItemVO
|
|
|
- .setIntoQty(inboundItemResponse.getIntoQty().add(inboundItemVO.getIntoingQty()))
|
|
|
- .setIntoAmt(inboundItemResponse.getIntoAmt().add(inboundItemVO.getIntoingAmt()))
|
|
|
- .setIntoingQty(BigDecimal.ZERO)
|
|
|
- .setIntoingAmt(BigDecimal.ZERO)
|
|
|
- .setCostPrice(inboundItemVO.getPriceInto())
|
|
|
- .setCostPrice(inboundItemVO.getIntoQty().subtract(inboundItemVO.getCostPrice()).setScale(2, BigDecimal.ROUND_HALF_UP))
|
|
|
- ;
|
|
|
- //入库状态
|
|
|
- String intoStatus = this.setIntoStatus(inboundItemVO.getIntoingQty(), inboundItemVO.getIntoQty());
|
|
|
- inboundItemVO.setIntoStatus(intoStatus);
|
|
|
- //实体转换
|
|
|
- InboundItem inboundItem = inboundItemConvert.convertToPo(inboundItemVO);
|
|
|
- //修改
|
|
|
- inboundItemMapper.update(inboundItem,
|
|
|
- new UpdateWrapper<InboundItem>().lambda()
|
|
|
- .eq(InboundItem::getItemId, UUID.fromString(inboundItem.getItemId()))
|
|
|
- );
|
|
|
- //endregion
|
|
|
- }
|
|
|
- //endregion
|
|
|
-
|
|
|
- //region 新建明细
|
|
|
- else {
|
|
|
- inboundItemVO
|
|
|
- .setIntoQty(inboundItemVO.getIntoingQty())
|
|
|
- .setIntoAmt(inboundItemVO.getIntoingAmt())
|
|
|
- .setIntoId(inboundVO.getIntoId())
|
|
|
- .setCostPrice(inboundItemVO.getPriceInto())
|
|
|
- .setCostAmt(inboundItemVO.getIntoQty().multiply(inboundItemVO.getPriceInto()).setScale(2, BigDecimal.ROUND_HALF_UP))
|
|
|
- .setIntoType(Constant.IntoType.OTHER.getName())
|
|
|
- .setIntoingQty(BigDecimal.ZERO)
|
|
|
- .setIntoingAmt(BigDecimal.ZERO)
|
|
|
- ;
|
|
|
- //入库状态
|
|
|
- String intoStatus = this.setIntoStatus(inboundItemVO.getIntoingQty(), inboundItemVO.getIntoQty());
|
|
|
- inboundItemVO.setIntoStatus(intoStatus);
|
|
|
- //实体转换
|
|
|
- InboundItem inboundItem = inboundItemConvert.convertToPo(inboundItemVO);
|
|
|
- //新建
|
|
|
- inboundItemMapper.insert(inboundItem);
|
|
|
- }
|
|
|
- //endregion
|
|
|
- }
|
|
|
- //endregion
|
|
|
-
|
|
|
- //region 删除明细
|
|
|
- if (inboundVO.getDeleteItemList() != null) {
|
|
|
- for (InboundItemVO inboundItemVO : inboundVO.getDeleteItemList()) {
|
|
|
- if (inboundItemVO.getItemId() != null) {
|
|
|
- InboundItem inboundItem = inboundItemConvert.convertToPo(inboundItemVO);
|
|
|
- inboundItem.setFlgValid(false);
|
|
|
- //修改
|
|
|
- inboundItemMapper.update(inboundItem,
|
|
|
- new UpdateWrapper<InboundItem>().lambda()
|
|
|
- .eq(InboundItem::getItemId, UUID.fromString(inboundItem.getItemId()))
|
|
|
- );
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- //endregion
|
|
|
-
|
|
|
- //region 编辑总单
|
|
|
- BigDecimal sumIntoQty = inboundVO.getItemList().stream().map(InboundItemVO::getIntoQty).reduce(BigDecimal.ZERO, BigDecimal::add).setScale(6, BigDecimal.ROUND_HALF_UP);
|
|
|
- BigDecimal sumIntoAmt = inboundVO.getItemList().stream().map(InboundItemVO::getIntoAmt).reduce(BigDecimal.ZERO, BigDecimal::add).setScale(2, BigDecimal.ROUND_HALF_UP);
|
|
|
- inboundVO.setIntoQty(sumIntoQty);
|
|
|
- inboundVO.setIntoAmt(sumIntoAmt);
|
|
|
- inboundVO.setIntoingQty(BigDecimal.ZERO);
|
|
|
- inboundVO.setIntoingAmt(BigDecimal.ZERO);
|
|
|
- //入库状态
|
|
|
- String intoStatus = this.setIntoStatus(inboundVO.getIntoingQty(), inboundVO.getIntoQty());
|
|
|
- inboundVO.setIntoStatus(intoStatus);
|
|
|
- //实体转换
|
|
|
- Inbound inbound = inboundConvert.convertToPo(inboundVO);
|
|
|
- //修改
|
|
|
- inboundMapper.update(inbound,
|
|
|
- new UpdateWrapper<Inbound>().lambda()
|
|
|
- .eq(Inbound::getIntoId, UUID.fromString(inbound.getIntoId()))
|
|
|
- );
|
|
|
- //endregion
|
|
|
-
|
|
|
- //region 修改库存
|
|
|
- Map<String, Object> map = new HashMap<>();
|
|
|
- map.put("intoDetail", inboundVO.getItemList());
|
|
|
- inventoryService.updateInventoryInformation(map);
|
|
|
- //endregion
|
|
|
- return ResponseResultUtil.success(inboundVO);
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- /**
|
|
|
- * @desc : 其它入库撤销
|
|
|
- * @date : 2024/3/7 17:06
|
|
|
- * @author : 寇珊珊
|
|
|
- */
|
|
|
- @Transactional(rollbackFor = {Exception.class})
|
|
|
- public ResponseResultVO<?> otherInboundCancel(InboundVO inboundVO) {
|
|
|
- //region 总单数据信息
|
|
|
- InboundResponse inboundResponse = inboundMapper.selectById(inboundVO.getIntoId());
|
|
|
- Inbound inbound = new Inbound();
|
|
|
- inbound.setIntoId(inboundResponse.getIntoId())
|
|
|
- .setIntoDate(null)
|
|
|
- .setIntoStatus(Constant.IntoStatus.RUKUZHONG.getName())
|
|
|
- .setIntoingQty(inboundResponse.getIntoQty())
|
|
|
- .setIntoingAmt(inboundResponse.getIntoAmt())
|
|
|
- .setIntoQty(BigDecimal.ZERO)
|
|
|
- .setIntoAmt(BigDecimal.ZERO);
|
|
|
- //修改
|
|
|
- inboundMapper.update(inbound,
|
|
|
- new UpdateWrapper<Inbound>().lambda()
|
|
|
- .eq(Inbound::getIntoId, UUID.fromString(inbound.getIntoId()))
|
|
|
- );
|
|
|
- //endregion
|
|
|
-
|
|
|
- //region 明细数据
|
|
|
- InboundItemQuery inboundItemQuery = new InboundItemQuery().setIntoId(inbound.getIntoId());
|
|
|
- //根据总单查明细
|
|
|
- List<InboundItemResponse> inboundItemResponseList = inboundItemMapper.selectByCond(inboundItemQuery);
|
|
|
- for (InboundItemResponse inboundItemResponse : inboundItemResponseList) {
|
|
|
- //region 将库存需要的参数赋值
|
|
|
- inboundItemResponse.setInventoryType(Constant.InventoryType.INBOUND.getName());
|
|
|
- inboundItemResponse.setInventoryDocCode(Constant.InventoryDocCode.OTHER_INBOUND.getValue());
|
|
|
- //region
|
|
|
- InboundItem inboundItem = new InboundItem();
|
|
|
- inboundItem
|
|
|
- .setIntoId(inbound.getIntoId())
|
|
|
- .setIntoStatus(Constant.IntoStatus.RUKUZHONG.getName())
|
|
|
- .setIntoingQty(inboundItemResponse.getInvQty())
|
|
|
- .setIntoingAmt(inboundItemResponse.getIntoAmt())
|
|
|
- .setIntoQty(BigDecimal.ZERO)
|
|
|
- .setIntoAmt(BigDecimal.ZERO)
|
|
|
- .setCostPrice(BigDecimal.ZERO)
|
|
|
- .setCostAmt(BigDecimal.ZERO)
|
|
|
- .setItemId(inboundItemResponse.getItemId());
|
|
|
- //修改
|
|
|
- inboundItemMapper.update(inboundItem,
|
|
|
- new UpdateWrapper<InboundItem>().lambda()
|
|
|
- .eq(InboundItem::getItemId, UUID.fromString(inboundItem.getItemId()))
|
|
|
- );
|
|
|
- //数量金额取反 用于给库存使用
|
|
|
- inboundItemResponse.setIntoQty(inboundItemResponse.getIntoQty().negate());
|
|
|
- inboundItemResponse.setIntoAmt(inboundItemResponse.getIntoAmt().negate());
|
|
|
- }
|
|
|
- //endregion
|
|
|
-
|
|
|
- //region 修改库存
|
|
|
- Map<String, Object> map = new HashMap<>();
|
|
|
- map.put("intoDetail", inboundItemResponseList);
|
|
|
- inventoryService.updateInventoryInformation(map);
|
|
|
- //endregion
|
|
|
-
|
|
|
- return ResponseResultUtil.success();
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- /**
|
|
|
- * @desc : 入库状态通用(目前本页面)
|
|
|
- * @date : 2024/3/9 8:59
|
|
|
- * @author : 寇珊珊
|
|
|
- */
|
|
|
- public String setIntoStatus(BigDecimal intoingQty, BigDecimal intoQty) {
|
|
|
- //入库状态
|
|
|
- String intoStatus = null;
|
|
|
- //已入库数量>=0 入库中数量>0
|
|
|
- if (intoQty.compareTo(BigDecimal.ZERO) >= 0 && intoingQty.compareTo(BigDecimal.ZERO) > 0 ) {
|
|
|
- //入库中
|
|
|
- intoStatus = Constant.IntoStatus.RUKUZHONG.getName();
|
|
|
- }
|
|
|
- //已入库数量=0 入库中数量=0
|
|
|
- else if (intoQty.compareTo(BigDecimal.ZERO) == 0 && intoingQty.compareTo(BigDecimal.ZERO) == 0) {
|
|
|
- //待入库
|
|
|
- intoStatus = Constant.IntoStatus.DAIRUKU.getName();
|
|
|
- }
|
|
|
- //已入库数量>0 入库中数量=0
|
|
|
- else if (intoQty.compareTo(BigDecimal.ZERO) >0 && intoingQty.compareTo(BigDecimal.ZERO)==0) {
|
|
|
- //已入库
|
|
|
- intoStatus = Constant.IntoStatus.YIRUKU.getName();
|
|
|
- }
|
|
|
- return intoStatus;
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- /**
|
|
|
- * @desc : 条件查询 --- web端入库办理用
|
|
|
- * @date : 2024/3/23 9:24
|
|
|
- * @author : 寇珊珊
|
|
|
- */
|
|
|
- @Pagination
|
|
|
- public ResponseResultVO<PageList<InboundResponse>> selectInbound(InboundQuery inboundQuery) {
|
|
|
- return super.mergeListWithCount(inboundQuery, inboundMapper.selectInbound(inboundQuery),
|
|
|
- inboundMapper.selectInboundCond(inboundQuery));
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * @desc : 查询明细查询 --- web端入库办理用
|
|
|
- * @date : 2024/3/9 15:43
|
|
|
- * @author : 寇珊珊
|
|
|
- */
|
|
|
- public ResponseResultVO<Map<String, Object>> selectInboundItem(String id) {
|
|
|
- Map<String, Object> result = new HashMap<>();
|
|
|
- // 商品明细
|
|
|
- List<InboundItemResponse> inboundItemResponses = inboundItemMapper.selectInboundItem(new InboundItemQuery().setIntoId(id));
|
|
|
- result.put("itemList", inboundItemResponses);
|
|
|
- // 收款
|
|
|
-
|
|
|
- // 附件
|
|
|
- return ResponseResultUtil.success(result);
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
+ @Override
|
|
|
+ public BaseMapper<Inbound> getRepository() {
|
|
|
+ return inboundMapper;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private InboundMapper inboundMapper;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private InboundConvert inboundConvert;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private InboundItemMapper inboundItemMapper;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private InboundItemConvert inboundItemConvert;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private CommonService commonService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private CommonMapper commonMapper;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private InventoryService inventoryService;
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @desc : 条件查询
|
|
|
+ * @date : 2024/3/7 14:12
|
|
|
+ * @author : 寇珊珊
|
|
|
+ */
|
|
|
+ @Pagination
|
|
|
+ public ResponseResultVO<PageList<InboundResponse>> selectByCond(InboundQuery inboundQuery) {
|
|
|
+ return super.mergeListWithCount(inboundQuery, inboundMapper.selectByCond(inboundQuery),
|
|
|
+ inboundMapper.countByCond(inboundQuery));
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @desc : 查询明细
|
|
|
+ * @date : 2024/3/9 15:43
|
|
|
+ * @author : 寇珊珊
|
|
|
+ */
|
|
|
+ @Pagination
|
|
|
+ public ResponseResultVO<Map<String, Object>> selectOtherInboundItemInfoById(String id) {
|
|
|
+ Map<String, Object> result = new HashMap<>();
|
|
|
+ // 商品明细
|
|
|
+ List<InboundItemResponse> inboundItemResponses = inboundItemMapper.selectByCond(new InboundItemQuery().setIntoId(id));
|
|
|
+ result.put("itemList", inboundItemResponses);
|
|
|
+ // 收款
|
|
|
+
|
|
|
+ // 附件
|
|
|
+ return ResponseResultUtil.success(result);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @desc : 其他入库新建
|
|
|
+ * @date : 2024/3/7 14:13
|
|
|
+ * @author : 寇珊珊
|
|
|
+ */
|
|
|
+ @Transactional(rollbackFor = {Exception.class})
|
|
|
+ public ResponseResultVO<?> otherInboundInsert(InboundVO inboundVO) {
|
|
|
+ //region 查询当前公司的系统参数 自动办理信息 并赋值
|
|
|
+ Map<String, Object> map = new HashMap<>();
|
|
|
+ map.put("cpId", inboundVO.getCpId());
|
|
|
+ map.put("code", "IVT_001");
|
|
|
+ //自动办理标识
|
|
|
+ String flgHandleSetting = commonMapper.getSettingValue(map);
|
|
|
+ //自动办理标识为1 自动办理入库
|
|
|
+ if (Constant.FlgAutoHandleStringType.ONE.getValue().equals(flgHandleSetting)) {
|
|
|
+ inboundVO.setFlgHandleSetting(Constant.FlgHandleSetting.TRUE.getValue());
|
|
|
+ inboundVO.setFlgAutoHandle(Constant.FlgAutoHandle.TRUE.getValue());
|
|
|
+ }
|
|
|
+ //endregion
|
|
|
+
|
|
|
+ //region 总单
|
|
|
+ //获取 id/单号
|
|
|
+ Map<String, Object> codeMap = commonService.getUniqueNoteCode(Constant.docNameConstant.OTHERINBOUND.getName(), false);
|
|
|
+ inboundVO.setIntoId(codeMap.get("outId").toString()).
|
|
|
+ setIntoNo(codeMap.get("outNote").toString());
|
|
|
+ //入库类型
|
|
|
+ inboundVO.setIntoType(Constant.IntoType.OTHER.getName());
|
|
|
+ //自动入库标识
|
|
|
+ if (inboundVO.getFlgAutoHandle()) {
|
|
|
+ //已入库
|
|
|
+ inboundVO.setIntoStatus(Constant.IntoStatus.YIRUKU.getName());
|
|
|
+ } else {
|
|
|
+ //入库中
|
|
|
+ inboundVO.setIntoStatus(Constant.IntoStatus.RUKUZHONG.getName());
|
|
|
+ }
|
|
|
+ //入库状态等于已入库 更新合计入库数量/金额 = 入库中数量/入库中金额
|
|
|
+ if (Constant.IntoStatus.YIRUKU.getName().equals(inboundVO.getIntoStatus())) {
|
|
|
+ inboundVO.setIntoQty(inboundVO.getIntoingQty())
|
|
|
+ .setIntoAmt(inboundVO.getIntoingAmt())
|
|
|
+ .setIntoingQty(BigDecimal.ZERO)
|
|
|
+ .setIntoingAmt(BigDecimal.ZERO)
|
|
|
+ ;
|
|
|
+ } else {
|
|
|
+ inboundVO.setIntoQty(BigDecimal.ZERO)
|
|
|
+ .setIntoAmt(BigDecimal.ZERO)
|
|
|
+ ;
|
|
|
+ }
|
|
|
+ //实体转换
|
|
|
+ Inbound inbound = inboundConvert.convertToPo(inboundVO);
|
|
|
+ inboundMapper.insert(inbound);
|
|
|
+ //endregion
|
|
|
+
|
|
|
+ //region 明细
|
|
|
+ //校验明细
|
|
|
+ if (inboundVO.getItemList().size() == 0) {
|
|
|
+ throw new BaseBusinessException(ErrorCodeEnum.INBOUND_ITEM_NOT_EXIST.getCode(),
|
|
|
+ ErrorCodeEnum.INBOUND_ITEM_NOT_EXIST.getMessage());
|
|
|
+ }
|
|
|
+ for (InboundItemVO inboundItemVO : inboundVO.getItemList()) {
|
|
|
+ //region 将库存需要的参数赋值
|
|
|
+ inboundItemVO.setInventoryType(Constant.InventoryType.INBOUND.getName());
|
|
|
+ inboundItemVO.setInventoryDocCode(Constant.InventoryDocCode.OTHER_INBOUND.getValue());
|
|
|
+ //endregion
|
|
|
+
|
|
|
+ //总单id
|
|
|
+ inboundItemVO.setIntoId(inboundVO.getIntoId());
|
|
|
+ //入库类型
|
|
|
+ inboundItemVO.setIntoType(inboundVO.getIntoType());
|
|
|
+ //出库数量
|
|
|
+ inboundItemVO.setOutQty(BigDecimal.ZERO);
|
|
|
+ //入库状态等于已入库 更新合计入库数量/金额 = 入库中数量/入库中金额
|
|
|
+ if (Constant.IntoStatus.YIRUKU.getName().equals(inboundVO.getIntoStatus())) {
|
|
|
+ inboundItemVO
|
|
|
+ .setIntoQty(inboundItemVO.getIntoingQty())
|
|
|
+ .setIntoAmt(inboundItemVO.getIntoingAmt())
|
|
|
+ .setIntoingQty(BigDecimal.ZERO)
|
|
|
+ .setIntoingAmt(BigDecimal.ZERO)
|
|
|
+ .setCostPrice(inboundItemVO.getPriceInto())
|
|
|
+ .setCostAmt(inboundItemVO.getOutQty().multiply(inboundItemVO.getPriceInto()).setScale(2, BigDecimal.ROUND_HALF_UP))
|
|
|
+ ;
|
|
|
+ } else {
|
|
|
+ inboundItemVO
|
|
|
+ .setIntoQty(BigDecimal.ZERO)
|
|
|
+ .setIntoAmt(BigDecimal.ZERO);
|
|
|
+ }
|
|
|
+ //入库状态
|
|
|
+ inboundItemVO.setIntoStatus(inboundVO.getIntoStatus());
|
|
|
+ //实体转换
|
|
|
+ InboundItem inboundItem = inboundItemConvert.convertToPo(inboundItemVO);
|
|
|
+ inboundItemMapper.insert(inboundItem);
|
|
|
+ }
|
|
|
+ //endregion
|
|
|
+
|
|
|
+
|
|
|
+ //todo 如果是已入库 调用库存 后续写库存这里补上
|
|
|
+ //region 库存
|
|
|
+ if (Constant.IntoStatus.YIRUKU.getName().equals(inboundVO.getIntoStatus())) {
|
|
|
+ Map<String, Object> invMap = new HashMap<>();
|
|
|
+ map.put("intoDetail", inboundVO.getItemList());
|
|
|
+ inventoryService.updateInventoryInformation(invMap);
|
|
|
+ }
|
|
|
+ //endregion
|
|
|
+
|
|
|
+
|
|
|
+ return ResponseResultUtil.success(inboundVO);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @desc : 其他入库编辑
|
|
|
+ * @date : 2024/3/25 16:25
|
|
|
+ * @author : 寇珊珊
|
|
|
+ */
|
|
|
+ @Transactional(rollbackFor = {Exception.class})
|
|
|
+ public ResponseResultVO<?> otherInboundUpdate(InboundVO inboundVO) {
|
|
|
+ //region 小编辑
|
|
|
+ if (!inboundVO.getLimitEdit()) {
|
|
|
+ Inbound inbound = new Inbound();
|
|
|
+ inbound.setIntoId(inboundVO.getIntoId());
|
|
|
+ inbound.setRemarks(inboundVO.getRemarks());
|
|
|
+ inbound.setAnnexPaths(inboundVO.getAnnexPaths());
|
|
|
+ inboundMapper.update(inbound,
|
|
|
+ new UpdateWrapper<Inbound>().lambda()
|
|
|
+ .eq(Inbound::getIntoId, UUID.fromString(inbound.getIntoId()))
|
|
|
+ );
|
|
|
+ for (InboundItemVO inboundItemVO : inboundVO.getItemList()) {
|
|
|
+ InboundItem inboundItem = new InboundItem();
|
|
|
+ inboundItem.setItemId(inboundItemVO.getItemId());
|
|
|
+ inboundItem.setRemarks(inboundItemVO.getRemarks());
|
|
|
+ inboundItemMapper.update(inboundItem,
|
|
|
+ new UpdateWrapper<InboundItem>().lambda()
|
|
|
+ .eq(InboundItem::getItemId, UUID.fromString(inboundItem.getItemId()))
|
|
|
+ );
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //endregion
|
|
|
+ //region 大编辑
|
|
|
+ else {
|
|
|
+ //region 明细数量金额 求和
|
|
|
+ BigDecimal sumQty = inboundVO.getItemList().stream().map(InboundItemVO::getIntoingQty).reduce(BigDecimal.ZERO, BigDecimal::add).setScale(6, BigDecimal.ROUND_HALF_UP);
|
|
|
+ BigDecimal sumAmt = inboundVO.getItemList().stream().map(InboundItemVO::getIntoingAmt).reduce(BigDecimal.ZERO, BigDecimal::add).setScale(2, BigDecimal.ROUND_HALF_UP);
|
|
|
+ //endregion
|
|
|
+
|
|
|
+ //region 自动办理参数为true 已入库编辑
|
|
|
+ //自动办理参数为true
|
|
|
+ if (Constant.FlgHandleSetting.TRUE.getValue().equals(inboundVO.getFlgHandleSetting())) {
|
|
|
+
|
|
|
+ //region 修改明细
|
|
|
+ List<InboundItemVO> itemList = inboundVO.getItemList();
|
|
|
+ for (InboundItemVO inboundItemVO : itemList) {
|
|
|
+ //根据id查询
|
|
|
+ InboundItemResponse inboundItemResponse = inboundItemMapper.selectById(inboundItemVO.getItemId());
|
|
|
+ //region 将库存需要的参数赋值
|
|
|
+ inboundItemVO.setInventoryType(Constant.InventoryType.INBOUND.getName());
|
|
|
+ inboundItemVO.setInventoryDocCode(Constant.InventoryDocCode.PURCHASE_ORDER.getValue());
|
|
|
+ //编辑之前的数
|
|
|
+ inboundItemVO.setQtyBeforeUpdate(inboundItemResponse.getIntoQty());
|
|
|
+ inboundItemVO.setAmtBeforeUpdate(inboundItemResponse.getIntoAmt());
|
|
|
+ //编辑之后的数
|
|
|
+ inboundItemVO.setIntoQty(inboundItemVO.getIntoQty());
|
|
|
+ inboundItemVO.setIntoAmt(inboundItemVO.getIntoAmt());
|
|
|
+
|
|
|
+ //endregion
|
|
|
+
|
|
|
+ //赋值
|
|
|
+ InboundItem inboundItem = new InboundItem();
|
|
|
+ inboundItem.setItemId(inboundItemVO.getItemId());
|
|
|
+ inboundItem.setIntoQty(inboundItemVO.getIntoingQty());
|
|
|
+ inboundItem.setIntoAmt(inboundItemVO.getIntoingAmt());
|
|
|
+ inboundItem.setCostPrice(inboundItemVO.getPriceInto());
|
|
|
+ inboundItem.setCostAmt(inboundItemVO.getIntoQty().multiply(inboundItemVO.getPriceInto()).setScale(6, BigDecimal.ROUND_HALF_UP));
|
|
|
+ //修改
|
|
|
+ inboundItemMapper.update(inboundItem,
|
|
|
+ new UpdateWrapper<InboundItem>().lambda()
|
|
|
+ .eq(InboundItem::getItemId, UUID.fromString(inboundItem.getItemId()))
|
|
|
+ );
|
|
|
+ }
|
|
|
+ //endregion
|
|
|
+
|
|
|
+ //region 修改入库总单
|
|
|
+ Inbound inbound = new Inbound();
|
|
|
+ inbound.setIntoId(inboundVO.getIntoId());
|
|
|
+ inbound.setIntoQty(sumQty);
|
|
|
+ inbound.setIntoAmt(sumAmt);
|
|
|
+ //修改
|
|
|
+ inboundMapper.update(inbound,
|
|
|
+ new UpdateWrapper<Inbound>().lambda().eq(Inbound::getIntoId, UUID.fromString(inbound.getIntoId()))
|
|
|
+ );
|
|
|
+ //endregion
|
|
|
+
|
|
|
+ //region todo调用库存
|
|
|
+ Map<String, Object> map = new HashMap<>();
|
|
|
+ map.put("intoDetail", inboundVO.getItemList());
|
|
|
+ inventoryService.updateInventoryInformation(map);
|
|
|
+ //endregion
|
|
|
+ }
|
|
|
+ //endregion
|
|
|
+
|
|
|
+ //region 自动办理参数false 入库中编辑
|
|
|
+ //自动办理标识为false 并且 自动办理参数为false 入库中
|
|
|
+ if (!inboundVO.getFlgAutoHandle() && Constant.FlgHandleSetting.FALSE.getValue().equals(inboundVO.getFlgHandleSetting())) {
|
|
|
+ //region 修改明细
|
|
|
+ List<InboundItemVO> itemList = inboundVO.getItemList();
|
|
|
+ for (InboundItemVO inboundItemVO : itemList) {
|
|
|
+ //赋值
|
|
|
+ InboundItem inboundItem = new InboundItem();
|
|
|
+ inboundItem.setItemId(inboundItemVO.getItemId());
|
|
|
+ inboundItem.setIntoingQty(inboundItemVO.getIntoingQty());
|
|
|
+ inboundItem.setIntoingAmt(inboundItemVO.getIntoingAmt());
|
|
|
+ //修改
|
|
|
+ inboundItemMapper.update(inboundItem,
|
|
|
+ new UpdateWrapper<InboundItem>().lambda()
|
|
|
+ .eq(InboundItem::getItemId, UUID.fromString(inboundItem.getItemId()))
|
|
|
+ );
|
|
|
+ }
|
|
|
+ //endregion
|
|
|
+ //region 修改入库总单
|
|
|
+ Inbound inbound = new Inbound();
|
|
|
+ inbound.setIntoId(inboundVO.getIntoId());
|
|
|
+ inbound.setIntoingQty(sumQty);
|
|
|
+ inbound.setIntoingAmt(sumAmt);
|
|
|
+ //修改
|
|
|
+ inboundMapper.update(inbound,
|
|
|
+ new UpdateWrapper<Inbound>().lambda().eq(Inbound::getIntoId, UUID.fromString(inbound.getIntoId()))
|
|
|
+ );
|
|
|
+ //endregion
|
|
|
+ }
|
|
|
+ //endregion
|
|
|
+
|
|
|
+ }
|
|
|
+ //endregion
|
|
|
+ return ResponseResultUtil.success(inboundVO);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @desc : 其他入库作废
|
|
|
+ * @date : 2024/3/25 16:25
|
|
|
+ * @author : 寇珊珊
|
|
|
+ */
|
|
|
+ @Transactional(rollbackFor = {Exception.class})
|
|
|
+ public ResponseResultVO<?> otherInboundRepeal(String intoId) {
|
|
|
+ //region 查询总单 查询明细
|
|
|
+ //根据id查询 此条入库单的数据还未更改前的数据
|
|
|
+ InboundResponse inboundResponse = inboundMapper.selectById(intoId);
|
|
|
+ //根据总单id查询
|
|
|
+ List<InboundItemResponse> inboundItemResponseList = inboundItemMapper.selectByCond(new InboundItemQuery().setIntoId(inboundResponse.getIntoId()));
|
|
|
+ //endregion
|
|
|
+
|
|
|
+ //region 自动办理参数为true 已入库编辑
|
|
|
+ //自动办理参数为true
|
|
|
+ if (Constant.FlgHandleSetting.TRUE.getValue().equals(inboundResponse.getFlgHandleSetting())) {
|
|
|
+ //region todo 退账 当单据红的账款id不为空说明有账, 要先退账才能进行操作
|
|
|
+ if (inboundResponse.getReceivableId() != null) {
|
|
|
+
|
|
|
+ }
|
|
|
+ //endregion
|
|
|
+
|
|
|
+ //region 修改明细
|
|
|
+ for (InboundItemResponse inboundItemResponse : inboundItemResponseList) {
|
|
|
+ //region 将库存需要的参数赋值
|
|
|
+ inboundItemResponse.setInventoryType(Constant.InventoryType.INBOUND.getName());
|
|
|
+ inboundItemResponse.setInventoryDocCode(Constant.InventoryDocCode.PURCHASE_ORDER.getValue());
|
|
|
+ inboundItemResponse.setIntoQty(inboundItemResponse.getIntoQty().negate());
|
|
|
+ inboundItemResponse.setIntoAmt(inboundItemResponse.getIntoAmt().negate());
|
|
|
+ //endregion
|
|
|
+
|
|
|
+ //赋值
|
|
|
+ InboundItem inboundItem = new InboundItem();
|
|
|
+ inboundItem.setItemId(inboundItemResponse.getItemId());
|
|
|
+ inboundItem.setFlgValid(false);
|
|
|
+ //修改
|
|
|
+ inboundItemMapper.update(inboundItem,
|
|
|
+ new UpdateWrapper<InboundItem>().lambda()
|
|
|
+ .eq(InboundItem::getItemId, UUID.fromString(inboundItem.getItemId()))
|
|
|
+ );
|
|
|
+ }
|
|
|
+ //endregion
|
|
|
+
|
|
|
+ //region 修改入库总单
|
|
|
+ Inbound inbound = new Inbound();
|
|
|
+ inbound.setIntoId(inboundResponse.getIntoId());
|
|
|
+ inbound.setFlgValid(false);
|
|
|
+ //修改
|
|
|
+ inboundMapper.update(inbound,
|
|
|
+ new UpdateWrapper<Inbound>().lambda().eq(Inbound::getIntoId, UUID.fromString(inbound.getIntoId()))
|
|
|
+ );
|
|
|
+ //endregion
|
|
|
+
|
|
|
+ //region
|
|
|
+ Map<String, Object> map = new HashMap<>();
|
|
|
+ map.put("intoDetail", inboundItemResponseList);
|
|
|
+ inventoryService.updateInventoryInformation(map);
|
|
|
+ //endregion
|
|
|
+ }
|
|
|
+ //endregion
|
|
|
+
|
|
|
+ //region 自动办理参数false 入库中编辑
|
|
|
+ //自动办理标识为false 并且 自动办理参数为false 入库中
|
|
|
+ if (!inboundResponse.getFlgAutoHandle() && Constant.FlgHandleSetting.FALSE.getValue().equals(inboundResponse.getFlgHandleSetting())) {
|
|
|
+ //region 修改明细
|
|
|
+ for (InboundItemResponse inboundItemResponse : inboundItemResponseList) {
|
|
|
+ //赋值
|
|
|
+ InboundItem inboundItem = new InboundItem();
|
|
|
+ inboundItem.setItemId(inboundItemResponse.getItemId());
|
|
|
+ inboundItem.setIntoingQty(BigDecimal.ZERO);
|
|
|
+ inboundItem.setIntoingAmt(BigDecimal.ZERO);
|
|
|
+ //修改
|
|
|
+ inboundItemMapper.update(inboundItem,
|
|
|
+ new UpdateWrapper<InboundItem>().lambda()
|
|
|
+ .eq(InboundItem::getItemId, UUID.fromString(inboundItem.getItemId()))
|
|
|
+ );
|
|
|
+ }
|
|
|
+ //endregion
|
|
|
+
|
|
|
+ //region 修改入库总单
|
|
|
+ Inbound inbound = new Inbound();
|
|
|
+ inbound.setIntoId(inboundResponse.getIntoId());
|
|
|
+ inbound.setIntoingQty(BigDecimal.ZERO);
|
|
|
+ inbound.setIntoAmt(BigDecimal.ZERO);
|
|
|
+ //修改
|
|
|
+ inboundMapper.update(inbound,
|
|
|
+ new UpdateWrapper<Inbound>().lambda().eq(Inbound::getIntoId, UUID.fromString(inbound.getIntoId()))
|
|
|
+ );
|
|
|
+ //endregion
|
|
|
+ }
|
|
|
+ //endregion
|
|
|
+
|
|
|
+ return ResponseResultUtil.success();
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @desc : 其他入库办理
|
|
|
+ * @date : 2024/3/7 15:47
|
|
|
+ * @author : 寇珊珊
|
|
|
+ */
|
|
|
+ @Transactional(rollbackFor = {Exception.class})
|
|
|
+ public ResponseResultVO<?> otherHandleInbound(InboundVO inboundVO) {
|
|
|
+ //region 编辑明细
|
|
|
+ //校验明细
|
|
|
+ if (inboundVO.getItemList().size() == 0) {
|
|
|
+ throw new BaseBusinessException(ErrorCodeEnum.INBOUND_ITEM_NOT_EXIST.getCode(),
|
|
|
+ ErrorCodeEnum.INBOUND_ITEM_NOT_EXIST.getMessage());
|
|
|
+ }
|
|
|
+ for (InboundItemVO inboundItemVO : inboundVO.getItemList()) {
|
|
|
+ //region 将库存需要的参数赋值
|
|
|
+ inboundItemVO.setInventoryType(Constant.InventoryType.INBOUND.getName());
|
|
|
+ inboundItemVO.setInventoryDocCode(Constant.InventoryDocCode.OTHER_INBOUND.getValue());
|
|
|
+ //endregion
|
|
|
+ //region 修改明细
|
|
|
+ if (inboundItemVO.getIntoId() != null) {
|
|
|
+ InboundItemResponse inboundItemResponse = inboundItemMapper.selectById(inboundItemVO.getItemId());
|
|
|
+ //region 校验数量是否超出
|
|
|
+ if (inboundItemVO.getIntoingQty().compareTo(inboundItemResponse.getIntoingQty()) > 0) {
|
|
|
+ throw new BaseBusinessException(ErrorCodeEnum.CANNOT_EXCEED_THE_QUANTITY_IN_THE_OUTBOUND_SHIPMENT.getCode(),
|
|
|
+ ErrorCodeEnum.CANNOT_EXCEED_THE_QUANTITY_IN_THE_OUTBOUND_SHIPMENT.getMessage());
|
|
|
+ }
|
|
|
+ //endregion
|
|
|
+
|
|
|
+ //region 编辑明细
|
|
|
+ inboundItemVO
|
|
|
+ .setIntoQty(inboundItemResponse.getIntoQty().add(inboundItemVO.getIntoingQty()))
|
|
|
+ .setIntoAmt(inboundItemResponse.getIntoAmt().add(inboundItemVO.getIntoingAmt()))
|
|
|
+ .setIntoingQty(BigDecimal.ZERO)
|
|
|
+ .setIntoingAmt(BigDecimal.ZERO)
|
|
|
+ .setCostPrice(inboundItemVO.getPriceInto())
|
|
|
+ .setCostPrice(inboundItemVO.getIntoQty().subtract(inboundItemVO.getCostPrice()).setScale(2, BigDecimal.ROUND_HALF_UP))
|
|
|
+ ;
|
|
|
+ //入库状态
|
|
|
+ String intoStatus = this.setIntoStatus(inboundItemVO.getIntoingQty(), inboundItemVO.getIntoQty());
|
|
|
+ inboundItemVO.setIntoStatus(intoStatus);
|
|
|
+ //实体转换
|
|
|
+ InboundItem inboundItem = inboundItemConvert.convertToPo(inboundItemVO);
|
|
|
+ //修改
|
|
|
+ inboundItemMapper.update(inboundItem,
|
|
|
+ new UpdateWrapper<InboundItem>().lambda()
|
|
|
+ .eq(InboundItem::getItemId, UUID.fromString(inboundItem.getItemId()))
|
|
|
+ );
|
|
|
+ //endregion
|
|
|
+ }
|
|
|
+ //endregion
|
|
|
+
|
|
|
+ //region 新建明细
|
|
|
+ else {
|
|
|
+ inboundItemVO
|
|
|
+ .setIntoQty(inboundItemVO.getIntoingQty())
|
|
|
+ .setIntoAmt(inboundItemVO.getIntoingAmt())
|
|
|
+ .setIntoId(inboundVO.getIntoId())
|
|
|
+ .setCostPrice(inboundItemVO.getPriceInto())
|
|
|
+ .setCostAmt(inboundItemVO.getIntoQty().multiply(inboundItemVO.getPriceInto()).setScale(2, BigDecimal.ROUND_HALF_UP))
|
|
|
+ .setIntoType(Constant.IntoType.OTHER.getName())
|
|
|
+ .setIntoingQty(BigDecimal.ZERO)
|
|
|
+ .setIntoingAmt(BigDecimal.ZERO)
|
|
|
+ ;
|
|
|
+ //入库状态
|
|
|
+ String intoStatus = this.setIntoStatus(inboundItemVO.getIntoingQty(), inboundItemVO.getIntoQty());
|
|
|
+ inboundItemVO.setIntoStatus(intoStatus);
|
|
|
+ //实体转换
|
|
|
+ InboundItem inboundItem = inboundItemConvert.convertToPo(inboundItemVO);
|
|
|
+ //新建
|
|
|
+ inboundItemMapper.insert(inboundItem);
|
|
|
+ }
|
|
|
+ //endregion
|
|
|
+ }
|
|
|
+ //endregion
|
|
|
+
|
|
|
+ //region 删除明细
|
|
|
+ if (inboundVO.getDeleteItemList() != null) {
|
|
|
+ for (InboundItemVO inboundItemVO : inboundVO.getDeleteItemList()) {
|
|
|
+ if (inboundItemVO.getItemId() != null) {
|
|
|
+ InboundItem inboundItem = inboundItemConvert.convertToPo(inboundItemVO);
|
|
|
+ inboundItem.setFlgValid(false);
|
|
|
+ //修改
|
|
|
+ inboundItemMapper.update(inboundItem,
|
|
|
+ new UpdateWrapper<InboundItem>().lambda()
|
|
|
+ .eq(InboundItem::getItemId, UUID.fromString(inboundItem.getItemId()))
|
|
|
+ );
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //endregion
|
|
|
+
|
|
|
+ //region 编辑总单
|
|
|
+ BigDecimal sumIntoQty = inboundVO.getItemList().stream().map(InboundItemVO::getIntoQty).reduce(BigDecimal.ZERO, BigDecimal::add).setScale(6, BigDecimal.ROUND_HALF_UP);
|
|
|
+ BigDecimal sumIntoAmt = inboundVO.getItemList().stream().map(InboundItemVO::getIntoAmt).reduce(BigDecimal.ZERO, BigDecimal::add).setScale(2, BigDecimal.ROUND_HALF_UP);
|
|
|
+ inboundVO.setIntoQty(sumIntoQty);
|
|
|
+ inboundVO.setIntoAmt(sumIntoAmt);
|
|
|
+ inboundVO.setIntoingQty(BigDecimal.ZERO);
|
|
|
+ inboundVO.setIntoingAmt(BigDecimal.ZERO);
|
|
|
+ //入库状态
|
|
|
+ String intoStatus = this.setIntoStatus(inboundVO.getIntoingQty(), inboundVO.getIntoQty());
|
|
|
+ inboundVO.setIntoStatus(intoStatus);
|
|
|
+ //实体转换
|
|
|
+ Inbound inbound = inboundConvert.convertToPo(inboundVO);
|
|
|
+ //修改
|
|
|
+ inboundMapper.update(inbound,
|
|
|
+ new UpdateWrapper<Inbound>().lambda()
|
|
|
+ .eq(Inbound::getIntoId, UUID.fromString(inbound.getIntoId()))
|
|
|
+ );
|
|
|
+ //endregion
|
|
|
+
|
|
|
+ //region 修改库存
|
|
|
+ Map<String, Object> map = new HashMap<>();
|
|
|
+ map.put("intoDetail", inboundVO.getItemList());
|
|
|
+ inventoryService.updateInventoryInformation(map);
|
|
|
+ //endregion
|
|
|
+ return ResponseResultUtil.success(inboundVO);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @desc : 其它入库撤销
|
|
|
+ * @date : 2024/3/7 17:06
|
|
|
+ * @author : 寇珊珊
|
|
|
+ */
|
|
|
+ @Transactional(rollbackFor = {Exception.class})
|
|
|
+ public ResponseResultVO<?> otherInboundCancel(InboundVO inboundVO) {
|
|
|
+ //region 总单数据信息
|
|
|
+ InboundResponse inboundResponse = inboundMapper.selectById(inboundVO.getIntoId());
|
|
|
+ Inbound inbound = new Inbound();
|
|
|
+ inbound.setIntoId(inboundResponse.getIntoId())
|
|
|
+ .setIntoDate(null)
|
|
|
+ .setIntoStatus(Constant.IntoStatus.RUKUZHONG.getName())
|
|
|
+ .setIntoingQty(inboundResponse.getIntoQty())
|
|
|
+ .setIntoingAmt(inboundResponse.getIntoAmt())
|
|
|
+ .setIntoQty(BigDecimal.ZERO)
|
|
|
+ .setIntoAmt(BigDecimal.ZERO);
|
|
|
+ //修改
|
|
|
+ inboundMapper.update(inbound,
|
|
|
+ new UpdateWrapper<Inbound>().lambda()
|
|
|
+ .eq(Inbound::getIntoId, UUID.fromString(inbound.getIntoId()))
|
|
|
+ );
|
|
|
+ //endregion
|
|
|
+
|
|
|
+ //region 明细数据
|
|
|
+ InboundItemQuery inboundItemQuery = new InboundItemQuery().setIntoId(inbound.getIntoId());
|
|
|
+ //根据总单查明细
|
|
|
+ List<InboundItemResponse> inboundItemResponseList = inboundItemMapper.selectByCond(inboundItemQuery);
|
|
|
+ for (InboundItemResponse inboundItemResponse : inboundItemResponseList) {
|
|
|
+ //region 将库存需要的参数赋值
|
|
|
+ inboundItemResponse.setInventoryType(Constant.InventoryType.INBOUND.getName());
|
|
|
+ inboundItemResponse.setInventoryDocCode(Constant.InventoryDocCode.OTHER_INBOUND.getValue());
|
|
|
+ //region
|
|
|
+ InboundItem inboundItem = new InboundItem();
|
|
|
+ inboundItem
|
|
|
+ .setIntoId(inbound.getIntoId())
|
|
|
+ .setIntoStatus(Constant.IntoStatus.RUKUZHONG.getName())
|
|
|
+ .setIntoingQty(inboundItemResponse.getInvQty())
|
|
|
+ .setIntoingAmt(inboundItemResponse.getIntoAmt())
|
|
|
+ .setIntoQty(BigDecimal.ZERO)
|
|
|
+ .setIntoAmt(BigDecimal.ZERO)
|
|
|
+ .setCostPrice(BigDecimal.ZERO)
|
|
|
+ .setCostAmt(BigDecimal.ZERO)
|
|
|
+ .setItemId(inboundItemResponse.getItemId());
|
|
|
+ //修改
|
|
|
+ inboundItemMapper.update(inboundItem,
|
|
|
+ new UpdateWrapper<InboundItem>().lambda()
|
|
|
+ .eq(InboundItem::getItemId, UUID.fromString(inboundItem.getItemId()))
|
|
|
+ );
|
|
|
+ //数量金额取反 用于给库存使用
|
|
|
+ inboundItemResponse.setIntoQty(inboundItemResponse.getIntoQty().negate());
|
|
|
+ inboundItemResponse.setIntoAmt(inboundItemResponse.getIntoAmt().negate());
|
|
|
+ }
|
|
|
+ //endregion
|
|
|
+
|
|
|
+ //region 修改库存
|
|
|
+ Map<String, Object> map = new HashMap<>();
|
|
|
+ map.put("intoDetail", inboundItemResponseList);
|
|
|
+ inventoryService.updateInventoryInformation(map);
|
|
|
+ //endregion
|
|
|
+
|
|
|
+ return ResponseResultUtil.success();
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @desc : 入库状态通用(目前本页面)
|
|
|
+ * @date : 2024/3/9 8:59
|
|
|
+ * @author : 寇珊珊
|
|
|
+ */
|
|
|
+ public String setIntoStatus(BigDecimal intoingQty, BigDecimal intoQty) {
|
|
|
+ //入库状态
|
|
|
+ String intoStatus = null;
|
|
|
+ //已入库数量>=0 入库中数量>0
|
|
|
+ if (intoQty.compareTo(BigDecimal.ZERO) >= 0 && intoingQty.compareTo(BigDecimal.ZERO) > 0) {
|
|
|
+ //入库中
|
|
|
+ intoStatus = Constant.IntoStatus.RUKUZHONG.getName();
|
|
|
+ }
|
|
|
+ //已入库数量=0 入库中数量=0
|
|
|
+ else if (intoQty.compareTo(BigDecimal.ZERO) == 0 && intoingQty.compareTo(BigDecimal.ZERO) == 0) {
|
|
|
+ //待入库
|
|
|
+ intoStatus = Constant.IntoStatus.DAIRUKU.getName();
|
|
|
+ }
|
|
|
+ //已入库数量>0 入库中数量=0
|
|
|
+ else if (intoQty.compareTo(BigDecimal.ZERO) > 0 && intoingQty.compareTo(BigDecimal.ZERO) == 0) {
|
|
|
+ //已入库
|
|
|
+ intoStatus = Constant.IntoStatus.YIRUKU.getName();
|
|
|
+ }
|
|
|
+ return intoStatus;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @desc : 条件查询 --- web端入库办理用
|
|
|
+ * @date : 2024/3/23 9:24
|
|
|
+ * @author : 寇珊珊
|
|
|
+ */
|
|
|
+ @Pagination
|
|
|
+ public ResponseResultVO<PageList<InboundResponse>> selectInbound(InboundQuery inboundQuery) {
|
|
|
+ return super.mergeListWithCount(inboundQuery, inboundMapper.selectInbound(inboundQuery),
|
|
|
+ inboundMapper.selectInboundCond(inboundQuery));
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @desc : 查询明细查询 --- web端入库办理用
|
|
|
+ * @date : 2024/3/9 15:43
|
|
|
+ * @author : 寇珊珊
|
|
|
+ */
|
|
|
+ public ResponseResultVO<Map<String, Object>> selectInboundItem(String id) {
|
|
|
+ Map<String, Object> result = new HashMap<>();
|
|
|
+ // 商品明细
|
|
|
+ List<InboundItemResponse> inboundItemResponses = inboundItemMapper.selectInboundItem(new InboundItemQuery().setIntoId(id));
|
|
|
+ result.put("itemList", inboundItemResponses);
|
|
|
+ // 收款
|
|
|
+
|
|
|
+ // 附件
|
|
|
+ return ResponseResultUtil.success(result);
|
|
|
+ }
|
|
|
|
|
|
|
|
|
}
|