单据领用校验问题

purchase
anthonyywj2 2 years ago
parent 34f975c5a1
commit 29e93d9a6c

@ -285,6 +285,7 @@ public class OrderDetailController {
stockOrderDetailEntity.setCount(thrOrderDetailEntity.getCount());
stockOrderDetailEntity.setReCount(thrOrderDetailEntity.getReCount());
stockOrderDetailEntity.setOrderIdFk(stockOrderEntity.getId());
stockOrderDetailEntity.setRelId(udiRelevanceEntity.getId());
stockOrderDetailEntity.setSweepCount(0);
stockOrderDetailEntityList.add(stockOrderDetailEntity);
}
@ -346,7 +347,7 @@ public class OrderDetailController {
List<StockOrderDetailEntity> stockOrderDetailEntityList = new ArrayList<>();
for (ThrOrderDetailEntity thrOrderDetailEntity : thrOrderDetailEntities) {
StockOrderDetailEntity stockOrderDetailEntity = new StockOrderDetailEntity();
UdiRelevanceEntity udiRelevanceEntity = udiRelevanceService.selectByThirdId(thrOrderDetailEntity.getProductId(), thrOrderDetailEntity.getThirdSysFk());
UdiRelevanceEntity udiRelevanceEntity = udiRelevanceService.selectById(thrOrderDetailEntity.getProductId());
if (udiRelevanceEntity == null) {
return ResultVOUtils.error(500, "单据里含有未维护的产品信息,选入失败!");
@ -357,6 +358,7 @@ public class OrderDetailController {
stockOrderDetailEntity.setCount(thrOrderDetailEntity.getCount());
stockOrderDetailEntity.setReCount(thrOrderDetailEntity.getReCount());
stockOrderDetailEntity.setOrderIdFk(stockOrderEntity.getId());
stockOrderDetailEntity.setRelId(udiRelevanceEntity.getId());
stockOrderDetailEntity.setSweepCount(0);
stockOrderDetailEntityList.add(stockOrderDetailEntity);
}

@ -1,6 +1,7 @@
package com.glxp.api.admin.service.basic.impl;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.util.StrUtil;
import com.github.pagehelper.PageHelper;
import com.glxp.api.admin.constant.ConstantStatus;
import com.glxp.api.admin.dao.basic.UdiInfoDao;
@ -245,6 +246,11 @@ public class UdiRelevanceServiceImpl implements UdiRelevanceService {
@Override
public UdiRelevanceEntity selectByThirdId(String thirdId, String thirdSys) {
if (StrUtil.isEmpty(thirdId) || StrUtil.isEmpty(thirdSys)) {
return null;
}
FilterUdiInfoRequest filterUdiInfoRequest = new FilterUdiInfoRequest();
if ("thirdId".equals(thirdSys)) {
filterUdiInfoRequest.setThirdId(thirdId);

Loading…
Cancel
Save