| | |
| | | //@PreAuthorize("@ss.hasPermi('system:taskcall:list')") |
| | | // @Cacheable(value = "patItem", key = "T(org.springframework.util.DigestUtils).md5DigestAsHex(#serviceSubtaskVO.toString().getBytes())", unless = "#result == null or #result.isEmpty()") |
| | | @PostMapping("/patItem") |
| | | public TableDataInfo patItem(@RequestBody ServiceSubtaskVO serviceSubtaskVO) { |
| | | PageUtils.startPageByPost(serviceSubtaskVO.getPageNum(), serviceSubtaskVO.getPageSize()); |
| | | public Map<String, Object> patItem(@RequestBody ServiceSubtaskVO serviceSubtaskVO) { |
| | | serviceSubtaskVO.setPageNum(PageUtils.getOffset(serviceSubtaskVO.getPageNum(), serviceSubtaskVO.getPageSize())); |
| | | List<ServiceSubtask> serviceSubtaskList = null; |
| | | LoginUser loginUser = getLoginUser(); |
| | | SysUser user = loginUser.getUser(); |
| | |
| | | } |
| | | |
| | | // patItemCount 调用redisCache记录统计数据 |
| | | // Map<String, Object> map = patItemCount(serviceSubtaskVO); |
| | | Map<String, Object> map = serviceSubtaskService.patItemCount(serviceSubtaskVO); |
| | | map.put("serviceSubtaskList", serviceSubtaskList); |
| | | List<Map<String, Object>> list = new ArrayList<>(); |
| | | list.add(map); |
| | | //获取total |
| | | long total = PageUtils.count(new ISelect() { |
| | | @Override |
| | | public void doSelect() { |
| | | |
| | | serviceSubtaskVO.setPageNum(null); |
| | | serviceSubtaskVO.setPageSize(null); |
| | | serviceSubtaskService.patItem(serviceSubtaskVO); |
| | | } |
| | | }); |
| | | return getDataTable2(total, list); |
| | | List<ServiceSubtask> serviceSubtasks = serviceSubtaskService.patItem(serviceSubtaskVO); |
| | | |
| | | return getDataTable3(CollectionUtils.isNotEmpty(serviceSubtasks) ? serviceSubtasks.size() : 0L, list); |
| | | } |
| | | |
| | | /** |
| | |
| | | if (CollectionUtils.isEmpty(serviceSubtaskCountReq.getServiceType())) { |
| | | return error("服务类型不能为空"); |
| | | } |
| | | String followUpCountStyle = configService.selectConfigByKey("followUpCountStyle", |
| | | serviceSubtaskCountReq.getOrgid()); |
| | | String followUpCountStyle = configService.selectConfigByKey("followUpCountStyle", serviceSubtaskCountReq.getOrgid()); |
| | | if (ObjectUtils.isNotEmpty(followUpCountStyle)){ |
| | | serviceSubtaskCountReq.setFollowUpCountStyle(followUpCountStyle); |
| | | }else { |
| | |
| | | result.putIfAbsent("wzx", 0); |
| | | result.putIfAbsent("ysf", 0); |
| | | result.putIfAbsent("yc", 0); |
| | | result.putIfAbsent("jg", 0); |
| | | result.putIfAbsent("fssb", 0); |
| | | result.putIfAbsent("yfs", 0); |
| | | result.putIfAbsent("blq", 0); |
| | |
| | | SUM(CASE WHEN sendstate >= 3 OR sendstate = 1 THEN 1 ELSE 0 END) AS yfs, |
| | | SUM(CASE WHEN sendstate = 2 THEN 1 ELSE 0 END) AS dsf, |
| | | SUM(CASE WHEN sendstate = 1 THEN 1 ELSE 0 END) AS blq, |
| | | SUM(CASE WHEN excep IS NOT NULL AND excep != '0' THEN 1 ELSE 0 END) AS yc |
| | | SUM(CASE WHEN excep IS NOT NULL AND excep != '0' THEN 1 ELSE 0 END) AS yc, |
| | | SUM(CASE WHEN isabnormal IS NOT NULL AND isabnormal = 2 THEN 1 ELSE 0 END) AS jg |
| | | FROM service_subtask |
| | | where 1=1 |
| | | and del_flag = 0 |
| | |
| | | <result property="updateBy" column="update_by"/> |
| | | <result property="sort" column="sort"/> |
| | | <result property="compensateTime" column="compensate_time"/> |
| | | <result property="currentSendTime" column="current_send_time"/> |
| | | </resultMap> |
| | | |
| | | <sql id="selectServiceSubtaskPreachformVo"> |
| | |
| | | taskid, |
| | | preachform, |
| | | sendstate, |
| | | current_send_time, |
| | | remark, |
| | | orgid, |
| | | del_flag, |
| | |
| | | </if> |
| | | <if test="taskid != null "> |
| | | and taskid = #{taskid} |
| | | </if> |
| | | <if test="currentSendTime != null "> |
| | | and current_send_time = #{currentSendTime} |
| | | </if> |
| | | <if test="preachform != null and preachform != ''"> |
| | | and preachform = #{preachform} |
| | |
| | | </if> |
| | | <if test="compensateTime != null">compensate_time, |
| | | </if> |
| | | <if test="currentSendTime != null "> |
| | | current_send_time, |
| | | </if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">#{id}, |
| | |
| | | <if test="sort != null">#{sort}, |
| | | </if> |
| | | <if test="compensateTime != null">#{compensateTime}, |
| | | </if> |
| | | <if test="currentSendTime != null "> |
| | | #{currentSendTime}, |
| | | </if> |
| | | </trim> |
| | | </insert> |
| | |
| | | </if> |
| | | <if test="compensateTime != null">compensate_time = |
| | | #{compensateTime}, |
| | | </if> |
| | | <if test="currentSendTime != null "> |
| | | current_send_time = #{currentSendTime}, |
| | | </if> |
| | | </trim> |
| | | where id = #{id} |
| | |
| | | <if test="compensateTime != null">compensate_time = |
| | | #{compensateTime}, |
| | | </if> |
| | | <if test="currentSendTime != null "> |
| | | current_send_time = #{currentSendTime}, |
| | | </if> |
| | | </trim> |
| | | where 1=1 |
| | | <if test="subid != null">and subid = |
| | | #{subid} |
| | | #{subid}, |
| | | </if> |
| | | <if test="taskid != null">and taskid = |
| | | #{taskid} |
| | | #{taskid}, |
| | | </if> |
| | | <if test="preachform != null">and preachform = |
| | | #{preachform} |
| | | #{preachform}, |
| | | </if> |
| | | <if test="remark != null">and remark = |
| | | #{remark} |
| | | #{remark}, |
| | | </if> |
| | | <if test="orgid != null">and orgid = |
| | | #{orgid} |
| | | #{orgid}, |
| | | </if> |
| | | </update> |
| | | |
| | |
| | | </foreach> |
| | | </update> |
| | | |
| | | <select id="selectBySubtask" parameterType="com.smartor.domain.ServiceSubtask" resultMap="ServiceSubtaskPreachformResult"> |
| | | <select id="selectBySubtask" parameterType="com.smartor.domain.ServiceSubtask" |
| | | resultMap="ServiceSubtaskPreachformResult"> |
| | | <include refid="selectServiceSubtaskPreachformVo"/> |
| | | WHERE del_flag = 0 |
| | | <!-- 其他条件 --> |