| | |
| | | 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; |
| | |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.validation.Valid; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author zhongrj |
| | |
| | | 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); |
| | | } |
| | | |
| | |
| | | @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; |
| | | } |
| | |
| | | </select> |
| | | |
| | | |
| | | |
| | | <sql id="selectArticle"> |
| | | select |
| | | id, |
| | |
| | | update_user, |
| | | create_user, |
| | | is_deleted, |
| | | article_range |
| | | article_range, |
| | | building, |
| | | unit |
| | | from |
| | | jczz_article |
| | | </sql> |
| | |
| | | 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"> |
| | |
| | | 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> |
| | | |
| | | order by ja.create_time desc |
| | |
| | | import org.springblade.modules.article.entity.Article; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class ArticleVO extends Article implements Serializable { |
| | |
| | | |
| | | private Integer eventType; |
| | | |
| | | private List<List<String>> articleList; |
| | | // private List<List<String>> articleList; |
| | | |
| | | |
| | | private String houseCode; |
| | |
| | | @RequestParam(value = "unitCode", required = false) String 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); |
| | | } |
| | | |
| | | } |
| | |
| | | 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); |
| | | } |
| | |
| | | <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> |
| | |
| | | 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.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> |
| | |
| | | <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.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> |
| | |
| | | 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.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> |
| | |
| | | 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"/> |
| | |
| | | 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"/> |
| | |
| | | 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"/> |
| | |
| | | |
| | | </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> |
| | |
| | | */ |
| | | 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; |
| | |
| | | |
| | | /** |
| | | * 人房数据导入 |
| | | * |
| | | * @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); |
| | | |
| | | List<String> getHouseBuilding(String districtCode); |
| | | |
| | | List<String> getHouseUnit(String districtCode, String building); |
| | | } |
| | |
| | | } |
| | | 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); |
| | | } |
| | | } |
| | |
| | | */ |
| | | 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; |
| | | |
| | | /** |
| | | * 取保候审任务 控制器 |
| | |
| | | @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)); |
| | | } |
| | | |
| | |
| | | */ |
| | | 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; |
| | | |
| | | /** |
| | | * 校园安全检查任务表 控制器 |
| | |
| | | @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)); |
| | | } |
| | | |
| | |
| | | */ |
| | | 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; |
| | | |
| | | /** |
| | | * 旅馆安全自查任务 控制器 |
| | |
| | | @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)); |
| | | } |
| | | |
| | |
| | | */ |
| | | 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; |
| | | |
| | | /** |
| | | * 打金店报事 控制器 |
| | |
| | | @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)); |
| | | } |
| | | |
| | |
| | | */ |
| | | 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; |
| | | |
| | | /** |
| | | * 取保候审任务 服务类 |
| | |
| | | |
| | | Boolean saveBailReporting(TaskBailReportingEventDTO taskBailReportingEvent); |
| | | |
| | | Boolean updateBailReporting(TaskBailReportingEventEntity taskBailReportingEvent); |
| | | Boolean updateBailReporting(TaskBailReportingEventEntity taskBailReportingEvent) throws Exception; |
| | | } |
| | |
| | | |
| | | 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; |
| | |
| | | |
| | | Boolean saveCampusReporting(TaskCampusReportingEventDTO taskCampusReportingEvent); |
| | | |
| | | Boolean updateCampusReporting(TaskCampusReportingEventDTO taskCampusReportingEvent); |
| | | Boolean updateCampusReporting(TaskCampusReportingEventDTO taskCampusReportingEvent) throws Exception; |
| | | } |
| | |
| | | */ |
| | | 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; |
| | | |
| | | /** |
| | | * 旅馆安全自查任务 服务类 |
| | |
| | | |
| | | /** |
| | | * 保存酒店自查任务 |
| | | * |
| | | * @param taskHotelReporting |
| | | * @return |
| | | */ |
| | | boolean saveHotelReporting(TaskHotelReportingDTO taskHotelReporting); |
| | | |
| | | Boolean updateHotelReporting(TaskHotelReportingEntity taskHotelReporting); |
| | | Boolean updateHotelReporting(TaskHotelReportingEntity taskHotelReporting) throws Exception; |
| | | } |
| | |
| | | */ |
| | | 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; |
| | | |
| | | /** |
| | | * 打金店报事 服务类 |
| | |
| | | |
| | | Boolean saveReportingEven(TaskLabelReportingEventDTO taskLabelReportingEvent); |
| | | |
| | | Boolean updateLabelReporting(TaskLabelReportingEventEntity taskLabelReportingEvent); |
| | | Boolean updateLabelReporting(TaskLabelReportingEventEntity taskLabelReportingEvent) throws Exception; |
| | | } |
| | |
| | | |
| | | @Resource |
| | | private ITaskService taskService; |
| | | |
| | | @Override |
| | | public IPage<TaskBailReportingEventVO> selectTaskBailReportingEventPage(IPage<TaskBailReportingEventVO> page, TaskBailReportingEventVO taskBailReportingEvent) { |
| | | return page.setRecords(baseMapper.selectTaskBailReportingEventPage(page, taskBailReportingEvent)); |
| | |
| | | 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; |
| | | } |
| | |
| | | */ |
| | | 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; |
| | |
| | | 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; |
| | | } |
| | |
| | | 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; |
| | |
| | | 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; |
| | | } |
| | |
| | | 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; |
| | | } |