dev
This commit is contained in:
parent
395a2a263d
commit
18cd243e5f
|
|
@ -0,0 +1,40 @@
|
||||||
|
package com.syjiaer.clinic.server.common.api.input;
|
||||||
|
|
||||||
|
import com.syjiaer.clinic.server.common.api.annotations.IMField;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
import lombok.ToString;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@ToString
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class IM2201 extends BaseInputModel{
|
||||||
|
@IMField(key = "psn_no", name = "人员编号", required = true)
|
||||||
|
private String psnNo;
|
||||||
|
@IMField(key = "insutype", name = "险种类型", required = true)
|
||||||
|
private String insutype;
|
||||||
|
@IMField(key = "begntime", name = "开始时间", required = true)
|
||||||
|
private LocalDateTime begntime;
|
||||||
|
@IMField(key = "mdtrt_cert_type", name = "就诊凭证类型", required = true)
|
||||||
|
private String mdtrtCertType;
|
||||||
|
@IMField(key = "mdtrt_cert_no", name = "就诊凭证编号", required = true)
|
||||||
|
private String mdtrtCertNo;
|
||||||
|
@IMField(key = "ipt_otp_no", name = "住院/门诊号", required = true)
|
||||||
|
private String iptOtpNo;
|
||||||
|
@IMField(key = "atddr_no", name = "医师编码", required = true)
|
||||||
|
private String atddrNo;
|
||||||
|
@IMField(key = "dr_name", name = "医师姓名", required = true)
|
||||||
|
private String drName;
|
||||||
|
@IMField(key = "dept_code", name = "科室编码", required = true)
|
||||||
|
private String deptCode;
|
||||||
|
@IMField(key = "dept_name", name = "科室名称", required = true)
|
||||||
|
private String deptName;
|
||||||
|
@IMField(key = "caty", name = "科别", required = true)
|
||||||
|
private String caty;
|
||||||
|
@IMField(key = "exp_content", name = "字段扩展")
|
||||||
|
private String expContent;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,76 @@
|
||||||
|
package com.syjiaer.clinic.server.common.api.input;
|
||||||
|
|
||||||
|
import com.syjiaer.clinic.server.common.api.annotations.IMField;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
import lombok.ToString;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@ToString
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class IM2203A extends BaseInputModel{
|
||||||
|
@IMField(key = "mdtrtinfo", name = "就诊信息", required = true)
|
||||||
|
private Mdtrtinfo mdtrtinfo;
|
||||||
|
@IMField(key = "diseinfo", name = "诊断信息", required = true)
|
||||||
|
private List<Diseinfo> diseinfo;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
public static class Mdtrtinfo{
|
||||||
|
@IMField(key = "mdtrt_id", name = "就诊ID", required = true)
|
||||||
|
private String mdtrt_id;
|
||||||
|
@IMField(key = "psn_no", name = "人员编号", required = true)
|
||||||
|
private String psn_no;
|
||||||
|
@IMField(key = "med_type", name = "医疗类别", required = true)
|
||||||
|
private String med_type;
|
||||||
|
@IMField(key = "begntime", name = "开始时间", required = true)
|
||||||
|
private LocalDateTime begntime;
|
||||||
|
@IMField(key = "main_cond_dscr", name = "主要病情描述")
|
||||||
|
private String main_cond_dscr;
|
||||||
|
@IMField(key = "dise_codg", name = "病种编码")
|
||||||
|
private String dise_codg;
|
||||||
|
@IMField(key = "dise_name", name = "病种名称")
|
||||||
|
private String dise_name;
|
||||||
|
@IMField(key = "birctrl_type", name = "计划生育手术类别", required = true)
|
||||||
|
private String birctrl_type;
|
||||||
|
@IMField(key = "birctrl_matn_date", name = "计划生育手术或生育日期")
|
||||||
|
private LocalDate birctrl_matn_date;
|
||||||
|
@IMField(key = "matn_type", name = "生育类别")
|
||||||
|
private String matn_type;
|
||||||
|
@IMField(key = "geso_val", name = "孕周数")
|
||||||
|
private BigDecimal geso_val;
|
||||||
|
@IMField(key = "exp_content", name = "字段扩展")
|
||||||
|
private String exp_content;
|
||||||
|
}
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
public static class Diseinfo{
|
||||||
|
@IMField(key = "diag_type", name = "诊断类别", required = true)
|
||||||
|
private String diag_type;
|
||||||
|
@IMField(key = "diag_srt_no", name = "诊断排序号", required = true)
|
||||||
|
private BigDecimal diag_srt_no;
|
||||||
|
@IMField(key = "diag_code", name = "诊断代码", required = true)
|
||||||
|
private String diag_code;
|
||||||
|
@IMField(key = "diag_name", name = "诊断名称", required = true)
|
||||||
|
private String diag_name;
|
||||||
|
@IMField(key = "diag_dept", name = "诊断科室", required = true)
|
||||||
|
private String diag_dept;
|
||||||
|
@IMField(key = "dise_dor_no", name = "诊断医生编码", required = true)
|
||||||
|
private String dise_dor_no;
|
||||||
|
@IMField(key = "dise_dor_name", name = "诊断医生姓名", required = true)
|
||||||
|
private String dise_dor_name;
|
||||||
|
@IMField(key = "diag_time", name = "诊断时间", required = true)
|
||||||
|
private LocalDateTime diag_time;
|
||||||
|
@IMField(key = "vali_flag", name = "有效标志", required = true)
|
||||||
|
private String vali_flag;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,52 @@
|
||||||
|
package com.syjiaer.clinic.server.common.api.input;
|
||||||
|
|
||||||
|
import com.syjiaer.clinic.server.common.api.annotations.IMField;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
import lombok.ToString;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@ToString
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class IM3401 extends BaseInputModel{
|
||||||
|
@IMField(key="hosp_dept_codg",name = "医院科室编码",required = true)
|
||||||
|
private String hospDeptCodg;
|
||||||
|
@IMField(key="caty",name = "科别",required = true)
|
||||||
|
private String caty;
|
||||||
|
@IMField(key="hosp_dept_name",name = "医院科室名称",required = true)
|
||||||
|
private String hospDeptName;
|
||||||
|
@IMField(key="begntime",name = "开始时间",required = true)
|
||||||
|
private LocalDate begntime;
|
||||||
|
@IMField(key="endtime",name = "结束时间",required = false)
|
||||||
|
private LocalDate endtime;
|
||||||
|
@IMField(key="itro",name = "简介",required = true)
|
||||||
|
private String itro;
|
||||||
|
@IMField(key="dept_resper_name",name = "科室负责人姓名",required = true)
|
||||||
|
private String deptResperName;
|
||||||
|
@IMField(key="dept_resper_tel",name = "科室负责人电话",required = true)
|
||||||
|
private String deptResperTel;
|
||||||
|
@IMField(key="dept_med_serv_scp",name = "科室医疗服务范围",required = false)
|
||||||
|
private String deptMedServScp;
|
||||||
|
@IMField(key="dept_estbdat",name = "科室成立日期",required = true)
|
||||||
|
private LocalDate deptEstbdat;
|
||||||
|
@IMField(key="aprv_bed_cnt",name = "批准床位数量",required = true)
|
||||||
|
private Integer aprvBedCnt;
|
||||||
|
@IMField(key="hi_crtf_bed_cnt",name = "医保认可床位数",required = false)
|
||||||
|
private Integer hiCrtfBedCnt;
|
||||||
|
@IMField(key="poolarea_no",name = "统筹区编号",required = true)
|
||||||
|
private String poolareaNo;
|
||||||
|
@IMField(key="dr_psncnt",name = "医师人数",required = true)
|
||||||
|
private Integer drPsncnt;
|
||||||
|
@IMField(key="phar_psncnt",name = "药师人数",required = true)
|
||||||
|
private Integer pharPsncnt;
|
||||||
|
@IMField(key="nurs_psncnt",name = "护士人数",required = true)
|
||||||
|
private Integer nursPsncnt;
|
||||||
|
@IMField(key="tecn_psncnt",name = "技师人数",required = true)
|
||||||
|
private Integer tecnPsncnt;
|
||||||
|
@IMField(key="memo",name = "备注",required = false)
|
||||||
|
private String memo;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,52 @@
|
||||||
|
package com.syjiaer.clinic.server.common.api.input;
|
||||||
|
|
||||||
|
import com.syjiaer.clinic.server.common.api.annotations.IMField;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
import lombok.ToString;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@ToString
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class IM3402 extends BaseInputModel{
|
||||||
|
@IMField(key="hosp_dept_codg",name = "医院科室编码",required = true)
|
||||||
|
private String hospDeptCodg;
|
||||||
|
@IMField(key="hosp_dept_name",name = "医院科室名称",required = true)
|
||||||
|
private String hospDeptName;
|
||||||
|
@IMField(key="begntime",name = "开始时间",required = true)
|
||||||
|
private LocalDate begntime;
|
||||||
|
@IMField(key="endtime",name = "结束时间")
|
||||||
|
private LocalDate endtime;
|
||||||
|
@IMField(key="itro",name = "简介",required = true)
|
||||||
|
private String itro;
|
||||||
|
@IMField(key="dept_resper_name",name = "科室负责人姓名",required = true)
|
||||||
|
private String deptResperName;
|
||||||
|
@IMField(key="dept_resper_tel",name = "科室负责人电话",required = true)
|
||||||
|
private String deptResperTel;
|
||||||
|
@IMField(key="dept_med_serv_scp",name = "科室医疗服务范围")
|
||||||
|
private String deptMedServScp;
|
||||||
|
@IMField(key="caty",name = "科别",required = true)
|
||||||
|
private String caty;
|
||||||
|
@IMField(key="dept_estbdat",name = "科室成立日期",required = true)
|
||||||
|
private LocalDate deptEstbdat;
|
||||||
|
@IMField(key="aprv_bed_cnt",name = "批准床位数量",required = true)
|
||||||
|
private Integer aprvBedCnt;
|
||||||
|
@IMField(key="hi_crtf_bed_cnt",name = "医保认可床位数")
|
||||||
|
private Integer hiCrtfBedCnt;
|
||||||
|
@IMField(key="poolarea_no",name = "统筹区编号",required = true)
|
||||||
|
private String poolareaNo;
|
||||||
|
@IMField(key="dr_psncnt",name = "医师人数",required = true)
|
||||||
|
private Integer drPsncnt;
|
||||||
|
@IMField(key="phar_psncnt",name = "药师人数",required = true)
|
||||||
|
private Integer pharPsncnt;
|
||||||
|
@IMField(key="nurs_psncnt",name = "护士人数",required = true)
|
||||||
|
private Integer nursPsncnt;
|
||||||
|
@IMField(key="tecn_psncnt",name = "技师人数",required = true)
|
||||||
|
private Integer tecnPsncnt;
|
||||||
|
@IMField(key="memo",name = "备注")
|
||||||
|
private String memo;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
package com.syjiaer.clinic.server.common.api.input;
|
||||||
|
|
||||||
|
import com.syjiaer.clinic.server.common.api.annotations.IMField;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
import lombok.ToString;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@ToString
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class IM3403 extends BaseInputModel{
|
||||||
|
@IMField(key="hosp_dept_codg",name = "医院科室编码",required = true)
|
||||||
|
private String hospDeptCodg;
|
||||||
|
@IMField(key="hosp_dept_name",name = "医院科室名称",required = true)
|
||||||
|
private String hospDeptName;
|
||||||
|
@IMField(key="begntime",name = "开始时间",required = true)
|
||||||
|
private LocalDate begntime;
|
||||||
|
}
|
||||||
|
|
@ -151,4 +151,22 @@ public class SocialRequest {
|
||||||
JSONObject jsonObject = httpUtil.call("3202", im3202.buildToMap());
|
JSONObject jsonObject = httpUtil.call("3202", im3202.buildToMap());
|
||||||
return JSONObject.parseObject(jsonObject.get("fileinfo").toString(), OM3202.class);
|
return JSONObject.parseObject(jsonObject.get("fileinfo").toString(), OM3202.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void call3401(IM3401 im3401) {
|
||||||
|
httpUtil.callWithOutLog("3401", "deptinfo", im3401.buildToMap());
|
||||||
|
}
|
||||||
|
public void call3402(IM3402 im3402) {
|
||||||
|
httpUtil.callWithOutLog("3402", "deptinfo", im3402.buildToMap());
|
||||||
|
}
|
||||||
|
public void call3403(IM3403 im3403) {
|
||||||
|
httpUtil.callWithOutLog("3403", "data", im3403.buildToMap());
|
||||||
|
}
|
||||||
|
|
||||||
|
public JSONObject call2201(IM2201 im2201) {
|
||||||
|
return httpUtil.call("2201", "data", im2201.buildToMap());
|
||||||
|
}
|
||||||
|
|
||||||
|
public void call2203A(IM2203A im2203A) {
|
||||||
|
httpUtil.call("2203A", im2203A.buildToMap());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
package com.syjiaer.clinic.server.controller.charge;
|
package com.syjiaer.clinic.server.controller.charge;
|
||||||
|
|
||||||
import com.syjiaer.clinic.server.common.exception.MessageException;
|
|
||||||
import com.syjiaer.clinic.server.common.util.CacheUtil;
|
|
||||||
import com.syjiaer.clinic.server.common.vo.Result;
|
import com.syjiaer.clinic.server.common.vo.Result;
|
||||||
import com.syjiaer.clinic.server.controller.BaseController;
|
import com.syjiaer.clinic.server.controller.BaseController;
|
||||||
|
import com.syjiaer.clinic.server.entity.charge.ChargeOrder;
|
||||||
|
import com.syjiaer.clinic.server.entity.charge.dto.ChargeOrderDto;
|
||||||
import com.syjiaer.clinic.server.entity.charge.dto.ChargeQuery;
|
import com.syjiaer.clinic.server.entity.charge.dto.ChargeQuery;
|
||||||
import com.syjiaer.clinic.server.service.charge.ChargeService;
|
import com.syjiaer.clinic.server.service.charge.ChargeService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
@ -17,7 +17,9 @@ public class ChargeController extends BaseController {
|
||||||
private ChargeService chargeService;
|
private ChargeService chargeService;
|
||||||
@RequestMapping("/save")
|
@RequestMapping("/save")
|
||||||
public Result<Object> save() {
|
public Result<Object> save() {
|
||||||
return success();
|
ChargeOrderDto dto = parmsUtil.getObject("data", ChargeOrderDto.class);
|
||||||
|
ChargeOrder chargeOrder = chargeService.updateOrCreate(dto);
|
||||||
|
return success(chargeOrder.getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
@RequestMapping("/list")
|
@RequestMapping("/list")
|
||||||
|
|
@ -25,4 +27,12 @@ public class ChargeController extends BaseController {
|
||||||
ChargeQuery chargeQuery = parmsUtil.getObject("query", ChargeQuery.class);
|
ChargeQuery chargeQuery = parmsUtil.getObject("query", ChargeQuery.class);
|
||||||
return success(chargeService.pageList(chargeQuery));
|
return success(chargeService.pageList(chargeQuery));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@RequestMapping("/completeOrder")
|
||||||
|
public Result<Object> completeOrder() {
|
||||||
|
Integer id = parmsUtil.getInteger("id");
|
||||||
|
Integer payType = parmsUtil.getInteger("payType");
|
||||||
|
chargeService.completeOrder(id,payType);
|
||||||
|
return success();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,112 @@
|
||||||
|
package com.syjiaer.clinic.server.controller.common;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.syjiaer.clinic.server.common.config.Config;
|
||||||
|
import com.syjiaer.clinic.server.common.vo.Result;
|
||||||
|
import com.syjiaer.clinic.server.controller.BaseController;
|
||||||
|
import com.syjiaer.clinic.server.entity.common.CommonConfig;
|
||||||
|
import com.syjiaer.clinic.server.service.common.CommonConfigService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 前端控制器
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author NiuZiYuan
|
||||||
|
* @since 2025-02-24
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/common/config")
|
||||||
|
public class CommonConfigController extends BaseController {
|
||||||
|
@Autowired
|
||||||
|
private CommonConfigService commonConfigService;
|
||||||
|
@Autowired
|
||||||
|
private Config config;
|
||||||
|
|
||||||
|
@RequestMapping("list")
|
||||||
|
public Result<Object> list() {
|
||||||
|
return success(commonConfigService.list());
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping("getall")
|
||||||
|
public Result<Object> getall() {
|
||||||
|
List<CommonConfig> list = commonConfigService.list();
|
||||||
|
Map<String, String> map = new HashMap<>();
|
||||||
|
for (CommonConfig commonConfig : list) {
|
||||||
|
map.put(commonConfig.getK(), commonConfig.getVal());
|
||||||
|
}
|
||||||
|
return success(map);
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping("edit")
|
||||||
|
public Result<Object> edit() {
|
||||||
|
Map<String, Object> parms = getParms();
|
||||||
|
for (String key : parms.keySet()) {
|
||||||
|
CommonConfig commonConfig = new CommonConfig();
|
||||||
|
commonConfig.setK(key);
|
||||||
|
commonConfig.setVal(parms.get(key).toString());
|
||||||
|
commonConfigService.saveOrUpdate(commonConfig);
|
||||||
|
}
|
||||||
|
return success();
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping("setcert")
|
||||||
|
public Result<Object> sercert() {
|
||||||
|
Map<String, Object> parms = getParms();
|
||||||
|
String encryptedText = parmsUtil.getString("encryptedText", "请输入密文");
|
||||||
|
CommonConfig commonConfig = new CommonConfig();
|
||||||
|
commonConfig.setK("common_cert");
|
||||||
|
commonConfig.setVal(encryptedText);
|
||||||
|
commonConfigService.saveOrUpdate(commonConfig);
|
||||||
|
return success();
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping("get")
|
||||||
|
public Result<Object> get() {
|
||||||
|
String key = parmsUtil.getString("key", "请输入key");
|
||||||
|
return success(commonConfigService.getOne(key));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存打印机配置
|
||||||
|
* map -> key -> printName打印机名称 pageType 打印类型
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@RequestMapping("savePrinter")
|
||||||
|
public Result<Object> updatePrinter() {
|
||||||
|
Map map = parmsUtil.getMap("printConfig");
|
||||||
|
if (map == null) {
|
||||||
|
return error("打印机配置不能为空");
|
||||||
|
}
|
||||||
|
config.set("print", "printerName", map.get("printName").toString());
|
||||||
|
config.set("print", "pageType", map.get("pageType").toString());
|
||||||
|
return success();
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 获取打印机配置
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@RequestMapping("getPrintConfig")
|
||||||
|
public Result<Map<String,String>> getPrintConfig() {
|
||||||
|
Map<String,String> map = new HashMap<>();
|
||||||
|
map.put("printName", config.get("print", "printerName"));
|
||||||
|
map.put("pageType", config.get("print", "pageType"));
|
||||||
|
return success(map);
|
||||||
|
}
|
||||||
|
|
||||||
|
// @RequestMapping("parsing")
|
||||||
|
// public Result<JSONObject> parsing() {
|
||||||
|
// String ciphertext = parmsUtil.getString("ciphertext", "请输入密文");
|
||||||
|
// return success(new RsaUtil().parsing(ciphertext));
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -31,7 +31,9 @@ public class RegistrationController extends BaseController {
|
||||||
public Result<?> registration() {
|
public Result<?> registration() {
|
||||||
|
|
||||||
PatientRegistration registrationParam = parmsUtil.getObjectWithCheck("data", PatientRegistration.class);
|
PatientRegistration registrationParam = parmsUtil.getObjectWithCheck("data", PatientRegistration.class);
|
||||||
patientRegistrationService.registration(registrationParam);
|
String mdtrtCertNo = parmsUtil.getString("mdtrtCertNo");
|
||||||
|
String mdtrtCertType = parmsUtil.getString("mdtrtCertType");
|
||||||
|
patientRegistrationService.registration(registrationParam,mdtrtCertType,mdtrtCertNo);
|
||||||
return success();
|
return success();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ import lombok.experimental.Accessors;
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
* @author NiuZiYuan
|
* @author NiuZiYuan
|
||||||
* @since 2025-04-22
|
* @since 2025-04-23
|
||||||
*/
|
*/
|
||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
|
|
@ -63,7 +63,7 @@ public class ChargeGoodsList implements Serializable {
|
||||||
private String unit;
|
private String unit;
|
||||||
|
|
||||||
@ApiModelProperty("商品名称 冗余字段")
|
@ApiModelProperty("商品名称 冗余字段")
|
||||||
private String goodsName;
|
private String name;
|
||||||
|
|
||||||
@ApiModelProperty("流水号")
|
@ApiModelProperty("流水号")
|
||||||
private String feedetlSn;
|
private String feedetlSn;
|
||||||
|
|
@ -72,7 +72,7 @@ public class ChargeGoodsList implements Serializable {
|
||||||
private LocalDateTime createTime;
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
@ApiModelProperty("商品类型")
|
@ApiModelProperty("商品类型")
|
||||||
private Integer goodsType;
|
private Integer type;
|
||||||
|
|
||||||
@ApiModelProperty("成本")
|
@ApiModelProperty("成本")
|
||||||
private BigDecimal cost;
|
private BigDecimal cost;
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,33 @@
|
||||||
|
package com.syjiaer.clinic.server.entity.charge.dto;
|
||||||
|
|
||||||
|
import com.syjiaer.clinic.server.entity.charge.ChargeServiceList;
|
||||||
|
import com.syjiaer.clinic.server.entity.charge.vo.ChargeGoodsListVo;
|
||||||
|
import com.syjiaer.clinic.server.entity.medical.MedicalRecord;
|
||||||
|
import com.syjiaer.clinic.server.entity.patient.PatientInfo;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.List;
|
||||||
|
@Data
|
||||||
|
public class ChargeOrderDto {
|
||||||
|
|
||||||
|
private Long id;
|
||||||
|
private String code;
|
||||||
|
private Long managerUserId;
|
||||||
|
private Double preTotalPrice;
|
||||||
|
private Double totalPrice;
|
||||||
|
private LocalDateTime createDatetime;
|
||||||
|
private Integer status;
|
||||||
|
private String payType;
|
||||||
|
private LocalDateTime payTime;
|
||||||
|
private Long socialUserId;
|
||||||
|
private Long salePersonId;
|
||||||
|
private Long medicalRecordId;
|
||||||
|
private PatientInfo patientInfo;
|
||||||
|
private MedicalRecord medicalRecord;
|
||||||
|
private List<ChargeServiceList> serviceDetail;
|
||||||
|
private List<ChargeGoodsListVo> goodsDetail;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -2,6 +2,9 @@ package com.syjiaer.clinic.server.entity.charge.vo;
|
||||||
|
|
||||||
import com.syjiaer.clinic.server.entity.charge.ChargeGoodsList;
|
import com.syjiaer.clinic.server.entity.charge.ChargeGoodsList;
|
||||||
import com.syjiaer.clinic.server.entity.charge.ChargeServiceList;
|
import com.syjiaer.clinic.server.entity.charge.ChargeServiceList;
|
||||||
|
import com.syjiaer.clinic.server.entity.medical.MedicalRecord;
|
||||||
|
import com.syjiaer.clinic.server.entity.medical.dto.MedicalRecordVo;
|
||||||
|
import com.syjiaer.clinic.server.entity.patient.PatientInfo;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
|
|
@ -51,10 +54,14 @@ public class ChargeDetailVo {
|
||||||
|
|
||||||
@ApiModelProperty("患者姓名")
|
@ApiModelProperty("患者姓名")
|
||||||
private String patientName;
|
private String patientName;
|
||||||
|
@ApiModelProperty
|
||||||
|
private MedicalRecord medicalRecord;
|
||||||
|
@ApiModelProperty("患者信息")
|
||||||
|
private PatientInfo patientInfo;
|
||||||
|
|
||||||
@ApiModelProperty("诊疗服务")
|
@ApiModelProperty("诊疗服务")
|
||||||
private List<ChargeServiceList> serviceDetail;
|
private List<ChargeServiceList> serviceDetail;
|
||||||
@ApiModelProperty("药品耗材")
|
@ApiModelProperty("药品耗材")
|
||||||
private List<ChargeGoodsList> goodsDetail;
|
private List<ChargeGoodsListVo> goodsDetail;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,118 @@
|
||||||
|
package com.syjiaer.clinic.server.entity.charge.vo;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class ChargeGoodsListVo {
|
||||||
|
|
||||||
|
@ApiModelProperty("自增主键")
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
@ApiModelProperty("商品名称")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
@ApiModelProperty("商品类型")
|
||||||
|
private Integer type;
|
||||||
|
|
||||||
|
@ApiModelProperty("通用名")
|
||||||
|
private String commonName;
|
||||||
|
|
||||||
|
@ApiModelProperty("医保目录编码")
|
||||||
|
private String hilistCode;
|
||||||
|
|
||||||
|
@ApiModelProperty("单价")
|
||||||
|
private BigDecimal unitPrice;
|
||||||
|
|
||||||
|
@ApiModelProperty("进货价")
|
||||||
|
private BigDecimal purchaseUnitPrice;
|
||||||
|
|
||||||
|
@ApiModelProperty("生厂商")
|
||||||
|
private String producer;
|
||||||
|
|
||||||
|
@ApiModelProperty("条形码")
|
||||||
|
private String barcode;
|
||||||
|
|
||||||
|
@ApiModelProperty("最小制剂单位")
|
||||||
|
private String medicineDosageUnit;
|
||||||
|
|
||||||
|
@ApiModelProperty("最小包装数量")
|
||||||
|
private Integer minPackagingNumber;
|
||||||
|
|
||||||
|
@ApiModelProperty("最小包装单位")
|
||||||
|
private String minPackagingUnit;
|
||||||
|
|
||||||
|
@ApiModelProperty("保质期")
|
||||||
|
private Integer expiryTime;
|
||||||
|
|
||||||
|
@ApiModelProperty("国药准字")
|
||||||
|
private String approvalCode;
|
||||||
|
|
||||||
|
@ApiModelProperty("拓展字段")
|
||||||
|
private String extra;
|
||||||
|
|
||||||
|
@ApiModelProperty("分类ID")
|
||||||
|
private Integer cateId;
|
||||||
|
|
||||||
|
@ApiModelProperty("软删除 1为删除")
|
||||||
|
private Integer deleted;
|
||||||
|
|
||||||
|
@ApiModelProperty("利润分类")
|
||||||
|
private String profitCate;
|
||||||
|
|
||||||
|
@ApiModelProperty("标签")
|
||||||
|
private String tags;
|
||||||
|
|
||||||
|
@ApiModelProperty("备注")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
@ApiModelProperty("利率")
|
||||||
|
private Double interestRate;
|
||||||
|
|
||||||
|
@ApiModelProperty("库存整数量 ")
|
||||||
|
private Integer inventoryWholeNumber;
|
||||||
|
|
||||||
|
@ApiModelProperty("标识码 由追溯码生成")
|
||||||
|
private String idCode;
|
||||||
|
|
||||||
|
@ApiModelProperty("库存分数量")
|
||||||
|
private Integer inventoryFragmentNumber;
|
||||||
|
|
||||||
|
@ApiModelProperty("0不允许拆零 1允许拆零")
|
||||||
|
private Boolean trdnFlag;
|
||||||
|
|
||||||
|
@ApiModelProperty("拆零价格")
|
||||||
|
private BigDecimal disassemblyPrice;
|
||||||
|
|
||||||
|
@ApiModelProperty("最小制剂数量")
|
||||||
|
private String medicineDosageNum;
|
||||||
|
|
||||||
|
@ApiModelProperty("包装单位")
|
||||||
|
private String packagingUnit;
|
||||||
|
|
||||||
|
@ApiModelProperty("售卖模式")
|
||||||
|
private Integer pricingModel;
|
||||||
|
|
||||||
|
@ApiModelProperty("加成率 30=30%")
|
||||||
|
private Integer makeUp;
|
||||||
|
|
||||||
|
@ApiModelProperty("0禁售 1可售")
|
||||||
|
private Boolean status;
|
||||||
|
|
||||||
|
@ApiModelProperty("库存预警数量")
|
||||||
|
private Integer inventoryWarnNumber;
|
||||||
|
|
||||||
|
@ApiModelProperty("到期预警天数")
|
||||||
|
private Integer expiryWarnDays;
|
||||||
|
@ApiModelProperty("选择的单价")
|
||||||
|
private BigDecimal selectedPrice;
|
||||||
|
@ApiModelProperty("选择的数量")
|
||||||
|
private Integer selectedNum;
|
||||||
|
@ApiModelProperty("选择的单位")
|
||||||
|
private String selectedUnit;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -5,28 +5,27 @@ import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.math.BigDecimal;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
import lombok.ToString;
|
import lombok.ToString;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
* @author NiuZiYuan
|
* @author NiuZiYuan
|
||||||
* @since 2025-04-17
|
* @since 2025-04-23
|
||||||
*/
|
*/
|
||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
@ToString
|
@ToString
|
||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
@TableName("medical_record_detail")
|
@TableName("medical_goods_list")
|
||||||
@ApiModel(value = "MedicalRecordDetail对象", description = "")
|
@ApiModel(value = "MedicalGoodsList对象", description = "")
|
||||||
public class MedicalRecordDetail implements Serializable {
|
public class MedicalGoodsList implements Serializable {
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
|
@ -34,27 +33,24 @@ public class MedicalRecordDetail implements Serializable {
|
||||||
@TableId(value = "id", type = IdType.AUTO)
|
@TableId(value = "id", type = IdType.AUTO)
|
||||||
private Integer id;
|
private Integer id;
|
||||||
|
|
||||||
@ApiModelProperty("项目id(项目包含 goods表 item 表)")
|
@ApiModelProperty("商品id")
|
||||||
private Integer projectId;
|
private Integer goodsId;
|
||||||
|
|
||||||
@ApiModelProperty("项目名称")
|
@ApiModelProperty("商品名称")
|
||||||
private String projectName;
|
private String name;
|
||||||
|
|
||||||
@ApiModelProperty("项目医保码")
|
@ApiModelProperty("商品医保码")
|
||||||
private String projectSocialCode;
|
private String socialCode;
|
||||||
|
|
||||||
@ApiModelProperty("项目单位")
|
@ApiModelProperty("商品单位")
|
||||||
private String projectUnit;
|
private String unit;
|
||||||
|
|
||||||
@ApiModelProperty("项目单价")
|
@ApiModelProperty("商品单价")
|
||||||
private BigDecimal projectUnitPrice;
|
private BigDecimal unitPrice;
|
||||||
|
|
||||||
@ApiModelProperty("病例id")
|
@ApiModelProperty("病例id")
|
||||||
private Integer medicalRecordId;
|
private Integer medicalRecordId;
|
||||||
|
|
||||||
@ApiModelProperty("1 服务项目(item表) 2药品(goods表)")
|
@ApiModelProperty("药品数量")
|
||||||
private Integer type;
|
|
||||||
|
|
||||||
@ApiModelProperty("药品数量(type=2时不能为空)")
|
|
||||||
private Integer number;
|
private Integer number;
|
||||||
}
|
}
|
||||||
|
|
@ -0,0 +1,56 @@
|
||||||
|
package com.syjiaer.clinic.server.entity.medical;
|
||||||
|
|
||||||
|
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.math.BigDecimal;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
import lombok.ToString;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
*
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author NiuZiYuan
|
||||||
|
* @since 2025-04-23
|
||||||
|
*/
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@ToString
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@TableName("medical_item_list")
|
||||||
|
@ApiModel(value = "MedicalItemList对象", description = "")
|
||||||
|
public class MedicalItemList implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ApiModelProperty("自增主键")
|
||||||
|
@TableId(value = "id", type = IdType.AUTO)
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
@ApiModelProperty("服务id")
|
||||||
|
private Integer itemId;
|
||||||
|
|
||||||
|
@ApiModelProperty("服务名称")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
@ApiModelProperty("服务医保码")
|
||||||
|
private String socialCode;
|
||||||
|
|
||||||
|
@ApiModelProperty("服务单位")
|
||||||
|
private String unit;
|
||||||
|
|
||||||
|
@ApiModelProperty("服务单价")
|
||||||
|
private BigDecimal unitPrice;
|
||||||
|
|
||||||
|
@ApiModelProperty("病例id")
|
||||||
|
private Integer medicalRecordId;
|
||||||
|
|
||||||
|
@ApiModelProperty("药品数量")
|
||||||
|
private Integer number;
|
||||||
|
}
|
||||||
|
|
@ -17,7 +17,7 @@ import lombok.experimental.Accessors;
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
* @author NiuZiYuan
|
* @author NiuZiYuan
|
||||||
* @since 2025-04-22
|
* @since 2025-04-23
|
||||||
*/
|
*/
|
||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
|
|
@ -71,4 +71,7 @@ public class MedicalRecord implements Serializable {
|
||||||
|
|
||||||
@ApiModelProperty("挂单id")
|
@ApiModelProperty("挂单id")
|
||||||
private Integer registrationId;
|
private Integer registrationId;
|
||||||
|
|
||||||
|
@ApiModelProperty("诊断类别")
|
||||||
|
private String diagType;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,8 @@ package com.syjiaer.clinic.server.entity.medical.dto;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.syjiaer.clinic.server.entity.medical.MedicalRecordDetail;
|
import com.syjiaer.clinic.server.entity.medical.MedicalGoodsList;
|
||||||
|
import com.syjiaer.clinic.server.entity.medical.MedicalItemList;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
|
|
@ -55,7 +56,7 @@ public class MedicalRecordVo {
|
||||||
@ApiModelProperty("挂单id")
|
@ApiModelProperty("挂单id")
|
||||||
private Integer registrationId;
|
private Integer registrationId;
|
||||||
@ApiModelProperty("诊疗服务")
|
@ApiModelProperty("诊疗服务")
|
||||||
private List<MedicalRecordDetail> serviceDetail;
|
private List<MedicalItemList> serviceDetail;
|
||||||
@ApiModelProperty("药品耗材")
|
@ApiModelProperty("药品耗材")
|
||||||
private List<MedicalRecordDetail> goodsDetail;
|
private List<MedicalGoodsList> goodsDetail;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,29 +5,27 @@ import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
import lombok.ToString;
|
import lombok.ToString;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
import java.time.LocalDateTime;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
* 挂号表
|
* 挂号表
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
* @author NiuZiYuan
|
* @author NiuZiYuan
|
||||||
* @since 2025-04-10
|
* @since 2025-04-23
|
||||||
*/
|
*/
|
||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
@ToString
|
@ToString
|
||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
@TableName("patient_registration")
|
@TableName("patient_registration")
|
||||||
@ApiModel(value = "Registration对象", description = "挂号表")
|
@ApiModel(value = "PatientRegistration对象", description = "挂号表")
|
||||||
public class PatientRegistration implements Serializable {
|
public class PatientRegistration implements Serializable {
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
@ -82,4 +80,16 @@ public class PatientRegistration implements Serializable {
|
||||||
|
|
||||||
@ApiModelProperty("挂号状态 1候诊 2在诊 3已诊 0取消")
|
@ApiModelProperty("挂号状态 1候诊 2在诊 3已诊 0取消")
|
||||||
private Integer status;
|
private Integer status;
|
||||||
|
|
||||||
|
@ApiModelProperty("人员编号")
|
||||||
|
private String psnNo;
|
||||||
|
|
||||||
|
@ApiModelProperty("险种类型")
|
||||||
|
private String insutype;
|
||||||
|
|
||||||
|
@ApiModelProperty("就诊id 挂号后医保返会")
|
||||||
|
private String mdtrtId;
|
||||||
|
|
||||||
|
@ApiModelProperty("流水号")
|
||||||
|
private String fstNo;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,41 +3,46 @@ package com.syjiaer.clinic.server.entity.social;
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
import lombok.ToString;
|
import lombok.ToString;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
import java.time.LocalDateTime;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
* 医保目录
|
* 疾病与诊断目录1307
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
* @author NiuZiYuan
|
* @author NiuZiYuan
|
||||||
* @since 2025-04-02
|
* @since 2025-04-23
|
||||||
*/
|
*/
|
||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
@ToString
|
@ToString
|
||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
@TableName("social_diagnose")
|
@TableName("social_diagnose")
|
||||||
@ApiModel(value = "SocialIDiagnose对象", description = "医疗服务项目1305,1321")
|
@ApiModel(value = "SocialDiagnose对象", description = "疾病与诊断目录1307")
|
||||||
public class SocialDiagnose implements Serializable {
|
public class SocialDiagnose implements Serializable {
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
@ApiModelProperty("主键")
|
|
||||||
@TableId(value = "id", type = IdType.AUTO)
|
@TableId(value = "id", type = IdType.AUTO)
|
||||||
private Integer id;
|
private Integer id;
|
||||||
|
|
||||||
@ApiModelProperty("医保目录编码")
|
@ApiModelProperty("诊断名称")
|
||||||
private String socialCode;
|
private String name;
|
||||||
|
|
||||||
|
@ApiModelProperty("诊断代码")
|
||||||
|
private String code;
|
||||||
|
|
||||||
|
@ApiModelProperty("类目名称")
|
||||||
|
private String categoryName;
|
||||||
|
|
||||||
|
@ApiModelProperty("亚目名称")
|
||||||
|
private String suborderName;
|
||||||
|
|
||||||
@ApiModelProperty("数据创建时间")
|
@ApiModelProperty("数据创建时间")
|
||||||
private LocalDateTime createDatetime;
|
private LocalDateTime createDatetime;
|
||||||
|
|
@ -47,20 +52,4 @@ public class SocialDiagnose implements Serializable {
|
||||||
|
|
||||||
@ApiModelProperty("版本名称")
|
@ApiModelProperty("版本名称")
|
||||||
private String versionName;
|
private String versionName;
|
||||||
|
|
||||||
@ApiModelProperty("章名称")
|
|
||||||
private String chapterName;
|
|
||||||
|
|
||||||
@ApiModelProperty("节名称")
|
|
||||||
private String secondaryName;
|
|
||||||
|
|
||||||
@ApiModelProperty("类目名称")
|
|
||||||
private String categoryName;
|
|
||||||
|
|
||||||
@ApiModelProperty("亚目名称")
|
|
||||||
private String suborderName;
|
|
||||||
|
|
||||||
@ApiModelProperty("诊断名称")
|
|
||||||
private String diagnosisName;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,11 @@ package com.syjiaer.clinic.server.mapper.charge;
|
||||||
|
|
||||||
import com.syjiaer.clinic.server.entity.charge.ChargeGoodsList;
|
import com.syjiaer.clinic.server.entity.charge.ChargeGoodsList;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.syjiaer.clinic.server.entity.charge.vo.ChargeGoodsListVo;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.apache.ibatis.annotations.Select;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -13,6 +18,9 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
* @since 2025-04-22
|
* @since 2025-04-22
|
||||||
*/
|
*/
|
||||||
public interface ChargeGoodsListMapper extends BaseMapper<ChargeGoodsList> {
|
public interface ChargeGoodsListMapper extends BaseMapper<ChargeGoodsList> {
|
||||||
|
@Select("select cg.unit as selected_unit ,cg.unit_price as selected_price,cg.\"number\" as selected_num,goods.* " +
|
||||||
|
"from charge_goods_list as cg LEFT JOIN goods ON cg.goods_id = goods.\"id\" WHERE cg.charge_order_code = #{code} ")
|
||||||
|
List<ChargeGoodsListVo> selectDetailByCode(@Param("code")String code);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,24 @@
|
||||||
|
package com.syjiaer.clinic.server.mapper.medical;
|
||||||
|
|
||||||
|
import com.syjiaer.clinic.server.entity.medical.MedicalGoodsList;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import lombok.Setter;
|
||||||
|
import org.apache.ibatis.annotations.Select;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* Mapper 接口
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author NiuZiYuan
|
||||||
|
* @since 2025-04-23
|
||||||
|
*/
|
||||||
|
public interface MedicalGoodsListMapper extends BaseMapper<MedicalGoodsList> {
|
||||||
|
|
||||||
|
@Select("select * from medical_goods_list where medical_record_id = #{medicalRecordId}")
|
||||||
|
List<MedicalGoodsList> listByMedicalRecordId(Integer medicalRecordId);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
package com.syjiaer.clinic.server.mapper.medical;
|
||||||
|
|
||||||
|
import com.syjiaer.clinic.server.entity.medical.MedicalItemList;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import org.apache.ibatis.annotations.Select;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* Mapper 接口
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author NiuZiYuan
|
||||||
|
* @since 2025-04-23
|
||||||
|
*/
|
||||||
|
public interface MedicalItemListMapper extends BaseMapper<MedicalItemList> {
|
||||||
|
@Select("select * from medical_item_list where medical_record_id = #{medicalRecordId}")
|
||||||
|
List<MedicalItemList> listByMedicalRecordId(Integer medicalRecordId);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -1,18 +0,0 @@
|
||||||
package com.syjiaer.clinic.server.mapper.medical;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|
||||||
import com.syjiaer.clinic.server.entity.medical.MedicalRecordDetail;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* <p>
|
|
||||||
* Mapper 接口
|
|
||||||
* </p>
|
|
||||||
*
|
|
||||||
* @author NiuZiYuan
|
|
||||||
* @since 2025-04-17
|
|
||||||
*/
|
|
||||||
public interface MedicalRecordDetailMapper extends BaseMapper<MedicalRecordDetail> {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@ -71,7 +71,7 @@ public abstract class BaseService {
|
||||||
protected <T> Page<T> pageHelper(int pageNum, int pageSize, QueryWrapper<T> queryWrapper, BaseMapper<T> mapper,String orderByStr ,boolean isAsc){
|
protected <T> Page<T> pageHelper(int pageNum, int pageSize, QueryWrapper<T> queryWrapper, BaseMapper<T> mapper,String orderByStr ,boolean isAsc){
|
||||||
|
|
||||||
Long totalCount = mapper.selectCount(queryWrapper);
|
Long totalCount = mapper.selectCount(queryWrapper);
|
||||||
if (orderByStr == null || orderByStr.isEmpty()){
|
if (orderByStr != null && !orderByStr.isEmpty()){
|
||||||
queryWrapper.orderBy(true,isAsc,orderByStr);
|
queryWrapper.orderBy(true,isAsc,orderByStr);
|
||||||
}
|
}
|
||||||
queryWrapper.last("LIMIT " + pageSize + " OFFSET " + (pageNum - 1) * pageSize);
|
queryWrapper.last("LIMIT " + pageSize + " OFFSET " + (pageNum - 1) * pageSize);
|
||||||
|
|
|
||||||
|
|
@ -2,26 +2,45 @@ package com.syjiaer.clinic.server.service.charge;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.syjiaer.clinic.server.common.constants.Constants;
|
import com.syjiaer.clinic.server.common.constants.Constants;
|
||||||
|
import com.syjiaer.clinic.server.common.enums.InventorySocialTypeEnum;
|
||||||
|
import com.syjiaer.clinic.server.common.enums.InventoryTypeEnum;
|
||||||
import com.syjiaer.clinic.server.common.enums.RetailOrderStatusEnum;
|
import com.syjiaer.clinic.server.common.enums.RetailOrderStatusEnum;
|
||||||
|
import com.syjiaer.clinic.server.common.exception.MessageException;
|
||||||
import com.syjiaer.clinic.server.common.util.StringUtil;
|
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.charge.ChargeGoodsList;
|
import com.syjiaer.clinic.server.entity.charge.ChargeGoodsList;
|
||||||
import com.syjiaer.clinic.server.entity.charge.ChargeOrder;
|
import com.syjiaer.clinic.server.entity.charge.ChargeOrder;
|
||||||
import com.syjiaer.clinic.server.entity.charge.ChargeServiceList;
|
import com.syjiaer.clinic.server.entity.charge.ChargeServiceList;
|
||||||
|
import com.syjiaer.clinic.server.entity.charge.dto.ChargeOrderDto;
|
||||||
import com.syjiaer.clinic.server.entity.charge.dto.ChargeQuery;
|
import com.syjiaer.clinic.server.entity.charge.dto.ChargeQuery;
|
||||||
import com.syjiaer.clinic.server.entity.charge.vo.ChargeDetailVo;
|
import com.syjiaer.clinic.server.entity.charge.vo.ChargeDetailVo;
|
||||||
|
import com.syjiaer.clinic.server.entity.charge.vo.ChargeGoodsListVo;
|
||||||
import com.syjiaer.clinic.server.entity.goods.Goods;
|
import com.syjiaer.clinic.server.entity.goods.Goods;
|
||||||
|
import com.syjiaer.clinic.server.entity.inventory.InventoryLog;
|
||||||
import com.syjiaer.clinic.server.entity.item.Item;
|
import com.syjiaer.clinic.server.entity.item.Item;
|
||||||
import com.syjiaer.clinic.server.entity.manager.ManagerUser;
|
import com.syjiaer.clinic.server.entity.manager.ManagerUser;
|
||||||
|
import com.syjiaer.clinic.server.entity.medical.MedicalRecord;
|
||||||
import com.syjiaer.clinic.server.entity.medical.dto.GoodsRetailDto;
|
import com.syjiaer.clinic.server.entity.medical.dto.GoodsRetailDto;
|
||||||
import com.syjiaer.clinic.server.entity.medical.dto.MedicalRecordSaveDto;
|
import com.syjiaer.clinic.server.entity.medical.dto.MedicalRecordSaveDto;
|
||||||
|
import com.syjiaer.clinic.server.entity.organization.OrganizationMember;
|
||||||
|
import com.syjiaer.clinic.server.entity.patient.PatientInfo;
|
||||||
|
import com.syjiaer.clinic.server.entity.patient.PatientRegistration;
|
||||||
import com.syjiaer.clinic.server.mapper.charge.ChargeGoodsListMapper;
|
import com.syjiaer.clinic.server.mapper.charge.ChargeGoodsListMapper;
|
||||||
import com.syjiaer.clinic.server.mapper.charge.ChargeOrderMapper;
|
import com.syjiaer.clinic.server.mapper.charge.ChargeOrderMapper;
|
||||||
import com.syjiaer.clinic.server.mapper.charge.ChargeServiceListMapper;
|
import com.syjiaer.clinic.server.mapper.charge.ChargeServiceListMapper;
|
||||||
import com.syjiaer.clinic.server.mapper.goods.GoodsMapper;
|
import com.syjiaer.clinic.server.mapper.goods.GoodsMapper;
|
||||||
|
import com.syjiaer.clinic.server.mapper.inventory.InventoryLogMapper;
|
||||||
|
import com.syjiaer.clinic.server.mapper.medical.MedicalRecordMapper;
|
||||||
|
import com.syjiaer.clinic.server.mapper.organization.OrganizationMemberMapper;
|
||||||
|
import com.syjiaer.clinic.server.mapper.organization.OrganizationSectionMapper;
|
||||||
|
import com.syjiaer.clinic.server.mapper.patient.PatientInfoMapper;
|
||||||
import com.syjiaer.clinic.server.service.BaseService;
|
import com.syjiaer.clinic.server.service.BaseService;
|
||||||
|
import com.syjiaer.clinic.server.service.inventory.InventoryService;
|
||||||
|
import com.syjiaer.clinic.server.service.patient.PatientInfoService;
|
||||||
|
import com.syjiaer.clinic.server.service.patient.PatientRegistrationService;
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.context.annotation.Lazy;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
|
@ -31,6 +50,8 @@ import java.time.LocalDateTime;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import static com.syjiaer.clinic.server.common.enums.MedicalRecordDetailTypeEnum.goods;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
public class ChargeService extends BaseService {
|
public class ChargeService extends BaseService {
|
||||||
@Autowired
|
@Autowired
|
||||||
|
|
@ -41,10 +62,26 @@ public class ChargeService extends BaseService {
|
||||||
private ChargeGoodsListMapper chargeGoodsListMapper;
|
private ChargeGoodsListMapper chargeGoodsListMapper;
|
||||||
@Autowired
|
@Autowired
|
||||||
private GoodsMapper goodsMapper;
|
private GoodsMapper goodsMapper;
|
||||||
|
@Autowired
|
||||||
|
private PatientInfoMapper patientInfoMapper;
|
||||||
|
@Autowired
|
||||||
|
private MedicalRecordMapper medicalRecordMapper;
|
||||||
|
@Autowired
|
||||||
|
private OrganizationMemberMapper organizationMemberMapper;
|
||||||
|
@Autowired
|
||||||
|
private PatientRegistrationService patientRegistrationService;
|
||||||
|
@Autowired
|
||||||
|
@Lazy
|
||||||
|
private ChargeService chargeService;
|
||||||
|
@Autowired
|
||||||
|
private InventoryService inventoryService;
|
||||||
|
@Autowired
|
||||||
|
private InventoryLogMapper inventoryLogMapper;
|
||||||
|
|
||||||
|
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void save(MedicalRecordSaveDto medicalRecordSaveDto){
|
public ChargeOrder save(ChargeOrderDto dto){
|
||||||
ChargeOrder dbOrder = chargeOrderMapper.selectById(medicalRecordSaveDto.getId());
|
ChargeOrder dbOrder = chargeOrderMapper.selectById(dto.getId());
|
||||||
if (dbOrder != null){
|
if (dbOrder != null){
|
||||||
//清除已有的订单
|
//清除已有的订单
|
||||||
chargeServiceListMapper.delete(new QueryWrapper<ChargeServiceList>().eq("charge_order_code", dbOrder.getCode()));
|
chargeServiceListMapper.delete(new QueryWrapper<ChargeServiceList>().eq("charge_order_code", dbOrder.getCode()));
|
||||||
|
|
@ -59,49 +96,49 @@ public class ChargeService extends BaseService {
|
||||||
BigDecimal preTotalPrice = BigDecimal.ZERO;
|
BigDecimal preTotalPrice = BigDecimal.ZERO;
|
||||||
BigDecimal totalPrice = BigDecimal.ZERO;
|
BigDecimal totalPrice = BigDecimal.ZERO;
|
||||||
List<ChargeServiceList> chargeServiceLists = new ArrayList<>();
|
List<ChargeServiceList> chargeServiceLists = new ArrayList<>();
|
||||||
for (Item item : medicalRecordSaveDto.getItemList()){
|
for (ChargeServiceList service : dto.getServiceDetail()){
|
||||||
ChargeServiceList itemList = new ChargeServiceList();
|
ChargeServiceList itemList = new ChargeServiceList();
|
||||||
String fsn = StringUtil.getCode("FSN");
|
String fsn = StringUtil.getCode("FSN");
|
||||||
itemList.setChargeOrderCode(code);
|
itemList.setChargeOrderCode(code);
|
||||||
itemList.setServiceId(item.getId());
|
itemList.setServiceId(service.getId());
|
||||||
|
|
||||||
itemList.setPreUnitPrice(item.getUnitPrice());
|
itemList.setPreUnitPrice(service.getUnitPrice());
|
||||||
itemList.setUnitPrice(item.getUnitPrice());
|
itemList.setUnitPrice(service.getUnitPrice());
|
||||||
itemList.setNumber(1);
|
itemList.setNumber(1);
|
||||||
BigDecimal subTotalPrice = item.getUnitPrice();
|
BigDecimal subTotalPrice = service.getUnitPrice();
|
||||||
itemList.setSubTotalPrice(item.getUnitPrice());
|
itemList.setSubTotalPrice(service.getUnitPrice());
|
||||||
itemList.setUnit(item.getUnit());
|
itemList.setUnit(service.getUnit());
|
||||||
itemList.setName(item.getItemName());
|
itemList.setName(service.getName());
|
||||||
itemList.setFeedetlSn(fsn);
|
itemList.setFeedetlSn(fsn);
|
||||||
itemList.setCreateDate(nowLocalDate);
|
itemList.setCreateDate(nowLocalDate);
|
||||||
itemList.setCreateTime(nowLocalDateTime);
|
itemList.setCreateTime(nowLocalDateTime);
|
||||||
chargeServiceLists.add(itemList);
|
chargeServiceLists.add(itemList);
|
||||||
preTotalPrice = preTotalPrice.add(item.getUnitPrice());
|
preTotalPrice = preTotalPrice.add(service.getUnitPrice());
|
||||||
totalPrice = totalPrice.add(item.getUnitPrice());
|
totalPrice = totalPrice.add(service.getUnitPrice());
|
||||||
}
|
}
|
||||||
chargeServiceListMapper.insert(chargeServiceLists);
|
chargeServiceListMapper.insert(chargeServiceLists);
|
||||||
|
|
||||||
List<ChargeGoodsList> chargeGoodsLists = new ArrayList<>();
|
List<ChargeGoodsList> chargeGoodsLists = new ArrayList<>();
|
||||||
for (GoodsRetailDto goodsRetailDto : medicalRecordSaveDto.getGoodsList()){
|
for (ChargeGoodsListVo goods : dto.getGoodsDetail()){
|
||||||
ChargeGoodsList itemList = new ChargeGoodsList();
|
ChargeGoodsList itemList = new ChargeGoodsList();
|
||||||
Goods dbGoods = goodsMapper.selectById(goodsRetailDto.getId());
|
Goods dbGoods = goodsMapper.selectById(goods.getId());
|
||||||
if (dbGoods == null){
|
if (dbGoods == null){
|
||||||
throw new RuntimeException("商品不存在");
|
throw new RuntimeException("商品不存在");
|
||||||
}
|
}
|
||||||
String fsn = StringUtil.getCode("FSN");
|
String fsn = StringUtil.getCode("FSN");
|
||||||
itemList.setChargeOrderCode(code);
|
itemList.setChargeOrderCode(code);
|
||||||
itemList.setGoodsId(goodsRetailDto.getId());
|
itemList.setGoodsId(goods.getId());
|
||||||
itemList.setPreUnitPrice(goodsRetailDto.getSelectedPrice());
|
itemList.setPreUnitPrice(goods.getSelectedPrice());
|
||||||
itemList.setUnitPrice(goodsRetailDto.getSelectedPrice());
|
itemList.setUnitPrice(goods.getSelectedPrice());
|
||||||
itemList.setNumber(goodsRetailDto.getSelectNum());
|
itemList.setNumber(goods.getSelectedNum());
|
||||||
BigDecimal subTotalPrice = goodsRetailDto.getSelectedPrice().multiply(BigDecimal.valueOf(goodsRetailDto.getSelectNum()));
|
BigDecimal subTotalPrice = goods.getSelectedPrice().multiply(BigDecimal.valueOf(goods.getSelectedNum()));
|
||||||
itemList.setSubTotalPrice(subTotalPrice);
|
itemList.setSubTotalPrice(subTotalPrice);
|
||||||
itemList.setTrdnFlag(true);
|
itemList.setTrdnFlag(true);
|
||||||
if (dbGoods.getPackagingUnit().equals(goodsRetailDto.getSelectedUnit()) || dbGoods.getPackagingUnit().equals(dbGoods.getMinPackagingUnit())){
|
if (dbGoods.getPackagingUnit().equals(goods.getSelectedUnit()) || dbGoods.getPackagingUnit().equals(dbGoods.getMinPackagingUnit())){
|
||||||
itemList.setTrdnFlag(false);
|
itemList.setTrdnFlag(false);
|
||||||
}
|
}
|
||||||
itemList.setUnit(goodsRetailDto.getSelectedUnit());
|
itemList.setUnit(goods.getSelectedUnit());
|
||||||
itemList.setGoodsName(dbGoods.getName());
|
itemList.setName(dbGoods.getName());
|
||||||
itemList.setFeedetlSn(fsn);
|
itemList.setFeedetlSn(fsn);
|
||||||
itemList.setCreateDate(nowLocalDate);
|
itemList.setCreateDate(nowLocalDate);
|
||||||
itemList.setCreateTime(nowLocalDateTime);
|
itemList.setCreateTime(nowLocalDateTime);
|
||||||
|
|
@ -117,10 +154,11 @@ public class ChargeService extends BaseService {
|
||||||
chargeOrder.setTotalPrice(totalPrice);
|
chargeOrder.setTotalPrice(totalPrice);
|
||||||
chargeOrder.setCreateDatetime(nowLocalDateTime);
|
chargeOrder.setCreateDatetime(nowLocalDateTime);
|
||||||
chargeOrder.setStatus(RetailOrderStatusEnum.UNFINISHED.getCode());
|
chargeOrder.setStatus(RetailOrderStatusEnum.UNFINISHED.getCode());
|
||||||
chargeOrder.setPatientId(medicalRecordSaveDto.getPatientId());
|
chargeOrder.setPatientId(dto.getPatientInfo().getId());
|
||||||
chargeOrder.setSalePersonId(user.getId());
|
chargeOrder.setSalePersonId(user.getId());
|
||||||
chargeOrder.setMedicalRecordId(medicalRecordSaveDto.getId());
|
chargeOrder.setMedicalRecordId(dto.getMedicalRecord().getId());
|
||||||
chargeOrderMapper.insert(chargeOrder);
|
chargeOrderMapper.insert(chargeOrder);
|
||||||
|
return chargeOrder;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -141,10 +179,12 @@ public class ChargeService extends BaseService {
|
||||||
for (ChargeOrder chargeOrder : orderPage.getList()){
|
for (ChargeOrder chargeOrder : orderPage.getList()){
|
||||||
ChargeDetailVo detailVo = new ChargeDetailVo();
|
ChargeDetailVo detailVo = new ChargeDetailVo();
|
||||||
BeanUtils.copyProperties(chargeOrder, detailVo);
|
BeanUtils.copyProperties(chargeOrder, detailVo);
|
||||||
|
detailVo.setMedicalRecord(medicalRecordMapper.selectById(chargeOrder.getMedicalRecordId()));
|
||||||
|
detailVo.setPatientInfo(patientInfoMapper.selectById(chargeOrder.getPatientId()));
|
||||||
detailVo.setServiceDetail(chargeServiceListMapper.selectList(new QueryWrapper<ChargeServiceList>()
|
detailVo.setServiceDetail(chargeServiceListMapper.selectList(new QueryWrapper<ChargeServiceList>()
|
||||||
.eq("charge_order_code", chargeOrder.getCode())));
|
.eq("charge_order_code", chargeOrder.getCode())));
|
||||||
detailVo.setGoodsDetail(chargeGoodsListMapper.selectList(new QueryWrapper<ChargeGoodsList>()
|
|
||||||
.eq("charge_order_code", chargeOrder.getCode())));
|
detailVo.setGoodsDetail(chargeGoodsListMapper.selectDetailByCode(chargeOrder.getCode()));
|
||||||
voList.add(detailVo);
|
voList.add(detailVo);
|
||||||
}
|
}
|
||||||
Page<ChargeDetailVo> resultPage = new Page<>();
|
Page<ChargeDetailVo> resultPage = new Page<>();
|
||||||
|
|
@ -154,6 +194,62 @@ public class ChargeService extends BaseService {
|
||||||
return resultPage;
|
return resultPage;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public ChargeOrder updateOrCreate(ChargeOrderDto dto) {
|
||||||
|
//创建患者
|
||||||
|
PatientInfo patientInfo = dto.getPatientInfo();
|
||||||
|
if (patientInfo == null){
|
||||||
|
throw new MessageException("患者信息不能为空");
|
||||||
|
}
|
||||||
|
patientInfoMapper.insertOrUpdate(patientInfo);
|
||||||
|
if (dto.getMedicalRecord().getDockerId() == null || dto.getMedicalRecord().getDiagnosisDetail() == null){
|
||||||
|
throw new MessageException("诊断信息和医生不能为空");
|
||||||
|
}
|
||||||
|
//添加挂号信息
|
||||||
|
OrganizationMember docker = organizationMemberMapper.selectById(dto.getMedicalRecord().getDockerId());
|
||||||
|
PatientRegistration registration = patientRegistrationService.regisByDockerAndPatient(docker,patientInfo, (short) 1,1);
|
||||||
|
//todo 添加病例
|
||||||
|
medicalRecordMapper.insertOrUpdate(dto.getMedicalRecord());
|
||||||
|
|
||||||
|
//添加订单
|
||||||
|
return chargeService.save(dto);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void completeOrder (Integer id,Integer payType){
|
||||||
|
ChargeOrder order = chargeOrderMapper.selectById(id);
|
||||||
|
if (order == null){
|
||||||
|
throw new MessageException("订单不存在");
|
||||||
|
}
|
||||||
|
if (!order.getStatus().equals(RetailOrderStatusEnum.UNFINISHED.getCode())){
|
||||||
|
throw new MessageException("订单状态错误");
|
||||||
|
}
|
||||||
|
ChargeOrder updateOrder = new ChargeOrder();
|
||||||
|
updateOrder.setId(id);
|
||||||
|
updateOrder.setStatus(RetailOrderStatusEnum.FINISHED.getCode());
|
||||||
|
updateOrder.setPayType(payType);
|
||||||
|
updateOrder.setPayTime(LocalDateTime.now());
|
||||||
|
chargeOrderMapper.updateById(updateOrder);
|
||||||
|
//扣除商品库存
|
||||||
|
List<ChargeGoodsListVo> goodsLists = chargeGoodsListMapper.selectDetailByCode(order.getCode());
|
||||||
|
for (ChargeGoodsListVo goodsList : goodsLists) {
|
||||||
|
Integer wholeNumber = 0;
|
||||||
|
Integer fragmentNumber = 0;
|
||||||
|
if (goodsList.getPackagingUnit().equals(goodsList.getSelectedUnit())){
|
||||||
|
wholeNumber = goodsList.getSelectedNum();
|
||||||
|
}else {
|
||||||
|
fragmentNumber = goodsList.getSelectedNum();
|
||||||
|
}
|
||||||
|
List<InventoryLog> logs = inventoryService.adjustNumberByGoodsId(goodsList.getId(), wholeNumber, fragmentNumber, "订单完成");
|
||||||
|
for (InventoryLog log : logs) {
|
||||||
|
log.setOperateName(order.getPatientName());
|
||||||
|
log.setOperateId(order.getPatientId());
|
||||||
|
log.setType(InventoryTypeEnum.GRANT_OUT.getType());
|
||||||
|
log.setSocialType(InventorySocialTypeEnum.INVENTORY_SURPLUS.getType());
|
||||||
|
}
|
||||||
|
inventoryLogMapper.insert(logs);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -22,4 +22,14 @@ public class CommonConfigService extends BaseService {
|
||||||
QueryWrapper<CommonConfig> queryWrapper = new QueryWrapper<>();
|
QueryWrapper<CommonConfig> queryWrapper = new QueryWrapper<>();
|
||||||
return commonConfigMapper.selectList(queryWrapper);
|
return commonConfigMapper.selectList(queryWrapper);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void saveOrUpdate(CommonConfig commonConfig){
|
||||||
|
commonConfigMapper.insertOrUpdate(commonConfig);
|
||||||
|
}
|
||||||
|
|
||||||
|
public CommonConfig getOne(String key) {
|
||||||
|
QueryWrapper<CommonConfig> queryWrapper = new QueryWrapper<>();
|
||||||
|
queryWrapper.eq("k", key);
|
||||||
|
return commonConfigMapper.selectOne(queryWrapper);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,22 +1,34 @@
|
||||||
package com.syjiaer.clinic.server.service.medical;
|
package com.syjiaer.clinic.server.service.medical;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson2.JSONArray;
|
||||||
|
import com.alibaba.fastjson2.JSONObject;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.syjiaer.clinic.server.common.api.input.IM2201;
|
||||||
|
import com.syjiaer.clinic.server.common.api.input.IM2203A;
|
||||||
|
import com.syjiaer.clinic.server.common.api.request.SocialRequest;
|
||||||
|
import com.syjiaer.clinic.server.common.config.Config;
|
||||||
import com.syjiaer.clinic.server.common.enums.MedicalRecordDetailTypeEnum;
|
import com.syjiaer.clinic.server.common.enums.MedicalRecordDetailTypeEnum;
|
||||||
import com.syjiaer.clinic.server.common.enums.RegistrationStatusEnum;
|
import com.syjiaer.clinic.server.common.enums.RegistrationStatusEnum;
|
||||||
import com.syjiaer.clinic.server.common.exception.MessageException;
|
import com.syjiaer.clinic.server.common.exception.MessageException;
|
||||||
import com.syjiaer.clinic.server.entity.goods.Goods;
|
import com.syjiaer.clinic.server.entity.goods.Goods;
|
||||||
import com.syjiaer.clinic.server.entity.item.Item;
|
import com.syjiaer.clinic.server.entity.item.Item;
|
||||||
import com.syjiaer.clinic.server.entity.manager.ManagerUser;
|
import com.syjiaer.clinic.server.entity.manager.ManagerUser;
|
||||||
|
import com.syjiaer.clinic.server.entity.medical.MedicalGoodsList;
|
||||||
|
import com.syjiaer.clinic.server.entity.medical.MedicalItemList;
|
||||||
import com.syjiaer.clinic.server.entity.medical.MedicalRecord;
|
import com.syjiaer.clinic.server.entity.medical.MedicalRecord;
|
||||||
import com.syjiaer.clinic.server.entity.medical.MedicalRecordDetail;
|
|
||||||
import com.syjiaer.clinic.server.entity.medical.dto.GoodsRetailDto;
|
import com.syjiaer.clinic.server.entity.medical.dto.GoodsRetailDto;
|
||||||
import com.syjiaer.clinic.server.entity.medical.dto.MedicalRecordSaveDto;
|
import com.syjiaer.clinic.server.entity.medical.dto.MedicalRecordSaveDto;
|
||||||
import com.syjiaer.clinic.server.entity.medical.dto.MedicalRecordVo;
|
import com.syjiaer.clinic.server.entity.medical.dto.MedicalRecordVo;
|
||||||
|
import com.syjiaer.clinic.server.entity.organization.OrganizationMember;
|
||||||
|
import com.syjiaer.clinic.server.entity.organization.OrganizationSection;
|
||||||
import com.syjiaer.clinic.server.entity.patient.PatientRegistration;
|
import com.syjiaer.clinic.server.entity.patient.PatientRegistration;
|
||||||
import com.syjiaer.clinic.server.mapper.goods.GoodsMapper;
|
import com.syjiaer.clinic.server.mapper.goods.GoodsMapper;
|
||||||
import com.syjiaer.clinic.server.mapper.item.ItemMapper;
|
import com.syjiaer.clinic.server.mapper.item.ItemMapper;
|
||||||
import com.syjiaer.clinic.server.mapper.medical.MedicalRecordDetailMapper;
|
import com.syjiaer.clinic.server.mapper.medical.MedicalGoodsListMapper;
|
||||||
|
import com.syjiaer.clinic.server.mapper.medical.MedicalItemListMapper;
|
||||||
import com.syjiaer.clinic.server.mapper.medical.MedicalRecordMapper;
|
import com.syjiaer.clinic.server.mapper.medical.MedicalRecordMapper;
|
||||||
|
import com.syjiaer.clinic.server.mapper.organization.OrganizationMemberMapper;
|
||||||
|
import com.syjiaer.clinic.server.mapper.organization.OrganizationSectionMapper;
|
||||||
import com.syjiaer.clinic.server.mapper.patient.PatientRegistrationMapper;
|
import com.syjiaer.clinic.server.mapper.patient.PatientRegistrationMapper;
|
||||||
import com.syjiaer.clinic.server.service.BaseService;
|
import com.syjiaer.clinic.server.service.BaseService;
|
||||||
import com.syjiaer.clinic.server.service.charge.ChargeService;
|
import com.syjiaer.clinic.server.service.charge.ChargeService;
|
||||||
|
|
@ -25,6 +37,8 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
|
@ -33,7 +47,13 @@ public class MedicalRecordService extends BaseService {
|
||||||
@Autowired
|
@Autowired
|
||||||
private MedicalRecordMapper medicalRecordMapper;
|
private MedicalRecordMapper medicalRecordMapper;
|
||||||
@Autowired
|
@Autowired
|
||||||
private MedicalRecordDetailMapper medicalRecordDetailMapper;
|
private MedicalGoodsListMapper medicalGoodsListMapper;
|
||||||
|
@Autowired
|
||||||
|
private MedicalItemListMapper medicalItemListMapper;
|
||||||
|
@Autowired
|
||||||
|
private OrganizationMemberMapper organizationMemberMapper;
|
||||||
|
@Autowired
|
||||||
|
private OrganizationSectionMapper organizationSectionMapper;
|
||||||
@Autowired
|
@Autowired
|
||||||
private PatientRegistrationMapper patientRegistrationMapper;
|
private PatientRegistrationMapper patientRegistrationMapper;
|
||||||
@Autowired
|
@Autowired
|
||||||
|
|
@ -42,6 +62,10 @@ public class MedicalRecordService extends BaseService {
|
||||||
private GoodsMapper goodsMapper;
|
private GoodsMapper goodsMapper;
|
||||||
@Autowired
|
@Autowired
|
||||||
private ChargeService chargeService;
|
private ChargeService chargeService;
|
||||||
|
@Autowired
|
||||||
|
private Config config;
|
||||||
|
@Autowired
|
||||||
|
private SocialRequest socialRequest;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 保存
|
* 保存
|
||||||
|
|
@ -68,40 +92,42 @@ public class MedicalRecordService extends BaseService {
|
||||||
medicalRecord.setDockerName(managerUser.getName());
|
medicalRecord.setDockerName(managerUser.getName());
|
||||||
medicalRecordMapper.insertOrUpdate(medicalRecord);
|
medicalRecordMapper.insertOrUpdate(medicalRecord);
|
||||||
Integer medicalRecordId = medicalRecord.getId();
|
Integer medicalRecordId = medicalRecord.getId();
|
||||||
List<MedicalRecordDetail> detailList = new ArrayList<>();
|
List<MedicalItemList> itemLists = new ArrayList<>();
|
||||||
|
|
||||||
for (Item item : saveDto.getItemList()) {
|
for (Item item : saveDto.getItemList()) {
|
||||||
Item dbItem = itemMapper.selectById(item.getId());
|
Item dbItem = itemMapper.selectById(item.getId());
|
||||||
MedicalRecordDetail detail = new MedicalRecordDetail();
|
MedicalItemList itemDetail = new MedicalItemList();
|
||||||
detail.setMedicalRecordId(medicalRecordId);
|
itemDetail.setItemId(item.getId());
|
||||||
detail.setProjectId(item.getId());
|
itemDetail.setName(dbItem.getItemName());
|
||||||
detail.setProjectName(dbItem.getItemName());
|
itemDetail.setSocialCode(dbItem.getItemSocialCode());
|
||||||
detail.setProjectSocialCode(dbItem.getItemSocialCode());
|
itemDetail.setUnit(dbItem.getUnit());
|
||||||
detail.setProjectUnit(dbItem.getUnit());
|
itemDetail.setUnitPrice(dbItem.getUnitPrice());
|
||||||
detail.setProjectUnitPrice(dbItem.getUnitPrice());
|
itemDetail.setMedicalRecordId(medicalRecordId);
|
||||||
detail.setType(MedicalRecordDetailTypeEnum.item.getType());
|
itemDetail.setNumber(1);
|
||||||
detailList.add(detail);
|
itemLists.add(itemDetail);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
medicalItemListMapper.insert(itemLists);
|
||||||
|
|
||||||
|
List<MedicalGoodsList> goodsLists = new ArrayList<>();
|
||||||
for (GoodsRetailDto goodsRetailDto : saveDto.getGoodsList()) {
|
for (GoodsRetailDto goodsRetailDto : saveDto.getGoodsList()) {
|
||||||
Goods dbGoods = goodsMapper.selectById(goodsRetailDto.getId());
|
Goods dbGoods = goodsMapper.selectById(goodsRetailDto.getId());
|
||||||
MedicalRecordDetail detail = new MedicalRecordDetail();
|
MedicalGoodsList goodsDetail = new MedicalGoodsList();
|
||||||
detail.setMedicalRecordId(medicalRecordId);
|
goodsDetail.setGoodsId(goodsRetailDto.getId());
|
||||||
detail.setProjectId(goodsRetailDto.getId());
|
goodsDetail.setName(dbGoods.getName());
|
||||||
detail.setProjectName(dbGoods.getName());
|
goodsDetail.setSocialCode(dbGoods.getHilistCode());
|
||||||
detail.setProjectSocialCode(dbGoods.getHilistCode());
|
goodsDetail.setUnit(goodsRetailDto.getSelectedUnit());
|
||||||
detail.setProjectUnit(goodsRetailDto.getSelectedUnit());
|
goodsDetail.setUnitPrice(goodsRetailDto.getSelectedPrice());
|
||||||
detail.setProjectUnitPrice(goodsRetailDto.getSelectedPrice());
|
goodsDetail.setMedicalRecordId(medicalRecordId);
|
||||||
detail.setType(MedicalRecordDetailTypeEnum.goods.getType());
|
goodsDetail.setNumber(goodsRetailDto.getSelectNum());
|
||||||
detail.setNumber(goodsRetailDto.getSelectNum());
|
goodsLists.add(goodsDetail);
|
||||||
detailList.add(detail);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
medicalRecordDetailMapper.insertOrUpdate(detailList);
|
medicalGoodsListMapper.insert(goodsLists);
|
||||||
|
|
||||||
//添加收费单
|
//添加收费单
|
||||||
saveDto.setId(medicalRecordId);
|
// saveDto.setId(medicalRecordId);
|
||||||
chargeService.save(saveDto);
|
// chargeService.save(saveDto);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -123,17 +149,15 @@ public class MedicalRecordService extends BaseService {
|
||||||
List<MedicalRecord> mrList = medicalRecordMapper.selectList(query);
|
List<MedicalRecord> mrList = medicalRecordMapper.selectList(query);
|
||||||
List<MedicalRecordVo> mrvList = new ArrayList<>();
|
List<MedicalRecordVo> mrvList = new ArrayList<>();
|
||||||
for (MedicalRecord medicalRecord : mrList) {
|
for (MedicalRecord medicalRecord : mrList) {
|
||||||
QueryWrapper<MedicalRecordDetail> severQuery = new QueryWrapper<>();
|
QueryWrapper<MedicalItemList> severQuery = new QueryWrapper<>();
|
||||||
MedicalRecordVo vo = new MedicalRecordVo();
|
MedicalRecordVo vo = new MedicalRecordVo();
|
||||||
BeanUtils.copyProperties(medicalRecord, vo);
|
BeanUtils.copyProperties(medicalRecord, vo);
|
||||||
severQuery.eq("medical_record_id", medicalRecord.getId());
|
severQuery.eq("medical_record_id", medicalRecord.getId());
|
||||||
severQuery.eq("type", 1);
|
List<MedicalItemList> serverDetail = medicalItemListMapper.selectList(severQuery);
|
||||||
List<MedicalRecordDetail> serverDetail = medicalRecordDetailMapper.selectList(severQuery);
|
|
||||||
vo.setServiceDetail(serverDetail);
|
vo.setServiceDetail(serverDetail);
|
||||||
QueryWrapper<MedicalRecordDetail> goodsQuery = new QueryWrapper<>();
|
QueryWrapper<MedicalGoodsList> goodsQuery = new QueryWrapper<>();
|
||||||
severQuery.eq("medical_record_id", medicalRecord.getId());
|
severQuery.eq("medical_record_id", medicalRecord.getId());
|
||||||
severQuery.eq("type", 2);
|
List<MedicalGoodsList> goodsDetail = medicalGoodsListMapper.selectList(goodsQuery);
|
||||||
List<MedicalRecordDetail> goodsDetail = medicalRecordDetailMapper.selectList(goodsQuery);
|
|
||||||
vo.setGoodsDetail(goodsDetail);
|
vo.setGoodsDetail(goodsDetail);
|
||||||
mrvList.add(vo);
|
mrvList.add(vo);
|
||||||
}
|
}
|
||||||
|
|
@ -150,18 +174,62 @@ public class MedicalRecordService extends BaseService {
|
||||||
query.eq("registration_id", regisId);
|
query.eq("registration_id", regisId);
|
||||||
|
|
||||||
MedicalRecord mr = medicalRecordMapper.selectOne(query);
|
MedicalRecord mr = medicalRecordMapper.selectOne(query);
|
||||||
QueryWrapper<MedicalRecordDetail> severQuery = new QueryWrapper<>();
|
QueryWrapper<MedicalItemList> severQuery = new QueryWrapper<>();
|
||||||
MedicalRecordVo vo = new MedicalRecordVo();
|
MedicalRecordVo vo = new MedicalRecordVo();
|
||||||
BeanUtils.copyProperties(mr, vo);
|
BeanUtils.copyProperties(mr, vo);
|
||||||
severQuery.eq("medical_record_id", mr.getId());
|
severQuery.eq("medical_record_id", mr.getId());
|
||||||
severQuery.eq("type", 1);
|
List<MedicalItemList> serverDetail = medicalItemListMapper.selectList(severQuery);
|
||||||
List<MedicalRecordDetail> serverDetail = medicalRecordDetailMapper.selectList(severQuery);
|
|
||||||
vo.setServiceDetail(serverDetail);
|
vo.setServiceDetail(serverDetail);
|
||||||
QueryWrapper<MedicalRecordDetail> goodsQuery = new QueryWrapper<>();
|
QueryWrapper<MedicalGoodsList> goodsQuery = new QueryWrapper<>();
|
||||||
goodsQuery.eq("medical_record_id", mr.getId());
|
goodsQuery.eq("medical_record_id", mr.getId());
|
||||||
goodsQuery.eq("type", 2);
|
List<MedicalGoodsList> goodsDetail = medicalGoodsListMapper.selectList(goodsQuery);
|
||||||
List<MedicalRecordDetail> goodsDetail = medicalRecordDetailMapper.selectList(goodsQuery);
|
|
||||||
vo.setGoodsDetail(goodsDetail);
|
vo.setGoodsDetail(goodsDetail);
|
||||||
return vo;
|
return vo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void uploadDiagnosis(Integer medicalRecordId){
|
||||||
|
MedicalRecord medicalRecord = medicalRecordMapper.selectById(medicalRecordId);
|
||||||
|
if (medicalRecord == null){
|
||||||
|
throw new MessageException("病历不存在");
|
||||||
|
}
|
||||||
|
PatientRegistration patientRegistration = patientRegistrationMapper.selectById(medicalRecord.getRegistrationId());
|
||||||
|
if (patientRegistration == null){
|
||||||
|
throw new MessageException("挂号单不存在");
|
||||||
|
}
|
||||||
|
OrganizationSection section = organizationSectionMapper.selectById(patientRegistration.getOrganizationSectionId());
|
||||||
|
OrganizationMember doctor = organizationMemberMapper.selectById(patientRegistration.getOrganizationDoctorId());
|
||||||
|
List<MedicalGoodsList> goodsLists = medicalGoodsListMapper.listByMedicalRecordId(medicalRecordId);
|
||||||
|
List<MedicalItemList> itemLists = medicalItemListMapper.listByMedicalRecordId(medicalRecordId);
|
||||||
|
|
||||||
|
LocalDateTime curTime = LocalDateTime.now();
|
||||||
|
IM2203A im2203A = new IM2203A();
|
||||||
|
IM2203A.Mdtrtinfo mdtrtinfo = new IM2203A.Mdtrtinfo();
|
||||||
|
mdtrtinfo.setMdtrt_id(patientRegistration.getMdtrtId());
|
||||||
|
mdtrtinfo.setPsn_no(patientRegistration.getPsnNo());
|
||||||
|
mdtrtinfo.setMed_type(config.get("social","medType"));
|
||||||
|
mdtrtinfo.setBegntime(curTime);
|
||||||
|
im2203A.setMdtrtinfo(mdtrtinfo);
|
||||||
|
JSONArray jsonArray = JSONArray.parseArray(medicalRecord.getDiagnosisDetail());
|
||||||
|
int i =0;
|
||||||
|
List<IM2203A.Diseinfo> diagList = new ArrayList<>();
|
||||||
|
for (Object object : jsonArray){
|
||||||
|
i++;
|
||||||
|
JSONObject json = (JSONObject) object;
|
||||||
|
IM2203A.Diseinfo diag = new IM2203A.Diseinfo();
|
||||||
|
diag.setDiag_type(medicalRecord.getDiagType());
|
||||||
|
diag.setDiag_srt_no(BigDecimal.valueOf(i));
|
||||||
|
diag.setDiag_code(json.getString("code"));
|
||||||
|
diag.setDiag_name(json.getString("name"));
|
||||||
|
diag.setDiag_dept(section.getName());
|
||||||
|
diag.setDise_dor_no(doctor.getSocialMemberCode());
|
||||||
|
diag.setDise_dor_name(doctor.getName());
|
||||||
|
diag.setDiag_time(curTime);
|
||||||
|
diag.setVali_flag("1");
|
||||||
|
diagList.add(diag);
|
||||||
|
}
|
||||||
|
im2203A.setDiseinfo(diagList);
|
||||||
|
socialRequest.call2203A(im2203A);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@ public class OrganizationMemberService extends BaseService {
|
||||||
queryWrapper.eq("tel", tel);
|
queryWrapper.eq("tel", tel);
|
||||||
}
|
}
|
||||||
queryWrapper.eq("del_flag", false);
|
queryWrapper.eq("del_flag", false);
|
||||||
Page<OrganizationMember> pageResult = pageHelper(pageNum, pageSize, queryWrapper, organizationMemberMapper);
|
Page<OrganizationMember> pageResult = pageHelper(pageNum, pageSize, queryWrapper, organizationMemberMapper,"create_datetime",false);
|
||||||
return pageResult;
|
return pageResult;
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@ package com.syjiaer.clinic.server.service.organization;
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.syjiaer.clinic.server.common.api.request.SocialRequest;
|
||||||
import com.syjiaer.clinic.server.common.config.Config;
|
import com.syjiaer.clinic.server.common.config.Config;
|
||||||
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.util.StringUtil;
|
||||||
|
|
@ -9,6 +10,7 @@ import com.syjiaer.clinic.server.common.vo.Page;
|
||||||
import com.syjiaer.clinic.server.entity.organization.OrganizationSection;
|
import com.syjiaer.clinic.server.entity.organization.OrganizationSection;
|
||||||
import com.syjiaer.clinic.server.mapper.organization.OrganizationSectionMapper;
|
import com.syjiaer.clinic.server.mapper.organization.OrganizationSectionMapper;
|
||||||
import com.syjiaer.clinic.server.service.BaseService;
|
import com.syjiaer.clinic.server.service.BaseService;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
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 org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
@ -20,6 +22,7 @@ import java.util.List;
|
||||||
* 组织科室
|
* 组织科室
|
||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
|
@Slf4j
|
||||||
public class OrganizationSectionService extends BaseService {
|
public class OrganizationSectionService extends BaseService {
|
||||||
@Autowired
|
@Autowired
|
||||||
private StringUtil stringUtil;
|
private StringUtil stringUtil;
|
||||||
|
|
@ -27,6 +30,8 @@ public class OrganizationSectionService extends BaseService {
|
||||||
private OrganizationSectionMapper organizationSectionMapper;
|
private OrganizationSectionMapper organizationSectionMapper;
|
||||||
@Autowired
|
@Autowired
|
||||||
private Config config;
|
private Config config;
|
||||||
|
@Autowired
|
||||||
|
private SocialRequest socialRequest;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分页查询科室
|
* 分页查询科室
|
||||||
|
|
@ -73,30 +78,30 @@ public class OrganizationSectionService extends BaseService {
|
||||||
String processing = getString(caty);
|
String processing = getString(caty);
|
||||||
organizationSection.setCaty(processing);
|
organizationSection.setCaty(processing);
|
||||||
organizationSectionMapper.insert(organizationSection);
|
organizationSectionMapper.insert(organizationSection);
|
||||||
// try {
|
try {
|
||||||
// socialRequest.call3401(new com.syjiaer.clinic.server.modules.social.api.input.IM3401()
|
socialRequest.call3401(new com.syjiaer.clinic.server.common.api.input.IM3401()
|
||||||
// .setHospDeptCodg(organizationSection.getCode())
|
.setHospDeptCodg(organizationSection.getCode())
|
||||||
// .setHospDeptName(organizationSection.getName())
|
.setHospDeptName(organizationSection.getName())
|
||||||
// .setCaty(organizationSection.getCaty())
|
.setCaty(organizationSection.getCaty())
|
||||||
// .setBegntime(organizationSection.getBeginDate())
|
.setBegntime(organizationSection.getBeginDate())
|
||||||
// .setEndtime(organizationSection.getEndDate())
|
.setEndtime(organizationSection.getEndDate())
|
||||||
// .setItro(organizationSection.getInfo())
|
.setItro(organizationSection.getInfo())
|
||||||
// .setDeptResperName(organizationSection.getResperName())
|
.setDeptResperName(organizationSection.getResperName())
|
||||||
// .setDeptResperTel(organizationSection.getResperTel())
|
.setDeptResperTel(organizationSection.getResperTel())
|
||||||
// .setDeptMedServScp(organizationSection.getMedServScp())
|
.setDeptMedServScp(organizationSection.getMedServScp())
|
||||||
// .setDeptEstbdat(organizationSection.getCreationDate())
|
.setDeptEstbdat(organizationSection.getCreationDate())
|
||||||
// .setAprvBedCnt(organizationSection.getBedCnt())
|
.setAprvBedCnt(organizationSection.getBedCnt())
|
||||||
// .setHiCrtfBedCnt(organizationSection.getSocialBedCnt())
|
.setHiCrtfBedCnt(organizationSection.getSocialBedCnt())
|
||||||
// .setPoolareaNo(social_insuplcAdmdvs)
|
.setPoolareaNo(socialInsuplcAdmdvs)
|
||||||
// .setDrPsncnt(organizationSection.getDrPsncnt())
|
.setDrPsncnt(organizationSection.getDrPsncnt())
|
||||||
// .setPharPsncnt(organizationSection.getPharPsncnt())
|
.setPharPsncnt(organizationSection.getPharPsncnt())
|
||||||
// .setNursPsncnt(organizationSection.getNursPsncnt())
|
.setNursPsncnt(organizationSection.getNursPsncnt())
|
||||||
// .setTecnPsncnt(organizationSection.getTecnPsncnt())
|
.setTecnPsncnt(organizationSection.getTecnPsncnt())
|
||||||
// .setMemo(organizationSection.getMemo()));
|
.setMemo(organizationSection.getMemo()));
|
||||||
// } catch (MessageException messageException) {
|
} catch (MessageException messageException) {
|
||||||
// log.error("科室添加失败", messageException);
|
log.error("科室添加失败", messageException);
|
||||||
// throw new MessageException("科室添加失败");
|
throw new MessageException("科室添加失败");
|
||||||
// }
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,25 @@
|
||||||
package com.syjiaer.clinic.server.service.patient;
|
package com.syjiaer.clinic.server.service.patient;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.syjiaer.clinic.server.entity.patient.PatientInfo;
|
||||||
|
import com.syjiaer.clinic.server.mapper.patient.PatientInfoMapper;
|
||||||
import com.syjiaer.clinic.server.service.BaseService;
|
import com.syjiaer.clinic.server.service.BaseService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
@Service
|
@Service
|
||||||
public class PatientInfoService extends BaseService {
|
public class PatientInfoService extends BaseService {
|
||||||
|
@Autowired
|
||||||
|
private PatientInfoMapper patientInfoMapper;
|
||||||
|
|
||||||
|
public void save(PatientInfo patientInfo){
|
||||||
|
QueryWrapper<PatientInfo> queryWrapper = new QueryWrapper<>();
|
||||||
|
queryWrapper.eq("phone", patientInfo.getPhone());
|
||||||
|
PatientInfo dbInfo = patientInfoMapper.selectOne(queryWrapper);
|
||||||
|
if (dbInfo != null){
|
||||||
|
patientInfo.setId(dbInfo.getId());
|
||||||
|
}
|
||||||
|
patientInfoMapper.insertOrUpdate(patientInfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,15 @@
|
||||||
package com.syjiaer.clinic.server.service.patient;
|
package com.syjiaer.clinic.server.service.patient;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson2.JSONObject;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||||
|
import com.syjiaer.clinic.server.common.api.input.IM2201;
|
||||||
|
import com.syjiaer.clinic.server.common.api.request.SocialRequest;
|
||||||
import com.syjiaer.clinic.server.common.constants.Constants;
|
import com.syjiaer.clinic.server.common.constants.Constants;
|
||||||
import com.syjiaer.clinic.server.common.enums.RegistrationStatusEnum;
|
import com.syjiaer.clinic.server.common.enums.RegistrationStatusEnum;
|
||||||
import com.syjiaer.clinic.server.common.exception.MessageException;
|
import com.syjiaer.clinic.server.common.exception.MessageException;
|
||||||
import com.syjiaer.clinic.server.common.util.DateUtil;
|
import com.syjiaer.clinic.server.common.util.DateUtil;
|
||||||
|
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.organization.OrganizationMember;
|
import com.syjiaer.clinic.server.entity.organization.OrganizationMember;
|
||||||
import com.syjiaer.clinic.server.entity.organization.OrganizationSection;
|
import com.syjiaer.clinic.server.entity.organization.OrganizationSection;
|
||||||
|
|
@ -19,6 +24,7 @@ import com.syjiaer.clinic.server.mapper.patient.PatientRegistrationMapper;
|
||||||
import com.syjiaer.clinic.server.service.BaseService;
|
import com.syjiaer.clinic.server.service.BaseService;
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.context.annotation.Lazy;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
|
@ -40,6 +46,11 @@ public class PatientRegistrationService extends BaseService {
|
||||||
private OrganizationMemberMapper organizationMemberMapper;
|
private OrganizationMemberMapper organizationMemberMapper;
|
||||||
@Autowired
|
@Autowired
|
||||||
private OrganizationSectionMapper organizationSectionMapper;
|
private OrganizationSectionMapper organizationSectionMapper;
|
||||||
|
@Autowired
|
||||||
|
@Lazy
|
||||||
|
private PatientRegistrationService patientRegistrationService;
|
||||||
|
@Autowired
|
||||||
|
private SocialRequest socialRequest;
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -47,38 +58,94 @@ public class PatientRegistrationService extends BaseService {
|
||||||
* @param patientRegistrationParam 挂号信息
|
* @param patientRegistrationParam 挂号信息
|
||||||
*/
|
*/
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void registration(PatientRegistration registrationParam) {
|
public PatientRegistration registration(PatientRegistration registrationParam,String mdtrtCertType, String mdtrtCertNo) {
|
||||||
//TODO 挂号和患者 记录身份证号非必填
|
//TODO 挂号和患者 记录身份证号非必填
|
||||||
if (registrationParam == null) {
|
if (registrationParam == null) {
|
||||||
throw new MessageException("data参数为空");
|
throw new MessageException("data参数为空");
|
||||||
}
|
}
|
||||||
|
LocalDateTime now =LocalDateTime.now();
|
||||||
|
String fstNo = StringUtil.getCode("FSN");
|
||||||
|
if (registrationParam.getPatientInfoId() == null){
|
||||||
|
//将患者添加到患者表
|
||||||
|
|
||||||
|
PatientInfo patientInfo = new PatientInfo();
|
||||||
|
patientInfo.setName(registrationParam.getName());
|
||||||
|
patientInfo.setPhone(registrationParam.getPhone());
|
||||||
|
patientInfo.setSex(registrationParam.getGender());
|
||||||
|
patientInfo.setAge(registrationParam.getAge());
|
||||||
|
|
||||||
|
QueryWrapper<PatientInfo> patientInfoQuery = new QueryWrapper<>();
|
||||||
|
patientInfoQuery.eq("phone", registrationParam.getPhone());
|
||||||
|
List<PatientInfo> patientInfoList = patientInfoMapper.selectList(patientInfoQuery);
|
||||||
|
if (patientInfoList.isEmpty()) {
|
||||||
|
patientInfoMapper.insert(patientInfo);
|
||||||
|
} else {
|
||||||
|
patientInfo.setId(patientInfoList.get(0).getId());
|
||||||
|
patientInfoMapper.updateById(patientInfo);
|
||||||
|
}
|
||||||
|
registrationParam.setPatientInfoId(patientInfo.getId());
|
||||||
|
}
|
||||||
PatientRegistration registration = new PatientRegistration();
|
PatientRegistration registration = new PatientRegistration();
|
||||||
BeanUtils.copyProperties(registrationParam, registration);
|
BeanUtils.copyProperties(registrationParam, registration);
|
||||||
|
registration.setFstNo(fstNo);
|
||||||
registration.setRegistrationMoney(new BigDecimal("0"));
|
registration.setRegistrationMoney(new BigDecimal("0"));
|
||||||
registration.setCreateDatetime(LocalDateTime.now());
|
registration.setCreateDatetime(now);
|
||||||
registration.setType(1);
|
registration.setType(1);
|
||||||
registration.setStatus(1);
|
registration.setStatus(1);
|
||||||
|
OrganizationMember docker = organizationMemberMapper.selectById(registration.getOrganizationDoctorId());
|
||||||
//将患者添加到患者表
|
OrganizationSection section = organizationSectionMapper.selectById(docker.getSectionId());
|
||||||
|
registration.setOrganizationDoctorId(docker.getId());
|
||||||
PatientInfo patientInfo = new PatientInfo();
|
registration.setOrganizationSectionId(section.getId());
|
||||||
patientInfo.setName(registrationParam.getName());
|
|
||||||
patientInfo.setPhone(registrationParam.getPhone());
|
|
||||||
patientInfo.setSex(registrationParam.getGender());
|
|
||||||
patientInfo.setAge(registrationParam.getAge());
|
|
||||||
|
|
||||||
QueryWrapper<PatientInfo> patientInfoQuery = new QueryWrapper<>();
|
|
||||||
patientInfoQuery.eq("phone", registrationParam.getPhone());
|
|
||||||
List<PatientInfo> patientInfoList = patientInfoMapper.selectList(patientInfoQuery);
|
|
||||||
if (patientInfoList.isEmpty()) {
|
|
||||||
patientInfoMapper.insert(patientInfo);
|
|
||||||
} else {
|
|
||||||
patientInfo.setId(patientInfoList.get(0).getId());
|
|
||||||
patientInfoMapper.updateById(patientInfo);
|
|
||||||
}
|
|
||||||
registration.setPatientInfoId(patientInfo.getId());
|
|
||||||
patientRegistrationMapper.insert(registration);
|
patientRegistrationMapper.insert(registration);
|
||||||
|
//医保挂号
|
||||||
|
if (mdtrtCertType == null && mdtrtCertNo == null){
|
||||||
|
return registration;
|
||||||
|
}
|
||||||
|
|
||||||
|
IM2201 im2201 = new IM2201();
|
||||||
|
im2201.setPsnNo(registration.getPsnNo());
|
||||||
|
im2201.setInsutype(registration.getInsutype());
|
||||||
|
im2201.setBegntime(now);
|
||||||
|
im2201.setMdtrtCertType(mdtrtCertType);
|
||||||
|
im2201.setMdtrtCertNo(mdtrtCertNo);
|
||||||
|
im2201.setIptOtpNo(fstNo);
|
||||||
|
im2201.setAtddrNo(docker.getSocialMemberCode());
|
||||||
|
im2201.setDrName(docker.getName());
|
||||||
|
im2201.setDeptCode(section.getCode());
|
||||||
|
im2201.setDeptName(section.getName());
|
||||||
|
im2201.setCaty(section.getCaty());
|
||||||
|
JSONObject jsonObject = socialRequest.call2201(im2201);
|
||||||
|
UpdateWrapper<PatientRegistration> regisWrapper = new UpdateWrapper<>();
|
||||||
|
regisWrapper.set("mdtrt_id",((JSONObject)jsonObject.get("data")).get("mdtrt_id"));
|
||||||
|
regisWrapper.set("type",2);
|
||||||
|
regisWrapper.eq("id",registration.getId());
|
||||||
|
patientRegistrationMapper.update(null,regisWrapper);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
return registration;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
public PatientRegistration regisByDockerAndPatient(OrganizationMember docker, PatientInfo patient, Short type, Integer status){
|
||||||
|
PatientRegistration registration = new PatientRegistration();
|
||||||
|
//病人信息
|
||||||
|
registration.setPatientInfoId(patient.getId());
|
||||||
|
registration.setName(patient.getName());
|
||||||
|
registration.setGender(patient.getSex());
|
||||||
|
registration.setAge(patient.getAge());
|
||||||
|
registration.setPhone(patient.getPhone());
|
||||||
|
//医生信息
|
||||||
|
registration.setOrganizationSectionId(docker.getSectionId());
|
||||||
|
registration.setOrganizationDoctorId(docker.getId());
|
||||||
|
|
||||||
|
//挂号信息
|
||||||
|
registration.setVisitType(type);
|
||||||
|
registration.setCreateDatetime(LocalDateTime.now());
|
||||||
|
registration.setRegistrationMoney(BigDecimal.valueOf(0));
|
||||||
|
registration.setDelFlag(0);
|
||||||
|
return patientRegistrationService.registration(registration,null,null);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 挂号列表
|
* 挂号列表
|
||||||
* @param pageNum 页码
|
* @param pageNum 页码
|
||||||
|
|
|
||||||
|
|
@ -40,21 +40,17 @@ public class SocialDiagnoseService {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
SocialDiagnose socialDiagnose = new SocialDiagnose();
|
SocialDiagnose socialDiagnose = new SocialDiagnose();
|
||||||
String code = line_array[0];
|
String code = line_array[10];
|
||||||
socialDiagnose.setSocialCode(code);
|
socialDiagnose.setCode(code);
|
||||||
|
socialDiagnose.setName(line_array[11]);
|
||||||
socialDiagnose.setVersionName(line_array[22]);
|
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.setCreateDatetime(LocalDateTime.parse(line_array[20], dateTimeFormatter));
|
||||||
socialDiagnose.setUpdateDatetime(LocalDateTime.parse(line_array[21], dateTimeFormatter));
|
socialDiagnose.setUpdateDatetime(LocalDateTime.parse(line_array[21], dateTimeFormatter));
|
||||||
list.add(socialDiagnose);
|
list.add(socialDiagnose);
|
||||||
codeList.add(socialDiagnose.getSocialCode());
|
codeList.add(code);
|
||||||
}
|
}
|
||||||
QueryWrapper<SocialDiagnose> queryWrapper = new QueryWrapper<>();
|
QueryWrapper<SocialDiagnose> queryWrapper = new QueryWrapper<>();
|
||||||
queryWrapper.in("social_code", codeList);
|
queryWrapper.in("code", codeList);
|
||||||
socialDiagnoseMapper.delete(queryWrapper);
|
socialDiagnoseMapper.delete(queryWrapper);
|
||||||
socialDiagnoseMapper.insert(list, 100);
|
socialDiagnoseMapper.insert(list, 100);
|
||||||
socialDirectoryVersionService.setSocialDirectoryVersion(type, version_name, list.get(0).getVersionName(), list.size());
|
socialDirectoryVersionService.setSocialDirectoryVersion(type, version_name, list.get(0).getVersionName(), list.size());
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,52 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<configuration>
|
||||||
|
<!-- 定义日志文件的路径和名称 -->
|
||||||
|
<property name="LOG_FILE" value="D:/clinic/logs/base/app.log"/>
|
||||||
|
<property name="REQUEST_FILE" value="D:/clinic/logs/request/app.log"/>
|
||||||
|
|
||||||
|
<!-- 控制台输出 -->
|
||||||
|
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
|
||||||
|
<encoder>
|
||||||
|
<pattern>%d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n</pattern>
|
||||||
|
</encoder>
|
||||||
|
</appender>
|
||||||
|
<appender name="REQUEST" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||||
|
<file>${REQUEST_FILE}</file>
|
||||||
|
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||||
|
<!-- 日志文件按天滚动 -->
|
||||||
|
<fileNamePattern>D:/clinic/logs/request/app.%d{yyyy-MM-dd}.log</fileNamePattern>
|
||||||
|
<!-- 保留 30 天的历史日志 -->
|
||||||
|
<maxHistory>30</maxHistory>
|
||||||
|
</rollingPolicy>
|
||||||
|
<encoder>
|
||||||
|
<pattern>%d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n</pattern>
|
||||||
|
</encoder>
|
||||||
|
<immediateFlush>true</immediateFlush>
|
||||||
|
</appender>
|
||||||
|
|
||||||
|
<!-- 文件输出 -->
|
||||||
|
<appender name="DEFAULT" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||||
|
<file>${LOG_FILE}</file>
|
||||||
|
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||||
|
<!-- 日志文件按天滚动 -->
|
||||||
|
<fileNamePattern>D:/clinic/logs/base/app.%d{yyyy-MM-dd}.log</fileNamePattern>
|
||||||
|
<!-- 保留 30 天的历史日志 -->
|
||||||
|
<maxHistory>30</maxHistory>
|
||||||
|
|
||||||
|
</rollingPolicy>
|
||||||
|
<encoder>
|
||||||
|
<pattern>%d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n</pattern>
|
||||||
|
</encoder>
|
||||||
|
</appender>
|
||||||
|
|
||||||
|
<logger name="com.syjiaer.clinic.server.common.util.HttpUtil" level="info" additivity="false">
|
||||||
|
<!-- <appender-ref ref="CONSOLE"/>-->
|
||||||
|
<appender-ref ref="REQUEST"/>
|
||||||
|
</logger>
|
||||||
|
|
||||||
|
<!-- 根日志记录器 -->
|
||||||
|
<root level="WARN">
|
||||||
|
<appender-ref ref="CONSOLE"/>
|
||||||
|
<appender-ref ref="DEFAULT"/>
|
||||||
|
</root>
|
||||||
|
</configuration>
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?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">
|
<!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.medical.MedicalRecordDetailMapper">
|
<mapper namespace="com.syjiaer.clinic.server.mapper.medical.MedicalGoodsListMapper">
|
||||||
|
|
||||||
</mapper>
|
</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.medical.MedicalItemListMapper">
|
||||||
|
|
||||||
|
</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>
|
||||||
|
|
@ -1,5 +1,8 @@
|
||||||
package com.syjiaer.clinic.server;
|
package com.syjiaer.clinic.server;
|
||||||
|
|
||||||
|
import com.syjiaer.clinic.server.common.api.input.IM2203A;
|
||||||
|
import com.syjiaer.clinic.server.service.medical.MedicalRecordService;
|
||||||
|
import com.syjiaer.clinic.server.service.social.SocialDiagnoseService;
|
||||||
import com.syjiaer.clinic.server.service.social.SocialDirectoryService;
|
import com.syjiaer.clinic.server.service.social.SocialDirectoryService;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
@ -12,11 +15,14 @@ import java.util.Map;
|
||||||
class ServerApplicationTests {
|
class ServerApplicationTests {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private SocialDirectoryService socialDirectoryService;
|
private MedicalRecordService medicalRecordService;
|
||||||
|
@Autowired
|
||||||
|
private SocialDiagnoseService socialDiagnoseService;
|
||||||
@Test
|
@Test
|
||||||
void contextLoads() {
|
void contextLoads() {
|
||||||
Map<String, Object> download = socialDirectoryService.download("0", 1315);
|
socialDiagnoseService.download(1307,"0");
|
||||||
System.out.println(download);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue