Merge branch 'master' of ssh://git.jizhiweb.cn:2222/clinic-v2/server
This commit is contained in:
commit
b6aab6608d
|
|
@ -27,7 +27,7 @@ public class ItemController extends BaseController {
|
||||||
String name = parmsUtil.getString("name");
|
String name = parmsUtil.getString("name");
|
||||||
String tel = parmsUtil.getString("tel");
|
String tel = parmsUtil.getString("tel");
|
||||||
|
|
||||||
return success(itemService.getPageList(page, size, name, tel));
|
return success(itemService.list(page, size, name, tel));
|
||||||
}
|
}
|
||||||
|
|
||||||
@RequestMapping("/getItemById")
|
@RequestMapping("/getItemById")
|
||||||
|
|
@ -36,27 +36,20 @@ public class ItemController extends BaseController {
|
||||||
if (id == null) {
|
if (id == null) {
|
||||||
throw new MessageException("id参数为空");
|
throw new MessageException("id参数为空");
|
||||||
}
|
}
|
||||||
return success(itemService.getItemById(id));
|
return success(itemService.get(id));
|
||||||
}
|
}
|
||||||
|
|
||||||
@RequestMapping("/add")
|
@RequestMapping("/add")
|
||||||
public Result<?> createItem() {
|
public Result<?> createItem() {
|
||||||
Item item = parmsUtil.getObject("data", Item.class);
|
Item item = parmsUtil.getObject("data", Item.class);
|
||||||
itemService.createItem(item);
|
itemService.save(item);
|
||||||
return success();
|
|
||||||
}
|
|
||||||
|
|
||||||
@RequestMapping("/edit")
|
|
||||||
public Result<?> updateItem() {
|
|
||||||
Item item = parmsUtil.getObject("data", Item.class);
|
|
||||||
itemService.updateItem(item);
|
|
||||||
return success();
|
return success();
|
||||||
}
|
}
|
||||||
|
|
||||||
@RequestMapping("/delete")
|
@RequestMapping("/delete")
|
||||||
public Result<?> deleteItem() {
|
public Result<?> deleteItem() {
|
||||||
Integer id = parmsUtil.getInteger("id");
|
Integer id = parmsUtil.getInteger("id");
|
||||||
itemService.del(id);
|
itemService.delete(id);
|
||||||
return success();
|
return success();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -22,14 +22,14 @@ public class ItemGroupController extends BaseController {
|
||||||
Integer page = parmsUtil.getInteger("page", "页码不能为空");
|
Integer page = parmsUtil.getInteger("page", "页码不能为空");
|
||||||
Integer size = parmsUtil.getInteger("size", "页容量不能为空");
|
Integer size = parmsUtil.getInteger("size", "页容量不能为空");
|
||||||
String name = parmsUtil.getString("name");
|
String name = parmsUtil.getString("name");
|
||||||
Page<ItemGroup> pageResult = itemGroupService.getItemGroupList(page, size, name);
|
Page<ItemGroup> pageResult = itemGroupService.list(page, size, name);
|
||||||
return success(pageResult);
|
return success(pageResult);
|
||||||
}
|
}
|
||||||
|
|
||||||
@RequestMapping("/getItemGroupById")
|
@RequestMapping("/getItemGroupById")
|
||||||
public Result<ItemGroup> getItemGroupById() {
|
public Result<ItemGroup> getItemGroupById() {
|
||||||
Integer id = parmsUtil.getInteger("id", "id不能为空");
|
Integer id = parmsUtil.getInteger("id", "id不能为空");
|
||||||
ItemGroup itemGroup = itemGroupService.getItemGroupById(id);
|
ItemGroup itemGroup = itemGroupService.get(id);
|
||||||
return success(itemGroup);
|
return success(itemGroup);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -39,7 +39,7 @@ public class ItemGroupController extends BaseController {
|
||||||
if (itemGroupParam == null){
|
if (itemGroupParam == null){
|
||||||
throw new MessageException("请求参数不能为空");
|
throw new MessageException("请求参数不能为空");
|
||||||
}
|
}
|
||||||
itemGroupService.saveItemGroup(itemGroupParam);
|
itemGroupService.save(itemGroupParam);
|
||||||
return success();
|
return success();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ public class OrganizationMemberController extends BaseController {
|
||||||
int size = parmsUtil.getInteger("size", "页容量不能为空");
|
int size = parmsUtil.getInteger("size", "页容量不能为空");
|
||||||
String name = parmsUtil.getString("name");
|
String name = parmsUtil.getString("name");
|
||||||
String tel = parmsUtil.getString("tel");
|
String tel = parmsUtil.getString("tel");
|
||||||
return success(organizationMemberService.listPage(page,size,name,tel));
|
return success(organizationMemberService.pageList(page,size,name,tel));
|
||||||
}
|
}
|
||||||
@RequestMapping("/add")
|
@RequestMapping("/add")
|
||||||
public Result<?> add() {
|
public Result<?> add() {
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,76 @@
|
||||||
|
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 java.io.Serializable;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
import lombok.ToString;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 中药配方颗粒目录1320
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author NiuZiYuan
|
||||||
|
* @since 2025-04-22
|
||||||
|
*/
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@ToString
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@TableName("social_chinese_medicinal_granula")
|
||||||
|
@ApiModel(value = "SocialChineseMedicinalGranula对象", description = "中药配方颗粒目录1320")
|
||||||
|
public class SocialChineseMedicinalGranula implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@TableId(value = "id", type = IdType.AUTO)
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
@ApiModelProperty("中药配方颗粒目录名称")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
@ApiModelProperty("中药配方颗粒目录编码")
|
||||||
|
private String socialCode;
|
||||||
|
|
||||||
|
@ApiModelProperty("版本名称")
|
||||||
|
private String versionName;
|
||||||
|
|
||||||
|
@ApiModelProperty("备注")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
@ApiModelProperty("功能主治")
|
||||||
|
private String majorFunction;
|
||||||
|
|
||||||
|
@ApiModelProperty("最小计量单位")
|
||||||
|
private String minUnit;
|
||||||
|
|
||||||
|
@ApiModelProperty("规格")
|
||||||
|
private String specifications;
|
||||||
|
|
||||||
|
@ApiModelProperty("保质期")
|
||||||
|
private String expirationDate;
|
||||||
|
|
||||||
|
@ApiModelProperty("生产企业地址")
|
||||||
|
private String manufacturerAddress;
|
||||||
|
|
||||||
|
@ApiModelProperty("功效分类")
|
||||||
|
private String efficacyClassification;
|
||||||
|
|
||||||
|
@ApiModelProperty("药材名称")
|
||||||
|
private String medicinalMaterialName;
|
||||||
|
|
||||||
|
@ApiModelProperty("生产企业名称")
|
||||||
|
private String manufacturerName;
|
||||||
|
|
||||||
|
@ApiModelProperty("常规用法")
|
||||||
|
private String generalUsage;
|
||||||
|
|
||||||
|
@ApiModelProperty("生产企业同意社会信用代码")
|
||||||
|
private String unifiedSocialCreditCode;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,55 @@
|
||||||
|
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.time.LocalDateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 医保目录
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author NiuZiYuan
|
||||||
|
* @since 2025-04-02
|
||||||
|
*/
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@ToString
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@TableName("social_chronic_disease")
|
||||||
|
@ApiModel(value = "SocialChronicDisease对象", description = "门诊慢特病种目录")
|
||||||
|
public class SocialChronicDisease implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ApiModelProperty("主键")
|
||||||
|
@TableId(value = "id", type = IdType.AUTO)
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
@ApiModelProperty("门诊慢特病种名称")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
@ApiModelProperty("门诊慢特病种大类名称")
|
||||||
|
private String chronicDiseasesName;
|
||||||
|
|
||||||
|
@ApiModelProperty("医保目录编码")
|
||||||
|
private String socialCode;
|
||||||
|
|
||||||
|
@ApiModelProperty("数据创建时间")
|
||||||
|
private LocalDateTime createDatetime;
|
||||||
|
|
||||||
|
@ApiModelProperty("数据修改时间")
|
||||||
|
private LocalDateTime updateDatetime;
|
||||||
|
|
||||||
|
@ApiModelProperty("版本名称")
|
||||||
|
private String versionName;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,66 @@
|
||||||
|
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;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 医保目录
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author NiuZiYuan
|
||||||
|
* @since 2025-04-02
|
||||||
|
*/
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@ToString
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@TableName("social_diagnose")
|
||||||
|
@ApiModel(value = "SocialIDiagnose对象", description = "医疗服务项目1305,1321")
|
||||||
|
public class SocialDiagnose implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ApiModelProperty("主键")
|
||||||
|
@TableId(value = "id", type = IdType.AUTO)
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
@ApiModelProperty("医保目录编码")
|
||||||
|
private String socialCode;
|
||||||
|
|
||||||
|
@ApiModelProperty("数据创建时间")
|
||||||
|
private LocalDateTime createDatetime;
|
||||||
|
|
||||||
|
@ApiModelProperty("数据修改时间")
|
||||||
|
private LocalDateTime updateDatetime;
|
||||||
|
|
||||||
|
@ApiModelProperty("版本名称")
|
||||||
|
private String versionName;
|
||||||
|
|
||||||
|
@ApiModelProperty("章名称")
|
||||||
|
private String chapterName;
|
||||||
|
|
||||||
|
@ApiModelProperty("节名称")
|
||||||
|
private String secondaryName;
|
||||||
|
|
||||||
|
@ApiModelProperty("类目名称")
|
||||||
|
private String categoryName;
|
||||||
|
|
||||||
|
@ApiModelProperty("亚目名称")
|
||||||
|
private String suborderName;
|
||||||
|
|
||||||
|
@ApiModelProperty("诊断名称")
|
||||||
|
private String diagnosisName;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,52 @@
|
||||||
|
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.time.LocalDateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 医保目录
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author NiuZiYuan
|
||||||
|
* @since 2025-04-02
|
||||||
|
*/
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@ToString
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@TableName("social_icpc_doctor_diagnose")
|
||||||
|
@ApiModel(value = "SocialChronicDisease对象", description = "门诊慢特病种目录")
|
||||||
|
public class SocialIcpcDoctorDiagnose implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ApiModelProperty("主键")
|
||||||
|
@TableId(value = "id", type = IdType.AUTO)
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
@ApiModelProperty("门诊诊疗名称")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
@ApiModelProperty("医保目录编码")
|
||||||
|
private String socialCode;
|
||||||
|
|
||||||
|
@ApiModelProperty("数据创建时间")
|
||||||
|
private LocalDateTime createDatetime;
|
||||||
|
|
||||||
|
@ApiModelProperty("数据修改时间")
|
||||||
|
private LocalDateTime updateDatetime;
|
||||||
|
|
||||||
|
@ApiModelProperty("版本名称")
|
||||||
|
private String versionName;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,58 @@
|
||||||
|
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.time.LocalDateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 医保目录
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author NiuZiYuan
|
||||||
|
* @since 2025-04-02
|
||||||
|
*/
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@ToString
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@TableName("social_icpc_examination_treatment")
|
||||||
|
@ApiModel(value = "SocialChronicDisease对象", description = "门诊慢特病种目录")
|
||||||
|
public class SocialIcpcExaminationTreatment implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ApiModelProperty("主键")
|
||||||
|
@TableId(value = "id", type = IdType.AUTO)
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
@ApiModelProperty("门诊诊疗名称")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
@ApiModelProperty("医保目录编码")
|
||||||
|
private String socialCode;
|
||||||
|
|
||||||
|
@ApiModelProperty("数据创建时间")
|
||||||
|
private LocalDateTime createDatetime;
|
||||||
|
|
||||||
|
@ApiModelProperty("数据修改时间")
|
||||||
|
private LocalDateTime updateDatetime;
|
||||||
|
|
||||||
|
@ApiModelProperty("版本名称")
|
||||||
|
private String versionName;
|
||||||
|
|
||||||
|
@ApiModelProperty("icpc编码")
|
||||||
|
private String icpcCode;
|
||||||
|
|
||||||
|
@ApiModelProperty("icpc编码应用标识")
|
||||||
|
private String icpcCodeFlag;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,53 @@
|
||||||
|
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.time.LocalDateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 医保目录
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author NiuZiYuan
|
||||||
|
* @since 2025-04-02
|
||||||
|
*/
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@ToString
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@TableName("social_icpc_self_paying")
|
||||||
|
@ApiModel(value = "SocialIcpcSelfPaying对象", description = "自费项目目录")
|
||||||
|
public class SocialIcpcSelfPaying implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ApiModelProperty("主键")
|
||||||
|
@TableId(value = "id", type = IdType.AUTO)
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
@ApiModelProperty("自费项目名称")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
@ApiModelProperty("自费项目编码")
|
||||||
|
private String socialCode;
|
||||||
|
|
||||||
|
@ApiModelProperty("数据创建时间")
|
||||||
|
private LocalDateTime createDatetime;
|
||||||
|
|
||||||
|
@ApiModelProperty("数据修改时间")
|
||||||
|
private LocalDateTime updateDatetime;
|
||||||
|
|
||||||
|
@ApiModelProperty("版本名称")
|
||||||
|
private String versionName;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,56 @@
|
||||||
|
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;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 医保目录
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author NiuZiYuan
|
||||||
|
* @since 2025-04-02
|
||||||
|
*/
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@ToString
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@TableName("social_item")
|
||||||
|
@ApiModel(value = "SocialItem对象", description = "医保服务项目目录")
|
||||||
|
public class SocialItem implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ApiModelProperty("主键")
|
||||||
|
@TableId(value = "id", type = IdType.AUTO)
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
@ApiModelProperty("名称")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
@ApiModelProperty("医保目录编码")
|
||||||
|
private String socialCode;
|
||||||
|
|
||||||
|
@ApiModelProperty("单位")
|
||||||
|
private String unit;
|
||||||
|
|
||||||
|
@ApiModelProperty("数据创建时间")
|
||||||
|
private LocalDateTime createDatetime;
|
||||||
|
|
||||||
|
@ApiModelProperty("数据修改时间")
|
||||||
|
private LocalDateTime updateDatetime;
|
||||||
|
|
||||||
|
@ApiModelProperty("版本名称")
|
||||||
|
private String versionName;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,52 @@
|
||||||
|
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 java.io.Serializable;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
import lombok.ToString;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
*
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author NiuZiYuan
|
||||||
|
* @since 2025-04-22
|
||||||
|
*/
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@ToString
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@TableName("social_tcm_disease_catalogue")
|
||||||
|
@ApiModel(value = "SocialTcmDiseaseCatalogue对象", description = "")
|
||||||
|
public class SocialTcmDiseaseCatalogue implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@TableId(value = "id", type = IdType.AUTO)
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
@ApiModelProperty("自费项目名称")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
@ApiModelProperty("自费项目编码")
|
||||||
|
private String socialCode;
|
||||||
|
|
||||||
|
@ApiModelProperty("版本名称")
|
||||||
|
private String versionName;
|
||||||
|
|
||||||
|
@ApiModelProperty("数据创建时间")
|
||||||
|
private LocalDateTime createDatetime;
|
||||||
|
|
||||||
|
@ApiModelProperty("数据修改时间")
|
||||||
|
private LocalDateTime updateDatetime;
|
||||||
|
|
||||||
|
@ApiModelProperty("备注")
|
||||||
|
private String remark;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,52 @@
|
||||||
|
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 java.io.Serializable;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
import lombok.ToString;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
*
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author NiuZiYuan
|
||||||
|
* @since 2025-04-22
|
||||||
|
*/
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@ToString
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@TableName("social_tcm_syndrome")
|
||||||
|
@ApiModel(value = "SocialTcmSyndrome对象", description = "")
|
||||||
|
public class SocialTcmSyndrome implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@TableId(value = "id", type = IdType.AUTO)
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
@ApiModelProperty("自费项目名称")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
@ApiModelProperty("自费项目编码")
|
||||||
|
private String socialCode;
|
||||||
|
|
||||||
|
@ApiModelProperty("版本名称")
|
||||||
|
private String versionName;
|
||||||
|
|
||||||
|
@ApiModelProperty("数据创建时间")
|
||||||
|
private LocalDateTime createDatetime;
|
||||||
|
|
||||||
|
@ApiModelProperty("数据修改时间")
|
||||||
|
private LocalDateTime updateDatetime;
|
||||||
|
|
||||||
|
@ApiModelProperty("备注")
|
||||||
|
private String remark;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
package com.syjiaer.clinic.server.mapper.social;
|
||||||
|
|
||||||
|
import com.syjiaer.clinic.server.entity.social.SocialChineseMedicinalGranula;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* Mapper 接口
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author NiuZiYuan
|
||||||
|
* @since 2025-04-22
|
||||||
|
*/
|
||||||
|
public interface SocialChineseMedicinalGranulaMapper extends BaseMapper<SocialChineseMedicinalGranula> {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
package com.syjiaer.clinic.server.mapper.social;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.syjiaer.clinic.server.entity.social.SocialChronicDisease;
|
||||||
|
|
||||||
|
public interface SocialChronicDiseaseMapper extends BaseMapper<SocialChronicDisease> {
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
package com.syjiaer.clinic.server.mapper.social;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.syjiaer.clinic.server.entity.social.SocialDiagnose;
|
||||||
|
|
||||||
|
public interface SocialDiagnoseMapper extends BaseMapper<SocialDiagnose> {
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
package com.syjiaer.clinic.server.mapper.social;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.syjiaer.clinic.server.entity.social.SocialIcpcDoctorDiagnose;
|
||||||
|
|
||||||
|
public interface SocialIcpcDoctorDiagnoseMapper extends BaseMapper<SocialIcpcDoctorDiagnose> {
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
package com.syjiaer.clinic.server.mapper.social;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.syjiaer.clinic.server.entity.social.SocialIcpcExaminationTreatment;
|
||||||
|
|
||||||
|
public interface SocialIcpcExaminationTreatmentMapper extends BaseMapper<SocialIcpcExaminationTreatment> {
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
package com.syjiaer.clinic.server.mapper.social;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.syjiaer.clinic.server.entity.social.SocialIcpcSelfPaying;
|
||||||
|
|
||||||
|
public interface SocialIcpcSelfPayingMapper extends BaseMapper<SocialIcpcSelfPaying> {
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
package com.syjiaer.clinic.server.mapper.social;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.syjiaer.clinic.server.entity.social.SocialItem;
|
||||||
|
|
||||||
|
public interface SocialItemMapper extends BaseMapper<SocialItem> {
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
package com.syjiaer.clinic.server.mapper.social;
|
||||||
|
|
||||||
|
import com.syjiaer.clinic.server.entity.social.SocialTcmDiseaseCatalogue;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* Mapper 接口
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author NiuZiYuan
|
||||||
|
* @since 2025-04-22
|
||||||
|
*/
|
||||||
|
public interface SocialTcmDiseaseCatalogueMapper extends BaseMapper<SocialTcmDiseaseCatalogue> {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
package com.syjiaer.clinic.server.mapper.social;
|
||||||
|
|
||||||
|
import com.syjiaer.clinic.server.entity.social.SocialTcmSyndrome;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* Mapper 接口
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author NiuZiYuan
|
||||||
|
* @since 2025-04-22
|
||||||
|
*/
|
||||||
|
public interface SocialTcmSyndromeMapper extends BaseMapper<SocialTcmSyndrome> {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -31,7 +31,7 @@ public class ItemGroupService extends BaseService {
|
||||||
* @param pageSize 页面大小
|
* @param pageSize 页面大小
|
||||||
* @param name 项目组名称
|
* @param name 项目组名称
|
||||||
*/
|
*/
|
||||||
public Page<ItemGroup> getItemGroupList(int pageNum, int pageSize, String name) {
|
public Page<ItemGroup> list(int pageNum, int pageSize, String name) {
|
||||||
QueryWrapper<ItemGroup> queryWrapper = new QueryWrapper<>();
|
QueryWrapper<ItemGroup> queryWrapper = new QueryWrapper<>();
|
||||||
if (name != null && !name.isEmpty()) {
|
if (name != null && !name.isEmpty()) {
|
||||||
queryWrapper.like("name", name);
|
queryWrapper.like("name", name);
|
||||||
|
|
@ -44,7 +44,7 @@ public class ItemGroupService extends BaseService {
|
||||||
* 获取项目组详情
|
* 获取项目组详情
|
||||||
* @param id 项目组id
|
* @param id 项目组id
|
||||||
*/
|
*/
|
||||||
public ItemGroup getItemGroupById(int id) {
|
public ItemGroup get(int id) {
|
||||||
return itemGroupMapper.selectById(id);
|
return itemGroupMapper.selectById(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -53,7 +53,7 @@ public class ItemGroupService extends BaseService {
|
||||||
* @param itemGroupParam 项目组参数
|
* @param itemGroupParam 项目组参数
|
||||||
*/
|
*/
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void saveItemGroup(ItemGroupParam itemGroupParam) {
|
public void save(ItemGroupParam itemGroupParam) {
|
||||||
if (itemGroupParam.getId() != null) {
|
if (itemGroupParam.getId() != null) {
|
||||||
QueryWrapper<ItemGroup> queryWrapper = new QueryWrapper<>();
|
QueryWrapper<ItemGroup> queryWrapper = new QueryWrapper<>();
|
||||||
queryWrapper.eq("name", itemGroupParam.getName()).ne("id", itemGroupParam.getId()).eq("del_flag", false);
|
queryWrapper.eq("name", itemGroupParam.getName()).ne("id", itemGroupParam.getId()).eq("del_flag", false);
|
||||||
|
|
@ -61,7 +61,7 @@ public class ItemGroupService extends BaseService {
|
||||||
if (!itemGroups.isEmpty()) {
|
if (!itemGroups.isEmpty()) {
|
||||||
throw new MessageException("项目分组名称已存在");
|
throw new MessageException("项目分组名称已存在");
|
||||||
}
|
}
|
||||||
ItemGroup itemGroup = getItemGroup(itemGroupParam);
|
ItemGroup itemGroup = getDetail(itemGroupParam);
|
||||||
itemGroup.setId(itemGroupParam.getId());
|
itemGroup.setId(itemGroupParam.getId());
|
||||||
itemGroupMapper.updateById(itemGroup);
|
itemGroupMapper.updateById(itemGroup);
|
||||||
return;
|
return;
|
||||||
|
|
@ -72,7 +72,7 @@ public class ItemGroupService extends BaseService {
|
||||||
if (!itemGroups.isEmpty()) {
|
if (!itemGroups.isEmpty()) {
|
||||||
throw new MessageException("项目分组名称已存在");
|
throw new MessageException("项目分组名称已存在");
|
||||||
}
|
}
|
||||||
ItemGroup itemGroup = getItemGroup(itemGroupParam);
|
ItemGroup itemGroup = getDetail(itemGroupParam);
|
||||||
itemGroupMapper.insert(itemGroup);
|
itemGroupMapper.insert(itemGroup);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -80,7 +80,7 @@ public class ItemGroupService extends BaseService {
|
||||||
* 生成项目组
|
* 生成项目组
|
||||||
* @param itemGroupParam 项目组参数
|
* @param itemGroupParam 项目组参数
|
||||||
*/
|
*/
|
||||||
private ItemGroup getItemGroup(ItemGroupParam itemGroupParam) {
|
private ItemGroup getDetail(ItemGroupParam itemGroupParam) {
|
||||||
ItemGroup itemGroup = new ItemGroup();
|
ItemGroup itemGroup = new ItemGroup();
|
||||||
BigDecimal unitPrice = new BigDecimal(0);
|
BigDecimal unitPrice = new BigDecimal(0);
|
||||||
BigDecimal purchaseUnitPrice = new BigDecimal(0);
|
BigDecimal purchaseUnitPrice = new BigDecimal(0);
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ public class ItemService extends BaseService {
|
||||||
* @param name 项目名称
|
* @param name 项目名称
|
||||||
* @param tel 手机号
|
* @param tel 手机号
|
||||||
*/
|
*/
|
||||||
public Page<Item> getPageList(int pageNum, int pageSize, String name, String tel) {
|
public Page<Item> list(int pageNum, int pageSize, String name, String tel) {
|
||||||
QueryWrapper<Item> queryWrapper = new QueryWrapper<>();
|
QueryWrapper<Item> queryWrapper = new QueryWrapper<>();
|
||||||
if (name != null && !name.isEmpty()) {
|
if (name != null && !name.isEmpty()) {
|
||||||
queryWrapper.like("name", name);
|
queryWrapper.like("name", name);
|
||||||
|
|
@ -40,36 +40,26 @@ public class ItemService extends BaseService {
|
||||||
* 根据id获取项目信息
|
* 根据id获取项目信息
|
||||||
* @param id 项目id
|
* @param id 项目id
|
||||||
*/
|
*/
|
||||||
public Item getItemById(int id) {
|
public Item get(int id) {
|
||||||
return itemMapper.selectById(id);
|
return itemMapper.selectById(id);
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
* 创建项目
|
* 创建项目
|
||||||
* @param item 项目信息
|
* @param item 项目信息
|
||||||
*/
|
*/
|
||||||
public void createItem(Item item) {
|
public void save(Item item) {
|
||||||
if (item == null) {
|
if (item == null) {
|
||||||
throw new MessageException("item参数为空");
|
throw new MessageException("item参数为空");
|
||||||
}
|
}
|
||||||
ManagerUser managerUser = getManagerUser();
|
ManagerUser managerUser = getManagerUser();
|
||||||
item.setCreateDatetime(LocalDateTime.now());
|
item.setCreateDatetime(LocalDateTime.now());
|
||||||
item.setCreateBy(managerUser.getName());
|
item.setCreateBy(managerUser.getName());
|
||||||
itemMapper.insert(item);
|
itemMapper.insertOrUpdate(item);
|
||||||
}
|
|
||||||
/*
|
|
||||||
* 更新项目信息
|
|
||||||
* @param item 项目信息
|
|
||||||
*/
|
|
||||||
public void updateItem(Item item) {
|
|
||||||
if (item == null) {
|
|
||||||
throw new MessageException("item参数为空");
|
|
||||||
}
|
|
||||||
item.setUpdateBy(getManagerUser().getName());
|
|
||||||
item.setUpdateDatetime(LocalDateTime.now());
|
|
||||||
itemMapper.updateById(item);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void del(Integer id) {
|
public void delete(Integer id) {
|
||||||
if (id == null) {
|
if (id == null) {
|
||||||
throw new MessageException("id参数为空");
|
throw new MessageException("id参数为空");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ public class OrganizationMemberService extends BaseService {
|
||||||
* @param name 姓名
|
* @param name 姓名
|
||||||
* @param tel 电话
|
* @param tel 电话
|
||||||
*/
|
*/
|
||||||
public Page<OrganizationMember> listPage(int pageNum, int pageSize, String name, String tel) {
|
public Page<OrganizationMember> pageList(int pageNum, int pageSize, String name, String tel) {
|
||||||
QueryWrapper<OrganizationMember> queryWrapper = new QueryWrapper<>();
|
QueryWrapper<OrganizationMember> queryWrapper = new QueryWrapper<>();
|
||||||
if (name != null && !name.isEmpty()) {
|
if (name != null && !name.isEmpty()) {
|
||||||
queryWrapper.like("name", name);
|
queryWrapper.like("name", name);
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,57 @@
|
||||||
|
package com.syjiaer.clinic.server.service.social;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.syjiaer.clinic.server.common.util.DateUtil;
|
||||||
|
import com.syjiaer.clinic.server.entity.social.SocialChineseMedicinalGranula;
|
||||||
|
import com.syjiaer.clinic.server.entity.social.SocialTcmDiseaseCatalogue;
|
||||||
|
import com.syjiaer.clinic.server.mapper.social.SocialChineseMedicinalGranulaMapper;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.time.format.DateTimeFormatter;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class SocialChineseMedicinalGranulaService {
|
||||||
|
@Autowired
|
||||||
|
private SocialChineseMedicinalGranulaMapper socialChineseMedicinalGranulaMapper;
|
||||||
|
@Autowired
|
||||||
|
private SocialDirectoryVersionService socialDirectoryVersionService;
|
||||||
|
public String download(List<String[]> tab_list, int type, String version_name) {
|
||||||
|
DateTimeFormatter dateTimeFormatter = DateUtil.getDateTimeFormatter(DateUtil.DATE_TIME_FORMAT);
|
||||||
|
List<String> code_list = new ArrayList<>();
|
||||||
|
List<SocialChineseMedicinalGranula> list = new ArrayList<>();
|
||||||
|
for (String[] line_array : tab_list) {
|
||||||
|
String flag = line_array[28];
|
||||||
|
if (!flag.equals("1")) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
SocialChineseMedicinalGranula socialChineseMedicinalGranula = new SocialChineseMedicinalGranula();
|
||||||
|
socialChineseMedicinalGranula.setSocialCode(line_array[1]);
|
||||||
|
socialChineseMedicinalGranula.setName(line_array[2]);
|
||||||
|
socialChineseMedicinalGranula.setRemark(line_array[40]);
|
||||||
|
socialChineseMedicinalGranula.setVersionName(line_array[42]);
|
||||||
|
socialChineseMedicinalGranula.setMedicinalMaterialName(line_array[22]);
|
||||||
|
socialChineseMedicinalGranula.setMinUnit(line_array[3]);
|
||||||
|
socialChineseMedicinalGranula.setSpecifications(line_array[5]);
|
||||||
|
socialChineseMedicinalGranula.setExpirationDate(line_array[7]);
|
||||||
|
socialChineseMedicinalGranula.setManufacturerName(line_array[8]);
|
||||||
|
socialChineseMedicinalGranula.setManufacturerAddress(line_array[9]);
|
||||||
|
socialChineseMedicinalGranula.setUnifiedSocialCreditCode(line_array[26]);
|
||||||
|
socialChineseMedicinalGranula.setEfficacyClassification(line_array[22]);
|
||||||
|
socialChineseMedicinalGranula.setGeneralUsage(line_array[24]);
|
||||||
|
socialChineseMedicinalGranula.setMajorFunction(line_array[23]);
|
||||||
|
list.add(socialChineseMedicinalGranula);
|
||||||
|
code_list.add(socialChineseMedicinalGranula.getSocialCode());
|
||||||
|
}
|
||||||
|
QueryWrapper<SocialChineseMedicinalGranula> queryWrapper = new QueryWrapper<>();
|
||||||
|
queryWrapper.in("social_code", code_list);
|
||||||
|
socialChineseMedicinalGranulaMapper.delete(queryWrapper);
|
||||||
|
socialChineseMedicinalGranulaMapper.insert(list, 100);
|
||||||
|
socialDirectoryVersionService.setSocialDirectoryVersion(type, version_name, list.get(0).getVersionName(), list.size());
|
||||||
|
return list.get(0).getVersionName();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,50 @@
|
||||||
|
package com.syjiaer.clinic.server.service.social;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.syjiaer.clinic.server.common.util.DateUtil;
|
||||||
|
import com.syjiaer.clinic.server.entity.social.SocialChronicDisease;
|
||||||
|
import com.syjiaer.clinic.server.entity.social.SocialDiagnose;
|
||||||
|
import com.syjiaer.clinic.server.entity.social.SocialTcmDiseaseCatalogue;
|
||||||
|
import com.syjiaer.clinic.server.mapper.social.SocialChronicDiseaseMapper;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.time.format.DateTimeFormatter;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class SocialChronicDiseaseService {
|
||||||
|
@Autowired
|
||||||
|
private SocialChronicDiseaseMapper socialChronicDiseaseMapper;
|
||||||
|
@Autowired
|
||||||
|
private SocialDirectoryVersionService socialDirectoryVersionService;
|
||||||
|
|
||||||
|
public String download(List<String[]> tab_list, int type, String version_name) {
|
||||||
|
DateTimeFormatter dateTimeFormatter = DateUtil.getDateTimeFormatter(DateUtil.DATE_TIME_FORMAT);
|
||||||
|
List<String> code_list = new ArrayList<>();
|
||||||
|
List<SocialChronicDisease> list = new ArrayList<>();
|
||||||
|
for (String[] line_array : tab_list) {
|
||||||
|
String flag = line_array[5];
|
||||||
|
if (!flag.equals("1")) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
SocialChronicDisease socialChronicDisease = new SocialChronicDisease();
|
||||||
|
socialChronicDisease.setSocialCode(line_array[0]);
|
||||||
|
socialChronicDisease.setName(line_array[14]);
|
||||||
|
socialChronicDisease.setChronicDiseasesName(line_array[1]);
|
||||||
|
socialChronicDisease.setVersionName(line_array[9]);
|
||||||
|
socialChronicDisease.setCreateDatetime(LocalDateTime.parse(line_array[7], dateTimeFormatter));
|
||||||
|
socialChronicDisease.setUpdateDatetime(LocalDateTime.parse(line_array[8], dateTimeFormatter));
|
||||||
|
list.add(socialChronicDisease);
|
||||||
|
code_list.add(socialChronicDisease.getSocialCode());
|
||||||
|
}
|
||||||
|
QueryWrapper<SocialChronicDisease> queryWrapper = new QueryWrapper<>();
|
||||||
|
queryWrapper.in("social_code", code_list);
|
||||||
|
socialChronicDiseaseMapper.delete(queryWrapper);
|
||||||
|
socialChronicDiseaseMapper.insert(list, 100);
|
||||||
|
socialDirectoryVersionService.setSocialDirectoryVersion(type, version_name, list.get(0).getVersionName(), list.size());
|
||||||
|
return list.get(0).getVersionName();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,52 @@
|
||||||
|
package com.syjiaer.clinic.server.service.social;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson2.JSONObject;
|
||||||
|
import com.syjiaer.clinic.server.common.util.DateUtil;
|
||||||
|
import com.syjiaer.clinic.server.common.util.DictoryUtil;
|
||||||
|
import com.syjiaer.clinic.server.entity.social.SocialDiagnose;
|
||||||
|
import com.syjiaer.clinic.server.entity.social.SocialItem;
|
||||||
|
import com.syjiaer.clinic.server.mapper.social.SocialDiagnoseMapper;
|
||||||
|
import com.syjiaer.clinic.server.mapper.social.SocialItemMapper;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
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;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class SocialDiagnoseService {
|
||||||
|
@Autowired
|
||||||
|
private SocialDiagnoseMapper socialDiagnoseMapper;
|
||||||
|
@Autowired
|
||||||
|
private SocialDirectoryVersionService socialDirectoryVersionService;
|
||||||
|
|
||||||
|
public String download(List<String[]> tab_list, int type, String version_name) {
|
||||||
|
DateTimeFormatter dateTimeFormatter = DateUtil.getDateTimeFormatter(DateUtil.DATE_TIME_FORMAT);
|
||||||
|
List<SocialDiagnose> list = new ArrayList<>();
|
||||||
|
for (String[] line_array : tab_list) {
|
||||||
|
String flag = line_array[18];
|
||||||
|
if (!flag.equals("1")) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
SocialDiagnose socialDiagnose = new SocialDiagnose();
|
||||||
|
String code = line_array[0];
|
||||||
|
socialDiagnose.setSocialCode(code);
|
||||||
|
socialDiagnose.setVersionName(line_array[22]);
|
||||||
|
socialDiagnose.setChapterName(line_array[3]);
|
||||||
|
socialDiagnose.setSecondaryName(line_array[5]);
|
||||||
|
socialDiagnose.setCategoryName(line_array[7]);
|
||||||
|
socialDiagnose.setSuborderName(line_array[9]);
|
||||||
|
socialDiagnose.setDiagnosisName(line_array[11]);
|
||||||
|
socialDiagnose.setCreateDatetime(LocalDateTime.parse(line_array[20], dateTimeFormatter));
|
||||||
|
socialDiagnose.setUpdateDatetime(LocalDateTime.parse(line_array[21], dateTimeFormatter));
|
||||||
|
list.add(socialDiagnose);
|
||||||
|
}
|
||||||
|
socialDiagnoseMapper.insert(list, 100);
|
||||||
|
socialDirectoryVersionService.setSocialDirectoryVersion(type, version_name, list.get(0).getVersionName(), list.size());
|
||||||
|
return list.get(0).getVersionName();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -42,17 +42,33 @@ public class SocialDirectoryService extends BaseService {
|
||||||
@Autowired
|
@Autowired
|
||||||
private DictoryUtil dictoryUtil;
|
private DictoryUtil dictoryUtil;
|
||||||
@Autowired
|
@Autowired
|
||||||
private StringUtil stringUtil;
|
private SocialDiagnoseService socialDiagnoseService;
|
||||||
|
@Autowired
|
||||||
|
private SocialItemService socialItemService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private SocialDirectoryMapper socialDirectoryMapper;
|
private SocialDirectoryMapper socialDirectoryMapper;
|
||||||
@Autowired
|
@Autowired
|
||||||
|
private SocialChronicDiseaseService socialChronicDiseaseService;
|
||||||
|
@Autowired
|
||||||
private SocialDirectoryUpinfoMapper socialDirectoryUpinfoMapper;
|
private SocialDirectoryUpinfoMapper socialDirectoryUpinfoMapper;
|
||||||
@Autowired
|
@Autowired
|
||||||
private SocialDirectoryLimitMapper socialDirectoryLimitMapper;
|
private SocialDirectoryLimitMapper socialDirectoryLimitMapper;
|
||||||
@Autowired
|
@Autowired
|
||||||
private SocialDirectorySelfMapper socialDirectorySelfMapper;
|
private SocialDirectorySelfMapper socialDirectorySelfMapper;
|
||||||
@Autowired
|
@Autowired
|
||||||
private SocialDirectoryVersionMapper socialDirectoryVersionMapper;
|
private SocialDirectoryVersionService socialDirectoryVersionService;
|
||||||
|
@Autowired
|
||||||
|
private SocialIcpcDoctorDiagnoseService socialIcpcDoctorDiagnoseService;
|
||||||
|
@Autowired
|
||||||
|
private SocialIcpcExaminationTreatmentService socialIcpcExaminationTreatmentService;
|
||||||
|
@Autowired
|
||||||
|
private SocialIcpcSelfPayingService socialIcpcSelfPayingService;
|
||||||
|
@Autowired
|
||||||
|
private SocialTcmDiseaseCatalogueService socialTcmDiseaseCatalogueService;
|
||||||
|
@Autowired
|
||||||
|
private SocialTcmSyndromeService socialTcmSyndromeService;
|
||||||
|
@Autowired
|
||||||
|
private SocialChineseMedicinalGranulaService socialChineseMedicinalGranulaService;
|
||||||
private Logger logger = Logger.getLogger(SocialDirectoryService.class.getName());
|
private Logger logger = Logger.getLogger(SocialDirectoryService.class.getName());
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -123,8 +139,41 @@ public class SocialDirectoryService extends BaseService {
|
||||||
queryWrapper.in("code", code_list);
|
queryWrapper.in("code", code_list);
|
||||||
socialDirectoryMapper.delete(queryWrapper);
|
socialDirectoryMapper.delete(queryWrapper);
|
||||||
}
|
}
|
||||||
|
String current_version_name = "";
|
||||||
|
switch (type) {
|
||||||
|
case 1301:
|
||||||
|
case 1302:
|
||||||
|
case 1306:
|
||||||
|
current_version_name = insertSocialDirectorys(version_name, type, infno, tab_list);
|
||||||
|
break;
|
||||||
|
case 1305:
|
||||||
|
case 1321:
|
||||||
|
current_version_name = socialItemService.download(tab_list, infno, type, version_name);
|
||||||
|
break;
|
||||||
|
case 1307:
|
||||||
|
current_version_name = socialDiagnoseService.download(tab_list, type, version_name);
|
||||||
|
break;
|
||||||
|
case 1309:
|
||||||
|
current_version_name = socialChronicDiseaseService.download(tab_list, type, version_name);
|
||||||
|
break;
|
||||||
|
case 1314:
|
||||||
|
current_version_name = socialTcmDiseaseCatalogueService.download(tab_list, type, version_name);
|
||||||
|
break;
|
||||||
|
case 1315:
|
||||||
|
current_version_name = socialTcmSyndromeService.download(tab_list, type, version_name);
|
||||||
|
break;
|
||||||
|
case 1320:
|
||||||
|
current_version_name = socialChineseMedicinalGranulaService.download(tab_list, type, version_name);
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
Map<String, Object> hashMap = new HashMap<>();
|
||||||
|
hashMap.put("current_version_name", current_version_name);
|
||||||
|
hashMap.put("pre_version_name", version_name);
|
||||||
|
return hashMap;
|
||||||
|
}
|
||||||
|
|
||||||
//将tab_list中的每一行存入数据库
|
private String insertSocialDirectorys(String version_name, int type, String infno, List<String[]> tab_list) {
|
||||||
Map<String, String> title_map = dictoryUtil.getTitleMap(infno);
|
Map<String, String> title_map = dictoryUtil.getTitleMap(infno);
|
||||||
List<SocialDirectory> list = new ArrayList<>();
|
List<SocialDirectory> list = new ArrayList<>();
|
||||||
HashMap<String, SocialDirectory> tmp_map = new HashMap<>();
|
HashMap<String, SocialDirectory> tmp_map = new HashMap<>();
|
||||||
|
|
@ -163,58 +212,27 @@ public class SocialDirectoryService extends BaseService {
|
||||||
socialDirectory.setCreateDatetime(LocalDateTime.parse(line_array[15], dateTimeFormatter));
|
socialDirectory.setCreateDatetime(LocalDateTime.parse(line_array[15], dateTimeFormatter));
|
||||||
socialDirectory.setUpdateDatetime(LocalDateTime.parse(line_array[16], dateTimeFormatter));
|
socialDirectory.setUpdateDatetime(LocalDateTime.parse(line_array[16], dateTimeFormatter));
|
||||||
}
|
}
|
||||||
if (type == 1305) {
|
|
||||||
flag = line_array[6];
|
|
||||||
socialDirectory.setKeyword(line_array[9] + "," + line_array[2]);
|
|
||||||
}
|
|
||||||
if (type == 1306) {
|
if (type == 1306) {
|
||||||
flag = line_array[67];
|
flag = line_array[67];
|
||||||
socialDirectory.setProducer(line_array[59]);
|
socialDirectory.setProducer(line_array[59]);
|
||||||
socialDirectory.setKeyword(line_array[4]);
|
socialDirectory.setKeyword(line_array[4]);
|
||||||
}
|
}
|
||||||
if (type == 1307) {
|
|
||||||
flag = line_array[18];
|
|
||||||
socialDirectory.setKeyword(line_array[5] + "," + line_array[7]);
|
|
||||||
}
|
|
||||||
if (type == 1309) {
|
|
||||||
flag = line_array[5];
|
|
||||||
//因为1309不使用版本名称,而是版本编号,所以需要手动设置
|
|
||||||
socialDirectory.setVersionName(line_array[11]);
|
|
||||||
}
|
|
||||||
if (type == 1320) {
|
|
||||||
flag = line_array[28];
|
|
||||||
socialDirectory.setKeyword(line_array[23] + "," + line_array[3] + "," + line_array[4]);
|
|
||||||
}
|
|
||||||
if (type == 1321) {
|
|
||||||
flag = line_array[13];
|
|
||||||
socialDirectory.setKeyword(line_array[6] + "," + line_array[10]);
|
|
||||||
}
|
|
||||||
SocialDirectory tmp_socialDirectory = tmp_map.get(code);
|
SocialDirectory tmp_socialDirectory = tmp_map.get(code);
|
||||||
if (tmp_socialDirectory == null && flag.equals("1")) {
|
if (tmp_socialDirectory == null && flag.equals("1")) {
|
||||||
list.add(socialDirectory);
|
list.add(socialDirectory);
|
||||||
tmp_map.put(code, socialDirectory);
|
tmp_map.put(code, socialDirectory);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
socialDirectoryMapper.insert(list, 100);
|
socialDirectoryVersionService.setSocialDirectoryVersion(type, version_name, list.get(0).getVersionName(), list.size());
|
||||||
SocialDirectoryVersion socialDirectoryVersion = new SocialDirectoryVersion();
|
return list.get(0).getVersionName();
|
||||||
socialDirectoryVersion.setId(stringUtil.generateRandomId());
|
|
||||||
socialDirectoryVersion.setType(type);
|
|
||||||
socialDirectoryVersion.setPreVersionName(version_name);
|
|
||||||
socialDirectoryVersion.setCurrentVersionName(list.get(0).getVersionName());
|
|
||||||
socialDirectoryVersion.setSize(list.size());
|
|
||||||
socialDirectoryVersion.setCreateDatetime(LocalDateTime.now());
|
|
||||||
socialDirectoryVersionMapper.insert(socialDirectoryVersion);
|
|
||||||
Map<String, Object> hashMap = new HashMap<>();
|
|
||||||
hashMap.put("current_version_name", list.get(0).getVersionName());
|
|
||||||
hashMap.put("pre_version_name", version_name);
|
|
||||||
return hashMap;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public Map<String, Object> download2(String pre_version_name, int type) {
|
public Map<String, Object> download2(String pre_version_name, int type) {
|
||||||
Integer[] type_list = {1361, 1362, 1363};
|
Integer[] type_list = {1361, 1362, 1363};
|
||||||
//判断type在数组中
|
//判断type在数组中
|
||||||
if (!Arrays.asList(type_list).contains(type)) {
|
if (!Arrays.asList(type_list).contains(type)) {
|
||||||
throw new MessageException("参数 type 不能为空");
|
throw new MessageException("参数 type 不能为空");
|
||||||
}
|
}
|
||||||
Map<String, Object> input = new HashMap<>();
|
Map<String, Object> input = new HashMap<>();
|
||||||
input.put("ver", pre_version_name);
|
input.put("ver", pre_version_name);
|
||||||
|
|
@ -226,86 +244,24 @@ public class SocialDirectoryService extends BaseService {
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
if (result == null) {
|
if (result == null || result.getJSONArray("result") == null || result.getJSONArray("result").isEmpty()) {
|
||||||
throw new MessageException("获取数据失败");
|
throw new MessageException("获取数据失败");
|
||||||
}
|
}
|
||||||
JSONArray jsonArray = result.getJSONArray("result");
|
JSONArray jsonArray = result.getJSONArray("result");
|
||||||
if (jsonArray == null || jsonArray.isEmpty()) {
|
String versionName = "";
|
||||||
throw new MessageException("获取数据失败");
|
switch (type) {
|
||||||
|
case 1361:
|
||||||
|
versionName = socialIcpcDoctorDiagnoseService.download(jsonArray, pre_version_name);
|
||||||
|
break;
|
||||||
|
case 1362:
|
||||||
|
versionName = socialIcpcExaminationTreatmentService.download(jsonArray, pre_version_name);
|
||||||
|
break;
|
||||||
|
case 1363:
|
||||||
|
versionName = socialIcpcSelfPayingService.download(jsonArray, pre_version_name);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
List<String> code_list = new ArrayList<>();
|
|
||||||
List<SocialDirectory> 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<SocialDirectory> 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<String, Object> hashMap = new HashMap<>();
|
Map<String, Object> hashMap = new HashMap<>();
|
||||||
hashMap.put("current_version_name", versionName);
|
hashMap.put("current_version_name", versionName);
|
||||||
hashMap.put("pre_version_name", pre_version_name);
|
hashMap.put("pre_version_name", pre_version_name);
|
||||||
|
|
@ -492,20 +448,20 @@ public class SocialDirectoryService extends BaseService {
|
||||||
SocialDirectoryView socialDirectoryView = JSONObject.parseObject(JSONObject.toJSONString(socialDirectory), SocialDirectoryView.class);
|
SocialDirectoryView socialDirectoryView = JSONObject.parseObject(JSONObject.toJSONString(socialDirectory), SocialDirectoryView.class);
|
||||||
SocialDirectoryUpinfo socialDirectoryUpinfo = socialDirectoryUpinfoMapper.selectByCode(code);
|
SocialDirectoryUpinfo socialDirectoryUpinfo = socialDirectoryUpinfoMapper.selectByCode(code);
|
||||||
if (socialDirectoryUpinfo != null) {
|
if (socialDirectoryUpinfo != null) {
|
||||||
socialDirectoryUpinfo.setBegndate( socialDirectoryUpinfo.getBegndate());
|
socialDirectoryUpinfo.setBegndate(socialDirectoryUpinfo.getBegndate());
|
||||||
socialDirectoryView.setEnddate( socialDirectoryUpinfo.getEnddate());
|
socialDirectoryView.setEnddate(socialDirectoryUpinfo.getEnddate());
|
||||||
socialDirectoryView.setWubi( socialDirectoryUpinfo.getWubi());
|
socialDirectoryView.setWubi(socialDirectoryUpinfo.getWubi());
|
||||||
socialDirectoryView.setPinyin( socialDirectoryUpinfo.getPinyin());
|
socialDirectoryView.setPinyin(socialDirectoryUpinfo.getPinyin());
|
||||||
}
|
}
|
||||||
SocialDirectoryLimit socialDirectoryLimit = socialDirectoryLimitMapper.selectByCode(code);
|
SocialDirectoryLimit socialDirectoryLimit = socialDirectoryLimitMapper.selectByCode(code);
|
||||||
if (socialDirectoryLimit != null) {
|
if (socialDirectoryLimit != null) {
|
||||||
socialDirectoryView.setHilistPricUplmtAmt( socialDirectoryLimit.getHilistPricUplmtAmt());
|
socialDirectoryView.setHilistPricUplmtAmt(socialDirectoryLimit.getHilistPricUplmtAmt());
|
||||||
socialDirectoryView.setHilistLmtpricType( socialDirectoryLimit.getHilistLmtpricType());
|
socialDirectoryView.setHilistLmtpricType(socialDirectoryLimit.getHilistLmtpricType());
|
||||||
}
|
}
|
||||||
SocialDirectorySelf socialDirectorySelf = socialDirectorySelfMapper.selectByCode(code);
|
SocialDirectorySelf socialDirectorySelf = socialDirectorySelfMapper.selectByCode(code);
|
||||||
if (socialDirectorySelf != null) {
|
if (socialDirectorySelf != null) {
|
||||||
socialDirectoryView.setSelfpayPropType( socialDirectorySelf.getSelfpayPropType());
|
socialDirectoryView.setSelfpayPropType(socialDirectorySelf.getSelfpayPropType());
|
||||||
socialDirectoryView.setSelfpayProp( socialDirectorySelf.getSelfpayProp());
|
socialDirectoryView.setSelfpayProp(socialDirectorySelf.getSelfpayProp());
|
||||||
}
|
}
|
||||||
return socialDirectoryView;
|
return socialDirectoryView;
|
||||||
}
|
}
|
||||||
|
|
@ -533,15 +489,15 @@ public class SocialDirectoryService extends BaseService {
|
||||||
// 执行查询
|
// 执行查询
|
||||||
|
|
||||||
codeqw.select("code");
|
codeqw.select("code");
|
||||||
long count=socialDirectoryMapper.selectCount(codeqw);
|
long count = socialDirectoryMapper.selectCount(codeqw);
|
||||||
|
|
||||||
codeqw.last("LIMIT " + size + " OFFSET " + (page - 1) * size);
|
codeqw.last("LIMIT " + size + " OFFSET " + (page - 1) * size);
|
||||||
List<String> codeList = listObjs(codeqw, socialDirectoryMapper,obj -> obj.toString());
|
List<String> codeList = listObjs(codeqw, socialDirectoryMapper, obj -> obj.toString());
|
||||||
Page<SocialDirectoryView> result = new Page<>();
|
Page<SocialDirectoryView> result = new Page<>();
|
||||||
if (!codeList.isEmpty()){
|
if (!codeList.isEmpty()) {
|
||||||
List<SocialDirectoryView> list = fullList(codeList);
|
List<SocialDirectoryView> list = fullList(codeList);
|
||||||
result.setList(list);
|
result.setList(list);
|
||||||
}else{
|
} else {
|
||||||
result.setList(new ArrayList<>());
|
result.setList(new ArrayList<>());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -553,13 +509,14 @@ public class SocialDirectoryService extends BaseService {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 搜索诊断列表
|
* 搜索诊断列表
|
||||||
|
*
|
||||||
* @param keyword
|
* @param keyword
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public List<SocialDirectory> getDiagnosis(String keyword) {
|
public List<SocialDirectory> getDiagnosis(String keyword) {
|
||||||
QueryWrapper<SocialDirectory> queryWrapper = new QueryWrapper<>();
|
QueryWrapper<SocialDirectory> queryWrapper = new QueryWrapper<>();
|
||||||
queryWrapper.eq("type", 1307);
|
queryWrapper.eq("type", 1307);
|
||||||
if (keyword != null &&!keyword.isEmpty()) {
|
if (keyword != null && !keyword.isEmpty()) {
|
||||||
queryWrapper.and(wrapper -> wrapper.like("name", keyword).or().like("code", keyword).or().like("keyword", keyword));
|
queryWrapper.and(wrapper -> wrapper.like("name", keyword).or().like("code", keyword).or().like("keyword", keyword));
|
||||||
}
|
}
|
||||||
queryWrapper.select("code", "name", "data");
|
queryWrapper.select("code", "name", "data");
|
||||||
|
|
|
||||||
|
|
@ -2,12 +2,15 @@ package com.syjiaer.clinic.server.service.social;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.syjiaer.clinic.server.common.exception.MessageException;
|
import com.syjiaer.clinic.server.common.exception.MessageException;
|
||||||
|
import com.syjiaer.clinic.server.common.util.StringUtil;
|
||||||
import com.syjiaer.clinic.server.common.vo.Page;
|
import com.syjiaer.clinic.server.common.vo.Page;
|
||||||
import com.syjiaer.clinic.server.entity.social.SocialDirectoryVersion;
|
import com.syjiaer.clinic.server.entity.social.SocialDirectoryVersion;
|
||||||
|
import com.syjiaer.clinic.server.entity.social.SocialItem;
|
||||||
import com.syjiaer.clinic.server.mapper.social.SocialDirectoryVersionMapper;
|
import com.syjiaer.clinic.server.mapper.social.SocialDirectoryVersionMapper;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
/*
|
/*
|
||||||
|
|
@ -17,6 +20,8 @@ import java.util.List;
|
||||||
public class SocialDirectoryVersionService {
|
public class SocialDirectoryVersionService {
|
||||||
@Autowired
|
@Autowired
|
||||||
private SocialDirectoryVersionMapper socialDirectoryVersionMapper;
|
private SocialDirectoryVersionMapper socialDirectoryVersionMapper;
|
||||||
|
@Autowired
|
||||||
|
private StringUtil stringUtil;
|
||||||
/*
|
/*
|
||||||
* 获取当前版本信息
|
* 获取当前版本信息
|
||||||
* @param type 目录类型
|
* @param type 目录类型
|
||||||
|
|
@ -72,4 +77,21 @@ public class SocialDirectoryVersionService {
|
||||||
result.setList(socialDirectoryList);
|
result.setList(socialDirectoryList);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
|
* 添加版本记录
|
||||||
|
* @param type 目录类型
|
||||||
|
* @param preVersionName 上一个版本名称
|
||||||
|
* @param currentVersionName 当前版本名称
|
||||||
|
* @param size 数据量
|
||||||
|
*/
|
||||||
|
public void setSocialDirectoryVersion(int type, String preVersionName, String currentVersionName, int size) {
|
||||||
|
SocialDirectoryVersion socialDirectoryVersion = new SocialDirectoryVersion();
|
||||||
|
socialDirectoryVersion.setId(stringUtil.generateRandomId());
|
||||||
|
socialDirectoryVersion.setType(type);
|
||||||
|
socialDirectoryVersion.setPreVersionName(preVersionName);
|
||||||
|
socialDirectoryVersion.setCurrentVersionName(currentVersionName);
|
||||||
|
socialDirectoryVersion.setSize(size);
|
||||||
|
socialDirectoryVersion.setCreateDatetime(LocalDateTime.now());
|
||||||
|
socialDirectoryVersionMapper.insert(socialDirectoryVersion);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,50 @@
|
||||||
|
package com.syjiaer.clinic.server.service.social;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson2.JSONArray;
|
||||||
|
import com.alibaba.fastjson2.JSONObject;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.syjiaer.clinic.server.common.exception.MessageException;
|
||||||
|
import com.syjiaer.clinic.server.common.util.DateUtil;
|
||||||
|
import com.syjiaer.clinic.server.entity.social.SocialIcpcDoctorDiagnose;
|
||||||
|
import com.syjiaer.clinic.server.mapper.social.SocialIcpcDoctorDiagnoseMapper;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.time.format.DateTimeFormatter;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class SocialIcpcDoctorDiagnoseService {
|
||||||
|
@Autowired
|
||||||
|
private SocialIcpcDoctorDiagnoseMapper socialIcpcDoctorDiagnoseMapper;
|
||||||
|
@Autowired
|
||||||
|
private SocialDirectoryVersionService socialDirectoryVersionService;
|
||||||
|
|
||||||
|
public String download(JSONArray jsonArray, String pre_version_name) {
|
||||||
|
List<String> code_list = new ArrayList<>();
|
||||||
|
DateTimeFormatter dateTimeFormatter = DateUtil.getDateTimeFormatter(DateUtil.DATE_TIME_FORMAT);
|
||||||
|
List<SocialIcpcDoctorDiagnose> list = new ArrayList<>();
|
||||||
|
for (int i = 0; i < jsonArray.size(); i++) {
|
||||||
|
JSONObject jsonObject = jsonArray.getJSONObject(i);
|
||||||
|
if (!jsonObject.getString("vali_flag").equals("1")) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
SocialIcpcDoctorDiagnose socialIcpcDoctorDiagnose = new SocialIcpcDoctorDiagnose();
|
||||||
|
socialIcpcDoctorDiagnose.setName(jsonObject.getString("six_name"));
|
||||||
|
socialIcpcDoctorDiagnose.setSocialCode(jsonObject.getString("six_code"));
|
||||||
|
socialIcpcDoctorDiagnose.setVersionName(jsonObject.getString("ver"));
|
||||||
|
socialIcpcDoctorDiagnose.setCreateDatetime(LocalDateTime.parse(jsonObject.getString("crte_time"), dateTimeFormatter));
|
||||||
|
socialIcpcDoctorDiagnose.setUpdateDatetime(LocalDateTime.parse(jsonObject.getString("updt_time"), dateTimeFormatter));
|
||||||
|
list.add(socialIcpcDoctorDiagnose);
|
||||||
|
code_list.add(socialIcpcDoctorDiagnose.getSocialCode());
|
||||||
|
}
|
||||||
|
QueryWrapper<SocialIcpcDoctorDiagnose> queryWrapper = new QueryWrapper<>();
|
||||||
|
queryWrapper.in("social_code", code_list);
|
||||||
|
socialIcpcDoctorDiagnoseMapper.delete(queryWrapper);
|
||||||
|
socialIcpcDoctorDiagnoseMapper.insert(list, 100);
|
||||||
|
socialDirectoryVersionService.setSocialDirectoryVersion(1361, pre_version_name, list.get(0).getVersionName(), list.size());
|
||||||
|
return list.get(0).getVersionName();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,52 @@
|
||||||
|
package com.syjiaer.clinic.server.service.social;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson2.JSONArray;
|
||||||
|
import com.alibaba.fastjson2.JSONObject;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.syjiaer.clinic.server.common.exception.MessageException;
|
||||||
|
import com.syjiaer.clinic.server.common.util.DateUtil;
|
||||||
|
import com.syjiaer.clinic.server.entity.social.SocialIcpcDoctorDiagnose;
|
||||||
|
import com.syjiaer.clinic.server.entity.social.SocialIcpcExaminationTreatment;
|
||||||
|
import com.syjiaer.clinic.server.mapper.social.SocialIcpcExaminationTreatmentMapper;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.time.format.DateTimeFormatter;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class SocialIcpcExaminationTreatmentService {
|
||||||
|
@Autowired
|
||||||
|
private SocialIcpcExaminationTreatmentMapper socialIcpcExaminationTreatmentMapper;
|
||||||
|
@Autowired
|
||||||
|
private SocialDirectoryVersionService socialDirectoryVersionService;
|
||||||
|
public String download(JSONArray jsonArray, String pre_version_name) {
|
||||||
|
List<String> code_list = new ArrayList<>();
|
||||||
|
DateTimeFormatter dateTimeFormatter = DateUtil.getDateTimeFormatter(DateUtil.DATE_TIME_FORMAT);
|
||||||
|
List<SocialIcpcExaminationTreatment> list = new ArrayList<>();
|
||||||
|
for (int i = 0; i < jsonArray.size(); i++) {
|
||||||
|
JSONObject jsonObject = jsonArray.getJSONObject(i);
|
||||||
|
if (!jsonObject.getString("vali_flag").equals("1")) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
SocialIcpcExaminationTreatment socialIcpcExaminationTreatment = new SocialIcpcExaminationTreatment();
|
||||||
|
socialIcpcExaminationTreatment.setSocialCode(jsonObject.getString("chrgitm_nat_code"));
|
||||||
|
socialIcpcExaminationTreatment.setVersionName(jsonObject.getString("ver"));
|
||||||
|
socialIcpcExaminationTreatment.setIcpcCode(jsonObject.getString("icpc_code"));
|
||||||
|
socialIcpcExaminationTreatment.setIcpcCodeFlag(jsonObject.getString("icpc_code_flag"));
|
||||||
|
socialIcpcExaminationTreatment.setName(jsonObject.getString("chrgitm_name"));
|
||||||
|
socialIcpcExaminationTreatment.setCreateDatetime(LocalDateTime.parse(jsonObject.getString("crte_time"), dateTimeFormatter));
|
||||||
|
socialIcpcExaminationTreatment.setUpdateDatetime(LocalDateTime.parse(jsonObject.getString("updt_time"), dateTimeFormatter));
|
||||||
|
list.add(socialIcpcExaminationTreatment);
|
||||||
|
code_list.add(socialIcpcExaminationTreatment.getSocialCode());
|
||||||
|
}
|
||||||
|
QueryWrapper<SocialIcpcExaminationTreatment> queryWrapper = new QueryWrapper<>();
|
||||||
|
queryWrapper.in("social_code", code_list);
|
||||||
|
socialIcpcExaminationTreatmentMapper.delete(queryWrapper);
|
||||||
|
socialIcpcExaminationTreatmentMapper.insert(list, 100);
|
||||||
|
socialDirectoryVersionService.setSocialDirectoryVersion(1361, pre_version_name, list.get(0).getVersionName(), list.size());
|
||||||
|
return list.get(0).getVersionName();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,50 @@
|
||||||
|
package com.syjiaer.clinic.server.service.social;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson2.JSONArray;
|
||||||
|
import com.alibaba.fastjson2.JSONObject;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.syjiaer.clinic.server.common.exception.MessageException;
|
||||||
|
import com.syjiaer.clinic.server.common.util.DateUtil;
|
||||||
|
import com.syjiaer.clinic.server.entity.social.SocialIcpcDoctorDiagnose;
|
||||||
|
import com.syjiaer.clinic.server.entity.social.SocialIcpcSelfPaying;
|
||||||
|
import com.syjiaer.clinic.server.mapper.social.SocialIcpcSelfPayingMapper;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.time.format.DateTimeFormatter;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
@Service
|
||||||
|
public class SocialIcpcSelfPayingService {
|
||||||
|
@Autowired
|
||||||
|
private SocialIcpcSelfPayingMapper socialIcpcSelfPayingMapper;
|
||||||
|
@Autowired
|
||||||
|
private SocialDirectoryVersionService socialDirectoryVersionService;
|
||||||
|
|
||||||
|
public String download(JSONArray jsonArray, String pre_version_name) {
|
||||||
|
List<String> code_list = new ArrayList<>();
|
||||||
|
DateTimeFormatter dateTimeFormatter = DateUtil.getDateTimeFormatter(DateUtil.DATE_TIME_FORMAT);
|
||||||
|
List<SocialIcpcSelfPaying> list = new ArrayList<>();
|
||||||
|
for (int i = 0; i < jsonArray.size(); i++) {
|
||||||
|
JSONObject jsonObject = jsonArray.getJSONObject(i);
|
||||||
|
if (!jsonObject.getString("vali_flag").equals("1")) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
SocialIcpcSelfPaying socialIcpcSelfPaying = new SocialIcpcSelfPaying();
|
||||||
|
socialIcpcSelfPaying.setSocialCode(jsonObject.getString("ownpay_code"));
|
||||||
|
socialIcpcSelfPaying.setVersionName(jsonObject.getString("ver"));
|
||||||
|
socialIcpcSelfPaying.setName(jsonObject.getString("ownpay_name"));
|
||||||
|
socialIcpcSelfPaying.setCreateDatetime(LocalDateTime.parse(jsonObject.getString("crte_time"), dateTimeFormatter));
|
||||||
|
socialIcpcSelfPaying.setUpdateDatetime(LocalDateTime.parse(jsonObject.getString("updt_time"), dateTimeFormatter));
|
||||||
|
list.add(socialIcpcSelfPaying);
|
||||||
|
code_list.add(socialIcpcSelfPaying.getSocialCode());
|
||||||
|
}
|
||||||
|
QueryWrapper<SocialIcpcSelfPaying> queryWrapper = new QueryWrapper<>();
|
||||||
|
queryWrapper.in("social_code", code_list);
|
||||||
|
socialIcpcSelfPayingMapper.delete(queryWrapper);
|
||||||
|
socialIcpcSelfPayingMapper.insert(list, 100);
|
||||||
|
socialDirectoryVersionService.setSocialDirectoryVersion(1361, pre_version_name, list.get(0).getVersionName(), list.size());
|
||||||
|
return list.get(0).getVersionName();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,65 @@
|
||||||
|
package com.syjiaer.clinic.server.service.social;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson2.JSONObject;
|
||||||
|
import com.syjiaer.clinic.server.common.util.DateUtil;
|
||||||
|
import com.syjiaer.clinic.server.common.util.DictoryUtil;
|
||||||
|
import com.syjiaer.clinic.server.common.util.StringUtil;
|
||||||
|
import com.syjiaer.clinic.server.entity.social.SocialDirectory;
|
||||||
|
import com.syjiaer.clinic.server.entity.social.SocialDirectoryVersion;
|
||||||
|
import com.syjiaer.clinic.server.entity.social.SocialItem;
|
||||||
|
import com.syjiaer.clinic.server.mapper.social.SocialDirectoryVersionMapper;
|
||||||
|
import com.syjiaer.clinic.server.mapper.social.SocialItemMapper;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.text.ParseException;
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.time.ZoneId;
|
||||||
|
import java.time.ZonedDateTime;
|
||||||
|
import java.time.format.DateTimeFormatter;
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class SocialItemService {
|
||||||
|
@Autowired
|
||||||
|
private SocialItemMapper socialItemMapper;
|
||||||
|
@Autowired
|
||||||
|
private SocialDirectoryVersionService socialDirectoryVersionService;
|
||||||
|
|
||||||
|
public String download(List<String[]> tab_list, String info, int type, String version_name) {
|
||||||
|
List<SocialItem> list = new ArrayList<>();
|
||||||
|
DateTimeFormatter dateTimeFormatter = DateUtil.getDateTimeFormatter(DateUtil.DATE_TIME_FORMAT);
|
||||||
|
for (String[] line_array : tab_list) {
|
||||||
|
String flag = "";
|
||||||
|
SocialItem socialItem = new SocialItem();
|
||||||
|
if (info.equals("1305")) {
|
||||||
|
flag = line_array[6];
|
||||||
|
String code = line_array[0];
|
||||||
|
socialItem.setSocialCode(code);
|
||||||
|
socialItem.setName(line_array[9]);
|
||||||
|
socialItem.setVersionName(line_array[16]);
|
||||||
|
socialItem.setUnit(line_array[1]);
|
||||||
|
// socialItem.setCreateDatetime(LocalDateTime.parse(line_array[11], dateTimeFormatter));
|
||||||
|
// socialItem.setUpdateDatetime(LocalDateTime.parse(line_array[12], dateTimeFormatter));
|
||||||
|
}else if (info.equals("1321")) {
|
||||||
|
flag = line_array[13];
|
||||||
|
String code = line_array[2];
|
||||||
|
socialItem.setSocialCode(code);
|
||||||
|
socialItem.setName(line_array[6]);
|
||||||
|
socialItem.setVersionName(line_array[21]);
|
||||||
|
socialItem.setUnit(line_array[10]);
|
||||||
|
// socialItem.setCreateDatetime(LocalDateTime.parse(line_array[27], dateTimeFormatter));
|
||||||
|
// socialItem.setUpdateDatetime(LocalDateTime.parse(line_array[28], dateTimeFormatter));
|
||||||
|
}
|
||||||
|
if (!flag.equals("1")) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
list.add(socialItem);
|
||||||
|
}
|
||||||
|
System.out.println(list);
|
||||||
|
socialItemMapper.insert(list, 100);
|
||||||
|
socialDirectoryVersionService.setSocialDirectoryVersion(type, version_name, list.get(0).getVersionName(), list.size());
|
||||||
|
return list.get(0).getVersionName();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,48 @@
|
||||||
|
package com.syjiaer.clinic.server.service.social;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.syjiaer.clinic.server.common.util.DateUtil;
|
||||||
|
import com.syjiaer.clinic.server.entity.social.SocialChronicDisease;
|
||||||
|
import com.syjiaer.clinic.server.entity.social.SocialTcmDiseaseCatalogue;
|
||||||
|
import com.syjiaer.clinic.server.mapper.social.SocialTcmDiseaseCatalogueMapper;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.time.format.DateTimeFormatter;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class SocialTcmDiseaseCatalogueService {
|
||||||
|
@Autowired
|
||||||
|
private SocialTcmDiseaseCatalogueMapper socialTcmDiseaseCatalogueMapper;
|
||||||
|
@Autowired
|
||||||
|
private SocialDirectoryVersionService socialDirectoryVersionService;
|
||||||
|
public String download(List<String[]> tab_list, int type, String version_name) {
|
||||||
|
DateTimeFormatter dateTimeFormatter = DateUtil.getDateTimeFormatter(DateUtil.DATE_TIME_FORMAT);
|
||||||
|
List<String> code_list = new ArrayList<>();
|
||||||
|
List<SocialTcmDiseaseCatalogue> list = new ArrayList<>();
|
||||||
|
for (String[] line_array : tab_list) {
|
||||||
|
String flag = line_array[8];
|
||||||
|
if (!flag.equals("1")) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
SocialTcmDiseaseCatalogue socialTcmDiseaseCatalogue = new SocialTcmDiseaseCatalogue();
|
||||||
|
socialTcmDiseaseCatalogue.setSocialCode(line_array[5]);
|
||||||
|
socialTcmDiseaseCatalogue.setName(line_array[6]);
|
||||||
|
socialTcmDiseaseCatalogue.setRemark(line_array[7]);
|
||||||
|
socialTcmDiseaseCatalogue.setVersionName(line_array[13]);
|
||||||
|
socialTcmDiseaseCatalogue.setCreateDatetime(LocalDateTime.parse(line_array[10], dateTimeFormatter));
|
||||||
|
socialTcmDiseaseCatalogue.setUpdateDatetime(LocalDateTime.parse(line_array[11], dateTimeFormatter));
|
||||||
|
list.add(socialTcmDiseaseCatalogue);
|
||||||
|
code_list.add(socialTcmDiseaseCatalogue.getSocialCode());
|
||||||
|
}
|
||||||
|
QueryWrapper<SocialTcmDiseaseCatalogue> queryWrapper = new QueryWrapper<>();
|
||||||
|
queryWrapper.in("social_code", code_list);
|
||||||
|
socialTcmDiseaseCatalogueMapper.delete(queryWrapper);
|
||||||
|
socialTcmDiseaseCatalogueMapper.insert(list, 100);
|
||||||
|
socialDirectoryVersionService.setSocialDirectoryVersion(type, version_name, list.get(0).getVersionName(), list.size());
|
||||||
|
return list.get(0).getVersionName();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,48 @@
|
||||||
|
package com.syjiaer.clinic.server.service.social;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.syjiaer.clinic.server.common.util.DateUtil;
|
||||||
|
import com.syjiaer.clinic.server.entity.social.SocialTcmDiseaseCatalogue;
|
||||||
|
import com.syjiaer.clinic.server.entity.social.SocialTcmSyndrome;
|
||||||
|
import com.syjiaer.clinic.server.mapper.social.SocialTcmSyndromeMapper;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.time.format.DateTimeFormatter;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class SocialTcmSyndromeService {
|
||||||
|
@Autowired
|
||||||
|
private SocialTcmSyndromeMapper socialTcmSyndromeMapper;
|
||||||
|
@Autowired
|
||||||
|
private SocialDirectoryVersionService socialDirectoryVersionService;
|
||||||
|
public String download(List<String[]> tab_list, int type, String version_name) {
|
||||||
|
DateTimeFormatter dateTimeFormatter = DateUtil.getDateTimeFormatter(DateUtil.DATE_TIME_FORMAT);
|
||||||
|
List<String> code_list = new ArrayList<>();
|
||||||
|
List<SocialTcmSyndrome> list = new ArrayList<>();
|
||||||
|
for (String[] line_array : tab_list) {
|
||||||
|
String flag = line_array[8];
|
||||||
|
if (!flag.equals("1")) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
SocialTcmSyndrome socialTcmSyndrome = new SocialTcmSyndrome();
|
||||||
|
socialTcmSyndrome.setSocialCode(line_array[5]);
|
||||||
|
socialTcmSyndrome.setName(line_array[6]);
|
||||||
|
socialTcmSyndrome.setRemark(line_array[7]);
|
||||||
|
socialTcmSyndrome.setVersionName(line_array[13]);
|
||||||
|
socialTcmSyndrome.setCreateDatetime(LocalDateTime.parse(line_array[10], dateTimeFormatter));
|
||||||
|
socialTcmSyndrome.setUpdateDatetime(LocalDateTime.parse(line_array[11], dateTimeFormatter));
|
||||||
|
list.add(socialTcmSyndrome);
|
||||||
|
code_list.add(socialTcmSyndrome.getSocialCode());
|
||||||
|
}
|
||||||
|
QueryWrapper<SocialTcmSyndrome> queryWrapper = new QueryWrapper<>();
|
||||||
|
queryWrapper.in("social_code", code_list);
|
||||||
|
socialTcmSyndromeMapper.delete(queryWrapper);
|
||||||
|
socialTcmSyndromeMapper.insert(list, 100);
|
||||||
|
socialDirectoryVersionService.setSocialDirectoryVersion(type, version_name, list.get(0).getVersionName(), list.size());
|
||||||
|
return list.get(0).getVersionName();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -13,17 +13,31 @@
|
||||||
"column_width": 200
|
"column_width": 200
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"4": {
|
||||||
|
"en": "json.chapter_name",
|
||||||
|
"zh": "章名称",
|
||||||
|
"column_width": 200
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"6": {
|
"6": {
|
||||||
"en": "json.section_code",
|
"en": "json.secondary_name",
|
||||||
"zh": "节名称",
|
"zh": "节名称",
|
||||||
"column_width": 200
|
"column_width": 200
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"8": {
|
"8": {
|
||||||
"en": "json.class_code",
|
"en": "json.category_name",
|
||||||
"zh": "类名称",
|
"zh": "类目名称",
|
||||||
|
"column_width": 200
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"10": {
|
||||||
|
"en": "json.suborder_name",
|
||||||
|
"zh": "亚目名称",
|
||||||
"column_width": 200
|
"column_width": 200
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
<?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.syjiaer.clinic.server.mapper.social.SocialChineseMedicinalGranulaMapper">
|
||||||
|
|
||||||
|
</mapper>
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
<?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.syjiaer.clinic.server.mapper.social.SocialChronicDiseaseMapper">
|
||||||
|
|
||||||
|
</mapper>
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
<?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.syjiaer.clinic.server.mapper.social.SocialDiagnoseMapper">
|
||||||
|
|
||||||
|
</mapper>
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
<?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.syjiaer.clinic.server.mapper.social.SocialIcpcDoctorDiagnoseMapper">
|
||||||
|
|
||||||
|
</mapper>
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
<?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.syjiaer.clinic.server.mapper.social.SocialIcpcExaminationTreatmentMapper">
|
||||||
|
|
||||||
|
</mapper>
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
<?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.syjiaer.clinic.server.mapper.social.SocialIcpcSelfPayingMapper">
|
||||||
|
|
||||||
|
</mapper>
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
<?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.syjiaer.clinic.server.mapper.social.SocialItemMapper">
|
||||||
|
|
||||||
|
</mapper>
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
<?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.syjiaer.clinic.server.mapper.social.SocialTcmDiseaseCatalogueMapper">
|
||||||
|
|
||||||
|
</mapper>
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
<?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.syjiaer.clinic.server.mapper.social.SocialTcmSyndromeMapper">
|
||||||
|
|
||||||
|
</mapper>
|
||||||
|
|
@ -15,8 +15,8 @@ class ServerApplicationTests {
|
||||||
private SocialDirectoryService socialDirectoryService;
|
private SocialDirectoryService socialDirectoryService;
|
||||||
@Test
|
@Test
|
||||||
void contextLoads() {
|
void contextLoads() {
|
||||||
List<Map<String, Object>> columnList = socialDirectoryService.getColumnList(1301);
|
Map<String, Object> download = socialDirectoryService.download("0", 1320);
|
||||||
System.out.println(columnList);
|
System.out.println(download);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue