ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjDiscardInspectionController.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjHomePageController.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjHzLogController.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
ltkj-admin/src/main/resources/application.yml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
ltkj-hosp/src/main/java/com/ltkj/hosp/domain/TjOrder.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
ltkj-hosp/src/main/java/com/ltkj/hosp/dto/TjChartVo.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
ltkj-hosp/src/main/resources/mapper/hosp/TjDiscardInspectionMapper.xml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
ltkj-hosp/src/main/resources/mapper/mall/MallOrderMapper.xml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjDiscardInspectionController.java
@@ -2,19 +2,23 @@ import java.util.List; import cn.hutool.core.date.DateUtil; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.ltkj.framework.config.MatchUtils; import com.ltkj.hosp.domain.TjCustomer; import com.ltkj.hosp.domain.TjOrder; import com.ltkj.hosp.service.ITjOrderDetailService; import com.ltkj.hosp.service.ITjOrderService; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.*; import com.ltkj.common.core.controller.BaseController; import com.ltkj.common.core.domain.AjaxResult; import com.ltkj.hosp.domain.TjDiscardInspection; import com.ltkj.hosp.service.ITjDiscardInspectionService; import com.ltkj.common.core.page.TableDataInfo; import javax.annotation.Resource; /** * 弃检Controller @@ -28,30 +32,71 @@ @Autowired private ITjDiscardInspectionService tjDiscardInspectionService; /** * 查询弃检列表 */ //@PreAuthorize("@ss.hasPermi('hosp:inspection:list')") @GetMapping("/list") @Resource private ITjOrderService tjOrderService; @Resource private ITjOrderDetailService tjOrderDetailService; /** * 查询弃检列表 */ @GetMapping("/list") public TableDataInfo list(TjDiscardInspection tjDiscardInspection) { startPage(); List<TjDiscardInspection> list = tjDiscardInspectionService.selectTjDiscardInspectionList(tjDiscardInspection); if(null !=list && list.size()>0){ for (TjDiscardInspection discardInspection : list) { discardInspection.setCusName(MatchUtils.hideCusName(discardInspection.getCusName())); if (null != list && list.size() > 0) { for (TjDiscardInspection discardInspection : list) { discardInspection.setCusName(MatchUtils.hideCusName(discardInspection.getCusName())); } } } return getDataTable(list); } /** * 获取弃检详细信息 */ // @PreAuthorize("@ss.hasPermi('hosp:inspection:query')") @GetMapping(value = "/{id}") public AjaxResult getInfo(@PathVariable("id") Long id) { return success(tjDiscardInspectionService.selectTjDiscardInspectionById(id)); } /** * 恢复弃检 */ @PostMapping("/recall") public AjaxResult recall(@RequestBody List<TjDiscardInspection> tjDiscardInspection) { for (TjDiscardInspection discardInspection : tjDiscardInspection) { //判断是否审核 LambdaQueryWrapper<TjOrder> wq = new LambdaQueryWrapper<>(); wq.eq(TjOrder::getTjNumber,discardInspection.getTjNum()); final TjOrder one = tjOrderService.getOne(wq); if (one==null){ return error("无该体检号"); } if (one.getStatus()==301){ return error("初审已通过,不可撤回"); }else if (one.getStatus()==401){ return error("总检已通过,不可撤回"); }else if (one.getStatus()==402){ return error("报告已发布,不可撤回"); } if (one.getHeshouStatus()==1){ return error("报告已核收,不可撤回"); } if (one.getCheckStatus()==1){ return error("总检已审核,不可撤回"); } //删除弃检记录 final boolean b = tjDiscardInspectionService.removeById(discardInspection.getId()); if(b){ //将签离状态改回已签到 one.setStatus(201); tjOrderService.updateById(one); } } return success("撤回成功"); } } ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjHomePageController.java
@@ -9,6 +9,7 @@ import com.ltkj.common.core.redis.RedisCache; import com.ltkj.common.utils.DateUtils; import com.ltkj.hosp.domain.*; import com.ltkj.hosp.dto.TjChartVo; import com.ltkj.hosp.service.*; import com.ltkj.hosp.vodomain.*; import com.ltkj.system.service.ISysDeptService; @@ -16,10 +17,12 @@ import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; import io.swagger.models.auth.In; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; import java.math.BigDecimal; import java.text.DateFormat; import java.text.ParseException; import java.text.SimpleDateFormat; @@ -53,6 +56,9 @@ private ISysUserService userService; @Resource private ITjOrderRemarkService remarkService; @Resource private ITjFlowingWaterService tjFlowingWaterService; @GetMapping("/GetChartByDate") @@ -641,4 +647,116 @@ public Integer RegisterToday() { return orderService.count(new QueryWrapper<TjOrder>().between("create_time", DateUtil.beginOfDay(new Date()), DateUtil.endOfDay(new Date()))); } @GetMapping("/getChartByDeptId") @ApiOperation("根据部门查询体检统计") public AjaxResult getChartByDeptId(@RequestParam Long deptId, @ApiParam(value = "开始时间") @RequestParam(required = false) String beginTime, @ApiParam(value = "结束时间") @RequestParam(required = false) String endTime) { List<TjChartVo> res=new ArrayList(); LambdaQueryWrapper<TjOrderRemark> wq0 = new LambdaQueryWrapper<>(); wq0.eq(TjOrderRemark::getDeptId, deptId); List<TjOrderRemark> remarkList = remarkService.list(wq0); List<Long> proIdList = remarkList.stream().map(TjOrderRemark::getProId).distinct().collect(Collectors.toList()); for (Long aLong : proIdList) { LambdaQueryWrapper<TjOrderRemark> wq00 = new LambdaQueryWrapper<>(); wq00.eq(TjOrderRemark::getDeptId, deptId); List<TjOrderRemark> remarkList1 = remarkService.list(wq00); Integer num1=0; Integer num2=0; Integer num3=0; Integer num4=0; TjChartVo chartVo=new TjChartVo(); chartVo.setDeptId(deptId); chartVo.setDeptName(deptService.getById(deptId).getDeptName()); for (TjOrderRemark tjOrderRemark : remarkList1) { if (tjOrderRemark.getType()==1){ num1+=1; }else if (tjOrderRemark.getType()==0){ num1+=1; }else if (tjOrderRemark.getType()==3){ num1+=1; }else if (tjOrderRemark.getType()==2){ num1+=1; } } chartVo.setYijianNum(String.valueOf(num1)); chartVo.setWeijianNum(String.valueOf(num2)); chartVo.setYanqiNum(String.valueOf(num3)); chartVo.setQijianNum(String.valueOf(num4)); res.add(chartVo); } return AjaxResult.success(res); } @GetMapping("/getTiaoByDeptId") @ApiOperation("根据部门和时间段查询体检统计图表") public AjaxResult getTiaoByDeptId(@RequestParam Long deptId, @ApiParam(value = "开始时间") @RequestParam(required = false) String beginTime, @ApiParam(value = "结束时间") @RequestParam(required = false) String endTime) { return AjaxResult.success(); } @GetMapping("/getTiaoNumsByDate") @ApiOperation("根据时间查询体检统计图表") public AjaxResult getTiaoNumsByDate(@ApiParam(value = "开始时间")String beginTime, @ApiParam(value = "结束时间") String endTime) { TjChartVo chartVo=new TjChartVo(); LambdaQueryWrapper<TjOrder> wqq = new LambdaQueryWrapper<>(); wqq.gt(TjOrder::getStatus,200); if (null != beginTime && null != endTime) { wqq.between(TjOrder::getCreateTime, beginTime, endTime); } final List<TjOrder> list = orderService.list(wqq); chartVo.setTijianNum(list.size()); Integer boys=0; Integer girls=0; Integer person=0; Integer tuan=0; BigDecimal shouyi=new BigDecimal(0); for (TjOrder tjOrder : list) { final TjCustomer byId = customerService.getById(tjOrder.getUserId()); if (byId.getCusSex()==0){ boys+=1; }else if (byId.getCusSex()==1){ girls+=1; } if ("2".equals(tjOrder.getTjType())){ person+=1; } else if ("1".equals(tjOrder.getTjType())) { tuan+=1; } //计算收益 LambdaQueryWrapper<TjFlowingWater> wqqq=new LambdaQueryWrapper<>(); wqqq.eq(TjFlowingWater::getOrderId,tjOrder.getOrderId()); final List<TjFlowingWater> list1 = tjFlowingWaterService.list(wqqq); for (TjFlowingWater tjFlowingWater : list1) { shouyi.add(tjFlowingWater.getPaidIn()); } } chartVo.setBoysNum(boys); chartVo.setGirlsNum(girls); chartVo.setPersonNum(person); chartVo.setTuanDuiNum(tuan); chartVo.setMoneysNum(shouyi); return AjaxResult.success(chartVo); } @GetMapping("/getListByTjNumber") @ApiOperation("根据体检号下的项目列表") public AjaxResult getListByTjNumber(@RequestParam String tjNumber) { LambdaQueryWrapper<TjOrderRemark> wq0 = new LambdaQueryWrapper<>(); wq0.eq(TjOrderRemark::getTjNumber, tjNumber); List<TjOrderRemark> remarkList = remarkService.list(wq0); return AjaxResult.success(remarkList); } } ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjHzLogController.java
@@ -154,6 +154,17 @@ @Log(title = "会诊申请记录 ", businessType = BusinessType.UPDATE) @PutMapping public AjaxResult edit(@RequestBody TjHzLog tjHzLog) { if (tjHzLog.getHzDeptIdList() != null) { StringBuilder str = new StringBuilder(); for (int i = 0; i < tjHzLog.getHzDeptIdList().size(); i++) { str = str.append(tjHzLog.getHzDeptIdList().get(i)); if (i != tjHzLog.getHzDeptIdList().size() - 1) { str = str.append(","); } } tjHzLog.setHzDeptId(String.valueOf(str)); } return toAjax(tjHzLogService.saveOrUpdate(tjHzLog)); } @@ -161,8 +172,8 @@ * 删除会诊申请记录 */ @Log(title = "会诊申请记录 ", businessType = BusinessType.DELETE) @DeleteMapping("/{ids}") public AjaxResult remove(@PathVariable Long[] ids) { @DeleteMapping("/remove") public AjaxResult remove(@RequestBody Long[] ids) { return toAjax(tjHzLogService.removeByIds(Arrays.asList(ids))); } ltkj-admin/src/main/resources/application.yml
@@ -204,13 +204,13 @@ #key-path: E:\mycode\apppwd\1643225121_20230427_cert\apiclient_cert.p12 #本地证书路径,在微信商户后台下载 key-path: D:\WXCertUtil\tjcert\apiclient_cert.p12 #服务器证书路径,在微信商户后台下载 # pay-score-notify-url: http://192.168.0.101:5011/cus/order/pay-notify #微信支付回调地址 pay-score-notify-url: https://ltpeis.xaltjdkj.cn:5011/ltkj-admin/cus/order/pay-notify #微信支付回调地址 # pay-score-notify-url: https://ltpeis.xaltjdkj.cn:5021/ltkj-admin/cus/order/pay-notify #微信支付回调地址 # pay-score-notify-url: https://ltpeis.xaltjdkj.cn:5011/ltkj-admin/cus/order/pay-notify #微信支付回调地址 pay-score-notify-url: https://ltpeis.xaltjdkj.cn:5021/ltkj-admin/cus/order/pay-notify #微信支付回调地址 #积木报表访问地址 jimu: path: https://ltpeis.xaltjdkj.cn:5011/ltkj-admin # path: https://ltpeis.xaltjdkj.cn:5021/ltkj-admin # path: https://ltpeis.xaltjdkj.cn:5011/ltkj-admin path: https://ltpeis.xaltjdkj.cn:5021/ltkj-admin # path: http://192.168.0.99:8080/ltkj-admin # path: http://192.168.0.99:8081/ltkj-admin # path: http://192.168.0.101:5011 ltkj-hosp/src/main/java/com/ltkj/hosp/domain/TjOrder.java
@@ -413,6 +413,12 @@ @ApiModelProperty(value = "有无会诊") private Integer isHz; /** * 报告领取方式 */ @ApiModelProperty(value = "报告领取方式") private String getType; @Override public String toString() { ltkj-hosp/src/main/java/com/ltkj/hosp/dto/TjChartVo.java
New file @@ -0,0 +1,29 @@ package com.ltkj.hosp.dto; import lombok.Data; import java.math.BigDecimal; /** * @Company: 西安路泰科技有限公司 * @Author: lige * @Date: 2023/11/30 15:38 */ @Data public class TjChartVo { private Long deptId; //部门号 private String deptName; //部门名 private String yijianNum; //已检人数 private String weijianNum; //未检人数 private String yanqiNum; //延期人数 private String qijianNum; //弃检人数 private Integer tijianNum; //体检人数 private Integer boysNum; //男人数 private Integer girlsNum; //女人数 private BigDecimal moneysNum; //收入 private Integer personNum; //个检 private Integer tuanDuiNum; //团队 } ltkj-hosp/src/main/resources/mapper/hosp/TjDiscardInspectionMapper.xml
@@ -5,148 +5,162 @@ <mapper namespace="com.ltkj.hosp.mapper.TjDiscardInspectionMapper"> <resultMap type="TjDiscardInspection" id="TjDiscardInspectionResult"> <result property="id" column="id"/> <result property="deleted" column="deleted"/> <result property="createBy" column="create_by"/> <result property="createTime" column="create_time"/> <result property="updateBy" column="update_by"/> <result property="updateTime" column="update_time"/> <result property="tjNum" column="tj_num"/> <result property="cusId" column="cus_id"/> <result property="cusName" column="cus_name"/> <result property="registrationTime" column="registration_time"/> <result property="proId" column="pro_id"/> <result property="proName" column="pro_name"/> <result property="id" column="id"/> <result property="deleted" column="deleted"/> <result property="createBy" column="create_by"/> <result property="createTime" column="create_time"/> <result property="updateBy" column="update_by"/> <result property="updateTime" column="update_time"/> <result property="tjNum" column="tj_num"/> <result property="cusId" column="cus_id"/> <result property="cusName" column="cus_name"/> <result property="registrationTime" column="registration_time"/> <result property="proId" column="pro_id"/> <result property="proName" column="pro_name"/> </resultMap> <sql id="selectTjDiscardInspectionVo"> select id, deleted, create_by, create_time, update_by, update_time, tj_num, cus_id, cus_name, registration_time, pro_id, pro_name select id, deleted, create_by, create_time, update_by, update_time, tj_num, cus_id, cus_name, registration_time, pro_id, pro_name from tj_discard_inspection </sql> <select id="selectTjDiscardInspectionList" parameterType="TjDiscardInspection" resultMap="TjDiscardInspectionResult"> <select id="selectTjDiscardInspectionList" parameterType="TjDiscardInspection" resultMap="TjDiscardInspectionResult"> <include refid="selectTjDiscardInspectionVo"/> <where> <if test="tjNum != null and tjNum != ''"> and tj_num = #{tjNum} </if> <if test="cusName != null and cusName != ''"> and cus_name like concat('%', #{cusName}, '%') </if> <if test="registrationTime != null "> and registration_time = #{registrationTime} </if> <if test="proName != null and proName != ''"> and pro_name like concat('%', #{proName}, '%') </if> <if test="tjNum != null and tjNum != ''"> and tj_num = #{tjNum} </if> <if test="cusName != null and cusName != ''"> and cus_name like concat('%', #{cusName}, '%') </if> <if test="registrationTime != null "> and registration_time = #{registrationTime} </if> <if test="proName != null and proName != ''"> and pro_name like concat('%', #{proName}, '%') </if> and deleted=0 </where> </select> <select id="selectTjDiscardInspectionById" parameterType="Long" resultMap="TjDiscardInspectionResult"> <include refid="selectTjDiscardInspectionVo"/> where id = #{id} <include refid="selectTjDiscardInspectionVo"/> where id = #{id} </select> <insert id="insertTjDiscardInspection" parameterType="TjDiscardInspection"> insert into tj_discard_inspection <trim prefix="(" suffix=")" suffixOverrides=","> <if test="id != null">id, </if> <if test="deleted != null">deleted, </if> <if test="createBy != null">create_by, </if> <if test="createTime != null">create_time, </if> <if test="updateBy != null">update_by, </if> <if test="updateTime != null">update_time, </if> <if test="tjNum != null">tj_num, </if> <if test="cusId != null">cus_id, </if> <if test="cusName != null">cus_name, </if> <if test="registrationTime != null">registration_time, </if> <if test="proId != null">pro_id, </if> <if test="proName != null">pro_name, </if> <if test="id != null">id, </if> <if test="deleted != null">deleted, </if> <if test="createBy != null">create_by, </if> <if test="createTime != null">create_time, </if> <if test="updateBy != null">update_by, </if> <if test="updateTime != null">update_time, </if> <if test="tjNum != null">tj_num, </if> <if test="cusId != null">cus_id, </if> <if test="cusName != null">cus_name, </if> <if test="registrationTime != null">registration_time, </if> <if test="proId != null">pro_id, </if> <if test="proName != null">pro_name, </if> </trim> <trim prefix="values (" suffix=")" suffixOverrides=","> <if test="id != null">#{id}, </if> <if test="deleted != null">#{deleted}, </if> <if test="createBy != null">#{createBy}, </if> <if test="createTime != null">#{createTime}, </if> <if test="updateBy != null">#{updateBy}, </if> <if test="updateTime != null">#{updateTime}, </if> <if test="tjNum != null">#{tjNum}, </if> <if test="cusId != null">#{cusId}, </if> <if test="cusName != null">#{cusName}, </if> <if test="registrationTime != null">#{registrationTime}, </if> <if test="proId != null">#{proId}, </if> <if test="proName != null">#{proName}, </if> <if test="id != null">#{id}, </if> <if test="deleted != null">#{deleted}, </if> <if test="createBy != null">#{createBy}, </if> <if test="createTime != null">#{createTime}, </if> <if test="updateBy != null">#{updateBy}, </if> <if test="updateTime != null">#{updateTime}, </if> <if test="tjNum != null">#{tjNum}, </if> <if test="cusId != null">#{cusId}, </if> <if test="cusName != null">#{cusName}, </if> <if test="registrationTime != null">#{registrationTime}, </if> <if test="proId != null">#{proId}, </if> <if test="proName != null">#{proName}, </if> </trim> </insert> <update id="updateTjDiscardInspection" parameterType="TjDiscardInspection"> update tj_discard_inspection <trim prefix="SET" suffixOverrides=","> <if test="deleted != null">deleted = #{deleted}, </if> <if test="createBy != null">create_by = #{createBy}, </if> <if test="createTime != null">create_time = #{createTime}, </if> <if test="updateBy != null">update_by = #{updateBy}, </if> <if test="updateTime != null">update_time = #{updateTime}, </if> <if test="tjNum != null">tj_num = #{tjNum}, </if> <if test="cusId != null">cus_id = #{cusId}, </if> <if test="cusName != null">cus_name = #{cusName}, </if> <if test="registrationTime != null">registration_time = #{registrationTime}, </if> <if test="proId != null">pro_id = #{proId}, </if> <if test="proName != null">pro_name = #{proName}, </if> <if test="deleted != null">deleted = #{deleted}, </if> <if test="createBy != null">create_by = #{createBy}, </if> <if test="createTime != null">create_time = #{createTime}, </if> <if test="updateBy != null">update_by = #{updateBy}, </if> <if test="updateTime != null">update_time = #{updateTime}, </if> <if test="tjNum != null">tj_num = #{tjNum}, </if> <if test="cusId != null">cus_id = #{cusId}, </if> <if test="cusName != null">cus_name = #{cusName}, </if> <if test="registrationTime != null">registration_time = #{registrationTime}, </if> <if test="proId != null">pro_id = #{proId}, </if> <if test="proName != null">pro_name = #{proName}, </if> </trim> where id = #{id} </update> <delete id="deleteTjDiscardInspectionById" parameterType="Long"> delete from tj_discard_inspection where id = #{id} from tj_discard_inspection where id = #{id} </delete> <delete id="deleteTjDiscardInspectionByIds" parameterType="String"> ltkj-hosp/src/main/resources/mapper/mall/MallOrderMapper.xml
@@ -43,6 +43,7 @@ <result property="giftReceiveTime" column="gift_receive_time"/> <result property="deptId" column="dept_id"/> <result property="isSz" column="is_sz"/> <result property="getType" column="get_type"/> <result property="createTime" column="create_time"/> <result property="createBy" column="create_by"/> <result property="updateTime" column="update_time"/> @@ -75,6 +76,7 @@ <result property="updateTime" column="sub_update_time"/> <result property="updateBy" column="sub_update_by"/> <result property="deleted" column="sub_deleted"/> <result property="getType" column="get_type"/> </resultMap> <sql id="selectMallOrderVo"> @@ -121,7 +123,8 @@ update_time, update_by, deleted, id_card id_card, get_type from mall_order </sql> @@ -236,6 +239,9 @@ <if test="startTime != null and endTime !=null "> and create_time between #{startTime} and #{endTime} </if> <if test="getType != null "> and get_type = #{getType} </if> </where> order by update_time desc </select> @@ -285,6 +291,7 @@ a.update_time, a.update_by, a.deleted, a.get_type, b.id as sub_id, b.order_id as