diff --git a/src/main/java/com/syjiaer/clinic/server/entity/social/SocialDirectoryLimit.java b/src/main/java/com/syjiaer/clinic/server/entity/social/SocialDirectoryLimit.java index c5c40e4..d48bfa5 100644 --- a/src/main/java/com/syjiaer/clinic/server/entity/social/SocialDirectoryLimit.java +++ b/src/main/java/com/syjiaer/clinic/server/entity/social/SocialDirectoryLimit.java @@ -6,6 +6,8 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.Serializable; import java.math.BigDecimal; +import java.math.BigInteger; + import lombok.Getter; import lombok.Setter; import lombok.ToString; @@ -33,7 +35,7 @@ public class SocialDirectoryLimit implements Serializable { private String code; @ApiModelProperty("医保自增主键") - private BigDecimal rid; + private BigInteger rid; @ApiModelProperty("医保目录限价类型") private String hilistLmtpricType; diff --git a/src/main/java/com/syjiaer/clinic/server/entity/social/SocialDirectorySelf.java b/src/main/java/com/syjiaer/clinic/server/entity/social/SocialDirectorySelf.java index bdf6e2b..e26f2cf 100644 --- a/src/main/java/com/syjiaer/clinic/server/entity/social/SocialDirectorySelf.java +++ b/src/main/java/com/syjiaer/clinic/server/entity/social/SocialDirectorySelf.java @@ -6,6 +6,8 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.Serializable; import java.math.BigDecimal; +import java.math.BigInteger; + import lombok.Getter; import lombok.Setter; import lombok.ToString; @@ -33,7 +35,7 @@ public class SocialDirectorySelf implements Serializable { private String code; @ApiModelProperty("医保中心主键") - private BigDecimal rid; + private BigInteger rid; @ApiModelProperty("自付比例") private String selfpayPropType; diff --git a/src/main/java/com/syjiaer/clinic/server/entity/social/SocialDirectoryUpinfo.java b/src/main/java/com/syjiaer/clinic/server/entity/social/SocialDirectoryUpinfo.java index 2e5fcfc..ff532d7 100644 --- a/src/main/java/com/syjiaer/clinic/server/entity/social/SocialDirectoryUpinfo.java +++ b/src/main/java/com/syjiaer/clinic/server/entity/social/SocialDirectoryUpinfo.java @@ -5,6 +5,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.Serializable; import java.math.BigDecimal; +import java.math.BigInteger; import java.time.LocalDateTime; import lombok.Getter; import lombok.Setter; @@ -53,5 +54,5 @@ public class SocialDirectoryUpinfo implements Serializable { private String pinyin; @ApiModelProperty("唯一记录号") - private BigDecimal rid; + private BigInteger rid; } diff --git a/src/main/java/com/syjiaer/clinic/server/entity/social/SocialRequestLog.java b/src/main/java/com/syjiaer/clinic/server/entity/social/SocialRequestLog.java new file mode 100644 index 0000000..c192796 --- /dev/null +++ b/src/main/java/com/syjiaer/clinic/server/entity/social/SocialRequestLog.java @@ -0,0 +1,48 @@ +package com.syjiaer.clinic.server.entity.social; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Getter; +import lombok.Setter; +import lombok.ToString; +import lombok.experimental.Accessors; + +import java.io.Serializable; +import java.time.LocalDateTime; + +/** + *

+ * + *

+ * + * @author NiuZiYuan + * @since 2025-03-14 + */ +@Getter +@Setter +@ToString +@Accessors(chain = true) +@TableName("social_request_log") +@ApiModel(value = "SocialRequestLog对象", description = "") +public class SocialRequestLog implements Serializable { + + private static final long serialVersionUID = 1L; + @TableId(value = "id", type = IdType.AUTO) + @ApiModelProperty("主键") + private Integer id; + + + @ApiModelProperty("入参") + private String input; + + @ApiModelProperty("出参") + private String output; + + @ApiModelProperty("创建时间") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private LocalDateTime createDatetime; +} diff --git a/src/main/java/com/syjiaer/clinic/server/entity/social/SocialUser.java b/src/main/java/com/syjiaer/clinic/server/entity/social/SocialUser.java new file mode 100644 index 0000000..b7c0f18 --- /dev/null +++ b/src/main/java/com/syjiaer/clinic/server/entity/social/SocialUser.java @@ -0,0 +1,59 @@ +package com.syjiaer.clinic.server.entity.social; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Getter; +import lombok.Setter; +import lombok.ToString; +import lombok.experimental.Accessors; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.time.LocalDate; + +/** + *

+ * + *

+ * + * @author NiuZiYuan + * @since 2025-04-03 + */ +@Getter +@Setter +@ToString +@Accessors(chain = true) +@TableName("social_user") +@ApiModel(value = "SocialUser对象", description = "") +public class SocialUser implements Serializable { + + private static final long serialVersionUID = 1L; + + @ApiModelProperty("id") + @TableId(value = "id", type = IdType.AUTO) + private Integer id; + + @ApiModelProperty("人员编号") + private String psnNo; + + @ApiModelProperty("人员证件类型") + private String psnCertType; + + @ApiModelProperty("证件号码") + private String certno; + + @ApiModelProperty("人员姓名") + private String psnName; + + @ApiModelProperty("民族") + private String naty; + + @ApiModelProperty("出生年月") + private LocalDate brdy; + + @ApiModelProperty("年龄") + private BigDecimal age; +} diff --git a/src/main/java/com/syjiaer/clinic/server/mapper/social/SocialUserMapper.java b/src/main/java/com/syjiaer/clinic/server/mapper/social/SocialUserMapper.java new file mode 100644 index 0000000..cda5a7f --- /dev/null +++ b/src/main/java/com/syjiaer/clinic/server/mapper/social/SocialUserMapper.java @@ -0,0 +1,18 @@ +package com.syjiaer.clinic.server.mapper.social; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.syjiaer.clinic.server.entity.social.SocialUser; + + +/** + *

+ * Mapper 接口 + *

+ * + * @author NiuZiYuan + * @since 2025-04-01 + */ +public interface SocialUserMapper extends BaseMapper { + +} + diff --git a/src/main/java/com/syjiaer/clinic/server/service/social/SocialDirectoryLimitService.java b/src/main/java/com/syjiaer/clinic/server/service/social/SocialDirectoryLimitService.java new file mode 100644 index 0000000..6be362c --- /dev/null +++ b/src/main/java/com/syjiaer/clinic/server/service/social/SocialDirectoryLimitService.java @@ -0,0 +1,63 @@ +package com.syjiaer.clinic.server.service.social; + +import com.syjiaer.clinic.server.common.api.input.IM1318; +import com.syjiaer.clinic.server.common.api.output.OM1318; +import com.syjiaer.clinic.server.common.api.request.SocialRequest; +import com.syjiaer.clinic.server.common.exception.MessageException; +import com.syjiaer.clinic.server.entity.social.SocialDirectoryLimit; +import com.syjiaer.clinic.server.mapper.social.SocialDirectoryLimitMapper; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.math.BigDecimal; +import java.math.BigInteger; +import java.time.LocalDateTime; +import java.time.format.DateTimeFormatter; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +@Service +public class SocialDirectoryLimitService { + @Autowired + private SocialRequest socialRequest; + @Autowired + private SocialDirectoryLimitMapper socialDirectoryLimitMapper; + public Map getInfo(String updtTime, int page) { + if (updtTime == null || updtTime.trim().isEmpty()) { + // 处理参数为空的情况,这里假设返回一个错误结果 + throw new MessageException("参数 updt_time 不能为空"); + } + IM1318 im1318 = new IM1318(); + System.out.println("正在处理第" + page + "页"); + DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"); + im1318.setUpdtTime(LocalDateTime.parse(updtTime, formatter)); + im1318.setValiFlag("1"); + im1318.setPageNum(page); + im1318.setPageSize(1000); + OM1318 om1318 = socialRequest.call1318(im1318); + System.out.println(1 + "/" + om1318.getPages()); + List> data = om1318.getData(); + for (Map datum : data) { + SocialDirectoryLimit socialDirectoryLimit = new SocialDirectoryLimit(); + socialDirectoryLimit.setRid(new BigInteger(datum.get("rid").toString())); + socialDirectoryLimit.setCode(datum.get("hilist_code").toString()); + socialDirectoryLimit.setHilistLmtpricType(datum.get("hilist_lmtpric_type").toString()); + socialDirectoryLimit.setHilistPricUplmtAmt(new BigDecimal(datum.get("hilist_pric_uplmt_amt").toString())); + String code = socialDirectoryLimit.getCode(); + SocialDirectoryLimit directoryLimit = socialDirectoryLimitMapper.selectById(code); + if (directoryLimit == null) { + socialDirectoryLimitMapper.insert(socialDirectoryLimit); + } else { + BigInteger newRid = socialDirectoryLimit.getRid(); + BigInteger oldRid = directoryLimit.getRid(); + if (newRid.compareTo(oldRid) > 0) { + socialDirectoryLimitMapper.updateById(socialDirectoryLimit); + } + } + } + Map map = new HashMap<>(); + map.put("pages", om1318.getPages()); + return map; + } +} diff --git a/src/main/java/com/syjiaer/clinic/server/service/social/SocialDirectorySelfService.java b/src/main/java/com/syjiaer/clinic/server/service/social/SocialDirectorySelfService.java new file mode 100644 index 0000000..eba844b --- /dev/null +++ b/src/main/java/com/syjiaer/clinic/server/service/social/SocialDirectorySelfService.java @@ -0,0 +1,63 @@ +package com.syjiaer.clinic.server.service.social; + +import com.syjiaer.clinic.server.common.api.input.IM1319; +import com.syjiaer.clinic.server.common.api.output.OM1319; +import com.syjiaer.clinic.server.common.api.request.SocialRequest; +import com.syjiaer.clinic.server.common.exception.MessageException; +import com.syjiaer.clinic.server.entity.social.SocialDirectorySelf; +import com.syjiaer.clinic.server.mapper.social.SocialDirectorySelfMapper; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.math.BigDecimal; +import java.math.BigInteger; +import java.time.LocalDateTime; +import java.time.format.DateTimeFormatter; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +@Service +public class SocialDirectorySelfService { + @Autowired + private SocialRequest socialRequest; + @Autowired + private SocialDirectorySelfMapper socialDirectorySelfMapper; + public Map getInfo(String updtTime, int page) { + if (updtTime == null) { + throw new MessageException("updtTime不能为空"); + } + IM1319 im1319 = new IM1319(); + System.out.println("正在处理第" + page + "页"); + DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"); + im1319.setUpdtTime(LocalDateTime.parse(updtTime, formatter)); + im1319.setSelfpayPropPsnType("310"); + im1319.setValiFlag("1"); + im1319.setPageNum(page); + im1319.setPageSize(1000); + OM1319 om1319 = socialRequest.call1319(im1319); + System.out.println(page + "/" + om1319.getPages()); + for (int i = 0; i < om1319.getData().size(); i++){ + SocialDirectorySelf socialDirectorySelf = new SocialDirectorySelf(); + Map map = om1319.getData().get(i); + socialDirectorySelf.setRid(new BigInteger(map.get("rid").toString())); + socialDirectorySelf.setCode(map.get("hilist_code").toString()); + socialDirectorySelf.setSelfpayPropType(map.get("selfpay_prop_type").toString()); + socialDirectorySelf.setSelfpayProp(new BigDecimal(map.get("selpay_prop").toString())); + String code = socialDirectorySelf.getCode(); + SocialDirectorySelf existingSelf = socialDirectorySelfMapper.selectById(code); + if (existingSelf == null) { + socialDirectorySelfMapper.insert(socialDirectorySelf); + } else { + BigInteger newRid = socialDirectorySelf.getRid(); + BigInteger oldRid = existingSelf.getRid(); + if (newRid.compareTo(oldRid) > 0) { + socialDirectorySelfMapper.updateById(socialDirectorySelf); + } + } + } + Map map = new HashMap<>(); + map.put("pages", om1319.getPages()); + return map; + } +} diff --git a/src/main/java/com/syjiaer/clinic/server/service/social/SocialDirectoryService.java b/src/main/java/com/syjiaer/clinic/server/service/social/SocialDirectoryService.java index d3c75f6..1e4d8ab 100644 --- a/src/main/java/com/syjiaer/clinic/server/service/social/SocialDirectoryService.java +++ b/src/main/java/com/syjiaer/clinic/server/service/social/SocialDirectoryService.java @@ -1,11 +1,14 @@ package com.syjiaer.clinic.server.service.social; +import com.alibaba.fastjson2.JSON; +import com.alibaba.fastjson2.JSONArray; import com.alibaba.fastjson2.JSONObject; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.syjiaer.clinic.server.common.config.Config; import com.syjiaer.clinic.server.common.exception.MessageException; import com.syjiaer.clinic.server.common.util.*; import com.syjiaer.clinic.server.common.vo.Page; +import com.syjiaer.clinic.server.common.vo.Result; import com.syjiaer.clinic.server.entity.social.*; import com.syjiaer.clinic.server.entity.social.dto.SocialDirectoryView; import com.syjiaer.clinic.server.mapper.social.*; @@ -13,14 +16,17 @@ import com.syjiaer.clinic.server.service.BaseService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; import java.nio.file.Files; import java.nio.file.Path; import java.time.LocalDateTime; import java.time.format.DateTimeFormatter; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; +import java.util.*; +import java.util.logging.Logger; +import java.util.stream.Collectors; @Service public class SocialDirectoryService extends BaseService { @@ -44,13 +50,19 @@ public class SocialDirectoryService extends BaseService { private SocialDirectorySelfMapper socialDirectorySelfMapper; @Autowired private SocialDirectoryVersionMapper socialDirectoryVersionMapper; + private Logger logger = Logger.getLogger(SocialDirectoryService.class.getName()); /* * 下载接口 * @param version_name 版本名称 * @param type 类型 */ - public JSONObject download(String version_name,int type){ + public Map download(String version_name, int type){ + Integer[] type_list = {1301, 1302, 1305, 1306, 1307, 1309, 1314, 1315, 1320, 1321}; + //判断type在数组中 + if (!Arrays.asList(type_list).contains(type)) { + throw new MessageException("参数type不正确"); + } Map input = new HashMap<>(); input.put("ver", version_name); String infno = String.valueOf(type); @@ -188,22 +200,130 @@ public class SocialDirectoryService extends BaseService { socialDirectoryVersion.setSize(list.size()); socialDirectoryVersion.setCreateDatetime(LocalDateTime.now()); socialDirectoryVersionMapper.insert(socialDirectoryVersion); - JSONObject result_object = new JSONObject(); - result_object.put("current_version_name", list.get(0).getVersionName()); - result_object.put("pre_version_name", version_name); - return result_object; + Map hashMap = new HashMap<>(); + hashMap.put("current_version_name", list.get(0).getVersionName()); + hashMap.put("pre_version_name", version_name); + return hashMap; } + public Map download2(String pre_version_name, int type) { + Map input = new HashMap<>(); + input.put("ver", pre_version_name); + String infno = String.valueOf(type); + logger.info("上个版本号:" + pre_version_name); + JSONObject result=null; + try { + result = httpUtil.callBackMsgId(infno,"data", input); + }catch (Exception e){ + return null; + } + if (result == null) { + throw new MessageException("获取数据失败"); + } + JSONArray jsonArray = result.getJSONArray("result"); + if (jsonArray == null || jsonArray.isEmpty()) { + throw new MessageException("获取数据失败"); + } + List code_list = new ArrayList<>(); + List socialDirectories = new ArrayList<>(); + for (int i = 0; i < jsonArray.size(); i++) { + JSONObject jsonObject = jsonArray.getJSONObject(i); + SocialDirectory socialDirectory = new SocialDirectory(); + switch (type) { + case 1361: + socialDirectory.setVersionName(jsonObject.getString("ver")); + socialDirectory.setCode(jsonObject.getString("six_code")); + socialDirectory.setName(jsonObject.getString("six_name")); + socialDirectory.setCreateDatetime(LocalDateTime.parse(jsonObject.getString("crte_time"))); + socialDirectory.setUpdateDatetime(LocalDateTime.parse(jsonObject.getString("updt_time"))); + JSONObject data1361 = new JSONObject(); + data1361.put("unique_record_number", jsonObject.getString("rid")); + data1361.put("valid_flag", jsonObject.getString("vali_flag")); + data1361.put("remarks", jsonObject.getString("memo")); + data1361.put("creation_time", jsonObject.getString("crte_time")); + data1361.put("update_time", jsonObject.getString("updt_time")); + data1361.put("diagnosis_treatment_type", jsonObject.getString("trt_type")); + socialDirectory.setData(data1361.toJSONString()); + socialDirectory.setKeyword(data1361.getString("diagnosis_treatment_type")); + break; + case 1362: + socialDirectory.setVersionName(jsonObject.getString("ver")); +// socialDirectory.setCode(jsonObject.getString("six_code")); + socialDirectory.setName(jsonObject.getString("chrgitm_name")); + socialDirectory.setCreateDatetime(LocalDateTime.parse(jsonObject.getString("crte_time"))); + socialDirectory.setUpdateDatetime(LocalDateTime.parse(jsonObject.getString("updt_time"))); + JSONObject data1362 = new JSONObject(); + data1362.put("unique_record_number", jsonObject.getString("rid")); + data1362.put("valid_flag", jsonObject.getString("vali_flag")); + data1362.put("remarks", jsonObject.getString("memo")); + data1362.put("creation_time", jsonObject.getString("crte_time")); + data1362.put("update_time", jsonObject.getString("updt_time")); + data1362.put("charge_item_attribute", jsonObject.getString("chrgitm_attr")); + socialDirectory.setData(data1362.toJSONString()); + socialDirectory.setKeyword(data1362.getString("charge_item_attribute")); + break; + case 1363: + socialDirectory.setVersionName(jsonObject.getString("ver")); + socialDirectory.setCode(jsonObject.getString("ownpay_code")); + socialDirectory.setName(jsonObject.getString("ownpay_name")); + socialDirectory.setCreateDatetime(LocalDateTime.parse(jsonObject.getString("crte_time"))); + socialDirectory.setUpdateDatetime(LocalDateTime.parse(jsonObject.getString("updt_time"))); + JSONObject data1363 = new JSONObject(); + data1363.put("unique_record_number", jsonObject.getString("rid")); + data1363.put("valid_flag", jsonObject.getString("vali_flag")); + data1363.put("remarks", jsonObject.getString("memo")); + data1363.put("creation_time", jsonObject.getString("crte_time")); + data1363.put("update_time", jsonObject.getString("updt_time")); + data1363.put("self_financing_item_category", jsonObject.getString("chrgitm_attr")); + socialDirectory.setData(data1363.toJSONString()); + socialDirectory.setKeyword(data1363.getString("self_financing_item_category")); + break; + default: + break; + } + code_list.add(socialDirectory.getCode()); + socialDirectories.add(socialDirectory); + } + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.in("code", code_list); + socialDirectoryMapper.delete(queryWrapper); + socialDirectoryMapper.insert(socialDirectories, 100); + SocialDirectoryVersion socialDirectoryVersion = new SocialDirectoryVersion(); + socialDirectoryVersion.setId(stringUtil.generateRandomId()); + socialDirectoryVersion.setType(type); + socialDirectoryVersion.setPreVersionName(pre_version_name); + String versionName = socialDirectories.get(0).getVersionName(); + socialDirectoryVersion.setCurrentVersionName(versionName); + socialDirectoryVersion.setSize(jsonArray.size()); + socialDirectoryVersion.setCreateDatetime(LocalDateTime.now()); + socialDirectoryVersionMapper.insert(socialDirectoryVersion); + Map hashMap = new HashMap<>(); + hashMap.put("current_version_name", versionName); + hashMap.put("pre_version_name", pre_version_name); + return hashMap; + } /* * 搜索接口 * @param keyword 关键字 */ - public Page search(String keyword,int type,int pageNum,int pageSize){ + public Page search(String keyword,int type,int pageNum,int pageSize) { + return search(keyword, List.of(type),pageNum,pageSize); + } + + /* + * 搜索接口 + * @param keyword 关键字 + */ + public Page search(String keyword,List typeList,int pageNum,int pageSize){ QueryWrapper codeqw = new QueryWrapper<>(); - codeqw.eq("type", type); + if (typeList.size() == 1) { + codeqw.eq("type", typeList.get(0)); + }else { + codeqw.in("type", typeList); + } //模糊搜索 - if (!keyword.trim().isEmpty()) { + if (keyword != null && !keyword.trim().isEmpty()) { codeqw.like("name", keyword); codeqw.or().like("code", keyword); codeqw.or().like("keyword", keyword); @@ -213,11 +333,8 @@ public class SocialDirectoryService extends BaseService { // return success(SelectPage(queryWrapper, page, size, iSocialDirectoryService)); codeqw.select("code"); long count=socialDirectoryMapper.selectCount(codeqw); - codeqw.last("LIMIT " + pageSize + " OFFSET " + (pageNum - 1) * pageSize); List codeList = socialDirectoryMapper.selectObjs(codeqw); - - List list= new ArrayList<>(); if(codeList.isEmpty()){ Page empty_result = new Page<>(); empty_result.setList(new ArrayList<>()); @@ -232,20 +349,39 @@ public class SocialDirectoryService extends BaseService { List socialDirectoryUpinfoList=socialDirectoryUpinfoMapper.selectList(queryWrapper); List socialDirectoryLimitList=socialDirectoryLimitMapper.selectList(queryWrapper); List socialDirectorySelfList=socialDirectorySelfMapper.selectList(queryWrapper); - System.out.println(socialDirectoryList); - System.out.println(socialDirectoryUpinfoList); - System.out.println(socialDirectoryLimitList); - System.out.println(socialDirectorySelfList); + + Map stringSocialDirectoryUpinfoMap = socialDirectoryUpinfoList.stream() + .collect(Collectors.toMap(SocialDirectoryUpinfo::getCode, socialDirectoryUpinfo -> socialDirectoryUpinfo)); + + Map stringSocialDirectoryLimitMap = socialDirectoryLimitList.stream() + .collect(Collectors.toMap(SocialDirectoryLimit::getCode, socialDirectoryLimit -> socialDirectoryLimit)); + + Map stringSocialDirectorySelfMap = socialDirectorySelfList.stream() + .collect(Collectors.toMap(SocialDirectorySelf::getCode, socialDirectorySelf -> socialDirectorySelf)); + //第二部 构建新的返回List List socialDirectoryViewList=new ArrayList<>(); for(SocialDirectory socialDirectory:socialDirectoryList){ SocialDirectoryView socialDirectoryView=JSONObject.parseObject(JSONObject.toJSONString(socialDirectory), SocialDirectoryView.class); + SocialDirectoryUpinfo socialDirectoryUpinfo = stringSocialDirectoryUpinfoMap.get(socialDirectory.getCode()); + if (socialDirectoryUpinfo != null) { + socialDirectoryView.setBegndate(socialDirectoryUpinfo.getBegndate()); + socialDirectoryView.setEnddate(socialDirectoryUpinfo.getEnddate()); + socialDirectoryView.setWubi(socialDirectoryUpinfo.getWubi()); + socialDirectoryView.setPinyin(socialDirectoryUpinfo.getPinyin()); + } + SocialDirectoryLimit socialDirectoryLimit = stringSocialDirectoryLimitMap.get(socialDirectory.getCode()); + if(socialDirectoryLimit!=null){ + socialDirectoryView.setHilistLmtpricType(socialDirectoryLimit.getHilistLmtpricType()); + socialDirectoryView.setHilistPricUplmtAmt(socialDirectoryLimit.getHilistPricUplmtAmt()); + } + SocialDirectorySelf socialDirectorySelf = stringSocialDirectorySelfMap.get(socialDirectory.getCode()); + if(socialDirectorySelf!=null){ + socialDirectoryView.setSelfpayPropType(socialDirectorySelf.getSelfpayPropType()); + socialDirectoryView.setSelfpayProp(socialDirectorySelf.getSelfpayProp()); + } + socialDirectoryViewList.add(socialDirectoryView); } - - - - - Page result=new Page<>(); result.setTotal_page((int) Math.ceil((double) count / pageSize)); result.setTotal_count(count); @@ -257,7 +393,54 @@ public class SocialDirectoryService extends BaseService { * @param type 类型 */ public Page list(int type,int pageNum,int pageSize){ - return null; + return search(null, type, pageNum, pageSize); + } + + /* + * 获取字段列表接口 + * @param type 类型 + */ + public List> getColumnList(int type) { + Integer[] typeList = {1301, 1302, 1305, 1306, 1307, 1309, 1314, 1315, 1320, 1321}; + //判断type在数组中 + if (!Arrays.asList(typeList).contains(type)) { + throw new MessageException("参数 type 不能为空"); + } + List> resultList = new ArrayList<>(); + ClassLoader classLoader = getClass().getClassLoader(); + // 资源文件的路径 + String resourceName = "doc_title/" + type + ".json"; + StringBuilder content = new StringBuilder(); + try (InputStream inputStream = classLoader.getResourceAsStream(resourceName); + BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream))) { + if (inputStream != null) { + String line; + while ((line = reader.readLine()) != null) { + content.append(line); + } + } else { + logger.info("未找到资源文件: " + resourceName); + } + } catch (IOException e) { + e.printStackTrace(); + } + JSONArray list = JSON.parseArray(content.toString()); + for (int i = 0; i < list.size(); i++) { + JSONObject obj = list.getJSONObject(i); + String key = null; + for (String _key : obj.keySet()) { + key = _key; + } + JSONObject field_obj = obj.getJSONObject(key); + Map hashMap = new HashMap<>(); + if (field_obj.containsKey("column_width") && field_obj.getInteger("column_width") != 0) { + hashMap.put("en", field_obj.getString("en")); + hashMap.put("zh", field_obj.getString("zh")); + hashMap.put("column_width", field_obj.getString("column_width")); + resultList.add(hashMap); + } + } + return resultList; } diff --git a/src/main/java/com/syjiaer/clinic/server/service/social/SocialDirectoryUpinfoService.java b/src/main/java/com/syjiaer/clinic/server/service/social/SocialDirectoryUpinfoService.java new file mode 100644 index 0000000..c9ca16b --- /dev/null +++ b/src/main/java/com/syjiaer/clinic/server/service/social/SocialDirectoryUpinfoService.java @@ -0,0 +1,73 @@ +package com.syjiaer.clinic.server.service.social; + +import com.syjiaer.clinic.server.common.api.input.IM1312; +import com.syjiaer.clinic.server.common.api.output.OM1312; +import com.syjiaer.clinic.server.common.api.request.SocialRequest; +import com.syjiaer.clinic.server.common.exception.MessageException; +import com.syjiaer.clinic.server.common.util.DateUtil; +import com.syjiaer.clinic.server.entity.social.SocialDirectoryUpinfo; +import com.syjiaer.clinic.server.mapper.social.SocialDirectoryUpinfoMapper; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.math.BigInteger; +import java.time.LocalDateTime; +import java.time.format.DateTimeFormatter; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.logging.Logger; + +@Service +public class SocialDirectoryUpinfoService { + @Autowired + private SocialRequest socialRequest; + @Autowired + private SocialDirectoryUpinfoMapper socialDirectoryUpinfoMapper; + + private Logger logger = Logger.getLogger(this.getClass().getName()); + + public Map getInfo(String updtTime, int page_num) { + if (updtTime == null) { + throw new MessageException("updtTime不能为空"); + } + IM1312 im1312 = new IM1312(); + logger.info("正在处理第" + page_num + "页"); + DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"); + im1312.setUpdtTime(LocalDateTime.parse(updtTime, formatter)); + im1312.setValiFlag("1"); + im1312.setPageNum(page_num); + im1312.setPageSize(1000); + OM1312 om1312 = socialRequest.call1312(im1312); + System.out.println(page_num + "/" + om1312.getPages()); + List> data = om1312.getData(); + for (Map datum : data) { + SocialDirectoryUpinfo socialDirectoryUpinfo = new SocialDirectoryUpinfo(); + socialDirectoryUpinfo.setRid(new BigInteger(datum.get("rid").toString())); + socialDirectoryUpinfo.setCode(datum.get("hilist_code").toString()); + socialDirectoryUpinfo.setBegndate(DateUtil.getDateTime(datum.get("begndate").toString())); + socialDirectoryUpinfo.setEnddate(DateUtil.getDateTime(datum.get("enddate").toString())); + socialDirectoryUpinfo.setLmtUsedFlag(datum.get("lmt_used_flag").toString()); + socialDirectoryUpinfo.setChrgitmLv(datum.get("chrgitm_lv").toString()); + socialDirectoryUpinfo.setMedChrgitmType(datum.get("med_chrgitm_type").toString()); + socialDirectoryUpinfo.setPinyin(datum.get("pinyin").toString()); + socialDirectoryUpinfo.setWubi(datum.get("wubi").toString()); + String code = socialDirectoryUpinfo.getCode(); + // 检索数据库中是否存在该主键对应的记录 + SocialDirectoryUpinfo existingUpinfo = socialDirectoryUpinfoMapper.selectById(code); + if (existingUpinfo == null) { + socialDirectoryUpinfoMapper.insert(socialDirectoryUpinfo); + } else { + // 记录存在,比较 rid 的值 + BigInteger newRid = socialDirectoryUpinfo.getRid(); + BigInteger oldRid = existingUpinfo.getRid(); + if (newRid.compareTo(oldRid) > 0) { + socialDirectoryUpinfoMapper.updateById(socialDirectoryUpinfo); + } + } + } + Map map = new HashMap<>(); + map.put("pages", om1312.getPages()); + return map; + } +} diff --git a/src/main/java/com/syjiaer/clinic/server/service/social/SocialDirectoryVersionService.java b/src/main/java/com/syjiaer/clinic/server/service/social/SocialDirectoryVersionService.java new file mode 100644 index 0000000..69bddd4 --- /dev/null +++ b/src/main/java/com/syjiaer/clinic/server/service/social/SocialDirectoryVersionService.java @@ -0,0 +1,65 @@ +package com.syjiaer.clinic.server.service.social; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.syjiaer.clinic.server.common.exception.MessageException; +import com.syjiaer.clinic.server.common.vo.Page; +import com.syjiaer.clinic.server.entity.social.SocialDirectoryVersion; +import com.syjiaer.clinic.server.mapper.social.SocialDirectoryVersionMapper; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.Arrays; +import java.util.List; + +@Service +public class SocialDirectoryVersionService { + @Autowired + private SocialDirectoryVersionMapper socialDirectoryVersionMapper; + + public SocialDirectoryVersion getCurrent(int type) { + Integer[] type_list = {1301, 1302, 1305, 1306, 1307, 1309, 1314, 1315, 1320, 1321}; + //判断type在数组中 + if (!Arrays.asList(type_list).contains(type)) { + throw new MessageException("type不能为空"); + } + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.eq("type", type); + queryWrapper.orderByDesc("create_datetime"); + // 只取第一条记录 + queryWrapper.last("LIMIT 1"); + // 执行查询 + SocialDirectoryVersion socialDirectoryVersion = socialDirectoryVersionMapper.selectOne(queryWrapper); + if (socialDirectoryVersion == null) { + socialDirectoryVersion = new SocialDirectoryVersion(); + if (type == 1305) { + socialDirectoryVersion.setCurrentVersionName("F002"); + } else { + socialDirectoryVersion.setCurrentVersionName("0"); + } + + } + return socialDirectoryVersion; + } + + public Page list(int pageNum, int pageSize, int type) { + Integer[] type_list = {1301, 1302, 1305, 1306, 1307, 1309}; + //判断type在数组中 + if (!Arrays.asList(type_list).contains(type)) { + // 处理参数为空的情况,这里假设返回一个错误结果 + throw new MessageException("type不能为空"); + } + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.eq("type", type); + Long total_count = socialDirectoryVersionMapper.selectCount(queryWrapper); + queryWrapper.last("LIMIT " + pageSize + " OFFSET " + (pageNum - 1) * pageSize); + queryWrapper.orderByDesc("id"); + // 执行查询 + List socialDirectoryList = socialDirectoryVersionMapper.selectList(queryWrapper); + int total_page = (int) Math.ceil((double) total_count / pageSize); + Page result = new Page<>(); + result.setTotal_page(total_page); + result.setTotal_count(total_count); + result.setList(socialDirectoryList); + return result; + } +} diff --git a/src/main/java/com/syjiaer/clinic/server/service/social/SocialUserService.java b/src/main/java/com/syjiaer/clinic/server/service/social/SocialUserService.java new file mode 100644 index 0000000..05ecabc --- /dev/null +++ b/src/main/java/com/syjiaer/clinic/server/service/social/SocialUserService.java @@ -0,0 +1,44 @@ +package com.syjiaer.clinic.server.service.social; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.syjiaer.clinic.server.common.api.input.IM1101; +import com.syjiaer.clinic.server.common.api.output.OM1101; +import com.syjiaer.clinic.server.common.api.request.SocialRequest; +import com.syjiaer.clinic.server.common.exception.MessageException; +import com.syjiaer.clinic.server.common.vo.Result; +import com.syjiaer.clinic.server.entity.social.SocialUser; +import com.syjiaer.clinic.server.mapper.social.SocialUserMapper; +import org.springframework.beans.BeanUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +@Service +public class SocialUserService { + @Autowired + private SocialRequest socialRequest; + @Autowired + private SocialUserMapper socialUserMapper; + @Transactional(rollbackFor = Exception.class) + public OM1101 getCustomSocialInfo(IM1101 im1101) { + if (im1101 == null) { + throw new MessageException("没有带数据"); + } + OM1101 om1101 = socialRequest.call1101(im1101); + QueryWrapper socialUserQueryWrapper = new QueryWrapper<>(); + socialUserQueryWrapper.eq("certno", om1101.getBaseinfo().getCertno()); + SocialUser dbUser = socialUserMapper.selectOne(socialUserQueryWrapper); + + SocialUser socialUser = new SocialUser(); + BeanUtils.copyProperties(om1101.getBaseinfo(), socialUser); + if (dbUser != null){ + socialUser.setId(dbUser.getId()); + } + socialUser.setPsnNo(om1101.getBaseinfo().getPsn_no()); + socialUser.setPsnCertType(om1101.getBaseinfo().getPsn_cert_type()); + socialUser.setPsnName(om1101.getBaseinfo().getPsn_name()); + socialUserMapper.insertOrUpdate(socialUser); + om1101.setId(socialUser.getId()); + return om1101; + } +} diff --git a/src/main/resources/doc_title/1301.json b/src/main/resources/doc_title/1301.json new file mode 100644 index 0000000..f0b797b --- /dev/null +++ b/src/main/resources/doc_title/1301.json @@ -0,0 +1,177 @@ +[ + { + "8": { + "en": "json.name", + "zh": "注册名", + "column_width": 200 + } + }, + { + "1": { + "en": "json.code", + "zh": "医疗目录编码", + "column_width": 150 + } + }, + { + "14": { + "en": "json.dosage_specifications", + "zh": "药品规格", + "column_width": 200 + } + }, + { + "16": { + "en": "json.reg_type", + "zh": "注册剂型", + "column_width": 200 + } + }, + { + "4": { + "en": "json.common_name", + "zh": "药品通用名", + "column_width": 200 + } + }, + { + "62": { + "en": "json.approval_number", + "zh": "批准文号", + "column_width": 200 + } + }, + { + "28": { + "en": "json.rx_flag", + "zh": "处方标志", + "column_width": 200 + } + }, + { + "9": { + "en": "json.standard_code", + "zh": "本位码", + "column_width": 200 + } + }, + { + "10": { + "en": "json.dosage_type", + "zh": "药品剂型", + "column_width": 200 + } + }, + { + "17": { + "en": "json.reg_specifications", + "zh": "注册规格", + "column_width": 200 + } + }, + { + "42": { + "en": "json.min_packaging_number", + "zh": "最小包装数量", + "column_width": 200 + } + }, + { + "43": { + "en": "json.min_packaging_unit", + "zh": "最小包装单位", + "column_width": 200 + } + }, + { + "44": { + "en": "json.min_preparation_unit", + "zh": "最小制剂单位", + "column_width": 200 + } + }, + { + "49": { + "en": "json.min_measure_unit", + "zh": "最小计价单位", + "column_width": 200 + } + }, + { + "54": { + "en": "json.producer", + "zh": "生产企业名称", + "column_width": 200 + } + }, + { + "65": { + "en": "json.market_state", + "zh": "市场状态", + "column_width": 200 + } + }, + { + "79": { + "en": "json.valid_flag", + "zh": "有效标志", + "column_width": 100 + } + }, + { + "80": { + "en": "json.unique_record_code", + "zh": "唯一记录号", + "column_width": 100 + } + }, + { + "92": { + "en": "json.category", + "zh": "甲乙标识", + "column_width": 200 + } + }, + { + "81": { + "en": "json.data_creation_time", + "zh": "数据创建时间", + "column_width": 100 + } + }, + { + "82": { + "en": "json.data_update_time", + "zh": "数据更新时间", + "column_width": 100 + } + }, + { + "37": { + "en": "begndate", + "zh": "开始日期", + "column_width": 100 + } + }, + { + "38": { + "en": "enddate", + "zh": "结束日期", + "column_width": 100 + } + }, + { + "83": { + "en": "json.version_number", + "zh": "版本号", + "column_width": 100 + } + }, + { + "84": { + "en": "json.version_name", + "zh": "版本名称", + "column_width": 200 + } + } +] \ No newline at end of file diff --git a/src/main/resources/doc_title/1302.json b/src/main/resources/doc_title/1302.json new file mode 100644 index 0000000..4de9820 --- /dev/null +++ b/src/main/resources/doc_title/1302.json @@ -0,0 +1,100 @@ +[ + { + "2": { + "en": "json.name", + "zh": "名称", + "column_width": 200 + } + }, + { + "1": { + "en": "json.code", + "zh": "医疗目录编码", + "column_width": 200 + } + }, + { + "12": { + "en": "begndate", + "zh": "开始日期", + "column_width": 200 + } + }, + { + "13": { + "en": "enddate", + "zh": "结束日期", + "column_width": 200 + } + }, + { + "7": { + "en": "json.safe_dosage", + "zh": "安全计量", + "column_width": 200 + } + }, + { + "20": { + "en": "json.herbal_name", + "zh": "药材名称", + "column_width": 200 + } + }, + { + "14": { + "en": "json.valid_flag", + "zh": "有效标志", + "column_width": 0 + } + }, + { + "15": { + "en": "json.unique_record_number", + "zh": "唯一记录号", + "column_width": 0 + } + }, + { + "16": { + "en": "json.data_creation_time", + "zh": "数据创建时间", + "column_width": 0 + } + }, + { + "17": { + "en": "json.data_update_time", + "zh": "数据更新时间", + "column_width": 0 + } + }, + { + "18": { + "en": "json.version_number", + "zh": "版本号", + "column_width": 0 + } + }, + { + "19": { + "en": "json.version_name", + "zh": "版本名称", + "column_width": 200 + } + }, + { + "25": { + "en": "json.national_policy", + "zh": "国家医保支付政策", + "column_width": 0 + } + }, + { + "26": { + "en": "json.provincial_policy", + "zh": "省级医保支付政策", + "column_width": 0 + } + } +] \ No newline at end of file diff --git a/src/main/resources/doc_title/1305.json b/src/main/resources/doc_title/1305.json new file mode 100644 index 0000000..dec6d4c --- /dev/null +++ b/src/main/resources/doc_title/1305.json @@ -0,0 +1,108 @@ +[ + { + "10": { + "en": "json.name", + "zh": "项目名称", + "column_width": 200 + } + }, + { + "1": { + "en": "json.code", + "zh": "医疗目录编码", + "column_width": 200 + } + }, + { + "2": { + "en": "json.unit", + "zh": "计价单位", + "column_width": 200 + } + }, + { + "3": { + "en": "json.unit_name", + "zh": "单位名称", + "column_width": 200 + } + }, + { + "6": { + "en": "json.diagnosis_treatment_content", + "zh": "诊疗项目内涵", + "column_width": 300 + } + }, + { + "4": { + "en": "json.diagnosis_treatment_description", + "zh": "诊疗项目说明", + "column_width": 300 + } + }, + { + "12": { + "en": "begndate", + + "zh": "开始日期", + "column_width": 200 + } + }, + { + "13": { + "en": "enddate", + "zh": "结束日期", + "column_width": 200 + } + }, + { + "5": { + "en": "json.diagnosis_treatment_exclusions", + "zh": "诊疗除外内容" + } + }, + { + "7": { + "en": "json.valid_flag", + "zh": "有效标志" + } + }, + { + "8": { + "en": "json.remarks", + "zh": "备注" + } + }, + { + "9": { + "en": "json.service_category", + "zh": "服务项目类别" + } + }, + { + "11": { + "en": "json.project_description", + "zh": "项目说明" + } + }, + { + "14": { + "en": "json.unique_record_number", + "zh": "唯一记录号" + } + }, + { + "15": { + "en": "json.version_number", + "zh": "版本号" + } + }, + { + "16": { + "en": "json.version_name", + "zh": "版本名称", + "column_width": 200 + } + } +] \ No newline at end of file diff --git a/src/main/resources/doc_title/1306.json b/src/main/resources/doc_title/1306.json new file mode 100644 index 0000000..f2fd631 --- /dev/null +++ b/src/main/resources/doc_title/1306.json @@ -0,0 +1,190 @@ +[ + { + "2": { + "en": "json.name", + "zh": "耗材名称", + "column_width": 200 + } + }, + { + "1": { + "en": "json.code", + "zh": "医疗目录编码", + "column_width": 200 + } + }, + { + "5": { + "en": "json.common_name", + "zh": "医保通用名", + "column_width": 200 + } + }, + { + "3": { + "en": "json.unique_code", + "zh": "医疗器械唯一标识码", + "column_width": 200 + } + }, + { + "6": { + "en": "json.product_model", + "zh": "产品型号", + "column_width": 200 + } + }, + { + "7": { + "en": "json.specification_code", + "zh": "规格代码", + "column_width": 200 + } + }, + { + "8": { + "en": "json.specification", + "zh": "规格", + "column_width": 100 + } + }, + { + "9": { + "en": "json.category", + "zh": "耗材分类", + "column_width": 100 + } + }, + { + "10": { + "en": "json.model", + "zh": "规格型号", + "column_width": 100 + } + }, + { + "13": { + "en": "json.packaging_specification", + "zh": "包装规格", + "column_width": 100 + } + }, + { + "14": { + "en": "json.packaging_number", + "zh": "包装数量", + "column_width": 100 + } + }, + { + "16": { + "en": "json.packaging_unit", + "zh": "包装单位", + "column_width": 100 + } + }, + { + "24": { + "en": "json.applicable_scope", + "zh": "适用范围", + "column_width": 300 + } + }, + { + "34": { + "en": "json.restricted_use_flag", + "zh": "限制使用标志" + } + }, + { + "35": { + "en": "json.medical_insurance_restricted_scope", + "zh": "医保限用范围" + } + }, + { + "37": { + "en": "json.high_value_material_flag", + "zh": "高值耗材标志" + } + }, + { + "44": { + "en": "json.single_use_flag", + "zh": "一次性使用标志" + } + }, + { + "45": { + "en": "json.single_use_flag_name", + "zh": "一次性使用标志名称" + } + }, + { + "47": { + "en": "begndate", + "zh": "开始日期" + } + }, + { + "48": { + "en": "enddate", + "zh": "结束日期" + } + }, + { + "51": { + "en": "json.reg_number", + "zh": "注册备案号" + } + }, + { + "52": { + "en": "json.registered_product_name", + "zh": "注册备案产品名称" + } + }, + { + "54": { + "en": "json.other_content", + "zh": "其他内容" + } + }, + { + "55": { + "en": "json.approval_date", + "zh": "批准日期" + } + }, + { + "60": { + "en": "json.producer", + "zh": "生产企业名称" + } + }, + { + "68": { + "en": "json.valid_flag", + "zh": "有效标志" + } + }, + { + "69": { + "en": "json.unique_record_number", + "zh": "唯一记录号" + } + }, + { + "70": { + "en": "json.version_number", + "zh": "版本号" + } + }, + { + "71": { + "en": "json.version_name", + "zh": "版本名称", + "column_width": 200 + } + } +] \ No newline at end of file diff --git a/src/main/resources/doc_title/1307.json b/src/main/resources/doc_title/1307.json new file mode 100644 index 0000000..96c68b6 --- /dev/null +++ b/src/main/resources/doc_title/1307.json @@ -0,0 +1,96 @@ +[ + { + "4": { + "en": "json.name", + "zh": "名称", + "column_width": 200 + } + }, + { + "1": { + "en": "json.code", + "zh": "西医疾病诊断ID", + "column_width": 200 + } + }, + { + "6": { + "en": "json.section_code", + "zh": "节名称", + "column_width": 200 + } + }, + { + "8": { + "en": "json.class_code", + "zh": "类名称", + "column_width": 200 + } + }, + { + "12": { + "en": "json.diagnosis_name", + "zh": "诊断名称", + "column_width": 200 + } + }, + { + "13": { + "en": "json.usage_flag", + "zh": "使用标记", + "column_width": 200 + } + }, + { + "14": { + "en": "json.national_standard_diagnosis_code", + "zh": "国标版诊断代码", + "column_width": 200 + } + }, + { + "15": { + "en": "json.national_standard_diagnosis_name", + "zh": "国标版诊断名称", + "column_width": 200 + } + }, + { + "18": { + "en": "json.remarks", + "zh": "备注", + "column_width": 200 + } + }, + { + "19": { + "en": "json.valid_flag", + "zh": "有效标志" + } + }, + { + "20": { + "en": "json.unique_record_number", + "zh": "唯一记录号" + } + }, + { + "21": { + "en": "json.data_creation_time", + "zh": "数据创建时间" + } + }, + { + "22": { + "en": "json.data_update_time", + "zh": "数据更新时间" + } + }, + { + "23": { + "en": "json.version_name", + "zh": "版本名称", + "column_width": 0 + } + } +] \ No newline at end of file diff --git a/src/main/resources/doc_title/1309.json b/src/main/resources/doc_title/1309.json new file mode 100644 index 0000000..671ab48 --- /dev/null +++ b/src/main/resources/doc_title/1309.json @@ -0,0 +1,94 @@ +[ + { + "2": { + "en": "json.name", + "zh": "慢特病种大类名称", + "column_width": 200 + } + }, + { + "1": { + "en": "json.code", + "zh": "慢特病种目录代码", + "column_width": 200 + } + }, + { + "3": { + "en": "json.type", + "zh": "慢特病种细分类名称", + "column_width": 200 + } + }, + { + "4": { + "en": "json.insurance_division", + "zh": "医保区划", + "column_width": 200 + } + }, + { + "15": { + "en": "json.disease_name", + "zh": "慢特病种名称", + "column_width": 200 + } + }, + { + "5": { + "en": "json.remarks", + "zh": "备注", + "column_width": 200 + } + }, + { + "6": { + "en": "json.valid_flag", + "zh": "有效标志", + "column_width": 200 + } + }, + { + "7": { + "en": "json.unique_record_number", + "zh": "唯一记录号" + } + }, + { + "8": { + "en": "json.create_datetime", + "zh": "数据创建时间" + } + }, + { + "9": { + "en": "json.update_datetime", + "zh": "数据更新时间" + } + }, + { + "10": { + "en": "json.version_number", + "zh": "版本号" + } + }, + { + "11": { + "en": "json.disease_connotation", + "zh": "病种内涵" + } + }, + { + "12": { + "en": "json.version_name", + "zh": "版本名称", + "column_width": 0 + } + }, + { + "16": { + "en": "json.outpatient_chronic_special_disease_category_code", + "zh": "慢特病种大类代码" + } + } +] \ No newline at end of file diff --git a/src/main/resources/doc_title/1314.json b/src/main/resources/doc_title/1314.json new file mode 100644 index 0000000..10a7136 --- /dev/null +++ b/src/main/resources/doc_title/1314.json @@ -0,0 +1,65 @@ +[ + { + "7": { + "en": "json.name", + "zh": "疾病分类名称", + "column_width": 200 + } + }, + { + "6": { + "en": "json.code", + "zh": "疾病分类代码", + "column_width": 150 + } + }, + { + "8": { + "en": "json.remark", + "zh": "备注", + "column_width": 200 + } + }, + { + "9": { + "en": "json.valid_flag", + "zh": "有效标志", + "column_width": 100 + } + }, + { + "10": { + "en": "json.unique_record_code", + "zh": "唯一记录号", + "column_width": 100 + } + }, + { + "11": { + "en": "json.data_creation_time", + "zh": "数据创建时间", + "column_width": 100 + } + }, + { + "12": { + "en": "json.data_update_time", + "zh": "数据更新时间", + "column_width": 100 + } + }, + { + "13": { + "en": "json.version_number", + "zh": "版本号", + "column_width": 100 + } + }, + { + "14": { + "en": "json.version_name", + "zh": "版本名称", + "column_width": 200 + } + } +] \ No newline at end of file diff --git a/src/main/resources/doc_title/1315.json b/src/main/resources/doc_title/1315.json new file mode 100644 index 0000000..d7025c5 --- /dev/null +++ b/src/main/resources/doc_title/1315.json @@ -0,0 +1,65 @@ +[ + { + "7": { + "en": "json.name", + "zh": "证候分类名称", + "column_width": 200 + } + }, + { + "6": { + "en": "json.code", + "zh": "证候分类代码", + "column_width": 150 + } + }, + { + "8": { + "en": "json.remark", + "zh": "备注", + "column_width": 200 + } + }, + { + "9": { + "en": "json.valid_flag", + "zh": "有效标志", + "column_width": 100 + } + }, + { + "10": { + "en": "json.unique_record_code", + "zh": "唯一记录号", + "column_width": 100 + } + }, + { + "11": { + "en": "json.data_creation_time", + "zh": "数据创建时间", + "column_width": 100 + } + }, + { + "12": { + "en": "json.data_update_time", + "zh": "数据更新时间", + "column_width": 100 + } + }, + { + "13": { + "en": "json.version_number", + "zh": "版本号", + "column_width": 100 + } + }, + { + "14": { + "en": "json.version_name", + "zh": "版本名称", + "column_width": 200 + } + } +] \ No newline at end of file diff --git a/src/main/resources/doc_title/1320.json b/src/main/resources/doc_title/1320.json new file mode 100644 index 0000000..2f3e9c1 --- /dev/null +++ b/src/main/resources/doc_title/1320.json @@ -0,0 +1,156 @@ +[ + { + "3": { + "en": "json.name", + "zh": "中药配方颗粒名", + "column_width": 200 + } + }, + { + "20": { + "en": "json.code", + "zh": "中药饮片代码", + "column_width": 150 + } + }, + { + "1": { + "en": "json.chinese_medicine_formula_granule_id", + "zh": "中药配方颗粒Id", + "column_width": 150 + } + }, + { + "22": { + "en": "json.medicinal_material_name", + "zh": "药材名称", + "column_width": 200 + } + }, + { + "2": { + "en": "json.chinese_medicine_formula_granule_code", + "zh": "中药配方颗粒代码", + "column_width": 150 + } + }, + { + "4": { + "en": "json.minimum_measurement_unit", + "zh": "最小计量单位", + "column_width": 150 + } + }, + { + "6": { + "en": "json.specifications", + "zh": "规格", + "column_width": 150 + } + }, + { + "8": { + "en": "json.shelf_life", + "zh": "保质期", + "column_width": 150 + } + }, + { + "10": { + "en": "json.manufacturer_address", + "zh": "生产企业地址", + "column_width": 150 + } + }, + { + "21": { + "en": "json.chinese_medicine_decoction_piece_name", + "zh": "中药饮片名称", + "column_width": 150 + } + }, + { + "23": { + "en": "json.efficacy_classification", + "zh": "功效分类", + "column_width": 150 + } + }, + { + "24": { + "en": "json.functional_indications", + "zh": "功能主治", + "column_width": 150 + } + }, + { + "25": { + "en": "json.general_usage", + "zh": "常规用法", + "column_width": 150 + } + }, + { + "27": { + "en": "json.unified_social_credit_code", + "zh": "生产企业统一社会信用代码", + "column_width": 150 + } + }, + { + "40": { + "en": "json.medical_insurance_division", + "zh": "医保区划", + "column_width": 150 + } + }, + { + "41": { + "en": "json.remark", + "zh": "备注", + "column_width": 200 + } + }, + { + "29": { + "en": "json.valid_flag", + "zh": "有效标志", + "column_width": 100 + } + }, + { + "30": { + "en": "json.unique_record_code", + "zh": "数据唯一记录号", + "column_width": 100 + } + }, + { + "34": { + "en": "json.data_creation_time", + "zh": "数据创建时间", + "column_width": 100 + } + }, + { + "31": { + "en": "json.data_update_time", + "zh": "数据更新时间", + "column_width": 100 + } + }, + { + "42": { + "en": "json.version_number", + "zh": "版本号", + "column_width": 100 + } + }, + { + "43": { + "en": "json.version_name", + "zh": "版本名称", + "column_width": 200 + } + } +] \ No newline at end of file diff --git a/src/main/resources/doc_title/1321.json b/src/main/resources/doc_title/1321.json new file mode 100644 index 0000000..6520ebc --- /dev/null +++ b/src/main/resources/doc_title/1321.json @@ -0,0 +1,107 @@ +[ + { + "7": { + "en": "json.name", + "zh": "医疗服务项目名称", + "column_width": 200 + } + }, + { + "3": { + "en": "json.code", + "zh": "医疗目录编码", + "column_width": 150 + } + }, + { + "8": { + "en": "json.minimum_measurement_unit", + "zh": "医疗服务项目输出", + "column_width": 150 + } + }, + { + "9": { + "en": "json.specifications", + "zh": "价格构成", + "column_width": 150 + } + }, + { + "10": { + "en": "json.shelf_life", + "zh": "基本物料损耗", + "column_width": 150 + } + }, + { + "11": { + "en": "json.manufacturer_address", + "zh": "计价单位", + "column_width": 150 + } + }, + { + "12": { + "en": "json.chinese_medicine_decoction_piece_code", + "zh": "计价说明", + "column_width": 150 + } + }, + { + "17": { + "en": "json.chinese_medicine_decoction_piece_name", + "zh": "诊疗项目说明", + "column_width": 150 + } + }, + { + "19": { + "en": "json.medical_insurance_division", + "zh": "医保区划", + "column_width": 150 + } + }, + { + "14": { + "en": "json.valid_flag", + "zh": "有效标志", + "column_width": 100 + } + }, + { + "25": { + "en": "json.unique_record_code", + "zh": "数据唯一记录号", + "column_width": 100 + } + }, + { + "28": { + "en": "json.data_creation_time", + "zh": "数据创建时间", + "column_width": 100 + } + }, + { + "29": { + "en": "json.data_update_time", + "zh": "数据更新时间", + "column_width": 100 + } + }, + { + "21": { + "en": "json.version_number", + "zh": "版本号", + "column_width": 100 + } + }, + { + "22": { + "en": "json.version_name", + "zh": "版本名称", + "column_width": 200 + } + } +] \ No newline at end of file diff --git a/src/main/resources/doc_title/1361.json b/src/main/resources/doc_title/1361.json new file mode 100644 index 0000000..56e4b50 --- /dev/null +++ b/src/main/resources/doc_title/1361.json @@ -0,0 +1,68 @@ +[ + { + "2": { + "en": "json.name", + "zh": "门诊诊疗名称", + "column_width": 200 + } + }, + { + "1": { + "en": "json.code", + "zh": "门诊诊疗代码", + "column_width": 200 + } + }, + { + "4": { + "en": "json.diagnosis_treatment_type", + "zh": "就诊类型", + "column_width": 200 + } + }, + { + "8": { + "en": "json.remarks", + "zh": "备注", + "column_width": 200 + } + }, + { + "9": { + "en": "json.valid_flag", + "zh": "有效标志", + "column_width": 200 + } + }, + { + "10": { + "en": "json.unique_record_number", + "zh": "唯一记录号" + } + }, + { + "14": { + "en": "json.create_datetime", + "zh": "数据创建时间" + } + }, + { + "11": { + "en": "json.update_datetime", + "zh": "数据更新时间" + } + }, + { + "5": { + "en": "json.version_number", + "zh": "版本号" + } + }, + { + "5": { + "en": "json.version_name", + "zh": "版本名称", + "column_width": 0 + } + } +] \ No newline at end of file diff --git a/src/main/resources/doc_title/1362.json b/src/main/resources/doc_title/1362.json new file mode 100644 index 0000000..db0e3ae --- /dev/null +++ b/src/main/resources/doc_title/1362.json @@ -0,0 +1,68 @@ +[ + { + "3": { + "en": "json.name", + "zh": "收费项目名称", + "column_width": 200 + } + }, + { + "1": { + "en": "json.code", + "zh": "收费项目省代码,收费项目国家代码", + "column_width": 200 + } + }, + { + "4": { + "en": "json.icpc_code", + "zh": "ICPC编码", + "column_width": 200 + } + }, + { + "6": { + "en": "json.charge_item_attribute", + "zh": "收费项目属性", + "column_width": 200 + } + }, + { + "11": { + "en": "json.valid_flag", + "zh": "有效标志", + "column_width": 200 + } + }, + { + "12": { + "en": "json.unique_record_number", + "zh": "唯一记录号" + } + }, + { + "16": { + "en": "json.create_datetime", + "zh": "数据创建时间" + } + }, + { + "13": { + "en": "json.update_datetime", + "zh": "数据更新时间" + } + }, + { + "7": { + "en": "json.version_number", + "zh": "版本号" + } + }, + { + "7": { + "en": "json.version_name", + "zh": "版本名称", + "column_width": 0 + } + } +] \ No newline at end of file diff --git a/src/main/resources/doc_title/1363.json b/src/main/resources/doc_title/1363.json new file mode 100644 index 0000000..2c67ea6 --- /dev/null +++ b/src/main/resources/doc_title/1363.json @@ -0,0 +1,61 @@ +[ + { + "2": { + "en": "json.name", + "zh": "自费项目名称", + "column_width": 200 + } + }, + { + "1": { + "en": "json.code", + "zh": "自费项目编码", + "column_width": 200 + } + }, + { + "3": { + "en": "json.self_financing_item_category", + "zh": "自费项目类别", + "column_width": 200 + } + }, + { + "8": { + "en": "json.valid_flag", + "zh": "有效标志", + "column_width": 200 + } + }, + { + "9": { + "en": "json.unique_record_number", + "zh": "唯一记录号" + } + }, + { + "13": { + "en": "json.create_datetime", + "zh": "数据创建时间" + } + }, + { + "10": { + "en": "json.update_datetime", + "zh": "数据更新时间" + } + }, + { + "4": { + "en": "json.version_number", + "zh": "版本号" + } + }, + { + "4": { + "en": "json.version_name", + "zh": "版本名称", + "column_width": 0 + } + } +] \ No newline at end of file diff --git a/src/main/resources/xml/SocialUserMapper.xml b/src/main/resources/xml/SocialUserMapper.xml new file mode 100644 index 0000000..75f14d6 --- /dev/null +++ b/src/main/resources/xml/SocialUserMapper.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/src/test/java/com/syjiaer/clinic/server/ServerApplicationTests.java b/src/test/java/com/syjiaer/clinic/server/ServerApplicationTests.java index f041ba0..3ba3afc 100644 --- a/src/test/java/com/syjiaer/clinic/server/ServerApplicationTests.java +++ b/src/test/java/com/syjiaer/clinic/server/ServerApplicationTests.java @@ -9,6 +9,9 @@ import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; +import java.util.List; +import java.util.Map; + @SpringBootTest class ServerApplicationTests { @@ -16,7 +19,8 @@ class ServerApplicationTests { private SocialDirectoryService socialDirectoryService; @Test void contextLoads() { - Page search = socialDirectoryService.search("劳拉", 1301, 1, 10); + List> columnList = socialDirectoryService.getColumnList(1301); + System.out.println(columnList); } }