Преглед на файлове

数据同步和后台规则跑数据

0027005599 преди 1 година
родител
ревизия
c0db953507
променени са 20 файла, в които са добавени 495 реда и са изтрити 223 реда
  1. 10 1
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/Constant.java
  2. 129 72
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/entity/AfterIncidentDetailLog.java
  3. 5 0
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/entity/AfterIncidentLog.java
  4. 1 1
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/entity/AfterwardsAuditDetail.java
  5. 28 12
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/job/AfterWaringJob.java
  6. 36 32
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/job/AfterWaringLogJob.java
  7. 36 32
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/job/AfterWaringLogTestJob.java
  8. 6 1
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/job/XCFYDataV_STAFF_INFOJob.java
  9. 19 0
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/job/XCFYDatav_hospitalizatio_settle_detailJob.java
  10. 7 0
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/job/XCFYDatav_master_admission_billJob.java
  11. 1 1
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/job/XCFYDatav_medical_insurance_drugsJob.java
  12. 60 1
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/job/XCFYDatav_outpatient_settle_billJob.java
  13. 22 1
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/job/XCFYDatav_outpatient_settle_detailsJob.java
  14. 40 21
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/ruleengine/FactorEnchangeFactory.java
  15. 3 1
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/ruleengine/RuleEngine.java
  16. 29 31
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/ruleengine/dict/DictUtil.java
  17. 5 0
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/service/impl/AfterIncidentLogServiceImpl.java
  18. 2 1
      jeecg-module-system/jeecg-system-start/src/main/resources/application-dev.yml
  19. 35 0
      jeecg-module-system/jeecg-system-start/src/test/java/org/jeecg/AfterwardsAuditDataTest.java
  20. 21 15
      jeecg-module-system/jeecg-system-start/src/test/java/org/jeecg/TestMain.java

+ 10 - 1
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/Constant.java

@@ -71,8 +71,14 @@ public class Constant {
     //医保中心编码和名称的映射关系
     public static final String MEDICAL_CODE_NAME_KEY = "MEDICAL_CODE_NAME_KEY";
     public static final String PROJECT_TYPE_KEY = "project_type";
+    //单价
+    public static final String PRICE_KEY = "price";
     //金额
     public static final String AMOUNT_KEY = "amount";
+    //数量
+    public static final String QUANTITY_KEY = "quantity";
+    //医保标识
+    public static final String MEDICAL_INSURANCE_MARK_KEY = "medical_insurance_mark";
 
     //单次门诊住院所有项目金额
     public static final String ALL_AMOUNT_KEY = "totoal_amount";
@@ -169,5 +175,8 @@ public class Constant {
       */
     public static final String PROJECT_VOLIDATION_DESC_KEY = "PROJECT_VOLIDATION_DESC_MAP_";
 
-
+    /**
+     * 医疗收费项目类别字典key
+     */
+    public static final String DICT_CATEGORIES_ITEMS_KEY = "categories_items";
 }

+ 129 - 72
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/entity/AfterIncidentDetailLog.java

@@ -6,13 +6,16 @@ import java.util.Date;
 import java.math.BigDecimal;
 import java.util.List;
 
+import com.alibaba.fastjson.annotation.JSONField;
 import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableName;
 import com.baomidou.mybatisplus.annotation.TableLogic;
+import com.fasterxml.jackson.annotation.JsonProperty;
 import lombok.Data;
 import com.fasterxml.jackson.annotation.JsonFormat;
+import org.apache.ibatis.annotations.Mapper;
 import org.springframework.format.annotation.DateTimeFormat;
 import org.jeecgframework.poi.excel.annotation.Excel;
 import org.jeecg.common.aspect.annotation.Dict;
@@ -58,111 +61,137 @@ public class AfterIncidentDetailLog implements Serializable {
 	/**就诊类别;1:住院 2:门诊*/
 	@Excel(name = "就诊类别;1:住院 2:门诊", width = 15)
     @ApiModelProperty(value = "就诊类别;1:住院 2:门诊")
-    @TableField(value = "visit_type")
+    @TableField("visit_type")
     private java.lang.String visit_type;
 	/**科室编码*/
 	@Excel(name = "科室编码", width = 15)
     @ApiModelProperty(value = "科室编码")
-    @TableField(value = "medical_dept_code")
-    private java.lang.String medical_dept_code;
+    @JsonProperty("medical_dept_code")
+    @JSONField(name = "medical_dept_code")
+    private java.lang.String medicalDeptCode;
+
+
 	/**科室名称*/
 	@Excel(name = "科室名称", width = 15)
     @ApiModelProperty(value = "科室名称")
-    @TableField(value = "medical_dept_name")
-    private java.lang.String medical_dept_name;
+    @JsonProperty("medical_dept_name")
+    @JSONField(name = "medical_dept_name")
+    private java.lang.String medicalDeptName;
 	/**医生姓名*/
 	@Excel(name = "医生姓名", width = 15)
     @ApiModelProperty(value = "医生姓名")
-    @TableField(value = "doctor_name")
-    private java.lang.String doctor_name;
+    @JsonProperty("doctor_name")
+    @JSONField(name = "doctor_name")
+    private java.lang.String doctorName;
 	/**主诊医师编码*/
 	@Excel(name = "主诊医师编码", width = 15)
     @ApiModelProperty(value = "主诊医师编码")
-    @TableField(value = "doctor_id")
-    private java.lang.String doctor_code;
+    @TableField("doctor_id")
+    @JsonProperty("doctor_code")
+    @JSONField(name = "doctor_code")
+    private java.lang.String doctorCode;
 	/**医生级别;*/
 	@Excel(name = "医生级别;", width = 15)
     @ApiModelProperty(value = "医生级别;")
-    @TableField(value = "doctor_level")
-    private java.lang.String doctor_level;
+    @JsonProperty("doctor_level")
+    @JSONField(name = "doctor_level")
+    private java.lang.String doctorLevel;
 	/**个人编号*/
 	@Excel(name = "个人编号", width = 15)
     @ApiModelProperty(value = "个人编号")
-    @TableField(value = "patient_id")
-    private java.lang.String patient_id;
+    @JsonProperty("patient_id")
+    @JSONField(name = "patient_id")
+    private java.lang.String patientId;
 	/**患者姓名*/
 	@Excel(name = "患者姓名", width = 15)
     @ApiModelProperty(value = "患者姓名")
-    @TableField(value = "patient_name")
-    private java.lang.String patient_name;
+
+    @JsonProperty("patient_name")
+    @JSONField(name = "patient_name")
+    private java.lang.String patientName;
 	/**患者性别;*/
 	@Excel(name = "患者性别;", width = 15)
     @ApiModelProperty(value = "患者性别;")
     @Dict(dicCode = "sex")
-    @TableField(value = "patient_gender")
-    private java.lang.String patient_gender;
+    @JsonProperty("patient_gender")
+    @JSONField(name = "patient_gender")
+    private java.lang.String patientGender;
 	/**患者年龄;*/
 	@Excel(name = "患者年龄;", width = 15)
     @ApiModelProperty(value = "患者年龄;")
-    @TableField(value = "patient_age")
-    private java.lang.String patient_age;
+    @JsonProperty("patient_age")
+    @JSONField(name = "patient_age")
+    private java.lang.String patientAge;
 	/**住院号/门诊号*/
 	@Excel(name = "住院号/门诊号", width = 15)
     @ApiModelProperty(value = "住院号/门诊号")
-    @TableField(value = "visit_no")
-    private java.lang.String visit_no;
+    @JsonProperty("visit_no")
+    @JSONField(name = "visit_no")
+    private java.lang.String visitNo;
 	/**医嘱号/处方号*/
 	@Excel(name = "医嘱号/处方号", width = 15)
     @ApiModelProperty(value = "医嘱号/处方号")
-    @TableField(value = "recipe_no")
-    private java.lang.String recipe_no;
+    @JsonProperty("recipe_no")
+    @JSONField(name = "recipe_no")
+    private java.lang.String recipeNo;
 	/**入院时间;*/
 	@Excel(name = "入院时间;", width = 15, format =  "yyyy-MM-dd HH:mm:ss")
 	@JsonFormat(timezone = "GMT+8",pattern =  "yyyy-MM-dd HH:mm:ss")
     @DateTimeFormat(pattern= "yyyy-MM-dd HH:mm:ss")
     @ApiModelProperty(value = "入院时间;")
-    @TableField(value = "in_hosp_date")
-    private java.util.Date in_hosp_date;
+    @JsonProperty("in_hosp_date")
+    @JSONField(name = "in_hosp_date")
+    private java.util.Date inHospDate;
 	/**项目类型*/
 	@Excel(name = "项目类型", width = 15)
     @ApiModelProperty(value = "项目类型")
-    @TableField(value = "project_type")
-    private java.lang.String project_type;
+    @JsonProperty("project_type")
+    @JSONField(name = "project_type")
+    private java.lang.String projectType;
 	/**项目编码*/
 	@Excel(name = "项目编码", width = 15)
     @ApiModelProperty(value = "项目编码")
-    @TableField(value = "project_code")
-    private java.lang.String project_code;
+    @TableField("proejct_code")
+    @JsonProperty("project_code")
+    @JSONField(name = "project_code")
+    private java.lang.String projectCode;
 	/**项目名称*/
 	@Excel(name = "项目名称", width = 15)
     @ApiModelProperty(value = "项目名称")
-    @TableField(value = "project_name")
-    private java.lang.String project_name;
+    @TableField("proejct_name")
+    @JsonProperty("project_name")
+    @JSONField(name = "project_name")
+    private java.lang.String projectName;
 	/**医保项目编码*/
 	@Excel(name = "医保项目编码", width = 15)
     @ApiModelProperty(value = "医保项目编码")
-    @TableField(value = "medical_project_code")
-    private java.lang.String medical_project_code;
+    @JsonProperty("medical_project_code")
+    @JSONField(name = "medical_project_code")
+    private java.lang.String medicalProjectCode;
 	/**医保项目名称*/
 	@Excel(name = "医保项目名称", width = 15)
     @ApiModelProperty(value = "医保项目名称")
-    @TableField("medical_project_name")
-    private java.lang.String medical_project_name;
+    @JsonProperty("medical_project_name")
+    @JSONField(name = "medical_project_name")
+    private java.lang.String medicalProjectName;
 	/**发票项目编号*/
 	@Excel(name = "发票项目编号", width = 15)
     @ApiModelProperty(value = "发票项目编号")
-    @TableField(value = "invoice_project")
-    private java.lang.String invoice_project;
+    @JsonProperty("invoice_project")
+    @JSONField(name = "invoice_project")
+    private java.lang.String invoiceProject;
 	/**离院方式;*/
 	@Excel(name = "离院方式;", width = 15)
     @ApiModelProperty(value = "离院方式;")
-    @TableField(value = "discharge_status")
-    private java.lang.String discharge_status;
+    @JsonProperty("discharge_status")
+    @JSONField(name = "discharge_status")
+    private java.lang.String dischargeStatus;
 	/**出院床位;*/
 	@Excel(name = "出院床位;", width = 15)
     @ApiModelProperty(value = "出院床位;")
-    @TableField(value = "dscg_bed")
-    private java.lang.String dscg_bed;
+    @JsonProperty("dscg_bed")
+    @JSONField(name = "dscg_bed")
+    private java.lang.String dscgBed;
 	/**出院日期;*/
 	@Excel(name = "出院日期;", width = 15, format =  "yyyy-MM-dd HH:mm:ss")
 	@JsonFormat(timezone = "GMT+8",pattern =  "yyyy-MM-dd HH:mm:ss")
@@ -172,18 +201,24 @@ public class AfterIncidentDetailLog implements Serializable {
 	/**费用类别;01	床位费 02	诊察费 03	检查费 04	化验费 05	治疗费 06	手术费 07	护理费 08	卫生材料费 09	西药费 10	中药饮片费 11	中成药费 12	一般诊疗费 13	挂号费 14	其他费 14012	单病种除外内容 14013	单病种超标准床位费 14014	单病种定额标准费 1407	救护车费 1408	MRI费 1409	CT费 1410	彩超费 1411	输氧费 1412	输血费 1413	麻醉费 1414	麻醉相关项目费 1415	其他医疗费*/
 	@Excel(name = "费用类别;01	床位费 02	诊察费 03	检查费 04	化验费 05	治疗费 06	手术费 07	护理费 08	卫生材料费 09	西药费 10	中药饮片费 11	中成药费 12	一般诊疗费 13	挂号费 14	其他费 14012	单病种除外内容 14013	单病种超标准床位费 14014	单病种定额标准费 1407	救护车费 1408	MRI费 1409	CT费 1410	彩超费 1411	输氧费 1412	输血费 1413	麻醉费 1414	麻醉相关项目费 1415	其他医疗费", width = 15)
     @ApiModelProperty(value = "费用类别;01	床位费 02	诊察费 03	检查费 04	化验费 05	治疗费 06	手术费 07	护理费 08	卫生材料费 09	西药费 10	中药饮片费 11	中成药费 12	一般诊疗费 13	挂号费 14	其他费 14012	单病种除外内容 14013	单病种超标准床位费 14014	单病种定额标准费 1407	救护车费 1408	MRI费 1409	CT费 1410	彩超费 1411	输氧费 1412	输血费 1413	麻醉费 1414	麻醉相关项目费 1415	其他医疗费")
-    @TableField(value = "expense_category")
-    private java.lang.String expense_category;
+    @JsonProperty("expense_category")
+    @JSONField(name = "expense_category")
+    private java.lang.String expenseCategory;
+    @JsonProperty("change_class")
+    @JSONField(name = "change_class")
+    private String changeClass;
 	/**剂型*/
 	@Excel(name = "剂型", width = 15)
     @ApiModelProperty(value = "剂型")
-    @TableField(value = "dose_form")
-    private java.lang.String dose_form;
+    @JsonProperty("dose_form")
+    @JSONField(name = "dose_form")
+    private java.lang.String doseForm;
 	/**规格*/
 	@Excel(name = "规格", width = 15)
     @ApiModelProperty(value = "规格")
-    @TableField(value = "medical_specification")
-    private java.lang.String medical_specification;
+    @JsonProperty("medical_specification")
+    @JSONField(name = "medical_specification")
+    private java.lang.String medicalSpecification;
 	/**价格;单价,必须使用数值型,如”12.5”*/
 	@Excel(name = "价格;单价,必须使用数值型,如”12.5”", width = 15)
     @ApiModelProperty(value = "价格;单价,必须使用数值型,如”12.5”")
@@ -191,13 +226,14 @@ public class AfterIncidentDetailLog implements Serializable {
 	/**数量;数量,必须使用数值型,如”10”*/
 	@Excel(name = "数量;数量,必须使用数值型,如”10”", width = 15)
     @ApiModelProperty(value = "数量;数量,必须使用数值型,如”10”")
-    @TableField(value = "medical_number")
+    @TableField("medical_number")
     private java.lang.Integer quantity;
 	/**单位*/
 	@Excel(name = "单位", width = 15)
     @ApiModelProperty(value = "单位")
-    @TableField(value = "dose_unit")
-    private java.lang.String dose_unit;
+    @JsonProperty("dose_unit")
+    @JSONField(name = "dose_unit")
+    private java.lang.String doseUnit;
 	/**金额;金额,必须使用数值型,如”50.5”*/
 	@Excel(name = "金额;金额,必须使用数值型,如”50.5”", width = 15)
     @ApiModelProperty(value = "金额;金额,必须使用数值型,如”50.5”")
@@ -205,35 +241,47 @@ public class AfterIncidentDetailLog implements Serializable {
 	/**用药天数;用药天数(项目为药品时非空),医嘱服用该药品天数,必须使用数值型,如”15”*/
 	@Excel(name = "用药天数;用药天数(项目为药品时非空),医嘱服用该药品天数,必须使用数值型,如”15”", width = 15)
     @ApiModelProperty(value = "用药天数;用药天数(项目为药品时非空),医嘱服用该药品天数,必须使用数值型,如”15”")
-    @TableField(value = "use_day")
-    private java.lang.Integer use_day;
+    @JsonProperty("use_day")
+    @JSONField(name = "use_day")
+    private java.lang.Integer useDay;
 	/**单次用药量;单次用药量(项目为药品时非空),配合下一个字段的单位,如 50 mg,必须使用数值型,如”50”*/
 	@Excel(name = "单次用药量;单次用药量(项目为药品时非空),配合下一个字段的单位,如 50 mg,必须使用数值型,如”50”", width = 15)
     @ApiModelProperty(value = "单次用药量;单次用药量(项目为药品时非空),配合下一个字段的单位,如 50 mg,必须使用数值型,如”50”")
-    @TableField(value = "single_dose_number")
-    private java.lang.Integer single_dose_number;
+    @JsonProperty("single_dose_number")
+    @JSONField(name = "single_dose_number")
+    private java.lang.Integer singleDoseNumber;
 	/**单次用药量剂量单位;单次用药量剂量单位(项目为药品时非空)*/
 	@Excel(name = "单次用药量剂量单位;单次用药量剂量单位(项目为药品时非空)", width = 15)
     @ApiModelProperty(value = "单次用药量剂量单位;单次用药量剂量单位(项目为药品时非空)")
-    @TableField(value = "single_dose_unit")
-    private java.lang.String single_dose_unit;
+    @JsonProperty("single_dose_unit")
+    @JSONField(name = "single_dose_unit")
+    private java.lang.String singleDoseUnit;
 	/**药量天数;药量天数(项目为药品时非空),依据医嘱服药要求,所配药品患者可以服用的天数,必须使用数值型,如”5”*/
 	@Excel(name = "药量天数;药量天数(项目为药品时非空),依据医嘱服药要求,所配药品患者可以服用的天数,必须使用数值型,如”5”", width = 15)
     @ApiModelProperty(value = "药量天数;药量天数(项目为药品时非空),依据医嘱服药要求,所配药品患者可以服用的天数,必须使用数值型,如”5”")
-    @TableField(value = "dose_day")
-    private java.lang.Integer dose_day;
+    @JsonProperty("dose_day")
+    @JSONField(name = "dose_day")
+    private java.lang.Integer doseDay;
+    @Excel(name = "项目使用时间", width = 15)
+    @ApiModelProperty(value = "项目使用时间")
+    @JsonProperty("project_use_time")
+    @JSONField(name = "project_use_time")
+    private Date projectUseTime;
 	/**服用频次*/
 	@Excel(name = "服用频次", width = 15)
     @ApiModelProperty(value = "服用频次")
-    @TableField(value = "take_frequence")
-    private java.lang.String take_frequence;
+    @JsonProperty("take_frequence")
+    @JSONField(name = "take_frequence")
+    private java.lang.String takeFrequence;
 	/**医保标志*/
 	@Excel(name = "医保标志", width = 15)
     @ApiModelProperty(value = "医保标志")
-    @TableField(value = "medical_insurance_mark")
-    private java.lang.String medical_insurance_mark;
-    @TableField(value = "total_amount")
-    private java.lang.Double total_amount;
+    @JsonProperty("medical_insurance_mark")
+    @JSONField(name = "medical_insurance_mark")
+    private java.lang.String medicalInsuranceMark;
+    @JsonProperty("total_amount")
+    @JSONField(name = "total_amount")
+    private java.lang.Double totalAmount;
 	/**检查部位*/
 	@Excel(name = "检查部位", width = 15)
     @ApiModelProperty(value = "检查部位")
@@ -249,23 +297,31 @@ public class AfterIncidentDetailLog implements Serializable {
 	/**医院诊断编码;*/
 	@Excel(name = "医院诊断编码;", width = 15)
     @ApiModelProperty(value = "医院诊断编码;")
-    @TableField(value = "diagnose_code")
-    private java.lang.String diagnose_code_str;
+    @TableField("diagnose_code")
+    @JsonProperty("diagnose_code")
+    @JSONField(name = "diagnose_code")
+    private java.lang.String diagnoseCodeStr;
 	/**医院诊断描述;*/
 	@Excel(name = "医院诊断描述;", width = 15)
     @ApiModelProperty(value = "医院诊断描述;")
-    @TableField(value = "diagnose_desc")
-    private java.lang.String diagnose_name_str;
+    @TableField("diagnose_desc")
+    @JsonProperty("diagnose_desc")
+    @JSONField(name = "diagnose_desc")
+    private java.lang.String diagnoseNameStr;
 	/**医保诊断编码;*/
 	@Excel(name = "医保诊断编码;", width = 15)
     @ApiModelProperty(value = "医保诊断编码;")
-    @TableField(value = "medical_diagnose_code")
-    private java.lang.String medical_diagnose_code_str;
+    @TableField("medical_diagnose_code")
+    @JsonProperty("medical_diagnose_code")
+    @JSONField(name = "medical_diagnose_code")
+    private java.lang.String medicalDiagnoseCodeStr;
 	/**医保诊断描述;*/
 	@Excel(name = "医保诊断描述;", width = 15)
     @ApiModelProperty(value = "医保诊断描述;")
-    @TableField(value = "medical_diagnose_desc")
-    private java.lang.String medical_diagnose_name_str;
+    @TableField("medical_diagnose_desc")
+    @JsonProperty("medical_diagnose_desc")
+    @JSONField(name = "medical_diagnose_desc")
+    private java.lang.String medicalDiagnoseNameStr;
 	/**状态;WAITING,DEALING,SUCCESS,FAIL*/
 	@Excel(name = "状态;WAITING,DEALING,SUCCESS,FAIL", width = 15)
     @ApiModelProperty(value = "状态;WAITING,DEALING,SUCCESS,FAIL")
@@ -292,4 +348,5 @@ public class AfterIncidentDetailLog implements Serializable {
 
     @TableField(exist = false)
     private List<String> medical_diagnose_name;
+
 }

+ 5 - 0
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/entity/AfterIncidentLog.java

@@ -101,6 +101,11 @@ public class AfterIncidentLog implements Serializable {
 	@Excel(name = "状态;WAITING,DEALING,SUCCESS,FAIL", width = 15)
     @ApiModelProperty(value = "状态;WAITING,DEALING,SUCCESS,FAIL")
     private java.lang.String state;
+
+    /**
+     * 处理失败原因
+     */
+    private String description;
 	/**修改时间*/
 	@Excel(name = "修改时间", width = 15, format =  "yyyy-MM-dd HH:mm:ss")
 	@JsonFormat(timezone = "GMT+8",pattern =  "yyyy-MM-dd HH:mm:ss")

+ 1 - 1
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/entity/AfterwardsAuditDetail.java

@@ -76,7 +76,7 @@ public class AfterwardsAuditDetail implements Serializable {
     private java.lang.Integer violationLevel;
 	/**提醒类别;事前提醒,事中预警,事后监管*/
 	@Excel(name = "提醒类别;事前提醒,事中预警,事后监管", width = 15)
-    @ApiModelProperty(value = "提醒类别;事前提醒,事中预警,事后监管")
+    @ApiModelProperty(value = "提醒类别;before,middle,after")
     private java.lang.String noticeType;
 	/**科室编码*/
 	@Excel(name = "科室编码", width = 15)

+ 28 - 12
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/job/AfterWaringJob.java

@@ -1,7 +1,9 @@
 package org.jeecg.modules.medical.job;
 
+import cn.hutool.core.collection.CollectionUtil;
 import com.alibaba.fastjson.JSON;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import lombok.extern.slf4j.Slf4j;
 import org.jeecg.modules.medical.Constant;
 import org.jeecg.modules.medical.entity.AfterIncidentDetailLog;
 import org.jeecg.modules.medical.entity.AfterIncidentLog;
@@ -9,20 +11,23 @@ import org.jeecg.modules.medical.entity.AfterwardsAudit;
 import org.jeecg.modules.medical.ruleengine.RuleEngine;
 import org.jeecg.modules.medical.service.IAfterIncidentDetailLogService;
 import org.jeecg.modules.medical.service.IAfterIncidentLogService;
-import org.quartz.Job;
 import org.quartz.JobExecutionContext;
 import org.quartz.JobExecutionException;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.scheduling.annotation.Async;
+import org.springframework.stereotype.Component;
 
 import java.util.ArrayList;
+import java.util.Date;
 import java.util.List;
 import java.util.Map;
 
 /**
  * 事后触发监管
  */
-public class AfterWaringJob implements Job {
+@Component
+@Slf4j
+public class AfterWaringJob {
     @Autowired
     IAfterIncidentLogService afterIncidentLogService;
     @Autowired
@@ -30,19 +35,24 @@ public class AfterWaringJob implements Job {
     @Autowired
     RuleEngine ruleEngine;
 
-    @Override
+    //    @Override
     public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
-        QueryWrapper queryWrapper = new QueryWrapper(AfterIncidentLog.class);
+        QueryWrapper<AfterIncidentLog> queryWrapper = new QueryWrapper();
         queryWrapper.eq("state", Constant.WATING);
-        long count = afterIncidentLogService.count(queryWrapper);
-        if (count > 0) {
-            queryWrapper.last(" limit 1000");
-            List<AfterIncidentLog> afterIncidentLogList = afterIncidentLogService.list(queryWrapper);
+//        long count = afterIncidentLogService.count(queryWrapper);
+//        if (count > 0) {
+        queryWrapper.last(" limit 1000");
+        List<AfterIncidentLog> afterIncidentLogList = afterIncidentLogService.list(queryWrapper);
+        if (CollectionUtil.isNotEmpty(afterIncidentLogList)) {
             for (AfterIncidentLog afterIncidentLog : afterIncidentLogList) {
+                log.info("开始处理 afterIncidentLog:{} 记录", afterIncidentLog);
                 dealAftertask(afterIncidentLog);
             }
-
+        } else {
+            log.error("没有待处理的事后工单记录");
         }
+
+//        }
     }
 
 
@@ -51,13 +61,19 @@ public class AfterWaringJob implements Job {
         AfterwardsAudit afterwardsAudit = ruleEngine.insertAfterWarning(afterIncidentLog);
         afterIncidentLogService.lambdaUpdate().set(AfterIncidentLog::getState, Constant.DEALING).eq(AfterIncidentLog::getId, afterIncidentLog.getId()).update();
         List<AfterIncidentDetailLog> afterIncidentDetailLogList = afterIncidentDetailLogService.lambdaQuery().eq(AfterIncidentDetailLog::getAfterIncidentLogId, afterIncidentLog.getId()).list();
+        if(CollectionUtil.isEmpty(afterIncidentDetailLogList)){
+            String desc = "住院结算主单 未查询到对应的住院明细记录";
+            log.error("住院结算主单 afterIncidentLog.id :{} 未查询到对应的住院明细记录", afterIncidentLog.getId());
+            afterIncidentLogService.lambdaUpdate().set(AfterIncidentLog::getState, Constant.FAIL).set(AfterIncidentLog::getDescription, desc)
+                    .set(AfterIncidentLog::getStateTime, new Date()).eq(AfterIncidentLog::getId, afterIncidentLog.getId()).update();
+            return;
+        }
         String jsonStr = JSON.toJSONString(afterIncidentDetailLogList);
         List<Map> itemList = JSON.parseArray(jsonStr, Map.class);
-        List<Map<String,Object>> realItemList = new ArrayList<>();
-        for(Map itemMap : itemList){
+        List<Map<String, Object>> realItemList = new ArrayList<>();
+        for (Map itemMap : itemList) {
             realItemList.add(itemMap);
         }
-//        realItemList.addAll((Collection<? extends Map<String, Object>>) itemList);
         for (AfterIncidentDetailLog afterIncidentDetailLog : afterIncidentDetailLogList) {
             ruleEngine.dealAfterInterfaceEngin(afterwardsAudit, afterIncidentDetailLog, realItemList);
         }

+ 36 - 32
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/job/AfterWaringLogJob.java

@@ -75,56 +75,60 @@ public class AfterWaringLogJob implements Job {
             afterIncidentDetailLog = new AfterIncidentDetailLog();
 
             afterIncidentDetailLog.setAfterIncidentLogId(afterIncidentLog.getId());
-            afterIncidentDetailLog.setMedical_diagnose_name_str(masterAdmissionBill.getYbAdmissionDiseaseName());
-            afterIncidentDetailLog.setMedical_diagnose_code_str(masterAdmissionBill.getYbAdmissionDiseaseId());
+            afterIncidentDetailLog.setMedicalDiagnoseNameStr(masterAdmissionBill.getYbAdmissionDiseaseName());
+            afterIncidentDetailLog.setMedicalDiagnoseCodeStr(masterAdmissionBill.getYbAdmissionDiseaseId());
             afterIncidentDetailLog.setAmount(hospitalizatioSettleDetail.getCost());
 
             if (StringUtils.isNotBlank(hospitalizatioSettleDetail.getItemId())) {
-                afterIncidentDetailLog.setMedical_project_code(hospitalizatioSettleDetail.getItemId());
-                afterIncidentDetailLog.setMedical_project_name(hospitalizatioSettleDetail.getItemName());
+                afterIncidentDetailLog.setMedicalProjectCode(hospitalizatioSettleDetail.getItemId());
+                afterIncidentDetailLog.setMedicalProjectName(hospitalizatioSettleDetail.getItemName());
             } else {
                 String[] itemIdNameArr = CommonUtil.getMedicalCodeAndName(hospitalizatioSettleDetail.getItemId());
                 if (null != itemIdNameArr) {
-                    afterIncidentDetailLog.setMedical_project_code(itemIdNameArr[0]);
-                    afterIncidentDetailLog.setMedical_project_name(itemIdNameArr[1]);
+                    afterIncidentDetailLog.setMedicalProjectCode(itemIdNameArr[0]);
+                    afterIncidentDetailLog.setMedicalProjectName(itemIdNameArr[1]);
                 }
             }
-            afterIncidentDetailLog.setProject_name(hospitalizatioSettleDetail.getItemNameHosp());
-            afterIncidentDetailLog.setProject_code(hospitalizatioSettleDetail.getItemIdHosp());
+            afterIncidentDetailLog.setProjectName(hospitalizatioSettleDetail.getItemNameHosp());
+            afterIncidentDetailLog.setProjectCode(hospitalizatioSettleDetail.getItemIdHosp());
             afterIncidentDetailLog.setCreateTime(afterIncidentLog.getCreateTime());
-            afterIncidentDetailLog.setDoctor_code(afterIncidentLog.getDoctorId());
-            afterIncidentDetailLog.setDoctor_name(afterIncidentLog.getDoctorName());
+            afterIncidentDetailLog.setDoctorCode(afterIncidentLog.getDoctorId());
+            afterIncidentDetailLog.setDoctorName(afterIncidentLog.getDoctorName());
 
-            afterIncidentDetailLog.setDoctor_level(doctorLevel);
-            afterIncidentDetailLog.setUse_day(hospitalizatioSettleDetail.getUseDay());
-            afterIncidentDetailLog.setDose_form(hospitalizatioSettleDetail.getDosageForm());
-            afterIncidentDetailLog.setDose_unit(hospitalizatioSettleDetail.getPackageUnit());
+            afterIncidentDetailLog.setDoctorLevel(doctorLevel);
+            afterIncidentDetailLog.setUseDay(hospitalizatioSettleDetail.getUseDay());
+//            afterIncidentDetailLog.setDose_day();
+            afterIncidentDetailLog.setDoseForm(hospitalizatioSettleDetail.getDosageForm());
+            afterIncidentDetailLog.setDoseUnit(hospitalizatioSettleDetail.getPackageUnit());
             afterIncidentDetailLog.setPrice(hospitalizatioSettleDetail.getUnitPrice());
-            afterIncidentDetailLog.setDscg_bed(masterAdmissionBill.getAdmBed());
-            afterIncidentDetailLog.setExpense_category(hospitalizatioSettleDetail.getPCategory());
+            afterIncidentDetailLog.setDscgBed(masterAdmissionBill.getAdmBed());
+            afterIncidentDetailLog.setExpenseCategory(hospitalizatioSettleDetail.getPCategory());
+            afterIncidentDetailLog.setProjectUseTime(hospitalizatioSettleDetail.getUsageDate());
+            afterIncidentDetailLog.setChangeClass(hospitalizatioSettleDetail.getPType());
 //            afterIncidentDetailLog.setInspectionSite();
             afterIncidentDetailLog.setOutHospDate(masterAdmissionBill.getDischargeDate());
-            afterIncidentDetailLog.setDiagnose_code_str(masterAdmissionBill.getDischargeDiseaseIdMain());
-            afterIncidentDetailLog.setDiagnose_name_str(masterAdmissionBill.getDischargeDiseaseNameMain());
-            afterIncidentDetailLog.setMedical_insurance_mark(masterAdmissionBill.getPayMethod());
-            afterIncidentDetailLog.setMedical_specification(hospitalizatioSettleDetail.getDrugSpec());
-            afterIncidentDetailLog.setTotal_amount(masterAdmissionBill.getMedfeeSumamt());
-            afterIncidentDetailLog.setMedical_dept_code(masterAdmissionBill.getAdmissionDeptId());
-            afterIncidentDetailLog.setMedical_dept_name(masterAdmissionBill.getAdmissionDeptName());
-            afterIncidentDetailLog.setPatient_id(masterAdmissionBill.getPatientId());
-            afterIncidentDetailLog.setPatient_name(masterAdmissionBill.getPatientName());
-            afterIncidentDetailLog.setPatient_age(masterAdmissionBill.getPatientAge());
-            afterIncidentDetailLog.setDischarge_status(masterAdmissionBill.getDischargeStatus());
+            afterIncidentDetailLog.setDiagnoseCodeStr(masterAdmissionBill.getDischargeDiseaseIdMain());
+            afterIncidentDetailLog.setDiagnoseNameStr(masterAdmissionBill.getDischargeDiseaseNameMain());
+            afterIncidentDetailLog.setMedicalInsuranceMark(masterAdmissionBill.getPayMethod());
+            afterIncidentDetailLog.setMedicalSpecification(hospitalizatioSettleDetail.getDrugSpec());
+            afterIncidentDetailLog.setTotalAmount(masterAdmissionBill.getMedfeeSumamt());
+            afterIncidentDetailLog.setMedicalDeptCode(masterAdmissionBill.getAdmissionDeptId());
+            afterIncidentDetailLog.setMedicalDeptName(masterAdmissionBill.getAdmissionDeptName());
+            afterIncidentDetailLog.setPatientId(masterAdmissionBill.getPatientId());
+            afterIncidentDetailLog.setPatientName(masterAdmissionBill.getPatientName());
+            afterIncidentDetailLog.setPatientAge(masterAdmissionBill.getPatientAge());
+            afterIncidentDetailLog.setDischargeStatus(masterAdmissionBill.getDischargeStatus());
 //            afterIncidentDetailLog.setSingle_dose_number();
 //            afterIncidentDetailLog.setSingle_dose_unit();
-            afterIncidentDetailLog.setVisit_no(masterAdmissionBill.getZyh());
-            afterIncidentDetailLog.setRecipe_no(masterAdmissionBill.getRecipeNo());
+            afterIncidentDetailLog.setVisitNo(masterAdmissionBill.getZyh());
+            afterIncidentDetailLog.setRecipeNo(masterAdmissionBill.getRecipeNo());
             afterIncidentDetailLog.setVisit_type(Constant.TREAMENT_TYPE_HOSP);
             afterIncidentDetailLog.setState(Constant.WATING);
-            String projectType = CommonUtil.getProjectType(afterIncidentDetailLog.getMedical_project_code());
-            afterIncidentDetailLog.setProject_type(projectType);
+            String projectType = CommonUtil.getProjectType(afterIncidentDetailLog.getMedicalProjectCode());
+            afterIncidentDetailLog.setProjectType(projectType);
             afterIncidentDetailLog.setQuantity(hospitalizatioSettleDetail.getNum());
-            afterIncidentDetailLog.setPatient_gender(masterAdmissionBill.getPatientGender());
+            afterIncidentDetailLog.setPatientGender(masterAdmissionBill.getPatientGender());
+            afterIncidentDetailLog.setInHospDate(masterAdmissionBill.getAdmissionDate());
 //            afterIncidentDetailLog.setInvoice_project()
 //            afterIncidentDetailLog.setOrderType();
 //            afterIncidentDetailLog.setOrderCatalog();

+ 36 - 32
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/job/AfterWaringLogTestJob.java

@@ -88,56 +88,60 @@ public class AfterWaringLogTestJob{
             afterIncidentDetailLog = new AfterIncidentDetailLog();
 
             afterIncidentDetailLog.setAfterIncidentLogId(afterIncidentLog.getId());
-            afterIncidentDetailLog.setMedical_diagnose_name_str(masterAdmissionBill.getYbAdmissionDiseaseName());
-            afterIncidentDetailLog.setMedical_diagnose_code_str(masterAdmissionBill.getYbAdmissionDiseaseId());
+            afterIncidentDetailLog.setMedicalDiagnoseNameStr(masterAdmissionBill.getYbAdmissionDiseaseName());
+            afterIncidentDetailLog.setMedicalDiagnoseCodeStr(masterAdmissionBill.getYbAdmissionDiseaseId());
             afterIncidentDetailLog.setAmount(hospitalizatioSettleDetail.getCost());
 
             if (StringUtils.isNotBlank(hospitalizatioSettleDetail.getItemId())) {
-                afterIncidentDetailLog.setMedical_project_code(hospitalizatioSettleDetail.getItemId());
-                afterIncidentDetailLog.setMedical_project_name(hospitalizatioSettleDetail.getItemName());
+                afterIncidentDetailLog.setMedicalProjectCode(hospitalizatioSettleDetail.getItemId());
+                afterIncidentDetailLog.setMedicalProjectName(hospitalizatioSettleDetail.getItemName());
             } else {
                 String[] itemIdNameArr = CommonUtil.getMedicalCodeAndName(hospitalizatioSettleDetail.getItemId());
                 if (null != itemIdNameArr) {
-                    afterIncidentDetailLog.setMedical_project_code(itemIdNameArr[0]);
-                    afterIncidentDetailLog.setMedical_project_name(itemIdNameArr[1]);
+                    afterIncidentDetailLog.setMedicalProjectCode(itemIdNameArr[0]);
+                    afterIncidentDetailLog.setMedicalProjectName(itemIdNameArr[1]);
                 }
             }
-            afterIncidentDetailLog.setProject_name(hospitalizatioSettleDetail.getItemNameHosp());
-            afterIncidentDetailLog.setProject_code(hospitalizatioSettleDetail.getItemIdHosp());
+            afterIncidentDetailLog.setProjectName(hospitalizatioSettleDetail.getItemNameHosp());
+            afterIncidentDetailLog.setProjectCode(hospitalizatioSettleDetail.getItemIdHosp());
             afterIncidentDetailLog.setCreateTime(afterIncidentLog.getCreateTime());
-            afterIncidentDetailLog.setDoctor_code(afterIncidentLog.getDoctorId());
-            afterIncidentDetailLog.setDoctor_name(afterIncidentLog.getDoctorName());
+            afterIncidentDetailLog.setDoctorCode(afterIncidentLog.getDoctorId());
+            afterIncidentDetailLog.setDoctorName(afterIncidentLog.getDoctorName());
 
-            afterIncidentDetailLog.setDoctor_level(doctorLevel);
-            afterIncidentDetailLog.setUse_day(hospitalizatioSettleDetail.getUseDay());
-            afterIncidentDetailLog.setDose_form(hospitalizatioSettleDetail.getDosageForm());
-            afterIncidentDetailLog.setDose_unit(hospitalizatioSettleDetail.getPackageUnit());
+            afterIncidentDetailLog.setDoctorLevel(doctorLevel);
+            afterIncidentDetailLog.setUseDay(hospitalizatioSettleDetail.getUseDay());
+//            afterIncidentDetailLog.setDose_day();
+            afterIncidentDetailLog.setDoseForm(hospitalizatioSettleDetail.getDosageForm());
+            afterIncidentDetailLog.setDoseUnit(hospitalizatioSettleDetail.getPackageUnit());
             afterIncidentDetailLog.setPrice(hospitalizatioSettleDetail.getUnitPrice());
-            afterIncidentDetailLog.setDscg_bed(masterAdmissionBill.getAdmBed());
-            afterIncidentDetailLog.setExpense_category(hospitalizatioSettleDetail.getPCategory());
+            afterIncidentDetailLog.setDscgBed(masterAdmissionBill.getAdmBed());
+            afterIncidentDetailLog.setExpenseCategory(hospitalizatioSettleDetail.getPCategory());
+            afterIncidentDetailLog.setProjectUseTime(hospitalizatioSettleDetail.getUsageDate());
+            afterIncidentDetailLog.setChangeClass(hospitalizatioSettleDetail.getPType());
 //            afterIncidentDetailLog.setInspectionSite();
             afterIncidentDetailLog.setOutHospDate(masterAdmissionBill.getDischargeDate());
-            afterIncidentDetailLog.setDiagnose_code_str(masterAdmissionBill.getDischargeDiseaseIdMain());
-            afterIncidentDetailLog.setDiagnose_name_str(masterAdmissionBill.getDischargeDiseaseNameMain());
-            afterIncidentDetailLog.setMedical_insurance_mark(masterAdmissionBill.getPayMethod());
-            afterIncidentDetailLog.setMedical_specification(hospitalizatioSettleDetail.getDrugSpec());
-            afterIncidentDetailLog.setTotal_amount(masterAdmissionBill.getMedfeeSumamt());
-            afterIncidentDetailLog.setMedical_dept_code(masterAdmissionBill.getAdmissionDeptId());
-            afterIncidentDetailLog.setMedical_dept_name(masterAdmissionBill.getAdmissionDeptName());
-            afterIncidentDetailLog.setPatient_id(masterAdmissionBill.getPatientId());
-            afterIncidentDetailLog.setPatient_name(masterAdmissionBill.getPatientName());
-            afterIncidentDetailLog.setPatient_age(masterAdmissionBill.getPatientAge());
-            afterIncidentDetailLog.setDischarge_status(masterAdmissionBill.getDischargeStatus());
+            afterIncidentDetailLog.setDiagnoseCodeStr(masterAdmissionBill.getDischargeDiseaseIdMain());
+            afterIncidentDetailLog.setDiagnoseNameStr(masterAdmissionBill.getDischargeDiseaseNameMain());
+            afterIncidentDetailLog.setMedicalInsuranceMark(masterAdmissionBill.getPayMethod());
+            afterIncidentDetailLog.setMedicalSpecification(hospitalizatioSettleDetail.getDrugSpec());
+            afterIncidentDetailLog.setTotalAmount(masterAdmissionBill.getMedfeeSumamt());
+            afterIncidentDetailLog.setMedicalDeptCode(masterAdmissionBill.getAdmissionDeptId());
+            afterIncidentDetailLog.setMedicalDeptName(masterAdmissionBill.getAdmissionDeptName());
+            afterIncidentDetailLog.setPatientId(masterAdmissionBill.getPatientId());
+            afterIncidentDetailLog.setPatientName(masterAdmissionBill.getPatientName());
+            afterIncidentDetailLog.setPatientAge(masterAdmissionBill.getPatientAge());
+            afterIncidentDetailLog.setDischargeStatus(masterAdmissionBill.getDischargeStatus());
 //            afterIncidentDetailLog.setSingle_dose_number();
 //            afterIncidentDetailLog.setSingle_dose_unit();
-            afterIncidentDetailLog.setVisit_no(masterAdmissionBill.getZyh());
-            afterIncidentDetailLog.setRecipe_no(masterAdmissionBill.getRecipeNo());
+            afterIncidentDetailLog.setVisitNo(masterAdmissionBill.getZyh());
+            afterIncidentDetailLog.setRecipeNo(masterAdmissionBill.getRecipeNo());
             afterIncidentDetailLog.setVisit_type(Constant.TREAMENT_TYPE_HOSP);
             afterIncidentDetailLog.setState(Constant.WATING);
-            String projectType = CommonUtil.getProjectType(afterIncidentDetailLog.getMedical_project_code());
-            afterIncidentDetailLog.setProject_type(projectType);
+            String projectType = CommonUtil.getProjectType(afterIncidentDetailLog.getMedicalProjectCode());
+            afterIncidentDetailLog.setProjectType(projectType);
             afterIncidentDetailLog.setQuantity(hospitalizatioSettleDetail.getNum());
-            afterIncidentDetailLog.setPatient_gender(masterAdmissionBill.getPatientGender());
+            afterIncidentDetailLog.setPatientGender(masterAdmissionBill.getPatientGender());
+            afterIncidentDetailLog.setInHospDate(masterAdmissionBill.getAdmissionDate());
 //            afterIncidentDetailLog.setInvoice_project()
 //            afterIncidentDetailLog.setOrderType();
 //            afterIncidentDetailLog.setOrderCatalog();

+ 6 - 1
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/job/XCFYDataV_STAFF_INFOJob.java

@@ -25,7 +25,12 @@ public class XCFYDataV_STAFF_INFOJob implements Job {
     @Autowired
     JdbcTemplate jdbcTemplate;
 
-    String insertSql = "INSERT INTO staff_info (DEPT_CODE, DEPT_NAME,DOCTOR_ID, DOCTOR_NAME, SEX, BIRTH_DATE, DUTY_NAME, DOCTOR_LEVEL) VALUES (DEPT_CODE,:DEPT_NAME,:DOCTOR_ID,:DOCTOR_NAME,:SEX,:BIRTH_DATE,:DUTY_NAME,:DOCTOR_LEVEL)";
+    String insertSql = "INSERT INTO staff_info (DEPT_CODE, DEPT_NAME,DOCTOR_ID, DOCTOR_NAME, SEX, BIRTH_DATE, " +
+            "DUTY_NAME, DOCTOR_LEVEL) VALUES (:DEPT_CODE,:DEPT_NAME,:DOCTOR_ID,:DOCTOR_NAME,:SEX,:BIRTH_DATE," +
+            ":DUTY_NAME,:DOCTOR_LEVEL) on duplicate key update " +
+            "DEPT_CODE = :DEPT_CODE," +
+            "DEPT_NAME = :DEPT_NAME," +
+            "DOCTOR_NAME = :DOCTOR_NAME";
 
     @Override
     public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {

+ 19 - 0
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/job/XCFYDatav_hospitalizatio_settle_detailJob.java

@@ -3,11 +3,14 @@ package org.jeecg.modules.medical.job;
 import cn.hutool.core.collection.CollectionUtil;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang.StringUtils;
+import org.jeecg.common.system.vo.DictModel;
+import org.jeecg.modules.medical.Constant;
 import org.jeecg.modules.medical.afterwaring.XCFYDataTransferService;
 import org.jeecg.modules.medical.common.CommonUtil;
 import org.jeecg.modules.medical.entity.HospitalizatioSettleDetail;
 import org.jeecg.modules.medical.ruleengine.TransferDataCallFunction;
 import org.jeecg.modules.medical.service.IHospitalizatioSettleDetailService;
+import org.jeecg.modules.system.service.ISysDictService;
 import org.quartz.Job;
 import org.quartz.JobExecutionContext;
 import org.quartz.JobExecutionException;
@@ -29,6 +32,8 @@ public class XCFYDatav_hospitalizatio_settle_detailJob implements Job {
     XCFYDataTransferService xcfyDataTransferService;
     @Autowired
     IHospitalizatioSettleDetailService hospitalizatioSettleDetailService;
+    @Autowired
+    ISysDictService sysDictService;
 
     String insertSql = "INSERT INTO hospitalizatio_settle_detail (id, hisid, patient_id, zyh, hospital_id, p_category, " +
             "categories_items, usage_date, discharge_dept_id, discharge_dept_name, item_id, item_name, item_id_hosp, " +
@@ -43,6 +48,11 @@ public class XCFYDatav_hospitalizatio_settle_detailJob implements Job {
     @Override
     public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
         String sql = "select * from v_hospitalizatio_settle_detail where rownum<1000 %s";
+        List<DictModel> cateGoriesList = sysDictService.getDictItems(Constant.DICT_CATEGORIES_ITEMS_KEY);
+        Map<String, String> cateGoriesMap = new HashMap<>();
+        for (DictModel dictModel : cateGoriesList) {
+            cateGoriesMap.put(dictModel.getText(), dictModel.getValue());
+        }
         while (true) {
             log.info("开始同步v_hospitalizatio_settle_detail数据");
             String whereSql = "";
@@ -68,6 +78,15 @@ public class XCFYDatav_hospitalizatio_settle_detailJob implements Job {
                             dataMap.put("ITEM_NAME", itemIdArr[1]);
                         }
                     }
+                    String pCategory = dataMap.getOrDefault("P_CATEGORY", "").toString();
+                    if(StringUtils.isNotBlank(pCategory)){
+                        dataMap.put("P_CATEGORY", cateGoriesMap.getOrDefault(pCategory, pCategory));
+                    }
+
+                    String categoriesItems = dataMap.getOrDefault("CATEGORIES_ITEMS", "").toString();
+                    if(StringUtils.isNotBlank(pCategory)){
+                        dataMap.put("CATEGORIES_ITEMS", cateGoriesMap.getOrDefault(categoriesItems, categoriesItems));
+                    }
                 }
             });
             if (count <= 0) {

+ 7 - 0
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/job/XCFYDatav_master_admission_billJob.java

@@ -3,11 +3,14 @@ package org.jeecg.modules.medical.job;
 import cn.hutool.core.collection.CollectionUtil;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang.StringUtils;
+import org.jeecg.common.system.vo.DictModel;
+import org.jeecg.modules.medical.Constant;
 import org.jeecg.modules.medical.afterwaring.XCFYDataTransferService;
 import org.jeecg.modules.medical.common.CommonUtil;
 import org.jeecg.modules.medical.entity.MasterAdmissionBill;
 import org.jeecg.modules.medical.ruleengine.TransferDataCallFunction;
 import org.jeecg.modules.medical.service.IMasterAdmissionBillService;
+import org.jeecg.modules.system.service.ISysDictService;
 import org.quartz.Job;
 import org.quartz.JobExecutionContext;
 import org.quartz.JobExecutionException;
@@ -29,6 +32,8 @@ public class XCFYDatav_master_admission_billJob implements Job {
     XCFYDataTransferService xcfyDataTransferService;
     @Autowired
     IMasterAdmissionBillService masterAdmissionBillService;
+    @Autowired
+    ISysDictService sysDictService;
 
     String insertSql = "INSERT INTO `master_admission_bill` (`id`, `bridge_id`, `hisid`, `zyh`, `recipe_no`, `pay_method`, `benefit_type`, `hospital_id`, `hospital_name`, `p_level_yy`, `refund_flag`, `p_level`, `bmi_area_id`, `bmi_area_name`, `bill_date`, `refund_date`, `admission_dept_id`, `admission_dept_name`, `adm_bed`, `transfer_dept_id`, `transfer_dept_name`, `discharge_dept_id`, `discharge_dept_name`, `dscg_bed`, `doctor_id`, `doctor_name`, `patient_id`, `patient_name`, `patient_gender`, `patient_birthday`, `patient_age`, `patient_age_days`, `claim_type`, `visit_time`, `if_local_flag`, `admission_date`, `discharge_date`, `zyts`, `discharge_status`, `pre_admission_date`, `days_re_admission_31`, `yb_admission_disease_id`, `yb_admission_disease_name`, `yb_discharge_disease_id_main`, `yb_discharge_disease_name_main`, `admission_disease_id`, `admission_disease_name`, `discharge_disease_id_main`, `discharge_disease_name_main`, `yb_pay_type`, `drgs_code`, `drgs_name`, `medfee_sumamt`, `fulamt_ownpay_amt`, `overlmt_selfpay`, `preselfpay_amt`, `inscp_scp_amt`, `act_pay_dedc`, `hifp_pay`, `pool_prop_selfpay`, `cvlserv_pay`, `hifes_pay`, `hifmi_pay`, `hifob_pay`, `maf_pay`, `oth_pay`, `fund_pay_sumamt`, `state`, `create_time`, `create_by`) " +
             "VALUES (:ID,:BRIDGE_ID,:HISID,:ZYH,:RECIPE_NO,:PAY_METHOD,:BENEFIT_TYPE,:HOSPITAL_ID,:HOSPITAL_NAME,:P_LEVEL_YY,:REFUND_FLAG,:P_LEVEL,:BMI_AREA_ID,:BMI_AREA_NAME,:BILL_DATE,:REFUND_DATE,:ADMISSION_DEPT_ID,:ADMISSION_DEPT_NAME,:ADM_BED,:TRANSFER_DEPT_ID,:TRANSFER_DEPT_NAME,:DISCHARGE_DEPT_ID,:DISCHARGE_DEPT_NAME,:DSCG_BED,:DOCTOR_ID,:DOCTOR_NAME,:PATIENT_ID,:PATIENT_NAME,:PATIENT_GENDER,:PATIENT_BIRTHDAY,:PATIENT_AGE,:PATIENT_AGE_DAYS,:CLAIM_TYPE,:VISIT_TIME,:IF_LOCAL_FLAG,:ADMISSION_DATE,:DISCHARGE_DATE,:ZYTS,:DISCHARGE_STATUS,:PRE_ADMISSION_DATE,:DAYS_RE_ADMISSION_31,:YB_ADMISSION_DISEASE_ID,:YB_ADMISSION_DISEASE_NAME,:YB_DISCHARGE_DISEASE_ID_MAIN,:YB_DISCHARGE_DISEASE_NAME_MAIN,:ADMISSION_DISEASE_ID,:ADMISSION_DISEASE_NAME,:DISCHARGE_DISEASE_ID_MAIN,:DISCHARGE_DISEASE_NAME_MAIN,:YB_PAY_TYPE,:DRGS_CODE,:DRGS_NAME,:MEDFEE_SUMAMT,:FULAMT_OWNPAY_AMT,:OVERLMT_SELFPAY,:PRESELFPAY_AMT,:INSCP_SCP_AMT,:ACT_PAY_DEDC,:HIFP_PAY,:POOL_PROP_SELFPAY,:CVLSERV_PAY,:HIFES_PAY,:HIFMI_PAY,:HIFOB_PAY,:MAF_PAY,:OTH_PAY,:FUND_PAY_SUMAMT,:STATE,:CREATE_TIME,:CREATE_BY)";
@@ -81,6 +86,8 @@ public class XCFYDatav_master_admission_billJob implements Job {
 
     }
 
+
+
     public Long getLastId() {
         List<MasterAdmissionBill> masterAdmissionBillList = masterAdmissionBillService.lambdaQuery().orderByDesc(MasterAdmissionBill::getId).last("limit 1").list();
         if (CollectionUtil.isEmpty(masterAdmissionBillList)) {

+ 1 - 1
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/job/XCFYDatav_medical_insurance_drugsJob.java

@@ -30,7 +30,7 @@ public class XCFYDatav_medical_insurance_drugsJob implements Job {
 
     @Override
     public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
-        String sql = "select * from v_medical_insurance_drugs where rownum<1000 %s";
+        String sql = "select * from V_MEDICAL_INSURANCE_DRUGS where rownum<1000 %s";
         while (true) {
             log.info("开始同步v_medical_insurance_drugs数据");
             String whereSql = "";

+ 60 - 1
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/job/XCFYDatav_outpatient_settle_billJob.java

@@ -2,9 +2,12 @@ package org.jeecg.modules.medical.job;
 
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang.StringUtils;
+import org.jeecg.common.system.vo.DictModel;
+import org.jeecg.modules.medical.Constant;
 import org.jeecg.modules.medical.afterwaring.XCFYDataTransferService;
 import org.jeecg.modules.medical.common.CommonUtil;
 import org.jeecg.modules.medical.ruleengine.TransferDataCallFunction;
+import org.jeecg.modules.system.service.ISysDictService;
 import org.quartz.Job;
 import org.quartz.JobExecutionContext;
 import org.quartz.JobExecutionException;
@@ -13,6 +16,7 @@ import org.springframework.jdbc.core.JdbcTemplate;
 
 import java.util.Date;
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 
 /**
@@ -26,6 +30,8 @@ public class XCFYDatav_outpatient_settle_billJob implements Job {
     XCFYDataTransferService xcfyDataTransferService;
     @Autowired
     JdbcTemplate jdbcTemplate;
+    @Autowired
+    ISysDictService sysDictService;
 
     String insertSql = "INSERT INTO outpatient_settle_bill (id, hisid, visit_no, recipe_no, pay_method, " +
             "bmi_area_id, bmi_area_name, hospital_id, hospital_name, p_level_yy, benefit_type, " +
@@ -44,9 +50,21 @@ public class XCFYDatav_outpatient_settle_billJob implements Job {
             ":INSCP_SCP_AMT,:ACT_PAY_DEDC,:HIFP_PAY,:POOL_PROP_SELFPAY,:CVLSERV_PAY,:HIFES_PAY,:HIFMI_PAY," +
             ":HIFOB_PAY,:MAF_PAY,:OTH_PAY,:FUND_PAY_SUMAMT,:CREATE_TIME,:CREATE_BY)";
 
+
+    String insertDetailSql = "INSERT INTO outpatient_settlement_details (id, hisid, visit_no, patient_id, hospital_id, " +
+            "usage_date, item_id, item_name, item_id_hosp, item_name_hosp, drug_spec, dosage_form, package_unit," +
+            " unit_price, num, cost, use_day, categories_items, bmi_convered_amount, bmi_pay_amount, " +
+            "individual_payment_amount, amount_refusal, amount_reason, expense_category, change_class, " +
+            "refund_falge, refund_date, p_category, create_time, create_by, p_type_pct) " +
+            "VALUES (:ID,:HISID,:VISIT_NO,:PATIENT_ID,:HOSPITAL_ID,:USAGE_DATE,:ITEM_ID," +
+            ":ITEM_NAME,:ITEM_ID_HOSP,:ITEM_NAME_HOSP,:DRUG_SPEC,:DOSAGE_FORM,:PACKAGE_UNIT," +
+            ":UNIT_PRICE,:NUM,:COST,:USE_DAY,:CATEGORIES_ITEMS,:BMI_CONVERED_AMOUNT,:BMI_PAY_AMOUNT," +
+            ":INDIVIDUAL_PAYMENT_AMOUNT,:AMOUNT_REFUSAL,:AMOUNT_REASON,:EXPENSE_CATEGORY,:CHANGE_CLASS," +
+            ":REFUND_FALGE,:REFUND_DATE,:P_CATEGORY,:CREATE_TIME,:CREATE_BY,:P_TYPE_PCT)";
+
     @Override
     public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
-        String sql = "select * from V_OUTPATIENT_SETTLE_BILL where rownum<1000 %s";
+        String sql = "select * from V_OUTPATIENT_SETTLE_BILL where hisid is not null and rownum<1000 %s ";
         while (true) {
             log.info("开始同步v_outpatient_settle_bill数据");
             String whereSql = "";
@@ -71,6 +89,8 @@ public class XCFYDatav_outpatient_settle_billJob implements Job {
                             dataMap.put("YB_ADMISSION_DISEASE_NAME", ybDiagCode[1]);
                         }
                     }
+                    String hisId = dataMap.get("HISID").toString();
+                    getDetailByHisId(hisId);
                 }
             });
             if (count <= 0) {
@@ -79,6 +99,45 @@ public class XCFYDatav_outpatient_settle_billJob implements Job {
             }
         }
 
+    }
+
+    public void getDetailByHisId(String hisId) {
+        String sql = "select * from V_OUTPATIENT_SETTLE_DETAILS where hisid=:HISID";
+        List<DictModel> cateGoriesList = sysDictService.getDictItems(Constant.DICT_CATEGORIES_ITEMS_KEY);
+        Map<String, String> cateGoriesMap = new HashMap<>();
+        for (DictModel dictModel : cateGoriesList) {
+            cateGoriesMap.put(dictModel.getText(), dictModel.getValue());
+        }
+        Map<String, Object> paramMap = new HashMap<>();
+        paramMap.put("HISID", hisId);
+        xcfyDataTransferService.transferDataList(sql, insertDetailSql, paramMap, new TransferDataCallFunction() {
+            @Override
+            public void transferData(Map<String, Object> dataMap) throws Exception {
+                dataMap.put("CREATE_BY", "auto");
+                dataMap.put("CREATE_TIME", new Date());
+                String itemIDHosp = dataMap.getOrDefault("ITEM_ID_HOSP", "").toString();
+                String itemId = dataMap.getOrDefault("ITEM_ID", "").toString();
+                if (StringUtils.isNotBlank(itemIDHosp) && StringUtils.isBlank(itemId)) {
+                    String[] itemIdArr = CommonUtil.getMedicalCodeAndName(itemIDHosp);
+                    if (null != itemIdArr) {
+                        dataMap.put("ITEM_ID", itemIdArr[0]);
+                        dataMap.put("ITEM_NAME", itemIdArr[1]);
+                    }
+                }
+                String pCategory = dataMap.getOrDefault("P_CATEGORY", "").toString();
+                if(StringUtils.isNotBlank(pCategory)){
+                    dataMap.put("P_CATEGORY", cateGoriesMap.getOrDefault(pCategory, pCategory));
+                }
+
+                String categoriesItems = dataMap.getOrDefault("CATEGORIES_ITEMS", "").toString();
+                if(StringUtils.isNotBlank(pCategory)) {
+                    dataMap.put("CATEGORIES_ITEMS", cateGoriesMap.getOrDefault(categoriesItems, categoriesItems));
+                }
+            }
+        });
+
+
+
     }
 
     public Long getLastId() {

+ 22 - 1
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/job/XCFYDatav_outpatient_settle_detailsJob.java

@@ -2,9 +2,12 @@ package org.jeecg.modules.medical.job;
 
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang.StringUtils;
+import org.jeecg.common.system.vo.DictModel;
+import org.jeecg.modules.medical.Constant;
 import org.jeecg.modules.medical.afterwaring.XCFYDataTransferService;
 import org.jeecg.modules.medical.common.CommonUtil;
 import org.jeecg.modules.medical.ruleengine.TransferDataCallFunction;
+import org.jeecg.modules.system.service.ISysDictService;
 import org.quartz.Job;
 import org.quartz.JobExecutionContext;
 import org.quartz.JobExecutionException;
@@ -13,6 +16,7 @@ import org.springframework.jdbc.core.JdbcTemplate;
 
 import java.util.Date;
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 
 /**
@@ -26,6 +30,8 @@ public class XCFYDatav_outpatient_settle_detailsJob implements Job {
     XCFYDataTransferService xcfyDataTransferService;
     @Autowired
     JdbcTemplate jdbcTemplate;
+    @Autowired
+    ISysDictService sysDictService;
 
     String insertSql = "INSERT INTO outpatient_settlement_details (id, hisid, visit_no, patient_id, hospital_id, " +
             "usage_date, item_id, item_name, item_id_hosp, item_name_hosp, drug_spec, dosage_form, package_unit," +
@@ -40,7 +46,13 @@ public class XCFYDatav_outpatient_settle_detailsJob implements Job {
 
     @Override
     public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
-        String sql = "select * from v_outpatient_settle_details where rownum<1000 %s";
+        String sql = "select * from V_OUTPATIENT_SETTLE_DETAILS where rownum<1000 %s";
+//        String sql = "SELECT A.*, ROWNUM RN FROM (SELECT * FROM V_OUTPATIENT_SETTLE_DETAILS) A WHERE ROWNUM < 1000 %s";
+        List<DictModel> cateGoriesList = sysDictService.getDictItems(Constant.DICT_CATEGORIES_ITEMS_KEY);
+        Map<String, String> cateGoriesMap = new HashMap<>();
+        for (DictModel dictModel : cateGoriesList) {
+            cateGoriesMap.put(dictModel.getText(), dictModel.getValue());
+        }
         while (true) {
             log.info("开始同步v_outpatient_settle_details数据");
             String whereSql = "";
@@ -66,6 +78,15 @@ public class XCFYDatav_outpatient_settle_detailsJob implements Job {
                             dataMap.put("ITEM_NAME", itemIdArr[1]);
                         }
                     }
+                    String pCategory = dataMap.getOrDefault("P_CATEGORY", "").toString();
+                    if(StringUtils.isNotBlank(pCategory)){
+                        dataMap.put("P_CATEGORY", cateGoriesMap.getOrDefault(pCategory, pCategory));
+                    }
+
+                    String categoriesItems = dataMap.getOrDefault("CATEGORIES_ITEMS", "").toString();
+                    if(StringUtils.isNotBlank(pCategory)) {
+                        dataMap.put("CATEGORIES_ITEMS", cateGoriesMap.getOrDefault(categoriesItems, categoriesItems));
+                    }
                 }
             });
             if (count <= 0) {

+ 40 - 21
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/ruleengine/FactorEnchangeFactory.java

@@ -34,8 +34,6 @@ import org.jeecg.modules.medical.service.IMidIncidentAuditDetailService;
 import org.jeecg.modules.medical.service.IMidIncidentAuditService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
-import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
-import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
 import org.springframework.data.redis.core.RedisTemplate;
 import org.springframework.stereotype.Component;
 
@@ -88,6 +86,7 @@ public class FactorEnchangeFactory {
 
     public static Map<Integer, List<FactorCondRela>> factorCondRelaMap = new HashMap<>();
 
+    public Map<Integer, List<FactorAttrRela>> factorEnhanceIdAndListMap = new HashMap<>();
 
     public void init() {
         log.info("进入初始化FactorEnchangeFactory");
@@ -95,11 +94,19 @@ public class FactorEnchangeFactory {
         enchanceAttrMap = eventAttrList.stream().collect(Collectors.toMap(EventAttr::getId, v -> v, (v1, v2) -> v1));
         List<FactorCondRela> factorCondRelaList = factorCondRelaService.lambdaQuery().orderByAsc(FactorCondRela::getSeqNum).list();
         factorCondRelaMap = factorCondRelaList.stream().collect(Collectors.groupingBy(FactorCondRela::getFactorEnhanceId));
+        LambdaQueryWrapper<FactorAttrRela> queryWrapper = new LambdaQueryWrapper();
+//        queryWrapper.eq(FactorAttrRela::getFactorEnhanceId, factorEnchanceId);
+        queryWrapper.orderByAsc(FactorAttrRela::getSeqNum);
+        List<FactorAttrRela> factorAttrRelaList = factorAttrRelaService.list(queryWrapper);
+
+        if (CollectionUtil.isNotEmpty(factorAttrRelaList)) {
+            factorEnhanceIdAndListMap = factorAttrRelaList.stream().collect(Collectors.groupingBy(FactorAttrRela::getFactorEnhanceId));
+        }
     }
 
     @PostConstruct
     public void initAuto() {
-        if(cacheAutoInit) {
+        if (cacheAutoInit) {
             init();
         }
     }
@@ -162,14 +169,15 @@ public class FactorEnchangeFactory {
     }
 
     public Map<Integer, List<FactorAttrRela>> getIoMap(Integer factorEnchanceId) {
-        LambdaQueryWrapper<FactorAttrRela> queryWrapper = new LambdaQueryWrapper();
-        queryWrapper.eq(FactorAttrRela::getFactorEnhanceId, factorEnchanceId);
-        queryWrapper.orderByAsc(FactorAttrRela::getSeqNum);
-        List<FactorAttrRela> factorAttrRelaList = factorAttrRelaService.list(queryWrapper);
-        Map<Integer, List<FactorAttrRela>> ioTypeMap = new HashMap<>();
-        if (CollectionUtil.isNotEmpty(factorAttrRelaList)) {
-            ioTypeMap = factorAttrRelaList.stream().collect(Collectors.groupingBy(FactorAttrRela::getIoType));
-        }
+//        LambdaQueryWrapper<FactorAttrRela> queryWrapper = new LambdaQueryWrapper();
+//        queryWrapper.eq(FactorAttrRela::getFactorEnhanceId, factorEnchanceId);
+//        queryWrapper.orderByAsc(FactorAttrRela::getSeqNum);
+        List<FactorAttrRela> factorAttrRelaList = factorEnhanceIdAndListMap.get(factorEnchanceId);
+//        Map<Integer, List<FactorAttrRela>> ioTypeMap = new HashMap<>();
+//        if (CollectionUtil.isNotEmpty(factorAttrRelaList)) {
+        Map<Integer, List<FactorAttrRela>> ioTypeMap = factorAttrRelaList.stream().collect(Collectors.groupingBy(FactorAttrRela::getIoType));
+//        }
+
         return ioTypeMap;
     }
 
@@ -189,7 +197,7 @@ public class FactorEnchangeFactory {
         }
     }
 
-    public void insertAdvanceWaringDetail(Map<String,Object> itemMap, MedicalInsRuleInfo medicalInsRuleInfo, AdvanceWarningAudit advanceWarningAudit){
+    public void insertAdvanceWaringDetail(Map<String, Object> itemMap, MedicalInsRuleInfo medicalInsRuleInfo, AdvanceWarningAudit advanceWarningAudit) {
         AdvanceWarningAuditDetail advanceWarningAuditDetail = new AdvanceWarningAuditDetail();
         advanceWarningAuditDetail.setAdvanceWarningAuditId(advanceWarningAudit.getId());
         advanceWarningAuditDetail.setDoctorId(advanceWarningAudit.getDoctorId());
@@ -199,7 +207,7 @@ public class FactorEnchangeFactory {
         advanceWarningAuditDetail.setMedicalDeptName(advanceWarningAudit.getMedicalDeptName());
         advanceWarningAuditDetail.setPatientId(advanceWarningAudit.getPatientId());
         advanceWarningAuditDetail.setPatientName(advanceWarningAudit.getPatientName());
-        advanceWarningAuditDetail.setNoticeType("事前提醒");
+        advanceWarningAuditDetail.setNoticeType("before");
         advanceWarningAuditDetail.setMedicalInsRuleInfoCode(medicalInsRuleInfo.getRuleCode());
         advanceWarningAuditDetail.setMedicalInsRuleInfoName(medicalInsRuleInfo.getRuleName());
         advanceWarningAuditDetail.setTreatmentType(advanceWarningAudit.getTreatmentType());
@@ -236,7 +244,7 @@ public class FactorEnchangeFactory {
                 afterwardsAuditDetail.setPatientId(afterwardsAudit.getPatientId());
                 afterwardsAuditDetail.setPatientName(afterwardsAudit.getPatientName());
                 afterwardsAuditDetail.setTreatmentType(medicalInsRuleInfo.getTreatmentType());
-                afterwardsAuditDetail.setNoticeType("事后预警");
+                afterwardsAuditDetail.setNoticeType("after");
                 afterwardsAuditDetail.setMedicalInsRuleInfoCode(medicalInsRuleInfo.getRuleCode());
                 afterwardsAuditDetail.setMedicalInsRuleInfoId(medicalInsRuleInfo.getId());
                 afterwardsAuditDetail.setMedicalInsRuleInfoName(medicalInsRuleInfo.getRuleName());
@@ -247,6 +255,13 @@ public class FactorEnchangeFactory {
                 afterwardsAuditDetail.setViolationLevel(medicalInsRuleInfo.getViolationLevel());
                 afterwardsAuditDetail.setTreatmentType(medicalInsRuleInfo.getTreatmentType());
                 afterwardsAuditDetail.setAfterwardsAuditId(afterwardsAudit.getId());
+                Object priceObj = otherMap.get(SystemEventAttrConstant.PRICE);
+                if (priceObj != null) {
+                    afterwardsAuditDetail.setPrice(new BigDecimal(priceObj.toString()));
+                }
+                afterwardsAuditDetail.setCreateBy("auto");
+                afterwardsAuditDetail.setQuantity(otherMap.get(SystemEventAttrConstant.QUANTITY) != null ? Integer.parseInt(otherMap.get(SystemEventAttrConstant.QUANTITY).toString()) : 1);
+                afterwardsAuditDetail.setMedicalInsuranceMark(otherMap.get(Constant.MEDICAL_INSURANCE_MARK_KEY) != null ? otherMap.get(Constant.MEDICAL_INSURANCE_MARK_KEY).toString() : "0");
                 afterwardsAuditDetailList.add(afterwardsAuditDetail);
 
             }
@@ -270,17 +285,21 @@ public class FactorEnchangeFactory {
             afterwardsAuditDetail.setPatientId(afterwardsAudit.getPatientId());
             afterwardsAuditDetail.setPatientName(afterwardsAudit.getPatientName());
             afterwardsAuditDetail.setTreatmentType(medicalInsRuleInfo.getTreatmentType());
-            afterwardsAuditDetail.setNoticeType("事后预警");
+            afterwardsAuditDetail.setNoticeType("after");
             afterwardsAuditDetail.setMedicalInsRuleInfoCode(medicalInsRuleInfo.getRuleCode());
             afterwardsAuditDetail.setMedicalInsRuleInfoId(medicalInsRuleInfo.getId());
             afterwardsAuditDetail.setMedicalInsRuleInfoName(medicalInsRuleInfo.getRuleName());
             afterwardsAuditDetail.setDescription(medicalInsRuleInfo.getViolationDesc());
             afterwardsAuditDetail.setOutpatientNumber(afterwardsAudit.getOutpatientNumber());
             afterwardsAuditDetail.setPrescriptionNumber(afterwardsAudit.getPrescriptionNumber());
-
+//            afterwardsAuditDetail.setReminderLevel();
+            afterwardsAuditDetail.setCreateBy("auto");
+            afterwardsAuditDetail.setQuantity(itemMap.get(SystemEventAttrConstant.QUANTITY) != null ? Integer.parseInt(itemMap.get(SystemEventAttrConstant.QUANTITY).toString()) : 1);
             afterwardsAuditDetail.setViolationLevel(medicalInsRuleInfo.getViolationLevel());
             afterwardsAuditDetail.setTreatmentType(medicalInsRuleInfo.getTreatmentType());
             afterwardsAuditDetail.setAfterwardsAuditId(afterwardsAudit.getId());
+            afterwardsAuditDetail.setMedicalInsuranceMark(itemMap.get(Constant.MEDICAL_INSURANCE_MARK_KEY) != null ? itemMap.get(Constant.MEDICAL_INSURANCE_MARK_KEY).toString() : "0");
+            afterwardsAuditDetail.setPrice(itemMap.get(SystemEventAttrConstant.PRICE) != null ? new BigDecimal(itemMap.get(SystemEventAttrConstant.PRICE).toString()) : null);
 
             afterwardsAuditService.lambdaUpdate().setSql("amount = amount +" + amount.doubleValue()).eq(AfterwardsAudit::getId, afterwardsAudit.getId()).update();
             afterwardsAuditDetailService.save(afterwardsAuditDetail);
@@ -309,19 +328,19 @@ public class FactorEnchangeFactory {
                 midIncidentAuditDetail.setPatientId(midIncidentWarningVO.getPatient_id());
                 midIncidentAuditDetail.setPatientName(midIncidentWarningVO.getPatient_name());
                 midIncidentAuditDetail.setTreatmentType(medicalInsRuleInfo.getTreatmentType());
-                midIncidentAuditDetail.setNoticeType("事中预警");
+                midIncidentAuditDetail.setNoticeType("middle");
                 midIncidentAuditDetail.setMedicalInsRuleInfoCode(medicalInsRuleInfo.getRuleCode());
                 midIncidentAuditDetail.setMedicalInsRuleInfoId(medicalInsRuleInfo.getId());
                 midIncidentAuditDetail.setMedicalInsRuleInfoName(medicalInsRuleInfo.getRuleName());
                 String desc = medicalInsRuleInfo.getViolationDesc();
-                if(otherItemMap.containsKey(Constant.PROJECT_CODE_KEY)){
+                if (otherItemMap.containsKey(Constant.PROJECT_CODE_KEY)) {
                     midIncidentAuditDetail.setProejctCode(otherItemMap.get(Constant.PROJECT_CODE_KEY).toString());
                     midIncidentAuditDetail.setProejctName(otherItemMap.get(Constant.PROJECT_NAME_KEY).toString());
                     midIncidentAuditDetail.setMedicalProjectCode(otherItemMap.get(Constant.MEDICAL_PROJECT_CODE_KEY).toString());
                     midIncidentAuditDetail.setMedicalProjectName(otherItemMap.get(Constant.MEDICAL_PROJECT_NAME_KEY).toString());
                     midIncidentAuditDetail.setProjectType(otherItemMap.getOrDefault(Constant.PROJECT_TYPE_KEY, "default").toString());
-                    Object descObject = redisTemplate.opsForHash().get(Constant.PROJECT_VOLIDATION_DESC_KEY+medicalInsRuleInfo.getId(), otherItemMap.get(Constant.MEDICAL_PROJECT_NAME_KEY).toString());
-                    if(null != descObject){
+                    Object descObject = redisTemplate.opsForHash().get(Constant.PROJECT_VOLIDATION_DESC_KEY + medicalInsRuleInfo.getId(), otherItemMap.get(Constant.MEDICAL_PROJECT_NAME_KEY).toString());
+                    if (null != descObject) {
                         desc = descObject.toString();
                     }
                 }
@@ -363,7 +382,7 @@ public class FactorEnchangeFactory {
             midIncidentAuditDetail.setPatientId(midIncidentWarningVO.getPatient_id());
             midIncidentAuditDetail.setPatientName(midIncidentWarningVO.getPatient_name());
             midIncidentAuditDetail.setTreatmentType(medicalInsRuleInfo.getTreatmentType());
-            midIncidentAuditDetail.setNoticeType("事中预警");
+            midIncidentAuditDetail.setNoticeType("middle");
             midIncidentAuditDetail.setMedicalInsRuleInfoCode(medicalInsRuleInfo.getRuleCode());
             midIncidentAuditDetail.setMedicalInsRuleInfoId(medicalInsRuleInfo.getId());
             midIncidentAuditDetail.setMedicalInsRuleInfoName(medicalInsRuleInfo.getRuleName());

+ 3 - 1
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/ruleengine/RuleEngine.java

@@ -644,6 +644,7 @@ public class RuleEngine {
             Set<Integer> medicalInsRuleInfoIdList = itemCodeAndRuleIdMap.get(itemMap.get(Constant.MEDICAL_PROJECT_CODE_KEY));
             if (CollectionUtil.isEmpty(medicalInsRuleInfoIdList)) {
                 log.error("项目编码未匹配到对应的医保规则:{}", itemMap.get(Constant.MEDICAL_PROJECT_CODE_KEY));
+
                 return;
             }
             Object diagnose = itemMap.get(Constant.MEDICAL_DIAGNOSE_CODE_KEY);
@@ -851,10 +852,11 @@ public class RuleEngine {
         afterwardsAudit.setTreatmentType(afterIncidentLog.getVisitType());
         afterwardsAudit.setPrescriptionNumber(afterIncidentLog.getDoctorAdviceNo());
         afterwardsAudit.setOutpatientNumber(afterIncidentLog.getVisitNo());
-        afterwardsAudit.setNoticeType("事后预警");
+        afterwardsAudit.setNoticeType("after");
         afterwardsAudit.setAmount((double) 0);
         afterwardsAudit.setVisitTime(afterIncidentLog.getInHospDate());
         afterwardsAudit.setMedicalInsurance(afterIncidentLog.getMedicalInsurance());
+//        afterwardsAudit.setBedNumber(afterIncidentLog.);
         afterwardsAuditService.save(afterwardsAudit);
         if (StringUtils.isNotBlank(afterIncidentLog.getDiagnoses())) {
             List<String> diagonseCodeList = Arrays.asList(afterIncidentLog.getDiagnoses().split(","));

+ 29 - 31
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/ruleengine/dict/DictUtil.java

@@ -34,8 +34,6 @@ import java.util.Map;
 @Component
 public class DictUtil {
 
-    @Autowired
-    private IMedicineService medicineService;
     @Autowired
     private RedisTemplate redisTemplate;
     @Autowired
@@ -224,16 +222,16 @@ public class DictUtil {
      * @param afterIncidentDetailLog
      */
     public void transferAfterIncidentWarning(AfterIncidentDetailLog afterIncidentDetailLog) {
-        if (StringUtils.isNotBlank(afterIncidentDetailLog.getDiagnose_code_str())) {
+        if (StringUtils.isNotBlank(afterIncidentDetailLog.getDiagnoseCodeStr())) {
 
-            String[] diagnoseCodeArr = afterIncidentDetailLog.getDiagnose_code_str().split(Constant.SPLIT_STR);
-            String[] diagnoseNameArr = afterIncidentDetailLog.getDiagnose_name_str().split(Constant.SPLIT_STR);
+            String[] diagnoseCodeArr = afterIncidentDetailLog.getDiagnoseCodeStr().split(Constant.SPLIT_STR);
+            String[] diagnoseNameArr = afterIncidentDetailLog.getDiagnoseNameStr().split(Constant.SPLIT_STR);
             StringBuffer medicalDiagnoseNameStr = new StringBuffer();
             StringBuffer medicalDiagnoseCodeStr = new StringBuffer();
             List<String> medicalDiagnoseNameList = new ArrayList<>();
             List<String> medicalDiagnoseCodeList = new ArrayList<>();
             int index = 0;
-            if (StringUtils.isEmpty(afterIncidentDetailLog.getMedical_diagnose_code_str())) {
+            if (StringUtils.isEmpty(afterIncidentDetailLog.getMedicalDiagnoseCodeStr())) {
                 for (String diagnose_code : diagnoseCodeArr) {
                     Object value = redisTemplate.opsForHash().get(Constant.HIS_MEDICAL_DICT_KEY, diagnose_code);
                     if (value == null) {
@@ -255,11 +253,11 @@ public class DictUtil {
                     }
                     index++;
                 }
-                afterIncidentDetailLog.setMedical_diagnose_code_str(medicalDiagnoseCodeStr.toString());
-                afterIncidentDetailLog.setMedical_diagnose_name_str(medicalDiagnoseNameStr.toString());
+                afterIncidentDetailLog.setMedicalDiagnoseCodeStr(medicalDiagnoseCodeStr.toString());
+                afterIncidentDetailLog.setMedicalDiagnoseNameStr(medicalDiagnoseNameStr.toString());
             } else {
-                String[] medicalDiagnoseCodeArr = afterIncidentDetailLog.getMedical_diagnose_code_str().split(Constant.SPLIT_STR);
-                String[] medicalDiagnoseNameArr = afterIncidentDetailLog.getMedical_diagnose_name_str().split(Constant.SPLIT_STR);
+                String[] medicalDiagnoseCodeArr = afterIncidentDetailLog.getMedicalDiagnoseCodeStr().split(Constant.SPLIT_STR);
+                String[] medicalDiagnoseNameArr = afterIncidentDetailLog.getMedicalDiagnoseNameStr().split(Constant.SPLIT_STR);
                 medicalDiagnoseCodeList = Arrays.asList(medicalDiagnoseCodeArr);
                 medicalDiagnoseNameList = Arrays.asList(medicalDiagnoseNameArr);
             }
@@ -268,22 +266,22 @@ public class DictUtil {
 
         }
 
-        if (StringUtils.isEmpty(afterIncidentDetailLog.getMedical_project_code())) {
+        if (StringUtils.isEmpty(afterIncidentDetailLog.getMedicalProjectCode())) {
             Object value = null;
-            if (StringUtils.isNotBlank(afterIncidentDetailLog.getProject_code())) {
-                value = redisTemplate.opsForHash().get(Constant.HIS_MEDICAL_DICT_KEY, afterIncidentDetailLog.getProject_code());
+            if (StringUtils.isNotBlank(afterIncidentDetailLog.getProjectCode())) {
+                value = redisTemplate.opsForHash().get(Constant.HIS_MEDICAL_DICT_KEY, afterIncidentDetailLog.getProjectCode());
             }
             if (value == null) {
                 log.error("字段未配置该项目编码映射的医保记录,项目:{}", afterIncidentDetailLog);
                 genHisProjectAndNotice(afterIncidentDetailLog);
-                value = afterIncidentDetailLog.getProject_code();
-                afterIncidentDetailLog.setMedical_project_code(value.toString());
-                afterIncidentDetailLog.setMedical_project_name(afterIncidentDetailLog.getProject_name());
+                value = afterIncidentDetailLog.getProjectCode();
+                afterIncidentDetailLog.setMedicalProjectCode(value.toString());
+                afterIncidentDetailLog.setMedicalProjectName(afterIncidentDetailLog.getProjectName());
             } else {
-                afterIncidentDetailLog.setMedical_project_code(value.toString());
+                afterIncidentDetailLog.setMedicalProjectCode(value.toString());
                 Object name = redisTemplate.opsForHash().get(Constant.MEDICAL_CODE_NAME_KEY, value.toString());
                 if (null != name) {
-                    afterIncidentDetailLog.setMedical_project_name(name.toString());
+                    afterIncidentDetailLog.setMedicalProjectName(name.toString());
                 }
             }
         }
@@ -298,27 +296,27 @@ public class DictUtil {
 //            Map<String, String> exCateGoryAndProjectTypeMap = dictModelList.stream().collect(Collectors.toMap(DictModel::getValue, DictModel::getText));
 //            projectType = exCateGoryAndProjectTypeMap.getOrDefault(exCategory, Constant.PROJECT_TYPE_DIAGNOSIS_TREATMENT);
 //        }else{
-        String projectType = CommonUtil.getProjectType(afterIncidentDetailLog.getMedical_project_code());
+        String projectType = CommonUtil.getProjectType(afterIncidentDetailLog.getMedicalProjectCode());
 //        }
 
         AdviceDetailsVO adviceDetailsVO = new AdviceDetailsVO();
-        adviceDetailsVO.setProject_code(afterIncidentDetailLog.getProject_code());
-        adviceDetailsVO.setProject_name(afterIncidentDetailLog.getProject_name());
-        adviceDetailsVO.setMedical_project_name(afterIncidentDetailLog.getMedical_project_name());
-        adviceDetailsVO.setMedical_project_code(afterIncidentDetailLog.getMedical_project_code());
+        adviceDetailsVO.setProject_code(afterIncidentDetailLog.getProjectCode());
+        adviceDetailsVO.setProject_name(afterIncidentDetailLog.getProjectName());
+        adviceDetailsVO.setMedical_project_name(afterIncidentDetailLog.getMedicalProjectName());
+        adviceDetailsVO.setMedical_project_code(afterIncidentDetailLog.getMedicalProjectCode());
         adviceDetailsVO.setProject_type(projectType);
         if (null != afterIncidentDetailLog.getPrice()) {
             adviceDetailsVO.setPrice(afterIncidentDetailLog.getPrice().doubleValue());
         }
-        adviceDetailsVO.setExpense_category(afterIncidentDetailLog.getExpense_category());
-        adviceDetailsVO.setDose_day(afterIncidentDetailLog.getDose_day());
-        adviceDetailsVO.setDose_form(afterIncidentDetailLog.getDose_form());
+        adviceDetailsVO.setExpense_category(afterIncidentDetailLog.getExpenseCategory());
+        adviceDetailsVO.setDose_day(afterIncidentDetailLog.getDoseDay());
+        adviceDetailsVO.setDose_form(afterIncidentDetailLog.getDoseForm());
 
-        adviceDetailsVO.setSingle_dose_number(afterIncidentDetailLog.getSingle_dose_number());
-        adviceDetailsVO.setSingle_dose_unit(afterIncidentDetailLog.getSingle_dose_unit());
-        adviceDetailsVO.setTake_frequence(afterIncidentDetailLog.getTake_frequence());
-        adviceDetailsVO.setUse_day(afterIncidentDetailLog.getUse_day());
-        adviceDetailsVO.setRecipe_no(afterIncidentDetailLog.getRecipe_no());
+        adviceDetailsVO.setSingle_dose_number(afterIncidentDetailLog.getSingleDoseNumber());
+        adviceDetailsVO.setSingle_dose_unit(afterIncidentDetailLog.getSingleDoseUnit());
+        adviceDetailsVO.setTake_frequence(afterIncidentDetailLog.getTakeFrequence());
+        adviceDetailsVO.setUse_day(afterIncidentDetailLog.getUseDay());
+        adviceDetailsVO.setRecipe_no(afterIncidentDetailLog.getRecipeNo());
 
         genHospItemsAndSendNotice(adviceDetailsVO, null);
     }

+ 5 - 0
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/service/impl/AfterIncidentLogServiceImpl.java

@@ -35,6 +35,11 @@ public class AfterIncidentLogServiceImpl extends ServiceImpl<AfterIncidentLogMap
         afterIncidentLog.setDoctorAdviceNo(masterAdmissionBill.getRecipeNo());
         afterIncidentLog.setVisitType(Constant.TREAMENT_TYPE_HOSP);
         afterIncidentLog.setInHospDate(masterAdmissionBill.getAdmissionDate());
+        afterIncidentLog.setOutHospDate(masterAdmissionBill.getDischargeDate());
+        afterIncidentLog.setZyts(masterAdmissionBill.getZyts());
+        afterIncidentLog.setDiagnoses(masterAdmissionBill.getDischargeDiseaseIdMain());
+//TODO        afterIncidentLog.setPatientAgeDays();
+
         afterIncidentLog.setState(Constant.WATING);
         Integer medicalINsurance = 0;
         if(!"0".equals(masterAdmissionBill.getPayMethod())){

+ 2 - 1
jeecg-module-system/jeecg-system-start/src/main/resources/application-dev.yml

@@ -153,6 +153,7 @@ mybatis-plus:
   global-config:
     # 关闭MP3.0自带的banner
     banner: false
+#    map-underscore-to-camel-case: false
     db-config:
       #主键类型  0:"数据库ID自增",1:"该类型为未设置主键类型", 2:"用户输入ID",3:"全局唯一ID (数字类型唯一ID)", 4:"全局唯一ID UUID",5:"字符串全局唯一ID (idWorker 的字符串表示)";
       id-type: AUTO
@@ -160,7 +161,7 @@ mybatis-plus:
       table-underline: true
   configuration:
     # 这个配置会将执行的sql打印出来,在开发或测试的时候可以用
-#    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
+    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
     # 返回类型为Map,显示null对应的字段
     call-setters-on-nulls: true
 #jeecg专用配置

+ 35 - 0
jeecg-module-system/jeecg-system-start/src/test/java/org/jeecg/AfterwardsAuditDataTest.java

@@ -4,17 +4,21 @@ import cn.hutool.core.collection.CollectionUtil;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang.StringUtils;
+import org.jeecg.common.system.vo.DictModel;
 import org.jeecg.modules.medical.Constant;
+import org.jeecg.modules.medical.entity.AfterIncidentDetailLog;
 import org.jeecg.modules.medical.entity.AfterwardsAudit;
 import org.jeecg.modules.medical.entity.AfterwardsAuditDetail;
 import org.jeecg.modules.medical.entity.MedicalInsRuleInfo;
 import org.jeecg.modules.medical.entity.SttlMasterBill;
 import org.jeecg.modules.medical.entity.SttlMasterDetailBill;
+import org.jeecg.modules.medical.job.AfterWaringJob;
 import org.jeecg.modules.medical.job.AfterWaringLogTestJob;
 import org.jeecg.modules.medical.job.XCFYDatav_check_listJob;
 import org.jeecg.modules.medical.job.XCFYDatav_diagnose_itemsJob;
 import org.jeecg.modules.medical.ruleengine.RuleEngine;
 import org.jeecg.modules.medical.ruleengine.SPELUtil;
+import org.jeecg.modules.medical.service.IAfterIncidentDetailLogService;
 import org.jeecg.modules.medical.service.IAfterwardsAuditDetailService;
 import org.jeecg.modules.medical.service.IAfterwardsAuditService;
 import org.jeecg.modules.medical.service.IAfterwardsIncidentAuditDiagnoseService;
@@ -24,6 +28,7 @@ import org.jeecg.modules.medical.service.IMedicalInsRuleProjectService;
 import org.jeecg.modules.medical.service.ISttlMasterBillService;
 import org.jeecg.modules.medical.service.ISttlMasterDetailBillService;
 import org.jeecg.modules.system.service.ISysDepartService;
+import org.jeecg.modules.system.service.ISysDictService;
 import org.jeecg.modules.system.service.ISysUserService;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -106,6 +111,36 @@ public class AfterwardsAuditDataTest {
     IMedicalInsRuleInfoService medicalInsRuleInfoService;
     @Autowired
     RedisTemplate redisTemplate;
+    @Autowired
+    AfterWaringJob afterWaringJob;
+    @Autowired
+    IAfterIncidentDetailLogService afterIncidentDetailLogService;
+    @Autowired
+    ISysDictService sysDictService;
+    @Test
+    public void testDD(){
+        List<DictModel> cateGoriesList = sysDictService.getDictItems(Constant.DICT_CATEGORIES_ITEMS_KEY);
+        Map<String, String> cateGoriesMap = new HashMap<>();
+        for (DictModel dictModel : cateGoriesList) {
+            cateGoriesMap.put(dictModel.getText(), dictModel.getValue());
+        }
+        System.out.println(cateGoriesMap);
+    }
+
+    @Test
+    public void testXX(){
+        List<AfterIncidentDetailLog> afterIncidentDetailLogList = afterIncidentDetailLogService.lambdaQuery().eq(AfterIncidentDetailLog::getAfterIncidentLogId, 217).list();
+        System.out.println(afterIncidentDetailLogList);
+    }
+
+    @Test
+    public void testAfterWaringJob(){
+        try {
+            afterWaringJob.execute(null);
+        } catch (JobExecutionException e) {
+            e.printStackTrace();
+        }
+    }
 //    @Autowired
 //    org.jeecg.modules.medical.job.XCFYDatav_check_listJob XCFYDatav_check_listJob;
 //    @Autowired

+ 21 - 15
jeecg-module-system/jeecg-system-start/src/test/java/org/jeecg/TestMain.java

@@ -1,7 +1,9 @@
 package org.jeecg;
 
 import com.alibaba.fastjson.JSONObject;
+import com.fasterxml.jackson.annotation.JsonFormat;
 import org.jeecg.common.util.RestUtil;
+import org.jeecg.modules.medical.entity.AfterIncidentDetailLog;
 import org.springframework.http.HttpHeaders;
 import org.springframework.http.HttpMethod;
 import org.springframework.http.MediaType;
@@ -14,23 +16,27 @@ import org.springframework.http.ResponseEntity;
  */
 public class TestMain {
     public static void main(String[] args) {
-        // 请求地址
-        String url = "https://api.boot.jeecg.com/sys/user/list";
-        // 请求 Header (用于传递Token)
-        HttpHeaders headers = getHeaders();
-        // 请求方式是 GET 代表获取数据
-        HttpMethod method = HttpMethod.GET;
+//        // 请求地址
+//        String url = "https://api.boot.jeecg.com/sys/user/list";
+//        // 请求 Header (用于传递Token)
+//        HttpHeaders headers = getHeaders();
+//        // 请求方式是 GET 代表获取数据
+//        HttpMethod method = HttpMethod.GET;
+//
+//        System.out.println("请求地址:" + url);
+//        System.out.println("请求方式:" + method);
+//
+//        // 利用 RestUtil 请求该url
+//        ResponseEntity<JSONObject> result = RestUtil.request(url, method, headers, null, null, JSONObject.class);
+//        if (result != null && result.getBody() != null) {
+//            System.out.println("返回结果:" + result.getBody().toJSONString());
+//        } else {
+//            System.out.println("查询失败");
+//        }
 
-        System.out.println("请求地址:" + url);
-        System.out.println("请求方式:" + method);
+        AfterIncidentDetailLog incidentDetailLog = new AfterIncidentDetailLog();
+        System.out.println(JSONObject.toJSONString(incidentDetailLog));
 
-        // 利用 RestUtil 请求该url
-        ResponseEntity<JSONObject> result = RestUtil.request(url, method, headers, null, null, JSONObject.class);
-        if (result != null && result.getBody() != null) {
-            System.out.println("返回结果:" + result.getBody().toJSONString());
-        } else {
-            System.out.println("查询失败");
-        }
     }
     private static HttpHeaders getHeaders() {
         String token = "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.50h-g6INOZRVnznExiawFb1U6PPjcVVA4POeYRA5a5Q";