springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/controller/HomeController.java
@@ -13,6 +13,7 @@ import com.panzhihua.sangeshenbian.model.entity.Banner; import com.panzhihua.sangeshenbian.model.entity.PartyMember; import com.panzhihua.sangeshenbian.model.entity.SystemUser; import com.panzhihua.sangeshenbian.model.entity.SystemUserLevel; import com.panzhihua.sangeshenbian.model.query.BasePage; import com.panzhihua.sangeshenbian.model.vo.ComplaintTodoVO; import com.panzhihua.sangeshenbian.model.vo.MessageNotificationVO; @@ -48,7 +49,7 @@ private final IPartyMemberService partyMemberService; private final RedisUtils redisUtils; private final IdentityInformationService identityInformationService; private final ISystemUserLevelService systemUserLevelService; @ApiOperation("获取banner列表") @GetMapping("/banner-list") public R<List<Banner>> getBannerList() { @@ -91,7 +92,17 @@ @GetMapping("/current-user-info") @ApiOperation("获取三个身边当前用户信息 用于判断用户是否是上级") public R<SystemUser> getCurrentUserInfo() { return R.ok(systemUserService.getSystemUserAdminByPhone(getLoginUserInfo().getPhone()).orElse(null)); SystemUser systemUser = systemUserService.getSystemUserAdminByPhone(getLoginUserInfo().getPhone()).orElse(null); Object o1 = redisUtils.get("identity:" + getLoginUserInfo().getPhone()); if(o1!=null){ UserIdentityDTO o2 = (UserIdentityDTO) o1; Integer levelId = o2.getLevelId(); if(levelId!=null) { SystemUserLevel systemUserLevel = systemUserLevelService.getById(levelId); systemUser.setLevelId(systemUserLevel.getLevel()); } } return R.ok(systemUser); } /** springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/model/entity/SystemUser.java
@@ -146,6 +146,9 @@ @ApiModelProperty(value = "账号层级 2.0.1新增") private List<SystemUserLevel> systemUserLevels; @TableField(exist = false) private Integer levelId; springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/model/vo/AppComplaintRejectVO.java
@@ -1,8 +1,8 @@ package com.panzhihua.sangeshenbian.model.vo; import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.panzhihua.sangeshenbian.model.entity.Complaint; import io.swagger.annotations.Api; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -42,4 +42,8 @@ @ApiModelProperty("驳回类型 1:延期被驳回 2:上报被驳回") private Integer auditType; @ApiModelProperty("诉求id") @JsonSerialize(using = com.fasterxml.jackson.databind.ser.std.ToStringSerializer.class) private Long complaintId; } springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/model/vo/ComplaintRejectVo.java
@@ -1,5 +1,6 @@ package com.panzhihua.sangeshenbian.model.vo; import com.fasterxml.jackson.annotation.JsonFormat; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -8,6 +9,7 @@ @ApiModel("问题驳回Vo") public class ComplaintRejectVo { @ApiModelProperty(value = "诉求Id") @JsonFormat(shape = JsonFormat.Shape.STRING) private Long complaintId; @ApiModelProperty("诉求号") private String serialNumber; springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/model/vo/ComplaintVO.java
@@ -100,4 +100,5 @@ @ApiModelProperty(value = "已上报次数") private Integer reportCount; } springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/ComplaintServiceImpl.java
@@ -643,7 +643,12 @@ PartyMember partyMember = identityInformationVO.getPartyMember(); name = partyMember.getName(); } Complaint complaint = BeanUtil.copyProperties(dto, Complaint.class); Long complaintId = dto.getId(); Complaint complaint = this.getById(complaintId); Date createTime = complaint.getCreateTime(); complaint = BeanUtil.copyProperties(dto, Complaint.class); complaint.setUpdateTime(new Date()); complaint.setCompletionUserId(loginUserInfoVO.getUserId()); complaint.setCompletionUsername(name); @@ -651,7 +656,6 @@ complaint.setCompletionTime(new Date()); complaint.setCompletionUserLevel(accountLevel); // 计算处理时间 Date createTime = complaint.getCreateTime(); long l = Duration.between(createTime.toInstant(), complaint.getCompletionTime().toInstant()).getSeconds() / 3600; double handlingDay = new BigDecimal(l).divide(new BigDecimal("24"), 2, RoundingMode.HALF_UP).doubleValue(); complaint.setHandlingDay(handlingDay); @@ -1558,6 +1562,7 @@ String[] split = time.split(" - "); System.out.println(split[0]); } @Override public List<AnalyticStatisticsTwoVo> analyticStatisticsTwo(String time, List<Complaint> complaints, SimpleDateFormat simpleDateFormat) { ArrayList<AnalyticStatisticsTwoVo> list = new ArrayList<>(); springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/StaticsService.java
@@ -47,7 +47,7 @@ public List<RegionVO> queryRegionTree(LoginUserInfoVO loginUserInfo) { IdentityInformation currentIdentityInformation = identityInformationService.getCurrentIdentityInformation(loginUserInfo); if (!Integer.valueOf(2).equals(currentIdentityInformation.getIdentity())) { throw new ServiceException("当前账号无权限"); return Collections.emptyList(); } SystemUserLevel userLevel = currentIdentityInformation.getSystemUserLevel(); springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/resources/mapper/ComplaintMapper.xml
@@ -233,7 +233,8 @@ ifnull((select a.create_time from sgsb_complaint_audit_record a where a.audit_status != 0 and a.complaint_id = #{id} order by a.sort desc limit 0, 1), "") AS auditTime, ifnull((select a.reject_reason from sgsb_complaint_audit_record a where a.audit_status != 0 and a.complaint_id = #{id} order by a.sort desc limit 0, 1), "") as rejectReason, su.nick_name, su.phone su.phone, sc.voice_file voiceFile FROM sgsb_complaint sc LEFT JOIN sys_user su ON su.user_id = sc.create_by LEFT JOIN sgsb_complaint_audit_record scar ON scar.complaint_id = sc.id and scar.latest_flag = 1 @@ -603,7 +604,7 @@ <select id="queryRejectRecordPage" resultType="com.panzhihua.sangeshenbian.model.vo.AppComplaintRejectVO"> SELECT scar.id, scar.complaint_id, scar.complaint_id complaintId, scar.auditor_id, scar.audit_type, scar.audit_status, springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/resources/mapper/ComplaintRejectMapper.xml
@@ -15,6 +15,7 @@ from sgsb_complaint_audit_record t3 left join sgsb_complaint t2 on t3.complaint_id = t2.id <where> t3.audit_status=2 <if test="query.serialNumber != null and query.serialNumber != ''"> and t2.serial_number = #{query.serialNumber} </if>