|
@@ -6,7 +6,10 @@ import lombok.Data;
|
|
|
import lombok.NoArgsConstructor;
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
|
|
|
+import java.sql.Date;
|
|
|
import java.sql.Timestamp;
|
|
|
+import java.util.HashMap;
|
|
|
+import java.util.Map;
|
|
|
|
|
|
/**
|
|
|
* @Author: xuexb
|
|
@@ -15,26 +18,62 @@ import java.sql.Timestamp;
|
|
|
@Data
|
|
|
public class CrowdProjectVO {
|
|
|
|
|
|
- private Long id;
|
|
|
+ private String id;
|
|
|
private String name;
|
|
|
- private Long userId;
|
|
|
- private Long regionalManagerId;
|
|
|
- private Long projectDistributionTypeId;
|
|
|
- private String description;
|
|
|
- private String projectFile;
|
|
|
- private String requirementFile;
|
|
|
- private Double quotedPrice;
|
|
|
- private Double fixedPrice;
|
|
|
- private String status;
|
|
|
- private Timestamp createTime;
|
|
|
+ private String contactName;
|
|
|
+ private String contactPhone;
|
|
|
+ private String type;
|
|
|
+ private String platform;
|
|
|
+ private String desc;
|
|
|
+ private String doc;
|
|
|
+ private String file;
|
|
|
+ private Long resource;
|
|
|
+ private Map<String, String> location;
|
|
|
+ private Long institution;
|
|
|
+ private Timestamp datetime;
|
|
|
+ private Double price;
|
|
|
+ private Double budget;
|
|
|
+ private String usage;
|
|
|
|
|
|
public CrowdProjectVO(CrowdTestProject project){
|
|
|
- BeanUtils.copyProperties(project, this);
|
|
|
+ this.id = project.getCode();
|
|
|
+ this.name = project.getName();
|
|
|
+ this.contactName = project.getLinkMan();
|
|
|
+ this.contactPhone = project.getLinkManMobile();
|
|
|
+ this.type = project.getType();
|
|
|
+ this.platform = project.getPlatform();
|
|
|
+ this.desc = project.getDescription();
|
|
|
+ this.doc = project.getRequirementFile();
|
|
|
+ this.file = project.getProjectFile();
|
|
|
+ this.resource = project.getProjectDistributionTypeId();
|
|
|
+ this.location = new HashMap<>();
|
|
|
+ this.location.put("provinceCode", project.getDistributionProvince());
|
|
|
+ this.location.put("cityCode", project.getDistributionCity());
|
|
|
+ this.institution = project.getRegionalManagerId();
|
|
|
+ this.datetime = project.getDeadTime();
|
|
|
+ this.budget = project.getQuotedPrice();
|
|
|
+ this.price = project.getFixedPrice();
|
|
|
+ this.usage = null;
|
|
|
}
|
|
|
|
|
|
public CrowdTestProject toCrowdTestProject(){
|
|
|
CrowdTestProject crowdTestProject = new CrowdTestProject();
|
|
|
- BeanUtils.copyProperties(this, crowdTestProject);
|
|
|
+ crowdTestProject.setCode(this.id);
|
|
|
+ crowdTestProject.setName(this.name);
|
|
|
+ crowdTestProject.setLinkMan(this.contactName);
|
|
|
+ crowdTestProject.setLinkManMobile(this.contactPhone);
|
|
|
+ crowdTestProject.setType(this.type);
|
|
|
+ crowdTestProject.setPlatform(this.platform);
|
|
|
+ crowdTestProject.setDescription(this.desc);
|
|
|
+ crowdTestProject.setRequirementFile(this.doc);
|
|
|
+ crowdTestProject.setProjectFile(this.file);
|
|
|
+ crowdTestProject.setProjectDistributionTypeId(this.resource);
|
|
|
+ crowdTestProject.setDistributionProvince(this.location.get("provinceCode"));
|
|
|
+ crowdTestProject.setDistributionCity(this.location.get("cityCode"));
|
|
|
+ crowdTestProject.setRegionalManagerId(this.getInstitution());
|
|
|
+ crowdTestProject.setDeadTime(this.datetime);
|
|
|
+ crowdTestProject.setQuotedPrice(this.budget);
|
|
|
+ crowdTestProject.setFixedPrice(this.price);
|
|
|
return crowdTestProject;
|
|
|
}
|
|
|
}
|