zjh
2025-01-24 2b39b654975aa9cb40254f20e545b9f389a82de7
ltkj-admin/src/main/java/com/ltkj/web/controller/system/SysConfigController.java
@@ -12,12 +12,14 @@
import com.ltkj.common.core.domain.entity.SysMenu;
import com.ltkj.common.utils.SecurityUtils;
import com.ltkj.hosp.domain.DictHosp;
import com.ltkj.hosp.domain.TjJcycxm;
import com.ltkj.hosp.domain.TjProject;
import com.ltkj.hosp.service.IDictHospService;
import com.ltkj.hosp.service.ITjProjectService;
import com.ltkj.hosp.service.*;
import com.ltkj.hosp.sqlDomain.LtkjExamJcsqd;
import com.ltkj.system.service.ISysMenuService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import jodd.util.StringUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.security.access.prepost.PreAuthorize;
@@ -52,6 +54,12 @@
    private String secret;
    @Autowired
    private ITjProjectService projectService;
    @Resource
    private ITjOrderService orderService;
    @Autowired
    private TjJcycxmService jcycxmService;
    @Resource
    private LtkjExamJcsqdService jcsqdService;
    /**
     * 获取参数配置列表
@@ -210,4 +218,43 @@
        return AjaxResult.success();
    }
    @GetMapping ("/tjjcycxm")//同步his项目单价信息
//    @PreAuthorize("@ss.hasPermi('system:config:tbhisproprice')")
    @ApiOperation (value = "tjjcycxm")
    public AjaxResult tjjcycxm() {
        String yqbm = configService.selectConfigByKey("common_api_service_hospbm");
        List<String> jc = orderService.getJianChaTjNum();
        if (null != jc && !jc.isEmpty()) {
            for (String s : jc) {
                jcycxmService.deletedByTjh(s);
                List<LtkjExamJcsqd> list = jcsqdService.getLtkjJcsqdByTjh(s);
                if(null !=list && !list.isEmpty()){
                    for (LtkjExamJcsqd jcsqd : list) {
                        if(jcsqd.getJgbx().contains("。")){
                            String[] split = jcsqd.getJgzt().split("。");
                            for (String jg : split) {
                                if(StringUtil.isNotBlank(jg) && !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);
                                }
                            }
                        }
                    }
                }
            }
        }
        return AjaxResult.success();
    }
}