zjh
2024-07-12 3779da90aeb2392b85bf721900bfb6f07bee1021
zjh 2024/07/12-1
11个文件已修改
289 ■■■■■ 已修改文件
ltkj-admin/src/main/java/com/ltkj/web/controller/system/DictCompController.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ltkj-admin/src/main/java/com/ltkj/web/controller/system/SysConfigController.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjCustomerController.java 234 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjDwGroupingController.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjReservationController.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ltkj-admin/src/main/resources/application.yml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ltkj-common/src/main/java/com/ltkj/common/excelConfig/ExcelUtils.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ltkj-system/src/main/java/com/ltkj/system/mapper/SysConfigMapper.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ltkj-system/src/main/java/com/ltkj/system/service/ISysConfigService.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ltkj-system/src/main/java/com/ltkj/system/service/impl/SysConfigServiceImpl.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ltkj-system/src/main/resources/mapper/system/SysConfigMapper.xml 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ltkj-admin/src/main/java/com/ltkj/web/controller/system/DictCompController.java
@@ -91,9 +91,11 @@
    @Log(title = "体检单位信息维护", businessType = BusinessType.INSERT)
    @PostMapping
    public AjaxResult add(@RequestBody DictComp dictComp) {
        String firstLetter = PinyinUtil.getFirstLetter(dictComp.getCnName(), "");
        dictComp.setWbm(MatchUtils.toWubi(dictComp.getCnName()));
        dictComp.setEnName(firstLetter);
        if(null !=dictComp.getCnName()){
            String firstLetter = PinyinUtil.getFirstLetter(dictComp.getCnName(), "");
            dictComp.setWbm(MatchUtils.toWubi(dictComp.getCnName()));
            dictComp.setEnName(firstLetter);
        }
        return toAjax(dictCompService.save(dictComp));
    }
ltkj-admin/src/main/java/com/ltkj/web/controller/system/SysConfigController.java
@@ -178,4 +178,13 @@
        return AjaxResult.error();
    }
    @GetMapping ("/tbhisproprice")//同步his项目单价信息
    @PreAuthorize("@ss.hasPermi('system:config:tbhisproprice')")
    public AjaxResult tbhisproprice() {
         configService.tbhisproprice();
        return AjaxResult.success();
    }
}
ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjCustomerController.java
@@ -151,13 +151,9 @@
//                    return AjaxResult.error("身份证号码错误");
//                }
//            }
            //根据配置调取存储过程 将临时表数据存入预约表2023.12.12
            LambdaQueryWrapper<TjCustomer> customerLambdaQueryWrapper = new LambdaQueryWrapper<>();
            customerLambdaQueryWrapper.eq(TjCustomer::getCusIdcard, cusIdcard);
            TjCustomer tjCustomerServiceOne = tjCustomerService.getOne(customerLambdaQueryWrapper);
            if (null == tjCustomerServiceOne) {
                return AjaxResult.error("该人员信息不存在请先进行登记!!!");
            }
            Date dates = new Date();
            final String date = DateUtil.format(dates, "yyyy-MM-dd HH:mm:ss");
            final String getInfoFromSqlData = sysConfigService.selectConfigByKey("getInfoFromSqlData");
            if ("Y".equals(getInfoFromSqlData)) {
                //根据身份证号从his查信息
@@ -208,48 +204,7 @@
            }
            String key = sysConfigService.selectConfigByKey("sfkqdyhis");
            if (null != key && key.equals("Y")) {
                String cardId = tjCustomerServiceOne.getCardId();
                if (null != cardId && !cardId.equals("0")) {
                    int i = tjOrderService.selectTjOrderByCardId(cardId);
                    if (i > 0) {
                        return AjaxResult.error("不可重复签到");
                    }
                }
//                controller.Outpincreateapply(tjCustomer);
/*                Date dates = new Date();
                final String date = DateUtil.format(dates, "yyyy-MM-dd HH:mm:ss");
                OutpinregapplyDto outpinregapplyDto = new OutpinregapplyDto();
                outpinregapplyDto.setPationid(tjCustomerServiceOne.getPationId());
                outpinregapplyDto.setSqysbm("00029");
                outpinregapplyDto.setMzksbm("0101");
                outpinregapplyDto.setCzybm("00029");
                outpinregapplyDto.setSfjz("0");
                outpinregapplyDto.setGhzlbm("01");
                outpinregapplyDto.setYwckbm("0001");
                outpinregapplyDto.setSflstd("0");
                outpinregapplyDto.setGhrq(date);
                //门诊挂号
                AjaxResult ajaxResult = controller.Outpinregapply(outpinregapplyDto);
                String result2 = getAjaxResult(ajaxResult);
                JSONObject object1 = getJSONObject(result2);
                String code1 = object1.getStr("ResultCode");
                if (code1.equals("0")) {
                    JSONArray resultDatas = object1.getJSONArray("ResultData");
                    if (null != resultDatas && resultDatas.size() > 0) {
                        Map<String, Object> resultDatasss = (Map<String, Object>) resultDatas.get(0);
                        String hisRegistrationId = resultDatasss.get("his_registration_id").toString();
                        //门诊医生接诊
                        controller.Outpinconapply(hisRegistrationId, date, SecurityUtils.getUsername());
//                        tjCustomerServiceOne.setCardId(hisRegistrationId);
//                        tjCustomerServiceOne.setCusBrithday(DateUtil.parse(MatchUtils.getBirthDayByIdCard(tjCustomerServiceOne.getCusIdcard()),"yyyy-MM-dd"));
//                        tjCustomerService.updateById(tjCustomerServiceOne);
                        tjCustomerService.updateCardId(tjCustomerServiceOne.getCusId(),hisRegistrationId);
                    }
                }*/
            }
            //end====2023.12.12
            LambdaQueryWrapper<TjReservation> wq = new LambdaQueryWrapper<>();
@@ -265,43 +220,10 @@
                    tjReservationService.updateById(tjReservation);
                    return AjaxResult.error("对不起您的预约已超时请重新预约");
                }
                LambdaQueryWrapper<TjCustomer> qw = new LambdaQueryWrapper<>();
                qw.eq(TjCustomer::getCusIdcard, cusIdcard);
                TjCustomer tjCustomer1 = tjCustomerService.getOne(qw);
                if (tjCustomer1 != null) {
         /*           String key = sysConfigService.selectConfigByKey("sfkqdyhis");
                    if (null != key && key.equals("Y")) {
                        Date dates = new Date();
                        final String date = DateUtil.format(dates, "yyyy-MM-dd HH:mm:ss");
                        OutpinregapplyDto outpinregapplyDto = new OutpinregapplyDto();
                        outpinregapplyDto.setPationid(tjCustomer1.getPationId());
                        outpinregapplyDto.setSqysbm(SecurityUtils.getUsername());
                        outpinregapplyDto.setMzksbm("0101");
                        outpinregapplyDto.setCzybm("00029");
                        outpinregapplyDto.setSfjz("0");
                        outpinregapplyDto.setGhzlbm("01");
                        outpinregapplyDto.setYwckbm("0001");
                        outpinregapplyDto.setSflstd("0");
                        outpinregapplyDto.setGhrq(date);
                        //门诊挂号
                        AjaxResult ajaxResult = controller.Outpinregapply(outpinregapplyDto);
                        String result2 = getAjaxResult(ajaxResult);
                        JSONObject object1 = getJSONObject(result2);
                        String code1 = object1.getStr("ResultCode");
                        if (code1.equals("0")) {
                            JSONArray resultDatas = object1.getJSONArray("ResultData");
                            if (null != resultDatas && resultDatas.size() > 0) {
                                Map<String, Object> resultDatasss = (Map<String, Object>) resultDatas.get(0);
                                String hisRegistrationId = resultDatasss.get("his_registration_id").toString();
                                //门诊医生接诊
                                controller.Outpinconapply(hisRegistrationId, date, SecurityUtils.getUsername());
                                tjCustomer1.setCardId(hisRegistrationId);
                            }
                        }
                    }*/
                    tjCustomer1.setTjType(tjReservation.getTjType());
                    tjCustomer1.setCusName(tjReservation.getName());
                    tjCustomer1.setCusSex(Long.valueOf(tjReservation.getSex()));
@@ -324,45 +246,87 @@
                    tjCustomer1.setDiscount(tjReservation.getDiscount());
                    tjCustomer1.setGroupingId(tjReservation.getGroupingId());
                    return success(tjCustomer1);
                }else {
                    TjCustomer tjCustomer = new TjCustomer();
                    tjCustomer.setCusIdcard(tjReservation.getIdCard());
                    tjCustomer.setCusName(tjReservation.getName());
                    tjCustomer.setCusSex(Long.valueOf(tjReservation.getSex()));
                    tjCustomer.setCusBrithday(tjReservation.getBirthday());
                    tjCustomer.setCusPhone(tjReservation.getPhoe());
                    tjCustomer.setCusEmail(tjReservation.getEmail());
                    tjCustomer.setCusAddr(tjReservation.getAddress());
                    tjCustomer.setCusMarryStatus(String.valueOf(tjReservation.getMarriage()));
                    tjCustomer.setCusNational(String.valueOf(tjReservation.getNation()));
                    tjCustomer.setIdType(tjReservation.getIdType());
                    tjCustomer.setAge(tjReservation.getAge());
                    tjCustomer.setAgeUnit(tjReservation.getAgeUnit());
                    tjCustomer.setCareer(tjReservation.getCareer());
                    tjCustomer.setDwPhone(tjReservation.getDwPhone());
                    tjCustomer.setCardId(tjReservation.getCardId());
                    tjCustomer.setIndexCard(tjReservation.getIndexCard());
                    //截取密码自动生成set进去
                    String substring = cusIdcard.substring(cusIdcard.length() - 6);
                    substring = DigestUtils.md5DigestAsHex(substring.getBytes());
                    tjCustomer.setCusPassword(substring);
                    tjCustomer.setTjType(tjReservation.getTjType());
                    tjCustomer.setPym(PinyinUtil.getFirstLetter(tjReservation.getName(),""));
                    tjCustomerService.save(tjCustomer);
                    if (null != key && key.equals("Y"))
                    {
                        AjaxResult result = controller.Outpincreateapply(tjCustomer);
                        String result1 = getAjaxResult(result);
                        JSONObject object = getJSONObject(result1);
                        String code = object.getStr("ResultCode");
                        if (code.equals("0")) {
                            JSONArray resultDatass = object.getJSONArray("ResultData");
                            Map<String, Object> resultData = (Map<String, Object>) resultDatass.get(0);
                            if (null != resultData && resultData.size() > 0) {
                                String pationid = resultData.get("PationId").toString();
                                if (null != pationid) {
                                    tjCustomer.setPationId(pationid);
                                    tjCustomerService.updateById(tjCustomer);
                                    //保存注册入参出参
                                    resultData.put("cardId",pationid);
                                    JSONObject object4 = JSONUtil.parseObj(resultData);
                                    LambdaQueryWrapper<HisApiConfig> lambdaQueryWrapper = new LambdaQueryWrapper<>();
                                    lambdaQueryWrapper.eq(HisApiConfig::getApiMethod, "Outpincreateapply");
                                    HisApiConfig hisApiConfig = hisApiConfigService.getOne(lambdaQueryWrapper);
                                    hisApiGetMethodService.save(object4, "Outpincreateapply", hisApiConfig, JSONUtil.toJsonStr(BeanUtil.beanToMap(tjCustomer)));
                                }
                            }
                        }
                    }
                    tjCustomer.setTeamNo(tjReservation.getTeamNo());
                    tjCustomer.setCompId(tjReservation.getCompanyId());
                    tjCustomer.setReservationId(tjReservation.getId());
                    tjCustomer.setDiscount(tjReservation.getDiscount());
                    tjCustomer.setGroupingId(tjReservation.getGroupingId());
                    return success(tjCustomer);
                }
                TjCustomer tjCustomer = new TjCustomer();
                tjCustomer.setCusIdcard(tjReservation.getIdCard());
                tjCustomer.setCusName(tjReservation.getName());
                tjCustomer.setCusSex(Long.valueOf(tjReservation.getSex()));
                tjCustomer.setCusBrithday(tjReservation.getBirthday());
                tjCustomer.setCusPhone(tjReservation.getPhoe());
                tjCustomer.setCusEmail(tjReservation.getEmail());
                tjCustomer.setCusAddr(tjReservation.getAddress());
                tjCustomer.setCusMarryStatus(String.valueOf(tjReservation.getMarriage()));
                tjCustomer.setCusNational(String.valueOf(tjReservation.getNation()));
                tjCustomer.setIdType(tjReservation.getIdType());
                tjCustomer.setAge(tjReservation.getAge());
                tjCustomer.setAgeUnit(tjReservation.getAgeUnit());
                tjCustomer.setCareer(tjReservation.getCareer());
                tjCustomer.setDwPhone(tjReservation.getDwPhone());
                tjCustomer.setCardId(tjReservation.getCardId());
                tjCustomer.setIndexCard(tjReservation.getIndexCard());
                //截取密码自动生成set进去
                String substring = cusIdcard.substring(cusIdcard.length() - 6);
                substring = DigestUtils.md5DigestAsHex(substring.getBytes());
                tjCustomer.setCusPassword(substring);
                tjCustomer.setTjType(tjReservation.getTjType());
                tjCustomer.setPym(PinyinUtil.getFirstLetter(tjReservation.getName(),""));
                tjCustomerService.save(tjCustomer);
                tjCustomer.setTeamNo(tjReservation.getTeamNo());
                tjCustomer.setCompId(tjReservation.getCompanyId());
                tjCustomer.setReservationId(tjReservation.getId());
                tjCustomer.setDiscount(tjReservation.getDiscount());
                tjCustomer.setGroupingId(tjReservation.getGroupingId());
                return success(tjCustomer);
            } else {
                LambdaQueryWrapper<TjCustomer> customerLambdaQueryWrapper1 = new LambdaQueryWrapper<>();
                customerLambdaQueryWrapper1.eq(TjCustomer::getCusIdcard, cusIdcard);
                TjCustomer one = tjCustomerService.getOne(customerLambdaQueryWrapper1);
                return AjaxResult.success("暂无预约信息", tjCustomerServiceOne);
            }
            //根据配置调取存储过程 将临时表数据存入预约表2023.12.12
            LambdaQueryWrapper<TjCustomer> customerLambdaQueryWrapper = new LambdaQueryWrapper<>();
            customerLambdaQueryWrapper.eq(TjCustomer::getCusIdcard, cusIdcard);
            TjCustomer tjCustomerServiceOne = tjCustomerService.getOne(customerLambdaQueryWrapper);
            if (null == tjCustomerServiceOne) {
                return AjaxResult.error("该人员信息不存在请先进行登记!!!");
            }
            if (null != key && key.equals("Y")) {
                String cardId = tjCustomerServiceOne.getCardId();
                if (null != cardId && !cardId.equals("0")) {
                    int i = tjOrderService.selectTjOrderByCardId(cardId);
                    if (i > 0) {
                        return AjaxResult.error("不可重复签到");
                    }
                }
            }
            return AjaxResult.success(tjCustomerServiceOne);
        }
        return error("身份证号不存在");
    }
@@ -526,42 +490,6 @@
                    lambdaQueryWrapper.eq(HisApiConfig::getApiMethod, "Outpincreateapply");
                    HisApiConfig hisApiConfig = hisApiConfigService.getOne(lambdaQueryWrapper);
                    hisApiGetMethodService.save(object4, "Outpincreateapply", hisApiConfig, JSONUtil.toJsonStr(BeanUtil.beanToMap(tjCustomer)));
                    /*                        OutpinregapplyDto outpinregapplyDto = new OutpinregapplyDto();
                        outpinregapplyDto.setPationid(pationid);
                        outpinregapplyDto.setSqysbm("00029");
                        outpinregapplyDto.setMzksbm("0101");
                        outpinregapplyDto.setCzybm("00029");
                        outpinregapplyDto.setSfjz("0");
                        outpinregapplyDto.setGhzlbm("01");
                        outpinregapplyDto.setYwckbm("0001");
                        outpinregapplyDto.setSflstd("0");
                        outpinregapplyDto.setGhrq(date);
                        //门诊挂号
                        AjaxResult ajaxResult = controller.Outpinregapply(outpinregapplyDto);
                        String result2 = getAjaxResult(ajaxResult);
                        JSONObject object1 = getJSONObject(result2);
                        String code1 = object1.getStr("ResultCode");
                        if (code1.equals("0")) {
                            JSONArray resultDatas = object1.getJSONArray("ResultData");
                            if (null != resultDatas && resultDatas.size() > 0) {
                                Map<String, Object> resultDatasss = (Map<String, Object>) resultDatas.get(0);
                                String hisRegistrationId = resultDatasss.get("his_registration_id").toString();
                                if (null != hisRegistrationId) {
                                    //门诊医生接诊
                                    AjaxResult result3 = controller.Outpinconapply(hisRegistrationId, date,"00029");
                                    String result4 = getAjaxResult(result3);
                                    JSONObject object2 = getJSONObject(result4);
                                    String code2 = object2.getStr("ResultCode");
                                    if (code2.equals("0")) {
                                        Map<String, Object> data = object2.getJSONObject("ResultData");
                                        String hisRegistrationId1 = data.get("his_registration_id").toString();
                                        tjCustomer.setPationId(pationid);
                                        tjCustomer.setCardId(hisRegistrationId1);
//                                        tjCustomerService.updateById(tjCustomer);
                                    }
                                }
                            }
                        }*/
                }
            }
ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjDwGroupingController.java
@@ -108,6 +108,7 @@
        if(i>0){
            return AjaxResult.error("该性别分组已存在不可重复创建");
        }
        if(null ==tjDwGrouping.getPayType()|| tjDwGrouping.getPayType().equals(""))return AjaxResult.error("请选择结算方式!!!");
        tjDwGrouping.setDwDeptName(compService.getById(tjDwGrouping.getDwId()).getCnName());
        if (tjDwGroupingService.saveOrUpdate(tjDwGrouping)) {
            if(null !=tjDwGrouping.getMapList() && tjDwGrouping.getMapList().size()>0){
ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjReservationController.java
@@ -251,9 +251,15 @@
            String idCard = tjReservation.getIdCard();
            String phoe = tjReservation.getPhoe();
            if (null != idCard && null != phoe) {
                if (!MatchUtils.isIdCard(idCard) || !MatchUtils.isMobileNO(phoe)) {
//                if (!MatchUtils.isIdCard(idCard) || !MatchUtils.isMobileNO(phoe)) {
                if (idCard.isEmpty() || phoe.isEmpty()) {
                    wrongList.add(tjReservation.getName());
                } else {
                    //年龄
                    tjReservation.setAge(String.valueOf(MatchUtils.getAgeByIdCard(tjReservation.getIdCard())));
                    //出生日期
                    tjReservation.setBirthday(DateUtil.parse(MatchUtils.getBirthDayByIdCard(tjReservation.getIdCard()),"yyyy-MM-dd"));
                    if (null != groupingMan && groupingMan.getSex().equals(String.valueOf(tjReservation.getSex()))) {
                        tjReservation.setGroupingId(groupingMan.getId());
ltkj-admin/src/main/resources/application.yml
@@ -4,4 +4,4 @@
#test 泾川县部署测试环境使用
spring:
  profiles:
    active: prod
    active: dev
ltkj-common/src/main/java/com/ltkj/common/excelConfig/ExcelUtils.java
@@ -22,6 +22,7 @@
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.net.URL;
import java.nio.charset.StandardCharsets;
import java.text.NumberFormat;
import java.text.SimpleDateFormat;
import java.util.*;
@@ -365,8 +366,8 @@
        }
        // String类型
        if (cell.getCellTypeEnum() == CellType.STRING) {
            String val = cell.getStringCellValue();
            if (val == null || val.trim().length() == 0) {
            String val = new String(cell.getStringCellValue().getBytes(StandardCharsets.UTF_8));
            if (val.trim().length() == 0) {
                return "";
            }
            return val.trim();
ltkj-system/src/main/java/com/ltkj/system/mapper/SysConfigMapper.java
@@ -3,6 +3,7 @@
import java.util.List;
import com.ltkj.system.domain.SysConfig;
import org.apache.ibatis.annotations.Select;
/**
 * 参数配置 数据层
@@ -65,4 +66,11 @@
     * @return 结果
     */
    public int deleteConfigByIds(Long[] configIds);
    void tbhisproprice();
}
ltkj-system/src/main/java/com/ltkj/system/service/ISysConfigService.java
@@ -86,4 +86,7 @@
     * @return 结果
     */
    public String checkConfigKeyUnique(SysConfig config);
    void tbhisproprice();
}
ltkj-system/src/main/java/com/ltkj/system/service/impl/SysConfigServiceImpl.java
@@ -195,6 +195,11 @@
        return UserConstants.UNIQUE;
    }
    @Override
    public void tbhisproprice() {
        configMapper.tbhisproprice();
    }
    /**
     * 设置cache key
     *
ltkj-system/src/main/resources/mapper/system/SysConfigMapper.xml
@@ -120,4 +120,10 @@
        </foreach>
    </delete>
    <select id="tbhisproprice">
        {call tb_hisprodj()}
    </select>
</mapper>