mitao
2025-03-17 790b1289743814fc378ca62532d7be4534455668
bug修改
11个文件已修改
1个文件已添加
181 ■■■■ 已修改文件
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/controller/PartyMemberController.java 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/conveter/EConverter.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/dao/ComplaintMapper.java 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/enums/ComplaintExportEnum.java 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/enums/ProcessStatusEnum.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/model/excel/ComplaintExcel.java 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/BcRegionServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/ComplaintServiceImpl.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/PartyMemberServiceImpl.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/warpper/MgtComplaintQuery.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/warpper/PartyMemberApplicationRequest.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/resources/mapper/ComplaintMapper.xml 97 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/controller/PartyMemberController.java
@@ -23,6 +23,7 @@
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
@@ -32,7 +33,8 @@
@Api(tags = {"小程序-党员管理"})
@Validated
@RestController("/applet/party-member")
@RestController
@RequestMapping("/applet/party-member")
@RequiredArgsConstructor(onConstructor_ = {@Lazy})
public class PartyMemberController extends BaseController {
    private final IPartyMemberService partyMemberService;
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/conveter/EConverter.java
@@ -6,6 +6,7 @@
import cn.idev.excel.metadata.data.WriteCellData;
import cn.idev.excel.metadata.property.ExcelContentProperty;
import com.panzhihua.sangeshenbian.annotation.FastExcel;
import com.panzhihua.sangeshenbian.annotation.TargetEnum;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
@@ -32,9 +33,9 @@
        //获取字段属性中的注解
        Field field = contentProperty.getField();
        //获取该字段所属枚举
        FastExcel fastExcel = field.getAnnotation(FastExcel.class);
        TargetEnum targetEnum = field.getAnnotation(TargetEnum.class);
        //获取注解中的枚举信息
        Class<? extends Enum> type = fastExcel.type();
        Class<? extends Enum> type = targetEnum.type();
        //获取枚举类的方法名 “getEnumByCode”就是自己编写的函数,Integer.class 指定入参类型
        Method codeOf = type.getMethod("getEnumByCode", Integer.class);
        //反射执行方法,此方法得到的是一个枚举实例(具体得到什么,结合自身项目)
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/dao/ComplaintMapper.java
@@ -80,5 +80,12 @@
     * @param query
     * @param loginUserInfo
     */
    List<ComplaintVO> getList(MgtComplaintQuery query, SystemUserVo loginUserInfo);
    List<ComplaintVO> getList( @Param("query") MgtComplaintQuery query, @Param("loginUserInfo") SystemUserVo loginUserInfo);
    /**
     * 管理后台-获取诉求详情
     * @param id
     * @return
     */
    ComplaintVO getDetailBg(Long id);
}
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/enums/ComplaintExportEnum.java
New file
@@ -0,0 +1,25 @@
package com.panzhihua.sangeshenbian.enums;
import lombok.AllArgsConstructor;
import lombok.Getter;
@Getter
@AllArgsConstructor
public enum ComplaintExportEnum {
    PROCESSING(0, "正在办理"),
    EXTENDED(1, "延期办理"),
    OVERDUE(2, "超时办理"),
    COMPLETED(3, "已办结"),
    REPORT_PENDING_AUDIT(4, "上报待审核");
    private final Integer code;
    private final String desc;
    public static ComplaintExportEnum getEnumByCode(Integer code) {
        for (ComplaintExportEnum e : ComplaintExportEnum.values()) {
            if (e.code.equals(code)) {
                return e;
            }
        }
        return null;
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/enums/ProcessStatusEnum.java
@@ -5,7 +5,8 @@
    PROCESSING(0, "正在办理"),
    EXTENDED(1, "延期办理"),
    OVERDUE(2, "超时办理"),
    COMPLETED(3, "已办结");
    COMPLETED(3, "已办结"),
    REPORT_PENDING_AUDIT(4, "上报待审核");
    private final int code;
    private final String description;
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/model/excel/ComplaintExcel.java
@@ -1,6 +1,10 @@
package com.panzhihua.sangeshenbian.model.excel;
import cn.idev.excel.annotation.ExcelProperty;
import com.panzhihua.sangeshenbian.annotation.TargetEnum;
import com.panzhihua.sangeshenbian.conveter.EConverter;
import com.panzhihua.sangeshenbian.enums.ComplaintExportEnum;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotBlank;
@@ -14,10 +18,10 @@
@Data
public class ComplaintExcel {
    @ExcelProperty(value = "录入人")
    private String nickname;
    private String reportUserName;
    @ExcelProperty(value = "录入人联系方式")
    private String phone;
    private String reportUserPhone;
    @ExcelProperty(value = "群众姓名")
    private String name;
@@ -40,6 +44,7 @@
    @ExcelProperty(value = "详细地址描述")
    private String detailedAddress;
    @ExcelProperty(value = "流转状态:0-正在办理 1-延期办理 2-超时办理 3-已办结 4-群众撤销 5-上报待审核 6-上级驳回 7-延期待审核")
    @ExcelProperty(value = "状态",converter = EConverter.class)
    @TargetEnum(type = ComplaintExportEnum.class)
    private Integer status;
}
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/BcRegionServiceImpl.java
@@ -34,7 +34,7 @@
        return this.lambdaQuery()
                .eq(BcRegion::getRegionName, districtName)
                .eq(BcRegion::getDeleteFlag, 0)
                .eq(BcRegion::getHierarchyOrder, 2).last("LIMIT 1").one();
                .eq(BcRegion::getHierarchyOrder, 3).last("LIMIT 1").one();
    }
    @Override
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/ComplaintServiceImpl.java
@@ -954,14 +954,14 @@
        response.setCharacterEncoding("utf-8");
        String fileName = URLEncoder.encode("诉求数据", "UTF-8").replaceAll("\\+", "%20");
        response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + fileName + ".xlsx");
        EasyExcel.write(response.getOutputStream(), PartyMemberExcel.class)
        EasyExcel.write(response.getOutputStream(), ComplaintExcel.class)
                .sheet("诉求数据")
                .doWrite(complaintExcels);
    }
    @Override
    public void downloadFile(Long id,Integer type) throws IOException {
        Complaint complaint = getById(id);
        Complaint complaint = baseMapper.getDetailBg(id);
        if (Objects.isNull(complaint)) {
            throw new ServiceException("该诉求不存在");
        }
@@ -969,7 +969,7 @@
        BcRegion region = bcRegionService.getDistrictByCode(complaint.getDistrictsCode().toString());
        ComStreet street = comStreetService.getById(complaint.getStreetId().toString());
        ComAct act = comActService.getById(complaint.getCommunityId());
        String community = region.getRegionName() +"-"+ street.getName() + act.getName();
        String community = region.getRegionName() +"-"+ street.getName() + "-"+ act.getName();
        PartyMember partyMember = null;
        if (Objects.nonNull(complaint.getPartyMemberId())){
             partyMember = partyMemberService.getById(complaint.getPartyMemberId());
@@ -993,7 +993,7 @@
        map.put("community", community);
        map.put("problemType", complaint.getProblemType());
        map.put("descriptionContent", complaint.getDescriptionContent());
        map.put("reportType", ReportTypeEnum.fromCode(complaint.getReportType())); //TODO待修改
        map.put("reportType", ReportTypeEnum.fromCode(complaint.getReportType()).getDescription());
        map.put("partyOrganization",Objects.nonNull(partyMember)? partyMember.getPartyOrganization() : "");
        map.put("name", complaint.getName());
        map.put("contactNumber", complaint.getContactNumber());
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/PartyMemberServiceImpl.java
@@ -228,11 +228,12 @@
                            // 验证社区是否存在且属于该街道
                            // 实际代码应该是调用相应的Service查询社区信息
                            ComAct comAct = comActService.getCommunityByNameAndStreet(communityName, comStreet.getStreetId());
                            streetId = comStreet.getStreetId();
                            communityId = comAct.getCommunityId();
                            if (Objects.isNull(comAct)) {
                                isValid = false;
                                errorMsg.append("社区不存在或不属于所选街道; ");
                            } else {
                                streetId = comStreet.getStreetId();
                                communityId = comAct.getCommunityId();
                            }
                        }
                    }
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/warpper/MgtComplaintQuery.java
@@ -19,14 +19,17 @@
@ApiModel("管理后台诉求管理查询数据传输对象")
public class MgtComplaintQuery extends BasePage {
    @ApiModelProperty(value = "录入人")
    private String nickname;
    private String reportUserName;
    @ApiModelProperty(value = "联系方式")
    private String phone;
    @ApiModelProperty(value = "录入人联系方式")
    private String reportUserPhone;
    @ApiModelProperty(value = "群众姓名")
    private String name;
    @ApiModelProperty(value = "群众联系方式")
    private String contactNumber;
    @ApiModelProperty(value = "发生时间-开始")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date startTime;
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/warpper/PartyMemberApplicationRequest.java
@@ -5,6 +5,7 @@
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
@Data
@ApiModel("党员申请传输对象")
@@ -42,7 +43,7 @@
    private String community;
    @ApiModelProperty(value = "社区ID")
    @NotBlank(message = "社区ID不能空")
    @NotNull(message = "社区ID不能空")
    private Long communityId;
    @ApiModelProperty(value = "服务对象")
springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/resources/mapper/ComplaintMapper.xml
@@ -310,11 +310,17 @@
            <if test="query.status!=null and query.status == 0">
                AND t.status = #{query.status}
            </if>
            <if test="query.nickname != null and query.nickname!=''">
            <if test="query.reportUserName != null and query.reportUserName!=''">
                AND t.report_user_name LIKE CONCAT('%',#{query.reportUserName},'%')
            </if>
            <if test="query.phone != null and query.phone!=''">
            <if test="query.reportUserPhone != null and query.reportUserPhone!=''">
                AND t.report_user_phone LIKE CONCAT('%',#{query.phone},'%')
            </if>
            <if test="query.name != null and query.name!=''">
                AND t.name LIKE CONCAT('%',#{query.name},'%')
            </if>
            <if test="query.contactNumber != null and query.contactNumber!=''">
                AND t.contact_number LIKE CONCAT('%',#{query.contactNumber},'%')
            </if>
            <if test="query.startTime != null and query.endTime!=null">
                AND t.create_time BETWEEN #{query.startTime} AND #{query.endTime}
@@ -323,6 +329,7 @@
                AND t.problem_type =#{query.problemType}
            </if>
        </where>
        GROUP BY t.id
        ORDER BY t.create_time DESC
    </select>
    <select id="getList" resultType="com.panzhihua.sangeshenbian.model.vo.ComplaintVO">
@@ -340,12 +347,13 @@
        sc.images,
        sc.videos,
        CASE
        WHEN sc.status = 0 and scar.audit_type = 1 AND scar.audit_status = 0 THEN 7
        WHEN sc.status = 0 and scar.audit_type = 2 AND scar.audit_status = 0 THEN 5
        WHEN sc.status = 0 and scar.audit_status = 2 THEN 6
        WHEN sc.status = 0 and scar.audit_type = 1 AND scar.audit_status = 0 THEN 4
        WHEN sc.status = 0 and scar.audit_type = 2 AND scar.audit_status = 0 THEN 4
        ELSE sc.status
        END AS status,
        sc.report_type,
        sc.report_user_name,
        sc.report_user_phone,
        sc.superior_id,
        sc.city_code,
        sc.districts_code,
@@ -380,7 +388,6 @@
        INNER JOIN sgsb_complaint_audit_record scar ON scar.complaint_id = sc.id and scar.latest_flag = 1
        ) AS t
        <where>
            scar.latest_flag = 1
            <if test="1 == loginUserInfo.accountLevel">
                and t.city_code = 510400
            </if>
@@ -402,11 +409,17 @@
            <if test="query.status!=null and query.status == 0">
                AND t.status = #{query.status}
            </if>
            <if test="query.nickname != null and query.nickname!=''">
            <if test="query.reportUserName != null and query.reportUserName!=''">
                AND t.report_user_name LIKE CONCAT('%',#{query.reportUserName},'%')
            </if>
            <if test="query.phone != null and query.phone!=''">
            <if test="query.reportUserPhone != null and query.reportUserPhone!=''">
                AND t.report_user_phone LIKE CONCAT('%',#{query.phone},'%')
            </if>
            <if test="query.name != null and query.name!=''">
                AND t.name LIKE CONCAT('%',#{query.name},'%')
            </if>
            <if test="query.contactNumber != null and query.contactNumber!=''">
                AND t.contact_number LIKE CONCAT('%',#{query.contactNumber},'%')
            </if>
            <if test="query.startTime != null and query.endTime!=null">
                AND t.create_time BETWEEN #{query.startTime} AND #{query.endTime}
@@ -415,6 +428,7 @@
                AND t.problem_type =#{query.problemType}
            </if>
        </where>
        GROUP BY t.id
        ORDER BY t.create_time DESC
    </select>
    
@@ -422,4 +436,63 @@
    <select id="getTimeoutAndNotComment" resultType="com.panzhihua.sangeshenbian.model.entity.Complaint">
        select * from sgsb_complaint where status = 3 and DATE_ADD(completion_time, INTERVAL 10 DAY) &lt;= NOW() and id not in (select complaint_id from sgsb_complaint_comment where del_flag = 0)
    </select>
    <select id="getDetailBg" resultType="com.panzhihua.sangeshenbian.model.vo.ComplaintVO"
            parameterType="java.lang.Long">
        SELECT * FROM(
                         SELECT sc.id,
                                sc.serial_number,
                                sc.time,
                                sc.problem_type,
                                sc.name,
                                sc.contact_number,
                                sc.location,
                                sc.detailed_address,
                                sc.description_title,
                                sc.description_content,
                                sc.images,
                                sc.videos,
                                CASE
                                    WHEN sc.status = 0 and scar.audit_type = 1 AND scar.audit_status = 0 THEN 4
                                    WHEN sc.status = 0 and scar.audit_type = 2 AND scar.audit_status = 0 THEN 4
                                    ELSE sc.status
                                    END AS status,
                                sc.report_type,
                                sc.report_user_name,
                                sc.report_user_phone,
                                sc.superior_id,
                                sc.city_code,
                                sc.districts_code,
                                sc.street_id,
                                sc.community_id,
                                sc.party_member_id,
                                sc.create_by,
                                sc.create_time,
                                sc.update_by,
                                sc.update_time,
                                sc.completion_description,
                                sc.completion_images,
                                sc.completion_videos,
                                sc.completion_other_description,
                                sc.completion_time,
                                sc.completion_user_id,
                                sc.completion_username,
                                sc.completion_user_phone,
                                sc.closing_time,
                                sc.over_time_days,
                                sc.latitude,
                                sc.longitude,
                                scar.audit_type,
                                scar.audit_status,
                                scar.comment,
                                scar.create_time AS reportTime,
                                scar.system_user_id,
                                scar.reporter,
                                scar.department_name,
                                scar.department_id
                         FROM sgsb_complaint sc
                                  INNER JOIN sgsb_complaint_audit_record scar ON scar.complaint_id = sc.id and scar.latest_flag = 1
                     ) AS t
        WHERE t.id = #{id}
        GROUP BY t.id
    </select>
</mapper>