diff --git a/src/main/java/com/glxp/api/controller/basic/BasicDestinyRelController.java b/src/main/java/com/glxp/api/controller/basic/BasicDestinyRelController.java index ee5ca7b8..da2f7169 100644 --- a/src/main/java/com/glxp/api/controller/basic/BasicDestinyRelController.java +++ b/src/main/java/com/glxp/api/controller/basic/BasicDestinyRelController.java @@ -9,23 +9,18 @@ import com.glxp.api.common.enums.ResultEnum; import com.glxp.api.common.res.BaseResponse; import com.glxp.api.common.util.ResultVOUtils; import com.glxp.api.entity.auth.AuthAdmin; -import com.glxp.api.entity.basic.BasicCorpEntity; +import com.glxp.api.entity.basic.BasicSkProjectEntity; import com.glxp.api.entity.basic.UdiEntity; -import com.glxp.api.entity.purchase.PurApplyDetailEntity; -import com.glxp.api.entity.thrsys.ThrProductsEntity; import com.glxp.api.exception.JsonException; -import com.glxp.api.req.basic.BasicDestinyRelRequest; -import com.glxp.api.req.basic.BasicUnitMaintainFilterRequest; -import com.glxp.api.req.basic.CompanyProductRelevanceRequest; -import com.glxp.api.req.basic.FilterUdiRelRequest; -import com.glxp.api.req.thrsys.FilterThrProductsRequest; +import com.glxp.api.req.basic.*; import com.glxp.api.res.PageSimpleResponse; +import com.glxp.api.res.basic.BasicSkProjectResponse; import com.glxp.api.res.basic.UdiRelevanceResponse; import com.glxp.api.service.auth.AuthAdminService; import com.glxp.api.service.auth.CustomerService; -import com.glxp.api.service.basic.BasicDestinyRelService; +import com.glxp.api.service.basic.BasicSkProjectService; import com.glxp.api.service.basic.UdiRelevanceService; -import com.glxp.api.service.thrsys.ThrProductsService; +import com.glxp.api.service.basic.impl.BasicDestinyRelService; import com.glxp.api.util.BeanCopyUtils; import com.glxp.api.util.udi.FilterUdiUtils; import org.springframework.validation.BindingResult; @@ -39,16 +34,15 @@ import org.springframework.web.context.request.ServletRequestAttributes; import javax.annotation.Resource; import javax.servlet.http.HttpServletRequest; import java.util.ArrayList; -import java.util.Arrays; import java.util.Date; import java.util.List; -import java.util.stream.Collectors; @RestController public class BasicDestinyRelController { @Resource - private ThrProductsService thrProductsService; + BasicSkProjectService basicSkProjectService; + @Resource private CustomerService customerService; @Resource @@ -58,49 +52,48 @@ public class BasicDestinyRelController { @Resource private BasicDestinyRelService basicDestinyRelService; + @GetMapping("/udiwms/basic/destiny/model/filter") - public BaseResponse filterModeldestiny(FilterThrProductsRequest filterThrProductsRequest, BindingResult bindingResult) { + public BaseResponse filterModeldestiny(BasicSkProjectRequest basicSkProjectRequest, BindingResult bindingResult) { if (bindingResult.hasErrors()) { return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage()); } - List thrProductsEntities = thrProductsService.filterThrProducts(filterThrProductsRequest); - PageInfo pageInfo = new PageInfo<>(thrProductsEntities); - PageSimpleResponse pageSimpleResponse = new PageSimpleResponse<>(); + List basicSkProjectResponses = basicSkProjectService.filterThrProducts(basicSkProjectRequest); + PageInfo pageInfo = new PageInfo<>(basicSkProjectResponses); + PageSimpleResponse pageSimpleResponse = new PageSimpleResponse<>(); pageSimpleResponse.setTotal(pageInfo.getTotal()); - pageSimpleResponse.setList(thrProductsEntities); - + pageSimpleResponse.setList(basicSkProjectResponses); return ResultVOUtils.success(pageSimpleResponse); } @PostMapping("/udiwms/basic/destiny/model/addModeldestiny") - public BaseResponse addModeldestiny(@RequestBody ThrProductsEntity thrProductsEntity) { + public BaseResponse addModeldestiny(@RequestBody BasicSkProjectEntity basicSkProjectEntity) { //判断名字和编号不能重复 - QueryWrapper ew = new QueryWrapper<>(); - ew.eq("name", thrProductsEntity.getName()); - ew.eq("type", 2); - long count = thrProductsService.count(ew); + QueryWrapper ew = new QueryWrapper<>(); + ew.eq("name", basicSkProjectEntity.getName()); +// ew.eq("type", 2); + long count = basicSkProjectService.count(ew); if (count > 0) { return ResultVOUtils.error(999, "名称已存在!"); } ew.clear(); - ew.eq("code", thrProductsEntity.getCode()); - ew.eq("type", 2); - count = thrProductsService.count(ew); + ew.eq("code", basicSkProjectEntity.getCode()); +// ew.eq("type", 2); + count = basicSkProjectService.count(ew); if (count > 0) { return ResultVOUtils.error(999, "编号已存在!"); } AuthAdmin authAdmin = customerService.getUserBean(); - thrProductsEntity.setId(IdUtil.getSnowflakeNextId()); - thrProductsEntity.setType(2); - thrProductsEntity.setCreateTime(new Date()); - thrProductsEntity.setUpdateTime(new Date()); - thrProductsEntity.setCreateUser(authAdmin.getId() + ""); - thrProductsEntity.setUpdateUser(authAdmin.getId() + ""); - - Boolean falg = thrProductsService.insertThrProducts(thrProductsEntity); + basicSkProjectEntity.setId(IdUtil.getSnowflakeNextId()); + basicSkProjectEntity.setCreateTime(new Date()); + basicSkProjectEntity.setUpdateTime(new Date()); + basicSkProjectEntity.setCreateUser(authAdmin.getId() + ""); + basicSkProjectEntity.setUpdateUser(authAdmin.getId() + ""); + + Boolean falg = basicSkProjectService.save(basicSkProjectEntity); if (!falg) { return ResultVOUtils.error(999, "新增失败!"); } @@ -108,29 +101,29 @@ public class BasicDestinyRelController { } @PostMapping("/udiwms/basic/destiny/model/editModeldestiny") - public BaseResponse editModeldestiny(@RequestBody ThrProductsEntity thrProductsEntity) { + public BaseResponse editModeldestiny(@RequestBody BasicSkProjectEntity basicSkProjectEntity) { //判断名字和编号不能重复 - QueryWrapper ew = new QueryWrapper<>(); - ew.eq("name", thrProductsEntity.getName()); - ew.eq("type", 2); - ThrProductsEntity thrProductsEntity1 = thrProductsService.getOne(ew); - if (thrProductsEntity1 != null && !thrProductsEntity1.getId().equals(thrProductsEntity.getId())) { + QueryWrapper ew = new QueryWrapper<>(); + ew.eq("name", basicSkProjectEntity.getName()); +// ew.eq("type", 2); + BasicSkProjectEntity thrProductsEntity1 = basicSkProjectService.getOne(ew); + if (thrProductsEntity1 != null && !thrProductsEntity1.getId().equals(basicSkProjectEntity.getId())) { return ResultVOUtils.error(999, "名称已存在!"); } ew.clear(); - ew.eq("code", thrProductsEntity.getCode()); - ew.eq("type", 2); - thrProductsEntity1 = thrProductsService.getOne(ew); - if (thrProductsEntity1 != null && !thrProductsEntity1.getId().equals(thrProductsEntity.getId())) { + ew.eq("code", basicSkProjectEntity.getCode()); +// ew.eq("type", 2); + thrProductsEntity1 = basicSkProjectService.getOne(ew); + if (thrProductsEntity1 != null && !thrProductsEntity1.getId().equals(basicSkProjectEntity.getId())) { return ResultVOUtils.error(999, "编号已存在!"); } AuthAdmin authAdmin = customerService.getUserBean(); - thrProductsEntity.setUpdateTime(new Date()); - thrProductsEntity.setUpdateUser(authAdmin.getId() + ""); + basicSkProjectEntity.setUpdateTime(new Date()); + basicSkProjectEntity.setUpdateUser(authAdmin.getId() + ""); - Boolean falg = thrProductsService.updateById(thrProductsEntity); + Boolean falg = basicSkProjectService.updateById(basicSkProjectEntity); if (!falg) { return ResultVOUtils.error(999, "编辑失败!"); } @@ -138,9 +131,9 @@ public class BasicDestinyRelController { } @PostMapping("/udiwms/basic/destiny/model/delectModeldestiny") - public BaseResponse delectModeldestiny(@RequestBody ThrProductsEntity thrProductsEntity) { + public BaseResponse delectModeldestiny(@RequestBody BasicSkProjectEntity basicSkProjectEntity) { - Boolean falg = thrProductsService.deleteById(thrProductsEntity.getId() + ""); + Boolean falg = basicSkProjectService.removeById(basicSkProjectEntity.getId() + ""); if (!falg) { return ResultVOUtils.error(999, "删除失败!"); } @@ -234,11 +227,11 @@ public class BasicDestinyRelController { //查询详情id过滤 List idList = basicDestinyRelService.filterDestinyRelIds(Long.valueOf(filterUdiRelRequest.getId())); if (idList != null && idList.size() > 0) { - filterUdiRelRequest.setDestinyId(filterUdiRelRequest.getId()+""); + filterUdiRelRequest.setDestinyId(filterUdiRelRequest.getId() + ""); filterUdiRelRequest.setIds(idList); filterUdiRelRequest.setDiType(1); thrProductsEntities = basicDestinyRelService.filterDestinyProducts(filterUdiRelRequest); - int i=0; + int i = 0; for (UdiRelevanceResponse thrProductsEntity : thrProductsEntities) { thrProductsEntity.setIndex(i); i++; @@ -275,5 +268,4 @@ public class BasicDestinyRelController { } - } diff --git a/src/main/java/com/glxp/api/controller/basic/BasicOrderPrintController.java b/src/main/java/com/glxp/api/controller/basic/BasicOrderPrintController.java index 054c09a6..75ae9c7b 100644 --- a/src/main/java/com/glxp/api/controller/basic/BasicOrderPrintController.java +++ b/src/main/java/com/glxp/api/controller/basic/BasicOrderPrintController.java @@ -14,9 +14,11 @@ import com.glxp.api.entity.system.SysPdfTemplateRelevanceStatemenEntity; import com.glxp.api.entity.system.SystemPDFTemplateEntity; import com.glxp.api.req.basic.FilterOrderPrintRequest; import com.glxp.api.req.inout.FilterOrderRequest; +import com.glxp.api.res.basic.UdiRelevanceResponse; import com.glxp.api.res.inout.IoOrderResponse; import com.glxp.api.service.basic.IBasicBussinessTypeService; import com.glxp.api.service.basic.UdiProductService; +import com.glxp.api.service.basic.UdiRelevanceService; import com.glxp.api.service.inout.IoOrderDetailBizService; import com.glxp.api.service.inout.IoOrderService; import com.glxp.api.service.inout.impl.IoCodeService; @@ -60,7 +62,10 @@ public class BasicOrderPrintController { @Value("${file_path}") private String filePath; @Resource + UdiRelevanceService udiRelevanceService; + @Resource SystemPDFTemplateRelevanceCodeService systemPDFTemplateRelevanceCodeService; + //校验模板是否正确 @AuthRuleAnnotation("") @PostMapping("/udiwms/pdf/template/inspection/order/file") @@ -171,7 +176,7 @@ public class BasicOrderPrintController { } } //查询产品表 - UdiProductEntity udiProductEntity = udiProductService.findByUuid(ioOrderDetailBizEntity.getUuidFk()); + UdiRelevanceResponse udiProductEntity = udiRelevanceService.selectByRelId(ioOrderDetailBizEntity.getBindRlFk() + ""); // List ioOrderInvoiceResponses = ioOrderDetailBizService.selectByorderIdFk(ioOrderDetailBizEntity.getOrderIdFk()); //组装数据 Map bizData = new HashMap<>(); @@ -182,7 +187,10 @@ public class BasicOrderPrintController { bizData.put("billdate", formatter.format(ioOrderResponse.getCreateTime())); bizData.put("remark1", sysPdfTemplateRelevanceCodeEntity.getRemark1() == null ? ' ' : sysPdfTemplateRelevanceCodeEntity.getRemark1()); bizData.put("remark2", sysPdfTemplateRelevanceCodeEntity.getRemark2() == null ? ' ' : sysPdfTemplateRelevanceCodeEntity.getRemark2()); - bizData.put("productName", udiProductEntity.getCpms() == null ? ' ' : udiProductEntity.getCpms()); + if (udiProductEntity != null) { + bizData.put("productName", udiProductEntity.getCpms() == null ? ' ' : udiProductEntity.getCpms()); + bizData.put("ylqxzcrbarmc", udiProductEntity.getYlqxzcrbarmc() == null ? ' ' : udiProductEntity.getYlqxzcrbarmc()); + } bizData.put("spmc", ioOrderDetailBizEntity.getCoName() == null ? ' ' : ioOrderDetailBizEntity.getCoName()); bizData.put("spec", ioOrderDetailBizEntity.getSpec() == null ? ' ' : ioOrderDetailBizEntity.getSpec()); bizData.put("count", ioOrderDetailBizEntity.getCount()); @@ -194,7 +202,7 @@ public class BasicOrderPrintController { bizData.put("expireDate", ioOrderDetailBizEntity.getExpireDate()); bizData.put("manufactor", ioOrderDetailBizEntity.getManufacturer()); bizData.put("zczbhhzbapzbh", ioOrderDetailBizEntity.getCertCode() == null ? ' ' : ioOrderDetailBizEntity.getCertCode()); - bizData.put("ylqxzcrbarmc", udiProductEntity.getYlqxzcrbarmc() == null ? ' ' : udiProductEntity.getYlqxzcrbarmc()); + bizData.put("fromSpmsOrders", ioOrderResponse.getFromSpmsOrders() == null ? ' ' : ioOrderResponse.getFromSpmsOrders()); // bizData.put("cplb", udiProductEntity.getCplb() == null ? ' ' : udiProductEntity.getCplb()); // if(ioOrderInvoiceResponses != null && ioOrderInvoiceResponses.size()>0){ @@ -288,7 +296,7 @@ public class BasicOrderPrintController { bizData.put("index", i); bizData.put("nameCode", obj.getNameCode() == null ? ' ' : obj.getNameCode()); String udiCode = "#" + obj.getNameCode() + "#" + obj.getProduceDate() + "#" + obj.getExpireDate() + - "#" + obj.getBatchNo() + "#" + obj.getSerialNo() + "#" + "#" ; + "#" + obj.getBatchNo() + "#" + obj.getSerialNo() + "#" + "#"; udiCode = udiCode.replaceAll("#null", "#"); bizData.put("udiCode", udiCode); bizData.put("cpmctymc", udiProductEntity.getCpmctymc() == null ? ' ' : udiProductEntity.getCpmctymc()); diff --git a/src/main/java/com/glxp/api/controller/inout/IoDestinyProcessController.java b/src/main/java/com/glxp/api/controller/inout/IoDestinyProcessController.java index 495b85e5..bb61de6e 100644 --- a/src/main/java/com/glxp/api/controller/inout/IoDestinyProcessController.java +++ b/src/main/java/com/glxp/api/controller/inout/IoDestinyProcessController.java @@ -9,9 +9,8 @@ import com.glxp.api.req.basic.FilterUdiRelRequest; import com.glxp.api.req.inout.IodestinyProcessRequest; import com.glxp.api.res.PageSimpleResponse; import com.glxp.api.res.basic.UdiRelevanceResponse; -import com.glxp.api.res.inout.IoCodeRelResponse; import com.glxp.api.res.inout.IodestinyProcessResponse; -import com.glxp.api.service.basic.BasicDestinyRelService; +import com.glxp.api.service.basic.impl.BasicDestinyRelService; import com.glxp.api.service.inout.IoDestinyProcessCodeService; import com.glxp.api.service.inout.IoDestinyProcessDetailService; import com.glxp.api.service.inout.IoDestinyProcessService; @@ -22,7 +21,6 @@ import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RestController; import javax.annotation.Resource; -import java.util.ArrayList; import java.util.List; @RestController diff --git a/src/main/java/com/glxp/api/dao/basic/BasicDestinyRelMapper.java b/src/main/java/com/glxp/api/dao/basic/BasicDestinyRelMapper.java index f5bf2496..509cd686 100644 --- a/src/main/java/com/glxp/api/dao/basic/BasicDestinyRelMapper.java +++ b/src/main/java/com/glxp/api/dao/basic/BasicDestinyRelMapper.java @@ -1,9 +1,7 @@ package com.glxp.api.dao.basic; -import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.glxp.api.dao.BaseMapperPlus; -import com.glxp.api.entity.basic.BasicCorpEntity; -import com.glxp.api.entity.basic.BasicDestinyRelEntity; +import com.glxp.api.entity.basic.BasicSkProjectDetailEntity; import com.glxp.api.req.basic.FilterUdiRelRequest; import com.glxp.api.res.basic.UdiRelevanceResponse; import org.apache.ibatis.annotations.Mapper; @@ -11,11 +9,11 @@ import org.apache.ibatis.annotations.Mapper; import java.util.List; @Mapper -public interface BasicDestinyRelMapper extends BaseMapperPlus { +public interface BasicDestinyRelMapper extends BaseMapperPlus { List filterUdiJoinSup(FilterUdiRelRequest filterUdiRelRequest); List filterDestinyProducts(FilterUdiRelRequest filterUdiRelRequest); -} \ No newline at end of file +} diff --git a/src/main/java/com/glxp/api/dao/basic/BasicSkPrescirbeDetailMapper.java b/src/main/java/com/glxp/api/dao/basic/BasicSkPrescirbeDetailMapper.java new file mode 100644 index 00000000..0eb50ad1 --- /dev/null +++ b/src/main/java/com/glxp/api/dao/basic/BasicSkPrescirbeDetailMapper.java @@ -0,0 +1,9 @@ +package com.glxp.api.dao.basic; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.glxp.api.entity.basic.BasicSkPrescirbeDetailEntity; +import org.apache.ibatis.annotations.Mapper; + +@Mapper +public interface BasicSkPrescirbeDetailMapper extends BaseMapper { +} diff --git a/src/main/java/com/glxp/api/dao/basic/BasicSkPrescribeMapper.java b/src/main/java/com/glxp/api/dao/basic/BasicSkPrescribeMapper.java new file mode 100644 index 00000000..f19d9d53 --- /dev/null +++ b/src/main/java/com/glxp/api/dao/basic/BasicSkPrescribeMapper.java @@ -0,0 +1,9 @@ +package com.glxp.api.dao.basic; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.glxp.api.entity.basic.BasicSkPrescribeEntity; +import org.apache.ibatis.annotations.Mapper; + +@Mapper +public interface BasicSkPrescribeMapper extends BaseMapper { +} diff --git a/src/main/java/com/glxp/api/dao/basic/BasicSkProjectMapper.java b/src/main/java/com/glxp/api/dao/basic/BasicSkProjectMapper.java new file mode 100644 index 00000000..3ec47617 --- /dev/null +++ b/src/main/java/com/glxp/api/dao/basic/BasicSkProjectMapper.java @@ -0,0 +1,17 @@ +package com.glxp.api.dao.basic; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.glxp.api.entity.basic.BasicSkProjectEntity; +import com.glxp.api.req.basic.BasicSkProjectRequest; +import com.glxp.api.req.inout.FilterOrderRequest; +import com.glxp.api.res.basic.BasicSkProjectResponse; +import com.glxp.api.res.inout.IoOrderResponse; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +@Mapper +public interface BasicSkProjectMapper extends BaseMapper { + + List filterList(BasicSkProjectRequest basicSkProjectRequest); +} diff --git a/src/main/java/com/glxp/api/dao/basic/BasicSkSickerMapper.java b/src/main/java/com/glxp/api/dao/basic/BasicSkSickerMapper.java new file mode 100644 index 00000000..659bfc0a --- /dev/null +++ b/src/main/java/com/glxp/api/dao/basic/BasicSkSickerMapper.java @@ -0,0 +1,9 @@ +package com.glxp.api.dao.basic; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.glxp.api.entity.basic.BasicSkSickerEntity; +import org.apache.ibatis.annotations.Mapper; + +@Mapper +public interface BasicSkSickerMapper extends BaseMapper { +} diff --git a/src/main/java/com/glxp/api/entity/basic/BasicDestinyRelEntity.java b/src/main/java/com/glxp/api/entity/basic/BasicDestinyRelEntity.java deleted file mode 100644 index 9c0980cc..00000000 --- a/src/main/java/com/glxp/api/entity/basic/BasicDestinyRelEntity.java +++ /dev/null @@ -1,35 +0,0 @@ -package com.glxp.api.entity.basic; - -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 lombok.Data; - -/** - * 定数包产品关联表 - */ -@Data -@TableName(value = "basic_destiny_rel") -public class BasicDestinyRelEntity { - @TableId(value = "id", type = IdType.INPUT) - private Long id; - - /** - * 耗材产品id - */ - @TableField(value = "relId") - private Long relId; - - /** - * 定数包模板id - */ - @TableField(value = "pId") - private Long pId; - - /** - * 数量 - */ - @TableField(value = "`count`") - private Integer count; -} \ No newline at end of file diff --git a/src/main/java/com/glxp/api/entity/basic/BasicSkPrescirbeDetailEntity.java b/src/main/java/com/glxp/api/entity/basic/BasicSkPrescirbeDetailEntity.java new file mode 100644 index 00000000..ab4c5242 --- /dev/null +++ b/src/main/java/com/glxp/api/entity/basic/BasicSkPrescirbeDetailEntity.java @@ -0,0 +1,132 @@ +package com.glxp.api.entity.basic; + +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 io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 处方用药信息表 + */ +@ApiModel(value="com-glxp-api-entity-basic-BasicSkPrescirbeDetail") +@Data +@Builder +@AllArgsConstructor +@NoArgsConstructor +@TableName(value = "basic_sk_prescirbe_detail") +public class BasicSkPrescirbeDetailEntity implements Serializable { + @TableId(value = "id", type = IdType.INPUT) + @ApiModelProperty(value="") + private Long id; + + /** + * 耗材产品id + */ + @TableField(value = "relId") + @ApiModelProperty(value="耗材产品id") + private Long relId; + + /** + * 耗材名称 + */ + @TableField(value = "thrName") + @ApiModelProperty(value="耗材名称") + private String thrName; + + /** + * 耗材编码 + */ + @TableField(value = "thrCode") + @ApiModelProperty(value="耗材编码") + private String thrCode; + + /** + * 项目组套外键 + */ + @TableField(value = "pId") + @ApiModelProperty(value="项目组套外键") + private Long pId; + + /** + * 数量 + */ + @TableField(value = "`count`") + @ApiModelProperty(value="数量") + private Integer count; + + /** + * 计量数量 + */ + @TableField(value = "measureCount") + @ApiModelProperty(value="计量数量") + private String measureCount; + + /** + * 计量单位 + */ + @TableField(value = "measureUnit") + @ApiModelProperty(value="计量单位") + private String measureUnit; + + /** + * 类别 + */ + @TableField(value = "category") + @ApiModelProperty(value="类别") + private String category; + + /** + * 频率 + */ + @TableField(value = "frequency") + @ApiModelProperty(value="频率") + private String frequency; + + /** + * 价格 + */ + @TableField(value = "price") + @ApiModelProperty(value="价格") + private BigDecimal price; + + /** + * 规格型号 + */ + @TableField(value = "ggxh") + @ApiModelProperty(value="规格型号") + private String ggxh; + + /** + * 备注 + */ + @TableField(value = "remark") + @ApiModelProperty(value="备注") + private String remark; + + @TableField(value = "createTime") + @ApiModelProperty(value="") + private Date createTime; + + @TableField(value = "`createUser`") + @ApiModelProperty(value="") + private String createUser; + + @TableField(value = "updateTime") + @ApiModelProperty(value="") + private Date updateTime; + + @TableField(value = "updateUser") + @ApiModelProperty(value="") + private String updateUser; + + private static final long serialVersionUID = 1L; +} diff --git a/src/main/java/com/glxp/api/entity/basic/BasicSkPrescribeEntity.java b/src/main/java/com/glxp/api/entity/basic/BasicSkPrescribeEntity.java new file mode 100644 index 00000000..ec9332b8 --- /dev/null +++ b/src/main/java/com/glxp/api/entity/basic/BasicSkPrescribeEntity.java @@ -0,0 +1,112 @@ +package com.glxp.api.entity.basic; + +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 io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.Serializable; +import java.util.Date; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 患者处方 + */ +@ApiModel(value="com-glxp-api-entity-basic-BasicSkPrescribe") +@Data +@Builder +@AllArgsConstructor +@NoArgsConstructor +@TableName(value = "basic_sk_prescribe") +public class BasicSkPrescribeEntity implements Serializable { + @TableId(value = "id", type = IdType.INPUT) + @ApiModelProperty(value="") + private Long id; + + /** + * 处方编码 + */ + @TableField(value = "code") + @ApiModelProperty(value="处方编码") + private String code; + + /** + * 开方时间 + */ + @TableField(value = "prescribeDate") + @ApiModelProperty(value="开方时间") + private Date prescribeDate; + + /** + * 开方医生 + */ + @TableField(value = "createDr") + @ApiModelProperty(value="开方医生") + private String createDr; + + /** + * 就诊科室编码 + */ + @TableField(value = "deptCode") + @ApiModelProperty(value="就诊科室编码") + private String deptCode; + + /** + * 就诊科室名称 + */ + @TableField(value = "deptName") + @ApiModelProperty(value="就诊科室名称") + private String deptName; + + /** + * 诊断内容 + */ + @TableField(value = "diagnosis") + @ApiModelProperty(value="诊断内容") + private String diagnosis; + + /** + * 病人ID外键 + */ + @TableField(value = "sickerIdFk") + @ApiModelProperty(value="病人ID外键") + private String sickerIdFk; + + @TableField(value = "remark") + @ApiModelProperty(value="") + private String remark; + + /** + * 创建人 + */ + @TableField(value = "`createUser`") + @ApiModelProperty(value="创建人") + private String createUser; + + /** + * 创建时间 + */ + @TableField(value = "createTime") + @ApiModelProperty(value="创建时间") + private Date createTime; + + /** + * 更新人 + */ + @TableField(value = "updateUser") + @ApiModelProperty(value="更新人") + private String updateUser; + + /** + * 更新时间 + */ + @TableField(value = "updateTime") + @ApiModelProperty(value="更新时间") + private Date updateTime; + + private static final long serialVersionUID = 1L; +} diff --git a/src/main/java/com/glxp/api/entity/basic/BasicSkProjectDetailEntity.java b/src/main/java/com/glxp/api/entity/basic/BasicSkProjectDetailEntity.java new file mode 100644 index 00000000..5b9c0891 --- /dev/null +++ b/src/main/java/com/glxp/api/entity/basic/BasicSkProjectDetailEntity.java @@ -0,0 +1,63 @@ +package com.glxp.api.entity.basic; + +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 lombok.Data; + +/** + * 定数包产品关联表 + */ +@Data +@TableName(value = "basic_sk_project_detail") +public class BasicSkProjectDetailEntity { + @TableId(value = "id", type = IdType.INPUT) + private Long id; + + /** + * 耗材产品id + */ + @TableField(value = "relId") + private Long relId; + + /** + * 定数包模板id + */ + @TableField(value = "pId") + private Long pId; + + /** + * 数量 + */ + @TableField(value = "`count`") + private Integer count; + + @TableField(value = "`thrName`") + private String thrName; + @TableField(value = "`thrCode`") + private String thrCode; + @TableField(value = "`measureCount`") + private String measureCount; + @TableField(value = "`measureUnit`") + private String measureUnit; + @TableField(value = "`category`") + private String category; + @TableField(value = "`frequency`") + private String frequency; + @TableField(value = "`price`") + private String price; + @TableField(value = "`ggxh`") + private String ggxh; + @TableField(value = "`remark`") + private String remark; + @TableField(value = "`createTime`") + private String createTime; + @TableField(value = "`createUser`") + private String createUser; + @TableField(value = "`updateTime`") + private String updateTime; + @TableField(value = "`updateUser`") + private String updateUser; + +} diff --git a/src/main/java/com/glxp/api/entity/basic/BasicSkProjectEntity.java b/src/main/java/com/glxp/api/entity/basic/BasicSkProjectEntity.java new file mode 100644 index 00000000..4bd6778a --- /dev/null +++ b/src/main/java/com/glxp/api/entity/basic/BasicSkProjectEntity.java @@ -0,0 +1,94 @@ +package com.glxp.api.entity.basic; + +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 io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.Serializable; +import java.util.Date; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@ApiModel(value = "com-glxp-api-entity-basic-BasicSkProject") +@Data +@Builder +@AllArgsConstructor +@NoArgsConstructor +@TableName(value = "basic_sk_project") +public class BasicSkProjectEntity implements Serializable { + @TableId(value = "id", type = IdType.INPUT) + @ApiModelProperty(value = "") + private Long id; + + /** + * 自定义编码 + */ + @TableField(value = "idCode") + @ApiModelProperty(value = "自定义编码") + private String idCode; + + /** + * 项目编码 + */ + @TableField(value = "code") + @ApiModelProperty(value = "项目编码") + private String code; + + /** + * 项目名称 + */ + @TableField(value = "`name`") + @ApiModelProperty(value = "项目名称") + private String name; + + /** + * 类别 + */ + @TableField(value = "category") + @ApiModelProperty(value = "类别") + private String category; + + /** + * 规格 + */ + @TableField(value = "ggxh") + @ApiModelProperty(value = "规格") + private String ggxh; + + /** + * 备注 + */ + @TableField(value = "remark") + @ApiModelProperty(value = "备注") + private String remark; + + @TableField(value = "createTime") + @ApiModelProperty(value = "") + private Date createTime; + + @TableField(value = "`createUser`") + @ApiModelProperty(value = "") + private String createUser; + + @TableField(value = "updateTime") + @ApiModelProperty(value = "") + private Date updateTime; + + @TableField(value = "updateUser") + @ApiModelProperty(value = "") + private String updateUser; + /** + * 类型:1:定数包,内部使用;2:项目、组套外部关联 + */ + @TableField(value = "type") + @ApiModelProperty(value = "类型:1:定数包,内部使用;2:项目、组套外部关联") + private Integer type; + + private static final long serialVersionUID = 1L; +} diff --git a/src/main/java/com/glxp/api/entity/basic/BasicSkSickerEntity.java b/src/main/java/com/glxp/api/entity/basic/BasicSkSickerEntity.java new file mode 100644 index 00000000..516c16c8 --- /dev/null +++ b/src/main/java/com/glxp/api/entity/basic/BasicSkSickerEntity.java @@ -0,0 +1,171 @@ +package com.glxp.api.entity.basic; + +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 io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.Serializable; +import java.util.Date; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 患者信息 + */ +@ApiModel(value="com-glxp-api-entity-basic-BasicSkSicker") +@Data +@Builder +@AllArgsConstructor +@NoArgsConstructor +@TableName(value = "basic_sk_sicker") +public class BasicSkSickerEntity implements Serializable { + @TableId(value = "id", type = IdType.INPUT) + @ApiModelProperty(value="") + private Long id; + + /** + * 患者编码 + */ + @TableField(value = "code") + @ApiModelProperty(value="患者编码") + private String code; + + /** + * 姓名 + */ + @TableField(value = "`name`") + @ApiModelProperty(value="姓名") + private String name; + + /** + * 住院号 + */ + @TableField(value = "adNum") + @ApiModelProperty(value="住院号") + private String adNum; + + /** + * 身份证号 + */ + @TableField(value = "idNum") + @ApiModelProperty(value="身份证号") + private String idNum; + + /** + * 手机号 + */ + @TableField(value = "phone") + @ApiModelProperty(value="手机号") + private String phone; + + /** + * 性别 + */ + @TableField(value = "gender") + @ApiModelProperty(value="性别") + private String gender; + + /** + * 职业 + */ + @TableField(value = "job") + @ApiModelProperty(value="职业") + private String job; + + /** + * 出生年月 + */ + @TableField(value = "bornDate") + @ApiModelProperty(value="出生年月") + private String bornDate; + + /** + * 国籍 + */ + @TableField(value = "nationality") + @ApiModelProperty(value="国籍") + private String nationality; + + /** + * 文化程度 + */ + @TableField(value = "education") + @ApiModelProperty(value="文化程度") + private String education; + + /** + * 监护人 + */ + @TableField(value = "guardianName") + @ApiModelProperty(value="监护人") + private String guardianName; + + /** + * 监护人与患者关系 + */ + @TableField(value = "guardianRel") + @ApiModelProperty(value="监护人与患者关系") + private String guardianRel; + + /** + * 现居住地 + */ + @TableField(value = "curAddr") + @ApiModelProperty(value="现居住地") + private String curAddr; + + /** + * 户籍地 + */ + @TableField(value = "kosekiAddr") + @ApiModelProperty(value="户籍地") + private String kosekiAddr; + + /** + * 医保 + */ + @TableField(value = "medicalIns") + @ApiModelProperty(value="医保") + private String medicalIns; + + /** + * 创建人 + */ + @TableField(value = "`createUser`") + @ApiModelProperty(value="创建人") + private String createUser; + + /** + * 创建时间 + */ + @TableField(value = "createTime") + @ApiModelProperty(value="创建时间") + private Date createTime; + + /** + * 更新人 + */ + @TableField(value = "updateUser") + @ApiModelProperty(value="更新人") + private String updateUser; + + /** + * 更新时间 + */ + @TableField(value = "updateTime") + @ApiModelProperty(value="更新时间") + private Date updateTime; + + /** + * 备注 + */ + @TableField(value = "remark") + @ApiModelProperty(value="备注") + private String remark; + + private static final long serialVersionUID = 1L; +} diff --git a/src/main/java/com/glxp/api/req/basic/BasicSkProjectRequest.java b/src/main/java/com/glxp/api/req/basic/BasicSkProjectRequest.java new file mode 100644 index 00000000..808a221e --- /dev/null +++ b/src/main/java/com/glxp/api/req/basic/BasicSkProjectRequest.java @@ -0,0 +1,58 @@ +package com.glxp.api.req.basic; + +import com.baomidou.mybatisplus.annotation.TableField; +import com.glxp.api.util.page.ListPageRequest; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.Date; + +@Data +public class BasicSkProjectRequest extends ListPageRequest { + + + private Long id; + + /** + * 自定义编码 + */ + private String idCode; + + /** + * 项目编码 + */ + private String code; + + /** + * 项目名称 + */ + private String name; + + /** + * 类别 + */ + private String category; + + /** + * 规格 + */ + private String ggxh; + + /** + * 备注 + */ + private String remark; + + private Date createTime; + + private String createUser; + + private Date updateTime; + + private String updateUser; + + /** + * 类型:1:定数包,内部使用;2:项目、组套外部关联 + */ + private Integer type; +} diff --git a/src/main/java/com/glxp/api/res/basic/BasicSkProjectDetailResponse.java b/src/main/java/com/glxp/api/res/basic/BasicSkProjectDetailResponse.java new file mode 100644 index 00000000..b80795d4 --- /dev/null +++ b/src/main/java/com/glxp/api/res/basic/BasicSkProjectDetailResponse.java @@ -0,0 +1,4 @@ +package com.glxp.api.res.basic; + +public class BasicSkProjectDetailResponse { +} diff --git a/src/main/java/com/glxp/api/res/basic/BasicSkProjectResponse.java b/src/main/java/com/glxp/api/res/basic/BasicSkProjectResponse.java new file mode 100644 index 00000000..3ac6ab2e --- /dev/null +++ b/src/main/java/com/glxp/api/res/basic/BasicSkProjectResponse.java @@ -0,0 +1,56 @@ +package com.glxp.api.res.basic; + +import lombok.Data; + +import java.util.Date; + +@Data +public class BasicSkProjectResponse { + + + private Long id; + + /** + * 自定义编码 + */ + private String idCode; + + /** + * 项目编码 + */ + private String code; + + /** + * 项目名称 + */ + private String name; + + /** + * 类别 + */ + private String category; + + /** + * 规格 + */ + private String ggxh; + + /** + * 备注 + */ + private String remark; + + private Date createTime; + + private String createUser; + + private Date updateTime; + + private String updateUser; + + private String createByName; + /** + * 类型:1:定数包,内部使用;2:项目、组套外部关联 + */ + private Integer type; +} diff --git a/src/main/java/com/glxp/api/service/basic/BasicDestinyRelService.java b/src/main/java/com/glxp/api/service/basic/BasicDestinyRelService.java deleted file mode 100644 index 6cece5ef..00000000 --- a/src/main/java/com/glxp/api/service/basic/BasicDestinyRelService.java +++ /dev/null @@ -1,24 +0,0 @@ -package com.glxp.api.service.basic; - -import com.glxp.api.req.basic.BasicDestinyRelRequest; -import com.glxp.api.req.basic.FilterUdiRelRequest; -import com.glxp.api.res.basic.UdiRelevanceResponse; -import org.springframework.stereotype.Service; - -import java.util.List; - -public interface BasicDestinyRelService{ - - Boolean addModeldestinyProduct(BasicDestinyRelRequest basicDestinyRelRequest); - - List filterUdiJoinSup(FilterUdiRelRequest filterUdiRelRequest); - - List filterDestinyRelIds(Long pId); - - List filterDestinyProducts(FilterUdiRelRequest filterUdiRelRequest); - - Boolean delectModeldestinyProduct(BasicDestinyRelRequest basicDestinyRelRequest); - - Boolean uploadModeldestinyProduct(BasicDestinyRelRequest basicDestinyRelRequest); - -} diff --git a/src/main/java/com/glxp/api/service/basic/BasicSkPrescirbeDetailService.java b/src/main/java/com/glxp/api/service/basic/BasicSkPrescirbeDetailService.java new file mode 100644 index 00000000..1c60f1a3 --- /dev/null +++ b/src/main/java/com/glxp/api/service/basic/BasicSkPrescirbeDetailService.java @@ -0,0 +1,10 @@ +package com.glxp.api.service.basic; + +import org.springframework.stereotype.Service; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.glxp.api.entity.basic.BasicSkPrescirbeDetailEntity; +import com.glxp.api.dao.basic.BasicSkPrescirbeDetailMapper; +@Service +public class BasicSkPrescirbeDetailService extends ServiceImpl { + +} diff --git a/src/main/java/com/glxp/api/service/basic/BasicSkPrescribeService.java b/src/main/java/com/glxp/api/service/basic/BasicSkPrescribeService.java new file mode 100644 index 00000000..f794a916 --- /dev/null +++ b/src/main/java/com/glxp/api/service/basic/BasicSkPrescribeService.java @@ -0,0 +1,10 @@ +package com.glxp.api.service.basic; + +import org.springframework.stereotype.Service; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.glxp.api.entity.basic.BasicSkPrescribeEntity; +import com.glxp.api.dao.basic.BasicSkPrescribeMapper; +@Service +public class BasicSkPrescribeService extends ServiceImpl { + +} diff --git a/src/main/java/com/glxp/api/service/basic/BasicSkProjectService.java b/src/main/java/com/glxp/api/service/basic/BasicSkProjectService.java new file mode 100644 index 00000000..82f85d13 --- /dev/null +++ b/src/main/java/com/glxp/api/service/basic/BasicSkProjectService.java @@ -0,0 +1,35 @@ +package com.glxp.api.service.basic; + +import com.github.pagehelper.PageHelper; +import com.glxp.api.entity.thrsys.ThrProductsEntity; +import com.glxp.api.req.basic.BasicSkProjectRequest; +import com.glxp.api.req.thrsys.FilterThrProductsRequest; +import com.glxp.api.res.basic.BasicSkProjectResponse; +import org.springframework.stereotype.Service; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.glxp.api.dao.basic.BasicSkProjectMapper; +import com.glxp.api.entity.basic.BasicSkProjectEntity; + +import javax.annotation.Resource; +import java.util.Collections; +import java.util.List; + +@Service +public class BasicSkProjectService extends ServiceImpl { + + + @Resource + BasicSkProjectMapper basicSkProjectMapper; + + public List filterThrProducts(BasicSkProjectRequest basicSkProjectRequest) { + if (basicSkProjectRequest == null) { + return Collections.emptyList(); + } + if (basicSkProjectRequest.getPage() != null) { + int offset = (basicSkProjectRequest.getPage() - 1) * basicSkProjectRequest.getLimit(); + PageHelper.offsetPage(offset, basicSkProjectRequest.getLimit()); + } + List data = basicSkProjectMapper.filterList(basicSkProjectRequest); + return data; + } +} diff --git a/src/main/java/com/glxp/api/service/basic/BasicSkSickerService.java b/src/main/java/com/glxp/api/service/basic/BasicSkSickerService.java new file mode 100644 index 00000000..56d8296c --- /dev/null +++ b/src/main/java/com/glxp/api/service/basic/BasicSkSickerService.java @@ -0,0 +1,10 @@ +package com.glxp.api.service.basic; + +import org.springframework.stereotype.Service; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.glxp.api.entity.basic.BasicSkSickerEntity; +import com.glxp.api.dao.basic.BasicSkSickerMapper; +@Service +public class BasicSkSickerService extends ServiceImpl { + +} diff --git a/src/main/java/com/glxp/api/service/basic/impl/BasicDestinyRelServiceImpl.java b/src/main/java/com/glxp/api/service/basic/impl/BasicDestinyRelService.java similarity index 63% rename from src/main/java/com/glxp/api/service/basic/impl/BasicDestinyRelServiceImpl.java rename to src/main/java/com/glxp/api/service/basic/impl/BasicDestinyRelService.java index b90b5ff4..50121eb7 100644 --- a/src/main/java/com/glxp/api/service/basic/impl/BasicDestinyRelServiceImpl.java +++ b/src/main/java/com/glxp/api/service/basic/impl/BasicDestinyRelService.java @@ -3,14 +3,16 @@ package com.glxp.api.service.basic.impl; import cn.hutool.core.util.IdUtil; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.github.pagehelper.PageHelper; import com.glxp.api.dao.basic.BasicDestinyRelMapper; +import com.glxp.api.dao.basic.BasicSkProjectMapper; import com.glxp.api.dao.basic.UdiRelevanceDao; -import com.glxp.api.entity.basic.BasicDestinyRelEntity; +import com.glxp.api.entity.basic.BasicSkProjectDetailEntity; +import com.glxp.api.entity.basic.BasicSkProjectEntity; import com.glxp.api.req.basic.BasicDestinyRelRequest; import com.glxp.api.req.basic.FilterUdiRelRequest; import com.glxp.api.res.basic.UdiRelevanceResponse; -import com.glxp.api.service.basic.BasicDestinyRelService; import org.springframework.stereotype.Service; import javax.annotation.Resource; @@ -20,7 +22,7 @@ import java.util.List; @Service -public class BasicDestinyRelServiceImpl implements BasicDestinyRelService { +public class BasicDestinyRelService extends ServiceImpl { @Resource BasicDestinyRelMapper basicDestinyRelMapper; @@ -28,22 +30,21 @@ public class BasicDestinyRelServiceImpl implements BasicDestinyRelService { @Resource UdiRelevanceDao udiRelevanceDao; - @Override public Boolean addModeldestinyProduct(BasicDestinyRelRequest basicDestinyRelRequest) { - List basicDestinyRelEntitList = new ArrayList<>(); + List basicDestinyRelEntitList = new ArrayList<>(); for (Long str : basicDestinyRelRequest.getList()) { - BasicDestinyRelEntity basicDestinyRelEntity = new BasicDestinyRelEntity(); - basicDestinyRelEntity.setId(IdUtil.getSnowflakeNextId()); - basicDestinyRelEntity.setRelId(str); - basicDestinyRelEntity.setPId(basicDestinyRelRequest.getpId()); - basicDestinyRelEntitList.add(basicDestinyRelEntity); + BasicSkProjectDetailEntity basicSkProjectDetailEntity = new BasicSkProjectDetailEntity(); + basicSkProjectDetailEntity.setId(IdUtil.getSnowflakeNextId()); + basicSkProjectDetailEntity.setRelId(str); + basicSkProjectDetailEntity.setPId(basicDestinyRelRequest.getpId()); + basicDestinyRelEntitList.add(basicSkProjectDetailEntity); } Boolean flag = basicDestinyRelMapper.insertBatch(basicDestinyRelEntitList); return flag; } - @Override + public List filterUdiJoinSup(FilterUdiRelRequest filterUdiRelRequest) { if (filterUdiRelRequest == null) { return Collections.emptyList(); @@ -56,20 +57,20 @@ public class BasicDestinyRelServiceImpl implements BasicDestinyRelService { return data; } - @Override + public List filterDestinyRelIds(Long pId) { List stringList = new ArrayList<>(); - QueryWrapper ew = new QueryWrapper<>(); + QueryWrapper ew = new QueryWrapper<>(); ew.eq("pId", pId); - List basicDestinyRelEntities = basicDestinyRelMapper.selectList(ew); - for (BasicDestinyRelEntity basicDestinyRelEntity : basicDestinyRelEntities) { - stringList.add(basicDestinyRelEntity.getRelId()); + List basicDestinyRelEntities = basicDestinyRelMapper.selectList(ew); + for (BasicSkProjectDetailEntity basicSkProjectDetailEntity : basicDestinyRelEntities) { + stringList.add(basicSkProjectDetailEntity.getRelId()); } return stringList; } - @Override + public List filterDestinyProducts(FilterUdiRelRequest filterUdiRelRequest) { if (filterUdiRelRequest == null) { return Collections.emptyList(); @@ -82,16 +83,16 @@ public class BasicDestinyRelServiceImpl implements BasicDestinyRelService { return data; } - @Override + public Boolean delectModeldestinyProduct(BasicDestinyRelRequest basicDestinyRelRequest) { return basicDestinyRelMapper.deleteById(basicDestinyRelRequest.getId()) > 0 ? true : false; } - @Override + public Boolean uploadModeldestinyProduct(BasicDestinyRelRequest basicDestinyRelRequest) { - BasicDestinyRelEntity basicDestinyRelEntity=new BasicDestinyRelEntity(); - basicDestinyRelEntity.setId(basicDestinyRelRequest.getId()); - basicDestinyRelEntity.setCount(basicDestinyRelRequest.getCount()); - return basicDestinyRelMapper.updateById(basicDestinyRelEntity)> 0 ? true : false; + BasicSkProjectDetailEntity basicSkProjectDetailEntity = new BasicSkProjectDetailEntity(); + basicSkProjectDetailEntity.setId(basicDestinyRelRequest.getId()); + basicSkProjectDetailEntity.setCount(basicDestinyRelRequest.getCount()); + return basicDestinyRelMapper.updateById(basicSkProjectDetailEntity) > 0 ? true : false; } } diff --git a/src/main/java/com/glxp/api/service/basic/impl/UdiRelevanceServiceImpl.java b/src/main/java/com/glxp/api/service/basic/impl/UdiRelevanceServiceImpl.java index a666db43..3ab91fc1 100644 --- a/src/main/java/com/glxp/api/service/basic/impl/UdiRelevanceServiceImpl.java +++ b/src/main/java/com/glxp/api/service/basic/impl/UdiRelevanceServiceImpl.java @@ -106,10 +106,7 @@ public class UdiRelevanceServiceImpl extends ServiceImpl udiRelevanceResponses = filterUdiRelevance(filterUdiRelRequest); - if (CollUtil.isNotEmpty(udiRelevanceResponses)) { - return udiRelevanceResponses.get(0); - } + UdiRelevanceResponse udiRelevanceResponses = selectOneUdi(filterUdiRelRequest); return null; } diff --git a/src/main/java/com/glxp/api/service/inout/impl/IoDestinyProcessDetailServiceImpl.java b/src/main/java/com/glxp/api/service/inout/impl/IoDestinyProcessDetailServiceImpl.java index b89b3c98..2c373d74 100644 --- a/src/main/java/com/glxp/api/service/inout/impl/IoDestinyProcessDetailServiceImpl.java +++ b/src/main/java/com/glxp/api/service/inout/impl/IoDestinyProcessDetailServiceImpl.java @@ -16,21 +16,17 @@ import com.glxp.api.req.inout.IodestinyProcessRequest; import com.glxp.api.res.basic.UdiRelevanceResponse; import com.glxp.api.res.inout.IodestinyProcessResponse; import com.glxp.api.service.auth.CustomerService; -import com.glxp.api.service.basic.BasicDestinyRelService; import com.glxp.api.service.basic.UdiRelevanceService; -import com.glxp.api.service.inout.IoDestinyProcessService; +import com.glxp.api.service.basic.impl.BasicDestinyRelService; import com.glxp.api.util.udi.FilterUdiUtils; import com.glxp.api.util.udi.UdiCalCountUtil; import org.springframework.stereotype.Service; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.glxp.api.dao.inout.IoDestinyProcessDetailMapper; import com.glxp.api.entity.inout.IoDestinyProcessDetailEntity; import com.glxp.api.service.inout.IoDestinyProcessDetailService; import javax.annotation.Resource; -import java.awt.geom.QuadCurve2D; import java.util.ArrayList; -import java.util.Collections; import java.util.Date; import java.util.List; diff --git a/src/main/resources/application-dev.yml b/src/main/resources/application-dev.yml index e7acbb9d..b2df4abe 100644 --- a/src/main/resources/application-dev.yml +++ b/src/main/resources/application-dev.yml @@ -4,7 +4,7 @@ server: spring: datasource: driver-class-name: com.p6spy.engine.spy.P6SpyDriver - jdbc-url: jdbc:p6spy:mysql://127.0.0.1:3306/udi_wms_ph?allowMultiQueries=true&serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true + jdbc-url: jdbc:p6spy:mysql://127.0.0.1:3306/udi_wms_pt?allowMultiQueries=true&serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true username: root password: 123456 hikari: diff --git a/src/main/resources/mybatis/mapper/basic/BasicDestinyRelMapper.xml b/src/main/resources/mybatis/mapper/basic/BasicDestinyRelMapper.xml index c6d19665..b74fdad6 100644 --- a/src/main/resources/mybatis/mapper/basic/BasicDestinyRelMapper.xml +++ b/src/main/resources/mybatis/mapper/basic/BasicDestinyRelMapper.xml @@ -1,303 +1,287 @@ - - - - - - - - - - - id, relId, pId, `count` - + + - + select basic_udirel.*, + basic_products.id as PRId, + basic_products.originUuid, + basic_products.nameCode, + basic_products.deviceRecordKey, + basic_products.packRatio, + basic_products.packUnit, + basic_products.packLevel, + basic_products.bhxjsl, + basic_products.bhzxxsbzsl, + basic_products.zxxsbzbhsydysl, + basic_products.bhxjcpbm, + basic_products.bzcj, + basic_products.cpmctymc, + basic_products.cplb, + basic_products.flbm, + basic_products.ggxh, + basic_products.qxlb, + basic_products.tyshxydm, + basic_products.ylqxzcrbarmc, + basic_products.zczbhhzbapzbh, + basic_products.ylqxzcrbarywmc, + basic_products.sydycpbs, + basic_products.sjcpbm, + basic_products.versionNumber, + basic_products.diType, + basic_products.ybbm, + basic_products.sptm, + basic_products.manufactory, + basic_products.measname, + basic_products.productType, + basic_products.scbssfbhph, + basic_products.scbssfbhxlh, + basic_products.scbssfbhscrq, + basic_products.scbssfbhsxrq, + basic_products.cpms, + basic_products.allowNoBatch, + basic_products.allowNoExpire, + basic_products.allowNoProduct, + basic_products.allowNoSerial, + basic_products.spmc, + basic_products.cplx, + basic_products.hchzsb, + basic_products.cpdls, + company_product_relevance.price, + basic_products.basicPrductRemak1, + basic_products.basicPrductRemak2, + basic_products.basicPrductRemak3, + basic_products.basicPrductRemak4, + basic_products.basicPrductRemak5, + basic_products.basicPrductRemak6, + basic_products.basicPrductRemak7, + basic_products.basicPrductRemak8, + basic_products.sfwblztlcp, + basic_products.cgzmraqxgxx, + basic_products.sfbjwycxsy, + basic_products.zdcfsycs, + basic_products.sfwwjbz, + basic_products.syqsfxyjxmj, + basic_products.mjfs, + basic_products.categoryName, + company_product_relevance.unitFk, + basic_corp.erpId as customerId, + basic_corp.name companyName + FROM basic_udirel + inner JOIN basic_products + ON basic_products.uuid = basic_udirel.uuid + left join company_product_relevance + on basic_udirel.id = company_product_relevance.udiRlIdFk + left JOIN basic_corp on basic_corp.erpId = company_product_relevance.customerId + left join basic_hosp_type bht on basic_udirel.relCode = bht.code + left join thr_products tp on tp.code = basic_udirel.mainId + left join basic_product_category_rel on basic_product_category_rel.relId = basic_udirel.id + left join basic_product_category on basic_product_category_rel.code = basic_product_category.code + + + AND basic_products.ylqxzcrbarmc LIKE concat('%', #{ylqxzcrbarmc}, '%') + + + AND basic_product_category.name = #{category} + + + AND basic_products.manufactory LIKE concat('%', #{manufactory}, '%') + - - AND supName LIKE concat('%', #{supName}, '%') - - - and basic_udirel.id not in - - #{item} - - - - AND basic_products.pinyinInitial like concat('%', #{pinyinInitial}, '%') - - - and (basic_udirel.thirdId LIKE concat('%', #{thrPiId}, '%') - or basic_udirel.thirdId1 LIKE concat('%', #{thrPiId}, '%') - or basic_udirel.thirdId2 LIKE concat('%', #{thrPiId}, '%') - or basic_udirel.thirdId3 LIKE concat('%', #{thrPiId}, '%') - or basic_udirel.thirdId4 LIKE concat('%', #{thrPiId}, '%')) - - - AND basic_products.ggxh LIKE concat('%', #{ggxh}, '%') - - - AND basic_products.cpmctymc LIKE concat('%', #{cpmctymc}, '%') - - - AND nameCode LIKE concat(#{nameCode}, '%') - - - AND basic_udirel.thirdId LIKE concat(#{thirdId}, '%') - - - AND basic_udirel.uuid = #{uuid} - - - AND company_product_relevance.unitFk = #{unitFk} - - - AND basic_udirel.id = #{id} - - - AND basic_udirel.udplatCode = #{udplatCode} - - - AND basic_products.diType = #{diType} - - - AND basic_udirel.lockStatus = #{lockStatus} - - - AND basic_products.zczbhhzbapzbh LIKE concat(#{zczbhhzbapzbh}, '%') - - - + AND supName LIKE concat('%', #{supName}, '%') + + + and basic_udirel.id not in + + #{item} + + + + AND basic_products.pinyinInitial like concat('%', #{pinyinInitial}, '%') + + + and (basic_udirel.thirdId LIKE concat('%', #{thrPiId}, '%') + or basic_udirel.thirdId1 LIKE concat('%', #{thrPiId}, '%') + or basic_udirel.thirdId2 LIKE concat('%', #{thrPiId}, '%') + or basic_udirel.thirdId3 LIKE concat('%', #{thrPiId}, '%') + or basic_udirel.thirdId4 LIKE concat('%', #{thrPiId}, '%')) + + + AND basic_products.ggxh LIKE concat('%', #{ggxh}, '%') + + + AND basic_products.cpmctymc LIKE concat('%', #{cpmctymc}, '%') + + + AND nameCode LIKE concat(#{nameCode}, '%') + + + AND basic_udirel.thirdId LIKE concat(#{thirdId}, '%') + + + AND basic_udirel.uuid = #{uuid} + + + AND company_product_relevance.unitFk = #{unitFk} + + + AND basic_udirel.id = #{id} + + + AND basic_udirel.udplatCode = #{udplatCode} + + + AND basic_products.diType = #{diType} + + + AND basic_udirel.lockStatus = #{lockStatus} + + + AND basic_products.zczbhhzbapzbh LIKE concat(#{zczbhhzbapzbh}, '%') + + + = DATE_FORMAT(#{lastUpdateTime}, '%Y-%m-%d %H:%i:%S') ]]> - - - AND mainId = #{mainId} - - - or basic_products.cpmctymc LIKE concat('%', #{unionFilterStr}, '%') - or basic_products.ylqxzcrbarmc LIKE concat('%', #{unionFilterStr}, '%') - or basic_products.ggxh LIKE concat('%', #{unionFilterStr}, '%') - or basic_products.zczbhhzbapzbh LIKE concat('%', #{unionFilterStr}, '%') - - - AND isAdavence = #{isAdavence} - - - AND nameCode = #{uniqueNameCode} - - - and basic_udirel.id in - - #{item} - - - - and (tp.flbm = #{flbm} or basic_products.flbm = #{flbm} or tp.cplb = #{flbm} or - basic_udirel.relCode = #{flbm}) - - - AND basic_corp.name like concat('%', #{companyName}, '%') - - - AND basic_products.basicPrductRemak1 like concat('%', #{basicPrductRemak1}, '%') - - - AND basic_products.basicPrductRemak2 like concat('%', #{basicPrductRemak2}, '%') - - - AND basic_products.basicPrductRemak3 like concat('%', #{basicPrductRemak3}, '%') - - - AND basic_products.basicPrductRemak4 like concat('%', #{basicPrductRemak4}, '%') - - - AND basic_products.basicPrductRemak5 like concat('%', #{basicPrductRemak5}, '%') - - - AND basic_products.basicPrductRemak6 like concat('%', #{basicPrductRemak6}, '%') - - - AND basic_products.basicPrductRemak7 like concat('%', #{basicPrductRemak7}, '%') - - - AND basic_products.basicPrductRemak8 like concat('%', #{basicPrductRemak8}, '%') - - - GROUP BY basic_udirel.id + + + AND mainId = #{mainId} + + + or basic_products.cpmctymc LIKE concat('%', #{unionFilterStr}, '%') + or basic_products.ylqxzcrbarmc LIKE concat('%', #{unionFilterStr}, '%') + or basic_products.ggxh LIKE concat('%', #{unionFilterStr}, '%') + or basic_products.zczbhhzbapzbh LIKE concat('%', #{unionFilterStr}, '%') + + + AND isAdavence = #{isAdavence} + + + AND nameCode = #{uniqueNameCode} + + + and basic_udirel.id in + + #{item} + + + + and (tp.flbm = #{flbm} or basic_products.flbm = #{flbm} or tp.cplb = #{flbm} or + basic_udirel.relCode = #{flbm}) + + + AND basic_corp.name like concat('%', #{companyName}, '%') + + + AND basic_products.basicPrductRemak1 like concat('%', #{basicPrductRemak1}, '%') + + + AND basic_products.basicPrductRemak2 like concat('%', #{basicPrductRemak2}, '%') + + + AND basic_products.basicPrductRemak3 like concat('%', #{basicPrductRemak3}, '%') + + + AND basic_products.basicPrductRemak4 like concat('%', #{basicPrductRemak4}, '%') + + + AND basic_products.basicPrductRemak5 like concat('%', #{basicPrductRemak5}, '%') + + + AND basic_products.basicPrductRemak6 like concat('%', #{basicPrductRemak6}, '%') + + + AND basic_products.basicPrductRemak7 like concat('%', #{basicPrductRemak7}, '%') + + + AND basic_products.basicPrductRemak8 like concat('%', #{basicPrductRemak8}, '%') + + + GROUP BY basic_udirel.id + - - - - - - - \ No newline at end of file + + diff --git a/src/main/resources/mybatis/mapper/basic/BasicSkPrescirbeDetailMapper.xml b/src/main/resources/mybatis/mapper/basic/BasicSkPrescirbeDetailMapper.xml new file mode 100644 index 00000000..db8a67ad --- /dev/null +++ b/src/main/resources/mybatis/mapper/basic/BasicSkPrescirbeDetailMapper.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + id, relId, thrName, thrCode, pId, `count`, measureCount, measureUnit, category, frequency, + price, ggxh, remark, createTime, `createUser`, updateTime, updateUser + + diff --git a/src/main/resources/mybatis/mapper/basic/BasicSkPrescribeMapper.xml b/src/main/resources/mybatis/mapper/basic/BasicSkPrescribeMapper.xml new file mode 100644 index 00000000..87ed5235 --- /dev/null +++ b/src/main/resources/mybatis/mapper/basic/BasicSkPrescribeMapper.xml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + id, code, prescribeDate, createDr, deptCode, deptName, diagnosis, sickerIdFk, remark, + `createUser`, createTime, updateUser, updateTime + + diff --git a/src/main/resources/mybatis/mapper/basic/BasicSkProjectMapper.xml b/src/main/resources/mybatis/mapper/basic/BasicSkProjectMapper.xml new file mode 100644 index 00000000..bb510ea5 --- /dev/null +++ b/src/main/resources/mybatis/mapper/basic/BasicSkProjectMapper.xml @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + id, idCode, code, `name`, category, ggxh, remark, createTime, `createUser`, updateTime, + updateUser + + + + diff --git a/src/main/resources/mybatis/mapper/basic/BasicSkSickerMapper.xml b/src/main/resources/mybatis/mapper/basic/BasicSkSickerMapper.xml new file mode 100644 index 00000000..cf9d03c2 --- /dev/null +++ b/src/main/resources/mybatis/mapper/basic/BasicSkSickerMapper.xml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + id, code, `name`, adNum, idNum, phone, gender, job, bornDate, nationality, education, + guardianName, guardianRel, curAddr, kosekiAddr, medicalIns, `createUser`, createTime, + updateUser, updateTime, remark + +