| | |
| | | FROM ums_admin_role_relation arr |
| | | INNER JOIN `ums_role_menu_relation` AS rmr on rmr.role_id = arr.role_id |
| | | JOIN ums_menu AS m ON rmr.menu_id = m.id |
| | | WHERE arr.admin_id = #{id} |
| | | WHERE arr.admin_id = #{id} and m.hidden = false |
| | | order by m.sort |
| | | </select> |
| | | |
| | |
| | | import com.ycl.service.resources.IVideoResourcesService; |
| | | import com.ycl.utils.EasyExcelUtils; |
| | | import com.ycl.vo.casePool.QueryForViolationVO; |
| | | import com.ycl.vo.casePool.WorkOrderVO; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | |
| | | public CommonResult searchCount(@RequestBody VideoInspectParam violationParam) { |
| | | return CommonResult.success(baseCaseService.updateCase(violationParam)); |
| | | } |
| | | |
| | | @GetMapping("/work_order") |
| | | @ApiOperation("工单统计") |
| | | public CommonResult getWorkOrder(@RequestParam Integer currentPage, |
| | | @RequestParam Integer pageSize, |
| | | @RequestParam(required = false) String keyword) { |
| | | return CommonResult.success(baseCaseService.getWorkOrder(currentPage, pageSize, keyword)); |
| | | } |
| | | |
| | | @PostMapping("/work_order/export") |
| | | @ApiOperation("工单统计-导出") |
| | | public void getWorkOrderExport(HttpServletResponse response, QueryForViolationParam param) { |
| | | String sheetName = "工单数据"; |
| | | EasyExcelUtils.export(response, sheetName, WorkOrderVO.class, baseCaseService.getWorkOrderList(param.getKeyword())); |
| | | } |
| | | } |
| | |
| | | |
| | | @ApiModelProperty(value = "案件编码") |
| | | private String code; |
| | | |
| | | @ApiModelProperty(value = "关键字") |
| | | private String keyword; |
| | | } |
| | |
| | | * 部门id |
| | | */ |
| | | @TableField("depart_id") |
| | | private Integer departId; |
| | | private Long departId; |
| | | |
| | | /** |
| | | * 状态1在线0离线 |
| | |
| | | import com.ycl.dto.caseHandler.QueryForViolationParam; |
| | | import com.ycl.dto.cockpitManage.DelayDO; |
| | | import com.ycl.entity.caseHandler.BaseCase; |
| | | import com.ycl.vo.casePool.BaseCaseVO; |
| | | import com.ycl.vo.casePool.CasePoolIllegalBuildingVO; |
| | | import com.ycl.vo.casePool.CasePoolViolationVO; |
| | | import com.ycl.vo.casePool.QueryForViolationVO; |
| | | import com.ycl.vo.casePool.*; |
| | | import com.ycl.vo.cockpit.enforcementEvents.EventVO; |
| | | import com.ycl.vo.cockpit.enforcementEvents.VideoAndAreaVO; |
| | | import org.apache.ibatis.annotations.Param; |
| | |
| | | Long selectOnTimeCaseLastMonthCount(); |
| | | |
| | | Long selectOnTimeCaseRecentlyMonthCount(); |
| | | |
| | | IPage<WorkOrderVO> getWorkOrder(IPage<WorkOrderVO> page, String keyword); |
| | | } |
| | |
| | | import com.ycl.entity.caseHandler.BaseCaseDetail; |
| | | import com.ycl.vo.casePool.BaseCaseVO; |
| | | import com.ycl.vo.casePool.QueryForViolationVO; |
| | | import com.ycl.vo.casePool.WorkOrderVO; |
| | | import com.ycl.vo.cockpit.enforcementEvents.DelayVO; |
| | | import com.ycl.vo.cockpit.enforcementEvents.EventVO; |
| | | import com.ycl.vo.cockpit.enforcementEvents.VideoAndAreaVO; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Collection; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | |
| | | List<DelayVO> selectDelayList(); |
| | | |
| | | Map<String, Object> statistics(); |
| | | |
| | | IPage<WorkOrderVO> getWorkOrder(Integer current, Integer pageSize, String keyword); |
| | | |
| | | List<WorkOrderVO> getWorkOrderList(String keyword); |
| | | } |
| | |
| | | map.put("dispositionInTime", onTimeDispose); |
| | | map.put("register", register); |
| | | return map; |
| | | } |
| | | |
| | | @Override |
| | | public IPage<WorkOrderVO> getWorkOrder(Integer pageIndex, Integer pageSize, String keyword) { |
| | | if (pageIndex == null) { |
| | | pageIndex = 1; |
| | | } |
| | | if (pageSize == null) { |
| | | pageSize = 20; |
| | | } |
| | | IPage<WorkOrderVO> page = new Page<>(pageIndex, pageSize); |
| | | return baseCaseMapper.getWorkOrder(page, keyword); |
| | | } |
| | | |
| | | @Override |
| | | public List<WorkOrderVO> getWorkOrderList(String keyword) { |
| | | IPage<WorkOrderVO> page = new Page<>(1, 5000); |
| | | IPage<WorkOrderVO> page1 = baseCaseMapper.getWorkOrder(page, keyword); |
| | | return page1.getRecords(); |
| | | } |
| | | } |
| | |
| | | |
| | | try { |
| | | ImageResources imageResources = new ImageResources(); |
| | | imageResources.setType("01"); |
| | | imageResources.setType("05"); |
| | | imageResources.setBelongToId(baseCase.getId()); |
| | | imageResources.setUrl(videoAlarmReport.getPicData()); |
| | | imageResources.setCreateTime(LocalDateTime.now()); |
| | |
| | | try { |
| | | for (int i = 0; i < imgs.length; i++) { |
| | | ImageResources imageResources = new ImageResources(); |
| | | imageResources.setType("01"); |
| | | imageResources.setType("04"); |
| | | imageResources.setBelongToId(baseCase.getId()); |
| | | imageResources.setUrl(imgs[i]); |
| | | imageResources.setCreateTime(LocalDateTime.now()); |
| | |
| | | messageMapper.deleteById(savedMessage); |
| | | } |
| | | |
| | | ArrayList<Long> ids = new ArrayList<>(); |
| | | ArrayList<Message> ids = new ArrayList<>(); |
| | | message.setTargetFrom(umsAdminMapper.selectById(message.getCreateUser()).getUsername()); |
| | | if (message.getId() == null) { |
| | | for (String receive : message.getTargetTo().split(",")) { |
| | |
| | | sendMessage.setSendTime(new Date()); |
| | | sendMessage.setTargetTo(receive); |
| | | sendMessage.setSendTime(new Date()); |
| | | sendMessage.setPhoneNumber(umsAdminMapper.selectById(receive).getMobile()); |
| | | sendMessage.setPhoneNumber(message.getTargetTo()); |
| | | |
| | | if (ChannelCode.INNER.equals(message.getChannelCode())) { |
| | | sendMessage.setIsView(0); |
| | | } |
| | | this.save(sendMessage); |
| | | ids.add(sendMessage.getId()); |
| | | ids.add(sendMessage); |
| | | } |
| | | } |
| | | switch (message.getChannelCode()) { |
| | |
| | | |
| | | @SneakyThrows |
| | | @Transactional(rollbackFor = Exception.class) |
| | | void sendSMS(Message message, List<Long> mesIds) { |
| | | String[] ids = message.getTargetTo().split(","); |
| | | String[] mobiles = new String[ids.length]; |
| | | for (int i = 0; i < ids.length; i++) { |
| | | mobiles[i] = umsAdminMapper.selectById(ids[i]).getMobile(); |
| | | public void sendSMS(Message message, List<Message> messageList) { |
| | | List<String> mobiles = new ArrayList<>(); |
| | | List<Long> mesIds = new ArrayList<>(); |
| | | for (Message m : messageList) { |
| | | mobiles.add(m.getPhoneNumber()); |
| | | mesIds.add(m.getId()); |
| | | } |
| | | message.setPhoneNumber(StringUtils.join(mobiles, ",")); |
| | | Integer messageStatus = sendMessages(message); |
New file |
| | |
| | | package com.ycl.vo.casePool; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import lombok.Data; |
| | | |
| | | |
| | | public class WorkOrderVO { |
| | | @ExcelProperty(value = "姓名", index = 1) |
| | | private String name; |
| | | @ExcelProperty(value = "任务总数", index = 2) |
| | | private Integer taskCount; |
| | | @ExcelProperty(value = "已完成数量", index = 3) |
| | | private Integer finishCount; |
| | | @ExcelProperty(value = "未完成数量", index = 4) |
| | | private Integer notFinishCount; |
| | | @ExcelProperty(value = "完成率", index = 5) |
| | | private Double finishRadio; |
| | | |
| | | public String getName() { |
| | | return name; |
| | | } |
| | | |
| | | public void setName(String name) { |
| | | this.name = name; |
| | | } |
| | | |
| | | public Integer getTaskCount() { |
| | | return taskCount; |
| | | } |
| | | |
| | | public void setTaskCount(Integer taskCount) { |
| | | this.taskCount = taskCount; |
| | | } |
| | | |
| | | public Integer getFinishCount() { |
| | | return finishCount; |
| | | } |
| | | |
| | | public void setFinishCount(Integer finishCount) { |
| | | this.finishCount = finishCount; |
| | | } |
| | | |
| | | public Integer getNotFinishCount() { |
| | | return this.taskCount - this.finishCount; |
| | | } |
| | | |
| | | public void setNotFinishCount(Integer notFinishCount) { |
| | | this.notFinishCount = notFinishCount; |
| | | } |
| | | |
| | | public Double getFinishRadio() { |
| | | return ((double) this.finishCount) / ((double) this.taskCount); |
| | | } |
| | | |
| | | public void setFinishRadio(Double finishRadio) { |
| | | this.finishRadio = finishRadio; |
| | | } |
| | | } |
| | |
| | | WHERE end_time < limit_time |
| | | AND PERIOD_DIFF(date_format(now(), '%Y%m'), date_format(create_time, '%Y%m')) = 0 |
| | | </select> |
| | | <select id="getWorkOrder" resultType="com.ycl.vo.casePool.WorkOrderVO"> |
| | | SELECT username as name,count(DISTINCT id) taskCount,SUM(CASE WHEN state>7 THEN 1 ELSE 0 END) finishCount |
| | | from ( |
| | | SELECT a.username , bc.id,max(bc.state) state |
| | | from ums_base_case bc |
| | | INNER JOIN ums_dispose_record dr on bc.id = dr.base_case_id |
| | | INNER JOIN ums_admin a on dr.handler_id = a.id |
| | | where ( bc.state = 6 or bc.state = 7 |
| | | or bc.state = 8 or bc.state = 9) |
| | | <if test="keyword !=''and keyword!=null"> |
| | | and a.username like concat('%', #{keyword},'%') |
| | | </if> |
| | | GROUP BY a.username ,bc.id |
| | | ) tmp |
| | | GROUP BY username |
| | | </select> |
| | | </mapper> |
| | |
| | | LEFT JOIN ums_base_case t2 ON t1.belong_to_id = t2.id |
| | | LEFT JOIN ums_sccg_region t3 on t3.id=t2.community_id |
| | | <where> |
| | | <if test="type == '03' and type != null and type !='' "> |
| | | t1.type='03' |
| | | </if> |
| | | <if test="type == '01' and type != null and type !='' "> |
| | | t1.type='02' or t1.type='01' |
| | | <if test="type != null and type !='' "> |
| | | t1.type = #{type} |
| | | </if> |
| | | <if test="startTime != '' and endTime != '' and startTime != null and endTime != null"> |
| | | and t1.create_time between #{startTime} and #{endTime} |