diff --git a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/task/TaskController.java b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/task/TaskController.java index 71f06ef1..47d77378 100644 --- a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/task/TaskController.java +++ b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/task/TaskController.java @@ -96,7 +96,7 @@ public class TaskController { } @GetMapping("/apiPage") - @ApiOperation("获得农场项目分页及相关信息") + @ApiOperation("获得农场任务分页及相关信息") @PreAuthorize("@ss.hasPermission('farm:task:query')") public CommonResult> getAdminTaskPage(@Valid TaskPageReqVO pageVO) { PageResult pageResult = taskService.getAdminTaskPage(pageVO); diff --git a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/task/dto/TaskAssemblyDTO.java b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/task/dto/TaskAssemblyDTO.java index 588bb6c1..f983e3d4 100644 --- a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/task/dto/TaskAssemblyDTO.java +++ b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/task/dto/TaskAssemblyDTO.java @@ -55,4 +55,6 @@ public class TaskAssemblyDTO extends TaskBaseVO { //时间 @JsonFormat(pattern = "yyyy-MM-dd") Date finishTime; + + Date createTime; } diff --git a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/taskCate/vo/TaskCateBaseVO.java b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/taskCate/vo/TaskCateBaseVO.java index c5299589..4a390e10 100644 --- a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/taskCate/vo/TaskCateBaseVO.java +++ b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/taskCate/vo/TaskCateBaseVO.java @@ -16,13 +16,12 @@ public class TaskCateBaseVO { @ApiModelProperty(value = "") private Long parentId; - @ApiModelProperty(value = "") - private Long projectId; - @ApiModelProperty(value = "", required = true) @NotNull(message = "不能为空") private String name; private Boolean pretendDelete; + private String unit; + } diff --git a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/taskCate/vo/TaskCateExcelVO.java b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/taskCate/vo/TaskCateExcelVO.java index 4a298e1a..a02fac23 100644 --- a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/taskCate/vo/TaskCateExcelVO.java +++ b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/taskCate/vo/TaskCateExcelVO.java @@ -17,9 +17,6 @@ public class TaskCateExcelVO { @ExcelProperty("") private Long parentId; - @ExcelProperty("") - private Long projectId; - @ExcelProperty("") private String name; @@ -28,4 +25,5 @@ public class TaskCateExcelVO { private Boolean pretendDelete; + private String unit; } diff --git a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/taskCate/vo/TaskCateExportReqVO.java b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/taskCate/vo/TaskCateExportReqVO.java index 25f2cb22..627d8ea7 100644 --- a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/taskCate/vo/TaskCateExportReqVO.java +++ b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/taskCate/vo/TaskCateExportReqVO.java @@ -15,9 +15,6 @@ public class TaskCateExportReqVO { @ApiModelProperty(value = "") private Long parentId; - @ApiModelProperty(value = "") - private Long projectId; - @ApiModelProperty(value = "") private String name; @@ -31,4 +28,5 @@ public class TaskCateExportReqVO { private Boolean pretendDelete; + private String unit; } diff --git a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/taskCate/vo/TaskCatePageReqVO.java b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/taskCate/vo/TaskCatePageReqVO.java index 61667288..19a94ba7 100644 --- a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/taskCate/vo/TaskCatePageReqVO.java +++ b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/taskCate/vo/TaskCatePageReqVO.java @@ -17,9 +17,6 @@ public class TaskCatePageReqVO extends PageParam { @ApiModelProperty(value = "") private Long parentId; - @ApiModelProperty(value = "") - private Long projectId; - @ApiModelProperty(value = "") private String name; @@ -33,4 +30,6 @@ public class TaskCatePageReqVO extends PageParam { private Boolean pretendDelete = false; + private String unit; + } diff --git a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/dal/dataobject/taskCate/TaskCateDO.java b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/dal/dataobject/taskCate/TaskCateDO.java index 8adc33ed..d92d3fb8 100644 --- a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/dal/dataobject/taskCate/TaskCateDO.java +++ b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/dal/dataobject/taskCate/TaskCateDO.java @@ -29,10 +29,6 @@ public class TaskCateDO extends BaseDO { * */ private Long parentId; - /** - * - */ - private Long projectId; /** * */ @@ -41,4 +37,7 @@ public class TaskCateDO extends BaseDO { @ApiModelProperty("假装删除") private Boolean pretendDelete; + @ApiModelProperty("任务单位, 亩,株") + private String unit; + } diff --git a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/dal/mysql/taskCate/TaskCateMapper.java b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/dal/mysql/taskCate/TaskCateMapper.java index 6d8e2fa5..3687abc9 100644 --- a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/dal/mysql/taskCate/TaskCateMapper.java +++ b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/dal/mysql/taskCate/TaskCateMapper.java @@ -20,7 +20,6 @@ public interface TaskCateMapper extends BaseMapperX { default PageResult selectPage(TaskCatePageReqVO reqVO) { return selectPage(reqVO, new LambdaQueryWrapperX() .eqIfPresent(TaskCateDO::getParentId, reqVO.getParentId()) - .eqIfPresent(TaskCateDO::getProjectId, reqVO.getProjectId()) .likeIfPresent(TaskCateDO::getName, reqVO.getName()) .betweenIfPresent(TaskCateDO::getCreateTime, reqVO.getBeginCreateTime(), reqVO.getEndCreateTime()) .eqIfPresent(TaskCateDO::getPretendDelete, reqVO.getPretendDelete()) @@ -30,7 +29,6 @@ public interface TaskCateMapper extends BaseMapperX { default List selectList(TaskCateExportReqVO reqVO) { return selectList(new LambdaQueryWrapperX() .eqIfPresent(TaskCateDO::getParentId, reqVO.getParentId()) - .eqIfPresent(TaskCateDO::getProjectId, reqVO.getProjectId()) .likeIfPresent(TaskCateDO::getName, reqVO.getName()) .betweenIfPresent(TaskCateDO::getCreateTime, reqVO.getBeginCreateTime(), reqVO.getEndCreateTime()) .eqIfPresent(TaskCateDO::getPretendDelete, reqVO.getPretendDelete()) diff --git a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/service/task/TaskServiceImpl.java b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/service/task/TaskServiceImpl.java index d8822f09..5dc8e1a7 100644 --- a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/service/task/TaskServiceImpl.java +++ b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/service/task/TaskServiceImpl.java @@ -142,6 +142,7 @@ public class TaskServiceImpl implements TaskService { newDTO.setTaskMsg(dto.getTaskMsg()); newDTO.setMainPersonName(dto.getMainPersonName()); newDTO.setCropName(dto.getCropName()); + newDTO.setCreateTime(dto.getCreateTime()); list.add(newDTO); } }); @@ -349,6 +350,7 @@ public class TaskServiceImpl implements TaskService { if (taskDO.getStatus().equals(TaskStatus.COMPLETE)){ dto.setFinishTime(taskDO.getUpdateTime()); } + dto.setCreateTime(taskDO.getCreateTime()); map.put(taskDO.getId(), dto); } return map; diff --git a/zsw-farm/zsw-farm-impl/src/test/java/cn/iocoder/yudao/module/farm/service/taskCate/TaskCateServiceImplTest.java b/zsw-farm/zsw-farm-impl/src/test/java/cn/iocoder/yudao/module/farm/service/taskCate/TaskCateServiceImplTest.java index 4d5899d9..a889eec0 100644 --- a/zsw-farm/zsw-farm-impl/src/test/java/cn/iocoder/yudao/module/farm/service/taskCate/TaskCateServiceImplTest.java +++ b/zsw-farm/zsw-farm-impl/src/test/java/cn/iocoder/yudao/module/farm/service/taskCate/TaskCateServiceImplTest.java @@ -109,15 +109,12 @@ public class TaskCateServiceImplTest extends BaseDbUnitTest { // mock 数据 TaskCateDO dbTaskCate = randomPojo(TaskCateDO.class, o -> { // 等会查询到 o.setParentId(null); - o.setProjectId(null); o.setName(null); o.setCreateTime(null); }); taskCateMapper.insert(dbTaskCate); // 测试 parentId 不匹配 taskCateMapper.insert(cloneIgnoreId(dbTaskCate, o -> o.setParentId(null))); - // 测试 projectId 不匹配 - taskCateMapper.insert(cloneIgnoreId(dbTaskCate, o -> o.setProjectId(null))); // 测试 name 不匹配 taskCateMapper.insert(cloneIgnoreId(dbTaskCate, o -> o.setName(null))); // 测试 createTime 不匹配 @@ -125,7 +122,6 @@ public class TaskCateServiceImplTest extends BaseDbUnitTest { // 准备参数 TaskCatePageReqVO reqVO = new TaskCatePageReqVO(); reqVO.setParentId(null); - reqVO.setProjectId(null); reqVO.setName(null); reqVO.setBeginCreateTime(null); reqVO.setEndCreateTime(null); @@ -144,15 +140,12 @@ public class TaskCateServiceImplTest extends BaseDbUnitTest { // mock 数据 TaskCateDO dbTaskCate = randomPojo(TaskCateDO.class, o -> { // 等会查询到 o.setParentId(null); - o.setProjectId(null); o.setName(null); o.setCreateTime(null); }); taskCateMapper.insert(dbTaskCate); // 测试 parentId 不匹配 taskCateMapper.insert(cloneIgnoreId(dbTaskCate, o -> o.setParentId(null))); - // 测试 projectId 不匹配 - taskCateMapper.insert(cloneIgnoreId(dbTaskCate, o -> o.setProjectId(null))); // 测试 name 不匹配 taskCateMapper.insert(cloneIgnoreId(dbTaskCate, o -> o.setName(null))); // 测试 createTime 不匹配 @@ -160,7 +153,6 @@ public class TaskCateServiceImplTest extends BaseDbUnitTest { // 准备参数 TaskCateExportReqVO reqVO = new TaskCateExportReqVO(); reqVO.setParentId(null); - reqVO.setProjectId(null); reqVO.setName(null); reqVO.setBeginCreateTime(null); reqVO.setEndCreateTime(null);