42 changed files with 1645 additions and 283 deletions
@ -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)); |
|||
} |
|||
} |
@ -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; |
|||
|
|||
|
|||
} |
@ -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; |
|||
} |
@ -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; |
|||
} |
@ -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); |
|||
|
|||
} |
@ -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; |
|||
} |
|||
|
|||
} |
|||
|
|||
|
|||
|
|||
|
@ -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)); |
|||
} |
|||
} |
@ -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; |
|||
|
|||
|
|||
} |
@ -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; |
|||
} |
@ -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; |
|||
} |
@ -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); |
|||
|
|||
} |
@ -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; |
|||
} |
|||
|
|||
} |
|||
|
|||
|
|||
|
|||
|
@ -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)); |
|||
} |
|||
} |
@ -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; |
|||
|
|||
|
|||
} |
@ -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; |
|||
|
|||
} |
@ -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; |
|||
|
|||
} |
@ -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); |
|||
|
|||
|
|||
} |
@ -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; |
|||
} |
|||
} |
|||
|
|||
|
|||
|
|||
|
@ -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> |
@ -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> |
@ -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> |
@ -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…
Reference in new issue