Browse Source

Merge branch 'pt' of dd.tall.wiki:ccsens_wiki/ccsenscloud into pt

recovery
hyy-alt 4 years ago
parent
commit
180011b7f9
  1. 25
      tall/src/main/java/com/ccsens/tall/bean/dto/InputDocDto.java
  2. 16
      tall/src/main/java/com/ccsens/tall/bean/dto/TaskDto.java
  3. 106
      tall/src/main/java/com/ccsens/tall/bean/po/File.java
  4. 711
      tall/src/main/java/com/ccsens/tall/bean/po/FileExample.java
  5. 11
      tall/src/main/java/com/ccsens/tall/bean/po/ProRole.java
  6. 60
      tall/src/main/java/com/ccsens/tall/bean/po/ProRoleExample.java
  7. 19
      tall/src/main/java/com/ccsens/tall/bean/po/ProTaskInputRecord.java
  8. 100
      tall/src/main/java/com/ccsens/tall/bean/po/ProTaskInputRecordExample.java
  9. 24
      tall/src/main/java/com/ccsens/tall/bean/vo/InputDocVo.java
  10. 30
      tall/src/main/java/com/ccsens/tall/persist/mapper/FileMapper.java
  11. 7
      tall/src/main/java/com/ccsens/tall/service/ExcelService.java
  12. 12
      tall/src/main/java/com/ccsens/tall/service/IInputDocService.java
  13. 11
      tall/src/main/java/com/ccsens/tall/service/IProTaskDetailService.java
  14. 157
      tall/src/main/java/com/ccsens/tall/service/InputDocService.java
  15. 73
      tall/src/main/java/com/ccsens/tall/service/ProTaskDetailService.java
  16. 50
      tall/src/main/java/com/ccsens/tall/service/TaskSubTimeService.java
  17. 20
      tall/src/main/java/com/ccsens/tall/web/InputDocController.java
  18. 53
      tall/src/main/resources/mapper_dao/IInputDocDao.xml
  19. 258
      tall/src/main/resources/mapper_raw/FileMapper.xml
  20. 25
      tall/src/main/resources/mapper_raw/ProRoleMapper.xml
  21. 41
      tall/src/main/resources/mapper_raw/ProTaskInputRecordMapper.xml

25
tall/src/main/java/com/ccsens/tall/bean/dto/InputDocDto.java

@ -38,9 +38,10 @@ public class InputDocDto {
@NotNull(message = "请选择输入文档")
@ApiModelProperty("输入文档Id")
private Long docId;
@NotNull(message = "上传文件不能为空")
@ApiModelProperty("文件Id,数组")
private Long[] fileIds;
private String[] fileIds;
@ApiModelProperty("备注信息")
private String remark;
}
@Data
@ -80,4 +81,24 @@ public class InputDocDto {
@ApiModelProperty("文档id")
private Long docId;
}
@Data
@ApiModel("删除输入文档中的文件")
public static class DeleteDocOfFile{
@NotNull(message = "请选择要删除的文件")
@ApiModelProperty("文档上传记录id")
private Long recordId;
}
@Data
@ApiModel("修改上传文件的备注信息")
public static class UpdateDocOfRemark{
@NotNull(message = "请选择要删除的备注信息")
@ApiModelProperty("文档上传记录id")
private Long recordId;
@ApiModelProperty("备注信息")
private String remark;
}
}

16
tall/src/main/java/com/ccsens/tall/bean/dto/TaskDto.java

@ -36,8 +36,10 @@ public class TaskDto {
private Long endTime;
@ApiModelProperty("重复周期")
private String cycle;
@ApiModelProperty("交付物")
private String taskDeliver;
@ApiModelProperty("交付物,可以是多个,可以是单个")
private List<String> taskDeliver;
@ApiModelProperty("输入文档,可以是多个,可以是单个")
private List<String> inputDoc;
@ApiModelProperty("插件")
private List<Long> pluginList;
@ApiModelProperty("优先级 3,紧急重要 2,紧急不重要 1,重要不紧急 0,不重要不紧急 默认0")
@ -211,6 +213,8 @@ public class TaskDto {
private Byte milestone;
@ApiModelProperty("交付物id和修改后的名字")
private List<UpdateTaskDeliverName> deliverList;
@ApiModelProperty("输入文档的id和修改后的名字")
private List<UpdateTaskDeliverName> inputList;
@ApiModelProperty("需要修改的插件Id")
private List<Long> plugins;
@ApiModelProperty("任务提醒信息")
@ -420,4 +424,12 @@ public class TaskDto {
@ApiModelProperty("角色id")
private Long roleId;
}
@Data
@ApiModel("交付物列表/输入文档列表 新增和修改都采用这个")
public static class JiaoFuWu{
@ApiModelProperty("交付物/输入文档的id")
public Long id;
@ApiModelProperty("交付物名称")
public String names;
}
}

106
tall/src/main/java/com/ccsens/tall/bean/po/File.java

@ -0,0 +1,106 @@
package com.ccsens.tall.bean.po;
import java.io.Serializable;
import java.util.Date;
public class File implements Serializable {
private Long id;
private Long userId;
private String fileName;
private String location;
private String visitLocation;
private Date createdAt;
private Date updatedAt;
private Byte recStatus;
private static final long serialVersionUID = 1L;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Long getUserId() {
return userId;
}
public void setUserId(Long userId) {
this.userId = userId;
}
public String getFileName() {
return fileName;
}
public void setFileName(String fileName) {
this.fileName = fileName == null ? null : fileName.trim();
}
public String getLocation() {
return location;
}
public void setLocation(String location) {
this.location = location == null ? null : location.trim();
}
public String getVisitLocation() {
return visitLocation;
}
public void setVisitLocation(String visitLocation) {
this.visitLocation = visitLocation == null ? null : visitLocation.trim();
}
public Date getCreatedAt() {
return createdAt;
}
public void setCreatedAt(Date createdAt) {
this.createdAt = createdAt;
}
public Date getUpdatedAt() {
return updatedAt;
}
public void setUpdatedAt(Date updatedAt) {
this.updatedAt = updatedAt;
}
public Byte getRecStatus() {
return recStatus;
}
public void setRecStatus(Byte recStatus) {
this.recStatus = recStatus;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", userId=").append(userId);
sb.append(", fileName=").append(fileName);
sb.append(", location=").append(location);
sb.append(", visitLocation=").append(visitLocation);
sb.append(", createdAt=").append(createdAt);
sb.append(", updatedAt=").append(updatedAt);
sb.append(", recStatus=").append(recStatus);
sb.append("]");
return sb.toString();
}
}

711
tall/src/main/java/com/ccsens/tall/bean/po/FileExample.java

@ -0,0 +1,711 @@
package com.ccsens.tall.bean.po;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class FileExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
public FileExample() {
oredCriteria = new ArrayList<Criteria>();
}
public void setOrderByClause(String orderByClause) {
this.orderByClause = orderByClause;
}
public String getOrderByClause() {
return orderByClause;
}
public void setDistinct(boolean distinct) {
this.distinct = distinct;
}
public boolean isDistinct() {
return distinct;
}
public List<Criteria> getOredCriteria() {
return oredCriteria;
}
public void or(Criteria criteria) {
oredCriteria.add(criteria);
}
public Criteria or() {
Criteria criteria = createCriteriaInternal();
oredCriteria.add(criteria);
return criteria;
}
public Criteria createCriteria() {
Criteria criteria = createCriteriaInternal();
if (oredCriteria.size() == 0) {
oredCriteria.add(criteria);
}
return criteria;
}
protected Criteria createCriteriaInternal() {
Criteria criteria = new Criteria();
return criteria;
}
public void clear() {
oredCriteria.clear();
orderByClause = null;
distinct = false;
}
protected abstract static class GeneratedCriteria {
protected List<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<Criterion>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> getCriteria() {
return criteria;
}
protected void addCriterion(String condition) {
if (condition == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion(condition));
}
protected void addCriterion(String condition, Object value, String property) {
if (value == null) {
throw new RuntimeException("Value for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value));
}
protected void addCriterion(String condition, Object value1, Object value2, String property) {
if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value1, value2));
}
public Criteria andIdIsNull() {
addCriterion("id is null");
return (Criteria) this;
}
public Criteria andIdIsNotNull() {
addCriterion("id is not null");
return (Criteria) this;
}
public Criteria andIdEqualTo(Long value) {
addCriterion("id =", value, "id");
return (Criteria) this;
}
public Criteria andIdNotEqualTo(Long value) {
addCriterion("id <>", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThan(Long value) {
addCriterion("id >", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThanOrEqualTo(Long value) {
addCriterion("id >=", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThan(Long value) {
addCriterion("id <", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThanOrEqualTo(Long value) {
addCriterion("id <=", value, "id");
return (Criteria) this;
}
public Criteria andIdIn(List<Long> values) {
addCriterion("id in", values, "id");
return (Criteria) this;
}
public Criteria andIdNotIn(List<Long> values) {
addCriterion("id not in", values, "id");
return (Criteria) this;
}
public Criteria andIdBetween(Long value1, Long value2) {
addCriterion("id between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andIdNotBetween(Long value1, Long value2) {
addCriterion("id not between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andUserIdIsNull() {
addCriterion("user_id is null");
return (Criteria) this;
}
public Criteria andUserIdIsNotNull() {
addCriterion("user_id is not null");
return (Criteria) this;
}
public Criteria andUserIdEqualTo(Long value) {
addCriterion("user_id =", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdNotEqualTo(Long value) {
addCriterion("user_id <>", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdGreaterThan(Long value) {
addCriterion("user_id >", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdGreaterThanOrEqualTo(Long value) {
addCriterion("user_id >=", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdLessThan(Long value) {
addCriterion("user_id <", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdLessThanOrEqualTo(Long value) {
addCriterion("user_id <=", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdIn(List<Long> values) {
addCriterion("user_id in", values, "userId");
return (Criteria) this;
}
public Criteria andUserIdNotIn(List<Long> values) {
addCriterion("user_id not in", values, "userId");
return (Criteria) this;
}
public Criteria andUserIdBetween(Long value1, Long value2) {
addCriterion("user_id between", value1, value2, "userId");
return (Criteria) this;
}
public Criteria andUserIdNotBetween(Long value1, Long value2) {
addCriterion("user_id not between", value1, value2, "userId");
return (Criteria) this;
}
public Criteria andFileNameIsNull() {
addCriterion("file_name is null");
return (Criteria) this;
}
public Criteria andFileNameIsNotNull() {
addCriterion("file_name is not null");
return (Criteria) this;
}
public Criteria andFileNameEqualTo(String value) {
addCriterion("file_name =", value, "fileName");
return (Criteria) this;
}
public Criteria andFileNameNotEqualTo(String value) {
addCriterion("file_name <>", value, "fileName");
return (Criteria) this;
}
public Criteria andFileNameGreaterThan(String value) {
addCriterion("file_name >", value, "fileName");
return (Criteria) this;
}
public Criteria andFileNameGreaterThanOrEqualTo(String value) {
addCriterion("file_name >=", value, "fileName");
return (Criteria) this;
}
public Criteria andFileNameLessThan(String value) {
addCriterion("file_name <", value, "fileName");
return (Criteria) this;
}
public Criteria andFileNameLessThanOrEqualTo(String value) {
addCriterion("file_name <=", value, "fileName");
return (Criteria) this;
}
public Criteria andFileNameLike(String value) {
addCriterion("file_name like", value, "fileName");
return (Criteria) this;
}
public Criteria andFileNameNotLike(String value) {
addCriterion("file_name not like", value, "fileName");
return (Criteria) this;
}
public Criteria andFileNameIn(List<String> values) {
addCriterion("file_name in", values, "fileName");
return (Criteria) this;
}
public Criteria andFileNameNotIn(List<String> values) {
addCriterion("file_name not in", values, "fileName");
return (Criteria) this;
}
public Criteria andFileNameBetween(String value1, String value2) {
addCriterion("file_name between", value1, value2, "fileName");
return (Criteria) this;
}
public Criteria andFileNameNotBetween(String value1, String value2) {
addCriterion("file_name not between", value1, value2, "fileName");
return (Criteria) this;
}
public Criteria andLocationIsNull() {
addCriterion("location is null");
return (Criteria) this;
}
public Criteria andLocationIsNotNull() {
addCriterion("location is not null");
return (Criteria) this;
}
public Criteria andLocationEqualTo(String value) {
addCriterion("location =", value, "location");
return (Criteria) this;
}
public Criteria andLocationNotEqualTo(String value) {
addCriterion("location <>", value, "location");
return (Criteria) this;
}
public Criteria andLocationGreaterThan(String value) {
addCriterion("location >", value, "location");
return (Criteria) this;
}
public Criteria andLocationGreaterThanOrEqualTo(String value) {
addCriterion("location >=", value, "location");
return (Criteria) this;
}
public Criteria andLocationLessThan(String value) {
addCriterion("location <", value, "location");
return (Criteria) this;
}
public Criteria andLocationLessThanOrEqualTo(String value) {
addCriterion("location <=", value, "location");
return (Criteria) this;
}
public Criteria andLocationLike(String value) {
addCriterion("location like", value, "location");
return (Criteria) this;
}
public Criteria andLocationNotLike(String value) {
addCriterion("location not like", value, "location");
return (Criteria) this;
}
public Criteria andLocationIn(List<String> values) {
addCriterion("location in", values, "location");
return (Criteria) this;
}
public Criteria andLocationNotIn(List<String> values) {
addCriterion("location not in", values, "location");
return (Criteria) this;
}
public Criteria andLocationBetween(String value1, String value2) {
addCriterion("location between", value1, value2, "location");
return (Criteria) this;
}
public Criteria andLocationNotBetween(String value1, String value2) {
addCriterion("location not between", value1, value2, "location");
return (Criteria) this;
}
public Criteria andVisitLocationIsNull() {
addCriterion("visit_location is null");
return (Criteria) this;
}
public Criteria andVisitLocationIsNotNull() {
addCriterion("visit_location is not null");
return (Criteria) this;
}
public Criteria andVisitLocationEqualTo(String value) {
addCriterion("visit_location =", value, "visitLocation");
return (Criteria) this;
}
public Criteria andVisitLocationNotEqualTo(String value) {
addCriterion("visit_location <>", value, "visitLocation");
return (Criteria) this;
}
public Criteria andVisitLocationGreaterThan(String value) {
addCriterion("visit_location >", value, "visitLocation");
return (Criteria) this;
}
public Criteria andVisitLocationGreaterThanOrEqualTo(String value) {
addCriterion("visit_location >=", value, "visitLocation");
return (Criteria) this;
}
public Criteria andVisitLocationLessThan(String value) {
addCriterion("visit_location <", value, "visitLocation");
return (Criteria) this;
}
public Criteria andVisitLocationLessThanOrEqualTo(String value) {
addCriterion("visit_location <=", value, "visitLocation");
return (Criteria) this;
}
public Criteria andVisitLocationLike(String value) {
addCriterion("visit_location like", value, "visitLocation");
return (Criteria) this;
}
public Criteria andVisitLocationNotLike(String value) {
addCriterion("visit_location not like", value, "visitLocation");
return (Criteria) this;
}
public Criteria andVisitLocationIn(List<String> values) {
addCriterion("visit_location in", values, "visitLocation");
return (Criteria) this;
}
public Criteria andVisitLocationNotIn(List<String> values) {
addCriterion("visit_location not in", values, "visitLocation");
return (Criteria) this;
}
public Criteria andVisitLocationBetween(String value1, String value2) {
addCriterion("visit_location between", value1, value2, "visitLocation");
return (Criteria) this;
}
public Criteria andVisitLocationNotBetween(String value1, String value2) {
addCriterion("visit_location not between", value1, value2, "visitLocation");
return (Criteria) this;
}
public Criteria andCreatedAtIsNull() {
addCriterion("created_at is null");
return (Criteria) this;
}
public Criteria andCreatedAtIsNotNull() {
addCriterion("created_at is not null");
return (Criteria) this;
}
public Criteria andCreatedAtEqualTo(Date value) {
addCriterion("created_at =", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtNotEqualTo(Date value) {
addCriterion("created_at <>", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtGreaterThan(Date value) {
addCriterion("created_at >", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) {
addCriterion("created_at >=", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtLessThan(Date value) {
addCriterion("created_at <", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtLessThanOrEqualTo(Date value) {
addCriterion("created_at <=", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtIn(List<Date> values) {
addCriterion("created_at in", values, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtNotIn(List<Date> values) {
addCriterion("created_at not in", values, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtBetween(Date value1, Date value2) {
addCriterion("created_at between", value1, value2, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtNotBetween(Date value1, Date value2) {
addCriterion("created_at not between", value1, value2, "createdAt");
return (Criteria) this;
}
public Criteria andUpdatedAtIsNull() {
addCriterion("updated_at is null");
return (Criteria) this;
}
public Criteria andUpdatedAtIsNotNull() {
addCriterion("updated_at is not null");
return (Criteria) this;
}
public Criteria andUpdatedAtEqualTo(Date value) {
addCriterion("updated_at =", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtNotEqualTo(Date value) {
addCriterion("updated_at <>", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtGreaterThan(Date value) {
addCriterion("updated_at >", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) {
addCriterion("updated_at >=", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtLessThan(Date value) {
addCriterion("updated_at <", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtLessThanOrEqualTo(Date value) {
addCriterion("updated_at <=", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtIn(List<Date> values) {
addCriterion("updated_at in", values, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtNotIn(List<Date> values) {
addCriterion("updated_at not in", values, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtBetween(Date value1, Date value2) {
addCriterion("updated_at between", value1, value2, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtNotBetween(Date value1, Date value2) {
addCriterion("updated_at not between", value1, value2, "updatedAt");
return (Criteria) this;
}
public Criteria andRecStatusIsNull() {
addCriterion("rec_status is null");
return (Criteria) this;
}
public Criteria andRecStatusIsNotNull() {
addCriterion("rec_status is not null");
return (Criteria) this;
}
public Criteria andRecStatusEqualTo(Byte value) {
addCriterion("rec_status =", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusNotEqualTo(Byte value) {
addCriterion("rec_status <>", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusGreaterThan(Byte value) {
addCriterion("rec_status >", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) {
addCriterion("rec_status >=", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusLessThan(Byte value) {
addCriterion("rec_status <", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusLessThanOrEqualTo(Byte value) {
addCriterion("rec_status <=", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusIn(List<Byte> values) {
addCriterion("rec_status in", values, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusNotIn(List<Byte> values) {
addCriterion("rec_status not in", values, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusBetween(Byte value1, Byte value2) {
addCriterion("rec_status between", value1, value2, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusNotBetween(Byte value1, Byte value2) {
addCriterion("rec_status not between", value1, value2, "recStatus");
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria {
protected Criteria() {
super();
}
}
public static class Criterion {
private String condition;
private Object value;
private Object secondValue;
private boolean noValue;
private boolean singleValue;
private boolean betweenValue;
private boolean listValue;
private String typeHandler;
public String getCondition() {
return condition;
}
public Object getValue() {
return value;
}
public Object getSecondValue() {
return secondValue;
}
public boolean isNoValue() {
return noValue;
}
public boolean isSingleValue() {
return singleValue;
}
public boolean isBetweenValue() {
return betweenValue;
}
public boolean isListValue() {
return listValue;
}
public String getTypeHandler() {
return typeHandler;
}
protected Criterion(String condition) {
super();
this.condition = condition;
this.typeHandler = null;
this.noValue = true;
}
protected Criterion(String condition, Object value, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.typeHandler = typeHandler;
if (value instanceof List<?>) {
this.listValue = true;
} else {
this.singleValue = true;
}
}
protected Criterion(String condition, Object value) {
this(condition, value, null);
}
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.secondValue = secondValue;
this.typeHandler = typeHandler;
this.betweenValue = true;
}
protected Criterion(String condition, Object value, Object secondValue) {
this(condition, value, secondValue, null);
}
}
}

11
tall/src/main/java/com/ccsens/tall/bean/po/ProRole.java

@ -24,6 +24,8 @@ public class ProRole implements Serializable {
private Long relevanceProjectId;
private Byte show;
private static final long serialVersionUID = 1L;
public Long getId() {
@ -106,6 +108,14 @@ public class ProRole implements Serializable {
this.relevanceProjectId = relevanceProjectId;
}
public Byte getShow() {
return show;
}
public void setShow(Byte show) {
this.show = show;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
@ -122,6 +132,7 @@ public class ProRole implements Serializable {
sb.append(", updatedAt=").append(updatedAt);
sb.append(", recStatus=").append(recStatus);
sb.append(", relevanceProjectId=").append(relevanceProjectId);
sb.append(", show=").append(show);
sb.append("]");
return sb.toString();
}

60
tall/src/main/java/com/ccsens/tall/bean/po/ProRoleExample.java

@ -724,6 +724,66 @@ public class ProRoleExample {
addCriterion("relevance_project_id not between", value1, value2, "relevanceProjectId");
return (Criteria) this;
}
public Criteria andShowIsNull() {
addCriterion("show is null");
return (Criteria) this;
}
public Criteria andShowIsNotNull() {
addCriterion("show is not null");
return (Criteria) this;
}
public Criteria andShowEqualTo(Byte value) {
addCriterion("show =", value, "show");
return (Criteria) this;
}
public Criteria andShowNotEqualTo(Byte value) {
addCriterion("show <>", value, "show");
return (Criteria) this;
}
public Criteria andShowGreaterThan(Byte value) {
addCriterion("show >", value, "show");
return (Criteria) this;
}
public Criteria andShowGreaterThanOrEqualTo(Byte value) {
addCriterion("show >=", value, "show");
return (Criteria) this;
}
public Criteria andShowLessThan(Byte value) {
addCriterion("show <", value, "show");
return (Criteria) this;
}
public Criteria andShowLessThanOrEqualTo(Byte value) {
addCriterion("show <=", value, "show");
return (Criteria) this;
}
public Criteria andShowIn(List<Byte> values) {
addCriterion("show in", values, "show");
return (Criteria) this;
}
public Criteria andShowNotIn(List<Byte> values) {
addCriterion("show not in", values, "show");
return (Criteria) this;
}
public Criteria andShowBetween(Byte value1, Byte value2) {
addCriterion("show between", value1, value2, "show");
return (Criteria) this;
}
public Criteria andShowNotBetween(Byte value1, Byte value2) {
addCriterion("show not between", value1, value2, "show");
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria {

19
tall/src/main/java/com/ccsens/tall/bean/po/ProTaskInputRecord.java

@ -8,7 +8,7 @@ public class ProTaskInputRecord implements Serializable {
private Long inputDocId;
private Long fileId;
private String fileId;
private Long userId;
@ -20,6 +20,8 @@ public class ProTaskInputRecord implements Serializable {
private Byte recStatus;
private String remark;
private static final long serialVersionUID = 1L;
public Long getId() {
@ -38,12 +40,12 @@ public class ProTaskInputRecord implements Serializable {
this.inputDocId = inputDocId;
}
public Long getFileId() {
public String getFileId() {
return fileId;
}
public void setFileId(Long fileId) {
this.fileId = fileId;
public void setFileId(String fileId) {
this.fileId = fileId == null ? null : fileId.trim();
}
public Long getUserId() {
@ -86,6 +88,14 @@ public class ProTaskInputRecord implements Serializable {
this.recStatus = recStatus;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark == null ? null : remark.trim();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
@ -100,6 +110,7 @@ public class ProTaskInputRecord implements Serializable {
sb.append(", createdAt=").append(createdAt);
sb.append(", updatedAt=").append(updatedAt);
sb.append(", recStatus=").append(recStatus);
sb.append(", remark=").append(remark);
sb.append("]");
return sb.toString();
}

100
tall/src/main/java/com/ccsens/tall/bean/po/ProTaskInputRecordExample.java

@ -235,52 +235,62 @@ public class ProTaskInputRecordExample {
return (Criteria) this;
}
public Criteria andFileIdEqualTo(Long value) {
public Criteria andFileIdEqualTo(String value) {
addCriterion("file_id =", value, "fileId");
return (Criteria) this;
}
public Criteria andFileIdNotEqualTo(Long value) {
public Criteria andFileIdNotEqualTo(String value) {
addCriterion("file_id <>", value, "fileId");
return (Criteria) this;
}
public Criteria andFileIdGreaterThan(Long value) {
public Criteria andFileIdGreaterThan(String value) {
addCriterion("file_id >", value, "fileId");
return (Criteria) this;
}
public Criteria andFileIdGreaterThanOrEqualTo(Long value) {
public Criteria andFileIdGreaterThanOrEqualTo(String value) {
addCriterion("file_id >=", value, "fileId");
return (Criteria) this;
}
public Criteria andFileIdLessThan(Long value) {
public Criteria andFileIdLessThan(String value) {
addCriterion("file_id <", value, "fileId");
return (Criteria) this;
}
public Criteria andFileIdLessThanOrEqualTo(Long value) {
public Criteria andFileIdLessThanOrEqualTo(String value) {
addCriterion("file_id <=", value, "fileId");
return (Criteria) this;
}
public Criteria andFileIdIn(List<Long> values) {
public Criteria andFileIdLike(String value) {
addCriterion("file_id like", value, "fileId");
return (Criteria) this;
}
public Criteria andFileIdNotLike(String value) {
addCriterion("file_id not like", value, "fileId");
return (Criteria) this;
}
public Criteria andFileIdIn(List<String> values) {
addCriterion("file_id in", values, "fileId");
return (Criteria) this;
}
public Criteria andFileIdNotIn(List<Long> values) {
public Criteria andFileIdNotIn(List<String> values) {
addCriterion("file_id not in", values, "fileId");
return (Criteria) this;
}
public Criteria andFileIdBetween(Long value1, Long value2) {
public Criteria andFileIdBetween(String value1, String value2) {
addCriterion("file_id between", value1, value2, "fileId");
return (Criteria) this;
}
public Criteria andFileIdNotBetween(Long value1, Long value2) {
public Criteria andFileIdNotBetween(String value1, String value2) {
addCriterion("file_id not between", value1, value2, "fileId");
return (Criteria) this;
}
@ -584,6 +594,76 @@ public class ProTaskInputRecordExample {
addCriterion("rec_status not between", value1, value2, "recStatus");
return (Criteria) this;
}
public Criteria andRemarkIsNull() {
addCriterion("remark is null");
return (Criteria) this;
}
public Criteria andRemarkIsNotNull() {
addCriterion("remark is not null");
return (Criteria) this;
}
public Criteria andRemarkEqualTo(String value) {
addCriterion("remark =", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkNotEqualTo(String value) {
addCriterion("remark <>", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkGreaterThan(String value) {
addCriterion("remark >", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkGreaterThanOrEqualTo(String value) {
addCriterion("remark >=", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkLessThan(String value) {
addCriterion("remark <", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkLessThanOrEqualTo(String value) {
addCriterion("remark <=", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkLike(String value) {
addCriterion("remark like", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkNotLike(String value) {
addCriterion("remark not like", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkIn(List<String> values) {
addCriterion("remark in", values, "remark");
return (Criteria) this;
}
public Criteria andRemarkNotIn(List<String> values) {
addCriterion("remark not in", values, "remark");
return (Criteria) this;
}
public Criteria andRemarkBetween(String value1, String value2) {
addCriterion("remark between", value1, value2, "remark");
return (Criteria) this;
}
public Criteria andRemarkNotBetween(String value1, String value2) {
addCriterion("remark not between", value1, value2, "remark");
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria {

24
tall/src/main/java/com/ccsens/tall/bean/vo/InputDocVo.java

@ -1,9 +1,11 @@
package com.ccsens.tall.bean.vo;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.ArrayList;
import java.util.List;
/**
@ -23,19 +25,33 @@ public class InputDocVo {
private String docName;
@ApiModelProperty("是否上传 0否 1是")
private Byte isUpload;
List<File> files;
// @ApiModelProperty("文档中的文件id")
@ApiModelProperty("文档中的文件")
private List<Record> records = new ArrayList<>();
}
@Data
@ApiModel("文档下的文件")
@ApiModel("该记录中的文件")
public static class File{
@ApiModelProperty("上传记录id")
private Long recordId;
@ApiModelProperty("文件名称")
private String fileName;
@ApiModelProperty("文件访问路径")
private String fileUrl;
}
@Data
@ApiModel("该文档下的记录列表")
public static class Record{
//文件id集合
@JsonIgnore
private String fileIds;
@ApiModelProperty("上传记录id")
private Long recordId;
@ApiModelProperty("备注")
private String remark;
@ApiModelProperty("文件列表")
private List<File> fileList = new ArrayList<>();
}
@Data
@ApiModel("查看文档历史记录")
public static class HistoryRecord{

30
tall/src/main/java/com/ccsens/tall/persist/mapper/FileMapper.java

@ -0,0 +1,30 @@
package com.ccsens.tall.persist.mapper;
import com.ccsens.tall.bean.po.File;
import com.ccsens.tall.bean.po.FileExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface FileMapper {
long countByExample(FileExample example);
int deleteByExample(FileExample example);
int deleteByPrimaryKey(Long id);
int insert(File record);
int insertSelective(File record);
List<File> selectByExample(FileExample example);
File selectByPrimaryKey(Long id);
int updateByExampleSelective(@Param("record") File record, @Param("example") FileExample example);
int updateByExample(@Param("record") File record, @Param("example") FileExample example);
int updateByPrimaryKeySelective(File record);
int updateByPrimaryKey(File record);
}

7
tall/src/main/java/com/ccsens/tall/service/ExcelService.java

@ -152,6 +152,7 @@ public class ExcelService implements IExcelService {
throw new BaseException(CodeEnum.WSB_NOT_TASK_HEADER);
}
readProject(wbsSheet, projectInfoStart, projectInfoEnd, currentUserId, sysProject);
//读项目成员
readMember(wbsSheet, memberSheet, memberStart, memberEnd, sysProject, proRoles, proMembers);
readTask(xssfWorkbook, wbsSheet, taskStart, taskEnd, currentUserId, sysProject, taskDetails, proRoles, proMembers, hasGroupMap);
//读取插件表
@ -225,7 +226,7 @@ public class ExcelService implements IExcelService {
*/
private void readMember(XSSFSheet wbsSheet, XSSFSheet memberSheet, int memberStart, int memberEnd,
SysProject sysProject, List<ProRole> proRoles, List<ProMember> proMembers) throws Exception {
Integer seq=new Integer(0);
//添加奖惩干系人角色(一级角色)
ProRole stakeholderRole = new ProRole();
stakeholderRole.setName(WebConstant.ROLE_NAME.MoneyStakeholder.value);
@ -239,6 +240,7 @@ public class ExcelService implements IExcelService {
stakeholderProRole.setName(WebConstant.ROLE_NAME.MoneyStakeholder.phase);
stakeholderProRole.setDescription(WebConstant.ROLE_NAME.MoneyStakeholder.value);
stakeholderProRole.setParentId(stakeholderRole.getId());
stakeholderProRole.setSequence(seq++);
stakeholderProRole.setProjectId(sysProject.getId());
stakeholderProRole.setId(snowflake.nextId());
proRoleService.saveProRole(stakeholderProRole);
@ -257,6 +259,7 @@ public class ExcelService implements IExcelService {
creatorRole.setName(WebConstant.ROLE_NAME.Creator.phase);
creatorRole.setDescription(WebConstant.ROLE_NAME.Creator.value);
creatorRole.setParentId(creator.getId());
creatorRole.setSequence(seq++);
creatorRole.setProjectId(sysProject.getId());
creatorRole.setId(snowflake.nextId());
proRoleService.saveProRole(creatorRole);
@ -275,6 +278,7 @@ public class ExcelService implements IExcelService {
attentionRole.setName(WebConstant.ROLE_NAME.Attention.phase);
attentionRole.setDescription(WebConstant.ROLE_NAME.Attention.value);
attentionRole.setParentId(attention.getId());
attentionRole.setSequence(seq++);
attentionRole.setProjectId(sysProject.getId());
attentionRole.setId(snowflake.nextId());
proRoleService.saveProRole(attentionRole);
@ -351,6 +355,7 @@ public class ExcelService implements IExcelService {
ProRole proRole = new ProRole();
proRole.setName(secondRoleCell);
proRole.setParentId(firstRoleId);
proRole.setSequence(seq++);
proRole.setProjectId(sysProject.getId());
proRole.setId(snowflake.nextId());
//为虚拟项目角色添加关联的项目id

12
tall/src/main/java/com/ccsens/tall/service/IInputDocService.java

@ -71,4 +71,16 @@ public interface IInputDocService {
* @param param
*/
void delDoc(InputDocDto.DeleteDoc param);
/**
* 删除输入文档中的文件
* @param param
*/
void delDocOfFile(InputDocDto.DeleteDocOfFile param);
/**
* 修改上传文件的备注信息
* @param param
*/
void updateDocOfRemark(InputDocDto.UpdateDocOfRemark param);
}

11
tall/src/main/java/com/ccsens/tall/service/IProTaskDetailService.java

@ -55,4 +55,15 @@ public interface IProTaskDetailService {
* @return 返回所有任务
*/
List<TaskVo.TaskListByProjectId> queryAllTaskByProjectId(Long currentUserId, TaskDto.QueryAllTaskByProjectId projectId) throws Exception;
/**
* 新增和修改交付物的方法
* @param jiaoFuWu
*/
void addAndUpdateJiaoFuWu(TaskDto.JiaoFuWu jiaoFuWu);
/**
* 新增和修改交付物的方法
* @param jiaoFuWu
*/
void addAndUpdateShuWuWenDang(TaskDto.JiaoFuWu jiaoFuWu);
}

157
tall/src/main/java/com/ccsens/tall/service/InputDocService.java

@ -5,6 +5,8 @@ import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.lang.Snowflake;
import cn.hutool.core.util.ArrayUtil;
import cn.hutool.core.util.StrUtil;
import com.ccsens.tall.bean.dto.InputDocDto;
import com.ccsens.tall.bean.dto.LwbsDto;
@ -13,10 +15,7 @@ import com.ccsens.tall.bean.vo.InputDocVo;
import com.ccsens.tall.bean.vo.LwbsVo;
import com.ccsens.tall.bean.vo.TaskVo;
import com.ccsens.tall.persist.dao.IInputDocDao;
import com.ccsens.tall.persist.mapper.ProMemberMapper;
import com.ccsens.tall.persist.mapper.ProTaskInputDocMapper;
import com.ccsens.tall.persist.mapper.ProTaskInputRecordMapper;
import com.ccsens.tall.persist.mapper.SysProjectMapper;
import com.ccsens.tall.persist.mapper.*;
import com.ccsens.tall.util.TaskUtil;
@ -41,6 +40,9 @@ public class InputDocService implements IInputDocService {
private ProTaskInputDocMapper proTaskInputDocMapper;
@Resource
private Snowflake snowflake;
@Resource
private FileMapper fileMapper;
@Override
@ -160,8 +162,30 @@ public class InputDocService implements IInputDocService {
*/
@Override
public List<InputDocVo.DocOfTask> findDocByTask(InputDocDto.FindDocByTask param) {
List<InputDocVo.DocOfTask> docByTask = iInputDocDao.findDocByTask(param.getTaskId());
return docByTask;
List<InputDocVo.DocOfTask> docByTasks = iInputDocDao.findDocByTask(param.getTaskId());
for (InputDocVo.DocOfTask docs:docByTasks){
for (InputDocVo.Record record:docs.getRecords()){
if (record.getFileIds().contains(",")){
String[] split = record.getFileIds().split(",");
for (int i = 0; i < split.length; i++) {
File file = fileMapper.selectByPrimaryKey(Long.valueOf(split[i]));
InputDocVo.File nowFile = new InputDocVo.File();
nowFile.setFileName(file.getFileName());
nowFile.setFileUrl(file.getVisitLocation());
record.getFileList().add(nowFile);
}
}else{
if (StrUtil.isNotBlank(record.getFileIds())){
File file = fileMapper.selectByPrimaryKey(Long.valueOf(record.getFileIds()));
InputDocVo.File nowFile = new InputDocVo.File();
nowFile.setFileName(file.getFileName());
nowFile.setFileUrl(file.getVisitLocation());
record.getFileList().add(nowFile);
}
}
}
}
return docByTasks;
}
/**
@ -171,28 +195,56 @@ public class InputDocService implements IInputDocService {
@Override
public void uploadForDoc(InputDocDto.UploadForDoc param,Long userId) {
//将之前的文件设置为不使用
ProTaskInputRecordExample proTaskInputRecordExample = new ProTaskInputRecordExample();
proTaskInputRecordExample.createCriteria().andInputDocIdEqualTo(param.getDocId());
ProTaskInputRecord newProTaskInputRecord = new ProTaskInputRecord();
newProTaskInputRecord.setStatus((byte)0);
proTaskInputRecordMapper.updateByExampleSelective(newProTaskInputRecord,proTaskInputRecordExample);
// ProTaskInputRecordExample proTaskInputRecordExample = new ProTaskInputRecordExample();
// proTaskInputRecordExample.createCriteria().andInputDocIdEqualTo(param.getDocId());
// ProTaskInputRecord newProTaskInputRecord = new ProTaskInputRecord();
// newProTaskInputRecord.setStatus((byte)0);
// proTaskInputRecordMapper.updateByExampleSelective(newProTaskInputRecord,proTaskInputRecordExample);
if (ArrayUtil.isEmpty(param.getFileIds()) && StrUtil.isBlank(param.getRemark())){
throw new BaseException("请上传文件或填写备注信息");
}
//多文件添加
for (int i = 0; i < param.getFileIds().length; i++) {
if (!ArrayUtil.isEmpty(param.getFileIds())){
String fileIds = "";
for (int i = 0; i < param.getFileIds().length; i++) {
fileIds = fileIds + param.getFileIds()[i]+",";
}
fileIds = fileIds.substring(0,fileIds.length()-1);
ProTaskInputRecord proTaskInputRecord = new ProTaskInputRecord();
proTaskInputRecord.setFileId(fileIds);
proTaskInputRecord.setInputDocId(param.getDocId());
proTaskInputRecord.setFileId(param.getFileIds()[i]);
proTaskInputRecord.setStatus((byte)1);
proTaskInputRecord.setId(snowflake.nextId());
proTaskInputRecord.setUserId(userId);
proTaskInputRecord.setRemark(param.getRemark());
proTaskInputRecordMapper.insertSelective(proTaskInputRecord);
//通过输入文档id将输入文档表中的状态更改为已上传
ProTaskInputDoc proTaskInputDoc = new ProTaskInputDoc();
proTaskInputDoc.setId(param.getDocId());
proTaskInputDoc.setIsUpload(1);
proTaskInputDocMapper.updateByPrimaryKeySelective(proTaskInputDoc);
}
//通过输入文档id将输入文档表中的状态更改为已上传
ProTaskInputDoc proTaskInputDoc = new ProTaskInputDoc();
proTaskInputDoc.setId(param.getDocId());
proTaskInputDoc.setIsUpload(1);
proTaskInputDocMapper.updateByPrimaryKeySelective(proTaskInputDoc);
//如果备注信息不为空
if (!StrUtil.isBlank(param.getRemark())){
ProTaskInputRecord proTaskInputRecord = new ProTaskInputRecord();
proTaskInputRecord.setInputDocId(param.getDocId());
proTaskInputRecord.setStatus((byte)1);
proTaskInputRecord.setId(snowflake.nextId());
proTaskInputRecord.setUserId(userId);
proTaskInputRecord.setRemark(param.getRemark());
proTaskInputRecordMapper.insertSelective(proTaskInputRecord);
//通过输入文档id将输入文档表中的状态更改为已上传
ProTaskInputDoc proTaskInputDoc = new ProTaskInputDoc();
proTaskInputDoc.setId(param.getDocId());
proTaskInputDoc.setIsUpload(1);
proTaskInputDocMapper.updateByPrimaryKeySelective(proTaskInputDoc);
}
}
/**
@ -258,18 +310,18 @@ public class InputDocService implements IInputDocService {
}
//删除记录表中已上传的文档
if (1 == proTaskInputDoc.getIsUpload()){
ProTaskInputRecordExample proTaskInputRecordExample = new ProTaskInputRecordExample();
proTaskInputRecordExample.createCriteria().andInputDocIdEqualTo(param.getDocId());
List<ProTaskInputRecord> proTaskInputRecords = proTaskInputRecordMapper.selectByExample(proTaskInputRecordExample);
for (ProTaskInputRecord record:proTaskInputRecords){
ProTaskInputRecord inputRecord = new ProTaskInputRecord();
inputRecord.setId(record.getId());
inputRecord.setStatus((byte)0);
inputRecord.setRecStatus((byte)2);
proTaskInputRecordMapper.updateByPrimaryKeySelective(inputRecord);
}
}
// if (1 == proTaskInputDoc.getIsUpload()){
// ProTaskInputRecordExample proTaskInputRecordExample = new ProTaskInputRecordExample();
// proTaskInputRecordExample.createCriteria().andInputDocIdEqualTo(param.getDocId());
// List<ProTaskInputRecord> proTaskInputRecords = proTaskInputRecordMapper.selectByExample(proTaskInputRecordExample);
// for (ProTaskInputRecord record:proTaskInputRecords){
// ProTaskInputRecord inputRecord = new ProTaskInputRecord();
// inputRecord.setId(record.getId());
// inputRecord.setStatus((byte)0);
// inputRecord.setRecStatus((byte)2);
// proTaskInputRecordMapper.updateByPrimaryKeySelective(inputRecord);
// }
// }
//修改数据
ProTaskInputDoc newDoc = new ProTaskInputDoc();
@ -305,4 +357,47 @@ public class InputDocService implements IInputDocService {
proTaskInputDocMapper.updateByPrimaryKeySelective(proTaskInputDoc);
}
/**
* 删除输入文档中的文件
* @param param
*/
@Override
public void delDocOfFile(InputDocDto.DeleteDocOfFile param) {
//查看该输入文档下是否还有正在使用的文件
ProTaskInputRecord proTaskInputRecord = proTaskInputRecordMapper.selectByPrimaryKey(param.getRecordId());
//删除输入文档中的文件
ProTaskInputRecord record = new ProTaskInputRecord();
record.setId(param.getRecordId());
record.setRecStatus((byte)2);
proTaskInputRecordMapper.updateByPrimaryKeySelective(record);
ProTaskInputRecordExample proTaskInputRecordExample = new ProTaskInputRecordExample();
proTaskInputRecordExample.createCriteria().andRecStatusEqualTo((byte)1)
.andInputDocIdEqualTo(proTaskInputRecord.getInputDocId());
List<ProTaskInputRecord> proTaskInputRecords = proTaskInputRecordMapper.selectByExample(proTaskInputRecordExample);
//如果没有将输入文档状态改为未上传
if (CollectionUtil.isEmpty(proTaskInputRecords)){
ProTaskInputDoc proTaskInputDoc = new ProTaskInputDoc();
proTaskInputDoc.setId(proTaskInputRecord.getInputDocId());
proTaskInputDoc.setIsUpload(0);
proTaskInputDocMapper.updateByPrimaryKeySelective(proTaskInputDoc);
}
}
/**
* 修改上传文件的备注信息
* @param param
*/
@Override
public void updateDocOfRemark(InputDocDto.UpdateDocOfRemark param) {
ProTaskInputRecord record = new ProTaskInputRecord();
record.setId(param.getRecordId());
if (StrUtil.isNotBlank(param.getRemark())){
record.setRemark(param.getRemark());
}
proTaskInputRecordMapper.updateByPrimaryKeySelective(record);
}
}

73
tall/src/main/java/com/ccsens/tall/service/ProTaskDetailService.java

@ -17,6 +17,8 @@ import com.ccsens.tall.bean.vo.TaskVo;
import com.ccsens.tall.persist.dao.*;
import com.ccsens.tall.persist.dao.ProTaskShowDao;
import com.ccsens.tall.persist.mapper.ProPluginConfigMapper;
import com.ccsens.tall.persist.mapper.ProTaskDeliverMapper;
import com.ccsens.tall.persist.mapper.ProTaskInputDocMapper;
import com.ccsens.tall.util.TallConstant;
import com.ccsens.tall.util.TaskUtil;
import com.ccsens.util.CodeEnum;
@ -30,6 +32,7 @@ import com.fasterxml.jackson.annotation.JsonFormat;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
@ -89,6 +92,10 @@ public class ProTaskDetailService implements IProTaskDetailService {
private TaskPluginService taskPluginService;
@Resource
private ProShowDao proShowDao;
@Resource
private ProTaskDeliverMapper proTaskDeliverMapper;
@Resource
private ProTaskInputDocMapper proTaskInputDocMapper;
@Override
public void saveTaskDetail(ProTaskDetail taskDetail) {
@ -1410,6 +1417,27 @@ public class ProTaskDetailService implements IProTaskDetailService {
}
});
}
//修改输入文档信息
if (CollectionUtil.isNotEmpty(updateTaskInfo.getInputList())) {
updateTaskInfo.getInputList().forEach(taskDeliver -> {
if (StrUtil.isNotEmpty(taskDeliver.getDeliverName())) {
if (ObjectUtil.isNotNull(taskDeliver.getDeliverId())) {
ProTaskInputDoc deliver = proTaskInputDocMapper.selectByPrimaryKey(taskDeliver.getDeliverId());
if (ObjectUtil.isNotNull(deliver)) {
deliver.setName(taskDeliver.getDeliverName());
proTaskInputDocMapper.updateByPrimaryKeySelective(deliver);
}
} else {
ProTaskInputDoc deliver = new ProTaskInputDoc();
deliver.setId(snowflake.nextId());
deliver.setTaskDetailId(taskDetail.getId());
deliver.setName(taskDeliver.getDeliverName());
deliver.setIsUpload(0);
proTaskInputDocMapper.insertSelective(deliver);
}
}
});
}
//修改数据
taskDetailDao.updateByPrimaryKeySelective(taskDetail);
@ -1638,4 +1666,49 @@ public class ProTaskDetailService implements IProTaskDetailService {
}
return taskList;
}
/**
* 新增和修改交付物
* @param jiaoFuWu
*/
@Override
public void addAndUpdateJiaoFuWu(TaskDto.JiaoFuWu jiaoFuWu) {
ProTaskDeliverExample proTaskDeliverExample=new ProTaskDeliverExample();
ProTaskDeliver proTaskDeliver=new ProTaskDeliver();
if(jiaoFuWu.getId()!=null && StringUtils.isNotBlank(jiaoFuWu.getNames())){
//修改
proTaskDeliver.setId(jiaoFuWu.getId());
proTaskDeliver.setName(jiaoFuWu.getNames());
proTaskDeliverExample.createCriteria().andIdEqualTo(jiaoFuWu.getId()).andRecStatusEqualTo((byte) 0);
proTaskDeliverMapper.updateByExampleSelective(proTaskDeliver,proTaskDeliverExample);
}else if(jiaoFuWu.getId()==null && StringUtils.isNotBlank(jiaoFuWu.getNames())) {
//新增
proTaskDeliver.setId(snowflake.nextId());
proTaskDeliver.setName(jiaoFuWu.getNames());
proTaskDeliverMapper.insertSelective(proTaskDeliver);
}
}
/**
* 新增和修改输入文档
* @param jiaoFuWu
*/
@Override
public void addAndUpdateShuWuWenDang(TaskDto.JiaoFuWu jiaoFuWu) {
ProTaskInputDocExample proTaskDeliverExample=new ProTaskInputDocExample();
ProTaskInputDoc proTaskDeliver=new ProTaskInputDoc();
if(jiaoFuWu.getId()!=null && StringUtils.isNotBlank(jiaoFuWu.getNames())){
//修改
proTaskDeliver.setId(jiaoFuWu.getId());
proTaskDeliver.setName(jiaoFuWu.getNames());
proTaskDeliverExample.createCriteria().andIdEqualTo(jiaoFuWu.getId()).andRecStatusEqualTo((byte) 0);
proTaskInputDocMapper.updateByExampleSelective(proTaskDeliver,proTaskDeliverExample);
}else if(jiaoFuWu.getId()==null && StringUtils.isNotBlank(jiaoFuWu.getNames())) {
//新增
proTaskDeliver.setId(snowflake.nextId());
proTaskDeliver.setName(jiaoFuWu.getNames());
proTaskInputDocMapper.insertSelective(proTaskDeliver);
}
}
}

50
tall/src/main/java/com/ccsens/tall/service/TaskSubTimeService.java

@ -12,11 +12,9 @@ import com.ccsens.tall.bean.dto.message.SyncMessageWithStartDto;
import com.ccsens.tall.bean.po.*;
import com.ccsens.tall.bean.vo.TaskVo;
import com.ccsens.tall.persist.dao.*;
import com.ccsens.tall.persist.mapper.ProTaskInputDocMapper;
import com.ccsens.tall.util.TallConstant;
import com.ccsens.util.CodeEnum;
import com.ccsens.util.JacksonUtil;
import com.ccsens.util.TransactionUtil;
import com.ccsens.util.WebConstant;
import com.ccsens.util.*;
import com.ccsens.util.bean.message.common.InMessage;
import com.ccsens.util.bean.message.common.MessageConstant;
import com.ccsens.util.config.RabbitMQConfig;
@ -25,7 +23,9 @@ import com.ccsens.util.cron.NatureToDate;
import com.ccsens.util.exception.BaseException;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.sun.org.apache.bcel.internal.generic.IAND;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils;
import org.springframework.amqp.core.AmqpTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -83,6 +83,8 @@ public class TaskSubTimeService implements ITaskSubTimeService {
//定义事务对象
@Resource
private PlatformTransactionManager transactionManager;
@Resource
private ProTaskInputDocMapper proTaskInputDocMapper;
@Override
public void saveProTaskSubTask(ProTaskSubTime proTaskSubTime) {
@ -446,14 +448,40 @@ public class TaskSubTimeService implements ITaskSubTimeService {
}
}
//交付物
if (StrUtil.isNotEmpty(addTask.getTaskDeliver())) {
ProTaskDeliver deliver = new ProTaskDeliver();
deliver.setId(snowflake.nextId());
deliver.setTaskDetailId(detail.getId());
deliver.setName(addTask.getTaskDeliver());
deliver.setIsInput(0);
taskDeliverDao.insertSelective(deliver);
// if (StrUtil.isNotEmpty(addTask.getTaskDeliver())) {
// ProTaskDeliver deliver = new ProTaskDeliver();
// deliver.setId(snowflake.nextId());
// deliver.setTaskDetailId(detail.getId());
// deliver.setName(addTask.getTaskDeliver());
// deliver.setIsInput(0);
// taskDeliverDao.insertSelective(deliver);
// }
//交付物列表的增加
if(addTask.getTaskDeliver().size()>0){
addTask.getTaskDeliver().forEach(action->{
if(StringUtils.isNotBlank(action)) {
ProTaskDeliver deliver = new ProTaskDeliver();
deliver.setId(snowflake.nextId());
deliver.setTaskDetailId(detail.getId());
deliver.setName(action);
deliver.setIsInput(0);
taskDeliverDao.insertSelective(deliver);
}
});
}
//输入文档的增加
if(addTask.getInputDoc().size()>0){
addTask.getInputDoc().forEach(action->{
if(StringUtils.isNotBlank(action)) {
ProTaskInputDoc proTaskInputDoc = new ProTaskInputDoc();
proTaskInputDoc.setId(snowflake.nextId());
proTaskInputDoc.setName(action);
proTaskInputDoc.setTaskDetailId(detail.getId());
proTaskInputDocMapper.insertSelective(proTaskInputDoc);
}
});
}
//插件
if (CollectionUtil.isNotEmpty(addTask.getPluginList())) {
for (Long pluginId : addTask.getPluginList()) {

20
tall/src/main/java/com/ccsens/tall/web/InputDocController.java

@ -102,4 +102,24 @@ public class InputDocController {
return JsonResponse.newInstance().ok();
}
@MustLogin
@ApiOperation(value = "删除输入文档中的文件", notes = "1007:删除输入文档中的文件")
@RequestMapping(value = "/delDocOfFile", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse delDocOfFile(@ApiParam @Validated @RequestBody QueryDto<InputDocDto.DeleteDocOfFile> params) {
log.info("删除输入文档中的文件:{}",params);
iInputDocService.delDocOfFile(params.getParam());
log.info("删除输入文档中的文件");
return JsonResponse.newInstance().ok();
}
@MustLogin
@ApiOperation(value = "修改上传文件的备注信息", notes = "1007:修改上传文件的备注信息")
@RequestMapping(value = "/updateDocOfRemark", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse updateDocOfRemark(@ApiParam @Validated @RequestBody QueryDto<InputDocDto.UpdateDocOfRemark> params) {
log.info("修改上传文件的备注信息:{}",params);
iInputDocService.updateDocOfRemark(params.getParam());
log.info("修改上传文件的备注信息");
return JsonResponse.newInstance().ok();
}
}

53
tall/src/main/resources/mapper_dao/IInputDocDao.xml

@ -22,16 +22,7 @@
<result property="hasGroup" column="has_group"/>
</collection>
</resultMap>
<resultMap id="DocAndFile" type="com.ccsens.tall.bean.vo.InputDocVo$DocOfTask">
<id property="docId" column="docId" />
<id property="docName" column="docName"/>
<result property="isUpload" column="isUpload"/>
<collection property="files" ofType="com.ccsens.tall.bean.vo.InputDocVo$File">
<id column="recordId" property="recordId" />
<result column="fileName" property="fileName"/>
<result column="fileUrl" property="fileUrl"/>
</collection>
</resultMap>
<select id="selectByCompany" resultMap="ass">
SELECT
tsp.id AS pId,
@ -127,25 +118,53 @@
and tptd.parent_id=#{taskId}
AND tptst.begin_time &lt;= #{param.endTime} AND tptst.end_time &gt;= #{param.startTime}
</select>
<!-- <select id="findDocByTask" resultMap="DocAndFile">-->
<!-- SELECT-->
<!-- tid.id AS docId,-->
<!-- tid.name AS docName,-->
<!-- tid.is_upload AS isUpload,-->
<!-- tir.id AS recordId,-->
<!-- tf.file_name AS fileName,-->
<!-- tf.visit_location AS fileUrl-->
<!-- FROM-->
<!-- t_pro_task_input_doc AS tid-->
<!-- LEFT JOIN t_pro_task_input_record AS tir ON tid.id = tir.input_doc_id-->
<!-- LEFT JOIN t_file AS tf ON tir.file_id = tf.id-->
<!-- WHERE-->
<!-- tid.task_detail_id = #{taskId}-->
<!-- AND tid.is_upload = 1-->
<!-- AND tid.rec_status = 0-->
<!-- AND tir.rec_status = 0-->
<!-- AND tf.rec_status = 0-->
<!-- </select>-->
<resultMap id="DocAndFile" type="com.ccsens.tall.bean.vo.InputDocVo$DocOfTask">
<id property="docId" column="docId" />
<id property="docName" column="docName"/>
<result property="isUpload" column="isUpload"/>
<collection property="records" ofType="com.ccsens.tall.bean.vo.InputDocVo$Record">
<id column="recordId" property="recordId" />
<result column="fileIds" property="fileIds"/>
<result column="remark" property="remark"/>
</collection>
</resultMap>
<select id="findDocByTask" resultMap="DocAndFile">
SELECT
tid.id AS docId,
tid.name AS docName,
tid.id AS docId,
tid. NAME AS docName,
tid.is_upload AS isUpload,
tir.id AS recordId,
tf.file_name AS fileName,
tf.visit_location AS fileUrl
tir.file_id AS fileIds,
tir.remark AS remark
FROM
t_pro_task_input_doc AS tid
LEFT JOIN t_pro_task_input_record AS tir ON tid.id = tir.input_doc_id
LEFT JOIN t_file AS tf ON tir.file_id = tf.id
WHERE
tid.task_detail_id = #{taskId}
AND tid.is_upload = 1
AND tid.rec_status = 0
AND tir.rec_status = 0
AND tf.rec_status = 0
</select>
<select id="viewDocHistory" resultType="com.ccsens.tall.bean.vo.InputDocVo$HistoryRecord">

258
tall/src/main/resources/mapper_raw/FileMapper.xml

@ -0,0 +1,258 @@
<?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.ccsens.tall.persist.mapper.FileMapper">
<resultMap id="BaseResultMap" type="com.ccsens.tall.bean.po.File">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="user_id" jdbcType="BIGINT" property="userId" />
<result column="file_name" jdbcType="VARCHAR" property="fileName" />
<result column="location" jdbcType="VARCHAR" property="location" />
<result column="visit_location" jdbcType="VARCHAR" property="visitLocation" />
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" />
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" />
<result column="rec_status" jdbcType="TINYINT" property="recStatus" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
id, user_id, file_name, location, visit_location, created_at, updated_at, rec_status
</sql>
<select id="selectByExample" parameterType="com.ccsens.tall.bean.po.FileExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from t_file
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from t_file
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from t_file
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.ccsens.tall.bean.po.FileExample">
delete from t_file
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.ccsens.tall.bean.po.File">
insert into t_file (id, user_id, file_name,
location, visit_location, created_at,
updated_at, rec_status)
values (#{id,jdbcType=BIGINT}, #{userId,jdbcType=BIGINT}, #{fileName,jdbcType=VARCHAR},
#{location,jdbcType=VARCHAR}, #{visitLocation,jdbcType=VARCHAR}, #{createdAt,jdbcType=TIMESTAMP},
#{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT})
</insert>
<insert id="insertSelective" parameterType="com.ccsens.tall.bean.po.File">
insert into t_file
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="userId != null">
user_id,
</if>
<if test="fileName != null">
file_name,
</if>
<if test="location != null">
location,
</if>
<if test="visitLocation != null">
visit_location,
</if>
<if test="createdAt != null">
created_at,
</if>
<if test="updatedAt != null">
updated_at,
</if>
<if test="recStatus != null">
rec_status,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="userId != null">
#{userId,jdbcType=BIGINT},
</if>
<if test="fileName != null">
#{fileName,jdbcType=VARCHAR},
</if>
<if test="location != null">
#{location,jdbcType=VARCHAR},
</if>
<if test="visitLocation != null">
#{visitLocation,jdbcType=VARCHAR},
</if>
<if test="createdAt != null">
#{createdAt,jdbcType=TIMESTAMP},
</if>
<if test="updatedAt != null">
#{updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="recStatus != null">
#{recStatus,jdbcType=TINYINT},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.ccsens.tall.bean.po.FileExample" resultType="java.lang.Long">
select count(*) from t_file
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update t_file
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.userId != null">
user_id = #{record.userId,jdbcType=BIGINT},
</if>
<if test="record.fileName != null">
file_name = #{record.fileName,jdbcType=VARCHAR},
</if>
<if test="record.location != null">
location = #{record.location,jdbcType=VARCHAR},
</if>
<if test="record.visitLocation != null">
visit_location = #{record.visitLocation,jdbcType=VARCHAR},
</if>
<if test="record.createdAt != null">
created_at = #{record.createdAt,jdbcType=TIMESTAMP},
</if>
<if test="record.updatedAt != null">
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="record.recStatus != null">
rec_status = #{record.recStatus,jdbcType=TINYINT},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update t_file
set id = #{record.id,jdbcType=BIGINT},
user_id = #{record.userId,jdbcType=BIGINT},
file_name = #{record.fileName,jdbcType=VARCHAR},
location = #{record.location,jdbcType=VARCHAR},
visit_location = #{record.visitLocation,jdbcType=VARCHAR},
created_at = #{record.createdAt,jdbcType=TIMESTAMP},
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP},
rec_status = #{record.recStatus,jdbcType=TINYINT}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.ccsens.tall.bean.po.File">
update t_file
<set>
<if test="userId != null">
user_id = #{userId,jdbcType=BIGINT},
</if>
<if test="fileName != null">
file_name = #{fileName,jdbcType=VARCHAR},
</if>
<if test="location != null">
location = #{location,jdbcType=VARCHAR},
</if>
<if test="visitLocation != null">
visit_location = #{visitLocation,jdbcType=VARCHAR},
</if>
<if test="createdAt != null">
created_at = #{createdAt,jdbcType=TIMESTAMP},
</if>
<if test="updatedAt != null">
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="recStatus != null">
rec_status = #{recStatus,jdbcType=TINYINT},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.ccsens.tall.bean.po.File">
update t_file
set user_id = #{userId,jdbcType=BIGINT},
file_name = #{fileName,jdbcType=VARCHAR},
location = #{location,jdbcType=VARCHAR},
visit_location = #{visitLocation,jdbcType=VARCHAR},
created_at = #{createdAt,jdbcType=TIMESTAMP},
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
rec_status = #{recStatus,jdbcType=TINYINT}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>

25
tall/src/main/resources/mapper_raw/ProRoleMapper.xml

@ -12,6 +12,7 @@
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" />
<result column="rec_status" jdbcType="TINYINT" property="recStatus" />
<result column="relevance_project_id" jdbcType="BIGINT" property="relevanceProjectId" />
<result column="show" jdbcType="TINYINT" property="show" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
@ -73,7 +74,7 @@
</sql>
<sql id="Base_Column_List">
id, project_id, parent_id, name, description, sequence, created_at, updated_at, rec_status,
relevance_project_id
relevance_project_id, show
</sql>
<select id="selectByExample" parameterType="com.ccsens.tall.bean.po.ProRoleExample" resultMap="BaseResultMap">
select
@ -109,11 +110,11 @@
insert into t_pro_role (id, project_id, parent_id,
name, description, sequence,
created_at, updated_at, rec_status,
relevance_project_id)
relevance_project_id, show)
values (#{id,jdbcType=BIGINT}, #{projectId,jdbcType=BIGINT}, #{parentId,jdbcType=BIGINT},
#{name,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, #{sequence,jdbcType=INTEGER},
#{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT},
#{relevanceProjectId,jdbcType=BIGINT})
#{relevanceProjectId,jdbcType=BIGINT}, #{show,jdbcType=TINYINT})
</insert>
<insert id="insertSelective" parameterType="com.ccsens.tall.bean.po.ProRole">
insert into t_pro_role
@ -148,6 +149,9 @@
<if test="relevanceProjectId != null">
relevance_project_id,
</if>
<if test="show != null">
show,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
@ -180,6 +184,9 @@
<if test="relevanceProjectId != null">
#{relevanceProjectId,jdbcType=BIGINT},
</if>
<if test="show != null">
#{show,jdbcType=TINYINT},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.ccsens.tall.bean.po.ProRoleExample" resultType="java.lang.Long">
@ -221,6 +228,9 @@
<if test="record.relevanceProjectId != null">
relevance_project_id = #{record.relevanceProjectId,jdbcType=BIGINT},
</if>
<if test="record.show != null">
show = #{record.show,jdbcType=TINYINT},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
@ -237,7 +247,8 @@
created_at = #{record.createdAt,jdbcType=TIMESTAMP},
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP},
rec_status = #{record.recStatus,jdbcType=TINYINT},
relevance_project_id = #{record.relevanceProjectId,jdbcType=BIGINT}
relevance_project_id = #{record.relevanceProjectId,jdbcType=BIGINT},
show = #{record.show,jdbcType=TINYINT}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
@ -272,6 +283,9 @@
<if test="relevanceProjectId != null">
relevance_project_id = #{relevanceProjectId,jdbcType=BIGINT},
</if>
<if test="show != null">
show = #{show,jdbcType=TINYINT},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
@ -285,7 +299,8 @@
created_at = #{createdAt,jdbcType=TIMESTAMP},
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
rec_status = #{recStatus,jdbcType=TINYINT},
relevance_project_id = #{relevanceProjectId,jdbcType=BIGINT}
relevance_project_id = #{relevanceProjectId,jdbcType=BIGINT},
show = #{show,jdbcType=TINYINT}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>

41
tall/src/main/resources/mapper_raw/ProTaskInputRecordMapper.xml

@ -4,12 +4,13 @@
<resultMap id="BaseResultMap" type="com.ccsens.tall.bean.po.ProTaskInputRecord">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="input_doc_id" jdbcType="BIGINT" property="inputDocId" />
<result column="file_id" jdbcType="BIGINT" property="fileId" />
<result column="file_id" jdbcType="VARCHAR" property="fileId" />
<result column="user_id" jdbcType="BIGINT" property="userId" />
<result column="status" jdbcType="TINYINT" property="status" />
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" />
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" />
<result column="rec_status" jdbcType="TINYINT" property="recStatus" />
<result column="remark" jdbcType="VARCHAR" property="remark" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
@ -70,7 +71,7 @@
</where>
</sql>
<sql id="Base_Column_List">
id, input_doc_id, file_id, user_id, status, created_at, updated_at, rec_status
id, input_doc_id, file_id, user_id, status, created_at, updated_at, rec_status, remark
</sql>
<select id="selectByExample" parameterType="com.ccsens.tall.bean.po.ProTaskInputRecordExample" resultMap="BaseResultMap">
select
@ -105,10 +106,12 @@
<insert id="insert" parameterType="com.ccsens.tall.bean.po.ProTaskInputRecord">
insert into t_pro_task_input_record (id, input_doc_id, file_id,
user_id, status, created_at,
updated_at, rec_status)
values (#{id,jdbcType=BIGINT}, #{inputDocId,jdbcType=BIGINT}, #{fileId,jdbcType=BIGINT},
updated_at, rec_status, remark
)
values (#{id,jdbcType=BIGINT}, #{inputDocId,jdbcType=BIGINT}, #{fileId,jdbcType=VARCHAR},
#{userId,jdbcType=BIGINT}, #{status,jdbcType=TINYINT}, #{createdAt,jdbcType=TIMESTAMP},
#{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT})
#{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT}, #{remark,jdbcType=VARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="com.ccsens.tall.bean.po.ProTaskInputRecord">
insert into t_pro_task_input_record
@ -137,6 +140,9 @@
<if test="recStatus != null">
rec_status,
</if>
<if test="remark != null">
remark,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
@ -146,7 +152,7 @@
#{inputDocId,jdbcType=BIGINT},
</if>
<if test="fileId != null">
#{fileId,jdbcType=BIGINT},
#{fileId,jdbcType=VARCHAR},
</if>
<if test="userId != null">
#{userId,jdbcType=BIGINT},
@ -163,6 +169,9 @@
<if test="recStatus != null">
#{recStatus,jdbcType=TINYINT},
</if>
<if test="remark != null">
#{remark,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.ccsens.tall.bean.po.ProTaskInputRecordExample" resultType="java.lang.Long">
@ -181,7 +190,7 @@
input_doc_id = #{record.inputDocId,jdbcType=BIGINT},
</if>
<if test="record.fileId != null">
file_id = #{record.fileId,jdbcType=BIGINT},
file_id = #{record.fileId,jdbcType=VARCHAR},
</if>
<if test="record.userId != null">
user_id = #{record.userId,jdbcType=BIGINT},
@ -198,6 +207,9 @@
<if test="record.recStatus != null">
rec_status = #{record.recStatus,jdbcType=TINYINT},
</if>
<if test="record.remark != null">
remark = #{record.remark,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
@ -207,12 +219,13 @@
update t_pro_task_input_record
set id = #{record.id,jdbcType=BIGINT},
input_doc_id = #{record.inputDocId,jdbcType=BIGINT},
file_id = #{record.fileId,jdbcType=BIGINT},
file_id = #{record.fileId,jdbcType=VARCHAR},
user_id = #{record.userId,jdbcType=BIGINT},
status = #{record.status,jdbcType=TINYINT},
created_at = #{record.createdAt,jdbcType=TIMESTAMP},
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP},
rec_status = #{record.recStatus,jdbcType=TINYINT}
rec_status = #{record.recStatus,jdbcType=TINYINT},
remark = #{record.remark,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
@ -224,7 +237,7 @@
input_doc_id = #{inputDocId,jdbcType=BIGINT},
</if>
<if test="fileId != null">
file_id = #{fileId,jdbcType=BIGINT},
file_id = #{fileId,jdbcType=VARCHAR},
</if>
<if test="userId != null">
user_id = #{userId,jdbcType=BIGINT},
@ -241,18 +254,22 @@
<if test="recStatus != null">
rec_status = #{recStatus,jdbcType=TINYINT},
</if>
<if test="remark != null">
remark = #{remark,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.ccsens.tall.bean.po.ProTaskInputRecord">
update t_pro_task_input_record
set input_doc_id = #{inputDocId,jdbcType=BIGINT},
file_id = #{fileId,jdbcType=BIGINT},
file_id = #{fileId,jdbcType=VARCHAR},
user_id = #{userId,jdbcType=BIGINT},
status = #{status,jdbcType=TINYINT},
created_at = #{createdAt,jdbcType=TIMESTAMP},
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
rec_status = #{recStatus,jdbcType=TINYINT}
rec_status = #{recStatus,jdbcType=TINYINT},
remark = #{remark,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>
Loading…
Cancel
Save