|
|
|
@ -14,6 +14,7 @@ import com.glxp.api.admin.entity.business.StockOrderDetailEntity;
|
|
|
|
|
import com.glxp.api.admin.entity.business.StockOrderEntity;
|
|
|
|
|
import com.glxp.api.admin.entity.info.SystemParamConfigEntity;
|
|
|
|
|
import com.glxp.api.admin.entity.inout.WarehouseEntity;
|
|
|
|
|
import com.glxp.api.admin.entity.inventory.InvProductEntity;
|
|
|
|
|
import com.glxp.api.admin.exception.JsonException;
|
|
|
|
|
import com.glxp.api.admin.req.basic.CompanyProductRelevanceRequest;
|
|
|
|
|
import com.glxp.api.admin.req.basic.FilterUdiInfoRequest;
|
|
|
|
@ -38,6 +39,7 @@ import com.glxp.api.admin.service.business.StockOrderService;
|
|
|
|
|
import com.glxp.api.admin.service.info.CompanyProductRelevanceService;
|
|
|
|
|
import com.glxp.api.admin.service.info.SystemParamConfigService;
|
|
|
|
|
import com.glxp.api.admin.service.inout.CodesService;
|
|
|
|
|
import com.glxp.api.admin.service.inventory.InvProductService;
|
|
|
|
|
import com.glxp.api.admin.service.purchase.SupProductService;
|
|
|
|
|
import com.glxp.api.admin.util.FilterUdiUtils;
|
|
|
|
|
import com.glxp.api.common.enums.ResultEnum;
|
|
|
|
@ -84,6 +86,8 @@ public class StockOrderDetailController {
|
|
|
|
|
CodesService codesService;
|
|
|
|
|
@Resource
|
|
|
|
|
SupProductService supProductService;
|
|
|
|
|
@Resource
|
|
|
|
|
InvProductService invProductService;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@AuthRuleAnnotation("")
|
|
|
|
@ -589,6 +593,29 @@ public class StockOrderDetailController {
|
|
|
|
|
if (bindingResult.hasErrors()) {
|
|
|
|
|
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
|
|
|
|
|
}
|
|
|
|
|
//判断
|
|
|
|
|
InvProductEntity invProductEntity=invProductService.selectExit(stockOrderDetailFilterRequest.getProductId());
|
|
|
|
|
if(invProductEntity!=null){
|
|
|
|
|
UdiInfoEntity udiInfoEntity= udiInfoService.findByNameCode(invProductEntity.getNameCode());
|
|
|
|
|
if(udiInfoEntity!=null){
|
|
|
|
|
if(udiInfoEntity.getScbssfbhph().equals("是")){
|
|
|
|
|
if(stockOrderDetailFilterRequest.getBatchNo()==null){
|
|
|
|
|
return ResultVOUtils.error(999,"批次号不能为空!");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if(udiInfoEntity.getScbssfbhscrq().equals("是")){
|
|
|
|
|
if(stockOrderDetailFilterRequest.getProductDate()==null){
|
|
|
|
|
return ResultVOUtils.error(999,"生产日期不能为空!");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if(udiInfoEntity.getScbssfbhsxrq().equals("是")){
|
|
|
|
|
if(stockOrderDetailFilterRequest.getExpireDate()==null){
|
|
|
|
|
return ResultVOUtils.error(999,"失效日期不能为空!");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (StringUtils.isNotBlank(stockOrderDetailFilterRequest.getId())) {
|
|
|
|
|
if (StringUtils.isBlank(stockOrderDetailFilterRequest.getCount()) ||
|
|
|
|
|
StringUtils.isBlank(stockOrderDetailFilterRequest.getReCount())) {
|
|
|
|
|