Browse Source

提交

dev_ycq
OUMYYE\Administrator 2 years ago
parent
commit
253b647172
  1. 14
      mailbox-common/src/main/java/com/biutag/util/TimeUtils.java
  2. 19
      mailbox-lan/src/main/java/com/biutag/lan/controller/datascreen/DataScreenController.java
  3. 288
      mailbox-lan/src/main/java/com/biutag/lan/domain/vo/MailDetail.java
  4. 11
      mailbox-lan/src/main/java/com/biutag/lan/mapper/DataScreenMapper.java
  5. 57
      mailbox-lan/src/main/java/com/biutag/lan/service/DataScreenService.java
  6. 5
      mailbox-lan/src/main/java/com/biutag/lan/service/MailFlowService.java
  7. 2
      mailbox-lan/src/main/java/com/biutag/lan/service/impl/DutyServiceImpl.java
  8. 2
      mailbox-lan/src/main/java/com/biutag/lan/service/impl/HolidayServiceImpl.java
  9. 14
      mailbox-lan/src/main/resources/mapper/DataScreenMapper.xml

14
mailbox-common/src/main/java/com/biutag/util/TimeUtils.java

@ -535,4 +535,18 @@ public class TimeUtils {
// long sec = diff % nd % nh % nm / ns; // long sec = diff % nd % nh % nm / ns;
return day + "天" + hour + "小时" + min + "分钟"; return day + "天" + hour + "小时" + min + "分钟";
} }
public static String secondsToTime(int seconds){
int h=seconds/3600; //小时
int m=(seconds%3600)/60; //分钟
int s=(seconds%3600)%60; //秒
if(h>0){
return h+"小时"+m+"分钟"+s+"秒";
}
if(m>0){
return m+"分钟"+s+"秒";
}
return s+"秒";
}
} }

19
mailbox-lan/src/main/java/com/biutag/lan/controller/datascreen/DataScreenController.java

@ -1,15 +1,19 @@
package com.biutag.lan.controller.datascreen; package com.biutag.lan.controller.datascreen;
import com.biutag.aop.NotLogin; import com.biutag.aop.NotLogin;
import com.biutag.aop.NotPower;
import com.biutag.core.AjaxResult; import com.biutag.core.AjaxResult;
import com.biutag.entity.system.Duty; import com.biutag.entity.system.Duty;
import com.biutag.enums.DeptTypeEnum; import com.biutag.enums.DeptTypeEnum;
import com.biutag.lan.AdminThreadLocal; import com.biutag.lan.AdminThreadLocal;
import com.biutag.lan.domain.Mail; import com.biutag.lan.domain.Mail;
import com.biutag.lan.domain.MailSource; import com.biutag.lan.domain.MailSource;
import com.biutag.lan.domain.vo.MailDetail;
import com.biutag.lan.domain.vo.MailFlowDetail;
import com.biutag.lan.service.DataScreenService; import com.biutag.lan.service.DataScreenService;
import com.biutag.lan.service.IDutyService; import com.biutag.lan.service.IDutyService;
import com.biutag.lan.service.IIndexService; import com.biutag.lan.service.IIndexService;
import com.biutag.lan.service.MailService;
import com.biutag.util.DateUtils; import com.biutag.util.DateUtils;
import com.biutag.util.StringUtils; import com.biutag.util.StringUtils;
import com.google.gson.JsonObject; import com.google.gson.JsonObject;
@ -17,10 +21,7 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import jakarta.annotation.Resource; import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.util.*; import java.util.*;
@ -35,8 +36,8 @@ public class DataScreenController {
DataScreenService dataScreenService; DataScreenService dataScreenService;
@Resource @Resource
IDutyService iDutyService; IDutyService iDutyService;
@Resource
MailService mailService;
@NotLogin @NotLogin
@GetMapping("/mapData") @GetMapping("/mapData")
@ApiOperation(value="大屏地图数据") @ApiOperation(value="大屏地图数据")
@ -123,4 +124,10 @@ public class DataScreenController {
@NotPower
@GetMapping("getMailDetail")
public AjaxResult<MailDetail> getMailDetail(@RequestParam Map<String,Object> params) {
return AjaxResult.success(dataScreenService.getMailDetail(params));
}
} }

288
mailbox-lan/src/main/java/com/biutag/lan/domain/vo/MailDetail.java

@ -0,0 +1,288 @@
package com.biutag.lan.domain.vo;
import com.baomidou.mybatisplus.annotation.TableId;
import com.biutag.lan.domain.MailFlow;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;
import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;
@Setter
@Getter
public class MailDetail {
private String id;
/**
* 联系人姓名
*/
private String contactName;
/**
* 联系人性别 M / F
*/
private String contactSex;
/**
* 联系人身份证号码
*/
private String contactIdCard;
/**
* 联系人手机号
*/
private String contactPhone;
/**
* 案件编号
*/
private String caseNumber;
/**
* 内容
*/
private String content;
/**
* 附件
*/
private String attachments;
/**
* 创建时间
*/
private LocalDateTime createTime;
/**
* 更新时间
*/
private LocalDateTime updateTime;
/**
* 来信时间
*/
private LocalDateTime mailTime;
/**
* 来源
*/
private String source;
/**
* 满意读(群众)
*/
private String satisfaction;
/*-------------------------------*/
/**
* 信件状态
*/
private String mailState;
/**
* 信件当前流程
*/
private String flowKey;
/**
* 信件当前流程节点
*/
private String flowBeforeName;
/**
* 流程限时最后操作时间
*/
private LocalDateTime flowLimitedLastHandlerTime;
/**
* 信件源数据ID 多个
*/
private String mailSourceId;
/**
* 信件类名
*/
private String mailCategory;
/**
* 信件一级类目
*/
private String mailFirstCategory;
/**
* 信件二级类目
*/
private String mailSecondCategory;
/**
* 信件三级类目
*/
private String mailThreeCategory;
/**
* 信件等级
*/
private String mailLevel;
/**
* 二级单位ID(主责)
*/
private Integer secondDeptId;
private String secondDeptName;
/**
* 三级单位ID(主责)
*/
private Integer threeDeptId;
private String threeDeptName;
/**
* 协办核查民警String
*/
private String coHandlingPolices;
/**
* 联系民警名称
*/
private String contactPoliceName;
/**
* 联系民警
*/
private String contactPoliceEmpNo;
/**
* 联系群众时间
*/
private LocalDateTime contactTime;
/**
* 联系时长
*/
private String contactDuration;
/**
* 延期日期
*/
private LocalDateTime extensionDate;
/**
* 是否联系群众
*/
private String contactFlag;
/**
* 是否申请延期
*/
private Boolean extensionFlag;
/**
* 接访形式
*/
private String interviewType;
/**
* 是否领导接访
*/
private Boolean interviewIsLeader;
/**
* 接访人员警号
*/
private String interviewPoliceEmpNo;
/**
* 接访人员姓名
*/
private String interviewPoliceName;
/**
* 接访情况
*/
private String interviewDetails;
/**
* 接访附件佐证材料
*/
private String interviewAttachments;
/**
* 核办情况
*/
private String verifyDetails;
/**
* 核办-是否属实
*/
private String verifyIsTrue;
/**
* 核办-被举报对象json
*/
private String verifyReportedPolices;
/**
* 核办-查证属实问题json
*/
private String verifyProblem;
/**
* 核办-是否需要问责
*/
private Boolean verifyNeedAccountability;
/**
* 核办-责任追究json
*/
private String verifyPunish;
/**
* 核办-群众反映事项解决情况(是否已解决)
*/
private Boolean verifyIsResolved;
/**
* 核办-办理反馈情况
*/
private String verifyFeedback;
/**
* 核办-回访人信息(String)
*/
private String verifyFollowupPolice;
/**
* 核办-附件上传佐证
*/
private String verifyAttachments;
/**
* 办结方式
*/
private String completeMethod;
/**
* 办理合格情况
*/
private String qualifiedProcessingStatus;
/**
* 问题解决情况
*/
private Boolean problemSolvingStatus;
/**
* 群众回复情况
*/
private String satisfactionStatus;
/**
* 认定办结意见
*/
private String completionComment;
/**
* 是否是简易流程
*/
private Boolean simpleFlowFlag;
private List<Map> verifyPoliceList;
//二级机构签收时长
private Integer signDuration;
private String signDurationStr;
//二级机构签收限制时长
private Integer limitedDuration;
//三级机构联系时长
private Integer contactMassesDuration;
private String contactMassesDurationStr;
//二级机构签收限制时长
private Integer contactLimitedDuration;
private String followName;
private String followMobile;
private String followEmpNo;
private List<MailFlow> mailFlowList;
}

11
mailbox-lan/src/main/java/com/biutag/lan/mapper/DataScreenMapper.java

@ -8,6 +8,7 @@ import com.biutag.entity.system.Duty;
import com.biutag.lan.domain.Mail; import com.biutag.lan.domain.Mail;
import com.biutag.lan.domain.MailSource; import com.biutag.lan.domain.MailSource;
import com.biutag.lan.domain.Work; import com.biutag.lan.domain.Work;
import com.biutag.lan.domain.vo.MailDetail;
import com.biutag.lan.domain.vo.WorkVo; import com.biutag.lan.domain.vo.WorkVo;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
@ -141,4 +142,14 @@ public interface DataScreenMapper extends BaseMapper<Mail> {
List<Duty> getToDayDuty(@Param("depatType") String depatType,@Param("deptId") String deptId); List<Duty> getToDayDuty(@Param("depatType") String depatType,@Param("deptId") String deptId);
MailDetail getMailDetail(Map<String,Object> params);
Map<String,Object> getVerifyPolice(Map<String,Object> params);
//获取流程时长
Map<String,Integer> getDuration(@Param("mailId") String mailId,@Param("flowKey") String flowKey);
} }

57
mailbox-lan/src/main/java/com/biutag/lan/service/DataScreenService.java

@ -1,17 +1,28 @@
package com.biutag.lan.service; package com.biutag.lan.service;
import com.alibaba.fastjson2.JSON;
import com.alibaba.fastjson2.JSONArray;
import com.alibaba.fastjson2.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.biutag.entity.system.Duty; import com.biutag.entity.system.Duty;
import com.biutag.enums.DeptTypeEnum; import com.biutag.enums.DeptTypeEnum;
import com.biutag.lan.domain.Mail; import com.biutag.lan.domain.Mail;
import com.biutag.lan.domain.MailFlow;
import com.biutag.lan.domain.vo.MailDetail;
import com.biutag.lan.flow.FlowNodeEnum;
import com.biutag.lan.mapper.DataScreenMapper; import com.biutag.lan.mapper.DataScreenMapper;
import com.biutag.util.DateUtils; import com.biutag.util.DateUtils;
import com.biutag.util.StringUtils; import com.biutag.util.StringUtils;
import com.biutag.util.TimeUtils;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.JsonNode;
import com.google.gson.Gson; import com.google.gson.Gson;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject; import com.google.gson.JsonObject;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.fasterxml.jackson.databind.ObjectMapper;
import java.util.*; import java.util.*;
import java.util.concurrent.atomic.AtomicReference; import java.util.concurrent.atomic.AtomicReference;
@ -20,6 +31,8 @@ import java.util.concurrent.atomic.AtomicReference;
public class DataScreenService extends ServiceImpl<DataScreenMapper, Mail> { public class DataScreenService extends ServiceImpl<DataScreenMapper, Mail> {
private final MailFlowService mailFlowService;
public List<Map<String,Object>> mapData(String deptId){ public List<Map<String,Object>> mapData(String deptId){
return baseMapper.mapData(deptId); return baseMapper.mapData(deptId);
} }
@ -231,4 +244,46 @@ public class DataScreenService extends ServiceImpl<DataScreenMapper, Mail> {
} }
return map; return map;
} }
public MailDetail getMailDetail(Map<String,Object> params){
MailDetail mailDetail= baseMapper.getMailDetail(params);
if(StringUtils.isNotNull(mailDetail.getVerifyFollowupPolice())){
String verifyReportedPolicesJSON=mailDetail.getVerifyReportedPolices();
JSONArray jsonArray= JSONArray.parse(verifyReportedPolicesJSON);
List<Map> mapList=new ArrayList<>();
if (jsonArray.size() > 0) {
for (int i = 0; i < jsonArray.size(); i++) {
Map mapPolice = JSON.parseObject(jsonArray.get(i).toString());
mapList.add(baseMapper.getVerifyPolice(mapPolice)) ;
}
}
mailDetail.setVerifyPoliceList(mapList);
}
//获取主单位签收时长
Map<String,Integer> signMap = baseMapper.getDuration(mailDetail.getId(), FlowNodeEnum.SECOND_SIGN.getKey());
if(signMap.size()>0) {
mailDetail.setSignDuration(signMap.get("consuming_time"));
mailDetail.setSignDuration(signMap.get("limited_time"));
mailDetail.setSignDurationStr(TimeUtils.secondsToTime(signMap.get("consuming_time")));
}
//获取三级机构联系群众时长
Map<String,Integer> contactMap = baseMapper.getDuration(mailDetail.getId(), FlowNodeEnum.CONTACT_WRITER.getKey());
if(contactMap.size()>0) {
mailDetail.setContactMassesDuration(contactMap.get("consuming_time"));
mailDetail.setContactLimitedDuration(contactMap.get("limited_time"));
mailDetail.setContactMassesDurationStr(TimeUtils.secondsToTime(contactMap.get("consuming_time")));
}
if(StringUtils.isNotNull(mailDetail.getVerifyFollowupPolice())){
String verifyFollowupPolice=mailDetail.getVerifyFollowupPolice();
JSONObject mapPolice = JSON.parseObject(verifyFollowupPolice);
mailDetail.setFollowName(mapPolice.getString("name"));
mailDetail.setFollowMobile(mapPolice.getString("phone"));
mailDetail.setFollowEmpNo(mapPolice.getString("empNo"));
}
mailDetail.setMailFlowList( mailFlowService.listOrderByCreateTimeDesc( mailDetail.getId()));
return mailDetail;
}
} }

5
mailbox-lan/src/main/java/com/biutag/lan/service/MailFlowService.java

@ -29,4 +29,9 @@ public class MailFlowService extends ServiceImpl<MailFlowMapper, MailFlow> {
return list.get(list.size() - 1).getCreateTime(); return list.get(list.size() - 1).getCreateTime();
} }
public List<MailFlow> listOrderByCreateTimeDesc(String mailId) {
LambdaQueryWrapper<MailFlow> queryWrapper = new LambdaQueryWrapper<MailFlow>().eq(MailFlow::getMailId, mailId).orderByDesc(MailFlow::getCreateTime);
return list(queryWrapper);
}
} }

2
mailbox-lan/src/main/java/com/biutag/lan/service/impl/DutyServiceImpl.java

@ -68,7 +68,7 @@ public class DutyServiceImpl implements IDutyService {
queryWrapper.orderByDesc("create_time"); queryWrapper.orderByDesc("create_time");
if(StringUtils.isNotEmpty(searchValidate.getSearchTime()) ) { if(StringUtils.isNotNull(searchValidate.getSearchTime())&& !"null".equals(searchValidate.getSearchTime())) {
dutyMapper.setSearch(queryWrapper, searchValidate, new String[]{ dutyMapper.setSearch(queryWrapper, searchValidate, new String[]{
"like:departName@depart_name:str", "like:departName@depart_name:str",
"like:policeName@police_name:str", "like:policeName@police_name:str",

2
mailbox-lan/src/main/java/com/biutag/lan/service/impl/HolidayServiceImpl.java

@ -47,7 +47,7 @@ public class HolidayServiceImpl implements IHolidayService {
QueryWrapper<Holiday> queryWrapper = new QueryWrapper<>(); QueryWrapper<Holiday> queryWrapper = new QueryWrapper<>();
queryWrapper.orderByDesc("id"); queryWrapper.orderByDesc("id");
if(StringUtils.isNotEmpty(searchValidate.getSearchDate()) ) { if(StringUtils.isNotNull(searchValidate.getSearchDate())&& !"null".equals(searchValidate.getSearchDate())) {
holidayMapper.setSearch(queryWrapper, searchValidate, new String[]{ holidayMapper.setSearch(queryWrapper, searchValidate, new String[]{
"like:holidayName@holiday_name:str", "like:holidayName@holiday_name:str",
"<=:searchDate@start_date:str", "<=:searchDate@start_date:str",

14
mailbox-lan/src/main/resources/mapper/DataScreenMapper.xml

@ -209,5 +209,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
GROUP BY d.name,a.id GROUP BY d.name,a.id
</select> </select>
<select id="getMailDetail" resultType="com.biutag.lan.domain.vo.MailDetail">
select * from mail where id=#{id} limit 1
</select>
<select id="getVerifyPolice" resultType="java.util.Map">
select name,emp_no,id_code , gender,birthday ,(select name from dept where id =#{deptId} limit 1) deptName
from police_user where emp_no =#{empNo} limit 1
</select>
<select id="getDuration" resultType="java.util.Map">
select consuming_time,limited_time from mail_flow
where 1=1
<if test="mailId != null and mailId != ''"> and mail_id=#{mailId}</if>
<if test="flowKey != null and flowKey != ''"> and flow_key =#{flowKey}</if>
</select>
</mapper> </mapper>

Loading…
Cancel
Save