diff --git a/src/main/java/com/glxp/api/controller/purchase/SupManufacturerController.java b/src/main/java/com/glxp/api/controller/purchase/SupManufacturerController.java index ac030f53..7dd86796 100644 --- a/src/main/java/com/glxp/api/controller/purchase/SupManufacturerController.java +++ b/src/main/java/com/glxp/api/controller/purchase/SupManufacturerController.java @@ -25,6 +25,7 @@ import com.glxp.api.res.PageSimpleResponse; import com.glxp.api.service.auth.AuthAdminService; import com.glxp.api.service.purchase.*; import com.glxp.api.service.system.CompanyService; +import com.glxp.api.util.StringUtils; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; @@ -37,6 +38,7 @@ import javax.servlet.http.HttpServletRequest; import java.util.Date; import java.util.List; import java.util.ListIterator; +import java.util.Objects; @RestController public class SupManufacturerController { @@ -219,9 +221,11 @@ public class SupManufacturerController { if (supManufacturerEntity.getAuditStatus() == ConstantStatus.AUDIT_CHANGE || supManufacturerEntity.getAuditStatus() == ConstantStatus.AUDIT_UN) { //判断是否上级供应商是否审核通过 SupCompanyEntity supCompanyEntity = supCompanyService.findCompany(supManufacturerEntity.getCustomerId()); - if (supCompanyEntity.getAuditStatus() == ConstantStatus.AUDIT_UN || supCompanyEntity.getAuditStatus() == ConstantStatus.AUDIT_CHANGE_REJECT - || supCompanyEntity.getAuditStatus() == ConstantStatus.AUDIT_DRAFT || supCompanyEntity.getAuditStatus() == ConstantStatus.AUDIT_REJECT) { - return ResultVOUtils.error(500, "所属配送企业资质未通过审核,暂时无法提交!"); + if(!Objects.isNull(supCompanyEntity.getAuditStatus())){ + if ( supCompanyEntity.getAuditStatus() == ConstantStatus.AUDIT_UN || supCompanyEntity.getAuditStatus() == ConstantStatus.AUDIT_CHANGE_REJECT + || supCompanyEntity.getAuditStatus() == ConstantStatus.AUDIT_DRAFT || supCompanyEntity.getAuditStatus() == ConstantStatus.AUDIT_REJECT) { + return ResultVOUtils.error(500, "所属配送企业资质未通过审核,暂时无法提交!"); + } } //验证证书是否齐全 diff --git a/src/main/java/com/glxp/api/service/inout/IoCheckInoutService.java b/src/main/java/com/glxp/api/service/inout/IoCheckInoutService.java index f3af635d..c5573ae7 100644 --- a/src/main/java/com/glxp/api/service/inout/IoCheckInoutService.java +++ b/src/main/java/com/glxp/api/service/inout/IoCheckInoutService.java @@ -346,9 +346,13 @@ public class IoCheckInoutService { } else { curCount = codeEntity.getMyReCount(); } - if (curCount > bizEntity.getCount()) { - return "当前产品" + bizEntity.getCoName() + "数量超出!"; + // TODO 药品单据临时数量超出不做校验(为了湖里妇幼) + if(!codeEntity.getProductType().equals(2)){ + if (curCount > bizEntity.getCount()) { + return "当前产品" + bizEntity.getCoName() + "数量超出!"; + } } + if (bizEntity.getPrice() != null) codeEntity.setPrice(bizEntity.getPrice()); return null;