diff --git a/pom.xml b/pom.xml index 5c4e47b..b3b3431 100644 --- a/pom.xml +++ b/pom.xml @@ -378,7 +378,7 @@ - UDI_WMS_MC + UDI_CPT_SERVER org.springframework.boot diff --git a/src/main/java/com/glxp/api/controller/trace/UdiTraceController.java b/src/main/java/com/glxp/api/controller/trace/UdiTraceController.java index 78ed9b1..799a74e 100644 --- a/src/main/java/com/glxp/api/controller/trace/UdiTraceController.java +++ b/src/main/java/com/glxp/api/controller/trace/UdiTraceController.java @@ -151,7 +151,6 @@ public class UdiTraceController extends BaseController { } - return ResultVOUtils.success(traceRecordLogEntity); } diff --git a/src/main/java/com/glxp/api/dao/basic/BasicUdiRelMapper.java b/src/main/java/com/glxp/api/dao/basic/BasicUdiRelMapper.java index b8da261..af294da 100644 --- a/src/main/java/com/glxp/api/dao/basic/BasicUdiRelMapper.java +++ b/src/main/java/com/glxp/api/dao/basic/BasicUdiRelMapper.java @@ -23,4 +23,7 @@ public interface BasicUdiRelMapper extends BaseMapper { List findDiList(@Param("uuid") String uuid); + + List findDiListByProduct(FilterUdiRelRequest filterUdiRelRequest); } + diff --git a/src/main/java/com/glxp/api/entity/trace/TraceOrderEntity.java b/src/main/java/com/glxp/api/entity/trace/TraceOrderEntity.java index b15d4a3..927ce3a 100644 --- a/src/main/java/com/glxp/api/entity/trace/TraceOrderEntity.java +++ b/src/main/java/com/glxp/api/entity/trace/TraceOrderEntity.java @@ -16,6 +16,7 @@ import lombok.Data; @Data @TableName(value = "trace_order") public class TraceOrderEntity implements Serializable { + @TableId(value = "id", type = IdType.INPUT) private Long id; @@ -67,6 +68,13 @@ public class TraceOrderEntity implements Serializable { @TableField(value = "toCorpCreditNum") private String toCorpCreditNum; + + /** + * 使用者信息 (医疗机构实际使用者信息) + */ + @TableField(value = "toUserInfo") + private String toUserInfo; + /** * 单据创建者 */ @@ -79,6 +87,13 @@ public class TraceOrderEntity implements Serializable { @TableField(value = "companyIdFk") private Long companyIdFk; + + /** + * 当前企业统一社会信用号 + */ + @TableField(value = "companyCertNum") + private String companyCertNum; + /** * 客户端类型 */ @@ -144,6 +159,11 @@ public class TraceOrderEntity implements Serializable { @TableField(value = "traceProductIdFk") private Long traceProductIdFk; + /** + * 单据源头类型:1:起始位置(例如:生产企业) 2: 中间位置:(流通企业)3:结束位置:(例如:医疗机构使用,或一些销毁等) + */ + @TableField(value = "sourceType") + private Long sourceType; private static final long serialVersionUID = 1L; } diff --git a/src/main/java/com/glxp/api/entity/trace/TraceTaskNoticeEntity.java b/src/main/java/com/glxp/api/entity/trace/TraceTaskNoticeEntity.java index 81f8b6f..d81117e 100644 --- a/src/main/java/com/glxp/api/entity/trace/TraceTaskNoticeEntity.java +++ b/src/main/java/com/glxp/api/entity/trace/TraceTaskNoticeEntity.java @@ -27,7 +27,7 @@ public class TraceTaskNoticeEntity implements Serializable { private Long produdctRecordIdFk; /** - * 任务类型 1:关联关系;2:出入库 + * 任务类型 1:关联关系;2:出入库单据 */ @TableField(value = "taskType") private Integer taskType; diff --git a/src/main/java/com/glxp/api/res/trace/TraceOrderResponse.java b/src/main/java/com/glxp/api/res/trace/TraceOrderResponse.java index 409af38..7d48963 100644 --- a/src/main/java/com/glxp/api/res/trace/TraceOrderResponse.java +++ b/src/main/java/com/glxp/api/res/trace/TraceOrderResponse.java @@ -21,7 +21,7 @@ public class TraceOrderResponse { /** * 1:入库;2:出库 */ - private Byte inOutType; + private Integer inOutType; /** * 单据类型 @@ -48,21 +48,28 @@ public class TraceOrderResponse { */ private String toCorpCreditNum; + private String toUserInfo; + /** * 单据创建者 */ private Long createUser; /** - * 企业信息ID外键 + * 当前企业信息ID外键 */ private Long companyIdFk; /** - * 企业名称 + * 当前企业名称 */ private String companyName; + /** + * 当前企业统一社会信用号 + */ + private String companyCertNum; + /** * 客户端类型 */ diff --git a/src/main/java/com/glxp/api/service/basic/BasicUdiRelService.java b/src/main/java/com/glxp/api/service/basic/BasicUdiRelService.java index 4cf5cf9..555defa 100644 --- a/src/main/java/com/glxp/api/service/basic/BasicUdiRelService.java +++ b/src/main/java/com/glxp/api/service/basic/BasicUdiRelService.java @@ -60,4 +60,14 @@ public class BasicUdiRelService extends ServiceImpl findDiListByProduct(FilterUdiRelRequest filterUdiRelRequest) { + if (StrUtil.isNotEmpty(filterUdiRelRequest.getNameCode())) { + BasicUdiRelResponse basicUdiRelResponse = findByProductNameCode(filterUdiRelRequest.getNameCode()); + return basicUdiRelMapper.findDiList(basicUdiRelResponse.getUuid()); + } else { + return basicUdiRelMapper.findDiListByProduct(filterUdiRelRequest); + } + } + } diff --git a/src/main/java/com/glxp/api/service/trace/UdiTraceService.java b/src/main/java/com/glxp/api/service/trace/UdiTraceService.java index b9abebd..33404f0 100644 --- a/src/main/java/com/glxp/api/service/trace/UdiTraceService.java +++ b/src/main/java/com/glxp/api/service/trace/UdiTraceService.java @@ -6,6 +6,7 @@ import com.glxp.api.entity.trace.MqTraceMessage; import com.glxp.api.entity.trace.TraceProductDetailEntity; import com.glxp.api.entity.trace.TraceRecordLogEntity; import com.glxp.api.entity.trace.TraceTaskNoticeEntity; +import com.glxp.api.req.basic.FilterUdiRelRequest; import com.glxp.api.req.trace.TraceRecordRequest; import com.glxp.api.res.basic.BasicUdiRelResponse; import com.glxp.api.service.basic.BasicUdiProductService; @@ -109,21 +110,28 @@ public class UdiTraceService { //1.查询生产订单信息是否已上传 - if (traceProductDetailEntity.getManuStatus() != 3) { - //生产订单关联关系 - if (traceProductDetailEntity.getManuStatus() == 2) { - TraceTaskNoticeEntity taskNoticeEntity = traceTaskNoticeService.findTask(1, traceProductDetailEntity.getId()); - if (taskNoticeEntity == null) { - createTraceNotice(1, traceProductDetailEntity, companyId); - pushMq(traceProductDetailEntity, companyId); - } else if (taskNoticeEntity.getStatus() == 4) { - //任务超时未处理,重新推送消息 - pushMq(traceProductDetailEntity, companyId); - } + //生产订单关联关系 + if (traceProductDetailEntity.getManuStatus() == 1) { //生产订单未处理 + createTraceNotice(1, traceProductDetailEntity, companyId); + pushMq(traceProductDetailEntity, companyId); + } else if (traceProductDetailEntity.getManuStatus() == 2) { //生产订单处理未完成 + TraceTaskNoticeEntity taskNoticeEntity = traceTaskNoticeService.findTask(1, traceProductDetailEntity.getId()); + if (taskNoticeEntity == null) { + createTraceNotice(1, traceProductDetailEntity, companyId); + pushMq(traceProductDetailEntity, companyId); + } else if (taskNoticeEntity.getStatus() == 4) { + //任务超时未处理,重新推送消息 + pushMq(traceProductDetailEntity, companyId); } } //2.查询出入库单消息是否已经上传 + if (traceProductDetailEntity.getStatus() == 1) { //出入库订单未处理 + createTraceNotice(2, traceProductDetailEntity, companyId); + pushMq(traceProductDetailEntity, companyId); + } else if (traceProductDetailEntity.getStatus() == 2) { //出入库订单未处理完成 + + } } @@ -146,8 +154,9 @@ public class UdiTraceService { traceTaskNoticeEntity.setExpireDate(traceProductDetailEntity.getExpireDate()); traceTaskNoticeEntity.setSerialNo(traceProductDetailEntity.getSerialNo()); traceTaskNoticeEntity.setCreateTime(new Date()); -// List diList = basicUdiRelService.getBaseMapper().findDiList(basicUdiRelResponse.getUuid()); -// traceTaskNoticeEntity.setDiList(diList); + FilterUdiRelRequest filterUdiRelRequest = new FilterUdiRelRequest(); + List diList = basicUdiRelService.findDiListByProduct(filterUdiRelRequest); + traceTaskNoticeEntity.setDiList(diList); traceTaskNoticeService.save(traceTaskNoticeEntity); return traceTaskNoticeEntity; } diff --git a/src/main/resources/application-pro.yml b/src/main/resources/application-pro.yml index d18589d..acf74d0 100644 --- a/src/main/resources/application-pro.yml +++ b/src/main/resources/application-pro.yml @@ -3,7 +3,7 @@ server: spring: datasource: driver-class-name: com.mysql.cj.jdbc.Driver - jdbc-url: jdbc:mysql://127.0.0.1:3306/udi_cpt?allowMultiQueries=true&serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true + jdbc-url: jdbc:mysql://192.168.0.66:3364/udi_cpt?allowMultiQueries=true&serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true username: root password: Glxp@6066 hikari: @@ -18,7 +18,7 @@ spring: timeout: 300 jedis: pool: - max-active: 8 + max-active: 16 max-wait: -1 max-idle: 8 min-idle: 0 @@ -43,12 +43,12 @@ logging: level: com.glxp.api.dao: debug -file_path: D:/udi/udiwms/udiwmsfile/ +file_path: D:/udi/cpt/udiwmsfile/ UDI_KEY: 6b137c66-6286-46c6-8efa-c2f5dd9237df UDI_SERVER_URL: https://www.udims.com/UDI_DL_Server_test SPMS_KEY: lCOdWCBKS6Kw45wdnnqUTELXyuSKnXEs -back_file_path: D:/share/udisps/back/ +back_file_path: D:/share/cpt/back/ API_KEY: 1101 API_SECRET: zBITspLNvuoEd4FaamlSoqxRHmNsmQ9L diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 80e18f1..a97493f 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -1,6 +1,6 @@ spring: profiles: - active: dev + active: pro jmx: enabled: false servlet: diff --git a/src/main/resources/mybatis/mapper/basic/BasicUdiRelMapper.xml b/src/main/resources/mybatis/mapper/basic/BasicUdiRelMapper.xml index 2b429d7..2453946 100644 --- a/src/main/resources/mybatis/mapper/basic/BasicUdiRelMapper.xml +++ b/src/main/resources/mybatis/mapper/basic/BasicUdiRelMapper.xml @@ -124,4 +124,14 @@ from basic_udi_product where uuid = #{uuid} + + +