zjh
3 天以前 ad4326adc4ccad14f090fba5acb435deab8260db
ltkj-admin/src/main/java/com/ltkj/web/controller/system/SysConfigController.java
@@ -9,6 +9,7 @@
import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.extra.pinyin.PinyinUtil;
import cn.hutool.json.JSONUtil;
import com.ltkj.hosp.idutil.IdUtils;
@@ -19,6 +20,7 @@
import com.ltkj.hosp.service.*;
import com.ltkj.hosp.sqlDomain.*;
import com.ltkj.system.service.ISysMenuService;
import com.ltkj.web.wxUtils.HttpClientUtils;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
@@ -77,6 +79,8 @@
    private AwsService awsService;
    @Autowired
    private IdUtils idUtils;
    @Autowired
    private ApiJcycpdgjzService apiJcycpdgjzService;
    /**
     * 获取参数配置列表
@@ -230,7 +234,7 @@
    private void tbjianyan(String s,String dqyyyqbm) {
        try {
            List<Aws> awsList = testMapper.getWsxmLtkjHysqdByLisViBySLAVEWS(s);
     /*       List<Aws> awsList = testMapper.getWsxmLtkjHysqdByLisViBySLAVEWS(s);
            if(null !=awsList && !awsList.isEmpty()){
                log.info("外送项目个数->{} 结果",awsList.size());
                log.info(awsList.toString());
@@ -238,14 +242,14 @@
                log.info("删除外送项目成功");
                awsService.saveBatch(awsList);
                log.info("保存外送项目成功");
            }
            }*/
            List<LtkjHysqd> hysqdList = testMapper.getCcXZxYyLtkjHysqdByLisVi(s,dqyyyqbm);
            log.info("原hysqdList->{} 结果", JSONUtil.parseObj(hysqdList));
            List<LtkjHysqd> wssq = testMapper.getWsxmLtkjHysqdByLisVi(s);
      /*      List<LtkjHysqd> wssq = testMapper.getWsxmLtkjHysqdByLisVi(s);
            if(null !=wssq && !wssq.isEmpty()){
                log.info("外送项个->{} 结果",wssq.toString());
                hysqdList.addAll(wssq);
            }
            }*/
            if (null != hysqdList && !hysqdList.isEmpty()) {
                log.info("现hysqdList->{} 结果", JSONUtil.parseObj(hysqdList));
                for (LtkjHysqd hysqd : hysqdList) {
@@ -256,8 +260,8 @@
                    }
                    if (ltkjHysqdService.save(hysqd)) {
                        List<LtkjHybgd> hybgdList = testMapper.getCcXZxYyLtkjHybgdByLisVi(hysqd.getTmh());
                        List<LtkjHybgd> wsbg = testMapper.getWsxmLtkjHybgdByLisVi(s);
                        if(null !=wsbg && !wsbg.isEmpty())hybgdList.addAll(wsbg);
//                        List<LtkjHybgd> wsbg = testMapper.getWsxmLtkjHybgdByLisVi(s);
//                        if(null !=wsbg && !wsbg.isEmpty())hybgdList.addAll(wsbg);
                        ltkjHybgdService.saveBatch(hybgdList);
                    }
                }
@@ -288,7 +292,19 @@
                        if(StringUtil.isNotBlank(jcsqd.getJgzt())){
                            String[] split = jcsqd.getJgzt().replaceAll("\n", "").split("。|;|;|,|,");
                            for (String jg : split) {
                                if(StringUtil.isNotBlank(jg) && !jg.contains("未见异常")
                                boolean b = apiJcycpdgjz(jg);
                                if(!b){
                                    TjJcycxm jcycxm=new TjJcycxm();
                                    jcycxm.setTjh(s);
                                    jcycxm.setYqid(dqyyyqbm);
                                    String[] split1 = jcsqd.getJcxmid().split(";");
                                    jcycxm.setProId(split1[0]);
                                    jcycxm.setProName(jcsqd.getJcxmmc());
                                    jcycxm.setCreateTime(new Date());
                                    jcycxm.setJcjg(jg);
                                    jcycxmService.save(jcycxm);
                                }
                         /*       if(StringUtil.isNotBlank(jg) && !jg.contains("未见异常")
                                        && !jg.contains("未见明显异常") && !jg.contains("未见占位") && !jg.contains("未见")
                                        && !jg.contains("未见明显")&& !jg.contains("正常")&& !jg.contains("双侧椎间孔无狭窄")){
                                    TjJcycxm jcycxm=new TjJcycxm();
@@ -300,7 +316,7 @@
                                    jcycxm.setCreateTime(new Date());
                                    jcycxm.setJcjg(jg);
                                    jcycxmService.save(jcycxm);
                                }
                                }*/
                            }
                        }
                    }
@@ -438,25 +454,40 @@
    public void zongjianshengchengyichangxiangmu(String s, String yqbm) {
        TjOrder order = orderService.getOrderByTjNum(s);
        jcycxmService.deletedByTjh(s);
        List<LtkjExamJcsqd> list = jcsqdService.getLtkjJcsqdByTjh(order.getCardId());
        if(null !=list && !list.isEmpty()){
            for (LtkjExamJcsqd jcsqd : list) {
                if(StringUtil.isNotBlank(jcsqd.getJgzt())){
                    String[] split = jcsqd.getJgzt().replaceAll("\n", "").split("。|;|;|,|,");
                    for (String jg : split) {
                        if(StringUtil.isNotBlank(jg) && !jg.contains("未见异常")
                                && !jg.contains("未见明显异常") && !jg.contains("未见占位")  && !jg.contains("无异常")
                                && !jg.contains("未见明显")&& !jg.contains("正常")&& !jg.contains("双侧椎间孔无狭窄")&& !jg.contains("无殊")){
                            TjJcycxm jcycxm=new TjJcycxm();
                            jcycxm.setTjh(s);
                            jcycxm.setYqid(yqbm);
                            String[] split1 = jcsqd.getJcxmid().split(";");
                            jcycxm.setProId(split1[0]);
                            jcycxm.setProName(jcsqd.getJcxmmc());
                            jcycxm.setCreateTime(new Date());
                            jcycxm.setJcjg(jg);
                            jcycxmService.save(jcycxm);
        if(null != order){
            jcycxmService.deletedByTjh(s);
            List<LtkjExamJcsqd> list = jcsqdService.getLtkjJcsqdByTjh(order.getCardId());
            if(null !=list && !list.isEmpty()){
                for (LtkjExamJcsqd jcsqd : list) {
                    if(StringUtil.isNotBlank(jcsqd.getJgzt())){
                        String[] split = jcsqd.getJgzt().replaceAll("\n", "").split("。|;|;|,|,");
                        for (String jg : split) {
                            boolean b = apiJcycpdgjz(jg);
                            if(!b){
                                TjJcycxm jcycxm=new TjJcycxm();
                                jcycxm.setTjh(s);
                                jcycxm.setYqid(yqbm);
                                String[] split1 = jcsqd.getJcxmid().split(";");
                                jcycxm.setProId(split1[0]);
                                jcycxm.setProName(jcsqd.getJcxmmc());
                                jcycxm.setCreateTime(new Date());
                                jcycxm.setJcjg(jg);
                                jcycxmService.save(jcycxm);
                            }
                     /*       if(StringUtil.isNotBlank(jg) && !jg.contains("未见异常")
                                    && !jg.contains("未见明显异常") && !jg.contains("未见占位")  && !jg.contains("无异常")
                                    && !jg.contains("未见明显")&& !jg.contains("正常")&& !jg.contains("双侧椎间孔无狭窄")&& !jg.contains("无殊")){
                                TjJcycxm jcycxm=new TjJcycxm();
                                jcycxm.setTjh(s);
                                jcycxm.setYqid(yqbm);
                                String[] split1 = jcsqd.getJcxmid().split(";");
                                jcycxm.setProId(split1[0]);
                                jcycxm.setProName(jcsqd.getJcxmmc());
                                jcycxm.setCreateTime(new Date());
                                jcycxm.setJcjg(jg);
                                jcycxmService.save(jcycxm);
                            }*/
                        }
                    }
                }
@@ -490,4 +521,31 @@
        return AjaxResult.success(numbers);
    }
    @GetMapping("/syncHisData")
    public AjaxResult syncHisData(@RequestParam(value = "tbzd",required = false,defaultValue = "true") Boolean tbzd) {
        if (tbzd) {
            String apiUrl = configService.selectConfigByKey("common_api_url");
            if (StrUtil.isBlank(apiUrl)) {
                return AjaxResult.error("未配置common_api_url");
            }
            HttpClientUtils instance = HttpClientUtils.getInstance();
            String sendHttpGet = instance.sendHttpGet(apiUrl);
            if (!sendHttpGet.equals("success")) return AjaxResult.error("同步失败");
        }
        testMapper.updTbProHisPrice();
        return AjaxResult.success();
    }
    public boolean apiJcycpdgjz(String jg) {
        if(StringUtil.isNotBlank(jg)){
            List<String> gjzList = apiJcycpdgjzService.getGjzList();
            if(null !=gjzList && !gjzList.isEmpty()){
                return gjzList.stream().anyMatch(jg::contains);
            }
        }
        return false;
    }
}