|
|
|
@ -166,60 +166,60 @@ public class IoCheckInoutService {
|
|
|
|
|
|
|
|
|
|
BasicBussinessTypeEntity bussinessTypeEntity = basicBussinessTypeService.findByAction(orderEntity.getAction());
|
|
|
|
|
if (!bussinessTypeEntity.isCheckEnable()) {
|
|
|
|
|
unCheckFirstFinish(orderEntity,codeTempEntities);
|
|
|
|
|
unCheckFirstFinish(orderEntity, codeTempEntities);
|
|
|
|
|
} else {
|
|
|
|
|
if (orderEntity.getFromType().intValue() == ConstantStatus.FROM_UDIMS) {
|
|
|
|
|
if (bussinessTypeEntity.getCheckUdims() == 0) {
|
|
|
|
|
unCheckFirstFinish(orderEntity,codeTempEntities);
|
|
|
|
|
unCheckFirstFinish(orderEntity, codeTempEntities);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
} else if (orderEntity.getFromType().intValue() == ConstantStatus.FROM_WEBNEW) {
|
|
|
|
|
if (bussinessTypeEntity.getCheckWebNew() == 0 || bussinessTypeEntity.getCheckWebNew() == 4) {
|
|
|
|
|
unCheckFirstFinish(orderEntity,codeTempEntities);
|
|
|
|
|
unCheckFirstFinish(orderEntity, codeTempEntities);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
} else if (orderEntity.getFromType().intValue() == ConstantStatus.FROM_PDAED) {
|
|
|
|
|
if (bussinessTypeEntity.getCheckPdaEd() == 0) {
|
|
|
|
|
unCheckFirstFinish(orderEntity,codeTempEntities);
|
|
|
|
|
unCheckFirstFinish(orderEntity, codeTempEntities);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
} else if (orderEntity.getFromType().intValue() == ConstantStatus.FROM_PDAUN) {
|
|
|
|
|
if (bussinessTypeEntity.getCheckPdaUn() == 0) {
|
|
|
|
|
unCheckFirstFinish(orderEntity,codeTempEntities);
|
|
|
|
|
unCheckFirstFinish(orderEntity, codeTempEntities);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
} else if (orderEntity.getFromType().intValue() == ConstantStatus.FROM_PC) {
|
|
|
|
|
if (bussinessTypeEntity.getCheckPc() == 0) {
|
|
|
|
|
unCheckFirstFinish(orderEntity,codeTempEntities);
|
|
|
|
|
unCheckFirstFinish(orderEntity, codeTempEntities);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
} else if (orderEntity.getFromType().intValue() == ConstantStatus.FROM_CHANGE) {
|
|
|
|
|
if (bussinessTypeEntity.getCheckChange() == 0) {
|
|
|
|
|
unCheckFirstFinish(orderEntity,codeTempEntities);
|
|
|
|
|
unCheckFirstFinish(orderEntity, codeTempEntities);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
} else if (orderEntity.getFromType().intValue() == ConstantStatus.FROM_PEACE_CHANGE) {
|
|
|
|
|
if (bussinessTypeEntity.getCheckBalance() == 0) {
|
|
|
|
|
unCheckFirstFinish(orderEntity,codeTempEntities);
|
|
|
|
|
unCheckFirstFinish(orderEntity, codeTempEntities);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
} else if (orderEntity.getFromType().intValue() == ConstantStatus.FROM_UDISP) {
|
|
|
|
|
if (bussinessTypeEntity.getCheckSp() == 0) {
|
|
|
|
|
unCheckFirstFinish(orderEntity,codeTempEntities);
|
|
|
|
|
unCheckFirstFinish(orderEntity, codeTempEntities);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
} else if (orderEntity.getFromType().intValue() == ConstantStatus.FROM_COPY) {
|
|
|
|
|
if (bussinessTypeEntity.getCheckCopy() == 0) {
|
|
|
|
|
unCheckFirstFinish(orderEntity,codeTempEntities);
|
|
|
|
|
unCheckFirstFinish(orderEntity, codeTempEntities);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
} else if (orderEntity.getFromType().intValue() == ConstantStatus.FROM_REVIEW) {
|
|
|
|
|
if (bussinessTypeEntity.getCheckReview() == 0) {
|
|
|
|
|
unCheckFirstFinish(orderEntity,codeTempEntities);
|
|
|
|
|
unCheckFirstFinish(orderEntity, codeTempEntities);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
checkFirstFinish(orderEntity,codeTempEntities);
|
|
|
|
|
checkFirstFinish(orderEntity, codeTempEntities);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -229,27 +229,27 @@ public class IoCheckInoutService {
|
|
|
|
|
* 2、在正式code表里 对code分组sum库存 前提是 在待校验code集合中 校验出库存大于0抛出异常
|
|
|
|
|
*/
|
|
|
|
|
private void serialNoUniquenessVerification(List<IoCodeTempEntity> codeTempEntities) {
|
|
|
|
|
if (CollUtil.isNotEmpty(codeTempEntities)){
|
|
|
|
|
if (CollUtil.isNotEmpty(codeTempEntities)) {
|
|
|
|
|
List<String> codes = new ArrayList<>(codeTempEntities.size());
|
|
|
|
|
codeTempEntities.stream().forEach( x -> {
|
|
|
|
|
if (StrUtil.isNotBlank(x.getSerialNo())){
|
|
|
|
|
codeTempEntities.stream().forEach(x -> {
|
|
|
|
|
if (StrUtil.isNotBlank(x.getSerialNo())) {
|
|
|
|
|
codes.add(x.getCode());
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
if (CollUtil.isNotEmpty(codes)){
|
|
|
|
|
if (CollUtil.isNotEmpty(codes)) {
|
|
|
|
|
//正式code表里 对code分组sum实际库存数量
|
|
|
|
|
List<IoCodeResponse> codeSumReCountList = codeService.findByCodeSumReCount(codes);
|
|
|
|
|
if (codeSumReCountList.size() > 0 ){
|
|
|
|
|
if (codeSumReCountList.size() > 0) {
|
|
|
|
|
StringBuilder msg = new StringBuilder();
|
|
|
|
|
codeSumReCountList.forEach( x -> {
|
|
|
|
|
if (x.getReCount() > 0){
|
|
|
|
|
msg.append(x.getCode()+",");
|
|
|
|
|
codeSumReCountList.forEach(x -> {
|
|
|
|
|
if (x.getReCount() > 0) {
|
|
|
|
|
msg.append(x.getCode() + ",");
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
if (StrUtil.isNotEmpty(msg)){
|
|
|
|
|
msg.deleteCharAt(msg.length()-1);
|
|
|
|
|
throw new JsonException(500,"产品UDI码:" + msg + "存库唯一性校验不通过!");
|
|
|
|
|
if (StrUtil.isNotEmpty(msg)) {
|
|
|
|
|
msg.deleteCharAt(msg.length() - 1);
|
|
|
|
|
throw new JsonException(500, "产品UDI码:" + msg + "存库唯一性校验不通过!");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -376,7 +376,7 @@ public class IoCheckInoutService {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//一次校验(无需校验)完成
|
|
|
|
|
public void unCheckFirstFinish(IoOrderEntity orderEntity,List<IoCodeTempEntity> codeTempEntities) {
|
|
|
|
|
public void unCheckFirstFinish(IoOrderEntity orderEntity, List<IoCodeTempEntity> codeTempEntities) {
|
|
|
|
|
|
|
|
|
|
List<IoOrderDetailCodeEntity> orderDetailCodeEntities = orderDetailCodeService.findByOrderId(orderEntity.getBillNo());
|
|
|
|
|
|
|
|
|
@ -443,7 +443,7 @@ public class IoCheckInoutService {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//一次校验完成
|
|
|
|
|
public void checkFirstFinish(IoOrderEntity orderEntity,List<IoCodeTempEntity> codeTempEntities) {
|
|
|
|
|
public void checkFirstFinish(IoOrderEntity orderEntity, List<IoCodeTempEntity> codeTempEntities) {
|
|
|
|
|
List<IoOrderDetailCodeEntity> orderDetailCodeEntities = orderDetailCodeService.findByOrderId(orderEntity.getBillNo());
|
|
|
|
|
List<IoOrderDetailBizEntity> orderDetailBizEntities = orderDetailBizService.findByOrderId(orderEntity.getBillNo());
|
|
|
|
|
|
|
|
|
|