linwei
2024-01-04 9d521d0ff5fe8b09ceb9d7f2ec0f883048860810
bug修复+通过小区id 查询小区的楼栋和单元
21 files modified
395 ■■■■■ changed files
src/main/java/org/springblade/modules/article/controller/ArticleController.java 14 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/article/entity/Article.java 22 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/article/mapper/ArticleMapper.xml 28 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/article/vo/ArticleVO.java 3 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/house/controller/HouseController.java 28 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/house/mapper/HouseMapper.java 4 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/house/mapper/HouseMapper.xml 123 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/house/service/IHouseService.java 13 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/house/service/impl/HouseServiceImpl.java 10 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/task/controller/TaskBailReportingEventController.java 17 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/task/controller/TaskCampusReportingEventController.java 17 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/task/controller/TaskHotelReportingController.java 17 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/task/controller/TaskLabelReportingEventController.java 17 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/task/service/ITaskBailReportingEventService.java 9 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/task/service/ITaskCampusReportingEventService.java 3 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/task/service/ITaskHotelReportingService.java 7 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/task/service/ITaskLabelReportingEventService.java 8 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/task/service/impl/TaskBailReportingEventServiceImpl.java 13 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/task/service/impl/TaskCampusReportingEventServiceImpl.java 18 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/task/service/impl/TaskHotelReportingServiceImpl.java 14 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/task/service/impl/TaskLabelReportingEventServiceImpl.java 10 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/article/controller/ArticleController.java
@@ -1,9 +1,7 @@
package org.springblade.modules.article.controller;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@@ -19,9 +17,7 @@
import org.springframework.web.bind.annotation.*;
import javax.validation.Valid;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
/**
 * @author zhongrj
@@ -118,11 +114,11 @@
        objectUpdateWrapper.setSql("view_number = view_number + 1");
        objectUpdateWrapper.eq("id", article.getId());
        articleService.update(null, objectUpdateWrapper);
        List<List<String>> lists = new ArrayList<>();
        if (StringUtils.isNotBlank(detail.getArticleRange())) {
            lists = (List<List<String>>) JSON.parse(detail.getArticleRange());
        }
        detail.setArticleList(lists);
//        List<List<String>> lists = new ArrayList<>();
//        if (StringUtils.isNotBlank(detail.getArticleRange())) {
//            lists = (List<List<String>>) JSON.parse(detail.getArticleRange());
//        }
//        detail.setArticleList(lists);
        return R.data(detail);
    }
src/main/java/org/springblade/modules/article/entity/Article.java
@@ -105,13 +105,31 @@
    @TableField("create_user")
    private Long createUser;
    /** 是否删除 0:否  1:是 */
    /**
     * 是否删除 0:否  1:是
     */
    @ApiModelProperty(value = "是否删除 0:否  1:是", example = "")
    @TableField("is_deleted")
    private Integer isDeleted;
    /** 资讯范围 */
    /**
     * 资讯范围
     */
    @ApiModelProperty(value = "资讯范围", example = "")
    @TableField("article_range")
    private String articleRange;
    /**
     * 楼栋
     */
    @ApiModelProperty(value = "楼栋", example = "")
    @TableField("building")
    private String building;
    /**
     * 单元
     */
    @ApiModelProperty(value = "单元", example = "")
    @TableField("unit")
    private String unit;
}
src/main/java/org/springblade/modules/article/mapper/ArticleMapper.xml
@@ -23,7 +23,7 @@
        <result column="update_user" property="updateUser"/>
        <result column="create_user" property="createUser"/>
        <result column="is_deleted" property="isDeleted"/>
        <result property="articleRange"    column="article_range"    />
        <result property="articleRange" column="article_range"/>
        <collection property="countNumber" column="id" javaType="int" select="selectStlCount">
        </collection>
@@ -38,7 +38,6 @@
          and jnl.delete_flag = 0
          and jn.id = #{id}
    </select>
    <sql id="selectArticle">
@@ -61,7 +60,9 @@
            update_user,
            create_user,
            is_deleted,
            article_range
            article_range,
            building,
            unit
        from
            jczz_article
    </sql>
@@ -111,6 +112,15 @@
                and (ja.article_range like concat('%',#{article.districtId},'%')
                or ja.article_range is null)
            </if>
            <if test="article.building != null and article.building != ''">
                and (ja.building = #{article.building}
                or ja.building is null)
            </if>
            <if test="article.unit != null and article.unit != ''">
                and (ja.unit = #{article.unit}
                or ja.unit is null)
            </if>
        </if>
        <!-- 查询文章 -->
        <if test="article.eventType == null">
@@ -151,6 +161,16 @@
            <if test="article.districtId != null and article.districtId != ''">
                and (ja.article_range like concat('%',#{article.districtId},'%')
                or ja.article_range is null)
            </if>
            <if test="article.building != null and article.building != ''">
                and (ja.building = #{article.building}
                or ja.building is null)
            </if>
            <if test="article.unit != null and article.unit != ''">
                and (ja.unit = #{article.unit}
                or ja.unit is null)
            </if>
        </if>
@@ -242,7 +262,7 @@
        sys_collect col
        LEFT JOIN jczz_article art on art.id = col.collect_article
        WHERE
        1 = 1 AND collect_user =  #{article.userid}
        1 = 1 AND collect_user = #{article.userid}
        <if test="article.articleType!=null and article.articleType!=''">
            and article_type LIKE CONCAT ('%', #{article.articleType},'%')
        </if>
src/main/java/org/springblade/modules/article/vo/ArticleVO.java
@@ -4,7 +4,6 @@
import org.springblade.modules.article.entity.Article;
import java.io.Serializable;
import java.util.List;
@Data
public class ArticleVO extends Article implements Serializable {
@@ -69,7 +68,7 @@
    private Integer eventType;
    private List<List<String>> articleList;
//    private List<List<String>> articleList;
    private String houseCode;
src/main/java/org/springblade/modules/house/controller/HouseController.java
@@ -206,8 +206,34 @@
                                @RequestParam(value = "aoiCode", required = false) String aoiCode,
                                @RequestParam(value = "buildingCode", required = false) String buildingCode,
                                @RequestParam(value = "unitCode", required = false) String unitCode) {
        Map<String, Object> result = houseService.getHouseStatistics(code, roleType,aoiCode,buildingCode,unitCode);
        Map<String, Object> result = houseService.getHouseStatistics(code, roleType, aoiCode, buildingCode, unitCode);
        return R.data(result);
    }
    /**
     * 通过小区id查询小区的栋
     *
     * @param districtCode
     * @return
     */
    @GetMapping("/getHouseBuilding")
    @ApiOperation(value = "通过小区id查询小区的栋", notes = "传入小区id")
    public R<List<String>> getHouseBuilding(@RequestParam("districtCode") String districtCode) {
        List<String> detail = houseService.getHouseBuilding(districtCode);
        return R.data(detail);
    }
    /**
     * 通过小区id查询小区的单元
     *
     * @param districtCode
     * @return
     */
    @GetMapping("/getHouseUnit")
    @ApiOperation(value = "通过小区id查询小区的单元", notes = "传入小区id")
    public R<List<String>> getHouseUnit(@RequestParam("districtCode") String districtCode, @RequestParam("building") String building) {
        List<String> detail = houseService.getHouseUnit(districtCode, building);
        return R.data(detail);
    }
}
src/main/java/org/springblade/modules/house/mapper/HouseMapper.java
@@ -78,4 +78,8 @@
    Integer getHouseStatisticsThree(String code, Long userId, String aoiCode, String buildingCode, String unitCode, String roleType);
    Integer getHouseStatisticsFour(String code, Long userId, String aoiCode, String buildingCode, String unitCode, String roleType);
    List<String> getHouseBuilding(String districtCode);
    List<String> getHouseUnit(String districtCode, String building);
}
src/main/java/org/springblade/modules/house/mapper/HouseMapper.xml
@@ -34,7 +34,7 @@
                <choose>
                    <when test="list != null and list.size()>0">
                        and house_code in
                        <foreach collection="list" item="houseCode" separator ="," open="("  close=")">
                        <foreach collection="list" item="houseCode" separator="," open="(" close=")">
                            #{houseCode}
                        </foreach>
                    </when>
@@ -97,7 +97,8 @@
        <result column="update_time" property="updateTime"/>
        <result column="remark" property="remark"/>
        <result column="is_deleted" property="isDeleted"/>
        <collection property="userHouseLabelVOList" javaType="java.util.List" select="selectHouseLabelPage"  column="house_code"
        <collection property="userHouseLabelVOList" javaType="java.util.List" select="selectHouseLabelPage"
                    column="house_code"
                    ofType="org.springblade.modules.house.vo.UserHouseLabelVO" autoMapping="true">
        </collection>
    </resultMap>
@@ -141,12 +142,14 @@
        left join jczz_grid jg on jg.id = jgr.grid_id and jg.is_deleted = 0
        left join blade_region br on br.code = jg.community_code
        where jh.is_deleted = 0
        <if test="house.id != null "> and jh.id = #{house.id}</if>
        <if test="house.id != null ">and jh.id = #{house.id}</if>
        <if test="house.streetCode != null and house.streetCode != ''">
            and jda.town_street_code like concat('%',#{house.streetCode},'%')
        </if>
        <if test="house.houseCode != null  and house.houseCode != ''"> and jh.house_code = #{house.houseCode}</if>
        <if test="house.districtCode != null  and house.districtCode != ''"> and jh.district_code = #{house.districtCode}</if>
        <if test="house.houseCode != null  and house.houseCode != ''">and jh.house_code = #{house.houseCode}</if>
        <if test="house.districtCode != null  and house.districtCode != ''">and jh.district_code =
            #{house.districtCode}
        </if>
        <if test="house.districtName != null  and house.districtName != ''">
            and jh.district_name like concat('%',#{house.districtName},'%')
        </if>
@@ -156,18 +159,20 @@
        <if test="house.neiName!=null and house.neiName!=''">
            and br.name like concat('%',#{house.neiName},'%')
        </if>
        <if test="house.houseName != null  and house.houseName != ''"> and jh.house_name like concat('%',#{house.houseName},'%')</if>
        <if test="house.phone != null  and house.phone != ''"> and jh.phone = #{house.phone}</if>
        <if test="house.area != null "> and jh.area = #{house.area}</if>
        <if test="house.propertyPrice != null "> and jh.property_price = #{house.propertyPrice}</if>
        <if test="house.serviceDue != null "> and jh.service_due = #{house.serviceDue}</if>
        <if test="house.floor != null "> and jh.floor = #{house.floor}</if>
        <if test="house.building != null  and house.building != ''"> and jh.building = #{house.building}</if>
        <if test="house.unit != null  and house.unit != ''"> and jh.unit = #{house.unit}</if>
        <if test="house.room != null  and house.room != ''"> and jh.room = #{house.room}</if>
        <if test="house.buildingNo != null "> and jh.building_no = #{house.buildingNo}</if>
        <if test="house.houseName != null  and house.houseName != ''">and jh.house_name like
            concat('%',#{house.houseName},'%')
        </if>
        <if test="house.phone != null  and house.phone != ''">and jh.phone = #{house.phone}</if>
        <if test="house.area != null ">and jh.area = #{house.area}</if>
        <if test="house.propertyPrice != null ">and jh.property_price = #{house.propertyPrice}</if>
        <if test="house.serviceDue != null ">and jh.service_due = #{house.serviceDue}</if>
        <if test="house.floor != null ">and jh.floor = #{house.floor}</if>
        <if test="house.building != null  and house.building != ''">and jh.building = #{house.building}</if>
        <if test="house.unit != null  and house.unit != ''">and jh.unit = #{house.unit}</if>
        <if test="house.room != null  and house.room != ''">and jh.room = #{house.room}</if>
        <if test="house.buildingNo != null ">and jh.building_no = #{house.buildingNo}</if>
        <if test="house.regionCode != null and house.regionCode !='' ">
         and jg.community_code like concat('%',#{house.regionCode},'%')
            and jg.community_code like concat('%',#{house.regionCode},'%')
        </if>
    </select>
@@ -198,22 +203,23 @@
        concat(building," ",unit," ",room) as address
        from jczz_house
        where is_deleted = 0
        <if test="house.id != null "> and id = #{house.id}</if>
        <if test="house.houseCode != null  and house.houseCode != ''"> and house_code = #{house.houseCode}</if>
        <if test="house.districtCode != null  and house.districtCode != ''"> and district_code = #{house.districtCode}</if>
        <if test="house.id != null ">and id = #{house.id}</if>
        <if test="house.houseCode != null  and house.houseCode != ''">and house_code = #{house.houseCode}</if>
        <if test="house.districtCode != null  and house.districtCode != ''">and district_code = #{house.districtCode}
        </if>
        <if test="house.districtName != null  and house.districtName != ''">
            and district_name like concat('%',#{house.districtName},'%')
        </if>
        <if test="house.houseName != null  and house.houseName != ''"> and house_name = #{house.houseName}</if>
        <if test="house.phone != null  and house.phone != ''"> and phone = #{house.phone}</if>
        <if test="house.area != null "> and area = #{house.area}</if>
        <if test="house.propertyPrice != null "> and property_price = #{house.propertyPrice}</if>
        <if test="house.serviceDue != null "> and service_due = #{house.serviceDue}</if>
        <if test="house.floor != null "> and floor = #{house.floor}</if>
        <if test="house.building != null  and house.building != ''"> and building = #{house.building}</if>
        <if test="house.unit != null  and house.unit != ''"> and unit = #{house.unit}</if>
        <if test="house.room != null  and house.room != ''"> and room = #{house.room}</if>
        <if test="house.buildingNo != null "> and building_no = #{house.buildingNo}</if>
        <if test="house.houseName != null  and house.houseName != ''">and house_name = #{house.houseName}</if>
        <if test="house.phone != null  and house.phone != ''">and phone = #{house.phone}</if>
        <if test="house.area != null ">and area = #{house.area}</if>
        <if test="house.propertyPrice != null ">and property_price = #{house.propertyPrice}</if>
        <if test="house.serviceDue != null ">and service_due = #{house.serviceDue}</if>
        <if test="house.floor != null ">and floor = #{house.floor}</if>
        <if test="house.building != null  and house.building != ''">and building = #{house.building}</if>
        <if test="house.unit != null  and house.unit != ''">and unit = #{house.unit}</if>
        <if test="house.room != null  and house.room != ''">and room = #{house.room}</if>
        <if test="house.buildingNo != null ">and building_no = #{house.buildingNo}</if>
    </select>
@@ -225,7 +231,8 @@
        jda.nei_code as parentCode
        FROM jczz_house jh
        left join
        (select nei_code,aoi_code from jczz_doorplate_address where nei_code = #{houseParam.code} group by nei_code,aoi_code) jda
        (select nei_code,aoi_code from jczz_doorplate_address where nei_code = #{houseParam.code} group by
        nei_code,aoi_code) jda
        on jda.aoi_code = jh.district_code
        WHERE jda.nei_code = #{houseParam.code}
        <include refid="filterHouseGrid"/>
@@ -238,7 +245,8 @@
        district_code as parentCode
        FROM jczz_house jh
        left join
        (select nei_code,aoi_code from jczz_doorplate_address where nei_code = #{houseParam.code} group by nei_code,aoi_code) jda
        (select nei_code,aoi_code from jczz_doorplate_address where nei_code = #{houseParam.code} group by
        nei_code,aoi_code) jda
        on jda.aoi_code = jh.district_code
        WHERE jda.nei_code = #{houseParam.code}
        <include refid="filterHouseGrid"/>
@@ -252,7 +260,8 @@
        building as parentCode
        FROM jczz_house jh
        left join
        (select nei_code,aoi_code from jczz_doorplate_address where nei_code = #{houseParam.code} group by nei_code,aoi_code) jda
        (select nei_code,aoi_code from jczz_doorplate_address where nei_code = #{houseParam.code} group by
        nei_code,aoi_code) jda
        on jda.aoi_code = jh.district_code
        WHERE jda.nei_code = #{houseParam.code}
        <include refid="filterHouseGrid"/>
@@ -276,7 +285,7 @@
    <select id="getHouseStatisticsOne" resultType="java.lang.Integer">
     SELECT
        SELECT
        count( 1 )
        FROM
        (
@@ -300,17 +309,17 @@
            and jda.aoi_code=#{aoiCode}
        </if>
        <if test="userId != null and roleType == '1'">
        AND jda.address_code IN (
        SELECT DISTINCT
        jgr.house_code
        FROM
        jczz_grid jg
        LEFT JOIN jczz_gridman jgm ON jg.id = jgm.grid_id
        LEFT JOIN jczz_grid_range jgr ON jgr.grid_id = jg.id
        WHERE
        jgm.user_id = #{userId}
        AND jg.is_deleted = 0
        )
            AND jda.address_code IN (
            SELECT DISTINCT
            jgr.house_code
            FROM
            jczz_grid jg
            LEFT JOIN jczz_gridman jgm ON jg.id = jgm.grid_id
            LEFT JOIN jczz_grid_range jgr ON jgr.grid_id = jg.id
            WHERE
            jgm.user_id = #{userId}
            AND jg.is_deleted = 0
            )
        </if>
        <if test="userId != null and roleType == '3'">
            AND jda.address_code IN (SELECT
@@ -388,7 +397,7 @@
        jczz_household jhh
        LEFT JOIN jczz_doorplate_address jda ON jda.address_code = jhh.house_code
        WHERE
        jda.nei_code =  #{code}
        jda.nei_code = #{code}
        AND jhh.is_deleted = 0
        and jda.doorplate_type = '户室牌'
        <if test="buildingCode != null  and buildingCode != ''">
@@ -482,5 +491,29 @@
    </select>
    <select id="getHouseBuilding" resultType="java.lang.String">
        SELECT DISTINCT
            jh.building
        FROM
            jczz_house jh
            LEFT JOIN jczz_district jd ON jd.aoi_code = jh.district_code
        WHERE
            jd.id = #{districtCode}
            and jh.building is not null
    </select>
    <select id="getHouseUnit" resultType="java.lang.String">
         SELECT DISTINCT
            jh.unit
        FROM
            jczz_house jh
            LEFT JOIN jczz_district jd ON jd.aoi_code = jh.district_code
        WHERE
            jd.id = #{districtCode}
            and jd.building = #{building}
            and jh.building is not null
    </select>
</mapper>
src/main/java/org/springblade/modules/house/service/IHouseService.java
@@ -16,14 +16,14 @@
 */
package org.springblade.modules.house.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springblade.modules.house.entity.HouseEntity;
import org.springblade.modules.house.excel.HouseAndHoldExcel;
import org.springblade.modules.house.excel.HouseExcel;
import org.springblade.modules.house.vo.HouseParam;
import org.springblade.modules.house.vo.HouseTree;
import org.springblade.modules.house.vo.HouseVO;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.modules.house.excel.HouseExcel;
import java.util.List;
import java.util.Map;
@@ -68,14 +68,19 @@
     * @param houseParam
     * @return
     */
    List<HouseTree> getHouseTree(HouseParam houseParam);
    List<HouseTree> getHouseTree(HouseParam houseParam);
    /**
     * 人房数据导入
     *
     * @param data
     * @param isCovered
     */
    void importHouseAndHold(List<HouseAndHoldExcel> data, Boolean isCovered);
    Map<String, Object> getHouseStatistics(String code, String roleType,String aoiCode,String buildingCode,String unitCode);
    Map<String, Object> getHouseStatistics(String code, String roleType, String aoiCode, String buildingCode, String unitCode);
    List<String> getHouseBuilding(String districtCode);
    List<String> getHouseUnit(String districtCode, String building);
}
src/main/java/org/springblade/modules/house/service/impl/HouseServiceImpl.java
@@ -678,4 +678,14 @@
        }
        return objectObjectHashMap;
    }
    @Override
    public List<String> getHouseBuilding(String districtCode) {
        return baseMapper.getHouseBuilding(districtCode);
    }
    @Override
    public List<String> getHouseUnit(String districtCode, String building) {
        return baseMapper.getHouseUnit(districtCode, building);
    }
}
src/main/java/org/springblade/modules/task/controller/TaskBailReportingEventController.java
@@ -16,26 +16,25 @@
 */
package org.springblade.modules.task.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import lombok.AllArgsConstructor;
import javax.validation.Valid;
import org.springblade.core.secure.BladeUser;
import org.springblade.core.boot.ctrl.BladeController;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.Func;
import org.springblade.modules.task.dto.TaskBailReportingEventDTO;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.modules.task.entity.TaskBailReportingEventEntity;
import org.springblade.modules.task.service.ITaskBailReportingEventService;
import org.springblade.modules.task.vo.TaskBailReportingEventVO;
import org.springblade.modules.task.wrapper.TaskBailReportingEventWrapper;
import org.springblade.modules.task.service.ITaskBailReportingEventService;
import org.springblade.core.boot.ctrl.BladeController;
import org.springframework.web.bind.annotation.*;
import javax.validation.Valid;
/**
 * 取保候审任务 控制器
@@ -99,7 +98,7 @@
    @PostMapping("/update")
    @ApiOperationSupport(order = 5)
    @ApiOperation(value = "修改", notes = "传入taskBailReportingEvent")
    public R update(@Valid @RequestBody TaskBailReportingEventEntity taskBailReportingEvent) {
    public R update(@Valid @RequestBody TaskBailReportingEventEntity taskBailReportingEvent) throws Exception {
        return R.status(taskBailReportingEventService.updateBailReporting(taskBailReportingEvent));
    }
src/main/java/org/springblade/modules/task/controller/TaskCampusReportingEventController.java
@@ -16,26 +16,25 @@
 */
package org.springblade.modules.task.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import lombok.AllArgsConstructor;
import javax.validation.Valid;
import org.springblade.core.secure.BladeUser;
import org.springblade.core.boot.ctrl.BladeController;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.Func;
import org.springblade.modules.task.dto.TaskCampusReportingEventDTO;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.modules.task.entity.TaskCampusReportingEventEntity;
import org.springblade.modules.task.service.ITaskCampusReportingEventService;
import org.springblade.modules.task.vo.TaskCampusReportingEventVO;
import org.springblade.modules.task.wrapper.TaskCampusReportingEventWrapper;
import org.springblade.modules.task.service.ITaskCampusReportingEventService;
import org.springblade.core.boot.ctrl.BladeController;
import org.springframework.web.bind.annotation.*;
import javax.validation.Valid;
/**
 * 校园安全检查任务表 控制器
@@ -99,7 +98,7 @@
    @PostMapping("/update")
    @ApiOperationSupport(order = 5)
    @ApiOperation(value = "修改", notes = "传入taskCampusReportingEvent")
    public R update(@Valid @RequestBody TaskCampusReportingEventDTO taskCampusReportingEvent) {
    public R update(@Valid @RequestBody TaskCampusReportingEventDTO taskCampusReportingEvent) throws Exception {
        return R.status(taskCampusReportingEventService.updateCampusReporting(taskCampusReportingEvent));
    }
src/main/java/org/springblade/modules/task/controller/TaskHotelReportingController.java
@@ -16,26 +16,25 @@
 */
package org.springblade.modules.task.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import lombok.AllArgsConstructor;
import javax.validation.Valid;
import org.springblade.core.secure.BladeUser;
import org.springblade.core.boot.ctrl.BladeController;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.Func;
import org.springblade.modules.task.dto.TaskHotelReportingDTO;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.modules.task.entity.TaskHotelReportingEntity;
import org.springblade.modules.task.service.ITaskHotelReportingService;
import org.springblade.modules.task.vo.TaskHotelReportingVO;
import org.springblade.modules.task.wrapper.TaskHotelReportingWrapper;
import org.springblade.modules.task.service.ITaskHotelReportingService;
import org.springblade.core.boot.ctrl.BladeController;
import org.springframework.web.bind.annotation.*;
import javax.validation.Valid;
/**
 * 旅馆安全自查任务 控制器
@@ -99,7 +98,7 @@
    @PostMapping("/update")
    @ApiOperationSupport(order = 5)
    @ApiOperation(value = "修改", notes = "传入taskHotelReporting")
    public R update(@Valid @RequestBody TaskHotelReportingEntity taskHotelReporting) {
    public R update(@Valid @RequestBody TaskHotelReportingEntity taskHotelReporting) throws Exception {
        return R.status(taskHotelReportingService.updateHotelReporting(taskHotelReporting));
    }
src/main/java/org/springblade/modules/task/controller/TaskLabelReportingEventController.java
@@ -16,26 +16,25 @@
 */
package org.springblade.modules.task.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import lombok.AllArgsConstructor;
import javax.validation.Valid;
import org.springblade.core.secure.BladeUser;
import org.springblade.core.boot.ctrl.BladeController;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.Func;
import org.springblade.modules.task.dto.TaskLabelReportingEventDTO;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.modules.task.entity.TaskLabelReportingEventEntity;
import org.springblade.modules.task.service.ITaskLabelReportingEventService;
import org.springblade.modules.task.vo.TaskLabelReportingEventVO;
import org.springblade.modules.task.wrapper.TaskLabelReportingEventWrapper;
import org.springblade.modules.task.service.ITaskLabelReportingEventService;
import org.springblade.core.boot.ctrl.BladeController;
import org.springframework.web.bind.annotation.*;
import javax.validation.Valid;
/**
 * 打金店报事 控制器
@@ -99,7 +98,7 @@
    @PostMapping("/update")
    @ApiOperationSupport(order = 5)
    @ApiOperation(value = "修改", notes = "传入taskLabelReportingEvent")
    public R update(@Valid @RequestBody TaskLabelReportingEventEntity taskLabelReportingEvent) {
    public R update(@Valid @RequestBody TaskLabelReportingEventEntity taskLabelReportingEvent) throws Exception {
        return R.status(taskLabelReportingEventService.updateLabelReporting(taskLabelReportingEvent));
    }
src/main/java/org/springblade/modules/task/service/ITaskBailReportingEventService.java
@@ -16,12 +16,11 @@
 */
package org.springblade.modules.task.service;
import liquibase.pro.packaged.B;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.core.mp.base.BaseService;
import org.springblade.modules.task.dto.TaskBailReportingEventDTO;
import org.springblade.modules.task.entity.TaskBailReportingEventEntity;
import org.springblade.modules.task.vo.TaskBailReportingEventVO;
import org.springblade.core.mp.base.BaseService;
import com.baomidou.mybatisplus.core.metadata.IPage;
/**
 * 取保候审任务 服务类
@@ -41,7 +40,7 @@
    IPage<TaskBailReportingEventVO> selectTaskBailReportingEventPage(IPage<TaskBailReportingEventVO> page, TaskBailReportingEventVO taskBailReportingEvent);
    Boolean saveBailReporting(TaskBailReportingEventDTO taskBailReportingEvent);
    Boolean saveBailReporting(TaskBailReportingEventDTO taskBailReportingEvent);
    Boolean updateBailReporting(TaskBailReportingEventEntity taskBailReportingEvent);
    Boolean updateBailReporting(TaskBailReportingEventEntity taskBailReportingEvent) throws Exception;
}
src/main/java/org/springblade/modules/task/service/ITaskCampusReportingEventService.java
@@ -18,7 +18,6 @@
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springblade.core.mp.base.BaseService;
import org.springblade.modules.task.dto.TaskCampusReportingEventDTO;
import org.springblade.modules.task.entity.TaskCampusReportingEventEntity;
import org.springblade.modules.task.vo.TaskCampusReportingEventVO;
@@ -43,5 +42,5 @@
    Boolean saveCampusReporting(TaskCampusReportingEventDTO taskCampusReportingEvent);
    Boolean updateCampusReporting(TaskCampusReportingEventDTO taskCampusReportingEvent);
    Boolean updateCampusReporting(TaskCampusReportingEventDTO taskCampusReportingEvent) throws Exception;
}
src/main/java/org/springblade/modules/task/service/ITaskHotelReportingService.java
@@ -16,11 +16,11 @@
 */
package org.springblade.modules.task.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.core.mp.base.BaseService;
import org.springblade.modules.task.dto.TaskHotelReportingDTO;
import org.springblade.modules.task.entity.TaskHotelReportingEntity;
import org.springblade.modules.task.vo.TaskHotelReportingVO;
import org.springblade.core.mp.base.BaseService;
import com.baomidou.mybatisplus.core.metadata.IPage;
/**
 * 旅馆安全自查任务 服务类
@@ -41,10 +41,11 @@
    /**
     * 保存酒店自查任务
     *
     * @param taskHotelReporting
     * @return
     */
    boolean saveHotelReporting(TaskHotelReportingDTO taskHotelReporting);
    Boolean updateHotelReporting(TaskHotelReportingEntity taskHotelReporting);
    Boolean updateHotelReporting(TaskHotelReportingEntity taskHotelReporting) throws Exception;
}
src/main/java/org/springblade/modules/task/service/ITaskLabelReportingEventService.java
@@ -16,11 +16,11 @@
 */
package org.springblade.modules.task.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.core.mp.base.BaseService;
import org.springblade.modules.task.dto.TaskLabelReportingEventDTO;
import org.springblade.modules.task.entity.TaskLabelReportingEventEntity;
import org.springblade.modules.task.vo.TaskLabelReportingEventVO;
import org.springblade.core.mp.base.BaseService;
import com.baomidou.mybatisplus.core.metadata.IPage;
/**
 * 打金店报事 服务类
@@ -40,7 +40,7 @@
    IPage<TaskLabelReportingEventVO> selectTaskLabelReportingEventPage(IPage<TaskLabelReportingEventVO> page, TaskLabelReportingEventVO taskLabelReportingEvent);
    Boolean saveReportingEven(TaskLabelReportingEventDTO taskLabelReportingEvent);
    Boolean saveReportingEven(TaskLabelReportingEventDTO taskLabelReportingEvent);
    Boolean updateLabelReporting(TaskLabelReportingEventEntity taskLabelReportingEvent);
    Boolean updateLabelReporting(TaskLabelReportingEventEntity taskLabelReportingEvent) throws Exception;
}
src/main/java/org/springblade/modules/task/service/impl/TaskBailReportingEventServiceImpl.java
@@ -43,6 +43,7 @@
    @Resource
    private ITaskService taskService;
    @Override
    public IPage<TaskBailReportingEventVO> selectTaskBailReportingEventPage(IPage<TaskBailReportingEventVO> page, TaskBailReportingEventVO taskBailReportingEvent) {
        return page.setRecords(baseMapper.selectTaskBailReportingEventPage(page, taskBailReportingEvent));
@@ -51,23 +52,27 @@
    @Override
    public Boolean saveBailReporting(TaskBailReportingEventDTO bailReporting) {
        Long aLong = taskService.saveTask(3, DictConstant.BAIL_PENDING_TRIAL, 1, "", AuthUtil.getUserId(),bailReporting.getHouseCode(),bailReporting.getReportType());
        Long aLong = taskService.saveTask(3, DictConstant.BAIL_PENDING_TRIAL, 1, "", AuthUtil.getUserId(), bailReporting.getHouseCode(), bailReporting.getReportType());
        if (aLong > 0) {
            bailReporting.setTaskId(aLong);
            bailReporting.setCheckUserId(AuthUtil.getUserId());
            return baseMapper.insert(bailReporting) > 0 ? true : false;
            return baseMapper.insert(bailReporting) > 0;
        }
        return false;
    }
    @Override
    public Boolean updateBailReporting(TaskBailReportingEventEntity taskBailReportingEvent) {
    public Boolean updateBailReporting(TaskBailReportingEventEntity taskBailReportingEvent) throws Exception {
        Integer integer = StringUtils.isBlank(taskBailReportingEvent.getConfirmFlag()) ? null : Integer.valueOf(taskBailReportingEvent.getConfirmFlag());
        Long aLong = taskService.updateTask(null, null, null, "", AuthUtil.getUserId(), taskBailReportingEvent.getTaskId(), integer);
        if (aLong > 0) {
            taskBailReportingEvent.setConfirmUserId(AuthUtil.getUserId());
            taskBailReportingEvent.setConfirmTime(new Date());
            return baseMapper.updateById(taskBailReportingEvent) > 0 ? true : false;
            Boolean b = baseMapper.updateById(taskBailReportingEvent) > 0;
            if (b) {
                return b;
            }
            throw new Exception("更新失败!");
        }
        return false;
    }
src/main/java/org/springblade/modules/task/service/impl/TaskCampusReportingEventServiceImpl.java
@@ -16,20 +16,18 @@
 */
package org.springblade.modules.task.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.apache.commons.lang3.StringUtils;
import org.springblade.common.constant.DictConstant;
import org.springblade.core.secure.utils.AuthUtil;
import org.springblade.modules.task.dto.TaskCampusReportingEventDTO;
import org.springblade.modules.task.entity.TaskBailReportingEventEntity;
import org.springblade.modules.task.entity.TaskCampusReportingEventEntity;
import org.springblade.modules.task.service.ITaskService;
import org.springblade.modules.task.vo.TaskCampusReportingEventVO;
import org.springblade.modules.task.mapper.TaskCampusReportingEventMapper;
import org.springblade.modules.task.service.ITaskCampusReportingEventService;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springblade.modules.task.service.ITaskService;
import org.springblade.modules.task.vo.TaskCampusReportingEventVO;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import javax.annotation.Resource;
import java.util.Date;
@@ -57,20 +55,24 @@
        if (aLong > 0) {
            reporting.setTaskId(aLong);
            reporting.setCheckUserId(AuthUtil.getUserId());
            return baseMapper.insert(reporting) > 0 ? true : false;
            return baseMapper.insert(reporting) > 0;
        }
        return false;
    }
    @Override
    public Boolean updateCampusReporting(TaskCampusReportingEventDTO taskCampusReportingEvent) {
    public Boolean updateCampusReporting(TaskCampusReportingEventDTO taskCampusReportingEvent) throws Exception {
        Integer integer = StringUtils.isBlank(taskCampusReportingEvent.getConfirmFlag()) ? null : Integer.valueOf(taskCampusReportingEvent.getConfirmFlag());
        Long aLong = taskService.updateTask(null, null, null, "", AuthUtil.getUserId(), taskCampusReportingEvent.getTaskId(), integer);
        if (aLong > 0) {
            taskCampusReportingEvent.setConfirmUserId(AuthUtil.getUserId());
            taskCampusReportingEvent.setConfirmTime(new Date());
            return baseMapper.updateById(taskCampusReportingEvent) > 0 ? true : false;
            Boolean b = baseMapper.updateById(taskCampusReportingEvent) > 0;
            if (b) {
                return b;
            }
            throw new Exception("更新失败!");
        }
        return false;
    }
src/main/java/org/springblade/modules/task/service/impl/TaskHotelReportingServiceImpl.java
@@ -27,6 +27,7 @@
import org.springblade.modules.task.service.ITaskService;
import org.springblade.modules.task.vo.TaskHotelReportingVO;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.util.Date;
@@ -51,24 +52,29 @@
    @Override
    public boolean saveHotelReporting(TaskHotelReportingDTO taskHotelReporting) {
        Long aLong = taskService.saveTask(2, DictConstant.HOTEL_SECURITY, 1, "", AuthUtil.getUserId(),taskHotelReporting.getHouseCode(),taskHotelReporting.getReportType());
        Long aLong = taskService.saveTask(2, DictConstant.HOTEL_SECURITY, 1, "", AuthUtil.getUserId(), taskHotelReporting.getHouseCode(), taskHotelReporting.getReportType());
        if (aLong > 0) {
            taskHotelReporting.setTaskId(aLong);
            taskHotelReporting.setCheckUserId(AuthUtil.getUserId());
            return baseMapper.insert(taskHotelReporting) > 0 ? true : false;
            return baseMapper.insert(taskHotelReporting) > 0;
        }
        return false;
    }
    @Override
    public Boolean updateHotelReporting(TaskHotelReportingEntity taskHotelReporting) {
    @Transactional(rollbackFor = Exception.class)
    public Boolean updateHotelReporting(TaskHotelReportingEntity taskHotelReporting) throws Exception {
        Long aLong = taskService.updateTask(null, null, null, "", AuthUtil.getUserId(), taskHotelReporting.getTaskId(), taskHotelReporting.getStatus());
        if (aLong > 0) {
            taskHotelReporting.setConfirmFlag(taskHotelReporting.getStatus().toString());
            taskHotelReporting.setConfirmUserId(AuthUtil.getUserId());
            taskHotelReporting.setConfirmTime(new Date());
            return baseMapper.updateById(taskHotelReporting) > 0 ? true : false;
            boolean b = baseMapper.updateById(taskHotelReporting) > 0;
            if (b) {
                return b;
            }
            throw new Exception("更新失败!");
        }
        return false;
    }
src/main/java/org/springblade/modules/task/service/impl/TaskLabelReportingEventServiceImpl.java
@@ -69,21 +69,25 @@
            taskLabelReportingEvent.setTaskId(aLong);
            taskLabelReportingEvent.setUserId(AuthUtil.getUserId());
            taskLabelReportingEvent.setLabelName(name);
            return baseMapper.insert(taskLabelReportingEvent) > 0 ? true : false;
            return baseMapper.insert(taskLabelReportingEvent) > 0;
        }
        return false;
    }
    @Override
    public Boolean updateLabelReporting(TaskLabelReportingEventEntity taskLabelReportingEvent) {
    public Boolean updateLabelReporting(TaskLabelReportingEventEntity taskLabelReportingEvent) throws Exception {
        Long aLong = taskService.updateTask(null, null, null, "", AuthUtil.getUserId(),
            taskLabelReportingEvent.getTaskId(), taskLabelReportingEvent.getStatus());
        if (aLong > 0) {
            taskLabelReportingEvent.setConfirmFlag(taskLabelReportingEvent.getStatus().toString());
            taskLabelReportingEvent.setConfirmUserId(AuthUtil.getUserId());
            taskLabelReportingEvent.setConfirmTime(new Date());
            return baseMapper.updateById(taskLabelReportingEvent) > 0 ? true : false;
            Boolean b = baseMapper.updateById(taskLabelReportingEvent) > 0;
            if (b) {
                return b;
            }
            throw new Exception("更新失败!");
        }
        return false;
    }