Browse Source

add:巡查养护改造

release-sy-v1.0.0
“lyd” 6 days ago
parent
commit
c42658a5e8
  1. 56
      shuili-system/src/main/java/com/kms/yxgh/df/controller/v2/DfTaskV2Controller.java
  2. 9
      shuili-system/src/main/java/com/kms/yxgh/df/domain/DfCheckingRecord.java
  3. 24
      shuili-system/src/main/java/com/kms/yxgh/df/domain/DfCheckingV2ProjectManage.java
  4. 94
      shuili-system/src/main/java/com/kms/yxgh/df/domain/DfTaskV2Manage.java
  5. 3
      shuili-system/src/main/java/com/kms/yxgh/df/dto/v2/DfRecordDetailV2Dto.java
  6. 48
      shuili-system/src/main/java/com/kms/yxgh/df/dto/v2/DfRecordSearchV2Dto.java
  7. 66
      shuili-system/src/main/java/com/kms/yxgh/df/dto/v2/DfTaskInfoV2Dto.java
  8. 65
      shuili-system/src/main/java/com/kms/yxgh/df/dto/v2/DfTaskListV2Dto.java
  9. 21
      shuili-system/src/main/java/com/kms/yxgh/df/dto/v2/DfV2CheckingDto.java
  10. 22
      shuili-system/src/main/java/com/kms/yxgh/df/mapper/DfTaskV2Mapper.java
  11. 16
      shuili-system/src/main/java/com/kms/yxgh/df/service/DfCheckingRecordV2Service.java
  12. 20
      shuili-system/src/main/java/com/kms/yxgh/df/service/DfCheckingV2Service.java
  13. 119
      shuili-system/src/main/java/com/kms/yxgh/df/service/DfTaskV2Service.java
  14. 56
      shuili-system/src/main/java/com/kms/yxgh/dw/controller/DwTaskV2Controller.java
  15. 4
      shuili-system/src/main/java/com/kms/yxgh/dw/domain/DwCheckingRecord.java
  16. 23
      shuili-system/src/main/java/com/kms/yxgh/dw/domain/DwCheckingV2ProjectManage.java
  17. 94
      shuili-system/src/main/java/com/kms/yxgh/dw/domain/DwTaskV2Manage.java
  18. 3
      shuili-system/src/main/java/com/kms/yxgh/dw/dto/DwRecordDetailV2Dto.java
  19. 66
      shuili-system/src/main/java/com/kms/yxgh/dw/dto/DwTaskInfoV2Dto.java
  20. 64
      shuili-system/src/main/java/com/kms/yxgh/dw/dto/DwTaskListV2Dto.java
  21. 20
      shuili-system/src/main/java/com/kms/yxgh/dw/dto/DwV2CheckingDto.java
  22. 22
      shuili-system/src/main/java/com/kms/yxgh/dw/mapper/DwTaskV2Mapper.java
  23. 11
      shuili-system/src/main/java/com/kms/yxgh/dw/service/DwCheckingRecordV2Service.java
  24. 19
      shuili-system/src/main/java/com/kms/yxgh/dw/service/DwCheckingV2Service.java
  25. 120
      shuili-system/src/main/java/com/kms/yxgh/dw/service/DwTaskV2Service.java
  26. 56
      shuili-system/src/main/java/com/kms/yxgh/sz/controller/v2/SzTaskV2Controller.java
  27. 6
      shuili-system/src/main/java/com/kms/yxgh/sz/domain/SzCheckingRecord.java
  28. 24
      shuili-system/src/main/java/com/kms/yxgh/sz/domain/SzCheckingV2ProjectManage.java
  29. 94
      shuili-system/src/main/java/com/kms/yxgh/sz/domain/SzTaskV2Manage.java
  30. 3
      shuili-system/src/main/java/com/kms/yxgh/sz/dto/v2/SzRecordDetailV2Dto.java
  31. 74
      shuili-system/src/main/java/com/kms/yxgh/sz/dto/v2/SzTaskInfoV2Dto.java
  32. 74
      shuili-system/src/main/java/com/kms/yxgh/sz/dto/v2/SzTaskListV2Dto.java
  33. 21
      shuili-system/src/main/java/com/kms/yxgh/sz/dto/v2/SzV2CheckingDto.java
  34. 24
      shuili-system/src/main/java/com/kms/yxgh/sz/mapper/SzTaskV2Mapper.java
  35. 12
      shuili-system/src/main/java/com/kms/yxgh/sz/service/SzCheckingRecordV2Service.java
  36. 12
      shuili-system/src/main/java/com/kms/yxgh/sz/service/SzCheckingV2Service.java
  37. 118
      shuili-system/src/main/java/com/kms/yxgh/sz/service/SzTaskV2Service.java
  38. 9
      shuili-system/src/main/resources/mapper/yxgh/DfCheckingV2Mapper.xml
  39. 64
      shuili-system/src/main/resources/mapper/yxgh/DfTaskV2Mapper.xml
  40. 64
      shuili-system/src/main/resources/mapper/yxgh/DwTaskV2Mapper.xml
  41. 63
      shuili-system/src/main/resources/mapper/yxgh/SzTaskV2Mapper.xml
  42. 143
      sql/sy/v1.6.0/增量脚本/v1.6.3-update.sql

56
shuili-system/src/main/java/com/kms/yxgh/df/controller/v2/DfTaskV2Controller.java

@ -0,0 +1,56 @@
package com.kms.yxgh.df.controller.v2;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.kms.yxgh.base.Response;
import com.kms.yxgh.df.dto.v2.DfRecordSearchV2Dto;
import com.kms.yxgh.df.dto.v2.DfTaskInfoV2Dto;
import com.kms.yxgh.df.dto.v2.DfTaskListV2Dto;
import com.kms.yxgh.df.service.DfTaskV2Service;
import com.shuili.common.annotation.Log;
import com.shuili.common.core.domain.SearchParam;
import com.shuili.common.enums.BusinessType;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@AllArgsConstructor
@RequestMapping("/run/df/v2/task")
@Api(tags = "堤防任务管理v2")
public class DfTaskV2Controller {
private final DfTaskV2Service dfTaskV2Service;
@PostMapping("/list")
@ApiOperation("列表v2")
public IPage<DfTaskListV2Dto> list(@RequestBody SearchParam<DfRecordSearchV2Dto> sp) {
return dfTaskV2Service.list(sp);
}
@ApiOperation("详情v2")
@GetMapping(value = "/{id}")
public Response<DfTaskInfoV2Dto> getInfo(@PathVariable("id") String id) {
return Response.ok(dfTaskV2Service.getInfo(id));
}
@Log(title = "新增", businessType = BusinessType.INSERT)
@PostMapping("/add")
@ApiOperation("新增")
public Response<DfTaskInfoV2Dto> add(@RequestBody DfTaskInfoV2Dto dto) {
return Response.ok(dfTaskV2Service.add(dto));
}
@ApiOperation("删除")
@Log(title = "删除", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public Response<Boolean> remove(@PathVariable("ids") String[] ids) {
return Response.ok(dfTaskV2Service.myRemove(ids));
}
}

9
shuili-system/src/main/java/com/kms/yxgh/df/domain/DfCheckingRecord.java

@ -5,11 +5,10 @@ import com.fasterxml.jackson.annotation.JsonFormat;
import com.kms.yxgh.base.SyBaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
import lombok.Data;
/**
* 害堤动物防治计划对象 bs_sgc_df_xcitem
*
@ -22,6 +21,12 @@ import lombok.Data;
public class DfCheckingRecord extends SyBaseEntity {
private static final long serialVersionUID = 1L;
/**
* 任务id
*/
@ApiModelProperty("任务id")
private String taskId;
/**
* 开始时间
*/

24
shuili-system/src/main/java/com/kms/yxgh/df/domain/DfCheckingV2ProjectManage.java

@ -1,14 +1,11 @@
package com.kms.yxgh.df.domain;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.kms.yxgh.base.SyBaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
/**
* 害堤动物防治计划对象 bs_sgc_df_hdjh
@ -22,27 +19,6 @@ import java.util.Date;
public class DfCheckingV2ProjectManage extends SyBaseEntity {
private static final long serialVersionUID = 1L;
@ApiModelProperty("任务名称")
private String taskName;
@ApiModelProperty("巡检负责单位")
private String responsibleUnit;
@ApiModelProperty("巡检负责单位id")
private String responsibleUnitId;
@ApiModelProperty("巡查周期 字典 patrol_maintenance_cycle")
private String cycle;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty("巡查开始时间")
private Date startDate;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty("巡查结束时间")
private Date endDate;
@ApiModelProperty("范围")
private String scope;
@ApiModelProperty("项目创始人")
private String proFoundingPerson;
@ApiModelProperty("项目创始人id")
private String proFoundingPersonId;
/**
* 堤防代码
*/

94
shuili-system/src/main/java/com/kms/yxgh/df/domain/DfTaskV2Manage.java

@ -0,0 +1,94 @@
package com.kms.yxgh.df.domain;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.kms.yxgh.base.SyBaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
/**
* 任务管理 bs_sgc_df_xmgl
*
* @author sy
* @date 2024-01-04
*/
@TableName("bs_sgc_task_xmgl")
@Data
@ApiModel("任务管理")
public class DfTaskV2Manage extends SyBaseEntity {
private static final long serialVersionUID = 1L;
@ApiModelProperty("巡查项目ID")
private String checkingId;
@ApiModelProperty("任务名称")
private String taskName;
@ApiModelProperty("巡检负责单位")
private String responsibleUnit;
@ApiModelProperty("巡检负责单位id")
private String responsibleUnitId;
@ApiModelProperty("巡查周期 字典 patrol_maintenance_cycle")
private String cycle;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty("巡查开始时间")
private Date startDate;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty("巡查结束时间")
private Date endDate;
@ApiModelProperty("范围")
private String scope;
@ApiModelProperty("项目创始人")
private String proFoundingPerson;
@ApiModelProperty("项目创始人id")
private String proFoundingPersonId;
/**
* 堤防代码
*/
@ApiModelProperty("堤防代码")
private String dikeCode;
/**
* 堤防代码名称
*/
@ApiModelProperty("堤防代码名称")
private String dikeName;
/**
* 项目名称
*/
@ApiModelProperty("项目名称")
private String name;
/**
* 巡查类型 字典patrol_maintenance_type
*/
@ApiModelProperty("巡查类型 字典:patrol_maintenance_type")
private String type;
/**
* 巡查类别字典key_jf_patrol_category
*/
@ApiModelProperty("巡查类别字典:patrol_maintenance_category")
private String category;
/**
* 附加配置
*/
@ApiModelProperty("备注")
private String remark;
/**
* 创建人名称
*/
@ApiModelProperty("创建人名称")
private String createName;
}

3
shuili-system/src/main/java/com/kms/yxgh/df/dto/v2/DfRecordDetailV2Dto.java

@ -18,7 +18,8 @@ import java.util.List;
@Data
@ApiModel("堤防巡视检查记录详情v2")
public class DfRecordDetailV2Dto {
@ApiModelProperty("任务id")
private String taskId;
@ApiModelProperty("巡检负责单位")
private String responsibleUnit;
@ApiModelProperty("巡检负责单位id")

48
shuili-system/src/main/java/com/kms/yxgh/df/dto/v2/DfRecordSearchV2Dto.java

@ -1,6 +1,5 @@
package com.kms.yxgh.df.dto.v2;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.kms.yxgh.common.dto.IAdcdDeptRole;
import com.kms.yxgh.df.service.AuthorityDikeCodeService;
import io.swagger.annotations.ApiModel;
@ -8,60 +7,27 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.util.StringUtils;
import java.util.Date;
@Data
@ApiModel("堤防巡视检查记录检索条件v2")
public class DfRecordSearchV2Dto implements IAdcdDeptRole {
@ApiModelProperty(value = "行政区划")
private String adcd;
@ApiModelProperty(value = "巡查项目id")
private String checkingId;
@ApiModelProperty("堤防名称")
private String dikeName;
@ApiModelProperty("堤防类型")
private String dikeType;
@ApiModelProperty("巡查责任人")
private String dutyHolder;
@ApiModelProperty(value = "堤防编号")
private String dikeCode;
@ApiModelProperty(value = "名称")
private String name;
@ApiModelProperty("巡查类型")
private String type;
@ApiModelProperty("巡查类别")
private String category;
@ApiModelProperty("问题级别")
private String problemLevel;
@ApiModelProperty("状态")
private String status;
@ApiModelProperty("记录详情列表标识查询 巡查中的数据 1是 0否")
private int recordDetailsFlag;
/**
* 问题位置
*/
@ApiModelProperty("部位")
private String parts;
@ApiModelProperty("记录id")
private String recordId;
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
@ApiModelProperty(value = "开始时间")
private Date startDate;
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
@ApiModelProperty(value = "结束时间")
private Date endDate;
@ApiModelProperty(value = "堤防编码")
private String dikeCode;
@ApiModelProperty(value = "任务名称")
private String taskName;
@ApiModelProperty(value = "堤防名称")
private String dikeName;
public String getDikeCode() {
if (StringUtils.isEmpty(this.dikeCode)) {
this.dikeCode =AuthorityDikeCodeService.getAuthorityDikeCode();
this.dikeCode = AuthorityDikeCodeService.getAuthorityDikeCode();
}
return this.dikeCode;
}

66
shuili-system/src/main/java/com/kms/yxgh/df/dto/v2/DfTaskInfoV2Dto.java

@ -0,0 +1,66 @@
package com.kms.yxgh.df.dto.v2;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotNull;
import java.util.Date;
@Data
@ApiModel("堤防任务详情v2")
public class DfTaskInfoV2Dto {
@NotNull
@ApiModelProperty("任务id")
private String id;
@ApiModelProperty("巡查项目ID")
private String checkingId;
@ApiModelProperty("任务名称")
private String taskName;
@ApiModelProperty("巡检负责单位")
private String responsibleUnit;
@ApiModelProperty("巡检负责单位id")
private String responsibleUnitId;
@ApiModelProperty("巡查周期 字典 patrol_maintenance_cycle")
private String cycle;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty("巡查开始时间")
private Date startDate;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty("巡查结束时间")
private Date endDate;
@ApiModelProperty("范围")
private String scope;
@ApiModelProperty("项目创始人")
private String proFoundingPerson;
@ApiModelProperty("项目创始人id")
private String proFoundingPersonId;
@ApiModelProperty("堤防编码")
private String dikeCode;
@ApiModelProperty("堤防名称")
private String dikeName;
@ApiModelProperty("堤防类型")
private String dikeType;
@ApiModelProperty("名称")
private String name;
@ApiModelProperty("巡查类型")
private String type;
@ApiModelProperty("巡查类别")
private String category;
@ApiModelProperty("创建时间")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date createTime;
@ApiModelProperty("创建者")
private String createUid;
@ApiModelProperty("创建者名称")
private String createName;
}

65
shuili-system/src/main/java/com/kms/yxgh/df/dto/v2/DfTaskListV2Dto.java

@ -0,0 +1,65 @@
package com.kms.yxgh.df.dto.v2;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
@Data
@ApiModel("堤防任务列表v2")
public class DfTaskListV2Dto {
@ApiModelProperty("任务id")
private String id;
@ApiModelProperty("巡查项目ID")
private String checkingId;
@ApiModelProperty("任务名称")
private String taskName;
@ApiModelProperty("巡检负责单位")
private String responsibleUnit;
@ApiModelProperty("巡检负责单位id")
private String responsibleUnitId;
@ApiModelProperty("巡查周期 字典 patrol_maintenance_cycle")
private String cycle;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty("巡查开始时间")
private Date startDate;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty("巡查结束时间")
private Date endDate;
@ApiModelProperty("范围")
private String scope;
@ApiModelProperty("项目创始人")
private String proFoundingPerson;
@ApiModelProperty("项目创始人id")
private String proFoundingPersonId;
@ApiModelProperty("堤防编码")
private String dikeCode;
@ApiModelProperty("堤防名称")
private String dikeName;
@ApiModelProperty("堤防类型")
private String dikeType;
@ApiModelProperty("名称")
private String name;
@ApiModelProperty("巡查类型")
private String type;
@ApiModelProperty("巡查类别")
private String category;
@ApiModelProperty("创建时间")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date createTime;
@ApiModelProperty("创建者")
private String createUid;
@ApiModelProperty("创建者名称")
private String createName;
}

21
shuili-system/src/main/java/com/kms/yxgh/df/dto/v2/DfV2CheckingDto.java

@ -15,27 +15,6 @@ import java.util.List;
public class DfV2CheckingDto {
@ApiModelProperty("任务名称")
private String taskName;
@ApiModelProperty("巡检负责单位")
private String responsibleUnit;
@ApiModelProperty("巡检负责单位id")
private String responsibleUnitId;
@ApiModelProperty("巡查周期 字典 patrol_maintenance_cycle")
private String cycle;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty("巡查开始时间")
private Date startDate;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty("巡查结束时间")
private Date endDate;
@ApiModelProperty("范围")
private String scope;
@ApiModelProperty("项目创始人")
private String proFoundingPerson;
@ApiModelProperty("项目创始人id")
private String proFoundingPersonId;
@ApiModelProperty("堤防编码")
private String dikeCode;
@ApiModelProperty("堤防名称")

22
shuili-system/src/main/java/com/kms/yxgh/df/mapper/DfTaskV2Mapper.java

@ -0,0 +1,22 @@
package com.kms.yxgh.df.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.kms.yxgh.df.domain.DfTaskV2Manage;
import com.kms.yxgh.df.dto.v2.DfRecordSearchV2Dto;
import com.kms.yxgh.df.dto.v2.DfTaskListV2Dto;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
/**
* 害堤动物防治计划Mapper接口
*
* @author sy
* @date 2024-01-04
*/
@Repository
public interface DfTaskV2Mapper extends BaseMapper<DfTaskV2Manage> {
IPage<DfTaskListV2Dto> page(Page<DfTaskV2Manage> page, @Param("data") DfRecordSearchV2Dto dto);
}

16
shuili-system/src/main/java/com/kms/yxgh/df/service/DfCheckingRecordV2Service.java

@ -7,7 +7,11 @@ import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.kms.yxgh.common.enums.DfYhV2StatusEnum;
import com.kms.yxgh.df.domain.*;
import com.kms.yxgh.df.domain.DfCheckingProblemV2;
import com.kms.yxgh.df.domain.DfCheckingRecord;
import com.kms.yxgh.df.domain.DfCheckingV2ProjectItem;
import com.kms.yxgh.df.domain.DfTaskV2Manage;
import com.kms.yxgh.df.domain.DfYhV2;
import com.kms.yxgh.df.dto.v2.DfRecordDetailV2Dto;
import com.kms.yxgh.df.dto.v2.DfRecordSearchV2Dto;
import com.kms.yxgh.df.mapper.DfCheckingRecordV2Mapper;
@ -39,8 +43,7 @@ public class DfCheckingRecordV2Service extends BaseService<DfCheckingRecordV2Map
private final DfCheckingProblemV2Service dfCheckingProblemV2Service;
private final DfCheckingV2Service dfCheckingV2Service;
private final DfTaskV2Service dfTaskV2Service;
public IPage<DfRecordDetailV2Dto> list(SearchParam<DfRecordSearchV2Dto> sp) {
// 分页参数
@ -63,7 +66,7 @@ public class DfCheckingRecordV2Service extends BaseService<DfCheckingRecordV2Map
dto.setProblemCount(dfCheckingProblemV2Service
.count(new LambdaQueryWrapper<DfCheckingProblemV2>()
.eq(StringUtils.isNotBlank(record.getId()), DfCheckingProblemV2::getRecordId, record.getId())));
DfCheckingV2ProjectManage manage = dfCheckingV2Service.getOne(new LambdaQueryWrapper<DfCheckingV2ProjectManage>().eq(DfCheckingV2ProjectManage::getId, record.getCheckingId()));
DfTaskV2Manage manage = dfTaskV2Service.getOne(new LambdaQueryWrapper<DfTaskV2Manage>().eq(DfTaskV2Manage::getCheckingId, record.getCheckingId()));
if (!Objects.isNull(manage)) {
dto.setResponsibleUnit(manage.getResponsibleUnit());
dto.setResponsibleUnitId(manage.getResponsibleUnitId());
@ -76,11 +79,6 @@ public class DfCheckingRecordV2Service extends BaseService<DfCheckingRecordV2Map
}
private int getProblemCount(String recordId) {
dfCheckingProblemV2Service.count(new LambdaQueryWrapper<DfCheckingProblemV2>().eq(DfCheckingProblemV2::getRecordId, recordId));
return 0;
}
public DfRecordDetailV2Dto getInfo(String id) {
DfRecordDetailV2Dto dto = new DfRecordDetailV2Dto();
DfCheckingRecord dfCheckingRecord = getById(id);

20
shuili-system/src/main/java/com/kms/yxgh/df/service/DfCheckingV2Service.java

@ -11,6 +11,7 @@ import com.kms.yg.df.domain.BsSgcDfManateam;
import com.kms.yg.df.service.BsSgcDfManateamService;
import com.kms.yxgh.df.domain.DfCheckingV2ProjectItem;
import com.kms.yxgh.df.domain.DfCheckingV2ProjectManage;
import com.kms.yxgh.df.domain.DfTaskV2Manage;
import com.kms.yxgh.df.dto.DfCheckingDetailDto;
import com.kms.yxgh.df.dto.v2.DfProReceiveFeedbackV2Dto;
import com.kms.yxgh.df.dto.v2.DfV2CheckingDto;
@ -19,14 +20,18 @@ import com.kms.yxgh.df.mapper.DfCheckingV2Mapper;
import com.kms.yxgh.util.BeanCopyUtils;
import com.kms.yxgh.util.StreamUtils;
import com.shuili.common.core.domain.SearchParam;
import com.shuili.common.core.domain.entity.SysUser;
import com.shuili.common.core.service.BaseService;
import com.shuili.common.utils.BeanUtils;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import java.util.stream.Collectors;
/**
@ -43,6 +48,8 @@ public class DfCheckingV2Service extends BaseService<DfCheckingV2Mapper, DfCheck
private final BsSgcDfManateamService bsSgcDfManateamService;
private final DfTaskV2Service dfTaskV2Service;
public IPage<DfV2CheckingDto> list(SearchParam<DfV2CheckingSearchDto> sp) {
// 分页参数
@ -189,9 +196,12 @@ public class DfCheckingV2Service extends BaseService<DfCheckingV2Mapper, DfCheck
@Transactional(rollbackFor = Exception.class)
public boolean myRemove(String[] ids) {
if (null != ids && ids.length > 0) {
dfCheckingV2ProjectItemV2Service.remove(new LambdaQueryWrapper<DfCheckingV2ProjectItem>()
.in(DfCheckingV2ProjectItem::getCheckingId, getIntList(ids)));
int count = dfTaskV2Service.count(new LambdaQueryWrapper<DfTaskV2Manage>().in(DfTaskV2Manage::getCheckingId, getIntList(ids)));
if (count > 0) {
throw new RuntimeException("请先删除子项");
}
dfTaskV2Service.remove(new LambdaQueryWrapper<DfTaskV2Manage>()
.in(DfTaskV2Manage::getCheckingId, getIntList(ids)));
return remove(new LambdaQueryWrapper<DfCheckingV2ProjectManage>()
.in(DfCheckingV2ProjectManage::getId, getIntList(ids)));
}

119
shuili-system/src/main/java/com/kms/yxgh/df/service/DfTaskV2Service.java

@ -0,0 +1,119 @@
package com.kms.yxgh.df.service;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.kms.yxgh.common.domain.ApprovalTask;
import com.kms.yxgh.common.mapper.ApprovalTaskMapper;
import com.kms.yxgh.df.domain.DfCheckingProblemV2;
import com.kms.yxgh.df.domain.DfCheckingRecord;
import com.kms.yxgh.df.domain.DfTaskV2Manage;
import com.kms.yxgh.df.domain.DfYhV2;
import com.kms.yxgh.df.dto.v2.DfRecordSearchV2Dto;
import com.kms.yxgh.df.dto.v2.DfTaskInfoV2Dto;
import com.kms.yxgh.df.dto.v2.DfTaskListV2Dto;
import com.kms.yxgh.df.mapper.DfCheckingProblemV2Mapper;
import com.kms.yxgh.df.mapper.DfCheckingRecordV2Mapper;
import com.kms.yxgh.df.mapper.DfTaskV2Mapper;
import com.kms.yxgh.df.mapper.DfYhV2Mapper;
import com.kms.yxgh.util.BeanCopyUtils;
import com.shuili.common.core.domain.SearchParam;
import com.shuili.common.core.service.BaseService;
import com.shuili.common.utils.BeanUtils;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
import java.util.stream.Collectors;
/**
* 项目管理
*
* @author sy
* @date 2023-11-09
*/
@Service
@AllArgsConstructor
public class DfTaskV2Service extends BaseService<DfTaskV2Mapper, DfTaskV2Manage> {
private final DfCheckingRecordV2Mapper dfCheckingRecordV2Mapper;
private final DfCheckingProblemV2Mapper dfCheckingProblemV2Mapper;
private final DfYhV2Mapper dfYhV2Mapper;
private final ApprovalTaskMapper approvalTaskMapper;
public IPage<DfTaskListV2Dto> list(SearchParam<DfRecordSearchV2Dto> sp) {
// 分页参数
Page<DfTaskV2Manage> page = new Page<>(sp.getPageNum(), sp.getPageSize());
// 查询分页数据
IPage<DfTaskListV2Dto> queryPage = this.baseMapper.page(page, sp.getData());
if (null == queryPage.getRecords()) {
return new Page<>();
}
IPage<DfTaskListV2Dto> dtoPage = new Page<>();
BeanUtils.copyProperties(queryPage, dtoPage);
dtoPage.setRecords(BeanCopyUtils.copyList(queryPage.getRecords(), DfTaskListV2Dto.class));
return dtoPage;
}
public DfTaskInfoV2Dto getInfo(String id) {
DfTaskV2Manage dfTaskV2Manage = getById(id);
if (dfTaskV2Manage == null) {
throw new RuntimeException("任务详情查询失败!");
}
return BeanCopyUtils.copy(dfTaskV2Manage, DfTaskInfoV2Dto.class);
}
@Transactional(rollbackFor = Exception.class)
public DfTaskInfoV2Dto add(DfTaskInfoV2Dto dto) {
DfTaskV2Manage manage = BeanCopyUtils.copy(dto, DfTaskV2Manage.class);
if (save(manage)) {
throw new RuntimeException("任务详情新增失败!");
}
return dto;
}
@Transactional(rollbackFor = Exception.class)
public boolean myRemove(String[] ids) {
if (null != ids && ids.length > 0) {
List<DfCheckingRecord> records = dfCheckingRecordV2Mapper.selectList(new LambdaQueryWrapper<DfCheckingRecord>()
.in(DfCheckingRecord::getTaskId, DfCheckingV2Service.getIntList(ids)));
if (!CollectionUtils.isEmpty(records)) {
throw new RuntimeException("请先删除巡查记录");
}
List<Integer> recordIds = records.stream()
.map(DfCheckingRecord::getId)
.map(Integer::parseInt)
.collect(Collectors.toList());
dfCheckingRecordV2Mapper.delete(new LambdaQueryWrapper<DfCheckingRecord>()
.in(DfCheckingRecord::getTaskId, recordIds));
dfCheckingProblemV2Mapper.delete(new LambdaQueryWrapper<DfCheckingProblemV2>()
.in(DfCheckingProblemV2::getRecordId, recordIds));
dfYhV2Mapper.delete(new LambdaQueryWrapper<DfYhV2>()
.in(DfYhV2::getRecordId, recordIds));
List<DfYhV2> yhList = dfYhV2Mapper.selectList(new LambdaQueryWrapper<DfYhV2>()
.in(DfYhV2::getRecordId, recordIds));
if (!CollectionUtils.isEmpty(yhList)) {
approvalTaskMapper.delete(new LambdaQueryWrapper<ApprovalTask>()
.in(ApprovalTask::getFormId, yhList.stream()
.map(DfYhV2::getId)
.map(Integer::parseInt)
.collect(Collectors.toList())));
}
return Boolean.TRUE;
}
return Boolean.FALSE;
}
}

56
shuili-system/src/main/java/com/kms/yxgh/dw/controller/DwTaskV2Controller.java

@ -0,0 +1,56 @@
package com.kms.yxgh.dw.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.kms.yxgh.base.Response;
import com.kms.yxgh.dw.dto.DwRecordSearchV2Dto;
import com.kms.yxgh.dw.dto.DwTaskInfoV2Dto;
import com.kms.yxgh.dw.dto.DwTaskListV2Dto;
import com.kms.yxgh.dw.service.DwTaskV2Service;
import com.shuili.common.annotation.Log;
import com.shuili.common.core.domain.SearchParam;
import com.shuili.common.enums.BusinessType;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@AllArgsConstructor
@RequestMapping("/run/dw/v2/task")
@Api(tags = "动物任务管理v2")
public class DwTaskV2Controller {
private final DwTaskV2Service dwTaskV2Service;
@PostMapping("/list")
@ApiOperation("列表v2")
public IPage<DwTaskListV2Dto> list(@RequestBody SearchParam<DwRecordSearchV2Dto> sp) {
return dwTaskV2Service.list(sp);
}
@ApiOperation("详情v2")
@GetMapping(value = "/{id}")
public Response<DwTaskInfoV2Dto> getInfo(@PathVariable("id") String id) {
return Response.ok(dwTaskV2Service.getInfo(id));
}
@Log(title = "新增", businessType = BusinessType.INSERT)
@PostMapping("/add")
@ApiOperation("新增")
public Response<DwTaskInfoV2Dto> add(@RequestBody DwTaskInfoV2Dto dto) {
return Response.ok(dwTaskV2Service.add(dto));
}
@ApiOperation("删除")
@Log(title = "删除", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public Response<Boolean> remove(@PathVariable("ids") String[] ids) {
return Response.ok(dwTaskV2Service.myRemove(ids));
}
}

4
shuili-system/src/main/java/com/kms/yxgh/dw/domain/DwCheckingRecord.java

@ -21,6 +21,10 @@ import java.util.Date;
public class DwCheckingRecord extends SyBaseEntity {
private static final long serialVersionUID = 1L;
@ApiModelProperty("任务id")
private String taskId;
/**
* 开始时间
*/

23
shuili-system/src/main/java/com/kms/yxgh/dw/domain/DwCheckingV2ProjectManage.java

@ -1,14 +1,11 @@
package com.kms.yxgh.dw.domain;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.kms.yxgh.base.SyBaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
/**
* 害堤动物防治计划对象 DwCheckingV2ProjectManage
@ -21,26 +18,6 @@ import java.util.Date;
@ApiModel("项目管理")
public class DwCheckingV2ProjectManage extends SyBaseEntity {
private static final long serialVersionUID = 1L;
@ApiModelProperty("任务名称")
private String taskName;
@ApiModelProperty("巡检负责单位")
private String responsibleUnit;
@ApiModelProperty("巡检负责单位id")
private String responsibleUnitId;
@ApiModelProperty("巡查周期 字典 patrol_maintenance_cycle")
private String cycle;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty("巡查开始时间")
private Date startDate;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty("巡查结束时间")
private Date endDate;
@ApiModelProperty("范围")
private String scope;
@ApiModelProperty("项目创始人")
private String proFoundingPerson;
@ApiModelProperty("项目创始人id")
private String proFoundingPersonId;
/**
* 工程代码

94
shuili-system/src/main/java/com/kms/yxgh/dw/domain/DwTaskV2Manage.java

@ -0,0 +1,94 @@
package com.kms.yxgh.dw.domain;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.kms.yxgh.base.SyBaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
/**
* 害堤动物防治计划对象 DwTaskV2Manage
*
* @author sy
* @date 2024-01-04
*/
@TableName("bs_sgc_dw_task")
@Data
@ApiModel("任务管理")
public class DwTaskV2Manage extends SyBaseEntity {
private static final long serialVersionUID = 1L;
@ApiModelProperty("巡查项目ID")
private String checkingId;
@ApiModelProperty("任务名称")
private String taskName;
@ApiModelProperty("巡检负责单位")
private String responsibleUnit;
@ApiModelProperty("巡检负责单位id")
private String responsibleUnitId;
@ApiModelProperty("巡查周期 字典 patrol_maintenance_cycle")
private String cycle;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty("巡查开始时间")
private Date startDate;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty("巡查结束时间")
private Date endDate;
@ApiModelProperty("范围")
private String scope;
@ApiModelProperty("项目创始人")
private String proFoundingPerson;
@ApiModelProperty("项目创始人id")
private String proFoundingPersonId;
/**
* 堤防代码
*/
@ApiModelProperty("堤防代码")
private String dikeCode;
/**
* 堤防代码名称
*/
@ApiModelProperty("堤防代码名称")
private String dikeName;
/**
* 项目名称
*/
@ApiModelProperty("项目名称")
private String name;
/**
* 巡查类型 字典patrol_maintenance_type
*/
@ApiModelProperty("巡查类型 字典:patrol_maintenance_type")
private String type;
/**
* 巡查类别字典key_jf_patrol_category
*/
@ApiModelProperty("巡查类别字典:patrol_maintenance_category")
private String category;
/**
* 附加配置
*/
@ApiModelProperty("备注")
private String remark;
/**
* 创建人名称
*/
@ApiModelProperty("创建人名称")
private String createName;
}

3
shuili-system/src/main/java/com/kms/yxgh/dw/dto/DwRecordDetailV2Dto.java

@ -20,7 +20,8 @@ import java.util.List;
@Data
@ApiModel("堤防巡视检查记录详情v2")
public class DwRecordDetailV2Dto {
@ApiModelProperty("任务id")
private String taskId;
@ApiModelProperty("巡查责任人")
private String dutyHolderName;
@ApiModelProperty("巡查责任人id")

66
shuili-system/src/main/java/com/kms/yxgh/dw/dto/DwTaskInfoV2Dto.java

@ -0,0 +1,66 @@
package com.kms.yxgh.dw.dto;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotNull;
import java.util.Date;
@Data
@ApiModel("动物任务详情v2")
public class DwTaskInfoV2Dto {
@NotNull
@ApiModelProperty("任务id")
private String id;
@ApiModelProperty("巡查项目ID")
private String checkingId;
@ApiModelProperty("任务名称")
private String taskName;
@ApiModelProperty("巡检负责单位")
private String responsibleUnit;
@ApiModelProperty("巡检负责单位id")
private String responsibleUnitId;
@ApiModelProperty("巡查周期 字典 patrol_maintenance_cycle")
private String cycle;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty("巡查开始时间")
private Date startDate;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty("巡查结束时间")
private Date endDate;
@ApiModelProperty("范围")
private String scope;
@ApiModelProperty("项目创始人")
private String proFoundingPerson;
@ApiModelProperty("项目创始人id")
private String proFoundingPersonId;
@ApiModelProperty("堤防编码")
private String dikeCode;
@ApiModelProperty("堤防名称")
private String dikeName;
@ApiModelProperty("堤防类型")
private String dikeType;
@ApiModelProperty("名称")
private String name;
@ApiModelProperty("巡查类型")
private String type;
@ApiModelProperty("巡查类别")
private String category;
@ApiModelProperty("创建时间")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date createTime;
@ApiModelProperty("创建者")
private String createUid;
@ApiModelProperty("创建者名称")
private String createName;
}

64
shuili-system/src/main/java/com/kms/yxgh/dw/dto/DwTaskListV2Dto.java

@ -0,0 +1,64 @@
package com.kms.yxgh.dw.dto;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
@Data
@ApiModel("动物任务列表v2")
public class DwTaskListV2Dto {
@ApiModelProperty("任务id")
private String id;
@ApiModelProperty("巡查项目ID")
private String checkingId;
@ApiModelProperty("任务名称")
private String taskName;
@ApiModelProperty("巡检负责单位")
private String responsibleUnit;
@ApiModelProperty("巡检负责单位id")
private String responsibleUnitId;
@ApiModelProperty("巡查周期 字典 patrol_maintenance_cycle")
private String cycle;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty("巡查开始时间")
private Date startDate;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty("巡查结束时间")
private Date endDate;
@ApiModelProperty("范围")
private String scope;
@ApiModelProperty("项目创始人")
private String proFoundingPerson;
@ApiModelProperty("项目创始人id")
private String proFoundingPersonId;
@ApiModelProperty("堤防编码")
private String dikeCode;
@ApiModelProperty("堤防名称")
private String dikeName;
@ApiModelProperty("堤防类型")
private String dikeType;
@ApiModelProperty("名称")
private String name;
@ApiModelProperty("巡查类型")
private String type;
@ApiModelProperty("巡查类别")
private String category;
@ApiModelProperty("创建时间")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date createTime;
@ApiModelProperty("创建者")
private String createUid;
@ApiModelProperty("创建者名称")
private String createName;
}

20
shuili-system/src/main/java/com/kms/yxgh/dw/dto/DwV2CheckingDto.java

@ -12,26 +12,6 @@ import java.util.List;
@ApiModel(value = "工程巡查项目信息v2")
@Data
public class DwV2CheckingDto {
@ApiModelProperty("任务名称")
private String taskName;
@ApiModelProperty("巡检负责单位")
private String responsibleUnit;
@ApiModelProperty("巡检负责单位id")
private String responsibleUnitId;
@ApiModelProperty("巡查周期 字典 patrol_maintenance_cycle")
private String cycle;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty("巡查开始时间")
private Date startDate;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty("巡查结束时间")
private Date endDate;
@ApiModelProperty("范围")
private String scope;
@ApiModelProperty("项目创始人")
private String proFoundingPerson;
@ApiModelProperty("项目创始人id")
private String proFoundingPersonId;
@ApiModelProperty("工程编码")
private String dikeCode;

22
shuili-system/src/main/java/com/kms/yxgh/dw/mapper/DwTaskV2Mapper.java

@ -0,0 +1,22 @@
package com.kms.yxgh.dw.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.kms.yxgh.dw.domain.DwTaskV2Manage;
import com.kms.yxgh.dw.dto.DwRecordSearchV2Dto;
import com.kms.yxgh.dw.dto.DwTaskListV2Dto;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
/**
* 动物任务项目管理
*
* @author sy
* @date 2024-01-04
*/
@Repository
public interface DwTaskV2Mapper extends BaseMapper<DwTaskV2Manage> {
IPage<DwTaskListV2Dto> page(Page<DwTaskV2Manage> page, @Param("data") DwRecordSearchV2Dto dto);
}

11
shuili-system/src/main/java/com/kms/yxgh/dw/service/DwCheckingRecordV2Service.java

@ -7,8 +7,11 @@ import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.kms.yxgh.common.enums.DfYhV2StatusEnum;
import com.kms.yxgh.df.domain.DfCheckingV2ProjectManage;
import com.kms.yxgh.dw.domain.*;
import com.kms.yxgh.dw.domain.DwCheckingProblemV2;
import com.kms.yxgh.dw.domain.DwCheckingRecord;
import com.kms.yxgh.dw.domain.DwCheckingV2ProjectItem;
import com.kms.yxgh.dw.domain.DwTaskV2Manage;
import com.kms.yxgh.dw.domain.DwYhV2;
import com.kms.yxgh.dw.dto.DwRecordDetailV2Dto;
import com.kms.yxgh.dw.dto.DwRecordSearchV2Dto;
import com.kms.yxgh.dw.enums.DwYhV2StatusEnum;
@ -42,7 +45,7 @@ public class DwCheckingRecordV2Service extends BaseService<DwCheckingRecordV2Map
private final DwCheckingProblemV2Service dwCheckingProblemV2Service;
private final DwCheckingV2Service dwCheckingV2Service;
private final DwTaskV2Service dwTaskV2Service;
@ -67,7 +70,7 @@ public class DwCheckingRecordV2Service extends BaseService<DwCheckingRecordV2Map
dto.setProblemCount(dwCheckingProblemV2Service
.count(new LambdaQueryWrapper<DwCheckingProblemV2>()
.eq(StringUtils.isNotBlank(record.getId()), DwCheckingProblemV2::getRecordId, record.getId())));
DwCheckingV2ProjectManage manage = dwCheckingV2Service.getOne(new LambdaQueryWrapper<DwCheckingV2ProjectManage>().eq(DwCheckingV2ProjectManage::getId, record.getCheckingId()));
DwTaskV2Manage manage = dwTaskV2Service.getOne(new LambdaQueryWrapper<DwTaskV2Manage>().eq(DwTaskV2Manage::getCheckingId, record.getCheckingId()));
if (!Objects.isNull(manage)) {
dto.setResponsibleUnit(manage.getResponsibleUnit());
dto.setResponsibleUnitId(manage.getResponsibleUnitId());

19
shuili-system/src/main/java/com/kms/yxgh/dw/service/DwCheckingV2Service.java

@ -8,10 +8,10 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.kms.common.utils.UserUtils;
import com.kms.yg.df.domain.BsSgcDfManateam;
import com.kms.yg.df.service.BsSgcDfManateamService;
import com.kms.yxgh.df.domain.DfCheckingV2ProjectManage;
import com.kms.yxgh.df.service.DfCheckingV2Service;
import com.kms.yxgh.dw.domain.DwCheckingV2ProjectItem;
import com.kms.yxgh.dw.domain.DwCheckingV2ProjectManage;
import com.kms.yxgh.dw.domain.DwTaskV2Manage;
import com.kms.yxgh.dw.dto.DwCheckingDetailDto;
import com.kms.yxgh.dw.dto.DwProReceiveFeedbackV2Dto;
import com.kms.yxgh.dw.dto.DwV2CheckingDto;
@ -28,7 +28,11 @@ import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.*;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import java.util.stream.Collectors;
/**
@ -45,7 +49,7 @@ public class DwCheckingV2Service extends BaseService<DwCheckingV2Mapper, DwCheck
private final BsSgcDfManateamService bsSgcDfManateamService;
private final DwTaskV2Service dwTaskV2Service;
public IPage<DwV2CheckingDto> list(SearchParam<DwV2CheckingSearchDto> sp) {
// 分页参数
@ -207,9 +211,12 @@ public class DwCheckingV2Service extends BaseService<DwCheckingV2Mapper, DwCheck
@Transactional(rollbackFor = Exception.class)
public boolean myRemove(String[] ids) {
if (null != ids && ids.length > 0) {
dwCheckingV2ProjectItemV2Service.remove(new LambdaQueryWrapper<DwCheckingV2ProjectItem>()
.in(DwCheckingV2ProjectItem::getCheckingId, getIntList(ids)));
int count = dwTaskV2Service.count(new LambdaQueryWrapper<DwTaskV2Manage>().in(DwTaskV2Manage::getCheckingId, getIntList(ids)));
if (count > 0) {
throw new RuntimeException("请先删除子项");
}
dwTaskV2Service.remove(new LambdaQueryWrapper<DwTaskV2Manage>()
.in(DwTaskV2Manage::getCheckingId, getIntList(ids)));
return remove(new LambdaQueryWrapper<DwCheckingV2ProjectManage>()
.in(DwCheckingV2ProjectManage::getId, getIntList(ids)));
}

120
shuili-system/src/main/java/com/kms/yxgh/dw/service/DwTaskV2Service.java

@ -0,0 +1,120 @@
package com.kms.yxgh.dw.service;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.kms.yxgh.common.domain.ApprovalTask;
import com.kms.yxgh.common.mapper.ApprovalTaskMapper;
import com.kms.yxgh.dw.domain.DwCheckingProblemV2;
import com.kms.yxgh.dw.domain.DwCheckingRecord;
import com.kms.yxgh.dw.domain.DwTaskV2Manage;
import com.kms.yxgh.dw.domain.DwYhV2;
import com.kms.yxgh.dw.dto.DwRecordSearchV2Dto;
import com.kms.yxgh.dw.dto.DwTaskInfoV2Dto;
import com.kms.yxgh.dw.dto.DwTaskListV2Dto;
import com.kms.yxgh.dw.mapper.DwCheckingProblemV2Mapper;
import com.kms.yxgh.dw.mapper.DwCheckingRecordV2Mapper;
import com.kms.yxgh.dw.mapper.DwTaskV2Mapper;
import com.kms.yxgh.dw.mapper.DwYhV2Mapper;
import com.kms.yxgh.util.BeanCopyUtils;
import com.shuili.common.core.domain.SearchParam;
import com.shuili.common.core.service.BaseService;
import com.shuili.common.utils.BeanUtils;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
import java.util.stream.Collectors;
/**
* 动物任务
*
* @author sy
* @date 2023-11-09
*/
@Service
@AllArgsConstructor
public class DwTaskV2Service extends BaseService<DwTaskV2Mapper, DwTaskV2Manage> {
private final DwCheckingRecordV2Mapper dwCheckingRecordV2Mapper;
private final DwCheckingProblemV2Mapper dwCheckingProblemV2Mapper;
private final DwYhV2Mapper dwYhV2Mapper;
private final ApprovalTaskMapper approvalTaskMapper;
public IPage<DwTaskListV2Dto> list(SearchParam<DwRecordSearchV2Dto> sp) {
// 分页参数
Page<DwTaskV2Manage> page = new Page<>(sp.getPageNum(), sp.getPageSize());
// 查询分页数据
IPage<DwTaskListV2Dto> queryPage = this.baseMapper.page(page, sp.getData());
if (null == queryPage.getRecords()) {
return new Page<>();
}
IPage<DwTaskListV2Dto> dtoPage = new Page<>();
BeanUtils.copyProperties(queryPage, dtoPage);
dtoPage.setRecords(BeanCopyUtils.copyList(queryPage.getRecords(), DwTaskListV2Dto.class));
return dtoPage;
}
public DwTaskInfoV2Dto getInfo(String id) {
DwTaskV2Manage dwTaskV2Manage = getById(id);
if (dwTaskV2Manage == null) {
throw new RuntimeException("任务详情查询失败!");
}
return BeanCopyUtils.copy(dwTaskV2Manage, DwTaskInfoV2Dto.class);
}
@Transactional(rollbackFor = Exception.class)
public DwTaskInfoV2Dto add(DwTaskInfoV2Dto dto) {
DwTaskV2Manage manage = BeanCopyUtils.copy(dto, DwTaskV2Manage.class);
if (save(manage)) {
throw new RuntimeException("任务详情新增失败!");
}
return dto;
}
@Transactional(rollbackFor = Exception.class)
public boolean myRemove(String[] ids) {
if (null != ids && ids.length > 0) {
List<DwCheckingRecord> records = dwCheckingRecordV2Mapper.selectList(new LambdaQueryWrapper<DwCheckingRecord>()
.in(DwCheckingRecord::getTaskId, DwCheckingV2Service.getIntList(ids)));
if (!CollectionUtils.isEmpty(records)) {
throw new RuntimeException("请先删除巡查记录");
}
List<Integer> recordIds = records.stream()
.map(DwCheckingRecord::getId)
.map(Integer::parseInt)
.collect(Collectors.toList());
dwCheckingRecordV2Mapper.delete(new LambdaQueryWrapper<DwCheckingRecord>()
.in(DwCheckingRecord::getTaskId, recordIds));
dwCheckingProblemV2Mapper.delete(new LambdaQueryWrapper<DwCheckingProblemV2>()
.in(DwCheckingProblemV2::getRecordId, recordIds));
dwYhV2Mapper.delete(new LambdaQueryWrapper<DwYhV2>()
.in(DwYhV2::getRecordId, recordIds));
List<DwYhV2> yhList = dwYhV2Mapper.selectList(new LambdaQueryWrapper<DwYhV2>()
.in(DwYhV2::getRecordId, recordIds));
if (!CollectionUtils.isEmpty(yhList)) {
approvalTaskMapper.delete(new LambdaQueryWrapper<ApprovalTask>()
.in(ApprovalTask::getFormId, yhList.stream()
.map(DwYhV2::getId)
.map(Integer::parseInt)
.collect(Collectors.toList())));
}
return Boolean.TRUE;
}
return Boolean.FALSE;
}
}

56
shuili-system/src/main/java/com/kms/yxgh/sz/controller/v2/SzTaskV2Controller.java

@ -0,0 +1,56 @@
package com.kms.yxgh.sz.controller.v2;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.kms.yxgh.base.Response;
import com.kms.yxgh.sz.dto.v2.SzRecordSearchV2Dto;
import com.kms.yxgh.sz.dto.v2.SzTaskInfoV2Dto;
import com.kms.yxgh.sz.dto.v2.SzTaskListV2Dto;
import com.kms.yxgh.sz.service.SzTaskV2Service;
import com.shuili.common.annotation.Log;
import com.shuili.common.core.domain.SearchParam;
import com.shuili.common.enums.BusinessType;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@AllArgsConstructor
@RequestMapping("/run/sz/v2/task")
@Api(tags = "任务管理v2")
public class SzTaskV2Controller {
private final SzTaskV2Service szTaskV2Service;
@PostMapping("/list")
@ApiOperation("列表v2")
public IPage<SzTaskListV2Dto> list(@RequestBody SearchParam<SzRecordSearchV2Dto> sp) {
return szTaskV2Service.list(sp);
}
@ApiOperation("详情v2")
@GetMapping(value = "/{id}")
public Response<SzTaskInfoV2Dto> getInfo(@PathVariable("id") String id) {
return Response.ok(szTaskV2Service.getInfo(id));
}
@Log(title = "新增", businessType = BusinessType.INSERT)
@PostMapping("/add")
@ApiOperation("新增")
public Response<SzTaskInfoV2Dto> add(@RequestBody SzTaskInfoV2Dto dto) {
return Response.ok(szTaskV2Service.add(dto));
}
@ApiOperation("删除")
@Log(title = "删除", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public Response<Boolean> remove(@PathVariable("ids") String[] ids) {
return Response.ok(szTaskV2Service.myRemove(ids));
}
}

6
shuili-system/src/main/java/com/kms/yxgh/sz/domain/SzCheckingRecord.java

@ -21,6 +21,12 @@ import java.util.Date;
public class SzCheckingRecord extends SyBaseEntity {
private static final long serialVersionUID = 1L;
/**
* 任务id
*/
@ApiModelProperty("任务id")
private String taskId;
/**
* 开始时间
*/

24
shuili-system/src/main/java/com/kms/yxgh/sz/domain/SzCheckingV2ProjectManage.java

@ -1,14 +1,11 @@
package com.kms.yxgh.sz.domain;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.kms.yxgh.base.SyBaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
/**
* bs_sgc_df_hdjh
@ -22,27 +19,6 @@ import java.util.Date;
public class SzCheckingV2ProjectManage extends SyBaseEntity {
private static final long serialVersionUID = 1L;
@ApiModelProperty("任务名称")
private String taskName;
@ApiModelProperty("巡检负责单位")
private String responsibleUnit;
@ApiModelProperty("巡检负责单位id")
private String responsibleUnitId;
@ApiModelProperty("巡查周期 字典 patrol_maintenance_cycle")
private String cycle;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty("巡查开始时间")
private Date startDate;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty("巡查结束时间")
private Date endDate;
@ApiModelProperty("范围")
private String scope;
@ApiModelProperty("项目创始人")
private String proFoundingPerson;
@ApiModelProperty("项目创始人id")
private String proFoundingPersonId;
/**
* 堤防代码
*/

94
shuili-system/src/main/java/com/kms/yxgh/sz/domain/SzTaskV2Manage.java

@ -0,0 +1,94 @@
package com.kms.yxgh.sz.domain;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.kms.yxgh.base.SyBaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
/**
* bs_sgc_sz_task
*
* @author sy
* @date 2024-01-04
*/
@TableName("bs_sgc_sz_task")
@Data
@ApiModel("任务管理")
public class SzTaskV2Manage extends SyBaseEntity {
private static final long serialVersionUID = 1L;
@ApiModelProperty("水闸巡查项目ID")
private String checkingId;
@ApiModelProperty("任务名称")
private String taskName;
@ApiModelProperty("巡检负责单位")
private String responsibleUnit;
@ApiModelProperty("巡检负责单位id")
private String responsibleUnitId;
@ApiModelProperty("巡查周期 字典 patrol_maintenance_cycle")
private String cycle;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty("巡查开始时间")
private Date startDate;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty("巡查结束时间")
private Date endDate;
@ApiModelProperty("范围")
private String scope;
@ApiModelProperty("项目创始人")
private String proFoundingPerson;
@ApiModelProperty("项目创始人id")
private String proFoundingPersonId;
/**
* 堤防代码
*/
@ApiModelProperty("水闸代码")
private String wagaCode;
/**
* 堤防代码名称
*/
@ApiModelProperty("水闸代码名称")
private String wagaName;
/**
* 项目名称
*/
@ApiModelProperty("项目名称")
private String name;
/**
* 巡查类型 字典patrol_maintenance_type
*/
@ApiModelProperty("巡查类型 字典:patrol_maintenance_type")
private String type;
/**
* 巡查类别字典key_jf_patrol_category
*/
@ApiModelProperty("巡查类别字典:patrol_maintenance_category")
private String category;
/**
* 附加配置
*/
@ApiModelProperty("备注")
private String remark;
/**
* 创建人名称
*/
@ApiModelProperty("创建人名称")
private String createName;
}

3
shuili-system/src/main/java/com/kms/yxgh/sz/dto/v2/SzRecordDetailV2Dto.java

@ -18,7 +18,8 @@ import java.util.List;
@ApiModel("水闸巡视检查记录详情v2")
public class SzRecordDetailV2Dto {
@ApiModelProperty("任务id")
private String taskId;
@ApiModelProperty("巡查责任人")
private String dutyHolderName;
@ApiModelProperty("巡查责任人id")

74
shuili-system/src/main/java/com/kms/yxgh/sz/dto/v2/SzTaskInfoV2Dto.java

@ -0,0 +1,74 @@
package com.kms.yxgh.sz.dto.v2;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
import java.util.List;
@ApiModel(value = "任务信息v2")
@Data
public class SzTaskInfoV2Dto {
@ApiModelProperty("任务id")
private String id;
@ApiModelProperty("巡查项目ID")
private String checkingId;
@ApiModelProperty("任务名称")
private String taskName;
@ApiModelProperty("巡检负责单位")
private String responsibleUnit;
@ApiModelProperty("巡检负责单位id")
private String responsibleUnitId;
@ApiModelProperty("巡查周期 字典 patrol_maintenance_cycle")
private String cycle;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty("巡查开始时间")
private Date startDate;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty("巡查结束时间")
private Date endDate;
@ApiModelProperty("范围")
private String scope;
@ApiModelProperty("项目创始人")
private String proFoundingPerson;
@ApiModelProperty("项目创始人id")
private String proFoundingPersonId;
@ApiModelProperty("水闸编码")
private String wagaCode;
@ApiModelProperty("水闸名称")
private String wagaName;
@ApiModelProperty("水闸类型")
private String wagaType;
@ApiModelProperty("名称")
private String name;
@ApiModelProperty("巡查类型")
private String type;
@ApiModelProperty("巡查类别")
private String category;
@ApiModelProperty("创建时间")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date createTime;
@ApiModelProperty("创建者")
private String createUid;
@ApiModelProperty("创建者名称")
private String createName;
@ApiModelProperty("是否领取")
private Boolean isReceive;
@ApiModelProperty("检查项")
private List<SzCheckingDetailDto.SzCheckingItemDto> items;
}

74
shuili-system/src/main/java/com/kms/yxgh/sz/dto/v2/SzTaskListV2Dto.java

@ -0,0 +1,74 @@
package com.kms.yxgh.sz.dto.v2;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
import java.util.List;
@ApiModel(value = "任务列表v2")
@Data
public class SzTaskListV2Dto {
@ApiModelProperty("任务id")
private String id;
@ApiModelProperty("巡查项目ID")
private String checkingId;
@ApiModelProperty("任务名称")
private String taskName;
@ApiModelProperty("巡检负责单位")
private String responsibleUnit;
@ApiModelProperty("巡检负责单位id")
private String responsibleUnitId;
@ApiModelProperty("巡查周期 字典 patrol_maintenance_cycle")
private String cycle;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty("巡查开始时间")
private Date startDate;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty("巡查结束时间")
private Date endDate;
@ApiModelProperty("范围")
private String scope;
@ApiModelProperty("项目创始人")
private String proFoundingPerson;
@ApiModelProperty("项目创始人id")
private String proFoundingPersonId;
@ApiModelProperty("水闸编码")
private String wagaCode;
@ApiModelProperty("水闸名称")
private String wagaName;
@ApiModelProperty("水闸类型")
private String wagaType;
@ApiModelProperty("名称")
private String name;
@ApiModelProperty("巡查类型")
private String type;
@ApiModelProperty("巡查类别")
private String category;
@ApiModelProperty("创建时间")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date createTime;
@ApiModelProperty("创建者")
private String createUid;
@ApiModelProperty("创建者名称")
private String createName;
@ApiModelProperty("是否领取")
private Boolean isReceive;
@ApiModelProperty("检查项")
private List<SzCheckingDetailDto.SzCheckingItemDto> items;
}

21
shuili-system/src/main/java/com/kms/yxgh/sz/dto/v2/SzV2CheckingDto.java

@ -13,27 +13,6 @@ import java.util.List;
@Data
public class SzV2CheckingDto {
@ApiModelProperty("任务名称")
private String taskName;
@ApiModelProperty("巡检负责单位")
private String responsibleUnit;
@ApiModelProperty("巡检负责单位id")
private String responsibleUnitId;
@ApiModelProperty("巡查周期 字典 patrol_maintenance_cycle")
private String cycle;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty("巡查开始时间")
private Date startDate;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty("巡查结束时间")
private Date endDate;
@ApiModelProperty("范围")
private String scope;
@ApiModelProperty("项目创始人")
private String proFoundingPerson;
@ApiModelProperty("项目创始人id")
private String proFoundingPersonId;
@ApiModelProperty("水闸编码")
private String wagaCode;
@ApiModelProperty("水闸名称")

24
shuili-system/src/main/java/com/kms/yxgh/sz/mapper/SzTaskV2Mapper.java

@ -0,0 +1,24 @@
package com.kms.yxgh.sz.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.kms.yxgh.sz.domain.SzTaskV2Manage;
import com.kms.yxgh.sz.dto.v2.SzRecordSearchV2Dto;
import com.kms.yxgh.sz.dto.v2.SzTaskListV2Dto;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
/**
* SzCheckingV2Mapper
*
* @author sy
* @date 2024-01-04
*/
@Repository
public interface SzTaskV2Mapper extends BaseMapper<SzTaskV2Manage> {
IPage<SzTaskListV2Dto> page(Page<SzTaskV2Manage> page, @Param("data") SzRecordSearchV2Dto dto);
}

12
shuili-system/src/main/java/com/kms/yxgh/sz/service/SzCheckingRecordV2Service.java

@ -7,7 +7,11 @@ import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.kms.yxgh.common.enums.DfYhV2StatusEnum;
import com.kms.yxgh.df.service.DfCheckingV2Service;
import com.kms.yxgh.sz.domain.*;
import com.kms.yxgh.sz.domain.SzCheckingProblemV2;
import com.kms.yxgh.sz.domain.SzCheckingRecord;
import com.kms.yxgh.sz.domain.SzCheckingV2ProjectItem;
import com.kms.yxgh.sz.domain.SzTaskV2Manage;
import com.kms.yxgh.sz.domain.SzYhV2;
import com.kms.yxgh.sz.dto.v2.SzRecordDetailV2Dto;
import com.kms.yxgh.sz.dto.v2.SzRecordSearchV2Dto;
import com.kms.yxgh.sz.mapper.SzCheckingRecordV2Mapper;
@ -35,12 +39,12 @@ public class SzCheckingRecordV2Service extends BaseService<SzCheckingRecordV2Map
private final SzYhV2Service szYhV2Service;
private final SzCheckingV2Service szCheckingV2Service;
private final SzCheckingV2ProjectItemV2Service szCheckingV2ProjectItemV2Service;
private final SzCheckingProblemV2Service szCheckingProblemV2Service;
private final SzTaskV2Service szTaskV2Service;
public IPage<SzRecordDetailV2Dto> list(SearchParam<SzRecordSearchV2Dto> sp) {
// 分页参数
Page<SzCheckingRecord> page = new Page<>(sp.getPageNum(), sp.getPageSize());
@ -62,7 +66,7 @@ public class SzCheckingRecordV2Service extends BaseService<SzCheckingRecordV2Map
.count(new LambdaQueryWrapper<SzCheckingProblemV2>()
.eq(StringUtils.isNotBlank(record.getId()), SzCheckingProblemV2::getRecordId, record.getId())));
SzCheckingV2ProjectManage manage = szCheckingV2Service.getOne(new LambdaQueryWrapper<SzCheckingV2ProjectManage>().eq(SzCheckingV2ProjectManage::getId, record.getCheckingId()));
SzTaskV2Manage manage = szTaskV2Service.getOne(new LambdaQueryWrapper<SzTaskV2Manage>().eq(SzTaskV2Manage::getCheckingId, record.getCheckingId()));
if (!Objects.isNull(manage)) {
dto.setResponsibleUnit(manage.getResponsibleUnit());
dto.setResponsibleUnitId(manage.getResponsibleUnitId());

12
shuili-system/src/main/java/com/kms/yxgh/sz/service/SzCheckingV2Service.java

@ -6,12 +6,12 @@ import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.kms.common.utils.UserUtils;
import com.kms.yg.df.domain.BsSgcDfManateam;
import com.kms.yg.sz.domain.BsSgcSzManateam;
import com.kms.yg.sz.service.BsSgcSzManateamService;
import com.kms.yxgh.df.service.DfCheckingV2Service;
import com.kms.yxgh.sz.domain.SzCheckingV2ProjectItem;
import com.kms.yxgh.sz.domain.SzCheckingV2ProjectManage;
import com.kms.yxgh.sz.domain.SzTaskV2Manage;
import com.kms.yxgh.sz.dto.v2.SzCheckingDetailDto;
import com.kms.yxgh.sz.dto.v2.SzProReceiveFeedbackV2Dto;
import com.kms.yxgh.sz.dto.v2.SzV2CheckingDto;
@ -47,6 +47,7 @@ public class SzCheckingV2Service extends BaseService<SzCheckingV2Mapper, SzCheck
private final BsSgcSzManateamService bsSgcSzManateamService;
private final SzTaskV2Service szTaskV2Service;
public IPage<SzV2CheckingDto> list(SearchParam<SzV2CheckingSearchDto> sp) {
// 分页参数
@ -208,9 +209,12 @@ public class SzCheckingV2Service extends BaseService<SzCheckingV2Mapper, SzCheck
@Transactional(rollbackFor = Exception.class)
public boolean myRemove(String[] ids) {
if (null != ids && ids.length > 0) {
szCheckingV2ProjectItemV2Service.remove(new LambdaQueryWrapper<SzCheckingV2ProjectItem>()
.in(SzCheckingV2ProjectItem::getCheckingId, getIntList(ids)));
int count = szTaskV2Service.count(new LambdaQueryWrapper<SzTaskV2Manage>().in(SzTaskV2Manage::getCheckingId, getIntList(ids)));
if (count > 0) {
throw new RuntimeException("请先删除子项");
}
szTaskV2Service.remove(new LambdaQueryWrapper<SzTaskV2Manage>()
.in(SzTaskV2Manage::getCheckingId, getIntList(ids)));
return remove(new LambdaQueryWrapper<SzCheckingV2ProjectManage>()
.in(SzCheckingV2ProjectManage::getId, getIntList(ids)));
}

118
shuili-system/src/main/java/com/kms/yxgh/sz/service/SzTaskV2Service.java

@ -0,0 +1,118 @@
package com.kms.yxgh.sz.service;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.kms.yxgh.common.domain.ApprovalTask;
import com.kms.yxgh.common.service.ApprovalTaskService;
import com.kms.yxgh.sz.domain.SzCheckingProblemV2;
import com.kms.yxgh.sz.domain.SzCheckingRecord;
import com.kms.yxgh.sz.domain.SzTaskV2Manage;
import com.kms.yxgh.sz.domain.SzYhV2;
import com.kms.yxgh.sz.dto.v2.SzRecordSearchV2Dto;
import com.kms.yxgh.sz.dto.v2.SzTaskInfoV2Dto;
import com.kms.yxgh.sz.dto.v2.SzTaskListV2Dto;
import com.kms.yxgh.sz.mapper.SzCheckingProblemV2Mapper;
import com.kms.yxgh.sz.mapper.SzCheckingRecordV2Mapper;
import com.kms.yxgh.sz.mapper.SzTaskV2Mapper;
import com.kms.yxgh.sz.mapper.SzYhV2Mapper;
import com.kms.yxgh.util.BeanCopyUtils;
import com.shuili.common.core.domain.SearchParam;
import com.shuili.common.core.service.BaseService;
import com.shuili.common.utils.BeanUtils;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
import java.util.stream.Collectors;
/**
* 水闸项目管理
*
* @author sy
* @date 2023-11-09
*/
@Service
@AllArgsConstructor
public class SzTaskV2Service extends BaseService<SzTaskV2Mapper, SzTaskV2Manage> {
private final SzCheckingRecordV2Mapper szCheckingRecordV2Mapper;
private final SzCheckingProblemV2Mapper szCheckingProblemV2Mapper;
private final SzYhV2Mapper szYhV2Mapper;
private final ApprovalTaskService approvalTaskService;
public IPage<SzTaskListV2Dto> list(SearchParam<SzRecordSearchV2Dto> sp) {
// 分页参数
Page<SzTaskV2Manage> page = new Page<>(sp.getPageNum(), sp.getPageSize());
// 查询分页数据
IPage<SzTaskListV2Dto> queryPage = this.baseMapper.page(page, sp.getData());
if (null == queryPage.getRecords()) {
return new Page<>();
}
IPage<SzTaskListV2Dto> dtoPage = new Page<>();
BeanUtils.copyProperties(queryPage, dtoPage);
dtoPage.setRecords(BeanCopyUtils.copyList(queryPage.getRecords(), SzTaskListV2Dto.class));
return dtoPage;
}
public SzTaskInfoV2Dto getInfo(String id) {
SzTaskV2Manage szTaskV2Manage = getById(id);
if (szTaskV2Manage == null) {
throw new RuntimeException("任务详情查询失败!");
}
return BeanCopyUtils.copy(szTaskV2Manage, SzTaskInfoV2Dto.class);
}
@Transactional(rollbackFor = Exception.class)
public SzTaskInfoV2Dto add(SzTaskInfoV2Dto dto) {
SzTaskV2Manage manage = BeanCopyUtils.copy(dto, SzTaskV2Manage.class);
if (save(manage)) {
throw new RuntimeException("任务详情新增失败!");
}
return dto;
}
@Transactional(rollbackFor = Exception.class)
public boolean myRemove(String[] ids) {
if (null != ids && ids.length > 0) {
List<SzCheckingRecord> records = szCheckingRecordV2Mapper.selectList(new LambdaQueryWrapper<SzCheckingRecord>()
.in(SzCheckingRecord::getTaskId, SzCheckingV2Service.getIntList(ids)));
if (!CollectionUtils.isEmpty(records)) {
throw new RuntimeException("请先删除巡查记录");
}
List<Integer> recordIds = records.stream()
.map(SzCheckingRecord::getId)
.map(Integer::parseInt)
.collect(Collectors.toList());
szCheckingRecordV2Mapper.delete(new LambdaQueryWrapper<SzCheckingRecord>()
.in(SzCheckingRecord::getTaskId, recordIds));
szCheckingProblemV2Mapper.delete(new LambdaQueryWrapper<SzCheckingProblemV2>()
.in(SzCheckingProblemV2::getRecordId, recordIds));
szYhV2Mapper.delete(new LambdaQueryWrapper<SzYhV2>()
.in(SzYhV2::getRecordId, recordIds));
List<SzYhV2> yhList = szYhV2Mapper.selectList(new LambdaQueryWrapper<SzYhV2>()
.in(SzYhV2::getRecordId, recordIds));
if (!CollectionUtils.isEmpty(yhList)) {
approvalTaskService.remove(new LambdaQueryWrapper<ApprovalTask>()
.in(ApprovalTask::getFormId, yhList.stream()
.map(SzYhV2::getId)
.map(Integer::parseInt)
.collect(Collectors.toList())));
}
return Boolean.TRUE;
}
return Boolean.FALSE;
}
}

9
shuili-system/src/main/resources/mapper/yxgh/DfCheckingV2Mapper.xml

@ -12,11 +12,6 @@
<result property="category" column="category"/>
<result property="createUid" column="create_uid"/>
<result property="createName" column="create_name"/>
<result property="cycle" column="create_name"/>
<result property="responsibleUnit" column="responsible_unit"/>
<result property="responsibleUnitId" column="responsible_unit_id"/>
<result property="taskName" column="task_name"/>
</resultMap>
<select id="page" resultMap="pageMap">
select
@ -28,10 +23,6 @@
xmgl.create_time,
xmgl.category ,
xmgl.create_uid,
xmgl.cycle,
xmgl.responsible_unit,
xmgl.responsible_unit_id,
xmgl.task_name,
xmgl.create_name
from
bs_sgc_df_xmgl xmgl

64
shuili-system/src/main/resources/mapper/yxgh/DfTaskV2Mapper.xml

@ -0,0 +1,64 @@
<?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="com.kms.yxgh.df.mapper.DfTaskV2Mapper">
<resultMap id="pageMap" type="com.kms.yxgh.df.dto.v2.DfTaskListV2Dto">
<id property="id" column="id"/>
<result property="dikeCode" column="dike_code"/>
<result property="dikeName" column="dike_name"/>
<result property="type" column="type"/>
<result property="name" column="name"/>
<result property="createTime" column="create_time"/>
<result property="category" column="category"/>
<result property="createUid" column="create_uid"/>
<result property="createName" column="create_name"/>
<result property="cycle" column="create_name"/>
<result property="responsibleUnit" column="responsible_unit"/>
<result property="responsibleUnitId" column="responsible_unit_id"/>
<result property="taskName" column="task_name"/>
</resultMap>
<select id="page" resultMap="pageMap">
select
task.id,
task.dike_code ,
task.dike_name ,
task.type,
task.name,
task.create_time,
task.category ,
task.create_uid,
task.cycle,
task.responsible_unit,
task.responsible_unit_id,
task.task_name,
task.create_name
from
bs_sgc_task_task task
left join att_dike_base base on base.dike_code=task.dike_code
where 1=1
<if test="data.adcdQx != null and data.adcdQx != ''">
and base.adcd like concat(#{data.adcdQx}, '%')
</if>
<if test="data.category != null and data.category != ''">
and task.category = #{data.category}
</if>
<if test="data.dikeCode != null and data.dikeCode != ''">
and task.dike_code = #{data.dikeCode}
</if>
<if test="data.type != null and data.type != ''">
and task.type = #{data.type}
</if>
<if test="data.taskName != null and data.taskName != ''">
and task.task_name = #{data.taskName}
</if>
<if test="data.dikeName != null and data.dikeName != ''">
and task.dike_name = #{data.dikeName}
</if>
<if test="data.name != null and data.name != ''">
and task.name like concat('%',#{data.name}, '%')
</if>
order by task.create_time desc
</select>
</mapper>

64
shuili-system/src/main/resources/mapper/yxgh/DwTaskV2Mapper.xml

@ -0,0 +1,64 @@
<?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="com.kms.yxgh.dw.mapper.DwTaskV2Mapper">
<resultMap id="pageMap" type="com.kms.yxgh.dw.dto.DwTaskListV2Dto">
<id property="id" column="id"/>
<result property="dikeCode" column="dike_code"/>
<result property="dikeName" column="dike_name"/>
<result property="type" column="type"/>
<result property="name" column="name"/>
<result property="createTime" column="create_time"/>
<result property="category" column="category"/>
<result property="createUid" column="create_uid"/>
<result property="createName" column="create_name"/>
<result property="cycle" column="create_name"/>
<result property="responsibleUnit" column="responsible_unit"/>
<result property="responsibleUnitId" column="responsible_unit_id"/>
<result property="taskName" column="task_name"/>
</resultMap>
<select id="page" resultMap="pageMap">
select
task.id,
task.dike_code ,
task.dike_name ,
task.type ,
task.name ,
task.create_time ,
task.category ,
task.create_uid ,
task.cycle,
task.responsible_unit,
task.responsible_unit_id,
task.task_name,
task.create_name
from
bs_sgc_dw_task task
left join att_dike_base base on base.dike_code=task.dike_code
where 1=1
<if test="data.adcdQx != null and data.adcdQx != ''">
and base.adcd like concat(#{data.adcdQx}, '%')
</if>
<if test="data.category != null and data.category != ''">
and task.category = #{data.category}
</if>
<if test="data.dikeCode != null and data.dikeCode != ''">
and task.dike_code = #{data.dikeCode}
</if>
<if test="data.type != null and data.type != ''">
and task.type = #{data.type}
</if>
<if test="data.taskName != null and data.taskName != ''">
and task.task_name = #{data.taskName}
</if>
<if test="data.dikeName != null and data.dikeName != ''">
and task.dike_name = #{data.dikeName}
</if>
<if test="data.name != null and data.name != ''">
and task.name like concat('%',#{data.name}, '%')
</if>
order by task.create_time desc
</select>
</mapper>

63
shuili-system/src/main/resources/mapper/yxgh/SzTaskV2Mapper.xml

@ -0,0 +1,63 @@
<?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="com.kms.yxgh.sz.mapper.SzTaskV2Mapper">
<resultMap id="pageMap" type="com.kms.yxgh.sz.dto.v2.SzTaskListV2Dto">
<id property="id" column="id"/>
<result property="wagaCode" column="waga_code"/>
<result property="wagaName" column="waga_name"/>
<result property="type" column="type"/>
<result property="name" column="name"/>
<result property="createTime" column="create_time"/>
<result property="category" column="category"/>
<result property="createUid" column="create_uid"/>
<result property="createName" column="create_name"/>
<result property="cycle" column="create_name"/>
<result property="responsibleUnit" column="responsible_unit"/>
<result property="responsibleUnitId" column="responsible_unit_id"/>
<result property="taskName" column="task_name"/>
</resultMap>
<select id="page" resultMap="pageMap">
select
task.id,
task.waga_code ,
task.waga_name ,
task.type ,
task.name ,
task.create_time ,
task.category ,
task.create_uid ,
task.cycle,
task.responsible_unit,
task.responsible_unit_id,
task.task_name,
task.create_name
from
bs_sgc_sz_task task
left join att_waga_base base on base.waga_code=task.waga_code
where 1=1
<if test="data.adcdQx != null and data.adcdQx != ''">
and base.adcd like concat(#{data.adcdQx}, '%')
</if>
<if test="data.category != null and data.category != ''">
and task.category = #{data.category}
</if>
<if test="data.wagaCode != null and data.wagaCode != ''">
and task.waga_code = #{data.wagaCode}
</if>
<if test="data.type != null and data.type != ''">
and task.type = #{data.type}
</if>
<if test="data.taskName != null and data.taskName != ''">
and task.task_name = #{data.taskName}
</if>
<if test="data.wagaName != null and data.wagaName != ''">
and task.waga_name = #{data.wagaName}
</if>
<if test="data.name != null and data.name != ''">
and task.name like concat('%',#{data.name}, '%')
</if>
order by task.create_time desc
</select>
</mapper>

143
sql/sy/v1.6.0/增量脚本/v1.6.3-update.sql

@ -1,66 +1,85 @@
-- 堤防项目管理表新增
-- 任务名称
alter table bs_sgc_df_xmgl add column task_name varchar(50) not null default '' COMMENT '任务名称';
-- 巡检负责单位
alter table bs_sgc_df_xmgl add column responsible_unit varchar(50) not null default '' COMMENT '巡检负责单位';
alter table bs_sgc_df_xmgl add column responsible_unit_id varchar(50) NOT NULL DEFAULT '' COMMENT '巡检负责单位id';
-- 巡查周期
alter table bs_sgc_df_xmgl add column cycle int NOT NULL DEFAULT '0' COMMENT '巡查周期 字典 patrol_maintenance_cycle';
-- 任务时间
alter table bs_sgc_df_xmgl add column `start_date` datetime DEFAULT NULL COMMENT '巡查开始时间';
alter table bs_sgc_df_xmgl add column `end_date` datetime DEFAULT NULL COMMENT '巡查结束时间';
-- 任务范围
alter table bs_sgc_df_xmgl add column scope varchar(50) NOT NULL DEFAULT '' COMMENT '巡查范围';
-- 项目创始人
alter table bs_sgc_df_xmgl add column pro_founding_person varchar(50) NOT NULL DEFAULT '' COMMENT '项目创始人';
alter table bs_sgc_df_xmgl add column pro_founding_person_id varchar(50) NOT NULL DEFAULT '' COMMENT '项目创始人id';
alter table bs_sgc_dw_xsxcjl
add column task_id int NOT NULL DEFAULT 0 COMMENT '任务管理id';
alter table bs_sgc_df_xsxcjl
add column task_id int NOT NULL DEFAULT 0 COMMENT '任务管理id';
alter table bs_sgc_sz_xsxcjl
add column task_id int NOT NULL DEFAULT 0 COMMENT '任务管理id';
-- 水闸项目管理表新增
-- 任务名称
alter table bs_sgc_sz_xmgl add column task_name varchar(50) not null default '' COMMENT '任务名称';
-- 巡检负责单位
alter table bs_sgc_sz_xmgl add column responsible_unit varchar(50) not null default '' COMMENT '巡检负责单位';
alter table bs_sgc_sz_xmgl add column responsible_unit_id int NOT NULL DEFAULT '0' COMMENT '巡检负责单位id';
-- 巡查周期
alter table bs_sgc_sz_xmgl add column cycle int NOT NULL DEFAULT '0' COMMENT '巡查周期 字典 patrol_maintenance_cycle';
-- 任务时间
alter table bs_sgc_sz_xmgl add column `start_date` datetime DEFAULT NULL COMMENT '巡查开始时间';
alter table bs_sgc_sz_xmgl add column `end_date` datetime DEFAULT NULL COMMENT '巡查结束时间';
-- 任务范围
alter table bs_sgc_sz_xmgl add column scope varchar(50) NOT NULL DEFAULT '' COMMENT '巡查范围';
-- 项目创始人
alter table bs_sgc_sz_xmgl add column pro_founding_person varchar(50) NOT NULL DEFAULT '' COMMENT '项目创始人';
alter table bs_sgc_sz_xmgl add column pro_founding_person_id varchar(50) NOT NULL DEFAULT '' COMMENT '项目创始人id';
CREATE TABLE `bs_sgc_sz_task`
(
`id` int NOT NULL AUTO_INCREMENT COMMENT 'id',
`name` varchar(50) NOT NULL DEFAULT '' COMMENT '巡查项名称',
`waga_code` varchar(50) NOT NULL DEFAULT '' COMMENT '水闸code',
`waga_name` varchar(50) NOT NULL DEFAULT '' COMMENT '水闸名称',
`type` int NOT NULL DEFAULT '0' COMMENT '巡查类型 字典:patrol_maintenance_type',
`category` varchar(50) NOT NULL DEFAULT '' COMMENT '巡查类别字典:key_jf_patrol_category',
`create_uid` varchar(32) NOT NULL DEFAULT '' COMMENT '创建人',
`create_name` varchar(50) NOT NULL DEFAULT '' COMMENT '责任人name',
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
`update_time` datetime DEFAULT NULL COMMENT '最近修改时间',
`update_uid` varchar(50) NOT NULL DEFAULT '0' COMMENT '修改人id',
`remark` text COMMENT '备注',
`start_date` datetime DEFAULT NULL COMMENT '巡查开始时间',
`end_date` datetime DEFAULT NULL COMMENT '巡查结束时间',
`scope` varchar(50) NOT NULL DEFAULT '' COMMENT '巡查范围',
`pro_founding_person` varchar(50) NOT NULL DEFAULT '' COMMENT '项目创始人',
`pro_founding_person_id` varchar(50) NOT NULL DEFAULT '0' COMMENT '项目创始人id',
`task_name` varchar(50) NOT NULL DEFAULT '' COMMENT '任务名称',
`responsible_unit` varchar(50) NOT NULL DEFAULT '' COMMENT '巡检负责单位',
`responsible_unit_id` varchar(50) NOT NULL DEFAULT '' COMMENT '巡检负责单位id',
`cycle` int NOT NULL DEFAULT '0' COMMENT '巡查周期 字典 patrol_maintenance_cycle',
PRIMARY KEY (`id`) USING BTREE
) engine=innodb auto_increment=1 default charset=utf8mb4 collate=utf8mb4_general_ci row_format=dynamic comment='水闸巡视项目管理表';
-- 动物项目管理表新增
-- 任务名称
alter table bs_sgc_dw_xmgl add column task_name varchar(50) not null default '' COMMENT '任务名称';
-- 巡检负责单位
alter table bs_sgc_dw_xmgl add column responsible_unit varchar(50) not null default '' COMMENT '巡检负责单位';
alter table bs_sgc_dw_xmgl add column responsible_unit_id int NOT NULL DEFAULT '0' COMMENT '巡检负责单位id';
-- 巡查周期
alter table bs_sgc_dw_xmgl add column cycle int NOT NULL DEFAULT '0' COMMENT '巡查周期 字典 patrol_maintenance_cycle';
-- 任务时间
alter table bs_sgc_dw_xmgl add column `start_date` datetime DEFAULT NULL COMMENT '巡查开始时间';
alter table bs_sgc_dw_xmgl add column `end_date` datetime DEFAULT NULL COMMENT '巡查结束时间';
-- 任务范围
alter table bs_sgc_dw_xmgl add column scope varchar(50) NOT NULL DEFAULT '' COMMENT '巡查范围';
-- 项目创始人
alter table bs_sgc_dw_xmgl add column pro_founding_person varchar(50) NOT NULL DEFAULT '' COMMENT '项目创始人';
alter table bs_sgc_dw_xmgl add column pro_founding_person_id varchar(50) NOT NULL DEFAULT '' COMMENT '项目创始人id';
CREATE TABLE `bs_sgc_df_task`
(
`id` int NOT NULL AUTO_INCREMENT COMMENT 'id',
`name` varchar(50) NOT NULL DEFAULT '' COMMENT '巡查项名称',
`waga_code` varchar(50) NOT NULL DEFAULT '' COMMENT '水闸code',
`waga_name` varchar(50) NOT NULL DEFAULT '' COMMENT '水闸名称',
`type` int NOT NULL DEFAULT '0' COMMENT '巡查类型 字典:patrol_maintenance_type',
`category` varchar(50) NOT NULL DEFAULT '' COMMENT '巡查类别字典:key_jf_patrol_category',
`create_uid` varchar(32) NOT NULL DEFAULT '' COMMENT '创建人',
`create_name` varchar(50) NOT NULL DEFAULT '' COMMENT '责任人name',
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
`update_time` datetime DEFAULT NULL COMMENT '最近修改时间',
`update_uid` varchar(50) NOT NULL DEFAULT '0' COMMENT '修改人id',
`remark` text COMMENT '备注',
`start_date` datetime DEFAULT NULL COMMENT '巡查开始时间',
`end_date` datetime DEFAULT NULL COMMENT '巡查结束时间',
`scope` varchar(50) NOT NULL DEFAULT '' COMMENT '巡查范围',
`pro_founding_person` varchar(50) NOT NULL DEFAULT '' COMMENT '项目创始人',
`pro_founding_person_id` varchar(50) NOT NULL DEFAULT '0' COMMENT '项目创始人id',
`task_name` varchar(50) NOT NULL DEFAULT '' COMMENT '任务名称',
`responsible_unit` varchar(50) NOT NULL DEFAULT '' COMMENT '巡检负责单位',
`responsible_unit_id` varchar(50) NOT NULL DEFAULT '' COMMENT '巡检负责单位id',
`cycle` int NOT NULL DEFAULT '0' COMMENT '巡查周期 字典 patrol_maintenance_cycle',
PRIMARY KEY (`id`) USING BTREE
) engine=innodb auto_increment=1 default charset=utf8mb4 collate=utf8mb4_general_ci row_format=dynamic comment='水闸巡视项目管理表';
-- 堤防缺陷列表
alter table bs_sgc_df_xcqx add column damage_unit int NOT NULL DEFAULT '0' COMMENT '工程损坏单位 字典patrol_maintenance_damage_unit';
alter table bs_sgc_df_xcqx add column damage_value int NOT NULL DEFAULT '0' COMMENT '工程损坏数值';
-- 水闸缺陷列表
alter table bs_sgc_sz_xcqx add column damage_unit int NOT NULL DEFAULT '0' COMMENT '工程损坏单位 字典patrol_maintenance_damage_unit';
alter table bs_sgc_sz_xcqx add column damage_value int NOT NULL DEFAULT '0' COMMENT '工程损坏数值';
-- 动物缺陷列表
alter table bs_sgc_dw_xcqx add column damage_unit int NOT NULL DEFAULT '0' COMMENT '工程损坏单位 字典patrol_maintenance_damage_unit';
alter table bs_sgc_dw_xcqx add column damage_value int NOT NULL DEFAULT '0' COMMENT '工程损坏数值';
select * from bs_sgc_df_manateam
select * from bs_sgc_df_xsxcjl
CREATE TABLE `bs_sgc_dw_task`
(
`id` int NOT NULL AUTO_INCREMENT COMMENT 'id',
`name` varchar(50) NOT NULL DEFAULT '' COMMENT '巡查项名称',
`waga_code` varchar(50) NOT NULL DEFAULT '' COMMENT '水闸code',
`waga_name` varchar(50) NOT NULL DEFAULT '' COMMENT '水闸名称',
`type` int NOT NULL DEFAULT '0' COMMENT '巡查类型 字典:patrol_maintenance_type',
`category` varchar(50) NOT NULL DEFAULT '' COMMENT '巡查类别字典:key_jf_patrol_category',
`create_uid` varchar(32) NOT NULL DEFAULT '' COMMENT '创建人',
`create_name` varchar(50) NOT NULL DEFAULT '' COMMENT '责任人name',
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
`update_time` datetime DEFAULT NULL COMMENT '最近修改时间',
`update_uid` varchar(50) NOT NULL DEFAULT '0' COMMENT '修改人id',
`remark` text COMMENT '备注',
`start_date` datetime DEFAULT NULL COMMENT '巡查开始时间',
`end_date` datetime DEFAULT NULL COMMENT '巡查结束时间',
`scope` varchar(50) NOT NULL DEFAULT '' COMMENT '巡查范围',
`pro_founding_person` varchar(50) NOT NULL DEFAULT '' COMMENT '项目创始人',
`pro_founding_person_id` varchar(50) NOT NULL DEFAULT '0' COMMENT '项目创始人id',
`task_name` varchar(50) NOT NULL DEFAULT '' COMMENT '任务名称',
`responsible_unit` varchar(50) NOT NULL DEFAULT '' COMMENT '巡检负责单位',
`responsible_unit_id` varchar(50) NOT NULL DEFAULT '' COMMENT '巡检负责单位id',
`cycle` int NOT NULL DEFAULT '0' COMMENT '巡查周期 字典 patrol_maintenance_cycle',
PRIMARY KEY (`id`) USING BTREE
)engine=innodb auto_increment=1 default charset=utf8mb4 collate=utf8mb4_general_ci row_format=dynamic comment='水闸巡视项目管理表';

Loading…
Cancel
Save