diff --git a/src/main/java/com/glxp/api/controller/auth/LoginController.java b/src/main/java/com/glxp/api/controller/auth/LoginController.java index c7c68227..e10cf8c1 100644 --- a/src/main/java/com/glxp/api/controller/auth/LoginController.java +++ b/src/main/java/com/glxp/api/controller/auth/LoginController.java @@ -391,7 +391,6 @@ public class LoginController extends BaseController { @PostMapping("/spms/sub/inv/warehouse/addOrder") public BaseResponse addOrder(@RequestBody ioUploadOrderResponse ioUploadOrderRespons) { - ioOrderUtilsService.getIoder(ioUploadOrderRespons); return ResultVOUtils.success(); } diff --git a/src/main/java/com/glxp/api/controller/inout/IoOrderDetailResultController.java b/src/main/java/com/glxp/api/controller/inout/IoOrderDetailResultController.java index cfa87eb8..8d1b671c 100644 --- a/src/main/java/com/glxp/api/controller/inout/IoOrderDetailResultController.java +++ b/src/main/java/com/glxp/api/controller/inout/IoOrderDetailResultController.java @@ -273,31 +273,31 @@ public class IoOrderDetailResultController extends BaseController { List cptTraceResultResponses = new ArrayList<>(); if (CollUtil.isNotEmpty(cptTraceOrderResponses)) { for (CptTraceOrderResponse cptTraceOrderResponse : cptTraceOrderResponses) { + if (cptTraceOrderResponse.getCorpType() == 1 || cptTraceOrderResponse.getCorpType() == 2) { + CptTraceResultResponse cptTraceResultResponse = new CptTraceResultResponse(); + cptTraceResultResponse.setBillNo(cptTraceOrderResponse.getBillNo()); + cptTraceResultResponse.setBillDate(DateUtil.formatDate(cptTraceOrderResponse.getCreateTime())); + cptTraceResultResponse.setBillType(cptTraceOrderResponse.getBillType()); + if (cptTraceOrderResponse.getMainAction().equals(ConstantType.TYPE_OUT)) { + if (StrUtil.isNotEmpty(cptTraceOrderResponse.getFromInvCode())) + continue; + cptTraceResultResponse.setInOutType(2); + cptTraceResultResponse.setFromCorp(authCompany.getName()); + cptTraceResultResponse.setFromCorpCreditNum(authCompany.getCreditCode()); - CptTraceResultResponse cptTraceResultResponse = new CptTraceResultResponse(); - cptTraceResultResponse.setBillNo(cptTraceOrderResponse.getBillNo()); - cptTraceResultResponse.setBillDate(DateUtil.formatDate(cptTraceOrderResponse.getCreateTime())); - cptTraceResultResponse.setBillType(cptTraceOrderResponse.getBillType()); - - if (cptTraceOrderResponse.getMainAction().equals(ConstantType.TYPE_OUT)) { - if (StrUtil.isNotEmpty(cptTraceOrderResponse.getFromInvCode())) - continue; - cptTraceResultResponse.setInOutType(2); - cptTraceResultResponse.setFromCorp(authCompany.getName()); - cptTraceResultResponse.setFromCorpCreditNum(authCompany.getCreditCode()); - - } else { - cptTraceResultResponse.setInOutType(1); - cptTraceResultResponse.setFromCorp(cptTraceOrderResponse.getFromCorpName()); - cptTraceResultResponse.setFromCorpCreditNum(cptTraceOrderResponse.getCreditNo()); - cptTraceResultResponse.setToCorp(authCompany.getName()); - cptTraceResultResponse.setToCorpCreditNum(authCompany.getCreditCode()); - } - if (StrUtil.isEmpty(cptTraceOrderResponse.getFromCorpName()) && cptTraceOrderResponse.getMainAction().equals(ConstantType.TYPE_OUT)) { - cptTraceResultResponse.setBillType("使用出库"); - cptTraceResultResponse.setToUserInfo("患者使用出库"); + } else { + cptTraceResultResponse.setInOutType(1); + cptTraceResultResponse.setFromCorp(cptTraceOrderResponse.getFromCorpName()); + cptTraceResultResponse.setFromCorpCreditNum(cptTraceOrderResponse.getCreditNo()); + cptTraceResultResponse.setToCorp(authCompany.getName()); + cptTraceResultResponse.setToCorpCreditNum(authCompany.getCreditCode()); + } + if (StrUtil.isEmpty(cptTraceOrderResponse.getFromCorpName()) && cptTraceOrderResponse.getMainAction().equals(ConstantType.TYPE_OUT)) { + cptTraceResultResponse.setBillType("使用出库"); + cptTraceResultResponse.setToUserInfo("患者使用出库"); + } + cptTraceResultResponses.add(cptTraceResultResponse); } - cptTraceResultResponses.add(cptTraceResultResponse); } } diff --git a/src/main/java/com/glxp/api/res/inout/CptTraceOrderResponse.java b/src/main/java/com/glxp/api/res/inout/CptTraceOrderResponse.java index 216c71f4..5f447ad1 100644 --- a/src/main/java/com/glxp/api/res/inout/CptTraceOrderResponse.java +++ b/src/main/java/com/glxp/api/res/inout/CptTraceOrderResponse.java @@ -16,4 +16,5 @@ public class CptTraceOrderResponse { private String action; private String fromInvCode; private Integer count; + private int corpType; } diff --git a/src/main/resources/mybatis/mapper/inout/IoOrderDetailResultDao.xml b/src/main/resources/mybatis/mapper/inout/IoOrderDetailResultDao.xml index a833da3d..8920fc30 100644 --- a/src/main/resources/mybatis/mapper/inout/IoOrderDetailResultDao.xml +++ b/src/main/resources/mybatis/mapper/inout/IoOrderDetailResultDao.xml @@ -85,7 +85,8 @@ basic_corp.`name` fromCorpName, basic_corp.creditNo, io.action, - io.fromInvCode + io.fromInvCode, + bbt.corpType from io_order_detail_result iodr INNER JOIN io_order io on iodr.orderIdFk = io.billNo left join basic_corp on io.fromCorp = basic_corp.erpId