From acf2bdafdfa2fb1fe423d0700950c3ddd53c481b Mon Sep 17 00:00:00 2001
From: linwe <872216996@qq.com>
Date: Tue, 14 Nov 2023 19:36:55 +0800
Subject: [PATCH] 标签,房屋,住户管理

---
 src/main/java/org/springblade/modules/task/controller/TaskCampusReportingEventController.java    |    9 
 src/main/java/org/springblade/modules/auth/utils/TokenUtil.java                                  |    4 
 src/main/java/org/springblade/modules/house/controller/HouseholdLabelController.java             |    2 
 src/main/java/org/springblade/modules/task/service/impl/TaskCampusReportingEventServiceImpl.java |   31 +++
 src/main/java/org/springblade/modules/house/mapper/UserHouseLabelMapper.xml                      |   62 ++++++
 src/main/java/org/springblade/modules/house/service/IUserHouseLabelService.java                  |    7 
 src/main/java/org/springblade/modules/task/dto/TaskCampusReportingEventDTO.java                  |    5 
 src/main/java/org/springblade/common/constant/DictConstant.java                                  |    2 
 src/main/java/org/springblade/modules/task/mapper/TaskCampusReportingEventMapper.xml             |  146 ++++++++++++---
 src/main/java/org/springblade/modules/house/service/impl/HouseLabelServiceImpl.java              |   15 
 src/main/java/org/springblade/modules/house/dto/UserHouseLabelDTO.java                           |    4 
 src/main/java/org/springblade/modules/house/controller/UserHouseLabelController.java             |   47 ++--
 /dev/null                                                                                        |   15 -
 src/main/java/org/springblade/modules/house/wrapper/HouseLabelWrapper.java                       |    6 
 src/main/java/org/springblade/modules/task/service/ITaskCampusReportingEventService.java         |    8 
 src/main/java/org/springblade/modules/label/service/impl/LabelServiceImpl.java                   |    7 
 src/main/java/org/springblade/modules/house/mapper/UserHouseLabelMapper.java                     |    4 
 src/main/java/org/springblade/modules/label/service/ILabelService.java                           |    4 
 src/main/java/org/springblade/modules/label/controller/LabelController.java                      |   26 ++
 src/main/java/org/springblade/modules/task/entity/TaskCampusReportingEventEntity.java            |    2 
 src/main/java/org/springblade/modules/house/vo/HouseLabelVO.java                                 |    4 
 src/main/java/org/springblade/modules/house/service/impl/HouseholdLabelServiceImpl.java          |    2 
 src/main/java/org/springblade/modules/house/entity/UserHouseLabelEntity.java                     |   82 +++++++++
 23 files changed, 383 insertions(+), 111 deletions(-)

diff --git a/src/main/java/org/springblade/common/constant/DictConstant.java b/src/main/java/org/springblade/common/constant/DictConstant.java
index b8184a4..8a4a417 100644
--- a/src/main/java/org/springblade/common/constant/DictConstant.java
+++ b/src/main/java/org/springblade/common/constant/DictConstant.java
@@ -49,4 +49,6 @@
 
 	String centre_DOORPLATE= "中门牌";
 
+	String CAMPUS_SECURITY_INSPECTION= "校园安全检查";
+
 }
diff --git a/src/main/java/org/springblade/modules/auth/utils/TokenUtil.java b/src/main/java/org/springblade/modules/auth/utils/TokenUtil.java
index d96dff7..9d995a6 100644
--- a/src/main/java/org/springblade/modules/auth/utils/TokenUtil.java
+++ b/src/main/java/org/springblade/modules/auth/utils/TokenUtil.java
@@ -98,6 +98,8 @@
 		param.put(TokenConstant.NICK_NAME, user.getRealName());
 		param.put(TokenConstant.ROLE_NAME, Func.join(userInfo.getRoles()));
 		param.put(TokenConstant.DETAIL, userInfo.getDetail());
+		param.put(TokenConstant.REAL_NAME, user.getRealName());
+		param.put("phone", user.getPhone());
 
 		//拼装accessToken
 		try {
@@ -119,6 +121,8 @@
 				.set(TokenConstant.TOKEN_TYPE, TokenConstant.BEARER)
 				.set(TokenConstant.EXPIRES_IN, accessToken.getExpire())
 				.set(TokenConstant.DETAIL, userInfo.getDetail())
+				.set("phone", user.getPhone())
+				.set(TokenConstant.REAL_NAME, user.getRealName())
 				.set(TokenConstant.LICENSE, TokenConstant.LICENSE_NAME);
 		} catch (Exception ex) {
 			return authInfo.set("error_code", HttpServletResponse.SC_UNAUTHORIZED).set("error_description", ex.getMessage());
diff --git a/src/main/java/org/springblade/modules/house/controller/HouseholdLabelController.java b/src/main/java/org/springblade/modules/house/controller/HouseholdLabelController.java
index d6d6937..898217a 100644
--- a/src/main/java/org/springblade/modules/house/controller/HouseholdLabelController.java
+++ b/src/main/java/org/springblade/modules/house/controller/HouseholdLabelController.java
@@ -29,7 +29,7 @@
 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.house.entity.HouseLabelEntity;
+import org.springblade.modules.house.entity.UserHouseLabelEntity;
 import org.springframework.web.bind.annotation.*;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import org.springblade.modules.house.entity.HouseholdLabelEntity;
diff --git a/src/main/java/org/springblade/modules/house/controller/HouseLabelController.java b/src/main/java/org/springblade/modules/house/controller/UserHouseLabelController.java
similarity index 68%
rename from src/main/java/org/springblade/modules/house/controller/HouseLabelController.java
rename to src/main/java/org/springblade/modules/house/controller/UserHouseLabelController.java
index 22bbfe3..3b4700f 100644
--- a/src/main/java/org/springblade/modules/house/controller/HouseLabelController.java
+++ b/src/main/java/org/springblade/modules/house/controller/UserHouseLabelController.java
@@ -24,17 +24,16 @@
 import lombok.AllArgsConstructor;
 import javax.validation.Valid;
 
-import org.springblade.core.secure.BladeUser;
 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.springframework.web.bind.annotation.*;
 import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.springblade.modules.house.entity.HouseLabelEntity;
+import org.springblade.modules.house.entity.UserHouseLabelEntity;
 import org.springblade.modules.house.vo.HouseLabelVO;
 import org.springblade.modules.house.wrapper.HouseLabelWrapper;
-import org.springblade.modules.house.service.IHouseLabelService;
+import org.springblade.modules.house.service.IUserHouseLabelService;
 import org.springblade.core.boot.ctrl.BladeController;
 
 /**
@@ -45,11 +44,11 @@
  */
 @RestController
 @AllArgsConstructor
-@RequestMapping("blade-houseLabel/houseLabel")
-@Api(value = "房屋-标签", tags = "房屋-标签接口")
-public class HouseLabelController extends BladeController {
+@RequestMapping("blade-houseLabel/userHouseLabel")
+@Api(value = "用户房屋-标签", tags = "用户房屋-标签接口")
+public class UserHouseLabelController extends BladeController {
 
-	private final IHouseLabelService houseLabelService;
+	private final IUserHouseLabelService userHouseLabelService;
 
 	/**
 	 * 房屋-标签 详情
@@ -57,8 +56,8 @@
 	@GetMapping("/detail")
 	@ApiOperationSupport(order = 1)
 	@ApiOperation(value = "详情", notes = "传入houseLabel")
-	public R<HouseLabelVO> detail(HouseLabelEntity houseLabel) {
-		HouseLabelEntity detail = houseLabelService.getOne(Condition.getQueryWrapper(houseLabel));
+	public R<HouseLabelVO> detail(UserHouseLabelEntity houseLabel) {
+		UserHouseLabelEntity detail = userHouseLabelService.getOne(Condition.getQueryWrapper(houseLabel));
 		return R.data(HouseLabelWrapper.build().entityVO(detail));
 	}
 	/**
@@ -67,8 +66,8 @@
 	@GetMapping("/list")
 	@ApiOperationSupport(order = 2)
 	@ApiOperation(value = "分页", notes = "传入houseLabel")
-	public R<IPage<HouseLabelVO>> list(HouseLabelEntity houseLabel, Query query) {
-		IPage<HouseLabelEntity> pages = houseLabelService.page(Condition.getPage(query), Condition.getQueryWrapper(houseLabel));
+	public R<IPage<HouseLabelVO>> list(UserHouseLabelEntity houseLabel, Query query) {
+		IPage<UserHouseLabelEntity> pages = userHouseLabelService.page(Condition.getPage(query), Condition.getQueryWrapper(houseLabel));
 		return R.data(HouseLabelWrapper.build().pageVO(pages));
 	}
 
@@ -79,7 +78,7 @@
 	@ApiOperationSupport(order = 3)
 	@ApiOperation(value = "分页", notes = "传入houseLabel")
 	public R<IPage<HouseLabelVO>> page(HouseLabelVO houseLabel, Query query) {
-		IPage<HouseLabelVO> pages = houseLabelService.selectHouseLabelPage(Condition.getPage(query), houseLabel);
+		IPage<HouseLabelVO> pages = userHouseLabelService.selectHouseLabelPage(Condition.getPage(query), houseLabel);
 		return R.data(pages);
 	}
 
@@ -89,8 +88,8 @@
 	@PostMapping("/save")
 	@ApiOperationSupport(order = 4)
 	@ApiOperation(value = "新增", notes = "传入houseLabel")
-	public R save(@Valid @RequestBody HouseLabelEntity houseLabel) {
-		return R.status(houseLabelService.save(houseLabel));
+	public R save(@Valid @RequestBody UserHouseLabelEntity houseLabel) {
+		return R.status(userHouseLabelService.save(houseLabel));
 	}
 
 	/**
@@ -99,8 +98,8 @@
 	@PostMapping("/update")
 	@ApiOperationSupport(order = 5)
 	@ApiOperation(value = "修改", notes = "传入houseLabel")
-	public R update(@Valid @RequestBody HouseLabelEntity houseLabel) {
-		return R.status(houseLabelService.updateById(houseLabel));
+	public R update(@Valid @RequestBody UserHouseLabelEntity houseLabel) {
+		return R.status(userHouseLabelService.updateById(houseLabel));
 	}
 
 	/**
@@ -109,8 +108,8 @@
 	@PostMapping("/submit")
 	@ApiOperationSupport(order = 6)
 	@ApiOperation(value = "新增或修改", notes = "传入houseLabel")
-	public R submit(@Valid @RequestBody HouseLabelEntity houseLabel) {
-		return R.status(houseLabelService.saveOrUpdate(houseLabel));
+	public R submit(@Valid @RequestBody UserHouseLabelEntity houseLabel) {
+		return R.status(userHouseLabelService.saveOrUpdate(houseLabel));
 	}
 
 	/**
@@ -120,8 +119,8 @@
 	 */
 	@PostMapping("/saveOrUpdateHouseLabel")
 	@ApiOperation(value = "自定义新增或修改", notes = "传入houseLabel")
-	public R saveOrUpdateHouseLabel(@Valid @RequestBody HouseLabelEntity houseLabel) {
-		return R.status(houseLabelService.saveOrUpdateHouseLabel(houseLabel));
+	public R saveOrUpdateHouseLabel(@Valid @RequestBody UserHouseLabelEntity houseLabel) {
+		return R.status(userHouseLabelService.saveOrUpdateHouseLabel(houseLabel));
 	}
 
 	/**
@@ -131,7 +130,7 @@
 	@ApiOperationSupport(order = 7)
 	@ApiOperation(value = "逻辑删除", notes = "传入ids")
 	public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
-		return R.status(houseLabelService.removeByIds(Func.toLongList(ids)));
+		return R.status(userHouseLabelService.removeByIds(Func.toLongList(ids)));
 	}
 
 	/**
@@ -139,12 +138,12 @@
 	 */
 	@PostMapping("/removeHouseLabel")
 	@ApiOperationSupport(order = 7)
-	public R removeHouseLabel(@RequestBody HouseLabelEntity houseLabel) {
-		QueryWrapper<HouseLabelEntity> wrapper = new QueryWrapper<>();
+	public R removeHouseLabel(@RequestBody UserHouseLabelEntity houseLabel) {
+		QueryWrapper<UserHouseLabelEntity> wrapper = new QueryWrapper<>();
 		wrapper.eq("label_id",houseLabel.getLabelId())
 			.eq("house_code",houseLabel.getHouseCode());
 		// 返回
-		return R.status(houseLabelService.remove(wrapper));
+		return R.status(userHouseLabelService .remove(wrapper));
 	}
 
 
diff --git a/src/main/java/org/springblade/modules/house/dto/HouseLabelDTO.java b/src/main/java/org/springblade/modules/house/dto/UserHouseLabelDTO.java
similarity index 89%
rename from src/main/java/org/springblade/modules/house/dto/HouseLabelDTO.java
rename to src/main/java/org/springblade/modules/house/dto/UserHouseLabelDTO.java
index 9ac42ab..a983aac 100644
--- a/src/main/java/org/springblade/modules/house/dto/HouseLabelDTO.java
+++ b/src/main/java/org/springblade/modules/house/dto/UserHouseLabelDTO.java
@@ -16,7 +16,7 @@
  */
 package org.springblade.modules.house.dto;
 
-import org.springblade.modules.house.entity.HouseLabelEntity;
+import org.springblade.modules.house.entity.UserHouseLabelEntity;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 
@@ -28,7 +28,7 @@
  */
 @Data
 @EqualsAndHashCode(callSuper = true)
-public class HouseLabelDTO extends HouseLabelEntity {
+public class UserHouseLabelDTO extends UserHouseLabelEntity {
 	private static final long serialVersionUID = 1L;
 
 }
diff --git a/src/main/java/org/springblade/modules/house/entity/HouseLabelEntity.java b/src/main/java/org/springblade/modules/house/entity/HouseLabelEntity.java
deleted file mode 100644
index efe2a30..0000000
--- a/src/main/java/org/springblade/modules/house/entity/HouseLabelEntity.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions are met:
- *
- *  Redistributions of source code must retain the above copyright notice,
- *  this list of conditions and the following disclaimer.
- *  Redistributions in binary form must reproduce the above copyright
- *  notice, this list of conditions and the following disclaimer in the
- *  documentation and/or other materials provided with the distribution.
- *  Neither the name of the dreamlu.net developer nor the names of its
- *  contributors may be used to endorse or promote products derived from
- *  this software without specific prior written permission.
- *  Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.modules.house.entity;
-
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
-import com.fasterxml.jackson.databind.annotation.JsonSerialize;
-import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
-import lombok.Data;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.EqualsAndHashCode;
-import org.springblade.core.tenant.mp.TenantEntity;
-
-import java.io.Serializable;
-
-/**
- * 房屋-标签 实体类
- *
- * @author BladeX
- * @since 2023-10-28
- */
-@Data
-@TableName("jczz_house_label")
-@ApiModel(value = "HouseLabel对象", description = "房屋-标签")
-public class HouseLabelEntity implements Serializable {
-	private static final long serialVersionUID = 1L;
-
-	/**
-	 * 主键
-	 */
-	@JsonSerialize(using = ToStringSerializer.class)
-	@ApiModelProperty("主键id")
-	@TableId(value = "id", type = IdType.ASSIGN_ID)
-	private Long id;
-
-	/**
-	 * 门牌地址编码
-	 */
-	@ApiModelProperty(value = "门牌地址编码")
-	private String houseCode;
-
-	/**
-	 * 标签ID
-	 */
-	@ApiModelProperty(value = "标签ID")
-	private Integer labelId;
-
-	/**
-	 * 标签名称
-	 */
-	@ApiModelProperty(value = "标签名称")
-	private String labelName;
-	/**
-	 * 颜色
-	 */
-	@ApiModelProperty(value = "颜色")
-	private String color;
-	/**
-	 * 备注
-	 */
-	@ApiModelProperty(value = "备注")
-	private String remark;
-}
diff --git a/src/main/java/org/springblade/modules/house/entity/UserHouseLabelEntity.java b/src/main/java/org/springblade/modules/house/entity/UserHouseLabelEntity.java
new file mode 100644
index 0000000..2fd9340
--- /dev/null
+++ b/src/main/java/org/springblade/modules/house/entity/UserHouseLabelEntity.java
@@ -0,0 +1,82 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.house.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.io.Serializable;
+
+/**
+ * 房屋-标签对象 jczz_user_house_label
+ *
+ * @author ${context.author}
+ * @date 2023-11-14 09:56:56
+ */
+@ApiModel(value = "UserHouseLabel对象" , description = "房屋-标签")
+@Data
+@TableName("jczz_user_house_label")
+public class UserHouseLabelEntity implements Serializable
+{
+	private static final long serialVersionUID = 1L;
+
+
+	/** 主键 */
+	@ApiModelProperty(value = "主键ID", example = "")
+	@TableId(value = "id", type = IdType.AUTO)
+	private Long id;
+
+	/** 门牌地址编码 */
+	@ApiModelProperty(value = "门牌地址编码", example = "")
+	@TableField("house_code")
+	private String houseCode;
+
+	/** 标签ID */
+	@ApiModelProperty(value = "标签ID", example = "")
+	@TableField("label_id")
+	private Long labelId;
+
+	/** 标签名称 */
+	@ApiModelProperty(value = "标签名称", example = "")
+	@TableField("label_name")
+	private String labelName;
+
+	/** 颜色 */
+	@ApiModelProperty(value = "颜色", example = "")
+	@TableField("color")
+	private String color;
+
+	/** 备注 */
+	@ApiModelProperty(value = "备注", example = "")
+	@TableField("remark")
+	private String remark;
+
+	/** 用户id */
+	@ApiModelProperty(value = "用户id", example = "")
+	@TableField("user_id")
+	private Long userId;
+
+	/** 标签类型:1:人:2房屋 */
+	@ApiModelProperty(value = "标签类型:1:人:2房屋", example = "")
+	@TableField("lable_type")
+	private Integer lableType;
+}
diff --git a/src/main/java/org/springblade/modules/house/mapper/HouseLabelMapper.xml b/src/main/java/org/springblade/modules/house/mapper/HouseLabelMapper.xml
deleted file mode 100644
index 182143e..0000000
--- a/src/main/java/org/springblade/modules/house/mapper/HouseLabelMapper.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.springblade.modules.house.mapper.HouseLabelMapper">
-
-    <!-- 通用查询映射结果 -->
-    <resultMap id="houseLabelResultMap" type="org.springblade.modules.house.entity.HouseLabelEntity">
-    </resultMap>
-
-
-    <select id="selectHouseLabelPage" resultMap="houseLabelResultMap">
-        select * from jczz_house_label where is_deleted = 0
-    </select>
-
-
-</mapper>
diff --git a/src/main/java/org/springblade/modules/house/mapper/HouseLabelMapper.java b/src/main/java/org/springblade/modules/house/mapper/UserHouseLabelMapper.java
similarity index 89%
rename from src/main/java/org/springblade/modules/house/mapper/HouseLabelMapper.java
rename to src/main/java/org/springblade/modules/house/mapper/UserHouseLabelMapper.java
index ad4e083..a822c9c 100644
--- a/src/main/java/org/springblade/modules/house/mapper/HouseLabelMapper.java
+++ b/src/main/java/org/springblade/modules/house/mapper/UserHouseLabelMapper.java
@@ -16,7 +16,7 @@
  */
 package org.springblade.modules.house.mapper;
 
-import org.springblade.modules.house.entity.HouseLabelEntity;
+import org.springblade.modules.house.entity.UserHouseLabelEntity;
 import org.springblade.modules.house.vo.HouseLabelVO;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
@@ -28,7 +28,7 @@
  * @author BladeX
  * @since 2023-10-28
  */
-public interface HouseLabelMapper extends BaseMapper<HouseLabelEntity> {
+public interface UserHouseLabelMapper extends BaseMapper<UserHouseLabelEntity> {
 
 	/**
 	 * 自定义分页
diff --git a/src/main/java/org/springblade/modules/house/mapper/UserHouseLabelMapper.xml b/src/main/java/org/springblade/modules/house/mapper/UserHouseLabelMapper.xml
new file mode 100644
index 0000000..63de322
--- /dev/null
+++ b/src/main/java/org/springblade/modules/house/mapper/UserHouseLabelMapper.xml
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.springblade.modules.house.mapper.UserHouseLabelMapper">
+
+
+    <resultMap type="org.springblade.modules.house.dto.UserHouseLabelDTO" id="UserHouseLabelDTOResult">
+        <result property="id"    column="id"    />
+        <result property="houseCode"    column="house_code"    />
+        <result property="labelId"    column="label_id"    />
+        <result property="labelName"    column="label_name"    />
+        <result property="color"    column="color"    />
+        <result property="remark"    column="remark"    />
+        <result property="userId"    column="user_id"    />
+        <result property="lableType"    column="lable_type"    />
+    </resultMap>
+
+    <sql id="selectUserHouseLabel">
+        select
+            id,
+            house_code,
+            label_id,
+            label_name,
+            color,
+            remark,
+            user_id,
+            lable_type
+        from
+            jczz_user_house_label
+    </sql>
+
+
+<!--    <select id="selectUserHouseLabelList" parameterType="org.springblade.modules.house.dto.UserHouseLabelDTO" resultMap="UserHouseLabelDTOResult">-->
+<!--        <include refid="selectUserHouseLabel"/>-->
+<!--        <where>-->
+<!--            <if test="id != null "> and id = #{id}</if>-->
+<!--            <if test="houseCode != null  and houseCode != ''"> and house_code = #{houseCode}</if>-->
+<!--            <if test="labelId != null "> and label_id = #{labelId}</if>-->
+<!--            <if test="labelName != null  and labelName != ''"> and label_name = #{labelName}</if>-->
+<!--            <if test="color != null  and color != ''"> and color = #{color}</if>-->
+<!--            <if test="remark != null  and remark != ''"> and remark = #{remark}</if>-->
+<!--            <if test="userId != null "> and user_id = #{userId}</if>-->
+<!--            <if test="lableType != null "> and lable_type = #{lableType}</if>-->
+<!--        </where>-->
+<!--    </select>-->
+
+
+    <select id="selectHouseLabelPage" resultMap="UserHouseLabelDTOResult">
+        <include refid="selectUserHouseLabel"/>
+        <where>
+            <if test="houseLabel.id != null "> and id = #{houseLabel.id}</if>
+            <if test="houseLabel.houseCode != null  and houseLabel.houseCode != ''"> and house_code = #{houseLabel.houseCode}</if>
+            <if test="houseLabel.labelId != null "> and label_id = #{houseLabel.labelId}</if>
+            <if test="houseLabel.labelName != null  and houseLabel.labelName != ''"> and label_name = #{houseLabel.labelName}</if>
+            <if test="houseLabel.color != null  and houseLabel.color != ''"> and color = #{houseLabel.color}</if>
+            <if test="houseLabel.remark != null  and remark != ''"> and remark = #{houseLabel.remark}</if>
+            <if test="houseLabel.userId != null "> and user_id = #{houseLabel.userId}</if>
+            <if test="houseLabel.lableType != null "> and lable_type = #{houseLabel.lableType}</if>
+        </where>
+    </select>
+
+
+</mapper>
diff --git a/src/main/java/org/springblade/modules/house/service/IHouseLabelService.java b/src/main/java/org/springblade/modules/house/service/IUserHouseLabelService.java
similarity index 84%
rename from src/main/java/org/springblade/modules/house/service/IHouseLabelService.java
rename to src/main/java/org/springblade/modules/house/service/IUserHouseLabelService.java
index a64fb2b..016c34c 100644
--- a/src/main/java/org/springblade/modules/house/service/IHouseLabelService.java
+++ b/src/main/java/org/springblade/modules/house/service/IUserHouseLabelService.java
@@ -17,9 +17,8 @@
 package org.springblade.modules.house.service;
 
 import com.baomidou.mybatisplus.extension.service.IService;
-import org.springblade.modules.house.entity.HouseLabelEntity;
+import org.springblade.modules.house.entity.UserHouseLabelEntity;
 import org.springblade.modules.house.vo.HouseLabelVO;
-import org.springblade.core.mp.base.BaseService;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 
 /**
@@ -28,7 +27,7 @@
  * @author BladeX
  * @since 2023-10-28
  */
-public interface IHouseLabelService extends IService<HouseLabelEntity> {
+public interface IUserHouseLabelService extends IService<UserHouseLabelEntity> {
 
 	/**
 	 * 自定义分页
@@ -45,5 +44,5 @@
 	 * @param houseLabel
 	 * @return
 	 */
-    boolean saveOrUpdateHouseLabel(HouseLabelEntity houseLabel);
+    boolean saveOrUpdateHouseLabel(UserHouseLabelEntity houseLabel);
 }
diff --git a/src/main/java/org/springblade/modules/house/service/impl/HouseLabelServiceImpl.java b/src/main/java/org/springblade/modules/house/service/impl/HouseLabelServiceImpl.java
index f34961f..82a76e3 100644
--- a/src/main/java/org/springblade/modules/house/service/impl/HouseLabelServiceImpl.java
+++ b/src/main/java/org/springblade/modules/house/service/impl/HouseLabelServiceImpl.java
@@ -18,11 +18,10 @@
 
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import org.springblade.modules.house.entity.HouseLabelEntity;
+import org.springblade.modules.house.entity.UserHouseLabelEntity;
 import org.springblade.modules.house.vo.HouseLabelVO;
-import org.springblade.modules.house.mapper.HouseLabelMapper;
-import org.springblade.modules.house.service.IHouseLabelService;
-import org.springblade.core.mp.base.BaseServiceImpl;
+import org.springblade.modules.house.mapper.UserHouseLabelMapper;
+import org.springblade.modules.house.service.IUserHouseLabelService;
 import org.springblade.modules.label.entity.LabelEntity;
 import org.springblade.modules.label.service.ILabelService;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -36,7 +35,7 @@
  * @since 2023-10-28
  */
 @Service
-public class HouseLabelServiceImpl extends ServiceImpl<HouseLabelMapper, HouseLabelEntity> implements IHouseLabelService {
+public class HouseLabelServiceImpl extends ServiceImpl<UserHouseLabelMapper, UserHouseLabelEntity> implements IUserHouseLabelService {
 
 	@Autowired
 	private ILabelService labelService;
@@ -52,15 +51,15 @@
 	 * @return
 	 */
 	@Override
-	public boolean saveOrUpdateHouseLabel(HouseLabelEntity houseLabel) {
+	public boolean saveOrUpdateHouseLabel(UserHouseLabelEntity houseLabel) {
 		// 查询标签名称
 		LabelEntity labelEntity = labelService.getById(houseLabel.getLabelId());
 		houseLabel.setLabelName(labelEntity.getLabelName());
 		// 判断同一个房屋同一个标签是否已存在,已存在则更新,不存在则新增
-		QueryWrapper<HouseLabelEntity> queryWrapper = new QueryWrapper<>();
+		QueryWrapper<UserHouseLabelEntity> queryWrapper = new QueryWrapper<>();
 		queryWrapper.eq("house_code",houseLabel.getHouseCode())
 					.eq("label_id",houseLabel.getLabelId());
-		HouseLabelEntity one = getOne(queryWrapper);
+		UserHouseLabelEntity one = getOne(queryWrapper);
 		if (null != one){
 			houseLabel.setId(one.getId());
 			// 更新
diff --git a/src/main/java/org/springblade/modules/house/service/impl/HouseholdLabelServiceImpl.java b/src/main/java/org/springblade/modules/house/service/impl/HouseholdLabelServiceImpl.java
index dec7eed..1b6e974 100644
--- a/src/main/java/org/springblade/modules/house/service/impl/HouseholdLabelServiceImpl.java
+++ b/src/main/java/org/springblade/modules/house/service/impl/HouseholdLabelServiceImpl.java
@@ -19,7 +19,7 @@
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import org.springblade.common.node.TreeNode;
-import org.springblade.modules.house.entity.HouseLabelEntity;
+import org.springblade.modules.house.entity.UserHouseLabelEntity;
 import org.springblade.modules.house.entity.HouseholdLabelEntity;
 import org.springblade.modules.house.vo.HouseholdLabelVO;
 import org.springblade.modules.house.mapper.HouseholdLabelMapper;
diff --git a/src/main/java/org/springblade/modules/house/vo/HouseLabelVO.java b/src/main/java/org/springblade/modules/house/vo/HouseLabelVO.java
index 2c2fe46..46ee86b 100644
--- a/src/main/java/org/springblade/modules/house/vo/HouseLabelVO.java
+++ b/src/main/java/org/springblade/modules/house/vo/HouseLabelVO.java
@@ -16,7 +16,7 @@
  */
 package org.springblade.modules.house.vo;
 
-import org.springblade.modules.house.entity.HouseLabelEntity;
+import org.springblade.modules.house.entity.UserHouseLabelEntity;
 import org.springblade.core.tool.node.INode;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
@@ -29,7 +29,7 @@
  */
 @Data
 @EqualsAndHashCode(callSuper = true)
-public class HouseLabelVO extends HouseLabelEntity {
+public class HouseLabelVO extends UserHouseLabelEntity {
 	private static final long serialVersionUID = 1L;
 
 }
diff --git a/src/main/java/org/springblade/modules/house/wrapper/HouseLabelWrapper.java b/src/main/java/org/springblade/modules/house/wrapper/HouseLabelWrapper.java
index 38dc133..59097ae 100644
--- a/src/main/java/org/springblade/modules/house/wrapper/HouseLabelWrapper.java
+++ b/src/main/java/org/springblade/modules/house/wrapper/HouseLabelWrapper.java
@@ -18,7 +18,7 @@
 
 import org.springblade.core.mp.support.BaseEntityWrapper;
 import org.springblade.core.tool.utils.BeanUtil;
-import org.springblade.modules.house.entity.HouseLabelEntity;
+import org.springblade.modules.house.entity.UserHouseLabelEntity;
 import org.springblade.modules.house.vo.HouseLabelVO;
 import java.util.Objects;
 
@@ -28,14 +28,14 @@
  * @author BladeX
  * @since 2023-10-28
  */
-public class HouseLabelWrapper extends BaseEntityWrapper<HouseLabelEntity, HouseLabelVO>  {
+public class HouseLabelWrapper extends BaseEntityWrapper<UserHouseLabelEntity, HouseLabelVO>  {
 
 	public static HouseLabelWrapper build() {
 		return new HouseLabelWrapper();
  	}
 
 	@Override
-	public HouseLabelVO entityVO(HouseLabelEntity houseLabel) {
+	public HouseLabelVO entityVO(UserHouseLabelEntity houseLabel) {
 		HouseLabelVO houseLabelVO = Objects.requireNonNull(BeanUtil.copy(houseLabel, HouseLabelVO.class));
 
 		//User createUser = UserCache.getUser(houseLabel.getCreateUser());
diff --git a/src/main/java/org/springblade/modules/label/controller/LabelController.java b/src/main/java/org/springblade/modules/label/controller/LabelController.java
index 1667af1..4a31741 100644
--- a/src/main/java/org/springblade/modules/label/controller/LabelController.java
+++ b/src/main/java/org/springblade/modules/label/controller/LabelController.java
@@ -16,24 +16,24 @@
  */
 package org.springblade.modules.label.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.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.springframework.web.bind.annotation.*;
-import com.baomidou.mybatisplus.core.metadata.IPage;
 import org.springblade.modules.label.entity.LabelEntity;
+import org.springblade.modules.label.service.ILabelService;
 import org.springblade.modules.label.vo.LabelVO;
 import org.springblade.modules.label.wrapper.LabelWrapper;
-import org.springblade.modules.label.service.ILabelService;
+import org.springframework.web.bind.annotation.*;
+
+import javax.validation.Valid;
+import java.util.List;
 
 /**
  * 标签管理 控制器
@@ -59,6 +59,7 @@
 		LabelEntity detail = labelService.getOne(Condition.getQueryWrapper(label));
 		return R.data(LabelWrapper.build().entityVO(detail));
 	}
+
 	/**
 	 * 标签管理 分页
 	 */
@@ -71,6 +72,17 @@
 	}
 
 	/**
+	 * 标签管理 分页
+	 */
+	@GetMapping("/tree")
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "分页", notes = "传入label")
+	public R<List<LabelVO>> tree(LabelEntity label) {
+		List<LabelVO> pages = labelService.tree(label);
+		return R.data( pages);
+	}
+
+	/**
 	 * 标签管理 自定义分页
 	 */
 	@GetMapping("/page")
diff --git a/src/main/java/org/springblade/modules/label/service/ILabelService.java b/src/main/java/org/springblade/modules/label/service/ILabelService.java
index 72c794b..97473c8 100644
--- a/src/main/java/org/springblade/modules/label/service/ILabelService.java
+++ b/src/main/java/org/springblade/modules/label/service/ILabelService.java
@@ -22,6 +22,8 @@
 import org.springblade.core.mp.base.BaseService;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 
+import java.util.List;
+
 /**
  * 标签管理 服务类
  *
@@ -45,4 +47,6 @@
 	 * @return
 	 */
     Object getLabelList(LabelVO label);
+
+    List<LabelVO> tree(LabelEntity label);
 }
diff --git a/src/main/java/org/springblade/modules/label/service/impl/LabelServiceImpl.java b/src/main/java/org/springblade/modules/label/service/impl/LabelServiceImpl.java
index e548c07..2f5d8d5 100644
--- a/src/main/java/org/springblade/modules/label/service/impl/LabelServiceImpl.java
+++ b/src/main/java/org/springblade/modules/label/service/impl/LabelServiceImpl.java
@@ -26,6 +26,8 @@
 import org.springframework.stereotype.Service;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 
+import java.util.List;
+
 /**
  * 标签管理 服务实现类
  *
@@ -49,4 +51,9 @@
 	public Object getLabelList(LabelVO label) {
 		return NodeTreeUtil.getNodeTree(baseMapper.getLabelList(label));
 	}
+
+	@Override
+	public List<LabelVO> tree(LabelEntity label) {
+		return null;
+	}
 }
diff --git a/src/main/java/org/springblade/modules/task/controller/TaskCampusReportingEventController.java b/src/main/java/org/springblade/modules/task/controller/TaskCampusReportingEventController.java
index c603806..38a5722 100644
--- a/src/main/java/org/springblade/modules/task/controller/TaskCampusReportingEventController.java
+++ b/src/main/java/org/springblade/modules/task/controller/TaskCampusReportingEventController.java
@@ -28,6 +28,7 @@
 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;
@@ -88,8 +89,8 @@
 	@PostMapping("/save")
 	@ApiOperationSupport(order = 4)
 	@ApiOperation(value = "新增", notes = "传入taskCampusReportingEvent")
-	public R save(@Valid @RequestBody TaskCampusReportingEventEntity taskCampusReportingEvent) {
-		return R.status(taskCampusReportingEventService.save(taskCampusReportingEvent));
+	public R save(@Valid @RequestBody TaskCampusReportingEventDTO taskCampusReportingEvent) {
+		return R.status(taskCampusReportingEventService.saveCampusReporting(taskCampusReportingEvent));
 	}
 
 	/**
@@ -98,8 +99,8 @@
 	@PostMapping("/update")
 	@ApiOperationSupport(order = 5)
 	@ApiOperation(value = "修改", notes = "传入taskCampusReportingEvent")
-	public R update(@Valid @RequestBody TaskCampusReportingEventEntity taskCampusReportingEvent) {
-		return R.status(taskCampusReportingEventService.updateById(taskCampusReportingEvent));
+	public R update(@Valid @RequestBody TaskCampusReportingEventDTO taskCampusReportingEvent) {
+		return R.status(taskCampusReportingEventService.updateCampusReporting(taskCampusReportingEvent));
 	}
 
 	/**
diff --git a/src/main/java/org/springblade/modules/task/dto/TaskCampusReportingEventDTO.java b/src/main/java/org/springblade/modules/task/dto/TaskCampusReportingEventDTO.java
index 27965b4..a93685d 100644
--- a/src/main/java/org/springblade/modules/task/dto/TaskCampusReportingEventDTO.java
+++ b/src/main/java/org/springblade/modules/task/dto/TaskCampusReportingEventDTO.java
@@ -16,6 +16,7 @@
  */
 package org.springblade.modules.task.dto;
 
+import io.swagger.annotations.ApiModelProperty;
 import org.springblade.modules.task.entity.TaskCampusReportingEventEntity;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
@@ -31,4 +32,8 @@
 public class TaskCampusReportingEventDTO extends TaskCampusReportingEventEntity {
 	private static final long serialVersionUID = 1L;
 
+	@ApiModelProperty(value = "门牌地址编码")
+	private String houseCode;
+
+
 }
diff --git a/src/main/java/org/springblade/modules/task/entity/TaskCampusReportingEventEntity.java b/src/main/java/org/springblade/modules/task/entity/TaskCampusReportingEventEntity.java
index 3571ae2..8a460e7 100644
--- a/src/main/java/org/springblade/modules/task/entity/TaskCampusReportingEventEntity.java
+++ b/src/main/java/org/springblade/modules/task/entity/TaskCampusReportingEventEntity.java
@@ -65,7 +65,7 @@
 	 * 自查人姓名
 	 */
 	@ApiModelProperty(value = "自查人姓名")
-	private Integer checkUserId;
+	private Long checkUserId;
 	/**
 	 * 自查人姓名
 	 */
diff --git a/src/main/java/org/springblade/modules/task/mapper/TaskCampusReportingEventMapper.xml b/src/main/java/org/springblade/modules/task/mapper/TaskCampusReportingEventMapper.xml
index c9f50d7..7fea769 100644
--- a/src/main/java/org/springblade/modules/task/mapper/TaskCampusReportingEventMapper.xml
+++ b/src/main/java/org/springblade/modules/task/mapper/TaskCampusReportingEventMapper.xml
@@ -4,45 +4,121 @@
 
     <!-- 通用查询映射结果 -->
     <resultMap id="taskCampusReportingEventResultMap" type="org.springblade.modules.task.entity.TaskCampusReportingEventEntity">
-        <result column="id" property="id"/>
-        <result column="task_id" property="taskId"/>
-        <result column="place_id" property="placeId"/>
-        <result column="district_id" property="districtId"/>
-        <result column="district_name" property="districtName"/>
-        <result column="check_time" property="checkTime"/>
-        <result column="check_user_id" property="checkUserId"/>
-        <result column="check_user_name" property="checkUserName"/>
-        <result column="check_telephone" property="checkTelephone"/>
-        <result column="location" property="location"/>
-        <result column="sc_status" property="scStatus"/>
-        <result column="sc_image_urls" property="scImageUrls"/>
-        <result column="uan_image_urls" property="uanImageUrls"/>
-        <result column="confirm_time" property="confirmTime"/>
-        <result column="confirm_user_id" property="confirmUserId"/>
-        <result column="confirm_user_name" property="confirmUserName"/>
-        <result column="confirm_notion" property="confirmNotion"/>
-        <result column="confirm_flag" property="confirmFlag"/>
-        <result column="campus_name" property="campusName"/>
-        <result column="four_one" property="fourOne"/>
-        <result column="fire_facs_nums" property="fireFacsNums"/>
-        <result column="fire_facs_status" property="fireFacsStatus"/>
-        <result column="fire_facs_image_urls" property="fireFacsImageUrls"/>
-        <result column="fire_facs_type" property="fireFacsType"/>
-        <result column="patrol_image_urls" property="patrolImageUrls"/>
-        <result column="anti_collision" property="antiCollision"/>
-        <result column="anti_collision_image_urls" property="antiCollisionImageUrls"/>
-        <result column="full_so_nums" property="fullSoNums"/>
-        <result column="part_so_nums" property="partSoNums"/>
-        <result column="monitor_nums" property="monitorNums"/>
-        <result column="monitor_over" property="monitorOver"/>
-        <result column="high_altitude_monitor" property="highAltitudeMonitor"/>
-        <result column="ha_image_urls" property="haImageUrls"/>
-        <result column="fo_image_urls" property="foImageUrls"/>
+        <result property="id"    column="id"    />
+        <result property="taskId"    column="task_id"    />
+        <result property="placeId"    column="place_id"    />
+        <result property="districtId"    column="district_id"    />
+        <result property="districtName"    column="district_name"    />
+        <result property="checkTime"    column="check_time"    />
+        <result property="checkUserId"    column="check_user_id"    />
+        <result property="checkUserName"    column="check_user_name"    />
+        <result property="checkTelephone"    column="check_telephone"    />
+        <result property="location"    column="location"    />
+        <result property="scStatus"    column="sc_status"    />
+        <result property="scImageUrls"    column="sc_image_urls"    />
+        <result property="uanImageUrls"    column="uan_image_urls"    />
+        <result property="confirmTime"    column="confirm_time"    />
+        <result property="confirmUserId"    column="confirm_user_id"    />
+        <result property="confirmUserName"    column="confirm_user_name"    />
+        <result property="confirmNotion"    column="confirm_notion"    />
+        <result property="confirmFlag"    column="confirm_flag"    />
+        <result property="campusName"    column="campus_name"    />
+        <result property="fourOne"    column="four_one"    />
+        <result property="fireFacsNums"    column="fire_facs_nums"    />
+        <result property="fireFacsStatus"    column="fire_facs_status"    />
+        <result property="fireFacsImageUrls"    column="fire_facs_image_urls"    />
+        <result property="fireFacsType"    column="fire_facs_type"    />
+        <result property="patrolImageUrls"    column="patrol_image_urls"    />
+        <result property="antiCollision"    column="anti_collision"    />
+        <result property="antiCollisionImageUrls"    column="anti_collision_image_urls"    />
+        <result property="fullSoNums"    column="full_so_nums"    />
+        <result property="partSoNums"    column="part_so_nums"    />
+        <result property="monitorNums"    column="monitor_nums"    />
+        <result property="monitorOver"    column="monitor_over"    />
+        <result property="highAltitudeMonitor"    column="high_altitude_monitor"    />
+        <result property="haImageUrls"    column="ha_image_urls"    />
+        <result property="foImageUrls"    column="fo_image_urls"    />
     </resultMap>
 
 
+    <sql id="selectTaskCampusReportingEvent">
+        select
+            id,
+            task_id,
+            place_id,
+            district_id,
+            district_name,
+            check_time,
+            check_user_id,
+            check_user_name,
+            check_telephone,
+            location,
+            sc_status,
+            sc_image_urls,
+            uan_image_urls,
+            confirm_time,
+            confirm_user_id,
+            confirm_user_name,
+            confirm_notion,
+            confirm_flag,
+            campus_name,
+            four_one,
+            fire_facs_nums,
+            fire_facs_status,
+            fire_facs_image_urls,
+            fire_facs_type,
+            patrol_image_urls,
+            anti_collision,
+            anti_collision_image_urls,
+            full_so_nums,
+            part_so_nums,
+            monitor_nums,
+            monitor_over,
+            high_altitude_monitor,
+            ha_image_urls,
+            fo_image_urls
+        from
+            jczz_task_campus_reporting_event
+    </sql>
+
     <select id="selectTaskCampusReportingEventPage" resultMap="taskCampusReportingEventResultMap">
-        select * from jczz_task_campus_reporting_event where is_deleted = 0
+        <include refid="selectTaskCampusReportingEvent"/>
+        <where>
+            <if test="taskCampusReportingEvent.id != null "> and id = #{taskCampusReportingEvent.id}</if>
+            <if test="taskCampusReportingEvent.taskId != null "> and task_id = #{taskCampusReportingEvent.taskId}</if>
+            <if test="taskCampusReportingEvent.placeId != null "> and place_id = #{taskCampusReportingEvent.placeId}</if>
+            <if test="taskCampusReportingEvent.districtId != null  and taskCampusReportingEvent.districtId != ''"> and district_id = #{taskCampusReportingEvent.districtId}</if>
+            <if test="taskCampusReportingEvent.districtName != null  and taskCampusReportingEvent.districtName != ''"> and district_name = #{taskCampusReportingEvent.districtName}</if>
+            <if test="taskCampusReportingEvent.checkTime != null "> and check_time = #{taskCampusReportingEvent.checkTime}</if>
+            <if test="taskCampusReportingEvent.checkUserId != null "> and check_user_id = #{taskCampusReportingEvent.checkUserId}</if>
+            <if test="taskCampusReportingEvent.checkUserName != null  and taskCampusReportingEvent.checkUserName != ''"> and check_user_name = #{taskCampusReportingEvent.checkUserName}</if>
+            <if test="taskCampusReportingEvent.checkTelephone != null  and taskCampusReportingEvent.checkTelephone != ''"> and check_telephone = #{taskCampusReportingEvent.checkTelephone}</if>
+            <if test="taskCampusReportingEvent.location != null  and taskCampusReportingEvent.location != ''"> and location = #{taskCampusReportingEvent.location}</if>
+            <if test="taskCampusReportingEvent.scStatus != null  and taskCampusReportingEvent.scStatus != ''"> and sc_status = #{taskCampusReportingEvent.scStatus}</if>
+            <if test="taskCampusReportingEvent.scImageUrls != null  and taskCampusReportingEvent.scImageUrls != ''"> and sc_image_urls = #{taskCampusReportingEvent.scImageUrls}</if>
+            <if test="taskCampusReportingEvent.uanImageUrls != null  and taskCampusReportingEvent.uanImageUrls != ''"> and uan_image_urls = #{taskCampusReportingEvent.uanImageUrls}</if>
+            <if test="taskCampusReportingEvent.confirmTime != null "> and confirm_time = #{taskCampusReportingEvent.confirmTime}</if>
+            <if test="taskCampusReportingEvent.confirmUserId != null "> and confirm_user_id = #{taskCampusReportingEvent.confirmUserId}</if>
+            <if test="taskCampusReportingEvent.confirmUserName != null  and taskCampusReportingEvent.confirmUserName != ''"> and confirm_user_name = #{taskCampusReportingEvent.confirmUserName}</if>
+            <if test="taskCampusReportingEvent.confirmNotion != null  and taskCampusReportingEvent.confirmNotion != ''"> and confirm_notion = #{taskCampusReportingEvent.confirmNotion}</if>
+            <if test="taskCampusReportingEvent.confirmFlag != null  and taskCampusReportingEvent.confirmFlag != ''"> and confirm_flag = #{taskCampusReportingEvent.confirmFlag}</if>
+            <if test="taskCampusReportingEvent.campusName != null  and taskCampusReportingEvent.campusName != ''"> and campus_name = #{taskCampusReportingEvent.campusName}</if>
+            <if test="taskCampusReportingEvent.fourOne != null  and taskCampusReportingEvent.fourOne != ''"> and four_one = #{taskCampusReportingEvent.fourOne}</if>
+            <if test="taskCampusReportingEvent.fireFacsNums != null "> and fire_facs_nums = #{taskCampusReportingEvent.fireFacsNums}</if>
+            <if test="taskCampusReportingEvent.fireFacsStatus != null  and taskCampusReportingEvent.fireFacsStatus != ''"> and fire_facs_status = #{taskCampusReportingEvent.fireFacsStatus}</if>
+            <if test="taskCampusReportingEvent.fireFacsImageUrls != null  and taskCampusReportingEvent.fireFacsImageUrls != ''"> and fire_facs_image_urls = #{taskCampusReportingEvent.fireFacsImageUrls}</if>
+            <if test="taskCampusReportingEvent.fireFacsType != null  and taskCampusReportingEvent.fireFacsType != ''"> and fire_facs_type = #{taskCampusReportingEvent.fireFacsType}</if>
+            <if test="taskCampusReportingEvent.patrolImageUrls != null  and taskCampusReportingEvent.patrolImageUrls != ''"> and patrol_image_urls = #{taskCampusReportingEvent.patrolImageUrls}</if>
+            <if test="taskCampusReportingEvent.antiCollision != null  and taskCampusReportingEvent.antiCollision != ''"> and anti_collision = #{taskCampusReportingEvent.antiCollision}</if>
+            <if test="taskCampusReportingEvent.antiCollisionImageUrls != null  and taskCampusReportingEvent.antiCollisionImageUrls != ''"> and anti_collision_image_urls = #{taskCampusReportingEvent.antiCollisionImageUrls}</if>
+            <if test="taskCampusReportingEvent.fullSoNums != null "> and full_so_nums = #{taskCampusReportingEvent.fullSoNums}</if>
+            <if test="taskCampusReportingEvent.partSoNums != null "> and part_so_nums = #{taskCampusReportingEvent.partSoNums}</if>
+            <if test="taskCampusReportingEvent.monitorNums != null "> and monitor_nums = #{taskCampusReportingEvent.monitorNums}</if>
+            <if test="taskCampusReportingEvent.monitorOver != null  and taskCampusReportingEvent.monitorOver != ''"> and monitor_over = #{taskCampusReportingEvent.monitorOver}</if>
+            <if test="taskCampusReportingEvent.highAltitudeMonitor != null  and taskCampusReportingEvent.highAltitudeMonitor != ''"> and high_altitude_monitor = #{taskCampusReportingEvent.highAltitudeMonitor}</if>
+            <if test="taskCampusReportingEvent.haImageUrls != null  and taskCampusReportingEvent.haImageUrls != ''"> and ha_image_urls = #{taskCampusReportingEvent.haImageUrls}</if>
+            <if test="taskCampusReportingEvent.foImageUrls != null  and taskCampusReportingEvent.foImageUrls != ''"> and fo_image_urls = #{taskCampusReportingEvent.foImageUrls}</if>
+        </where>
     </select>
 
 
diff --git a/src/main/java/org/springblade/modules/task/service/ITaskCampusReportingEventService.java b/src/main/java/org/springblade/modules/task/service/ITaskCampusReportingEventService.java
index 5623246..a91dc84 100644
--- a/src/main/java/org/springblade/modules/task/service/ITaskCampusReportingEventService.java
+++ b/src/main/java/org/springblade/modules/task/service/ITaskCampusReportingEventService.java
@@ -16,10 +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.TaskCampusReportingEventDTO;
 import org.springblade.modules.task.entity.TaskCampusReportingEventEntity;
 import org.springblade.modules.task.vo.TaskCampusReportingEventVO;
-import org.springblade.core.mp.base.BaseService;
-import com.baomidou.mybatisplus.core.metadata.IPage;
 
 /**
  * 校园安全检查任务表 服务类
@@ -39,4 +40,7 @@
 	IPage<TaskCampusReportingEventVO> selectTaskCampusReportingEventPage(IPage<TaskCampusReportingEventVO> page, TaskCampusReportingEventVO taskCampusReportingEvent);
 
 
+	Boolean saveCampusReporting(TaskCampusReportingEventDTO taskCampusReportingEvent);
+
+	Boolean updateCampusReporting(TaskCampusReportingEventDTO taskCampusReportingEvent);
 }
diff --git a/src/main/java/org/springblade/modules/task/service/impl/TaskCampusReportingEventServiceImpl.java b/src/main/java/org/springblade/modules/task/service/impl/TaskCampusReportingEventServiceImpl.java
index d43d438..3ddcad1 100644
--- a/src/main/java/org/springblade/modules/task/service/impl/TaskCampusReportingEventServiceImpl.java
+++ b/src/main/java/org/springblade/modules/task/service/impl/TaskCampusReportingEventServiceImpl.java
@@ -16,13 +16,21 @@
  */
 package org.springblade.modules.task.service.impl;
 
+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.springframework.stereotype.Service;
 import com.baomidou.mybatisplus.core.metadata.IPage;
+
+import javax.annotation.Resource;
 
 /**
  * 校园安全检查任务表 服务实现类
@@ -33,10 +41,33 @@
 @Service
 public class TaskCampusReportingEventServiceImpl extends BaseServiceImpl<TaskCampusReportingEventMapper, TaskCampusReportingEventEntity> implements ITaskCampusReportingEventService {
 
+	@Resource
+	private ITaskService taskService;
 	@Override
 	public IPage<TaskCampusReportingEventVO> selectTaskCampusReportingEventPage(IPage<TaskCampusReportingEventVO> page, TaskCampusReportingEventVO taskCampusReportingEvent) {
 		return page.setRecords(baseMapper.selectTaskCampusReportingEventPage(page, taskCampusReportingEvent));
 	}
 
 
+	@Override
+	public Boolean saveCampusReporting(TaskCampusReportingEventDTO taskCampusReportingEvent) {
+		Long aLong = taskService.saveTask(1, DictConstant.CAMPUS_SECURITY_INSPECTION, 3 , "", AuthUtil.getUserId(),taskCampusReportingEvent.getHouseCode());
+		if (aLong > 0) {
+			taskCampusReportingEvent.setTaskId(aLong);
+			taskCampusReportingEvent.setCheckUserId(AuthUtil.getUserId());
+			return baseMapper.insert(taskCampusReportingEvent) > 0 ? true : false;
+		}
+		return false;
+	}
+
+
+	@Override
+	public Boolean updateCampusReporting(TaskCampusReportingEventDTO taskCampusReportingEvent) {
+		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) {
+			return baseMapper.updateById(taskCampusReportingEvent) > 0 ? true : false;
+		}
+		return false;
+	}
 }

--
Gitblit v1.9.3