From 677f3686355dc6141a247c0bd15900c67ecce193 Mon Sep 17 00:00:00 2001 From: anthonywj Date: Fri, 24 Nov 2023 09:18:30 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=80=E8=B4=A7=E8=A1=A5=E5=8D=95=EF=BC=8C?= =?UTF-8?q?=E5=A4=9A=E7=BA=A7=E4=BB=93=E5=BA=93=E8=A1=A5=E5=8D=95=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=EF=BC=8C=E6=96=B0=E5=A2=9E=E7=81=AD=E8=8F=8C=E6=89=B9?= =?UTF-8?q?=E5=8F=B7=EF=BC=8C=E7=81=AD=E8=8F=8C=E6=97=A5=E6=9C=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../inout/IoOrderDetailResultController.java | 4 ++-- .../api/entity/inout/IoOrderDetailBizEntity.java | 13 +++++++++++++ .../api/entity/inout/IoOrderDetailCodeEntity.java | 12 ++++++++++++ .../api/entity/inout/IoOrderDetailResultEntity.java | 12 ++++++++++++ .../api/res/inout/IoOrderDetailBizResponse.java | 13 ++++++++++--- .../api/res/inout/IoOrderDetailCodeResponse.java | 11 +++++++++++ .../api/res/inout/IoOrderDetailResultResponse.java | 12 ++++++++++++ .../api/service/inout/IoChangeInoutService.java | 12 +++++++++--- .../api/service/inout/impl/IoOrderServiceImpl.java | 1 - src/main/resources/schemas/schema_v2.4.sql | 10 ++++++++++ 10 files changed, 91 insertions(+), 9 deletions(-) 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 99f7973a..43d371ef 100644 --- a/src/main/java/com/glxp/api/controller/inout/IoOrderDetailResultController.java +++ b/src/main/java/com/glxp/api/controller/inout/IoOrderDetailResultController.java @@ -151,7 +151,7 @@ public class IoOrderDetailResultController extends BaseController { response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode("出入库明细" + DateUtil.format(new Date(), "yyyy-MM-dd") + ".xlsx", StandardCharsets.UTF_8.name())); - EasyExcel.write(response.getOutputStream(), IoOrderDetailResultResponse.class).sheet().doWrite(orderDetailVos); + EasyExcel.write(response.getOutputStream(), IoOrderDetailVo.class).sheet().doWrite(orderDetailVos); } @@ -165,7 +165,7 @@ public class IoOrderDetailResultController extends BaseController { response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode("出入库明细" + DateUtil.format(new Date(), "yyyy-MM-dd") + ".xlsx", StandardCharsets.UTF_8.name())); - EasyExcel.write(response.getOutputStream(), IoOrderDetailResultResponse.class).sheet().doWrite(orderDetailVos); + EasyExcel.write(response.getOutputStream(), IoOrderDetailVo.class).sheet().doWrite(orderDetailVos); } diff --git a/src/main/java/com/glxp/api/entity/inout/IoOrderDetailBizEntity.java b/src/main/java/com/glxp/api/entity/inout/IoOrderDetailBizEntity.java index ae21a804..3563f376 100644 --- a/src/main/java/com/glxp/api/entity/inout/IoOrderDetailBizEntity.java +++ b/src/main/java/com/glxp/api/entity/inout/IoOrderDetailBizEntity.java @@ -196,6 +196,19 @@ public class IoOrderDetailBizEntity { private String checkColdFileName; + /** + * 灭菌批号 + */ + @TableField(value = "sterBatchNo") + private String sterBatchNo; + + /** + * 灭菌日期 + */ + @TableField(value = "sterDate") + private String sterDate; + + @TableField(exist = false) private boolean checkSuccess; diff --git a/src/main/java/com/glxp/api/entity/inout/IoOrderDetailCodeEntity.java b/src/main/java/com/glxp/api/entity/inout/IoOrderDetailCodeEntity.java index d3f4275d..82c9a258 100644 --- a/src/main/java/com/glxp/api/entity/inout/IoOrderDetailCodeEntity.java +++ b/src/main/java/com/glxp/api/entity/inout/IoOrderDetailCodeEntity.java @@ -189,6 +189,18 @@ public class IoOrderDetailCodeEntity { @TableField(value = "remark5") private String remark5; + /** + * 灭菌批号 + */ + @TableField(value = "sterBatchNo") + private String sterBatchNo; + + /** + * 灭菌日期 + */ + @TableField(value = "sterDate") + private String sterDate; + @TableField(exist = false) private boolean checkSuccess; diff --git a/src/main/java/com/glxp/api/entity/inout/IoOrderDetailResultEntity.java b/src/main/java/com/glxp/api/entity/inout/IoOrderDetailResultEntity.java index 0f58f170..d2ec9d40 100644 --- a/src/main/java/com/glxp/api/entity/inout/IoOrderDetailResultEntity.java +++ b/src/main/java/com/glxp/api/entity/inout/IoOrderDetailResultEntity.java @@ -190,6 +190,18 @@ public class IoOrderDetailResultEntity { @TableField(value = "inoutPrintStatus") private Integer inoutPrintStatus; + /** + * 灭菌批号 + */ + @TableField(value = "sterBatchNo") + private String sterBatchNo; + + /** + * 灭菌日期 + */ + @TableField(value = "sterDate") + private String sterDate; + @TableField(exist = false) private String deptCode; @TableField(exist = false) diff --git a/src/main/java/com/glxp/api/res/inout/IoOrderDetailBizResponse.java b/src/main/java/com/glxp/api/res/inout/IoOrderDetailBizResponse.java index ce6e4d1a..a261c9f8 100644 --- a/src/main/java/com/glxp/api/res/inout/IoOrderDetailBizResponse.java +++ b/src/main/java/com/glxp/api/res/inout/IoOrderDetailBizResponse.java @@ -1,5 +1,6 @@ package com.glxp.api.res.inout; +import com.baomidou.mybatisplus.annotation.TableField; import lombok.Data; import java.math.BigDecimal; @@ -151,6 +152,15 @@ public class IoOrderDetailBizResponse { * 扩展字段5 */ private String remark5; + /** + * 灭菌批号 + */ + private String sterBatchNo; + + /** + * 灭菌日期 + */ + private String sterDate; //扫码数量 private int scanCount; @@ -174,7 +184,4 @@ public class IoOrderDetailBizResponse { private String zczbhhzbapzbh; - - - } diff --git a/src/main/java/com/glxp/api/res/inout/IoOrderDetailCodeResponse.java b/src/main/java/com/glxp/api/res/inout/IoOrderDetailCodeResponse.java index cebe12d4..0faafcfa 100644 --- a/src/main/java/com/glxp/api/res/inout/IoOrderDetailCodeResponse.java +++ b/src/main/java/com/glxp/api/res/inout/IoOrderDetailCodeResponse.java @@ -1,5 +1,6 @@ package com.glxp.api.res.inout; +import com.baomidou.mybatisplus.annotation.TableField; import lombok.Data; import java.math.BigDecimal; @@ -159,6 +160,16 @@ public class IoOrderDetailCodeResponse { */ private String supName; + /** + * 灭菌批号 + */ + private String sterBatchNo; + + /** + * 灭菌日期 + */ + private String sterDate; + private int orderCount; private String invoiceCodes; diff --git a/src/main/java/com/glxp/api/res/inout/IoOrderDetailResultResponse.java b/src/main/java/com/glxp/api/res/inout/IoOrderDetailResultResponse.java index ece704fa..0ba0803d 100644 --- a/src/main/java/com/glxp/api/res/inout/IoOrderDetailResultResponse.java +++ b/src/main/java/com/glxp/api/res/inout/IoOrderDetailResultResponse.java @@ -170,6 +170,18 @@ public class IoOrderDetailResultResponse { * 扩展字段5 */ private String remark5; + + + /** + * 灭菌批号 + */ + private String sterBatchNo; + + /** + * 灭菌日期 + */ + private String sterDate; + private int acceptCount; private String fromCorpName; @ExcelProperty(value = "单据类型", index = 9) diff --git a/src/main/java/com/glxp/api/service/inout/IoChangeInoutService.java b/src/main/java/com/glxp/api/service/inout/IoChangeInoutService.java index bde626af..0698fc8a 100644 --- a/src/main/java/com/glxp/api/service/inout/IoChangeInoutService.java +++ b/src/main/java/com/glxp/api/service/inout/IoChangeInoutService.java @@ -240,7 +240,8 @@ public class IoChangeInoutService { } if (StrUtil.isNotEmpty(bussinessChangeTypeEntity.getDefaultInvCode())) { outOrder.setFromInvCode(bussinessChangeTypeEntity.getDefaultInvCode()); - outOrder.setFromDeptCode(bussinessChangeTypeEntity.getDefaultDeptCode()); + InvWarehouseEntity fromInv = invWarehouseService.findByInvSubByCode(bussinessChangeTypeEntity.getDefaultInvCode()); + outOrder.setFromDeptCode(fromInv.getParentId()); } //原先流程---使用流转单据默认仓库 // outOrder.setFromInvCode(bussinessChangeTypeEntity.getDefaultInvCode()); @@ -305,8 +306,13 @@ public class IoChangeInoutService { //根据单据设置状态 1:草稿 if (bussinessChangeTypeEntity.getAuditStatus() == 1) { - orderEntity.setStatus(ConstantStatus.ORDER_STATUS_TEMP_SAVE); - orderService.update(orderEntity); + outOrder.setStatus(ConstantStatus.ORDER_STATUS_TEMP_SAVE); + orderService.update(outOrder); + + for (IoCodeTempEntity codeTempEntity : codeTempEntities) { + addInoutService.genOrderDetailCode(orderEntity, codeTempEntity); + } + } else if (bussinessChangeTypeEntity.getAuditStatus() == 2 || bussinessChangeTypeEntity.getAuditStatus() == 3) { addInoutService.dealProcess(outOrder); if (!ioCheckInoutService.checkManual(outOrder.getBillNo())) { diff --git a/src/main/java/com/glxp/api/service/inout/impl/IoOrderServiceImpl.java b/src/main/java/com/glxp/api/service/inout/impl/IoOrderServiceImpl.java index c838c2d4..bff7cf7e 100644 --- a/src/main/java/com/glxp/api/service/inout/impl/IoOrderServiceImpl.java +++ b/src/main/java/com/glxp/api/service/inout/impl/IoOrderServiceImpl.java @@ -66,7 +66,6 @@ import java.util.stream.Collectors; @Slf4j @Service -@Transactional(rollbackFor = Exception.class) public class IoOrderServiceImpl implements IoOrderService { @Resource diff --git a/src/main/resources/schemas/schema_v2.4.sql b/src/main/resources/schemas/schema_v2.4.sql index 468ea9e7..6ec1f263 100644 --- a/src/main/resources/schemas/schema_v2.4.sql +++ b/src/main/resources/schemas/schema_v2.4.sql @@ -89,3 +89,13 @@ INSERT ignore INTO sys_param_config(`id`, `parentId`, `paramName`, `paramKey`, ` `paramType`, `paramExplain`, `updateTime`) VALUES (20088, 0, '单据详情展示方式', 'order_detail_visible', '1', 0, 0, '1:按DI统一排序2:按扫码或录入时间排序', NULL); +CALL Pro_Temp_ColumnWork('io_order_detail_biz', 'sterBatchNo', 'varchar(255)', 1); +CALL Pro_Temp_ColumnWork('io_order_detail_biz', 'sterDate', 'varchar(255)', 1); + +CALL Pro_Temp_ColumnWork('io_order_detail_code', 'sterBatchNo', 'varchar(255)', 1); +CALL Pro_Temp_ColumnWork('io_order_detail_code', 'sterDate', 'varchar(255)', 1); + +CALL Pro_Temp_ColumnWork('io_order_detail_result', 'sterBatchNo', 'varchar(255)', 1); +CALL Pro_Temp_ColumnWork('io_order_detail_result', 'sterDate', 'varchar(255)', 1); + +