baizonghao
2023-02-21 9b40b08ec9010f541bf037bddb3a4648f12507db
查询条件,驾驶舱导入,报文删除
7个文件已修改
82 ■■■■ 已修改文件
ycl-platform/src/main/java/com/ycl/controller/caseHandler/BaseCaseController.java 45 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/java/com/ycl/controller/cockpit/teamConstruction/TeamConstructionController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/java/com/ycl/mapper/caseHandler/BaseCaseMapper.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/java/com/ycl/service/caseHandler/IBaseCaseService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/java/com/ycl/service/caseHandler/impl/BaseCaseServiceImpl.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/resources/mapper/caseHandler/BaseCaseMapper.xml 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/resources/mapper/caseHandler/WritMapper.xml 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/java/com/ycl/controller/caseHandler/BaseCaseController.java
@@ -86,7 +86,7 @@
     * @Description query illegal building and violation
     * @Param [size, current, state, type, resource]
     **/
    @ApiOperation(value = "查询违规违建")
/*    @ApiOperation(value = "查询违规违建")
    @GetMapping("/query")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "state", value = "处理状态(0-待处理1-误报2-上报3-再学习/再训练4暂不处理5立案6调度7处置8核查9结案)", dataType = "Integer"),
@@ -112,6 +112,49 @@
            return CommonResult.success(queryList);
        }
        return CommonResult.failed("request parameter is null");
    }*/
    @ApiOperation(value = "查询违规违建")
    @GetMapping("/query")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "state", value = "处理状态(0-待处理1-误报2-上报3-再学习/再训练4暂不处理5立案6调度7处置8核查9结案)", dataType = "Integer"),
            @ApiImplicitParam(name = "type", value = "1 违规,2 违建", dataType = "Integer"),
            @ApiImplicitParam(name = "resource", value = "1 视频,2 手动", dataType = "Integer"),
            @ApiImplicitParam(name = "code", dataType = "String"),
            @ApiImplicitParam(name = "categoryBig", dataType = "String"),
            @ApiImplicitParam(name = "categorySmall", dataType = "String"),
            @ApiImplicitParam(name = "street", dataType = "Integer"),
            @ApiImplicitParam(name = "site", dataType = "String"),
            @ApiImplicitParam(name = "startTime", dataType = "String"),
            @ApiImplicitParam(name = "endTime", dataType = "String")
    })
    public CommonResult searchViolation(@RequestParam Integer size,
                                        @RequestParam Integer current,
                                        @RequestParam Integer state,
                                        @RequestParam(required = false) Integer type,
                                        @RequestParam(required = false) Integer resource,
                                        @RequestParam(required = false) String code,
                                        @RequestParam(required = false) String categoryBig,
                                        @RequestParam(required = false) String categorySmall,
                                        @RequestParam(required = false) Integer street,
                                        @RequestParam(required = false) String site,
                                        @RequestParam(required = false) String startTime,
                                        @RequestParam(required = false) String endTime ){
        if (state != null) {
            Page<Object> queryList;
            Integer violation = 1;
            Integer illegalBuilding = 2;
            if (type == violation) {
                queryList = baseCaseService.listViolationsPage(new Page<>().setCurrent(current).setSize(size), state, resource, code, categoryBig, categorySmall, street, site, startTime, endTime);
            } else if (type == illegalBuilding) {
                queryList = baseCaseService.listIllegalBuilding(new Page<>().setCurrent(current).setSize(size), state, resource);
            } else {
                return CommonResult.failed("bad request url");
            }
            return CommonResult.success(queryList);
        }
        return CommonResult.failed("request parameter is null");
    }
    /**
ycl-platform/src/main/java/com/ycl/controller/cockpit/teamConstruction/TeamConstructionController.java
@@ -121,7 +121,7 @@
    @ApiOperation("导入")
    @SneakyThrows
    @LogSave(operationType = "队伍建设管理", contain = "导入")
    public CommonResult export(MultipartFile multipartFile) {
    public CommonResult export(@RequestParam("file") MultipartFile multipartFile) {
        EasyExcel.read(multipartFile.getInputStream(), TeamConstruction.class, new ReadListener() {
            @Override
            public void invoke(Object o, AnalysisContext analysisContext) {
ycl-platform/src/main/java/com/ycl/mapper/caseHandler/BaseCaseMapper.java
@@ -25,7 +25,7 @@
 * @since 2022-09-24
 */
public interface BaseCaseMapper extends BaseMapper<BaseCase> {
    Page<CasePoolViolationVO> listViolationsPage(Page page, Integer state, Integer type, Integer resource);
    Page<CasePoolViolationVO> listViolationsPage(Page page, Integer state, Integer type, Integer resource, String code, String categoryBig, String categorySmall, Integer street, String site, String startTime, String endTime);
    Page<CasePoolIllegalBuildingVO> listIllegalBuildingsPage(Page page, Integer state, Integer type, Integer resource);
ycl-platform/src/main/java/com/ycl/service/caseHandler/IBaseCaseService.java
@@ -37,7 +37,7 @@
     */
    String uploadEvent(Long caseId);
    Page listViolationsPage(Page page, Integer state, Integer resource);
    Page listViolationsPage(Page page, Integer state, Integer resource, String code, String categoryBig, String categorySmall, Integer street, String site, String startTime, String endTime);
    Page listIllegalBuilding(Page page, Integer state, Integer resource);
ycl-platform/src/main/java/com/ycl/service/caseHandler/impl/BaseCaseServiceImpl.java
@@ -170,11 +170,11 @@
    }
    @Override
    public Page listViolationsPage(Page page, Integer state, Integer resource) {
    public Page listViolationsPage(Page page, Integer state, Integer resource, String code, String categoryBig, String categorySmall, Integer street, String site, String startTime, String endTime) {
        Integer type = 01;
        Integer hours = 60;
        Integer day = 24;
        Page<CasePoolViolationVO> violationsPage = baseCaseMapper.listViolationsPage(page, state, type, resource);
        Page<CasePoolViolationVO> violationsPage = baseCaseMapper.listViolationsPage(page, state, type, resource, code, categoryBig, categorySmall, street, site, startTime, endTime);
        violationsPage.getRecords().stream().forEach(item -> {
            if (item.getCloseTime() == null) {
                Duration duration = Duration.between(item.getAlarmTime(), LocalDateTime.now());
ycl-platform/src/main/resources/mapper/caseHandler/BaseCaseMapper.xml
@@ -75,6 +75,24 @@
            <if test="type!=null">
                and ubc.category=#{type}
            </if>
            <if test="code!=null">
                and ubc.code=#{code}
            </if>
            <if test="categoryBig != null">
                and t3.name like concat('%', #{categoryBig},'%')
            </if>
            <if test="categorySmall != null">
                and t4.name like concat('%', #{categorySmall},'%')
            </if>
            <if test="street != null">
                and ubc.community_id = #{street}
            </if>
            <if test="site">
                and ubc.site like concat('%', #{site},'%')
            </if>
            <if test="startTime !='' and endTime !='' and startTime!=null and endTime !=null">
                and ubc.create_time between #{startTime} and #{endTime}
            </if>
        </where>
    </select>
ycl-platform/src/main/resources/mapper/caseHandler/WritMapper.xml
@@ -35,9 +35,12 @@
        base_case_id
        , illegal_building_id, writ_type, writ_code, illegal_type, send_time, limit_time, send_content, rectify_time, rectify_situation, remark, writ_pic, original_pic, rectified_pic, othen_pic, create_user, create_time
    </sql>
    <update id="deleteValueByCaseId">
        update ums_writ set value = null where base_case_id = #{baseCaseId}
    </update>
<!--    <update id="deleteValueByCaseId">-->
<!--        update ums_writ set value = null where base_case_id = #{baseCaseId}-->
<!--    </update>-->
    <delete id="deleteValueByCaseId">
        delete from ums_writ where base_case_id = #{baseCaseId}
    </delete>
    <select id="selectWritPage" resultMap="VoMap">
        SELECT w.*, wt.`name` as writ_type_name,bc.`code` event_code,dd.`name` category_name,wt.code template_code
        FROM ums_writ w