Compare commits
4 Commits
Author | SHA1 | Date |
---|---|---|
|
b4f3a89cec | 9 months ago |
|
3730a9578f | 12 months ago |
|
eca102392b | 12 months ago |
|
0cb7316059 | 1 year ago |
@ -1,36 +0,0 @@
|
|||||||
package com.glxp.udidl.admin.controller.udchs;
|
|
||||||
|
|
||||||
import com.glxp.udidl.admin.annotation.AuthRuleAnnotation;
|
|
||||||
import com.glxp.udidl.admin.dto.udchs.BaseParam;
|
|
||||||
import com.glxp.udidl.admin.entity.chs.YbDrug;
|
|
||||||
import com.glxp.udidl.admin.entity.chs.YbHcflEntity;
|
|
||||||
import com.glxp.udidl.admin.res.BaseResponse;
|
|
||||||
import com.glxp.udidl.admin.service.udchs.YbDrugService;
|
|
||||||
import com.glxp.udidl.admin.service.udchs.YbHcflService;
|
|
||||||
import io.swagger.annotations.Api;
|
|
||||||
import io.swagger.annotations.ApiOperation;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 国家医保
|
|
||||||
*/
|
|
||||||
@Api(tags = "国家医保药品信息接口")
|
|
||||||
@RestController
|
|
||||||
@RequestMapping("/udchs/ybDrug")
|
|
||||||
public class UdchsYbDrugController {
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private YbDrugService ybDrugService;
|
|
||||||
|
|
||||||
@ApiOperation(value = "国家医保耗材分类目录信息", response = YbDrug.class)
|
|
||||||
@PostMapping("/list")
|
|
||||||
public BaseResponse getList(@RequestBody BaseParam param) {
|
|
||||||
return ybDrugService.getList(param);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,18 +0,0 @@
|
|||||||
package com.glxp.udidl.admin.dao.chs;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|
||||||
import com.glxp.udidl.admin.dto.udchs.BaseParam;
|
|
||||||
import com.glxp.udidl.admin.entity.chs.YbDrug;
|
|
||||||
import com.glxp.udidl.admin.entity.chs.YbHcflEntity;
|
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
|
||||||
import org.apache.ibatis.annotations.Param;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@Mapper
|
|
||||||
public interface YbDrugMapper extends BaseMapper<YbDrug> {
|
|
||||||
|
|
||||||
void batchSaveOrUpdateByGoodsCode(@Param("list")List<YbDrug> ybHcflEntities);
|
|
||||||
|
|
||||||
List<YbDrug> list(BaseParam param);
|
|
||||||
}
|
|
@ -0,0 +1,9 @@
|
|||||||
|
package com.glxp.udidl.admin.dao.udi;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.glxp.udidl.admin.entity.udi.DiProductEntity;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
@Mapper
|
||||||
|
public interface DiProductMapper extends BaseMapper<DiProductEntity> {
|
||||||
|
}
|
@ -0,0 +1,9 @@
|
|||||||
|
package com.glxp.udidl.admin.dao.udi;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.glxp.udidl.admin.entity.udi.DiProductSpecEntity;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
@Mapper
|
||||||
|
public interface DiProductSpecMapper extends BaseMapper<DiProductSpecEntity> {
|
||||||
|
}
|
@ -1,153 +0,0 @@
|
|||||||
package com.glxp.udidl.admin.entity.chs;
|
|
||||||
|
|
||||||
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 lombok.Data;
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 药品
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@TableName(value = "yb_drug")
|
|
||||||
public class YbDrug implements Serializable {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 统一社会信用代码
|
|
||||||
*/
|
|
||||||
@TableField(value = "businessLicense")
|
|
||||||
private String businessLicense;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 公司名称
|
|
||||||
*/
|
|
||||||
@TableField(value = "companyNameSc")
|
|
||||||
private String companyNameSc;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 注批准文号
|
|
||||||
*/
|
|
||||||
@TableField(value = "approvalCode")
|
|
||||||
private String approvalCode;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 药品本位码
|
|
||||||
*/
|
|
||||||
@TableField(value = "goodsStandardCode")
|
|
||||||
private String goodsStandardCode;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* baseId
|
|
||||||
*/
|
|
||||||
@TableField(value = "baseId")
|
|
||||||
private String baseId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 产品名
|
|
||||||
*/
|
|
||||||
@TableField(value = "productName")
|
|
||||||
private String productName;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 产品分类码
|
|
||||||
*/
|
|
||||||
@TableField(value = "productMedicinemodel")
|
|
||||||
private String productMedicinemodel;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 注册名称
|
|
||||||
*/
|
|
||||||
@TableField(value = "registeredProductName")
|
|
||||||
private String registeredProductName;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 药品企业
|
|
||||||
*/
|
|
||||||
@TableField(value = "listingHolder")
|
|
||||||
private String listingHolder;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 注册剂型
|
|
||||||
*/
|
|
||||||
@TableField(value = "registeredMedicinemodel")
|
|
||||||
private String registeredMedicinemodel;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 最小制剂单位
|
|
||||||
*/
|
|
||||||
@TableField(value = "minUnit")
|
|
||||||
private String minUnit;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 最小包装数量
|
|
||||||
*/
|
|
||||||
@TableField(value = "factor")
|
|
||||||
private Integer factor;
|
|
||||||
|
|
||||||
@TableField(value = "goodsName")
|
|
||||||
private String goodsName;
|
|
||||||
|
|
||||||
@TableField(value = "dataSouce")
|
|
||||||
private String dataSouce;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 规格
|
|
||||||
*/
|
|
||||||
@TableField(value = "realityOutlook")
|
|
||||||
private String realityOutlook;
|
|
||||||
|
|
||||||
@TableField(value = "productRemark")
|
|
||||||
private String productRemark;
|
|
||||||
|
|
||||||
@TableField(value = "subpackager")
|
|
||||||
private String subpackager;
|
|
||||||
|
|
||||||
@TableField(value = "version")
|
|
||||||
private String version;
|
|
||||||
|
|
||||||
@TableField(value = "productInsuranceType")
|
|
||||||
private String productInsuranceType;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 剂型
|
|
||||||
*/
|
|
||||||
@TableField(value = "realityMedicinemodel")
|
|
||||||
private String realityMedicinemodel;
|
|
||||||
|
|
||||||
@TableField(value = "marketState")
|
|
||||||
private String marketState;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 包装材质
|
|
||||||
*/
|
|
||||||
@TableField(value = "materialName")
|
|
||||||
private String materialName;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 最小包装单位
|
|
||||||
*/
|
|
||||||
@TableField(value = "unit")
|
|
||||||
private String unit;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 注册规格
|
|
||||||
*/
|
|
||||||
@TableField(value = "registeredOutlook")
|
|
||||||
private String registeredOutlook;
|
|
||||||
|
|
||||||
@TableField(value = "productCode")
|
|
||||||
private String productCode;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 药品代码
|
|
||||||
*/
|
|
||||||
@TableField(value = "goodsCode")
|
|
||||||
private String goodsCode;
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
@ -0,0 +1,18 @@
|
|||||||
|
package com.glxp.udidl.admin.req.udid;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
@Builder
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
@Data
|
||||||
|
public class DeviceV3Request {
|
||||||
|
|
||||||
|
private String dataType;
|
||||||
|
private String rangeValue;
|
||||||
|
private Integer currentPageNumber;
|
||||||
|
private String ZXXSDYCPBS;
|
||||||
|
}
|
@ -1,29 +1,14 @@
|
|||||||
package com.glxp.udidl.admin.req.udid;
|
package com.glxp.udidl.admin.req.udid;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
public class DownloadDiRequest {
|
public class DownloadDiRequest {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* accessToken : 70ACE0818B99E99D10046C6AAA6271109A0FD7643D57E0B4E4936E271757EF79F905F86F4492CC6C4388019B0AB925927216652B7D17090B794A9F34B10CD3B101A09182AF0AC9313FF8436964D5AF47E1600795405BCF94
|
* accessToken : 70ACE0818B99E99D10046C6AAA6271109A0FD7643D57E0B4E4936E271757EF79F905F86F4492CC6C4388019B0AB925927216652B7D17090B794A9F34B10CD3B101A09182AF0AC9313FF8436964D5AF47E1600795405BCF94
|
||||||
* primaryDeviceId : 08714729040347
|
* primaryDeviceId : 08714729040347
|
||||||
*/
|
*/
|
||||||
|
private String ZXXSDYCPBS;
|
||||||
|
|
||||||
private String accessToken;
|
|
||||||
private String primaryDeviceId;
|
|
||||||
|
|
||||||
|
|
||||||
public String getAccessToken() {
|
|
||||||
return accessToken;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setAccessToken(String accessToken) {
|
|
||||||
this.accessToken = accessToken;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getPrimaryDeviceId() {
|
|
||||||
return primaryDeviceId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setPrimaryDeviceId(String primaryDeviceId) {
|
|
||||||
this.primaryDeviceId = primaryDeviceId;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -1,112 +0,0 @@
|
|||||||
package com.glxp.udidl.admin.res.chs;
|
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.NoArgsConstructor;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@NoArgsConstructor
|
|
||||||
@Data
|
|
||||||
public class YbDrugResponse {
|
|
||||||
|
|
||||||
@JsonProperty("records")
|
|
||||||
private Integer records;
|
|
||||||
@JsonProperty("total")
|
|
||||||
private Integer total;
|
|
||||||
@JsonProperty("rows")
|
|
||||||
private List<RowsDTO> rows;
|
|
||||||
@JsonProperty("page")
|
|
||||||
private Integer page;
|
|
||||||
@JsonProperty("count")
|
|
||||||
private Integer count;
|
|
||||||
@JsonProperty("firstResult")
|
|
||||||
private Integer firstResult;
|
|
||||||
@JsonProperty("maxResults")
|
|
||||||
private Integer maxResults;
|
|
||||||
@JsonProperty("success")
|
|
||||||
private Boolean success;
|
|
||||||
@JsonProperty("result")
|
|
||||||
private String result;
|
|
||||||
@JsonProperty("conditions")
|
|
||||||
private ConditionsDTO conditions;
|
|
||||||
@JsonProperty("msg")
|
|
||||||
private String msg;
|
|
||||||
@JsonProperty("form")
|
|
||||||
private String form;
|
|
||||||
@JsonProperty("code")
|
|
||||||
private Integer code;
|
|
||||||
@JsonProperty("operCount")
|
|
||||||
private Integer operCount;
|
|
||||||
@JsonProperty("sord")
|
|
||||||
private String sord;
|
|
||||||
@JsonProperty("sidx")
|
|
||||||
private String sidx;
|
|
||||||
@JsonProperty("orderby")
|
|
||||||
private String orderby;
|
|
||||||
|
|
||||||
@NoArgsConstructor
|
|
||||||
@Data
|
|
||||||
public static class ConditionsDTO {
|
|
||||||
@JsonProperty("orderColumn")
|
|
||||||
private Integer orderColumn;
|
|
||||||
}
|
|
||||||
|
|
||||||
@NoArgsConstructor
|
|
||||||
@Data
|
|
||||||
public static class RowsDTO {
|
|
||||||
@JsonProperty("businessLicense")
|
|
||||||
private String businessLicense;
|
|
||||||
@JsonProperty("companyNameSc")
|
|
||||||
private String companyNameSc;
|
|
||||||
@JsonProperty("approvalCode")
|
|
||||||
private String approvalCode;
|
|
||||||
@JsonProperty("goodsStandardCode")
|
|
||||||
private String goodsStandardCode;
|
|
||||||
@JsonProperty("baseId")
|
|
||||||
private String baseId;
|
|
||||||
@JsonProperty("productName")
|
|
||||||
private String productName;
|
|
||||||
@JsonProperty("productMedicinemodel")
|
|
||||||
private String productMedicinemodel;
|
|
||||||
@JsonProperty("registeredProductName")
|
|
||||||
private String registeredProductName;
|
|
||||||
@JsonProperty("listingHolder")
|
|
||||||
private String listingHolder;
|
|
||||||
@JsonProperty("registeredMedicinemodel")
|
|
||||||
private String registeredMedicinemodel;
|
|
||||||
@JsonProperty("minUnit")
|
|
||||||
private String minUnit;
|
|
||||||
@JsonProperty("factor")
|
|
||||||
private Integer factor;
|
|
||||||
@JsonProperty("goodsName")
|
|
||||||
private String goodsName;
|
|
||||||
@JsonProperty("dataSouce")
|
|
||||||
private String dataSouce;
|
|
||||||
@JsonProperty("realityOutlook")
|
|
||||||
private String realityOutlook;
|
|
||||||
@JsonProperty("productRemark")
|
|
||||||
private String productRemark;
|
|
||||||
@JsonProperty("subpackager")
|
|
||||||
private String subpackager;
|
|
||||||
@JsonProperty("version")
|
|
||||||
private String version;
|
|
||||||
@JsonProperty("productInsuranceType")
|
|
||||||
private String productInsuranceType;
|
|
||||||
@JsonProperty("realityMedicinemodel")
|
|
||||||
private String realityMedicinemodel;
|
|
||||||
@JsonProperty("marketState")
|
|
||||||
private String marketState;
|
|
||||||
@JsonProperty("materialName")
|
|
||||||
private String materialName;
|
|
||||||
@JsonProperty("unit")
|
|
||||||
private String unit;
|
|
||||||
@JsonProperty("registeredOutlook")
|
|
||||||
private String registeredOutlook;
|
|
||||||
@JsonProperty("productCode")
|
|
||||||
private String productCode;
|
|
||||||
@JsonProperty("goodsCode")
|
|
||||||
private String goodsCode;
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,54 +0,0 @@
|
|||||||
package com.glxp.udidl.admin.service.chsapi;
|
|
||||||
|
|
||||||
import cn.hutool.core.bean.BeanUtil;
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
||||||
import com.glxp.udidl.admin.dao.chs.YbDrugMapper;
|
|
||||||
import com.glxp.udidl.admin.dao.chs.YbHcflMapper;
|
|
||||||
import com.glxp.udidl.admin.entity.chs.YbDrug;
|
|
||||||
import com.glxp.udidl.admin.entity.chs.YbHcflEntity;
|
|
||||||
import com.glxp.udidl.admin.res.chs.YbDrugResponse;
|
|
||||||
import com.glxp.udidl.admin.res.chs.YbHcflResponse;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@Service
|
|
||||||
public class ChsYbDrugService extends ServiceImpl<YbDrugMapper, YbDrug> {
|
|
||||||
|
|
||||||
@Resource
|
|
||||||
ChsYbChsHttpClient ybChsHttpClient;
|
|
||||||
@Resource
|
|
||||||
YbDrugMapper ybDrugMapper;
|
|
||||||
|
|
||||||
|
|
||||||
public void updateDrugList(){
|
|
||||||
Integer pageNum = 1;
|
|
||||||
Integer pageSize = 200;
|
|
||||||
|
|
||||||
//1、获取数据
|
|
||||||
YbDrugResponse ybDrugResponse = ybChsHttpClient.getYbDrugList(pageNum, pageSize,null);
|
|
||||||
Integer total = ybDrugResponse.getTotal();
|
|
||||||
//处理第一批数据
|
|
||||||
processUpdates(ybDrugResponse);
|
|
||||||
//处理后续数据
|
|
||||||
if (total>pageNum){
|
|
||||||
for (int i = 2; i <= total ; i++) {
|
|
||||||
System.out.println("更新数据库的YbDrug列表数据"+ i);
|
|
||||||
processUpdates(ybChsHttpClient.getYbDrugList(i, pageSize,null));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 处理比对更新
|
|
||||||
* @param ybDrugResponse
|
|
||||||
*/
|
|
||||||
private void processUpdates(YbDrugResponse ybDrugResponse) {
|
|
||||||
List<YbDrugResponse.RowsDTO> list = ybDrugResponse.getRows();
|
|
||||||
List<YbDrug> ybHcflEntities = BeanUtil.copyToList(list, YbDrug.class);
|
|
||||||
ybDrugMapper.batchSaveOrUpdateByGoodsCode(ybHcflEntities);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
@ -1,8 +0,0 @@
|
|||||||
package com.glxp.udidl.admin.service.udchs;
|
|
||||||
|
|
||||||
import com.glxp.udidl.admin.dto.udchs.BaseParam;
|
|
||||||
import com.glxp.udidl.admin.res.BaseResponse;
|
|
||||||
|
|
||||||
public interface YbDrugService {
|
|
||||||
BaseResponse getList(BaseParam param);
|
|
||||||
}
|
|
@ -1,62 +0,0 @@
|
|||||||
package com.glxp.udidl.admin.service.udchs.impl;
|
|
||||||
|
|
||||||
|
|
||||||
import cn.hutool.core.bean.BeanUtil;
|
|
||||||
import cn.hutool.core.collection.CollUtil;
|
|
||||||
import cn.hutool.core.util.StrUtil;
|
|
||||||
import com.github.pagehelper.PageHelper;
|
|
||||||
import com.github.pagehelper.PageInfo;
|
|
||||||
import com.glxp.udidl.admin.dao.chs.YbDrugMapper;
|
|
||||||
import com.glxp.udidl.admin.dao.chs.YbHcflMapper;
|
|
||||||
import com.glxp.udidl.admin.dto.udchs.BaseParam;
|
|
||||||
import com.glxp.udidl.admin.entity.chs.YbDrug;
|
|
||||||
import com.glxp.udidl.admin.entity.chs.YbHcflEntity;
|
|
||||||
import com.glxp.udidl.admin.res.BaseResponse;
|
|
||||||
import com.glxp.udidl.admin.res.PageSimpleResponse;
|
|
||||||
import com.glxp.udidl.admin.res.chs.YbDrugResponse;
|
|
||||||
import com.glxp.udidl.admin.service.chsapi.ChsYbChsHttpClient;
|
|
||||||
import com.glxp.udidl.admin.service.udchs.YbDrugService;
|
|
||||||
import com.glxp.udidl.admin.service.udchs.YbHcflService;
|
|
||||||
import com.glxp.udidl.admin.util.ResultVOUtils;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@Service
|
|
||||||
public class YbDrugServiceImpl implements YbDrugService {
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private YbDrugMapper mapper;
|
|
||||||
@Resource
|
|
||||||
ChsYbChsHttpClient ybChsHttpClient;
|
|
||||||
@Resource
|
|
||||||
YbDrugMapper ybDrugMapper;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public BaseResponse getList(BaseParam param) {
|
|
||||||
PageHelper.startPage(param.getPage(), param.getLimit());
|
|
||||||
List<YbDrug> list = mapper.list(param);
|
|
||||||
PageInfo<YbDrug> pageInfo = new PageInfo<>(list);
|
|
||||||
PageSimpleResponse<YbDrug> pageSimpleResponse = new PageSimpleResponse<>();
|
|
||||||
if (CollUtil.isEmpty(list)){
|
|
||||||
String goodsCode = param.getGoodsCode();
|
|
||||||
if (StrUtil.isNotBlank(goodsCode)){
|
|
||||||
YbDrugResponse ybDrugResponse = ybChsHttpClient.getYbDrugList(1, 1,goodsCode);
|
|
||||||
List<YbDrugResponse.RowsDTO> lists = ybDrugResponse.getRows();
|
|
||||||
List<YbDrug> ybHcflEntities = BeanUtil.copyToList(lists, YbDrug.class);
|
|
||||||
ybDrugMapper.batchSaveOrUpdateByGoodsCode(ybHcflEntities);
|
|
||||||
pageSimpleResponse.setTotal(Long.valueOf(lists.size()));
|
|
||||||
pageSimpleResponse.setList(ybHcflEntities);
|
|
||||||
}else {
|
|
||||||
pageSimpleResponse.setTotal(pageInfo.getTotal());
|
|
||||||
pageSimpleResponse.setList(list);
|
|
||||||
}
|
|
||||||
}else {
|
|
||||||
pageSimpleResponse.setTotal(pageInfo.getTotal());
|
|
||||||
pageSimpleResponse.setList(list);
|
|
||||||
}
|
|
||||||
return ResultVOUtils.success(pageSimpleResponse);
|
|
||||||
}
|
|
||||||
}
|
|
@ -0,0 +1,10 @@
|
|||||||
|
package com.glxp.udidl.admin.service.udi;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.glxp.udidl.admin.dao.udi.DiProductMapper;
|
||||||
|
import com.glxp.udidl.admin.entity.udi.DiProductEntity;
|
||||||
|
@Service
|
||||||
|
public class DiProductService extends ServiceImpl<DiProductMapper, DiProductEntity> {
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,10 @@
|
|||||||
|
package com.glxp.udidl.admin.service.udi;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.glxp.udidl.admin.entity.udi.DiProductSpecEntity;
|
||||||
|
import com.glxp.udidl.admin.dao.udi.DiProductSpecMapper;
|
||||||
|
@Service
|
||||||
|
public class DiProductSpecService extends ServiceImpl<DiProductSpecMapper, DiProductSpecEntity> {
|
||||||
|
|
||||||
|
}
|
@ -1,135 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
||||||
<mapper namespace="com.glxp.udidl.admin.dao.chs.YbDrugMapper">
|
|
||||||
|
|
||||||
<!-- 自定义批量保存数据-->
|
|
||||||
<insert id="batchSaveOrUpdateByGoodsCode" parameterType="int">
|
|
||||||
INSERT INTO
|
|
||||||
yb_drug
|
|
||||||
(
|
|
||||||
businessLicense,
|
|
||||||
companyNameSc,
|
|
||||||
approvalCode,
|
|
||||||
goodsStandardCode,
|
|
||||||
baseId,
|
|
||||||
productName,
|
|
||||||
productMedicinemodel,
|
|
||||||
registeredProductName,
|
|
||||||
listingHolder,
|
|
||||||
registeredMedicinemodel,
|
|
||||||
minUnit,
|
|
||||||
factor,
|
|
||||||
goodsName,
|
|
||||||
dataSouce,
|
|
||||||
realityOutlook,
|
|
||||||
productRemark,
|
|
||||||
subpackager,
|
|
||||||
version,
|
|
||||||
productInsuranceType,
|
|
||||||
realityMedicinemodel,
|
|
||||||
marketState,
|
|
||||||
materialName,
|
|
||||||
unit,
|
|
||||||
registeredOutlook,
|
|
||||||
productCode,
|
|
||||||
goodsCode
|
|
||||||
)
|
|
||||||
VALUES
|
|
||||||
<foreach collection="list" item="item" separator=",">
|
|
||||||
(
|
|
||||||
#{item.businessLicense},
|
|
||||||
#{item.companyNameSc},
|
|
||||||
#{item.approvalCode},
|
|
||||||
#{item.goodsStandardCode},
|
|
||||||
#{item.baseId},
|
|
||||||
#{item.productName},
|
|
||||||
#{item.productMedicinemodel},
|
|
||||||
#{item.registeredProductName},
|
|
||||||
#{item.listingHolder},
|
|
||||||
#{item.registeredMedicinemodel},
|
|
||||||
#{item.minUnit},
|
|
||||||
#{item.factor},
|
|
||||||
#{item.goodsName},
|
|
||||||
#{item.dataSouce},
|
|
||||||
#{item.realityOutlook},
|
|
||||||
#{item.productRemark},
|
|
||||||
#{item.subpackager},
|
|
||||||
#{item.version},
|
|
||||||
#{item.productInsuranceType},
|
|
||||||
#{item.realityMedicinemodel},
|
|
||||||
#{item.marketState},
|
|
||||||
#{item.materialName},
|
|
||||||
#{item.unit},
|
|
||||||
#{item.registeredOutlook},
|
|
||||||
#{item.productCode},
|
|
||||||
#{item.goodsCode}
|
|
||||||
)
|
|
||||||
</foreach>
|
|
||||||
ON DUPLICATE KEY UPDATE
|
|
||||||
businessLicense = VALUES(businessLicense),
|
|
||||||
companyNameSc = VALUES(companyNameSc),
|
|
||||||
approvalCode = VALUES(approvalCode),
|
|
||||||
goodsStandardCode = VALUES(goodsStandardCode),
|
|
||||||
baseId = VALUES(baseId),
|
|
||||||
productName = VALUES(productName),
|
|
||||||
productMedicinemodel = VALUES(productMedicinemodel),
|
|
||||||
registeredProductName = VALUES(registeredProductName),
|
|
||||||
listingHolder= VALUES(listingHolder),
|
|
||||||
registeredMedicinemodel = VALUES(registeredMedicinemodel),
|
|
||||||
minUnit = VALUES(minUnit),
|
|
||||||
factor = VALUES(factor),
|
|
||||||
goodsName = VALUES(goodsName),
|
|
||||||
dataSouce = VALUES(dataSouce),
|
|
||||||
realityOutlook = VALUES(realityOutlook),
|
|
||||||
productRemark = VALUES(productRemark),
|
|
||||||
subpackager = VALUES(subpackager),
|
|
||||||
version = VALUES(version),
|
|
||||||
productInsuranceType = VALUES(productInsuranceType),
|
|
||||||
realityMedicinemodel = VALUES(realityMedicinemodel),
|
|
||||||
marketState = VALUES(marketState),
|
|
||||||
materialName = VALUES(materialName),
|
|
||||||
unit = VALUES(unit),
|
|
||||||
registeredOutlook = VALUES(registeredOutlook),
|
|
||||||
productCode = VALUES(productCode),
|
|
||||||
goodsCode = VALUES(goodsCode)
|
|
||||||
</insert>
|
|
||||||
|
|
||||||
|
|
||||||
<select id="list" resultType="com.glxp.udidl.admin.entity.chs.YbDrug" parameterType="com.glxp.udidl.admin.dto.udchs.BaseParam">
|
|
||||||
select
|
|
||||||
businessLicense,
|
|
||||||
companyNameSc,
|
|
||||||
approvalCode,
|
|
||||||
goodsStandardCode,
|
|
||||||
baseId,
|
|
||||||
productName,
|
|
||||||
productMedicinemodel,
|
|
||||||
registeredProductName,
|
|
||||||
listingHolder,
|
|
||||||
registeredMedicinemodel,
|
|
||||||
minUnit,
|
|
||||||
factor,
|
|
||||||
goodsName,
|
|
||||||
dataSouce,
|
|
||||||
realityOutlook,
|
|
||||||
productRemark,
|
|
||||||
subpackager,
|
|
||||||
version,
|
|
||||||
productInsuranceType,
|
|
||||||
realityMedicinemodel,
|
|
||||||
marketState,
|
|
||||||
materialName,
|
|
||||||
unit,
|
|
||||||
registeredOutlook,
|
|
||||||
productCode,
|
|
||||||
goodsCode
|
|
||||||
from yb_drug
|
|
||||||
<where>
|
|
||||||
<if test="goodsCode != '' and goodsCode != null">
|
|
||||||
and goodsCode like concat(#{goodsCode},'%')
|
|
||||||
</if>
|
|
||||||
</where>
|
|
||||||
order by goodsCode DESC
|
|
||||||
</select>
|
|
||||||
|
|
||||||
</mapper>
|
|
@ -0,0 +1,26 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.glxp.udidl.admin.dao.udi.DiProductMapper">
|
||||||
|
<resultMap id="BaseResultMap" type="com.glxp.udidl.admin.entity.udi.DiProductEntity">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
<!--@Table di_product-->
|
||||||
|
<id column="id" jdbcType="INTEGER" property="id" />
|
||||||
|
<result column="key" jdbcType="BIGINT" property="key" />
|
||||||
|
<result column="cpmctymc" jdbcType="VARCHAR" property="cpmctymc" />
|
||||||
|
<result column="flbm" jdbcType="VARCHAR" property="flbm" />
|
||||||
|
<result column="tyshxydm" jdbcType="VARCHAR" property="tyshxydm" />
|
||||||
|
<result column="ylqxzcrbarmc" jdbcType="VARCHAR" property="ylqxzcrbarmc" />
|
||||||
|
<result column="ylqxzcrbarywmc" jdbcType="VARCHAR" property="ylqxzcrbarywmc" />
|
||||||
|
<result column="spmc" jdbcType="VARCHAR" property="spmc" />
|
||||||
|
<result column="cplx" jdbcType="VARCHAR" property="cplx" />
|
||||||
|
<result column="hchzsb" jdbcType="VARCHAR" property="hchzsb" />
|
||||||
|
<result column="remark" jdbcType="VARCHAR" property="remark" />
|
||||||
|
<result column="createTime" jdbcType="TIMESTAMP" property="createTime" />
|
||||||
|
<result column="updateTime" jdbcType="TIMESTAMP" property="updateTime" />
|
||||||
|
</resultMap>
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
id, `key`, cpmctymc, flbm, tyshxydm, ylqxzcrbarmc, ylqxzcrbarywmc, spmc, cplx, hchzsb,
|
||||||
|
remark, createTime, updateTime
|
||||||
|
</sql>
|
||||||
|
</mapper>
|
@ -0,0 +1,49 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.glxp.udidl.admin.dao.udi.DiProductSpecMapper">
|
||||||
|
<resultMap id="BaseResultMap" type="com.glxp.udidl.admin.entity.udi.DiProductSpecEntity">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
<!--@Table di_product_spec-->
|
||||||
|
<id column="id" jdbcType="INTEGER" property="id" />
|
||||||
|
<result column="key" jdbcType="BIGINT" property="key" />
|
||||||
|
<result column="productKey" jdbcType="BIGINT" property="productKey" />
|
||||||
|
<result column="deviceRecordKey" jdbcType="VARCHAR" property="deviceRecordKey" />
|
||||||
|
<result column="zxxsdycpbs" jdbcType="VARCHAR" property="zxxsdycpbs" />
|
||||||
|
<result column="ggxh" jdbcType="VARCHAR" property="ggxh" />
|
||||||
|
<result column="sydycpbs" jdbcType="VARCHAR" property="sydycpbs" />
|
||||||
|
<result column="versionNumber" jdbcType="INTEGER" property="versionNumber" />
|
||||||
|
<result column="ybbm" jdbcType="VARCHAR" property="ybbm" />
|
||||||
|
<result column="scbssfbhph" jdbcType="VARCHAR" property="scbssfbhph" />
|
||||||
|
<result column="scbssfbhxlh" jdbcType="VARCHAR" property="scbssfbhxlh" />
|
||||||
|
<result column="scbssfbhscrq" jdbcType="VARCHAR" property="scbssfbhscrq" />
|
||||||
|
<result column="scbssfbhsxrq" jdbcType="VARCHAR" property="scbssfbhsxrq" />
|
||||||
|
<result column="cpms" jdbcType="LONGVARCHAR" property="cpms" />
|
||||||
|
<result column="sfwblztlcp" jdbcType="VARCHAR" property="sfwblztlcp" />
|
||||||
|
<result column="cgzmraqxgxx" jdbcType="VARCHAR" property="cgzmraqxgxx" />
|
||||||
|
<result column="sfbjwycxsy" jdbcType="VARCHAR" property="sfbjwycxsy" />
|
||||||
|
<result column="qtxxdwzlj" jdbcType="VARCHAR" property="qtxxdwzlj" />
|
||||||
|
<result column="tscchcztj" jdbcType="VARCHAR" property="tscchcztj" />
|
||||||
|
<result column="tsccsm" jdbcType="VARCHAR" property="tsccsm" />
|
||||||
|
<result column="tsrq" jdbcType="VARCHAR" property="tsrq" />
|
||||||
|
<result column="bszt" jdbcType="VARCHAR" property="bszt" />
|
||||||
|
<result column="cpbsfbrq" jdbcType="VARCHAR" property="cpbsfbrq" />
|
||||||
|
<result column="btcpbs" jdbcType="VARCHAR" property="btcpbs" />
|
||||||
|
<result column="sfyzcbayz" jdbcType="VARCHAR" property="sfyzcbayz" />
|
||||||
|
<result column="cpbsbmtxmc" jdbcType="VARCHAR" property="cpbsbmtxmc" />
|
||||||
|
<result column="zdcfsycs" jdbcType="VARCHAR" property="zdcfsycs" />
|
||||||
|
<result column="sfwwjbz" jdbcType="VARCHAR" property="sfwwjbz" />
|
||||||
|
<result column="syqsfxyjxmj" jdbcType="VARCHAR" property="syqsfxyjxmj" />
|
||||||
|
<result column="mjfs" jdbcType="VARCHAR" property="mjfs" />
|
||||||
|
<result column="hchzsb" jdbcType="VARCHAR" property="hchzsb" />
|
||||||
|
<result column="remark" jdbcType="VARCHAR" property="remark" />
|
||||||
|
<result column="createTime" jdbcType="TIMESTAMP" property="createTime" />
|
||||||
|
<result column="udpateTime" jdbcType="TIMESTAMP" property="udpateTime" />
|
||||||
|
</resultMap>
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
id, `key`, productKey, deviceRecordKey, zxxsdycpbs, ggxh, sydycpbs, versionNumber,
|
||||||
|
ybbm, scbssfbhph, scbssfbhxlh, scbssfbhscrq, scbssfbhsxrq, cpms, sfwblztlcp, cgzmraqxgxx,
|
||||||
|
sfbjwycxsy, qtxxdwzlj, tscchcztj, tsccsm, tsrq, bszt, cpbsfbrq, btcpbs, sfyzcbayz,
|
||||||
|
cpbsbmtxmc, zdcfsycs, sfwwjbz, syqsfxyjxmj, mjfs, hchzsb, remark, createTime, udpateTime
|
||||||
|
</sql>
|
||||||
|
</mapper>
|
Loading…
Reference in New Issue