zjh
2024-05-31 a3f44ad3f0b9728a6f9ff4b515a187502bbb39b3
zjh 2024/05/31-1
2个文件已修改
2个文件已添加
820 ■■■■■ 已修改文件
ltkj-admin/src/main/java/com/ltkj/web/controller/his/HisApiMethod.java 63 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ltkj-admin/src/main/java/com/ltkj/web/controller/his/HisApiMethodService.java 673 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ltkj-admin/src/main/java/com/ltkj/web/controller/service/TjSysAsyncServiceImpl.java 78 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjSurveyTemplateController.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ltkj-admin/src/main/java/com/ltkj/web/controller/his/HisApiMethod.java
New file
@@ -0,0 +1,63 @@
package com.ltkj.web.controller.his;
import cn.hutool.core.date.DateUtil;
import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil;
import com.ltkj.common.core.domain.AjaxResult;
import com.ltkj.hosp.domain.TjCustomer;
import com.ltkj.hosp.service.ITjCustomerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/* @Authot:zjh
 * @Date:  2024-05-30
 * */
@Component
public class HisApiMethod {
    @Autowired
    private HisApiMethodService controller;
    @Autowired
    private ITjCustomerService customerService;
    //将方法返回值解析成json格式
    public JSONObject getJSONObject (String builder) {
        return JSONUtil.parseObj (builder);
    }
    //获取方法返回值信息
    public String getAjaxResult (AjaxResult result) {
        return result.get ("data").toString ();
    }
    //对接his总接口
    public AjaxResult HisApiMethods (TjCustomer customer) {
//        Date date = new Date ();
        AjaxResult result = controller.Outpincreateapply (customer);
        String result1 = getAjaxResult (result);
        JSONObject object = getJSONObject (result1);
        String code = object.getStr ("ResultCode");
        if (code.equals ("0")) {
            Map<String, Object> resultData = (Map<String, Object>) object.get ("ResultData");
            if (null != resultData && resultData.size () > 0) {
                String cardId = resultData.get ("pationid").toString ();
                if(null !=cardId){
                    customer.setCardId (cardId);
                    customerService.updateById (customer);
                }
            }
        }
        return AjaxResult.success ();
    }
}
ltkj-admin/src/main/java/com/ltkj/web/controller/his/HisApiMethodService.java
New file
@@ -0,0 +1,673 @@
package com.ltkj.web.controller.his;
import com.ltkj.common.core.domain.AjaxResult;
import com.ltkj.hosp.domain.TjCustomer;
import com.ltkj.hosp.hisDto.*;
import com.ltkj.hosp.service.ITjCustomerService;
import com.ltkj.web.wxUtils.HttpClientUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
/* @Authot:zjh
 * @Date:  2024-05-28
 * */
@Component
public class HisApiMethodService {
    @Autowired
    private ITjCustomerService tjCustomerService;
    private static final String HIS_URL = "https://mock.mengxuegu.com/mock/664d3dbce45d2156fa209c80/example/api/His/HisRequest";
    //    @ApiOperation(value = "新增/修改门诊注册信息")
    public AjaxResult Outpincreateapply (TjCustomer customer) {
        Map<String, Object> map = new HashMap<> ();
        if (null != customer.getCusId ()) {
            map.put ("pationid", customer.getCusId ());
        } else {
            map.put ("pationid", null);
        }
        map.put ("brxm", customer.getCusName ());
        map.put ("brxb", customer.getCusSex ());
        map.put ("csrq", customer.getCusBrithday ());
        map.put ("brnl", customer.getAge ());
        map.put ("brnldw", customer.getAgeUnit ());
        map.put ("addr", customer.getAddr ());
        map.put ("gzdw", null);
        map.put ("dwdz", null);
        map.put ("lxr", customer.getCusName ());
        map.put ("lxrdh", customer.getCusPhone ());
        map.put ("lxrgx", "本人");
        map.put ("sfzh", customer.getCusIdcard ());
        map.put ("jhrxm", null);
        map.put ("jhrsfzh", null);
        map.put ("mz", customer.getCusNational ());
        map.put ("zy", customer.getCareer ());
        map.put ("fbbm", null);
        map.put ("czy", customer.getCreateBy ());
        map.put ("jkkkh", customer.getIndexCard ());
        map.put ("mindex_id", customer.getIndexCard ());
        String post = HttpClientUtils.sendPost (HIS_URL, map);
        return AjaxResult.success ().put ("data", post);
    }
    //    @ApiOperation(value = "门诊医生接诊")
// jzh = "就诊号"
//jzrq = "接诊日期"
//jzysbm = "接诊医师"
    public AjaxResult Outpinconapply (String jzh,
                                      Date jzrq,
                                      String jzysbm) {
        Map<String, Object> map = new HashMap<> ();
        map.put ("jzh", jzh);
        map.put ("jzrq", jzrq);
        map.put ("jzysbm", jzysbm);
        String post = HttpClientUtils.sendPost (HIS_URL, map);
        return AjaxResult.success ().put ("data", post);
    }
    //    @ApiOperation(value = "门诊医生取消接诊")
    public AjaxResult Outpinunconapply (String jzh,
                                        Date jzrq,
                                        String jzysbm) {
        Map<String, Object> map = new HashMap<> ();
        map.put ("jzh", jzh);
        map.put ("jzrq", jzrq);
        map.put ("jzysbm", jzysbm);
        String post = HttpClientUtils.sendPost (HIS_URL, map);
        return AjaxResult.success ().put ("data", post);
    }
    //    @ApiOperation(value = "新增/修改门诊诊断")
    public AjaxResult Outpinimpapply (OutpinimpapplyDto dto) {
        Map<String, Object> map = new HashMap<> ();
        map.put ("his_registration_id", dto.getHisRegistrationId ());
        map.put ("mzzdid", dto.getMzzdid ());
        map.put ("sqysbm", dto.getSqysbm ());
        map.put ("mzksbm", dto.getMzksbm ());
        map.put ("fbrq", dto.getFbrq ());
        map.put ("zdrq", dto.getZdrq ());
        map.put ("czybm", dto.getCzybm ());
        map.put ("czyksbm", dto.getCzyksbm ());
        map.put ("zs", dto.getZs ());
        map.put ("bs", dto.getBs ());
        map.put ("clyz", dto.getClyz ());
        map.put ("jws", dto.getJws ());
        map.put ("tgjc", dto.getTgjc ());
        map.put ("gms", dto.getGms ());
        map.put ("jbbm", dto.getJbbm ());
        map.put ("jbbm1", dto.getJbbm1 ());
        map.put ("jbbm2", dto.getJbbm2 ());
        map.put ("tw", dto.getTw ());
        map.put ("mb", dto.getMb ());
        map.put ("hx", dto.getHx ());
        map.put ("bp", dto.getBp ());
        map.put ("fzbz", dto.getFzbz ());
        map.put ("hzqx", dto.getHzqx ());
        map.put ("sfqc", dto.getSfqc ());
        map.put ("qchs", dto.getQchs ());
        map.put ("sfqj", dto.getSfqj ());
        map.put ("ckrq", dto.getCkrq ());
        String post = HttpClientUtils.sendPost (HIS_URL, map);
        return AjaxResult.success ().put ("data", post);
    }
    //    @ApiOperation(value = "门诊预交收费")
    public AjaxResult Outpinmesapply (String pationid,
                                      String czybm,
                                      String zflxbm,
                                      int yjje) {
        Map<String, Object> map = new HashMap<> ();
        map.put ("pationid", pationid);
        map.put ("czybm", czybm);
        map.put ("zflxbm", zflxbm);
        map.put ("yjje", yjje);
        String post = HttpClientUtils.sendPost (HIS_URL, map);
        return AjaxResult.success ().put ("data", post);
    }
    //    @ApiOperation(value = "新增/修改门诊挂号申请")
    public AjaxResult Outpinregapply (OutpinregapplyDto dao) {
        Map<String, Object> map = new HashMap<> ();
        map.put ("pationid", dao.getPationid ());
        map.put ("his_registration_id", dao.getHisRegistrationId ());
        map.put ("sqysbm", dao.getSqysbm ());
        map.put ("mzksbm", dao.getMzksbm ());
        map.put ("czybm", dao.getCzybm ());
        map.put ("sfjz", dao.getSfjz ());
        map.put ("ghzlbm", dao.getGhzlbm ());
        map.put ("ywckbm", dao.getYwckbm ());
        map.put ("sflstd", dao.getSflstd ());
        map.put ("ghrq", dao.getGhrq ());
        String post = HttpClientUtils.sendPost (HIS_URL, map);
        return AjaxResult.success ().put ("data", post);
    }
    //    @ApiOperation(value = "门诊检验申请")
    public AjaxResult Outpintestapply (OutpintestapplyDto dao) {
        Map<String, Object> map = new HashMap<> ();
        map.put ("his_registration_id", dao.getHisRegistrationId ());
        map.put ("sfzh", dao.getHisRegistrationId ());
        map.put ("sqysbm", dao.getSqysbm ());
        map.put ("mzksbm", dao.getMzksbm ());
        map.put ("sjrq", dao.getSjrq ());
        map.put ("czybm", dao.getCzybm ());
        map.put ("czyksbm", dao.getCzyksbm ());
        map.put ("sfjz", dao.getSfjz ());
        map.put ("details", dao.getDetails ());
        String post = HttpClientUtils.sendPost (HIS_URL, map);
        return AjaxResult.success ().put ("data", post);
    }
    //    @ApiOperation(value = "作废门诊检验申请")
    public AjaxResult Outpindeltestapply (String hisRegistrationId,
                                          String czybm,
                                          String sqdh) {
        Map<String, Object> map = new HashMap<> ();
        map.put ("his_registration_id", hisRegistrationId);
        map.put ("czybm", czybm);
        map.put ("zflxbm", sqdh);
        String post = HttpClientUtils.sendPost (HIS_URL, map);
        return AjaxResult.success ().put ("data", post);
    }
    //    @ApiOperation(value = "门诊检查申请")
    public AjaxResult Outpinexamapply (OutpinexamapplyDto dao) {
        Map<String, Object> map = new HashMap<> ();
        map.put ("his_registration_id", dao.getHisRegistrationId ());
        map.put ("sfzh", dao.getHisRegistrationId ());
        map.put ("sqysbm", dao.getSqysbm ());
        map.put ("mzksbm", dao.getMzksbm ());
        map.put ("sjrq", dao.getSjrq ());
        map.put ("czybm", dao.getCzybm ());
        map.put ("czyksbm", dao.getCzyksbm ());
        map.put ("lczz", dao.getLczz ());
        map.put ("lczd", dao.getLczd ());
        map.put ("jcms", dao.getJcms ());
        map.put ("jcbw", dao.getJcbw ());
        map.put ("sfjz", dao.getSfjz ());
        map.put ("details", dao.getDetails ());
        String post = HttpClientUtils.sendPost (HIS_URL, map);
        return AjaxResult.success ().put ("data", post);
    }
    //    @ApiOperation(value = "作废门诊检查申请")
    public AjaxResult Outpindelexamapply (String hisRegistrationId,
                                          String czybm,
                                          String sqdh) {
        Map<String, Object> map = new HashMap<> ();
        map.put ("his_registration_id", hisRegistrationId);
        map.put ("czybm", czybm);
        map.put ("zflxbm", sqdh);
        String post = HttpClientUtils.sendPost (HIS_URL, map);
        return AjaxResult.success ().put ("data", post);
    }
    //    @ApiOperation(value = "门诊医疗医嘱申请")
    public AjaxResult Outpinmedapply (OutpinmedapplyDto dao) {
        Map<String, Object> map = new HashMap<> ();
        map.put ("his_registration_id", dao.getHisRegistrationId ());
        map.put ("sfzh", dao.getHisRegistrationId ());
        map.put ("sqysbm", dao.getSqysbm ());
        map.put ("mzksbm", dao.getMzksbm ());
        map.put ("sjrq", dao.getSjrq ());
        map.put ("czybm", dao.getCzybm ());
        map.put ("czyksbm", dao.getCzyksbm ());
        map.put ("bqsm", dao.getBqsm ());
        map.put ("sfjz", dao.getSfjz ());
        map.put ("details", dao.getDetails ());
        String post = HttpClientUtils.sendPost (HIS_URL, map);
        return AjaxResult.success ().put ("data", post);
    }
    //    @ApiOperation(value = "作废门诊医疗医嘱申请")
    public AjaxResult Outpindelmedapply (String hisRegistrationId,
                                         String czybm,
                                         String sqdh) {
        Map<String, Object> map = new HashMap<> ();
        map.put ("his_registration_id", hisRegistrationId);
        map.put ("czybm", czybm);
        map.put ("zflxbm", sqdh);
        String post = HttpClientUtils.sendPost (HIS_URL, map);
        return AjaxResult.success ().put ("data", post);
    }
    //    @ApiOperation(value = "门诊治疗处置申请")
    public AjaxResult Outpintreatapply (OutpintreatapplyDto dao) {
        Map<String, Object> map = new HashMap<> ();
        map.put ("his_registration_id", dao.getHisRegistrationId ());
        map.put ("sfzh", dao.getHisRegistrationId ());
        map.put ("sqysbm", dao.getSqysbm ());
        map.put ("mzksbm", dao.getMzksbm ());
        map.put ("sjrq", dao.getSjrq ());
        map.put ("czybm", dao.getCzybm ());
        map.put ("czyksbm", dao.getCzyksbm ());
        map.put ("bqsm", dao.getBqsm ());
        map.put ("sfjz", dao.getSfjz ());
        map.put ("zlbz", dao.getZlbz ());
        map.put ("details", dao.getDetails ());
        String post = HttpClientUtils.sendPost (HIS_URL, map);
        return AjaxResult.success ().put ("data", post);
    }
    //    @ApiOperation(value = "作废门诊治疗处置申请")
    public AjaxResult Outpintdelreatapply (String hisRegistrationId,
                                           String czybm,
                                           String sqdh) {
        Map<String, Object> map = new HashMap<> ();
        map.put ("his_registration_id", hisRegistrationId);
        map.put ("czybm", czybm);
        map.put ("zflxbm", sqdh);
        String post = HttpClientUtils.sendPost (HIS_URL, map);
        return AjaxResult.success ().put ("data", post);
    }
    //    @ApiOperation(value = "门诊药品申请")
    public AjaxResult Outpinmedicapply (OutpinmedicapplyDto dao) {
        Map<String, Object> map = new HashMap<> ();
        map.put ("his_registration_id", dao.getHisRegistrationId ());
        map.put ("sfzh", dao.getHisRegistrationId ());
        map.put ("sqysbm", dao.getSqysbm ());
        map.put ("mzksbm", dao.getMzksbm ());
        map.put ("sjrq", dao.getSjrq ());
        map.put ("czybm", dao.getCzybm ());
        map.put ("czyksbm", dao.getCzyksbm ());
        map.put ("cflxbm", dao.getCflxbm ());
        map.put ("yfbm", dao.getYfbm ());
        map.put ("fyts", dao.getFyts ());
        map.put ("mzzd", dao.getMzzd ());
        map.put ("details", dao.getDetails ());
        String post = HttpClientUtils.sendPost (HIS_URL, map);
        return AjaxResult.success ().put ("data", post);
    }
    //    @ApiOperation(value = "作废门诊药品申请")
    public AjaxResult Outpindelmedicapply (String hisRegistrationId,
                                           String czybm,
                                           String sqdh) {
        Map<String, Object> map = new HashMap<> ();
        map.put ("his_registration_id", hisRegistrationId);
        map.put ("czybm", czybm);
        map.put ("zflxbm", sqdh);
        String post = HttpClientUtils.sendPost (HIS_URL, map);
        return AjaxResult.success ().put ("data", post);
    }
    //    @ApiOperation(value = "获取检查申请信息")
    public AjaxResult Getexamapplyinfo (String hisRegistrationId,
                                        String ksbm,
                                        Date jsrq,
                                        Date ksrq) {
        Map<String, Object> map = new HashMap<> ();
        map.put ("his_registration_id", hisRegistrationId);
        map.put ("ksbm", ksbm);
        map.put ("jsrq", jsrq);
        map.put ("ksrq", ksrq);
        String post = HttpClientUtils.sendPost (HIS_URL, map);
        return AjaxResult.success ().put ("data", post);
    }
    //    @ApiOperation(value = "获取检查报告信息")
    public AjaxResult Getexamreportinfo (String hisRegistrationId,
                                         String ksmc,
                                         String pationid,
                                         Date jsrq,
                                         Date ksrq,
                                         Integer pagecount,
                                         Integer page,
                                         String status,
                                         String cardtype) {
        Map<String, Object> map = new HashMap<> ();
        map.put ("his_registration_id", hisRegistrationId);
        map.put ("ksmc", ksmc);
        map.put ("jsrq", jsrq);
        map.put ("ksrq", ksrq);
        map.put ("pationid", pationid);
        map.put ("pagecount", pagecount);
        map.put ("page", page);
        map.put ("status", status);
        map.put ("cardtype", cardtype);
        String post = HttpClientUtils.sendPost (HIS_URL, map);
        return AjaxResult.success ().put ("data", post);
    }
    //    @ApiOperation(value = "新增/修改检查报告记录")
    public AjaxResult Examreportrecordinfo (ExamreportrecordinfoDto dto) {
        Map<String, Object> map = new HashMap<> ();
        map.put ("his_registration_id", dto.getHisRegistrationId ());
        map.put ("jcbgid", dto.getJcbgid ());
        map.put ("sfjz", dto.getSfjz ());
        map.put ("pationid", dto.getPationid ());
        map.put ("mzzybz", dto.getMzzybz ());
        map.put ("brxm", dto.getBrxm ());
        map.put ("brxb", dto.getBrxb ());
        map.put ("brnl", dto.getBrnl ());
        map.put ("brnldw", dto.getBrnldw ());
        map.put ("lxrdh", dto.getLxrdh ());
        map.put ("hzksbm", dto.getHzksbm ());
        map.put ("sqdh", dto.getSqdh ());
        map.put ("sqjgdm", dto.getSqjgdm ());
        map.put ("sqsj", dto.getSqsj ());
        map.put ("sqrbm", dto.getSqrbm ());
        map.put ("sqrxm", dto.getSqrxm ());
        map.put ("hzzs", dto.getHzzs ());
        map.put ("hzbs", dto.getHzbs ());
        map.put ("xyzdbm", dto.getXyzdbm ());
        map.put ("xyzdmc", dto.getXyzdmc ());
        map.put ("zdrq", dto.getZdrq ());
        map.put ("fbrq", dto.getFbrq ());
        map.put ("tsjcbz", dto.getTsjcbz ());
        map.put ("jcxmdm", dto.getJcxmdm ());
        map.put ("jcxmmc", dto.getJcxmmc ());
        map.put ("jcjgdm", dto.getJcjgdm ());
        map.put ("jcjsbh", dto.getJcjsbh ());
        map.put ("jcjsxm", dto.getJcjsxm ());
        map.put ("jcrq", dto.getJcrq ());
        map.put ("jcbgdbh", dto.getJcbgdbh ());
        map.put ("jcff", dto.getJcff ());
        map.put ("jcksbh", dto.getJcksbh ());
        map.put ("jcksmc", dto.getJcksmc ());
        map.put ("yqbm", dto.getYqbm ());
        map.put ("jcbgbz", dto.getJcbgbz ());
        map.put ("jcbwdm", dto.getJcbwdm ());
        map.put ("bgksbh", dto.getBgksbh ());
        map.put ("bgksmc", dto.getBgksmc ());
        map.put ("bgrq", dto.getBgrq ());
        map.put ("bgysbh", dto.getBgysbh ());
        map.put ("bgysxm", dto.getBgysxm ());
        map.put ("shysbh", dto.getShysbh ());
        map.put ("shysxm", dto.getShysxm ());
        map.put ("jch", dto.getJch ());
        map.put ("yxh", dto.getYxh ());
        map.put ("kdsj", dto.getKdsj ());
        map.put ("jclx", dto.getJclx ());
        map.put ("yyh", dto.getYyh ());
        map.put ("yxbx", dto.getYxbx ());
        map.put ("yxzd", dto.getYxzd ());
        map.put ("sfyyx", dto.getSfyyx ());
        map.put ("yxzl", dto.getYxzl ());
        map.put ("yxs", dto.getYxs ());
        map.put ("jlysbh", dto.getJlysbh ());
        map.put ("jlrq", dto.getJlrq ());
        map.put ("bgzt", dto.getBgzt ());
        map.put ("lczdfh", dto.getLczdfh ());
        map.put ("wjz", dto.getWjz ());
        map.put ("wjzzdmc", dto.getWjzzdmc ());
        map.put ("wjzjcysyj", dto.getWjzjcysyj ());
        map.put ("wjzjcysbh", dto.getWjzjcysbh ());
        map.put ("wjzjcysxyj", dto.getWjzjcysyj ());
        map.put ("wjzqrrq", dto.getWjzqrrq ());
        map.put ("wjzjsrbh", dto.getWjzjsrbh ());
        map.put ("wjzjsrxm", dto.getWjzjsrxm ());
        map.put ("wjzjsrq", dto.getWjzjsrq ());
        map.put ("wjzclysbh", dto.getWjzclysbh ());
        map.put ("wjzclysxm", dto.getWjzclysxm ());
        map.put ("wjzclyj", dto.getWjzclyj ());
        map.put ("wjzclrq", dto.getWjzclrq ());
        map.put ("sfkf", dto.getSfkf ());
        map.put ("yzid", dto.getYzid ());
        String post = HttpClientUtils.sendPost (HIS_URL, map);
        return AjaxResult.success ().put ("data", post);
    }
    //    @ApiOperation(value = "获取检查危急值信息")
    public AjaxResult Getexamurgentinfo (String hisRegistrationId,
                                         Date jsrq,
                                         Date ksrq,
                                         Integer pagecount,
                                         Integer page) {
        Map<String, Object> map = new HashMap<> ();
        map.put ("his_registration_id", hisRegistrationId);
        map.put ("jsrq", jsrq);
        map.put ("ksrq", ksrq);
        map.put ("pagecount", pagecount);
        map.put ("page", page);
        String post = HttpClientUtils.sendPost (HIS_URL, map);
        return AjaxResult.success ().put ("data", post);
    }
    //    @ApiOperation(value = "获取检查影像信息")
    public AjaxResult Getexamimageinfo (String hisRegistrationId,
                                        Date jsrq,
                                        Date ksrq,
                                        Integer pagecount,
                                        Integer page) {
        Map<String, Object> map = new HashMap<> ();
        map.put ("his_registration_id", hisRegistrationId);
        map.put ("jsrq", jsrq);
        map.put ("ksrq", ksrq);
        map.put ("pagecount", pagecount);
        map.put ("page", page);
        String post = HttpClientUtils.sendPost (HIS_URL, map);
        return AjaxResult.success ().put ("data", post);
    }
    //    @ApiOperation(value = "获取检验申请信息")
    public AjaxResult Getlabapplyinfo (String hisRegistrationId,
                                       Date jsrq,
                                       Date ksrq,
                                       String cardtype,
                                       String mzorzy,
                                       String ksbm) {
        Map<String, Object> map = new HashMap<> ();
        map.put ("his_registration_id", hisRegistrationId);
        map.put ("jsrq", jsrq);
        map.put ("ksrq", ksrq);
        map.put ("cardtype", cardtype);
        map.put ("mzorzy", mzorzy);
        map.put ("ksbm", ksbm);
        String post = HttpClientUtils.sendPost (HIS_URL, map);
        return AjaxResult.success ().put ("data", post);
    }
    //    @ApiOperation(value = "获取检验报告记录信息")
    public AjaxResult Getlabreportinfo (String hisRegistrationId,
                                        Date jsrq,
                                        Date ksrq,
                                        String ksbm,
                                        String pationid,
                                        Integer pagecount,
                                        Integer page) {
        Map<String, Object> map = new HashMap<> ();
        map.put ("his_registration_id", hisRegistrationId);
        map.put ("jsrq", jsrq);
        map.put ("ksrq", ksrq);
        map.put ("ksbm", ksbm);
        map.put ("pationid", pationid);
        map.put ("pagecount", pagecount);
        map.put ("page", page);
        String post = HttpClientUtils.sendPost (HIS_URL, map);
        return AjaxResult.success ().put ("data", post);
    }
    //    @ApiOperation(value = "获取微生物报告记录信息")
    public AjaxResult Getlabgermrepinfo (String jybgid) {
        Map<String, Object> map = new HashMap<> ();
        map.put ("jybgid", jybgid);
        String post = HttpClientUtils.sendPost (HIS_URL, map);
        return AjaxResult.success ().put ("data", post);
    }
    //    @ApiOperation(value = "获取微生物药敏信息")
    public AjaxResult Getlabgermdetailinfo (String jybgid) {
        Map<String, Object> map = new HashMap<> ();
        map.put ("jybgid", jybgid);
        String post = HttpClientUtils.sendPost (HIS_URL, map);
        return AjaxResult.success ().put ("data", post);
    }
    //    @ApiOperation(value = "获取危急值信息")
    public AjaxResult Getlaburgentinfo (String jybgid,
                                        Date jsrq,
                                        Date ksrq) {
        Map<String, Object> map = new HashMap<> ();
        map.put ("jybgid", jybgid);
        map.put ("jsrq", jsrq);
        map.put ("ksrq", ksrq);
        String post = HttpClientUtils.sendPost (HIS_URL, map);
        return AjaxResult.success ().put ("data", post);
    }
    //    @ApiOperation(value = "检验样本拒收记录")
    public AjaxResult Labreportapply (String tmh,
                                      String jsrydm,
                                      Date jsrq,
                                      String jsyy) {
        Map<String, Object> map = new HashMap<> ();
        map.put ("tmh", tmh);
        map.put ("jsrydm", jsrydm);
        map.put ("jsrq", jsrq);
        map.put ("jsyy", jsyy);
        String post = HttpClientUtils.sendPost (HIS_URL, map);
        return AjaxResult.success ().put ("data", post);
    }
    //    @ApiOperation(value = "获取检验登记信息")
    public AjaxResult Getlabreginfoinfo (String hisRegistrationId,
                                         Date jsrq,
                                         Date ksrq,
                                         String Status,
                                         String pationid,
                                         Integer pagecount,
                                         Integer page) {
        Map<String, Object> map = new HashMap<> ();
        map.put ("his_registration_id", hisRegistrationId);
        map.put ("Status", Status);
        map.put ("jsrq", jsrq);
        map.put ("ksrq", ksrq);
        map.put ("pationid", pationid);
        map.put ("pagecount", pagecount);
        map.put ("page", page);
        String post = HttpClientUtils.sendPost (HIS_URL, map);
        return AjaxResult.success ().put ("data", post);
    }
    //    @ApiOperation(value = "体检费用申请")
    public AjaxResult Testcostapply (TestcostapplyDto dao) {
        Map<String, Object> map = new HashMap<> ();
        map.put ("his_registration_id", dao.getHisRegistrationId ());
        map.put ("czybm", dao.getCzybm ());
        map.put ("czyksbm", dao.getCzyksbm ());
        map.put ("brxm", dao.getBrxm ());
        map.put ("ywck", dao.getYwck ());
        map.put ("sfzh", dao.getSfzh ());
        map.put ("jkkkh", dao.getJkkkh ());
        map.put ("mindexId", dao.getMindexId ());
        map.put ("brxb", dao.getBrxb ());
        map.put ("csrq", dao.getCsrq ());
        map.put ("brnl", dao.getBrnl ());
        map.put ("brnldw", dao.getBrnldw ());
        map.put ("addr", dao.getAddr ());
        map.put ("lxrdh", dao.getLxrdh ());
        map.put ("mz", dao.getMz ());
        map.put ("zy", dao.getZy ());
        map.put ("details", dao.getDetails ());
        map.put ("mxfyxmbm", dao.getMxfyxmbm ());
        map.put ("sfzhfy", dao.getSfzhfy ());
        map.put ("sl", dao.getSl ());
        String post = HttpClientUtils.sendPost (HIS_URL, map);
        return AjaxResult.success ().put ("data", post);
    }
    //    @ApiOperation(value = "新增或修改体检登记信息")
    public AjaxResult Testregapply (TestregapplyDto dao) {
        Map<String, Object> map = new HashMap<> ();
        map.put ("his_registration_id", dao.getHisRegistrationId ());
        map.put ("czybm", dao.getCzybm ());
        map.put ("czyksbm", dao.getCzyksbm ());
        map.put ("tjbh", dao.getTjbh ());
        map.put ("grbh", dao.getGrbh ());
        map.put ("sfzh", dao.getSfzh ());
        map.put ("xm", dao.getXm ());
        map.put ("xb", dao.getXb ());
        map.put ("nl", dao.getNl ());
        map.put ("csrq", dao.getCsrq ());
        map.put ("nldw", dao.getNldw ());
        map.put ("addr", dao.getAddr ());
        map.put ("sj", dao.getSj ());
        map.put ("dwbm", dao.getDwbm ());
        map.put ("tcbm", dao.getTcbm ());
        map.put ("details", dao.getDetails ());
        map.put ("je", dao.getJe ());
        map.put ("sjje", dao.getSjje ());
        map.put ("details_mx", dao.getDetailsMx ());
        String post = HttpClientUtils.sendPost (HIS_URL, map);
        return AjaxResult.success ().put ("data", post);
    }
    //    @ApiOperation(value = "获取门诊患者费用清单信息")
    public AjaxResult Getoutpatientcostinfo (String cardtype,
                                             Date jsrq,
                                             Date ksrq,
                                             String input,
                                             Integer pagecount,
                                             Integer page) {
        Map<String, Object> map = new HashMap<> ();
        map.put ("cardtype", cardtype);
        map.put ("input", input);
        map.put ("jsrq", jsrq);
        map.put ("ksrq", ksrq);
        map.put ("pagecount", pagecount);
        map.put ("page", page);
        String post = HttpClientUtils.sendPost (HIS_URL, map);
        return AjaxResult.success ().put ("data", post);
    }
    //    @ApiOperation(value = "获取门诊结算记录")
    public AjaxResult Getoutaccountrecord (String hisRegistrationId,
                                           Date jsrq,
                                           Date ksrq,
                                           Integer pagecount,
                                           Integer page) {
        Map<String, Object> map = new HashMap<> ();
        map.put ("his_registration_id", hisRegistrationId);
        map.put ("jsrq", jsrq);
        map.put ("ksrq", ksrq);
        map.put ("pagecount", pagecount);
        map.put ("page", page);
        String post = HttpClientUtils.sendPost (HIS_URL, map);
        return AjaxResult.success ().put ("data", post);
    }
    //    @ApiOperation(value = "获取患者注册信息(含变更记录)")
    public AjaxResult Getpatientalterregrecord (String mzzybz,
                                                Date jsrq,
                                                Date ksrq) {
        Map<String, Object> map = new HashMap<> ();
        map.put ("mzzybz", mzzybz);
        map.put ("jsrq", jsrq);
        map.put ("ksrq", ksrq);
        String post = HttpClientUtils.sendPost (HIS_URL, map);
        return AjaxResult.success ().put ("data", post);
    }
}
ltkj-admin/src/main/java/com/ltkj/web/controller/service/TjSysAsyncServiceImpl.java
@@ -472,7 +472,10 @@
        List<TjConsumables> list2 = new ArrayList<>();
        String[] tjProIds = tjFlowingWater.getTjProIds();
        for (String tjProId : tjProIds) {
            LambdaQueryWrapper<TbTransition> wqq = new LambdaQueryWrapper<>();
            wqq.eq(TbTransition::getCusId, customer.getCusIdcard());
            TjProject project = projectService.selectTjProjectByProId(Long.valueOf(tjProId));
            if (null != project && project.getProParentId() == 0) {
            TjOrderRemark tjOrderRemark = new TjOrderRemark();
            tjOrderRemark.setProId(Long.valueOf(tjProId));
            tjOrderRemark.setProName(project.getProName());
@@ -485,6 +488,7 @@
            tjOrderRemark.setCreateId(String.valueOf(sysUser.getUserId()));
            tjOrderRemark.setUpdateId(String.valueOf(sysUser.getUserId()));
            orderRemarkService.save(tjOrderRemark);
            List<Long> proIds = projectService.getTjProjectListBySoneId(tjProId).stream().map(TjProject::getProId).collect(Collectors.toList());
            TjOrderDetail detail = new TjOrderDetail();
            detail.setTjStatus(0L);
@@ -514,11 +518,60 @@
                detail.setUpdateId(String.valueOf(sysUser.getUserId()));
                tjOrderDetailService.save(detail1);
            }
            LambdaQueryWrapper<TbTransition> wqq = new LambdaQueryWrapper<>();
            wqq.eq(TbTransition::getCusId, customer.getCusIdcard());
            if ( proIds.size() > 0){
                wqq.in(TbTransition::getProId, proIds);
            } else {
                wqq.in(TbTransition::getProId, Arrays.asList(tjProIds));
                TjProject projects = projectService.selectTjProjectByProId(Long.valueOf(tjProId));
                if (null != projects) {
                    TjProject projectss = projectService.selectTjProjectByProId(projects.getProParentId());
                    if (null != projectss) {
                        TjOrderRemark tjOrderRemark = new TjOrderRemark();
                        tjOrderRemark.setProId(Long.valueOf(tjProId));
                        tjOrderRemark.setProName(projectss.getProName());
                        tjOrderRemark.setDeptId(projectss.getDeptId());
                        tjOrderRemark.setTjNumber(order.getTjNumber());
                        tjOrderRemark.setCreateBy(sysUser.getNickName());
                        tjOrderRemark.setCreateTime(new Date());
                        tjOrderRemark.setUpdateBy(sysUser.getNickName());
                        tjOrderRemark.setUpdateTime(new Date());
                        tjOrderRemark.setCreateId(String.valueOf(sysUser.getUserId()));
                        tjOrderRemark.setUpdateId(String.valueOf(sysUser.getUserId()));
                        orderRemarkService.save(tjOrderRemark);
            }
                }
//                List<Long> proIds = projectService.getTjProjectListBySoneId(tjProId).stream().map(TjProject::getProId).collect(Collectors.toList());
                TjOrderDetail detail = new TjOrderDetail();
                detail.setTjStatus(0L);
                detail.setOrderId(tjFlowingWater.getOrderId());
                detail.setFlowingWaterId(String.valueOf(tjFlowingWater.getTjSerialNumber()));
                detail.setProId(Long.valueOf(tjProId));
                detail.setIsAddition("Y");
                detail.setCreateBy(sysUser.getNickName());
                detail.setCreateTime(new Date());
                detail.setUpdateBy(sysUser.getNickName());
                detail.setUpdateTime(new Date());
                detail.setCreateId(String.valueOf(sysUser.getUserId()));
                detail.setUpdateId(String.valueOf(sysUser.getUserId()));
                tjOrderDetailService.save(detail);
//                for (Long proId : proIds) {
                TjOrderDetail detail1 = new TjOrderDetail();
                detail1.setTjStatus(0L);
                detail1.setOrderId(tjFlowingWater.getOrderId());
                detail1.setFlowingWaterId(String.valueOf(tjFlowingWater.getTjSerialNumber()));
                detail1.setProId(Long.valueOf(tjProId));
                detail1.setIsAddition("Y");
                detail.setCreateBy(sysUser.getNickName());
                detail.setCreateTime(new Date());
                detail.setUpdateBy(sysUser.getNickName());
                detail.setUpdateTime(new Date());
                detail.setCreateId(String.valueOf(sysUser.getUserId()));
                detail.setUpdateId(String.valueOf(sysUser.getUserId()));
                tjOrderDetailService.save(detail1);
//                }
            }
            List<TbTransition> tbTransitionList = transitionService.list(wqq);
            if (null != tbTransitionList && tbTransitionList.size() > 0) {
                for (TbTransition transition : tbTransitionList) {
@@ -542,8 +595,9 @@
                    }
                }
                //父项
                TjProject parentProject = projectService.getById(tjProId);
                if (null != parentProject) {
                TjProject parentProject = projectService.selectTjProjectByProId(Long.valueOf(tjProId));
                if (null != parentProject && parentProject.getProParentId() == 0) {
                    LambdaQueryWrapper<TjProConsumables> wqqq = new LambdaQueryWrapper<>();
                    wqqq.eq(TjProConsumables::getProId, parentProject.getProId());
                    List<TjProConsumables> proConsumables = proConsumablesService.list(wqqq);
@@ -553,6 +607,20 @@
                            list2.add(tjConsumables);
                        }
                    }
                } else {
                    TjProject parentProjects = projectService.getById(tjProId);
                    if (null != parentProjects) {
                        LambdaQueryWrapper<TjProConsumables> wqqq = new LambdaQueryWrapper<>();
                        wqqq.eq(TjProConsumables::getProId, parentProjects.getProId());
                        List<TjProConsumables> proConsumables = proConsumablesService.list(wqqq);
                        if (null != proConsumables && proConsumables.size() > 0) {
                            for (TjProConsumables tjProConsumables : proConsumables) {
                                TjConsumables tjConsumables = consumablesService.selectTjConsumablesById(tjProConsumables.getConsumablesId());
                                list2.add(tjConsumables);
                            }
                        }
                    }
                }
            }
        }
ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjSurveyTemplateController.java
@@ -328,9 +328,9 @@
    @Log(title = "问卷模板", businessType = BusinessType.UPDATE)
    @PutMapping
    public AjaxResult edit(@RequestBody TjSurveyTemplate tjSurveyTemplate) {
        TjSurveyTemplate byId = tjSurveyTemplateService.selectTemplateByTjCategory(tjSurveyTemplate.getTempType());
        if(null !=byId){
            return AjaxResult.error("该类型模板已存在  不可重复创建!!!");
        TjSurveyTemplate byId = tjSurveyTemplateService.selectTemplateByMid1(tjSurveyTemplate.getMid());
        if(null ==byId){
            return AjaxResult.error("该模板不存在!!!");
        }
        return toAjax(tjSurveyTemplateService.updateTjSurveyTemplate(tjSurveyTemplate));
    }