zjh
2023-12-22 3dcb170f7e0ecbcf406953e81b3cf739cc120b7a
zjh 本地 2023/12/22 -3/
3个文件已修改
68 ■■■■■ 已修改文件
ltkj-admin/src/main/java/com/ltkj/web/controller/sqlserver/TjSqlController.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjCustomerController.java 41 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ltkj-hosp/src/main/java/com/ltkj/hosp/mapper/TestMapper.java 21 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ltkj-admin/src/main/java/com/ltkj/web/controller/sqlserver/TjSqlController.java
@@ -79,8 +79,10 @@
    @GetMapping("/newGetTjPat")
    @ApiOperation(value = "新的查询体检信息接口")
    public AjaxResult newGetTjPat() {
        List<Map<String, Object>> maps = testMapper.newGetTjPat();
    public AjaxResult newGetTjPat(@RequestParam(required = false)String pacCode,
                                  @RequestParam(required = false)String pacName,
                                  @RequestParam(required = false)String pacRemark) {
        List<Map<String, Object>> maps = testMapper.newGetTjPat(pacCode,pacName,pacRemark);
        DynamicDataSourceContextHolder.clearDataSourceType();
        return AjaxResult.success(maps);
    }
ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjCustomerController.java
@@ -18,6 +18,7 @@
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.apache.ibatis.annotations.Param;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.util.DigestUtils;
import org.springframework.web.bind.annotation.*;
@@ -65,8 +66,10 @@
    @GetMapping("/newGetTjPat")
    @ApiOperation(value = "查询his数据库返回新的数据")
    public AjaxResult newGetTjPat() {
        List<Map<String, Object>> maps = testMapper.newGetTjPat();
    public AjaxResult newGetTjPat(@RequestParam(required = false)String pacCode,
                                  @RequestParam(required = false)String pacName,
                                  @RequestParam(required = false)String pacRemark) {
        List<Map<String, Object>> maps = testMapper.newGetTjPat(pacCode,pacName,pacRemark);
        DynamicDataSourceContextHolder.clearDataSourceType();
        return AjaxResult.success(maps);
    }
@@ -108,24 +111,24 @@
                    if(null==ltkjTjPat){
                        tjvLtkjvtjpatService.save(tjPatByIdCard);
                    }
                }
                DynamicDataSourceContextHolder.clearDataSourceType();
                //再根据身份证号写customer表
                TjCustomer tjCustomer = tjCustomerService.getTjCustomerByCusIdCard(cusIdcard);
                if(null == tjCustomer){
                    testMapper.getTjPatByCusId(cusIdcard);
                    LambdaQueryWrapper<TjCustomer> qw = new LambdaQueryWrapper<>();
                    qw.eq(TjCustomer::getCusIdcard, cusIdcard);
                    TjCustomer customer = tjCustomerService.getOne(qw);
                    customer.setReservationId(customer.getCardId());
                    extracted(customer);
                    return success(customer);
                }else {
                    tjCustomer.setReservationId(tjCustomer.getCardId());
                    extracted(tjCustomer);
                    return success(tjCustomer);
                }
                    DynamicDataSourceContextHolder.clearDataSourceType();
                    //再根据身份证号写customer表
                    TjCustomer tjCustomer = tjCustomerService.getTjCustomerByCusIdCard(cusIdcard);
                    if(null == tjCustomer){
                        testMapper.getTjPatByCusId(cusIdcard);
                        LambdaQueryWrapper<TjCustomer> qw = new LambdaQueryWrapper<>();
                        qw.eq(TjCustomer::getCusIdcard, cusIdcard);
                        TjCustomer customer = tjCustomerService.getOne(qw);
                        customer.setReservationId(customer.getCardId());
                        extracted(customer);
                        return success(customer);
                    }else {
                        tjCustomer.setReservationId(tjCustomer.getCardId());
                        extracted(tjCustomer);
                        return success(tjCustomer);
                    }
                }
            }
            //end====2023.12.12
            LambdaQueryWrapper<TjReservation> wq = new LambdaQueryWrapper<>();
ltkj-hosp/src/main/java/com/ltkj/hosp/mapper/TestMapper.java
@@ -44,11 +44,24 @@
    public List<LtkjTjPat> getTjPat();
    @DataSource(value = DataSourceType.SLAVE_PACS)
    @Select("select fcard_iD xh,fcard_no pacCode,pat_name pacName,\n" +
    @Select({"<script> select fcard_iD xh,fcard_no pacCode,pat_name pacName,\n" +
            " (case when patsex_id='0' then '男' when patsex_id='1' then '女' else '未知' end )+';'+brnl detail,\n" +
            " pat_id price , mobile pacRemark\n" +
            "  from histjv_ltkjvtjpat")
    public List<Map<String,Object>> newGetTjPat();
            " pat_id price , mobile pacRemark" +
            "  from histjv_ltkjvtjpat where 1=1 "+
            " <when test='pacCode!=null'>" +
            "  AND fcard_no = #{pacCode}" +
            "</when>" +
            " <when test='pacName!=null'>" +
            "  AND pat_name = #{pacName}" +
            "</when>" +
            " <when test='pacRemark!=null'>" +
            "  AND mobile = #{pacRemark}" +
            "</when>" +
            "</script>"})
    public List<Map<String,Object>> newGetTjPat(@Param("pacCode")String pacCode,
                                                @Param("pacName")String pacName,
                                                @Param("pacRemark")String pacRemark);
    @DataSource(value = DataSourceType.SLAVE_HIS)
    @Select("SELECT * FROM histjv_LTKJVTJPAT where Ltrim(Rtrim(fcard_no)) = #{id} or Ltrim(Rtrim(fcard_id))=#{id} ")