diff --git a/src/main/java/com/glxp/api/entity/inout/IoOrderEntity.java b/src/main/java/com/glxp/api/entity/inout/IoOrderEntity.java index f5c38ba8..7faf107f 100644 --- a/src/main/java/com/glxp/api/entity/inout/IoOrderEntity.java +++ b/src/main/java/com/glxp/api/entity/inout/IoOrderEntity.java @@ -264,4 +264,11 @@ public class IoOrderEntity { @TableField(value = "rmInvCode") private String rmInvCode; + /** + * 出库病人信息 + */ + @TableField(value = "outSickInfo") + private String outSickInfo; + + } diff --git a/src/main/java/com/glxp/api/req/inout/FilterOrderRequest.java b/src/main/java/com/glxp/api/req/inout/FilterOrderRequest.java index 4974cf72..e0be141e 100644 --- a/src/main/java/com/glxp/api/req/inout/FilterOrderRequest.java +++ b/src/main/java/com/glxp/api/req/inout/FilterOrderRequest.java @@ -136,7 +136,7 @@ public class FilterOrderRequest extends ListPageRequest { * 校验异常:checkedError * 已校验:checkSuccess * 已审核:audited - * * 预验收入库单 preInOrder + * * 预验收入库单 preInOrder */ private String statusType; @@ -192,4 +192,7 @@ public class FilterOrderRequest extends ListPageRequest { private String invoiceEncode; + //联合备注字段查询 + private String unionRemark; + } diff --git a/src/main/java/com/glxp/api/service/inout/IoGenInvService.java b/src/main/java/com/glxp/api/service/inout/IoGenInvService.java index 74dd5105..0403f229 100644 --- a/src/main/java/com/glxp/api/service/inout/IoGenInvService.java +++ b/src/main/java/com/glxp/api/service/inout/IoGenInvService.java @@ -52,7 +52,8 @@ public class IoGenInvService { IoCodeService codeService; @Resource IBasicBusTypePreService basicBusTypePreService; - + @Resource + IBasicBussinessTypeService basicBussinessTypeService; @Resource IoChangeInoutService ioChangeInoutService; @@ -64,6 +65,13 @@ public class IoGenInvService { List orderDetailResultEntities = orderDetailResultService.findByOrderId(orderId); List codeEnttities = codeService.findByOrderId(orderId); + //补齐单据信息 + BasicBussinessTypeEntity bussinessTypeEntity = basicBussinessTypeService.findByAction(orderEntity.getAction()); + if (bussinessTypeEntity.getCorpType() == ConstantStatus.CORP_TYPE_INPUT && bussinessTypeEntity.isGenUnit()) { + orderEntity.setOutSickInfo(orderEntity.getFromCorp()); + orderService.update(orderEntity); + } + //生成库存产品表 for (IoOrderDetailResultEntity orderDetailResultEntity : orderDetailResultEntities) { InvProductEntity invProductEntity = invProductService.selectByUnique(orderDetailResultEntity.getBindRlFk(), orderDetailResultEntity.getBatchNo(), orderDetailResultEntity.getSupId(), orderEntity.getDeptCode(), orderEntity.getInvCode()); diff --git a/src/main/resources/mybatis/mapper/inout/IoOrderDao.xml b/src/main/resources/mybatis/mapper/inout/IoOrderDao.xml index a1351221..4a922beb 100644 --- a/src/main/resources/mybatis/mapper/inout/IoOrderDao.xml +++ b/src/main/resources/mybatis/mapper/inout/IoOrderDao.xml @@ -53,6 +53,10 @@ AND relKey = #{relKey} + + AND (io.remark like concat('%', #{unionRemark}, '%') + or io.outSickInfo like concat('%', #{unionRemark}, '%')) + AND date_format(createTime, '%Y-%m-%d') between date_format(#{startTime}, '%Y-%m-%d') and date_format(#{endTime}, '%Y-%m-%d') @@ -205,6 +209,10 @@ AND relKey = #{relKey} + + AND (io.remark like concat('%', #{unionRemark}, '%') + or io.outSickInfo like concat('%', #{unionRemark}, '%')) + AND date_format(createTime, '%Y-%m-%d') between date_format(#{startTime}, '%Y-%m-%d') and date_format(#{endTime}, '%Y-%m-%d') @@ -313,6 +321,10 @@ AND fromCorp = #{fromCorp} + + AND (io.remark like concat('%', #{unionRemark}, '%') + or io.outSickInfo like concat('%', #{unionRemark}, '%')) + AND customerId = #{customerId} @@ -460,6 +472,10 @@ AND io.busType = #{busType} + + AND (io.remark like concat('%', #{unionRemark}, '%') + or io.outSickInfo like concat('%', #{unionRemark}, '%')) + AND io.inCodeStatus = #{inCodeStatus} @@ -556,6 +572,4 @@ - - diff --git a/src/main/resources/schemas/schema_v2.1.sql b/src/main/resources/schemas/schema_v2.1.sql index 537cfab9..5cdded82 100644 --- a/src/main/resources/schemas/schema_v2.1.sql +++ b/src/main/resources/schemas/schema_v2.1.sql @@ -436,3 +436,6 @@ VALUES (20059, 0, '是否允许编辑第三方产品信息', 'enable_edit_third' CALL Pro_Temp_ColumnWork('io_order', 'rmFromCorp', 'varchar(255)', 1); CALL Pro_Temp_ColumnWork('io_order', 'rmDeptCode', 'varchar(255)', 1); CALL Pro_Temp_ColumnWork('io_order', 'rmInvCode', 'varchar(255)', 1); + +CALL Pro_Temp_ColumnWork('io_order', 'outSickInfo', 'varchar(255)', 1); +