ltkj-admin/src/main/java/com/ltkj/web/controller/api/DefaultController.java
@@ -4,6 +4,8 @@ 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.mapper.TjCustomerMapper; import com.ltkj.web.controller.system.TjCheckController; import com.ltkj.web.controller.system.TjReportController; import org.springframework.beans.factory.annotation.Autowired; @@ -29,6 +31,8 @@ private TjReportController tjReportController; @Autowired private TjCheckController tjCheckController; @Autowired private TjCustomerMapper tjCustomerMapper; /** * 提供给三方调用的报告查看接口 @@ -55,6 +59,20 @@ return JSONUtil.toBean(entries, AjaxResult.class); } /** * 根据身份证号查询返回体检记录:包含姓名、身份证号、性别、出生日期、年龄、体检号、联系电话,体检日期,报告状态 * @param json * @return */ @PostMapping("/getInfo") public AjaxResult getInfo(@RequestBody String json){ JSONObject entries = JSONUtil.parseObj(json); String card = entries.getStr("card"); // TjCustomer customer = tjCustomerMapper.getCusInfo(card); List<TjCustomer> customer = tjCustomerMapper.getCusInfoList(card); return AjaxResult.success(customer); } public static void removeNullFields(JSONObject jsonObject) { ArrayList<String> strings = new ArrayList<>(); strings.add("orderId"); ltkj-admin/src/main/java/com/ltkj/web/controller/system/DictSfxmController.java
@@ -55,14 +55,15 @@ // @PreAuthorize("@ss.hasPermi('system:sfxm:list')") @PostMapping("/list") @ApiOperation(value = "查询") public TableDataInfo list(@RequestBody DictSfxm dictSfxm) { startPage(); public AjaxResult list(@RequestBody DictSfxm dictSfxm) { // startPage(); String pym = dictSfxm.getPym(); if(null !=pym && !pym.isEmpty()) { pym=dictSfxm.getPym().toUpperCase(Locale.ROOT); dictSfxm.setPym(pym); } List<DictSfxm> list = dictSfxmService.selectDictSfxmList(dictSfxm); // List<DictSfxm> list = dictSfxmService.selectDictSfxmList(dictSfxm); List<DictSfxm> list = dictSfxmService.selectDictSfxmListLimit(dictSfxm, (dictSfxm.getPageNum() - 1) * dictSfxm.getPageSize(), dictSfxm.getPageSize()); if (null != list && !list.isEmpty()) { for (DictSfxm sfxm : list) { DictHosp hosp = dictHospService.getById(sfxm.getYqid()); @@ -71,7 +72,9 @@ } } } return getDataTable(list); Integer count = dictSfxmService.selectDictSfxmListCount(dictSfxm); return AjaxResult.success().put("rows",list).put("total",count); // return getDataTable(list); } /** ltkj-hosp/src/main/java/com/ltkj/hosp/domain/DictSfxm.java
@@ -257,6 +257,12 @@ @ApiModelProperty(value = "项目子集") private List<DictSfxm> dictSfxms; @TableField(exist = false) private Integer pageNum; @TableField(exist = false) private Integer pageSize; ltkj-hosp/src/main/java/com/ltkj/hosp/mapper/DictSfxmMapper.java
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.ltkj.hosp.domain.DictSfxm; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Select; import java.util.List; @@ -32,6 +33,10 @@ */ public List<DictSfxm> selectDictSfxmList(DictSfxm dictSfxm); List<DictSfxm> selectDictSfxmListLimit(@Param("dictSfxm") DictSfxm dictSfxm, @Param("page") Integer page, @Param("size") Integer size); Integer selectDictSfxmListCount(@Param("dictSfxm") DictSfxm dictSfxm); /** * 新增收费项目 * ltkj-hosp/src/main/java/com/ltkj/hosp/mapper/TjCustomerMapper.java
@@ -104,4 +104,8 @@ List<Map<String, Object>> vcustomerlist(@Param("name")String name, @Param("sjh")String sjh, @Param("sfzh") String sfzh); List<TjCustomer> getcusList(TjCustomer tjCustomer); TjCustomer getCusInfo(@Param("card") String card); List<TjCustomer> getCusInfoList(String card); } ltkj-hosp/src/main/java/com/ltkj/hosp/service/IDictSfxmService.java
@@ -28,6 +28,10 @@ */ public List<DictSfxm> selectDictSfxmList(DictSfxm dictSfxm); List<DictSfxm> selectDictSfxmListLimit(DictSfxm dictSfxm, Integer page, Integer size); Integer selectDictSfxmListCount(DictSfxm dictSfxm); /** * 新增收费项目 * ltkj-hosp/src/main/java/com/ltkj/hosp/service/impl/DictSfxmServiceImpl.java
@@ -43,6 +43,16 @@ return dictSfxmMapper.selectDictSfxmList(dictSfxm); } @Override public List<DictSfxm> selectDictSfxmListLimit(DictSfxm dictSfxm,Integer page,Integer size) { return dictSfxmMapper.selectDictSfxmListLimit(dictSfxm,page,size); } @Override public Integer selectDictSfxmListCount(DictSfxm dictSfxm) { return dictSfxmMapper.selectDictSfxmListCount(dictSfxm); } /** * 新增收费项目 * ltkj-hosp/src/main/resources/mapper/TjCustomerMapper.xml
@@ -251,4 +251,61 @@ and deleted =0 </where> </select> <select id="getCusInfo" resultType="com.ltkj.hosp.domain.TjCustomer"> SELECT c.cus_name as name, c.cus_idcard as card, CASE c.cus_sex WHEN 0 THEN '男' WHEN 1 THEN '女' ELSE '未知' END AS sex, c.cus_brithday as csrq, o.tj_number as tjNum, c.cus_phone as phone, o.create_time as time, TIMESTAMPDIFF(YEAR, c.cus_brithday, CURDATE()) - CASE WHEN MONTH(c.cus_brithday) > MONTH(CURDATE()) OR (MONTH(c.cus_brithday) = MONTH(CURDATE()) AND DAY(c.cus_brithday) > DAY(CURDATE())) THEN 1 ELSE 0 END AS age FROM tj_order o JOIN tj_customer c ON o.user_id = c.cus_id WHERE c.cus_idcard = #{card} ORDER BY o.create_time DESC LIMIT 1 </select> <select id="getCusInfoList" resultType="com.ltkj.hosp.domain.TjCustomer"> SELECT c.cus_name as name, c.cus_idcard as card, CASE c.cus_sex WHEN 0 THEN '男' WHEN 1 THEN '女' ELSE '未知' END AS sex, c.cus_brithday as csrq, o.tj_number as tjNum, c.cus_phone as phone, o.create_time as time, TIMESTAMPDIFF(YEAR, c.cus_brithday, CURDATE()) - CASE WHEN MONTH(c.cus_brithday) > MONTH(CURDATE()) OR (MONTH(c.cus_brithday) = MONTH(CURDATE()) AND DAY(c.cus_brithday) > DAY(CURDATE())) THEN 1 ELSE 0 END AS age FROM tj_order o JOIN tj_customer c ON o.user_id = c.cus_id WHERE c.cus_idcard = #{card} ORDER BY o.create_time DESC </select> </mapper> ltkj-hosp/src/main/resources/mapper/hosp/DictSfxmMapper.xml
@@ -156,6 +156,210 @@ <include refid="selectDictSfxmVo"/> where id = #{id} </select> <select id="selectDictSfxmListLimit" resultType="com.ltkj.hosp.domain.DictSfxm"> <include refid="selectDictSfxmVo"/> <where> <if test="dictSfxm.yqid != null and dictSfxm.yqid != ''"> and yqid = #{dictSfxm.yqid} </if> <if test="dictSfxm.xmid != null and dictSfxm.xmid != ''"> and xmid = #{dictSfxm.xmid} </if> <if test="dictSfxm.xmbm != null and dictSfxm.xmbm != ''"> and xmbm = #{dictSfxm.xmbm} </if> <if test="dictSfxm.xmmc != null and dictSfxm.xmmc != ''"> and xmmc like CONCAT("%",#{dictSfxm.xmmc},"%") </if> <if test="dictSfxm.pym != null and dictSfxm.pym != ''"> and pym like CONCAT("%",#{dictSfxm.pym},"%") </if> <if test="dictSfxm.wbm != null and dictSfxm.wbm != ''"> and wbm like CONCAT("%",#{dictSfxm.wbm},"%") </if> <if test="dictSfxm.zjm != null and dictSfxm.zjm != ''"> and zjm = #{zjm} </if> <if test="dictSfxm.dw != null and dictSfxm.dw != ''"> and dw = #{dictSfxm.dw} </if> <if test="dictSfxm.ksxmfl != null and dictSfxm.ksxmfl != ''"> and Ksxmfl = #{dictSfxm.ksxmfl} </if> <if test="dictSfxm.xxxmfl != null and dictSfxm.xxxmfl != ''"> and xxxmfl = #{dictSfxm.xxxmfl} </if> <if test="dictSfxm.cwxmfl != null and dictSfxm.cwxmfl != ''"> and cwxmfl = #{dictSfxm.cwxmfl} </if> <if test="dictSfxm.yjxmfl != null and dictSfxm.yjxmfl != ''"> and yjxmfl = #{dictSfxm.yjxmfl} </if> <if test="dictSfxm.gkfl != null and dictSfxm.gkfl != ''"> and gkfl = #{dictSfxm.gkfl} </if> <if test="dictSfxm.yzfl != null and dictSfxm.yzfl != ''"> and yzfl = #{dictSfxm.yzfl} </if> <if test="dictSfxm.fpfl != null and dictSfxm.fpfl != ''"> and fpfl = #{dictSfxm.fpfl} </if> <if test="dictSfxm.ckdj != null "> and ckdj = #{dictSfxm.ckdj} </if> <if test="dictSfxm.sxh != null "> and sxh = #{dictSfxm.sxh} </if> <if test="dictSfxm.sfsf != null "> and sfsf = #{dictSfxm.sfsf} </if> <if test="dictSfxm.ybxmdj != null and dictSfxm.ybxmdj != ''"> and ybxmdj = #{dictSfxm.ybxmdj} </if> <if test="dictSfxm.gjxmdm != null and dictSfxm.gjxmdm != ''"> and gjxmdm = #{dictSfxm.gjxmdm} </if> <if test="dictSfxm.gjxmmc != null and dictSfxm.gjxmmc != ''"> and gjxmmc = #{dictSfxm.gjxmmc} </if> <if test="dictSfxm.sjxmdm != null and dictSfxm.sjxmdm != ''"> and sjxmdm = #{dictSfxm.sjxmdm} </if> <if test="dictSfxm.sjxmmc != null and dictSfxm.sjxmmc != ''"> and sjxmmc = #{dictSfxm.sjxmmc} </if> <if test="dictSfxm.xmnr != null and dictSfxm.xmnr != ''"> and xmnr = #{dictSfxm.xmnr} </if> <if test="dictSfxm.xmsm != null and dictSfxm.xmsm != ''"> and xmsm = #{dictSfxm.xmsm} </if> <if test="dictSfxm.deleted != null "> and deleted = #{dictSfxm.deleted} </if> <if test="dictSfxm.yjzgxj != null "> and yjzgxj = #{dictSfxm.yjzgxj} </if> <if test="dictSfxm.ejzgxj != null "> and ejzgxj = #{dictSfxm.ejzgxj} </if> <if test="dictSfxm.sjzgxj != null "> and sjzgxj = #{dictSfxm.sjzgxj} </if> <if test="dictSfxm.xmnh != null and dictSfxm.xmnh != ''"> and xmnh = #{dictSfxm.xmnh} </if> <if test="dictSfxm.xmfl != null and dictSfxm.xmfl != ''"> and xmfl = #{dictSfxm.xmfl} </if> <if test="dictSfxm.tdzgxj != null "> and tdzgxj = #{dictSfxm.tdzgxj} </if> </where> LIMIT #{page},#{size} </select> <select id="selectDictSfxmListCount" resultType="java.lang.Integer"> select count(1) from dict_sfxm <where> <if test="dictSfxm.yqid != null and dictSfxm.yqid != ''"> and yqid = #{dictSfxm.yqid} </if> <if test="dictSfxm.xmid != null and dictSfxm.xmid != ''"> and xmid = #{dictSfxm.xmid} </if> <if test="dictSfxm.xmbm != null and dictSfxm.xmbm != ''"> and xmbm = #{dictSfxm.xmbm} </if> <if test="dictSfxm.xmmc != null and dictSfxm.xmmc != ''"> and xmmc like CONCAT("%",#{dictSfxm.xmmc},"%") </if> <if test="dictSfxm.pym != null and dictSfxm.pym != ''"> and pym like CONCAT("%",#{dictSfxm.pym},"%") </if> <if test="dictSfxm.wbm != null and dictSfxm.wbm != ''"> and wbm like CONCAT("%",#{dictSfxm.wbm},"%") </if> <if test="dictSfxm.zjm != null and dictSfxm.zjm != ''"> and zjm = #{zjm} </if> <if test="dictSfxm.dw != null and dictSfxm.dw != ''"> and dw = #{dictSfxm.dw} </if> <if test="dictSfxm.ksxmfl != null and dictSfxm.ksxmfl != ''"> and Ksxmfl = #{dictSfxm.ksxmfl} </if> <if test="dictSfxm.xxxmfl != null and dictSfxm.xxxmfl != ''"> and xxxmfl = #{dictSfxm.xxxmfl} </if> <if test="dictSfxm.cwxmfl != null and dictSfxm.cwxmfl != ''"> and cwxmfl = #{dictSfxm.cwxmfl} </if> <if test="dictSfxm.yjxmfl != null and dictSfxm.yjxmfl != ''"> and yjxmfl = #{dictSfxm.yjxmfl} </if> <if test="dictSfxm.gkfl != null and dictSfxm.gkfl != ''"> and gkfl = #{dictSfxm.gkfl} </if> <if test="dictSfxm.yzfl != null and dictSfxm.yzfl != ''"> and yzfl = #{dictSfxm.yzfl} </if> <if test="dictSfxm.fpfl != null and dictSfxm.fpfl != ''"> and fpfl = #{dictSfxm.fpfl} </if> <if test="dictSfxm.ckdj != null "> and ckdj = #{dictSfxm.ckdj} </if> <if test="dictSfxm.sxh != null "> and sxh = #{dictSfxm.sxh} </if> <if test="dictSfxm.sfsf != null "> and sfsf = #{dictSfxm.sfsf} </if> <if test="dictSfxm.ybxmdj != null and dictSfxm.ybxmdj != ''"> and ybxmdj = #{dictSfxm.ybxmdj} </if> <if test="dictSfxm.gjxmdm != null and dictSfxm.gjxmdm != ''"> and gjxmdm = #{dictSfxm.gjxmdm} </if> <if test="dictSfxm.gjxmmc != null and dictSfxm.gjxmmc != ''"> and gjxmmc = #{dictSfxm.gjxmmc} </if> <if test="dictSfxm.sjxmdm != null and dictSfxm.sjxmdm != ''"> and sjxmdm = #{dictSfxm.sjxmdm} </if> <if test="dictSfxm.sjxmmc != null and dictSfxm.sjxmmc != ''"> and sjxmmc = #{dictSfxm.sjxmmc} </if> <if test="dictSfxm.xmnr != null and dictSfxm.xmnr != ''"> and xmnr = #{dictSfxm.xmnr} </if> <if test="dictSfxm.xmsm != null and dictSfxm.xmsm != ''"> and xmsm = #{dictSfxm.xmsm} </if> <if test="dictSfxm.deleted != null "> and deleted = #{dictSfxm.deleted} </if> <if test="dictSfxm.yjzgxj != null "> and yjzgxj = #{dictSfxm.yjzgxj} </if> <if test="dictSfxm.ejzgxj != null "> and ejzgxj = #{dictSfxm.ejzgxj} </if> <if test="dictSfxm.sjzgxj != null "> and sjzgxj = #{dictSfxm.sjzgxj} </if> <if test="dictSfxm.xmnh != null and dictSfxm.xmnh != ''"> and xmnh = #{dictSfxm.xmnh} </if> <if test="dictSfxm.xmfl != null and dictSfxm.xmfl != ''"> and xmfl = #{dictSfxm.xmfl} </if> <if test="dictSfxm.tdzgxj != null "> and tdzgxj = #{dictSfxm.tdzgxj} </if> </where> </select> <insert id="insertDictSfxm" parameterType="DictSfxm" useGeneratedKeys="true" keyProperty="id">