|
|
|
@ -130,6 +130,8 @@ public class IoOrderDetailBizController extends BaseController {
|
|
|
|
|
if (addBizProductReqeust.getOrderEntity() == null)
|
|
|
|
|
return ResultVOUtils.error(500, "未指定订单");
|
|
|
|
|
IoOrderEntity orderEntity = addBizProductReqeust.getOrderEntity();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
IoOrderEntity isExit = orderService.findByBillNo(orderEntity.getBillNo());
|
|
|
|
|
if (StrUtil.isEmpty(orderEntity.getBillNo()) || isExit == null) {
|
|
|
|
|
BasicBussinessTypeEntity bussinessTypeEntity = basicBussinessTypeService.findByAction(orderEntity.getAction());
|
|
|
|
@ -166,6 +168,41 @@ public class IoOrderDetailBizController extends BaseController {
|
|
|
|
|
for (AddBizProductReqeust item : datas) {
|
|
|
|
|
UdiRelevanceResponse udiRelevanceResponse = udiRelevanceService.selectSupGroupById(item.getRelId(), addBizProductReqeust.getSupId());
|
|
|
|
|
BasicBussinessTypeEntity bussinessTypeEntity = basicBussinessTypeService.findByAction(orderEntity.getAction());
|
|
|
|
|
|
|
|
|
|
//是否校验产品采购类型 :1:校验;2.无需校验
|
|
|
|
|
if(IntUtil.value(bussinessTypeEntity.getVailProductAttributes()) == 1){
|
|
|
|
|
Integer purType = IntUtil.value(udiRelevanceResponse.getPurType()); //1:普通入账产品;2.预验收产品。3:寄售产品
|
|
|
|
|
int actionType = IntUtil.value(bussinessTypeEntity.getActionType()); //1:带票(正常);2.预验收。3:寄售
|
|
|
|
|
if (purType != actionType){
|
|
|
|
|
//包装友好提示
|
|
|
|
|
String msg = "";
|
|
|
|
|
switch (actionType) {
|
|
|
|
|
case 1:
|
|
|
|
|
msg = "普通入账产品";
|
|
|
|
|
break;
|
|
|
|
|
case 2:
|
|
|
|
|
msg = "预验收产品";
|
|
|
|
|
break;
|
|
|
|
|
case 3:
|
|
|
|
|
msg = "寄售产品";
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
String msg2 = "";
|
|
|
|
|
switch (purType) {
|
|
|
|
|
case 1:
|
|
|
|
|
msg2 = "普通入账产品";
|
|
|
|
|
break;
|
|
|
|
|
case 2:
|
|
|
|
|
msg2 = "预验收产品";
|
|
|
|
|
break;
|
|
|
|
|
case 3:
|
|
|
|
|
msg2 = "寄售产品";
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
return ResultVOUtils.error(500, "单据只允许录入" + msg +",当前录入产品为"+msg2+",请检查后重试!");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (IntUtil.value(bussinessTypeEntity.getCheckCertExpire()) == 2 && udiRelevanceResponse.isNeedCert()) {
|
|
|
|
|
SupProductEntity supProductEntity = supProductService.findExitByManufactury(udiRelevanceResponse.getCpmctymc(), udiRelevanceResponse.getManufactory(), authAdmin.getCustomerId());
|
|
|
|
|
if (supProductEntity != null && (supProductEntity.getAuditStatus() == ConstantStatus.AUDIT_PASS || supProductEntity.getAuditStatus() == ConstantStatus.AUDIT_CHANGE_PASS)) {
|
|
|
|
|