diff --git a/yudao-server/src/main/resources/application-local.yaml b/yudao-server/src/main/resources/application-local.yaml index b4f719ae..7b2f97fe 100644 --- a/yudao-server/src/main/resources/application-local.yaml +++ b/yudao-server/src/main/resources/application-local.yaml @@ -236,5 +236,7 @@ dubbo: username: nacos password: nacos register: false + consumer: + check: false application: name: zsw-farm \ No newline at end of file diff --git a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/discuss/vo/DiscussBaseVO.java b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/discuss/vo/DiscussBaseVO.java index f5d41881..fbe2f23b 100644 --- a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/discuss/vo/DiscussBaseVO.java +++ b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/discuss/vo/DiscussBaseVO.java @@ -1,10 +1,12 @@ package cn.iocoder.yudao.module.farm.controller.admin.discuss.vo; import cn.iocoder.yudao.module.farm.controller.admin.workHour.vo.WorkHourBaseVO; +import com.alibaba.fastjson.JSONArray; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import javax.validation.constraints.NotNull; +import java.util.Date; import java.util.List; /** @@ -35,4 +37,15 @@ public class DiscussBaseVO { private List workHourList; private Boolean pretendDelete; + + @ApiModelProperty("工时") + private Integer workingHours; + + private List joinPerson; + + @ApiModelProperty("采收数量") + private Double recoveryNumber; + + @ApiModelProperty("执行时间") + private Date executeTime; } diff --git a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/discuss/vo/DiscussExportReqVO.java b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/discuss/vo/DiscussExportReqVO.java index f45c1752..8c9cfb50 100644 --- a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/discuss/vo/DiscussExportReqVO.java +++ b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/discuss/vo/DiscussExportReqVO.java @@ -1,5 +1,6 @@ package cn.iocoder.yudao.module.farm.controller.admin.discuss.vo; +import com.alibaba.fastjson.JSONArray; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -40,4 +41,15 @@ public class DiscussExportReqVO { private Boolean pretendDelete; + @ApiModelProperty("工时") + private Integer workingHours; + + private List joinPerson; + + @ApiModelProperty("采收数量") + private Double recoveryNumber; + + @ApiModelProperty("执行时间") + private Date executeTime; + } diff --git a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/discuss/vo/DiscussPageReqVO.java b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/discuss/vo/DiscussPageReqVO.java index e33e5c0a..f946c28e 100644 --- a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/discuss/vo/DiscussPageReqVO.java +++ b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/discuss/vo/DiscussPageReqVO.java @@ -1,6 +1,7 @@ package cn.iocoder.yudao.module.farm.controller.admin.discuss.vo; 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; @@ -45,4 +46,15 @@ public class DiscussPageReqVO extends PageParam { private Boolean pretendDelete = false; + @ApiModelProperty("工时") + private Integer workingHours; + + private List joinPerson; + + @ApiModelProperty("采收数量") + private Double recoveryNumber; + + @ApiModelProperty("执行时间") + private Date executeTime; + } diff --git a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/discuss/vo/DiscussRespVO.java b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/discuss/vo/DiscussRespVO.java index 9f910707..1eb6c365 100644 --- a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/discuss/vo/DiscussRespVO.java +++ b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/discuss/vo/DiscussRespVO.java @@ -1,8 +1,13 @@ package cn.iocoder.yudao.module.farm.controller.admin.discuss.vo; -import lombok.*; -import java.util.*; -import io.swagger.annotations.*; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; + +import java.util.Date; +import java.util.List; @ApiModel("管理后台 - 农场任务讨论 Response VO") @Data @@ -16,4 +21,14 @@ public class DiscussRespVO extends DiscussBaseVO { @ApiModelProperty(value = "") private Date createTime; + @ApiModelProperty("工时") + private Integer workingHours; + + private List joinPerson; + + @ApiModelProperty("采收数量") + private Double recoveryNumber; + + @ApiModelProperty("执行时间") + private Date executeTime; } diff --git a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/dal/dataobject/discuss/DiscussDO.java b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/dal/dataobject/discuss/DiscussDO.java index 240862e4..ef71c673 100644 --- a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/dal/dataobject/discuss/DiscussDO.java +++ b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/dal/dataobject/discuss/DiscussDO.java @@ -3,6 +3,7 @@ package cn.iocoder.yudao.module.farm.dal.dataobject.discuss; import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; import cn.iocoder.yudao.framework.mybatis.core.handler.ListIntToListLongTypeHandler; import cn.iocoder.yudao.module.farm.controller.admin.workHour.vo.WorkHourBaseVO; +import com.alibaba.fastjson.JSONArray; import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; @@ -10,6 +11,7 @@ import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler; import io.swagger.annotations.ApiModelProperty; import lombok.*; +import java.util.Date; import java.util.List; /** @@ -61,4 +63,16 @@ public class DiscussDO extends BaseDO { @ApiModelProperty("假装删除") private Boolean pretendDelete; + @ApiModelProperty("工时") + private Integer workingHours; + + @ApiModelProperty("参与人") + @TableField(typeHandler = ListIntToListLongTypeHandler.class) + private List joinPerson; + + @ApiModelProperty("采收数量") + private Double recoveryNumber; + + @ApiModelProperty("执行时间") + private Date executeTime; } diff --git a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/service/discuss/DiscussServiceImpl.java b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/service/discuss/DiscussServiceImpl.java index 7b7c2d1c..e85398dc 100644 --- a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/service/discuss/DiscussServiceImpl.java +++ b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/service/discuss/DiscussServiceImpl.java @@ -102,6 +102,9 @@ public class DiscussServiceImpl implements DiscussService { //添加工时记录 addWorkHourRecord(createReqVO, discuss); + //任务更改为已完成 + taskComplete(createReqVO.getTaskId()); + //添加作物入库记录 addCropRecord(createReqVO); @@ -307,4 +310,14 @@ public class DiscussServiceImpl implements DiscussService { } + /** + * 提交活动后 任务更改为已完成 + */ + private void taskComplete(Long taskId){ + TaskDO taskDO = taskMapper.selectById(taskId); + taskDO.setStatus(TaskStatus.COMPLETE); + taskMapper.updateById(taskDO); + + } + }