Browse Source

活动新增 工时、采收数量、参与人、执行时间 4个字段

zyh
zhanyunjiu 3 years ago
parent
commit
32250adc85
  1. 2
      yudao-server/src/main/resources/application-local.yaml
  2. 13
      zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/discuss/vo/DiscussBaseVO.java
  3. 12
      zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/discuss/vo/DiscussExportReqVO.java
  4. 12
      zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/discuss/vo/DiscussPageReqVO.java
  5. 21
      zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/discuss/vo/DiscussRespVO.java
  6. 14
      zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/dal/dataobject/discuss/DiscussDO.java
  7. 13
      zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/service/discuss/DiscussServiceImpl.java

2
yudao-server/src/main/resources/application-local.yaml

@ -236,5 +236,7 @@ dubbo:
username: nacos username: nacos
password: nacos password: nacos
register: false register: false
consumer:
check: false
application: application:
name: zsw-farm name: zsw-farm

13
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; package cn.iocoder.yudao.module.farm.controller.admin.discuss.vo;
import cn.iocoder.yudao.module.farm.controller.admin.workHour.vo.WorkHourBaseVO; import cn.iocoder.yudao.module.farm.controller.admin.workHour.vo.WorkHourBaseVO;
import com.alibaba.fastjson.JSONArray;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import javax.validation.constraints.NotNull; import javax.validation.constraints.NotNull;
import java.util.Date;
import java.util.List; import java.util.List;
/** /**
@ -35,4 +37,15 @@ public class DiscussBaseVO {
private List<WorkHourBaseVO> workHourList; private List<WorkHourBaseVO> workHourList;
private Boolean pretendDelete; private Boolean pretendDelete;
@ApiModelProperty("工时")
private Integer workingHours;
private List<Long> joinPerson;
@ApiModelProperty("采收数量")
private Double recoveryNumber;
@ApiModelProperty("执行时间")
private Date executeTime;
} }

12
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; package cn.iocoder.yudao.module.farm.controller.admin.discuss.vo;
import com.alibaba.fastjson.JSONArray;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
@ -40,4 +41,15 @@ public class DiscussExportReqVO {
private Boolean pretendDelete; private Boolean pretendDelete;
@ApiModelProperty("工时")
private Integer workingHours;
private List<Long> joinPerson;
@ApiModelProperty("采收数量")
private Double recoveryNumber;
@ApiModelProperty("执行时间")
private Date executeTime;
} }

12
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; package cn.iocoder.yudao.module.farm.controller.admin.discuss.vo;
import cn.iocoder.yudao.framework.common.pojo.PageParam; import cn.iocoder.yudao.framework.common.pojo.PageParam;
import com.alibaba.fastjson.JSONArray;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
@ -45,4 +46,15 @@ public class DiscussPageReqVO extends PageParam {
private Boolean pretendDelete = false; private Boolean pretendDelete = false;
@ApiModelProperty("工时")
private Integer workingHours;
private List<Long> joinPerson;
@ApiModelProperty("采收数量")
private Double recoveryNumber;
@ApiModelProperty("执行时间")
private Date executeTime;
} }

21
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; package cn.iocoder.yudao.module.farm.controller.admin.discuss.vo;
import lombok.*; import io.swagger.annotations.ApiModel;
import java.util.*; import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.*; import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import java.util.Date;
import java.util.List;
@ApiModel("管理后台 - 农场任务讨论 Response VO") @ApiModel("管理后台 - 农场任务讨论 Response VO")
@Data @Data
@ -16,4 +21,14 @@ public class DiscussRespVO extends DiscussBaseVO {
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
private Date createTime; private Date createTime;
@ApiModelProperty("工时")
private Integer workingHours;
private List<Long> joinPerson;
@ApiModelProperty("采收数量")
private Double recoveryNumber;
@ApiModelProperty("执行时间")
private Date executeTime;
} }

14
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.dataobject.BaseDO;
import cn.iocoder.yudao.framework.mybatis.core.handler.ListIntToListLongTypeHandler; import cn.iocoder.yudao.framework.mybatis.core.handler.ListIntToListLongTypeHandler;
import cn.iocoder.yudao.module.farm.controller.admin.workHour.vo.WorkHourBaseVO; 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.TableField;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
@ -10,6 +11,7 @@ import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.*; import lombok.*;
import java.util.Date;
import java.util.List; import java.util.List;
/** /**
@ -61,4 +63,16 @@ public class DiscussDO extends BaseDO {
@ApiModelProperty("假装删除") @ApiModelProperty("假装删除")
private Boolean pretendDelete; private Boolean pretendDelete;
@ApiModelProperty("工时")
private Integer workingHours;
@ApiModelProperty("参与人")
@TableField(typeHandler = ListIntToListLongTypeHandler.class)
private List<Long> joinPerson;
@ApiModelProperty("采收数量")
private Double recoveryNumber;
@ApiModelProperty("执行时间")
private Date executeTime;
} }

13
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); addWorkHourRecord(createReqVO, discuss);
//任务更改为已完成
taskComplete(createReqVO.getTaskId());
//添加作物入库记录 //添加作物入库记录
addCropRecord(createReqVO); 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);
}
} }

Loading…
Cancel
Save