|
@@ -10,10 +10,13 @@ import com.qmth.sop.common.enums.QualityProblemReasonEnum;
|
|
|
import com.qmth.sop.common.enums.QualityProblemTypeEnum;
|
|
|
import io.swagger.annotations.ApiModel;
|
|
|
import io.swagger.annotations.ApiModelProperty;
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
|
+import org.springframework.util.CollectionUtils;
|
|
|
|
|
|
import javax.validation.constraints.NotBlank;
|
|
|
import javax.validation.constraints.NotNull;
|
|
|
import java.io.Serializable;
|
|
|
+import java.util.List;
|
|
|
|
|
|
/**
|
|
|
* <p>
|
|
@@ -56,6 +59,11 @@ public class TBQualityProblemApply extends BaseEntity implements Serializable {
|
|
|
@JsonSerialize(using = ToStringSerializer.class)
|
|
|
private String userIds;
|
|
|
|
|
|
+ @ApiModelProperty(value = "责任人id数组")
|
|
|
+ @TableField(exist = false)
|
|
|
+ @JsonSerialize(using = ToStringSerializer.class)
|
|
|
+ private List<Long> userIdList;
|
|
|
+
|
|
|
@ApiModelProperty(value = "问题类型,UPDATE:修正类,OPTIMIZE:优化类,NO_PROBLEM:不是问题")
|
|
|
private QualityProblemTypeEnum type;
|
|
|
|
|
@@ -66,6 +74,11 @@ public class TBQualityProblemApply extends BaseEntity implements Serializable {
|
|
|
@JsonSerialize(using = ToStringSerializer.class)
|
|
|
private String attachmentIds;
|
|
|
|
|
|
+ @ApiModelProperty(value = "附件id")
|
|
|
+ @TableField(exist = false)
|
|
|
+ @JsonSerialize(using = ToStringSerializer.class)
|
|
|
+ private List<Long> attachmentIdList;
|
|
|
+
|
|
|
@ApiModelProperty(value = "影响度:A,B,C,D")
|
|
|
@TableField("Influence_degree")
|
|
|
private InfluenceDegreeEnum influenceDegree;
|
|
@@ -94,11 +107,29 @@ public class TBQualityProblemApply extends BaseEntity implements Serializable {
|
|
|
this.attachmentIds = attachmentIds;
|
|
|
}
|
|
|
|
|
|
- public void setCode(String problemNo, Long userId) {
|
|
|
+ public void setCode(String problemNo, List<Long> attachmentIdList, List<Long> userIdList, Long userId) {
|
|
|
this.problemNo = problemNo;
|
|
|
setId(SystemConstant.getDbUuid());
|
|
|
setCreateId(userId);
|
|
|
setCreateTime(System.currentTimeMillis());
|
|
|
+ this.attachmentIds = !CollectionUtils.isEmpty(attachmentIdList) ? StringUtils.join(attachmentIdList, SystemConstant.LIST_JOIN_SPLIT) : null;
|
|
|
+ this.userIds = !CollectionUtils.isEmpty(userIdList) ? StringUtils.join(userIdList, SystemConstant.LIST_JOIN_SPLIT) : null;
|
|
|
+ }
|
|
|
+
|
|
|
+ public List<Long> getUserIdList() {
|
|
|
+ return userIdList;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setUserIdList(List<Long> userIdList) {
|
|
|
+ this.userIdList = userIdList;
|
|
|
+ }
|
|
|
+
|
|
|
+ public List<Long> getAttachmentIdList() {
|
|
|
+ return attachmentIdList;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setAttachmentIdList(List<Long> attachmentIdList) {
|
|
|
+ this.attachmentIdList = attachmentIdList;
|
|
|
}
|
|
|
|
|
|
public String getFormProperties() {
|