| | |
| | | import com.fasterxml.jackson.databind.annotation.JsonSerialize; |
| | | import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; |
| | | import lombok.Data; |
| | | import org.springblade.modules.category.dto.CategoryLabelDTO; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.ArrayList; |
| | |
| | | private List<TreeStringNode> children = new ArrayList<>(); |
| | | |
| | | /** |
| | | * 标签节点 |
| | | */ |
| | | private List<CategoryLabelDTO> categoryLabelList; |
| | | |
| | | /** |
| | | * 是否有子孙节点 |
| | | */ |
| | | @JsonInclude(JsonInclude.Include.NON_EMPTY) |
| | |
| | | public class CategoryLabelDTO extends CategoryLabelEntity { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | private String placeId; |
| | | |
| | | } |
| | |
| | | */ |
| | | package org.springblade.modules.category.mapper; |
| | | |
| | | import org.springblade.modules.category.dto.CategoryLabelDTO; |
| | | import org.springblade.modules.category.entity.CategoryLabelEntity; |
| | | import org.springblade.modules.category.vo.CategoryLabelVO; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | |
| | | */ |
| | | List<CategoryLabelVO> selectCategoryLabelPage(IPage page, CategoryLabelVO categoryLabel); |
| | | |
| | | /** |
| | | * 查询场所标签临时表 |
| | | * |
| | | * @param id 场所标签临时表ID |
| | | * @return 场所标签临时表 |
| | | */ |
| | | public CategoryLabelDTO selectCategoryLabelById(Integer id); |
| | | |
| | | /** |
| | | * 查询场所标签临时表列表 |
| | | * |
| | | * @param categoryLabelDTO 场所标签临时表 |
| | | * @return 场所标签临时表集合 |
| | | */ |
| | | public List<CategoryLabelDTO> selectCategoryLabelList(CategoryLabelDTO categoryLabelDTO); |
| | | |
| | | |
| | | } |
| | |
| | | <result column="remark" property="remark"/> |
| | | </resultMap> |
| | | |
| | | <resultMap type="org.springblade.modules.category.dto.CategoryLabelDTO" id="CategoryLabelDTOResult"> |
| | | <result property="id" column="id" /> |
| | | <result property="categoryNo" column="category_no" /> |
| | | <result property="categoryName" column="category_name" /> |
| | | <result property="label" column="label" /> |
| | | <result property="remark" column="remark" /> |
| | | </resultMap> |
| | | |
| | | <sql id="selectCategoryLabel"> |
| | | select |
| | | id, |
| | | category_no, |
| | | category_name, |
| | | label, |
| | | remark |
| | | from |
| | | jczz_category_label |
| | | </sql> |
| | | |
| | | |
| | | <select id="selectCategoryLabelById" parameterType="int" resultMap="CategoryLabelDTOResult"> |
| | | <include refid="selectCategoryLabel"/> |
| | | where |
| | | id = #{id} |
| | | </select> |
| | | |
| | | |
| | | <select id="selectCategoryLabelPage" resultMap="categoryLabelResultMap"> |
| | | select * from jczz_category_label where is_deleted = 0 |
| | | </select> |
| | | |
| | | <select id="selectCategoryLabelList" parameterType="org.springblade.modules.category.dto.CategoryLabelDTO" resultMap="CategoryLabelDTOResult"> |
| | | select |
| | | jcl.id, |
| | | jcl.category_no, |
| | | jcl.category_name, |
| | | jcl.label, |
| | | jcl.remark |
| | | from |
| | | jczz_place_poi_label jppl LEFT JOIN jczz_category_label jcl on jcl.category_no=jppl.poi_code |
| | | <where> |
| | | <if test="id != null "> and jcl.id = #{id}</if> |
| | | <if test="placeId != null and placeId != '' "> and jppl.place_id = #{placeId}</if> |
| | | <if test="categoryNo != null and categoryNo != ''"> and jcl.category_no = #{categoryNo}</if> |
| | | <if test="categoryName != null and categoryName != ''"> and cjcl.ategory_name = #{categoryName}</if> |
| | | <if test="label != null and label != ''"> and jcl.label = #{label}</if> |
| | | <if test="remark != null and remark != ''"> and jcl.remark = #{remark}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | |
| | | </mapper> |
| | |
| | | package org.springblade.modules.category.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import org.springblade.modules.category.dto.CategoryLabelDTO; |
| | | import org.springblade.modules.category.entity.CategoryLabelEntity; |
| | | import org.springblade.modules.category.vo.CategoryLabelVO; |
| | | import org.springblade.core.mp.base.BaseService; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 场所标签临时表 服务类 |
| | |
| | | */ |
| | | IPage<CategoryLabelVO> selectCategoryLabelPage(IPage<CategoryLabelVO> page, CategoryLabelVO categoryLabel); |
| | | |
| | | /** |
| | | * 查询场所标签临时表列表 |
| | | * |
| | | * @param categoryLabelDTO 场所标签临时表 |
| | | * @return 场所标签临时表集合 |
| | | */ |
| | | public List<CategoryLabelDTO> selectCategoryLabelList(CategoryLabelDTO categoryLabelDTO); |
| | | |
| | | |
| | | } |
| | |
| | | */ |
| | | package org.springblade.modules.category.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springblade.modules.category.dto.CategoryLabelDTO; |
| | | import org.springblade.modules.category.entity.CategoryLabelEntity; |
| | | import org.springblade.modules.category.vo.CategoryLabelVO; |
| | | import org.springblade.modules.category.mapper.CategoryLabelMapper; |
| | | import org.springblade.modules.category.service.ICategoryLabelService; |
| | | import org.springblade.core.mp.base.BaseServiceImpl; |
| | | import org.springblade.modules.category.vo.CategoryLabelVO; |
| | | import org.springframework.stereotype.Service; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 场所标签临时表 服务实现类 |
| | |
| | | return page.setRecords(baseMapper.selectCategoryLabelPage(page, categoryLabel)); |
| | | } |
| | | |
| | | /** |
| | | * 查询场所标签临时表列表 |
| | | * |
| | | * @param categoryLabelDTO 场所标签临时表 |
| | | * @return 场所标签临时表集合 |
| | | */ |
| | | @Override |
| | | public List<CategoryLabelDTO> selectCategoryLabelList(CategoryLabelDTO categoryLabelDTO) { |
| | | return this.baseMapper.selectCategoryLabelList(categoryLabelDTO); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | |
| | | <select id="selectPublicDiscussPage" resultMap="publicDiscussResultMap"> |
| | | select id, |
| | | title, |
| | | open_flag, |
| | | number_restrictions, |
| | | vote_restrictions, |
| | | user_restrictions, |
| | | end_time, |
| | | article_id, |
| | | create_time, |
| | | update_time, |
| | | deleted_flag, |
| | | repeat_vote, |
| | | vote_number_public, |
| | | appoint_user, |
| | | user_ids, |
| | | event_type, |
| | | (SELECT count(1) FROM jczz_user_public_enroll where public_discuss_id = jpd.id) enrollCount, |
| | | (SELECT count(1) from (SELECT * FROM jczz_user_topics WHERE public_discuss_id = jpd.id GROUP BY user_id ) a) topsCount |
| | | select jpd.id, |
| | | jpd.title, |
| | | jpd.open_flag, |
| | | jpd.number_restrictions, |
| | | jpd.vote_restrictions, |
| | | jpd.user_restrictions, |
| | | jpd.end_time, |
| | | jpd.article_id, |
| | | jpd.create_time, |
| | | jpd.update_time, |
| | | jpd.deleted_flag, |
| | | jpd.repeat_vote, |
| | | jpd.vote_number_public, |
| | | jpd.appoint_user, |
| | | jpd.user_ids, |
| | | jpd.event_type |
| | | from jczz_public_discuss jpd |
| | | <where> |
| | | <if test="publicDiscuss.id != null "> and id = #{publicDiscuss.id}</if> |
| | |
| | | |
| | | <select id="selectUserTopicsPage" resultMap="userTopicsResultMap"> |
| | | SELECT |
| | | jut.id, |
| | | jut.topics_id, |
| | | jut.public_discuss_id, |
| | | bu.avatar, |
| | | bu.`name`, |
| | |
| | | jda.address_name, |
| | | jda.aoi_name |
| | | FROM |
| | | jczz_user_topics jut |
| | | jczz_user_topics as jut |
| | | LEFT JOIN blade_user bu ON jut.user_id = bu.id |
| | | LEFT JOIN jczz_household jh ON jh.associated_user_id = jut.user_id |
| | | LEFT JOIN jczz_doorplate_address jda ON jda.address_code = jh.house_code |
| | |
| | | <if test="userTopics.updateTime != null ">and jut.update_time = #{userTopics.updateTime}</if> |
| | | <if test="userTopics.deleteFlag != null ">and jut.delete_flag = #{userTopics.deleteFlag}</if> |
| | | <if test="userTopics.publicDiscussId != null ">and jut.public_discuss_id = #{userTopics.publicDiscussId} |
| | | GROUP BY jut.public_discuss_id |
| | | GROUP BY jut.public_discuss_id, |
| | | bu.avatar, |
| | | bu.`name`, |
| | | bu.phone, |
| | | jda.address_name, |
| | | jda.aoi_name |
| | | </if> |
| | | </where> |
| | | </select> |
| | |
| | | |
| | | Boolean batchSave(List<TopicsEntity> topics); |
| | | |
| | | Long getCount(Integer id); |
| | | Integer getCount(Integer id); |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springblade.core.mp.support.Condition; |
| | | import org.springblade.core.mp.support.Query; |
| | | import org.springblade.modules.discuss.entity.PublicDiscussEntity; |
| | | import org.springblade.modules.discuss.entity.UserTopicsEntity; |
| | | import org.springblade.modules.discuss.mapper.PublicDiscussMapper; |
| | | import org.springblade.modules.discuss.service.IPublicDiscussService; |
| | | import org.springblade.modules.discuss.service.IUserPublicEnrollService; |
| | | import org.springblade.modules.discuss.service.IUserTopicsService; |
| | | import org.springblade.modules.discuss.vo.PublicDiscussVO; |
| | | import org.springblade.modules.discuss.vo.UserTopicsVO; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | |
| | | @Service |
| | | public class PublicDiscussServiceImpl extends ServiceImpl<PublicDiscussMapper, PublicDiscussEntity> implements IPublicDiscussService { |
| | | |
| | | @Resource |
| | | private IUserPublicEnrollService iUserPublicEnrollService; |
| | | |
| | | @Resource |
| | | private IUserTopicsService iUserTopicsService; |
| | | |
| | | @Override |
| | | public IPage<PublicDiscussVO> selectPublicDiscussPage(IPage<PublicDiscussVO> page, PublicDiscussVO publicDiscuss) { |
| | | List<PublicDiscussVO> publicDiscussVOS = baseMapper.selectPublicDiscussPage(page, publicDiscuss); |
| | | for (PublicDiscussVO publicDiscussVO : publicDiscussVOS) { |
| | | Long result = iUserPublicEnrollService.getCount(publicDiscussVO.getId()); |
| | | if(result != null){ |
| | | publicDiscussVO.setEnrollCount(result.intValue()); |
| | | } |
| | | UserTopicsVO userTopicsVo = new UserTopicsVO(); |
| | | userTopicsVo.setPublicDiscussId(publicDiscussVO.getId()); |
| | | Query query = new Query(); |
| | | query.setCurrent(1); |
| | | query.setSize(10); |
| | | IPage<UserTopicsVO> userTopicsVOIPage = iUserTopicsService.selectUserTopicsPage(Condition.getPage(query), userTopicsVo); |
| | | if (userTopicsVOIPage != null) { |
| | | Long total = userTopicsVOIPage.getTotal(); |
| | | publicDiscussVO.setTopsCount(total.intValue()); |
| | | } |
| | | } |
| | | return page.setRecords(publicDiscussVOS); |
| | | } |
| | | |
| | |
| | | |
| | | @Override |
| | | public Long getCount(Integer id) { |
| | | return baseMapper.selectCount(Wrappers.<UserPublicEnrollEntity>lambdaQuery().eq(UserPublicEnrollEntity::getPublicDiscussId, id)); |
| | | return baseMapper.selectCount(Wrappers.<UserPublicEnrollEntity>lambdaQuery(). |
| | | eq(UserPublicEnrollEntity::getPublicDiscussId, id)); |
| | | } |
| | | } |
| | |
| | | |
| | | |
| | | @Override |
| | | public Long getCount(Integer id) { |
| | | return baseMapper.selectCount(Wrappers.<UserTopicsEntity>lambdaQuery().eq(UserTopicsEntity::getPublicDiscussId, id).groupBy(UserTopicsEntity::getUserId)); |
| | | public Integer getCount(Integer id) { |
| | | List<UserTopicsEntity> list = list(Wrappers.<UserTopicsEntity>lambdaQuery() |
| | | .eq(UserTopicsEntity::getPublicDiscussId, id) |
| | | .groupBy(UserTopicsEntity::getUserId)); |
| | | return list.size(); |
| | | } |
| | | } |
| | |
| | | import org.springblade.common.node.TreeStringNode; |
| | | import org.springblade.common.utils.NodeTreeUtil; |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | | import org.springblade.modules.category.dto.CategoryLabelDTO; |
| | | import org.springblade.modules.category.service.ICategoryLabelService; |
| | | import org.springblade.modules.district.entity.DistrictEntity; |
| | | import org.springblade.modules.district.service.IDistrictService; |
| | | import org.springblade.modules.doorplateAddress.entity.DoorplateAddressEntity; |
| | |
| | | |
| | | @Autowired |
| | | private IDistrictService districtService; |
| | | |
| | | @Autowired |
| | | private ICategoryLabelService iCategoryLabelService; |
| | | |
| | | |
| | | @Override |
| | |
| | | List<TreeStringNode> placeNodeList = placeService.selectPlaceNodeList(AuthUtil.getUserId()); |
| | | for (TreeStringNode treeNode : placeNodeList) { |
| | | treeNode.setAddressType(2); |
| | | CategoryLabelDTO categoryLabelDTO = new CategoryLabelDTO(); |
| | | categoryLabelDTO.setPlaceId(treeNode.getId()); |
| | | List<CategoryLabelDTO> categoryLabelDTOS = iCategoryLabelService.selectCategoryLabelList(categoryLabelDTO); |
| | | treeNode.setCategoryLabelList(categoryLabelDTOS); |
| | | // if (DictConstant.SMALL_DOORPLATE.equals(treeNode.getDoorplateType()) || |
| | | // (DictConstant.centre_DOORPLATE.equals(treeNode.getDoorplateType()) && |
| | | // treeNode.getAddressLevel().equals(1))) { |
| | |
| | | public static final List<Integer> list1 = Arrays.asList(1, 2, 3, 4, 5, 6, 11, null); |
| | | public static final List<Integer> list2 = Arrays.asList(1, 11, null); |
| | | |
| | | /** |
| | | * apache测试方法 |
| | | */ |
| | | public static void main(String[] args) { |
| | | System.out.println("交集:" + CollectionUtils.intersection(list1, list2)); // 交集 |
| | | System.out.println("补集:" + CollectionUtils.disjunction(list1, list2)); // 补集 |
| | | System.out.println("并集:" + CollectionUtils.union(list1, list2)); // 并集 |
| | | System.out.println("list1的差集:" + CollectionUtils.subtract(list1, list2)); // list1的差集 |
| | | System.out.println("list2的差集:" + CollectionUtils.subtract(list2, list1)); // list2的差集 |
| | | } |
| | | |
| | | @Override |
| | | public List<MenuVO> routes(String roleId, Long topMenuId, Integer labelType) { |
| | |
| | | } |
| | | |
| | | |
| | | // @GetMapping("/countFrequencyNumber") |
| | | // @ApiOperationSupport(order = 10) |
| | | // @ApiOperation(value = "统计周期类型数量") |
| | | // public R countFrequencyNumber() { |
| | | // return R.data(taskService.countFrequencyNumber()); |
| | | // } |
| | | |
| | | |
| | | } |
| | |
| | | @ApiModelProperty(value = "门牌地址编码") |
| | | private String houseCode; |
| | | |
| | | private Integer reportType; |
| | | |
| | | } |
| | |
| | | package org.springblade.modules.task.dto; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import org.springblade.modules.task.entity.TaskCampusReportingEventEntity; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import org.springblade.modules.task.entity.TaskCampusReportingEventEntity; |
| | | |
| | | /** |
| | | * 校园安全检查任务表 数据传输对象实体类 |
| | |
| | | @ApiModelProperty(value = "门牌地址编码") |
| | | private String houseCode; |
| | | |
| | | private Integer reportType; |
| | | |
| | | |
| | | } |
| | |
| | | @ApiModelProperty(value = "门牌地址编码") |
| | | private String houseCode; |
| | | |
| | | private Integer reportType; |
| | | |
| | | |
| | | } |
| | |
| | | @ApiModelProperty(value = "门牌地址编码") |
| | | private String houseCode; |
| | | |
| | | private Integer reportType; |
| | | |
| | | |
| | | } |
| | |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date updateTime; |
| | | |
| | | |
| | | /** 事件类型(1:取保候审,2旅馆 3打金店 4二手手机 5二手车 6 校园安全) */ |
| | | @ApiModelProperty(value = "事件类型(1:取保候审,2旅馆 3打金店 4二手手机 5二手车 6 校园安全)", example = "") |
| | | @TableField("report_type") |
| | | private Integer reportType; |
| | | |
| | | } |
| | |
| | | <result column="status" property="status"/> |
| | | <result column="is_deleted" property="isDeleted"/> |
| | | <result column="house_code" property="houseCode"/> |
| | | <result column="report_type" property="reportType"/> |
| | | </resultMap> |
| | | |
| | | |
| | |
| | | jt.is_deleted, |
| | | jt.house_code |
| | | FROM |
| | | jczz_grid jg |
| | | jczz_gridman jgm |
| | | LEFT JOIN jczz_grid jg ON jgm.grid_id = jg.id |
| | | LEFT JOIN jczz_grid_range jgr ON jg.id = jgr.grid_id |
| | | LEFT JOIN jczz_task jt ON jgr.house_code = jt.house_code |
| | | LEFT JOIN jczz_doorplate_address jda on jda.address_code=jt.house_code |
| | | LEFT JOIN jczz_doorplate_address jda ON jda.address_code = jt.house_code |
| | | WHERE |
| | | jg.user_id = #{task.userId} |
| | | and jt.type != 3 |
| | | jgm.user_id = #{task.userId} |
| | | and jt.report_type in(2,3,4,5,6) |
| | | <if test="task.status != null and task.status != null"> |
| | | and jt.status = #{task.status} |
| | | </if> |
| | |
| | | <if test="task.createDept != null ">and jt.create_dept = #{task.createDept}</if> |
| | | <if test="task.isDeleted != null ">and jt.is_deleted = #{task.isDeleted}</if> |
| | | <if test="task.houseCode != null and task.houseCode != ''">and jt.house_code = #{task.houseCode}</if> |
| | | <!-- 取保候审 --> |
| | | <if test="reportType != null and reportType == 1 "> |
| | | and jt.report_type = 1 |
| | | </if> |
| | | <!-- 场所店铺 --> |
| | | <if test="reportType != null and reportType == 2 "> |
| | | and jt.report_type in (2,3,4,5,6) |
| | | </if> |
| | | |
| | | order by jt.create_time desc |
| | | |
| | | </select> |
| | |
| | | <select id="selectTaskCount" resultType="int" parameterType="org.springblade.modules.task.vo.TaskVO"> |
| | | SELECT count(1) |
| | | FROM |
| | | jczz_grid jg |
| | | jczz_gridman jgm |
| | | LEFT JOIN jczz_grid jg ON jgm.grid_id = jg.id |
| | | LEFT JOIN jczz_grid_range jgr ON jg.id = jgr.grid_id |
| | | LEFT JOIN jczz_task jt ON jgr.house_code = jt.house_code |
| | | LEFT JOIN jczz_doorplate_address jda on jda.address_code=jt.house_code |
| | | LEFT JOIN jczz_doorplate_address jda ON jda.address_code = jt.house_code |
| | | WHERE |
| | | jg.user_id = #{userId} |
| | | jgm.user_id = #{userId} |
| | | <if test="status != null"> |
| | | and jt.status = #{status} |
| | | </if> |
| | |
| | | <if test="type != null"> |
| | | and jt.type = #{type} |
| | | </if> |
| | | <!-- 取保候审 --> |
| | | <if test="reportType != null and reportType == 1 "> |
| | | and jt.report_type = 1 |
| | | </if> |
| | | <!-- 场所店铺 --> |
| | | <if test="reportType != null and reportType == 2 "> |
| | | and jt.report_type in (2,3,4,5,6) |
| | | </if> |
| | | |
| | | <if test="name != null and name != ''"> |
| | | and jt.name like concat('%', #{name}, '%') |
| | | </if> |
| | |
| | | * @param createUser |
| | | * @return |
| | | */ |
| | | Long saveTask(Integer type, String name, Integer frequency, String remark, Long createUser,String houseCode); |
| | | Long saveTask(Integer type, String name, Integer frequency, String remark, Long createUser,String houseCode,Integer reportType); |
| | | |
| | | /** |
| | | * @param type |
| | |
| | | |
| | | |
| | | @Override |
| | | public Boolean saveBailReporting(TaskBailReportingEventDTO taskBailReportingEvent) { |
| | | Long aLong = taskService.saveTask(3, DictConstant.BAIL_PENDING_TRIAL, 1, "", AuthUtil.getUserId(),taskBailReportingEvent.getHouseCode()); |
| | | public Boolean saveBailReporting(TaskBailReportingEventDTO bailReporting) { |
| | | Long aLong = taskService.saveTask(3, DictConstant.BAIL_PENDING_TRIAL, 1, "", AuthUtil.getUserId(),bailReporting.getHouseCode(),bailReporting.getReportType()); |
| | | if (aLong > 0) { |
| | | taskBailReportingEvent.setTaskId(aLong); |
| | | taskBailReportingEvent.setCheckUserId(AuthUtil.getUserId()); |
| | | return baseMapper.insert(taskBailReportingEvent) > 0 ? true : false; |
| | | bailReporting.setTaskId(aLong); |
| | | bailReporting.setCheckUserId(AuthUtil.getUserId()); |
| | | return baseMapper.insert(bailReporting) > 0 ? true : false; |
| | | } |
| | | return false; |
| | | } |
| | |
| | | |
| | | |
| | | @Override |
| | | public Boolean saveCampusReporting(TaskCampusReportingEventDTO taskCampusReportingEvent) { |
| | | Long aLong = taskService.saveTask(1, DictConstant.CAMPUS_SECURITY_INSPECTION, 1 , "", AuthUtil.getUserId(),taskCampusReportingEvent.getHouseCode()); |
| | | public Boolean saveCampusReporting(TaskCampusReportingEventDTO reporting) { |
| | | Long aLong = taskService.saveTask(1, DictConstant.CAMPUS_SECURITY_INSPECTION, 1 , "", AuthUtil.getUserId(),reporting.getHouseCode(),reporting.getReportType()); |
| | | if (aLong > 0) { |
| | | taskCampusReportingEvent.setTaskId(aLong); |
| | | taskCampusReportingEvent.setCheckUserId(AuthUtil.getUserId()); |
| | | return baseMapper.insert(taskCampusReportingEvent) > 0 ? true : false; |
| | | reporting.setTaskId(aLong); |
| | | reporting.setCheckUserId(AuthUtil.getUserId()); |
| | | return baseMapper.insert(reporting) > 0 ? true : false; |
| | | } |
| | | return false; |
| | | } |
| | |
| | | |
| | | @Override |
| | | public boolean saveHotelReporting(TaskHotelReportingDTO taskHotelReporting) { |
| | | Long aLong = taskService.saveTask(2, DictConstant.HOTEL_SECURITY, 1, "", AuthUtil.getUserId(),taskHotelReporting.getHouseCode()); |
| | | 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()); |
| | |
| | | default: |
| | | name = ""; |
| | | } |
| | | Long aLong = taskService.saveTask(1, name, 1, "", AuthUtil.getUserId(),taskLabelReportingEvent.getHouseCode()); |
| | | Long aLong = taskService.saveTask(1, name, 1, "", AuthUtil.getUserId(),taskLabelReportingEvent.getHouseCode(),taskLabelReportingEvent.getReportType()); |
| | | if (aLong > 0) { |
| | | taskLabelReportingEvent.setTaskId(aLong); |
| | | taskLabelReportingEvent.setUserId(AuthUtil.getUserId()); |
| | |
| | | import org.springblade.modules.house.vo.HouseRentalTenantVO; |
| | | import org.springblade.modules.task.entity.TaskEntity; |
| | | import org.springblade.modules.task.mapper.TaskMapper; |
| | | import org.springblade.modules.task.service.ITaskReportForRepairsService; |
| | | import org.springblade.modules.task.service.ITaskService; |
| | | import org.springblade.modules.task.vo.TaskVO; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Date; |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Long saveTask(Integer type, String name, Integer frequency, String remark, Long createUser, String houseCode) { |
| | | public Long saveTask(Integer type, String name, Integer frequency, String remark, Long createUser, String houseCode,Integer reportType) { |
| | | TaskEntity taskEntity = new TaskEntity(); |
| | | taskEntity.setType(type); |
| | | taskEntity.setName(name); |
| | |
| | | taskEntity.setCreateTime(new Date()); |
| | | taskEntity.setCreateUser(createUser); |
| | | taskEntity.setHouseCode(houseCode); |
| | | taskEntity.setReportType(reportType); |
| | | return baseMapper.insert(taskEntity) > 0 ? taskEntity.getId() : 0; |
| | | } |
| | | |
| | |
| | | public Object countNumber(String houseCode, Integer status) { |
| | | Map<String, Object> objectObjectHashMap = new HashMap<>(); |
| | | // 总数 |
| | | Long all = baseMapper.selectCount(Wrappers.<TaskEntity>lambdaQuery().eq(TaskEntity::getCreateUser, AuthUtil.getUserId() )); |
| | | Long all = baseMapper.selectCount(Wrappers.<TaskEntity>lambdaQuery() |
| | | .eq(TaskEntity::getCreateUser, AuthUtil.getUserId()) |
| | | .in(TaskEntity::getReportType,2,3,4,5,6)); |
| | | // 已处理 |
| | | Long processed = baseMapper.selectCount(Wrappers.<TaskEntity>lambdaQuery().eq(TaskEntity::getCreateUser, AuthUtil.getUserId()) |
| | | .eq(TaskEntity::getStatus, 2)); |
| | | Long processed = baseMapper.selectCount(Wrappers.<TaskEntity>lambdaQuery() |
| | | .eq(TaskEntity::getCreateUser, AuthUtil.getUserId()) |
| | | .eq(TaskEntity::getStatus, 2) |
| | | .in(TaskEntity::getReportType,2,3,4,5,6)); |
| | | objectObjectHashMap.put("all", all); |
| | | objectObjectHashMap.put("processed", processed); |
| | | return objectObjectHashMap; |