diff --git a/src/main/java/com/glxp/mipsdl/client/ctqyy/CtqyyClient.java b/src/main/java/com/glxp/mipsdl/client/ctqyy/CtqyyClient.java index b0f75f0..e4209c5 100644 --- a/src/main/java/com/glxp/mipsdl/client/ctqyy/CtqyyClient.java +++ b/src/main/java/com/glxp/mipsdl/client/ctqyy/CtqyyClient.java @@ -55,7 +55,7 @@ import com.glxp.mipsdl.service.thrsys.ThrCorpService; import com.glxp.mipsdl.service.thrsys.ThrSystemDetailService; import com.glxp.mipsdl.thirddao.ctqyy.PhysicDictMapper; import com.glxp.mipsdl.thirddao.ctqyy.PlanInfoMapper; -import com.glxp.mipsdl.thirddao.ctqyy.PresInfoMapper; +import com.glxp.mipsdl.thirddao.ctqyy.VYpzsPresInfoMapper; import com.glxp.mipsdl.util.*; import lombok.extern.slf4j.Slf4j; import org.dom4j.Document; @@ -121,7 +121,7 @@ public class CtqyyClient extends CommonHttpClient { @Resource private PhysicDictMapper physicDictMapper; @Resource - private PresInfoMapper presInfoMapper; + VYpzsPresInfoMapper vYpzsPresInfoMapper; @Resource private PlanInfoMapper planInfoMapper; @@ -1361,52 +1361,54 @@ public class CtqyyClient extends CommonHttpClient { */ @Override public BaseResponse getPrescribes(UdiwmsBasicSkPrescribeRequest udiwmsBasicSkPrescribeRequest) { - LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); String code = udiwmsBasicSkPrescribeRequest.getCode(); if (StrUtil.isNotEmpty(code)) { wrapper.or( innerWrapper -> { - innerWrapper.eq(PresInfoEntity::getStooutNo, code); - innerWrapper.eq(PresInfoEntity::getPrescribeNumber, code); + innerWrapper.eq(VYpzsPresInfo::getSTOOUT_NO, code); + innerWrapper.eq(VYpzsPresInfo::getPRESCRIBE_NUMBER, code); } ); } //补充其他查询条件 - IPage page = presInfoMapper - .selectPage(new Page(udiwmsBasicSkPrescribeRequest.getPage(), udiwmsBasicSkPrescribeRequest.getLimit()), wrapper); - List presInfoEntities = page.getRecords(); + IPage page = vYpzsPresInfoMapper + .selectPage(new Page(udiwmsBasicSkPrescribeRequest.getPage(), udiwmsBasicSkPrescribeRequest.getLimit()), wrapper); + List presInfoEntities = page.getRecords(); if (CollUtil.isNotEmpty(presInfoEntities)) { //数据处理以basic_sk_prescribe,basic_sk_prescribe_item 主子返回 - Map> groupedByPrescribeNumber = presInfoEntities.stream() - .collect(Collectors.groupingBy(PresInfoEntity::getPrescribeNumber)); + Map> groupedByPrescribeNumber = presInfoEntities.stream() + .collect(Collectors.groupingBy(VYpzsPresInfo::getPRESCRIBE_NUMBER)); List basicSkPrescribeResponses = new ArrayList<>(); List finalBasicSkPrescribeResponses = basicSkPrescribeResponses; groupedByPrescribeNumber.forEach((key, value) -> { - PresInfoEntity presInfoEntity = value.get(0); + VYpzsPresInfo presInfoEntity = value.get(0); BasicSkPrescribeResponse basicSkPrescribeResponse = new BasicSkPrescribeResponse(); - basicSkPrescribeResponse.setSickCode(presInfoEntity.getSickId()); - basicSkPrescribeResponse.setCode(presInfoEntity.getPrescribeNumber()); - basicSkPrescribeResponse.setStooutNo(presInfoEntity.getStooutNo()); + basicSkPrescribeResponse.setSickCode(presInfoEntity.getSICK_ID()); + basicSkPrescribeResponse.setCode(presInfoEntity.getPRESCRIBE_NUMBER()); + basicSkPrescribeResponse.setStooutNo(presInfoEntity.getSTOOUT_NO()); basicSkPrescribeResponse.setAddr("YPCF002"); DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"); - LocalDateTime dateTime = LocalDateTime.parse(presInfoEntity.getLayPhysicTime(), formatter); + LocalDateTime dateTime = LocalDateTime.parse(presInfoEntity.getLAY_TIME(), formatter); basicSkPrescribeResponse.setPrescribeDate(dateTime); - finalBasicSkPrescribeResponses.add(basicSkPrescribeResponse); + List itemList = new ArrayList<>(); value.forEach(entity -> { BasicSkPrescribeItemEntity basicSkPrescribeItemEntity = new BasicSkPrescribeItemEntity(); - basicSkPrescribeItemEntity.setItemCode(entity.getPhysicCode()); - BasicUdirelEntity basicUdirelEntity = basicUdirelDao.selectOne(new LambdaQueryWrapper().eq(BasicUdirelEntity::getMainId, entity.getPhysicCode())); + basicSkPrescribeItemEntity.setItemCode(entity.getPHYSIC_CODE()); + BasicUdirelEntity basicUdirelEntity = basicUdirelDao.selectOne(new LambdaQueryWrapper().eq(BasicUdirelEntity::getMainId, entity.getPHYSIC_CODE())); if (basicUdirelEntity != null) { basicSkPrescribeItemEntity.setRelId(basicUdirelEntity.getId()); } - basicSkPrescribeItemEntity.setItemName(entity.getPhysicName()); - basicSkPrescribeItemEntity.setGgxh(entity.getPackSpec()); - basicSkPrescribeItemEntity.setMeasureCount(entity.getLayPhysicQuantity()); - basicSkPrescribeItemEntity.setMeasureUnit(entity.getPhysicUnit()); + basicSkPrescribeItemEntity.setItemName(entity.getPHYSIC_NAME()); + basicSkPrescribeItemEntity.setGgxh(entity.getPACK_SPEC()); + basicSkPrescribeItemEntity.setMeasureCount(entity.getLAY_PHYSIC_QUANTITY()); + basicSkPrescribeItemEntity.setMeasureUnit(entity.getPHYSIC_UNIT()); itemList.add(basicSkPrescribeItemEntity); }); + basicSkPrescribeResponse.setItemList(itemList); + finalBasicSkPrescribeResponses.add(basicSkPrescribeResponse); }); PageSimpleResponse pageSimpleResponse = new PageSimpleResponse<>(); pageSimpleResponse.setTotal(page.getTotal()); diff --git a/src/main/java/com/glxp/mipsdl/controller/UdiWmsController.java b/src/main/java/com/glxp/mipsdl/controller/UdiWmsController.java index 10522e4..297b9cd 100644 --- a/src/main/java/com/glxp/mipsdl/controller/UdiWmsController.java +++ b/src/main/java/com/glxp/mipsdl/controller/UdiWmsController.java @@ -313,6 +313,7 @@ public class UdiWmsController { /** * 处方入库 + * * @param udiwmsBasicSkPrescribeRequest * @return */ @@ -323,6 +324,7 @@ public class UdiWmsController { /** * 采购计划入库 + * * @param udiwmsThrOrderRequest * @return */ diff --git a/src/main/java/com/glxp/mipsdl/entity/ctqyy/PresInfoEntity.java b/src/main/java/com/glxp/mipsdl/entity/ctqyy/PresInfoEntity.java deleted file mode 100644 index 2f777e1..0000000 --- a/src/main/java/com/glxp/mipsdl/entity/ctqyy/PresInfoEntity.java +++ /dev/null @@ -1,46 +0,0 @@ -package com.glxp.mipsdl.entity.ctqyy; - - -import com.baomidou.mybatisplus.annotation.TableField; -import com.baomidou.mybatisplus.annotation.TableName; -import lombok.Data; - -@Data -@TableName(value = "V_YPZS_PRES_INFO") -public class PresInfoEntity { - - @TableField("TABLE_TYPE") - private String tableType; - @TableField("LAYPHYSIC_NO") - private String layphysicNo; - @TableField("PRESCRIBE_NUMBER") - private String prescribeNumber; - @TableField("PRESCRIBE_SUB_NUMBER") - private String prescribeSubNumber; - @TableField("LAY_PHYSIC_TIME") - private String layPhysicTime; - @TableField("STORAGE_CODE") - private String storageCode; - @TableField("STORAGE_NAME") - private String storageName; - @TableField("SICK_ID") - private String sickId; - @TableField("RESIDENCE_NO") - private String residenceNo; - @TableField("PHYSIC_CODE") - private String physicCode; - @TableField("PHYSIC_NAME") - private String physicName; - @TableField("LAY_PHYSIC_QUANTITY") - private String layPhysicQuantity; - @TableField("PHYSIC_UNIT") - private String physicUnit; - @TableField("COST") - private String cost; - @TableField("PACK_SPEC") - private String packSpec; - @TableField("STOOUT_NO") - private String stooutNo; - - -} diff --git a/src/main/java/com/glxp/mipsdl/entity/ctqyy/VYpzsPresInfo.java b/src/main/java/com/glxp/mipsdl/entity/ctqyy/VYpzsPresInfo.java new file mode 100644 index 0000000..4bdfa6b --- /dev/null +++ b/src/main/java/com/glxp/mipsdl/entity/ctqyy/VYpzsPresInfo.java @@ -0,0 +1,57 @@ +package com.glxp.mipsdl.entity.ctqyy; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; + +import lombok.Data; + +@Data +@TableName(value = "v_ypzs_pres_info") +public class VYpzsPresInfo implements Serializable { + @TableField(value = "LAY_TIME") + private String LAY_TIME; + + @TableField(value = "STOOUT_NO") + private String STOOUT_NO; + + @TableField(value = "PRESCRIBE_NUMBER") + private String PRESCRIBE_NUMBER; + + @TableField(value = "PHYSIC_CODE") + private String PHYSIC_CODE; + + @TableField(value = "PHYSIC_NAME") + private String PHYSIC_NAME; + + @TableField(value = "BATCH_NUMBER") + private String BATCH_NUMBER; + + @TableField(value = "PACK_SPEC") + private String PACK_SPEC; + + @TableField(value = "LAY_PHYSIC_QUANTITY") + private String LAY_PHYSIC_QUANTITY; + + @TableField(value = "PHYSIC_UNIT") + private String PHYSIC_UNIT; + + @TableField(value = "SICK_ID") + private String SICK_ID; + + @TableField(value = "RESIDENCE_NO") + private String RESIDENCE_NO; + + @TableField(value = "COUNTRY_CODE") + private String COUNTRY_CODE; + + @TableField(value = "CONFECT_MAN") + private String CONFECT_MAN; + + private static final long serialVersionUID = 1L; +} \ No newline at end of file diff --git a/src/main/java/com/glxp/mipsdl/service/ctqyy/VYpzsPresInfoService.java b/src/main/java/com/glxp/mipsdl/service/ctqyy/VYpzsPresInfoService.java new file mode 100644 index 0000000..6e62268 --- /dev/null +++ b/src/main/java/com/glxp/mipsdl/service/ctqyy/VYpzsPresInfoService.java @@ -0,0 +1,10 @@ +package com.glxp.mipsdl.service.ctqyy; + +import org.springframework.stereotype.Service; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.glxp.mipsdl.thirddao.ctqyy.VYpzsPresInfoMapper; +import com.glxp.mipsdl.entity.ctqyy.VYpzsPresInfo; +@Service +public class VYpzsPresInfoService extends ServiceImpl { + +} diff --git a/src/main/java/com/glxp/mipsdl/thirddao/ctqyy/PresInfoMapper.java b/src/main/java/com/glxp/mipsdl/thirddao/ctqyy/VYpzsPresInfoMapper.java similarity index 63% rename from src/main/java/com/glxp/mipsdl/thirddao/ctqyy/PresInfoMapper.java rename to src/main/java/com/glxp/mipsdl/thirddao/ctqyy/VYpzsPresInfoMapper.java index 1a7598e..8a34dfc 100644 --- a/src/main/java/com/glxp/mipsdl/thirddao/ctqyy/PresInfoMapper.java +++ b/src/main/java/com/glxp/mipsdl/thirddao/ctqyy/VYpzsPresInfoMapper.java @@ -2,12 +2,10 @@ package com.glxp.mipsdl.thirddao.ctqyy; import com.baomidou.dynamic.datasource.annotation.DS; import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.glxp.mipsdl.entity.ctqyy.PresInfoEntity; +import com.glxp.mipsdl.entity.ctqyy.VYpzsPresInfo; import org.apache.ibatis.annotations.Mapper; - -@Mapper @DS("ctqyySql") -public interface PresInfoMapper extends BaseMapper { - -} +@Mapper +public interface VYpzsPresInfoMapper extends BaseMapper { +} \ No newline at end of file diff --git a/src/main/resources/mybatis/mapper/other/ctqyy/VYpzsPresInfoMapper.xml b/src/main/resources/mybatis/mapper/other/ctqyy/VYpzsPresInfoMapper.xml new file mode 100644 index 0000000..fcbdc2a --- /dev/null +++ b/src/main/resources/mybatis/mapper/other/ctqyy/VYpzsPresInfoMapper.xml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + LAY_TIME, STOOUT_NO, PRESCRIBE_NUMBER, PHYSIC_CODE, PHYSIC_NAME, BATCH_NUMBER, PACK_SPEC, + LAY_PHYSIC_QUANTITY, PHYSIC_UNIT, SICK_ID, RESIDENCE_NO, COUNTRY_CODE, CONFECT_MAN + + \ No newline at end of file