|
|
|
@ -186,10 +186,10 @@ public class IoOrderDetailBizController extends BaseController {
|
|
|
|
|
BasicBussinessTypeEntity bussinessTypeEntity = basicBussinessTypeService.findByAction(orderEntity.getAction());
|
|
|
|
|
|
|
|
|
|
//是否校验产品采购类型 :1:校验;2.无需校验
|
|
|
|
|
if(IntUtil.value(bussinessTypeEntity.getVailProductAttributes()) == 1){
|
|
|
|
|
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){
|
|
|
|
|
if (purType != actionType) {
|
|
|
|
|
//包装友好提示
|
|
|
|
|
String msg = "";
|
|
|
|
|
switch (actionType) {
|
|
|
|
@ -215,7 +215,7 @@ public class IoOrderDetailBizController extends BaseController {
|
|
|
|
|
msg2 = "寄售产品";
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
return ResultVOUtils.error(500, "单据只允许录入" + msg +",当前录入产品为"+msg2+",请检查后重试!");
|
|
|
|
|
return ResultVOUtils.error(500, "单据只允许录入" + msg + ",当前录入产品为" + msg2 + ",请检查后重试!");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -231,24 +231,24 @@ public class IoOrderDetailBizController extends BaseController {
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
if (bussinessTypeEntity != null && udiRelevanceResponse != null){
|
|
|
|
|
if (bussinessTypeEntity != null && udiRelevanceResponse != null) {
|
|
|
|
|
//是否校验耗材材质 1:高值耗材;2.普通耗材
|
|
|
|
|
if (IntUtil.value(bussinessTypeEntity.getVailHcType() == 1)) {
|
|
|
|
|
if (IntUtil.value(bussinessTypeEntity.getVailHcType()) == 1) {
|
|
|
|
|
if (IntUtil.value(udiRelevanceResponse.getHcType()) != 1) {
|
|
|
|
|
return ResultVOUtils.error(500, "单据只允许录入高值耗材" + ",请检查后重试!");
|
|
|
|
|
}
|
|
|
|
|
} else if (IntUtil.value(bussinessTypeEntity.getVailHcType() == 2)) {
|
|
|
|
|
} else if (IntUtil.value(bussinessTypeEntity.getVailHcType()) == 2) {
|
|
|
|
|
if (IntUtil.value(udiRelevanceResponse.getHcType()) != 2) {
|
|
|
|
|
return ResultVOUtils.error(500, "单据只允许录入普通耗材" + ",请检查后重试!");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//是否开启校验扫码 :0:不校验;1:只允许录入扫码产品;2:只允许录入不扫码产品
|
|
|
|
|
if (IntUtil.value(bussinessTypeEntity.getCodeCheck() == 1)){
|
|
|
|
|
if (IntUtil.value(bussinessTypeEntity.getCodeCheck()) == 1) {
|
|
|
|
|
if (IntUtil.value(udiRelevanceResponse.getRequireScanCode()) != 1) {
|
|
|
|
|
return ResultVOUtils.error(500, "单据只允许录入需要扫码产品" + ",请检查后重试!");
|
|
|
|
|
}
|
|
|
|
|
}else if (IntUtil.value(bussinessTypeEntity.getCodeCheck() == 2)) {
|
|
|
|
|
} else if (IntUtil.value(bussinessTypeEntity.getCodeCheck()) == 2) {
|
|
|
|
|
if (IntUtil.value(udiRelevanceResponse.getRequireScanCode()) != 0) {
|
|
|
|
|
return ResultVOUtils.error(500, "单据只允许录入不需要扫码产品" + ",请检查后重试!");
|
|
|
|
|
}
|
|
|
|
|