diff --git a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/annotation/FarmMsgAspect.java b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/annotation/FarmMsgAspect.java index d99f04de..1dd57ec0 100644 --- a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/annotation/FarmMsgAspect.java +++ b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/annotation/FarmMsgAspect.java @@ -197,16 +197,16 @@ public class FarmMsgAspect { List idList = new ArrayList<>(); if (farmMsgType.equals(FarmMsgTypeEnum.PROJECT)){ ProjectDO project = projectMapper.selectOne(ProjectDO::getId, id); - idList.addAll(project.getMembers().toJavaList(Long.class)); + idList.addAll(project.getMembers()); }else if (farmMsgType.equals(FarmMsgTypeEnum.TASK)){ TaskDO task = taskMapper.selectOne(TaskDO::getId, id); idList.add(task.getMainPerson()); - idList.addAll(task.getExecutorPerson().toJavaList(Long.class)); + idList.addAll(task.getExecutorPerson()); }else if (farmMsgType.equals(FarmMsgTypeEnum.DISCUSS)){ DiscussDO discuss = discussMapper.selectOne(DiscussDO::getId, id); TaskDO task = taskMapper.selectOne(TaskDO::getId, discuss.getId()); idList.add(task.getMainPerson()); - idList.addAll(task.getExecutorPerson().toJavaList(Long.class)); + idList.addAll(task.getExecutorPerson()); } StringBuilder builder = new StringBuilder(); diff --git a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/crop/vo/CropBaseVO.java b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/crop/vo/CropBaseVO.java index eca8af77..96fea697 100644 --- a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/crop/vo/CropBaseVO.java +++ b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/crop/vo/CropBaseVO.java @@ -17,6 +17,9 @@ public class CropBaseVO { @NotNull(message = "物料名不能为空") private String name; + @ApiModelProperty("品种") + private String variety; + @ApiModelProperty(value = "物料图片") private JSONArray images; diff --git a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/crop/vo/CropExcelVO.java b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/crop/vo/CropExcelVO.java index 39cb4767..59ea81b0 100644 --- a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/crop/vo/CropExcelVO.java +++ b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/crop/vo/CropExcelVO.java @@ -20,6 +20,9 @@ public class CropExcelVO { @ExcelProperty("物料名") private String name; + @ExcelProperty("品种") + private String variety; + @ExcelProperty("物料图片") private JSONArray images; diff --git a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/crop/vo/CropExportReqVO.java b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/crop/vo/CropExportReqVO.java index b47c7871..342c8914 100644 --- a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/crop/vo/CropExportReqVO.java +++ b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/crop/vo/CropExportReqVO.java @@ -17,6 +17,9 @@ public class CropExportReqVO { @ApiModelProperty(value = "物料名") private String name; + @ApiModelProperty("品种") + private String variety; + @ApiModelProperty(value = "物料图片") private JSONArray images; diff --git a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/crop/vo/CropPageReqVO.java b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/crop/vo/CropPageReqVO.java index 3497a63d..7663f5a6 100644 --- a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/crop/vo/CropPageReqVO.java +++ b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/crop/vo/CropPageReqVO.java @@ -1,12 +1,16 @@ package cn.iocoder.yudao.module.farm.controller.admin.crop.vo; -import com.alibaba.fastjson.JSONArray; -import lombok.*; -import java.util.*; -import io.swagger.annotations.*; import cn.iocoder.yudao.framework.common.pojo.PageParam; +import com.alibaba.fastjson.JSONArray; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; import org.springframework.format.annotation.DateTimeFormat; +import java.util.Date; + import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; @ApiModel("管理后台 - 分页 Request VO") @@ -18,6 +22,9 @@ public class CropPageReqVO extends PageParam { @ApiModelProperty(value = "物料名") private String name; + @ApiModelProperty("品种") + private String variety; + @ApiModelProperty(value = "物料图片") private JSONArray images; diff --git a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/project/dto/ProjectListDTO.java b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/project/dto/ProjectListDTO.java index ce5c06b5..be57618b 100644 --- a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/project/dto/ProjectListDTO.java +++ b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/project/dto/ProjectListDTO.java @@ -1,12 +1,12 @@ package cn.iocoder.yudao.module.farm.controller.admin.project.dto; import cn.iocoder.yudao.module.farm.dal.dataobject.project.ProjectDO; - import cn.iocoder.yudao.module.system.dal.dataobject.CpUser.CpUserDO; import com.fasterxml.jackson.annotation.JsonFormat; -import lombok.*; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; -import java.time.LocalDateTime; import java.util.Date; import java.util.List; @@ -18,6 +18,9 @@ public class ProjectListDTO extends ProjectDO { List areaName; + //主要负责人名字 + String mainPersonName; + List executorName; List memberList; diff --git a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/project/vo/ProjectBaseVO.java b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/project/vo/ProjectBaseVO.java index 771e3f4f..63c1481f 100644 --- a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/project/vo/ProjectBaseVO.java +++ b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/project/vo/ProjectBaseVO.java @@ -8,7 +8,6 @@ import cn.iocoder.yudao.module.farm.dal.dataobject.project.ProjectDO; import cn.iocoder.yudao.module.farm.enums.ProjectStateEnum; import cn.iocoder.yudao.module.system.dal.dataobject.permission.RoleDO; import cn.iocoder.yudao.module.system.service.permission.RoleService; -import com.alibaba.fastjson.JSONArray; import com.google.common.collect.Maps; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -47,11 +46,14 @@ ProjectBaseVO extends ProjectDO { private Long cropId; + @ApiModelProperty("项目负责人") + private Long mainPerson; + @ApiModelProperty("成员选择") - private JSONArray members; + private List members; @ApiModelProperty(value = "项目图片") - private JSONArray images; + private List images; @ApiModelProperty(value = "育苗日期") @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) diff --git a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/project/vo/ProjectExcelVO.java b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/project/vo/ProjectExcelVO.java index 75a79ce2..c1adaf71 100644 --- a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/project/vo/ProjectExcelVO.java +++ b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/project/vo/ProjectExcelVO.java @@ -2,7 +2,6 @@ package cn.iocoder.yudao.module.farm.controller.admin.project.vo; import cn.iocoder.yudao.module.farm.enums.ProjectStateEnum; import com.alibaba.excel.annotation.ExcelProperty; -import com.alibaba.fastjson.JSONArray; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -34,12 +33,16 @@ public class ProjectExcelVO { @ApiModelProperty("种植面积") private Double plantArea; - private JSONArray members; + @ApiModelProperty("项目负责人") + private Long mainPerson; + + @ApiModelProperty("项目成员") + private List members; private Long cropId; @ExcelProperty("项目图片") - private JSONArray images; + private List images; @ExcelProperty("育苗日期") private Date growSeedTime; diff --git a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/project/vo/ProjectExportReqVO.java b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/project/vo/ProjectExportReqVO.java index 37e59368..da74347d 100644 --- a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/project/vo/ProjectExportReqVO.java +++ b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/project/vo/ProjectExportReqVO.java @@ -1,14 +1,14 @@ package cn.iocoder.yudao.module.farm.controller.admin.project.vo; -import cn.hutool.json.JSON; import cn.iocoder.yudao.module.farm.enums.ProjectStateEnum; -import com.alibaba.fastjson.JSONArray; -import lombok.*; -import java.util.*; -import io.swagger.annotations.*; -import cn.iocoder.yudao.framework.common.pojo.PageParam; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; import org.springframework.format.annotation.DateTimeFormat; +import java.util.Date; +import java.util.List; + import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; @ApiModel(value = "管理后台 - 农场项目 Excel 导出 Request VO", description = "参数和 ProjectPageReqVO 是一致的") @@ -27,10 +27,13 @@ public class ProjectExportReqVO { private Long cropId; - private JSONArray members; + @ApiModelProperty("项目负责人") + private Long mainPerson; + + private List members; @ApiModelProperty(value = "项目图片") - private JSONArray images; + private List images; @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) @ApiModelProperty(value = "开始") diff --git a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/project/vo/ProjectPageReqVO.java b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/project/vo/ProjectPageReqVO.java index d5309c91..9d2b2b65 100644 --- a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/project/vo/ProjectPageReqVO.java +++ b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/project/vo/ProjectPageReqVO.java @@ -2,7 +2,6 @@ package cn.iocoder.yudao.module.farm.controller.admin.project.vo; import cn.iocoder.yudao.framework.common.pojo.PageParam; import cn.iocoder.yudao.module.farm.enums.ProjectStateEnum; -import com.alibaba.fastjson.JSONArray; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -34,12 +33,15 @@ public class ProjectPageReqVO extends PageParam { @ApiModelProperty("种植面积") private Double plantArea; - private JSONArray members; + @ApiModelProperty("项目负责人") + private Long mainPerson; + + private List members; private Long cropId; @ApiModelProperty(value = "项目图片") - private JSONArray images; + private List images; @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) @ApiModelProperty(value = "育苗开始日期") diff --git a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/project/vo/ProjectSearchPageReqVO.java b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/project/vo/ProjectSearchPageReqVO.java index 61133b3e..365d47ce 100644 --- a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/project/vo/ProjectSearchPageReqVO.java +++ b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/project/vo/ProjectSearchPageReqVO.java @@ -2,7 +2,6 @@ package cn.iocoder.yudao.module.farm.controller.admin.project.vo; import cn.iocoder.yudao.framework.common.pojo.PageParam; import cn.iocoder.yudao.module.farm.enums.ProjectStateEnum; -import com.alibaba.fastjson.JSONArray; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -37,10 +36,14 @@ public class ProjectSearchPageReqVO extends PageParam { private Long cropId; - private JSONArray members; + @ApiModelProperty("项目负责人") + private Long mainPerson; - @ApiModelProperty(value = "") - private JSONArray images; + @ApiModelProperty(value = "项目成员") + private List members; + + @ApiModelProperty(value = "图片") + private List images; @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) @ApiModelProperty(value = "育苗开始日期") diff --git a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/resource/dto/ResourceDTO.java b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/resource/dto/ResourceDTO.java index b78f080d..b171d547 100644 --- a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/resource/dto/ResourceDTO.java +++ b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/resource/dto/ResourceDTO.java @@ -12,8 +12,6 @@ public class ResourceDTO { Integer num; - Long reource; - List resourceId; } diff --git a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/task/vo/TaskBaseVO.java b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/task/vo/TaskBaseVO.java index 35fda85b..c31fde9e 100644 --- a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/task/vo/TaskBaseVO.java +++ b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/task/vo/TaskBaseVO.java @@ -35,18 +35,19 @@ public class TaskBaseVO extends BaseDO { private Long taskCateId; private Long taskCateName; - @ApiModelProperty(value = "") + @ApiModelProperty(value = "任务所需资源") private JSONArray resources; @ApiModelProperty("子区域列表") private List areas; private Long mainPerson; - private JSONArray executorPerson; + @ApiModelProperty("执行人") + private List executorPerson; private Integer workingHours; @ApiModelProperty(value = "") - private JSONArray images; + private List images; @ApiModelProperty(value = "") @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) diff --git a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/task/vo/TaskExcelVO.java b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/task/vo/TaskExcelVO.java index 6263066c..f92bb999 100644 --- a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/task/vo/TaskExcelVO.java +++ b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/task/vo/TaskExcelVO.java @@ -1,11 +1,12 @@ package cn.iocoder.yudao.module.farm.controller.admin.task.vo; +import com.alibaba.excel.annotation.ExcelProperty; import com.alibaba.fastjson.JSONArray; -import lombok.*; -import java.util.*; -import io.swagger.annotations.*; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; -import com.alibaba.excel.annotation.ExcelProperty; +import java.util.Date; +import java.util.List; /** * 农场项目 Excel VO @@ -28,18 +29,18 @@ public class TaskExcelVO { private Long taskCateId; private Long taskCateName; - @ExcelProperty("") + @ExcelProperty(value = "任务所需资源") private JSONArray resources; - @ApiModelProperty("子区域列表") + @ExcelProperty("子区域列表") private List areas; private Long mainPerson; - private JSONArray executorPerson; + private List executorPerson; private Integer workingHours; @ExcelProperty("") - private JSONArray images; + private List images; @ExcelProperty("") private Date planStartTime; diff --git a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/task/vo/TaskExportReqVO.java b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/task/vo/TaskExportReqVO.java index e2add38b..e7911488 100644 --- a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/task/vo/TaskExportReqVO.java +++ b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/task/vo/TaskExportReqVO.java @@ -1,12 +1,14 @@ package cn.iocoder.yudao.module.farm.controller.admin.task.vo; import com.alibaba.fastjson.JSONArray; -import lombok.*; -import java.util.*; -import io.swagger.annotations.*; -import cn.iocoder.yudao.framework.common.pojo.PageParam; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; import org.springframework.format.annotation.DateTimeFormat; +import java.util.Date; +import java.util.List; + import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; @ApiModel(value = "管理后台 - 农场项目 Excel 导出 Request VO", description = "参数和 TaskPageReqVO 是一致的") @@ -20,16 +22,16 @@ public class TaskExportReqVO { private Long taskCateId; private Long taskCateName; - @ApiModelProperty(value = "") + @ApiModelProperty(value = "任务所需资源") private JSONArray resources; private List areas; private Long mainPerson; - private JSONArray executorPerson; + private List executorPerson; private Integer workingHours; @ApiModelProperty(value = "") - private JSONArray images; + private List images; @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) @ApiModelProperty(value = "开始") diff --git a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/task/vo/TaskPageReqVO.java b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/task/vo/TaskPageReqVO.java index 1c02ce9f..cebbe5b3 100644 --- a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/task/vo/TaskPageReqVO.java +++ b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/task/vo/TaskPageReqVO.java @@ -29,16 +29,16 @@ public class TaskPageReqVO extends PageParam { private Long taskCateId; private Long taskCateName; - @ApiModelProperty(value = "") + @ApiModelProperty(value = "任务所需资源") private JSONArray resources; private List areas; private Long mainPerson; - private JSONArray executorPerson; + private List executorPerson; private Integer workingHours; @ApiModelProperty(value = "") - private JSONArray images; + private List images; @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) @ApiModelProperty(value = "开始") diff --git a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/task/vo/TaskPageSearchReqVO.java b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/task/vo/TaskPageSearchReqVO.java index 7ba42508..3ab11d5b 100644 --- a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/task/vo/TaskPageSearchReqVO.java +++ b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/task/vo/TaskPageSearchReqVO.java @@ -10,7 +10,6 @@ import lombok.ToString; import org.springframework.format.annotation.DateTimeFormat; import java.time.LocalDateTime; -import java.util.Date; import java.util.List; import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; @@ -28,17 +27,17 @@ public class TaskPageSearchReqVO extends PageParam { private Long taskCateId; private Long taskCateName; - @ApiModelProperty(value = "") + @ApiModelProperty(value = "任务所需资源") private JSONArray resources; @ApiModelProperty("子区域列表") private List areas; private Long mainPerson; - private JSONArray executorPerson; + private List executorPerson; private Integer workingHours; @ApiModelProperty(value = "") - private JSONArray images; + private List images; @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) @ApiModelProperty(value = "开始") diff --git a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/dal/dataobject/crop/CropDO.java b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/dal/dataobject/crop/CropDO.java index f2f7bc3f..e1665914 100644 --- a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/dal/dataobject/crop/CropDO.java +++ b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/dal/dataobject/crop/CropDO.java @@ -32,6 +32,9 @@ public class CropDO extends BaseDO { * 物料名 */ private String name; + + @ApiModelProperty("品种") + private String variety; /** * 物料图片 */ diff --git a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/dal/dataobject/project/ProjectDO.java b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/dal/dataobject/project/ProjectDO.java index 507bbc53..488f7c01 100644 --- a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/dal/dataobject/project/ProjectDO.java +++ b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/dal/dataobject/project/ProjectDO.java @@ -9,7 +9,6 @@ import cn.iocoder.yudao.module.farm.enums.ProjectStateEnum; import cn.iocoder.yudao.module.system.dal.dataobject.permission.RoleDO; import cn.iocoder.yudao.module.system.dict.Dict; import cn.iocoder.yudao.module.system.service.permission.RoleService; -import com.alibaba.fastjson.JSONArray; import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; @@ -63,14 +62,17 @@ public class ProjectDO extends BaseDO { private Long cropId; + @ApiModelProperty("项目负责人") + private Long mainPerson; + @ApiModelProperty("成员选择") - @TableField(typeHandler = JacksonTypeHandler.class) - private JSONArray members; + @TableField(typeHandler = ListIntToListLongTypeHandler.class) + private List members; /** * */ @TableField(typeHandler = JacksonTypeHandler.class) - private JSONArray images; + private List images; /** * 育苗日期 */ diff --git a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/dal/dataobject/task/TaskDO.java b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/dal/dataobject/task/TaskDO.java index c74fafcf..04dc7ef2 100644 --- a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/dal/dataobject/task/TaskDO.java +++ b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/dal/dataobject/task/TaskDO.java @@ -1,26 +1,27 @@ package cn.iocoder.yudao.module.farm.dal.dataobject.task; import cn.hutool.extra.spring.SpringUtil; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; import cn.iocoder.yudao.framework.mybatis.core.handler.ListIntToListLongTypeHandler; import cn.iocoder.yudao.framework.security.core.LoginUser; import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils; +import cn.iocoder.yudao.module.farm.enums.TaskStatus; import cn.iocoder.yudao.module.system.dal.dataobject.permission.RoleDO; import cn.iocoder.yudao.module.system.dict.Dict; import cn.iocoder.yudao.module.system.service.permission.RoleService; import com.alibaba.fastjson.JSONArray; -import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler; import com.google.common.collect.Maps; import io.swagger.annotations.ApiModelProperty; -import cn.iocoder.yudao.module.farm.enums.TaskStatus; import lombok.*; -import java.sql.JDBCType; -import java.sql.Types; -import java.util.*; -import com.baomidou.mybatisplus.annotation.*; -import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; -import org.apache.ibatis.type.JdbcType; +import java.util.Date; +import java.util.List; +import java.util.Map; +import java.util.Optional; /** * 农场项目 DO @@ -50,8 +51,8 @@ public class TaskDO extends BaseDO { private Long mainPerson; @ApiModelProperty("执行人idList") - @TableField(typeHandler = JacksonTypeHandler.class) - private JSONArray executorPerson; + @TableField(typeHandler = ListIntToListLongTypeHandler.class) + private List executorPerson; @ApiModelProperty("工时") private Integer workingHours; @@ -70,7 +71,7 @@ public class TaskDO extends BaseDO { @ApiModelProperty("任务图片") @TableField(typeHandler = JacksonTypeHandler.class) - private JSONArray images; + private List images; /** * */ diff --git a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/service/project/ProjectServiceImpl.java b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/service/project/ProjectServiceImpl.java index b8c266d9..4653a8dd 100644 --- a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/service/project/ProjectServiceImpl.java +++ b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/service/project/ProjectServiceImpl.java @@ -178,19 +178,27 @@ public class ProjectServiceImpl implements ProjectService { //组装 项目成员信息 List memberIDList = new ArrayList<>(); projectListDTOList.forEach(item ->{ + if (ObjectUtil.isNotEmpty(item.getMainPerson())){ + memberIDList.add(item.getMainPerson()); + } if (ObjectUtil.isNotEmpty(item.getMembers())){ - memberIDList.addAll(item.getMembers().toJavaList(Long.class)); + memberIDList.addAll(item.getMembers()); } }); memberIDList.stream().distinct().collect(Collectors.toList()); if (ObjectUtil.isNotEmpty(memberIDList)){ List cpUserList = cpUserMapper.selectList(Wrappers.lambdaQuery().in(CpUserDO::getId, memberIDList)); projectListDTOList.forEach(item ->{ + if (ObjectUtil.isNotEmpty(item.getMainPerson())){ + Optional mainPerson = cpUserList.stream().filter(user -> user.getId().equals(item.getMainPerson())).findFirst(); + if (mainPerson.isPresent()){ + item.setMainPersonName(mainPerson.get().getName()); + } + } List memberList = new ArrayList<>(); if (ObjectUtil.isNotEmpty(item.getMembers())){ - List projectMember = item.getMembers().toJavaList(Long.class); cpUserList.forEach(user ->{ - if (projectMember.contains(user.getId())){ + if (item.getMembers().contains(user.getId())){ memberList.add(user); } }); 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 2844aa8c..cf0c2e36 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 @@ -210,8 +210,7 @@ public class TaskServiceImpl implements TaskService { TaskDetailDTO taskMsg = new TaskDetailDTO(); BeanUtil.copyProperties(taskDO, taskMsg); if (ObjectUtil.isNotEmpty(taskDO.getExecutorPerson())){ - List userIdList = taskDO.getExecutorPerson().toJavaList(Long.class); - List userList = cpUserMapper.selectList(Wrappers.lambdaQuery().in(CpUserDO::getId, userIdList)); + List userList = cpUserMapper.selectList(Wrappers.lambdaQuery().in(CpUserDO::getId, taskDO.getExecutorPerson())); //执行人 taskMsg.setApiExecutor(userList); } @@ -246,8 +245,7 @@ public class TaskServiceImpl implements TaskService { taskMsg.setApiProjectName(projectDO.getName()); } if (ObjectUtil.isNotEmpty(projectDO.getMembers())){ - List projectMemberId = projectDO.getMembers().toJavaList(Long.class); - List projectMember = cpUserMapper.selectList(CpUserDO::getId,projectMemberId); + List projectMember = cpUserMapper.selectList(CpUserDO::getId, projectDO.getMembers()); taskMsg.setProjectMemberList(projectMember); } } @@ -281,7 +279,7 @@ public class TaskServiceImpl implements TaskService { areaIdList.addAll(taskDO.getAreas()); } if (ObjectUtil.isNotEmpty(taskDO.getExecutorPerson())){ - executorIdList.addAll(taskDO.getExecutorPerson().toJavaList(Long.class)); + executorIdList.addAll(taskDO.getExecutorPerson()); } if (ObjectUtil.isNotEmpty(taskDO.getResources())){ resourceMap.put(taskDO.getId(), taskDO.getResources().toJavaList(ResourceDTO.class)); @@ -395,7 +393,7 @@ public class TaskServiceImpl implements TaskService { List executorNameList = new ArrayList<>(); preAssemblyDTO.getExecutorList().forEach(executor ->{ if (ObjectUtil.isNotEmpty(taskDO.getExecutorPerson())){ - taskDO.getExecutorPerson().toJavaList(Long.class).forEach(item ->{ + taskDO.getExecutorPerson().forEach(item ->{ if (executor.getId().equals(item)){ executorNameList.add( executor.getName()); }