Kaynağa Gözat

企业信息保存完善。

tomatozq 5 yıl önce
ebeveyn
işleme
1f7904ba0c

+ 7 - 372
picc-common/src/main/java/com/jpsoft/picc/modules/base/entity/Company.java

@@ -4,6 +4,8 @@ import java.io.Serializable;
 import java.util.Date;
 import java.text.SimpleDateFormat;
 import java.math.BigDecimal;
+
+import lombok.Data;
 import org.springframework.format.annotation.DateTimeFormat;
 import com.fasterxml.jackson.annotation.JsonFormat;
 import io.swagger.annotations.ApiModelProperty;
@@ -12,6 +14,7 @@ import io.swagger.annotations.ApiModel;
 /**
   描述:base_company的实体类
  */
+@Data
 @ApiModel(value = "base_company的实体类")
 public class Company {
     @ApiModelProperty(value = "ID")
@@ -62,384 +65,16 @@ public class Company {
 	private String status;
     @ApiModelProperty(value = "创建人")
 	private String createBy;
+	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
+	@JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone ="GMT+8")
     @ApiModelProperty(value = "创建时间")
 	private Date createTime;
     @ApiModelProperty(value = "更新人")
 	private String updateBy;
+	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
+	@JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone ="GMT+8")
     @ApiModelProperty(value = "更新时间")
 	private Date updateTime;
     @ApiModelProperty(value = "是否删除")
 	private Boolean delFlag;
-
-	/**
-	 *获取ID
-	 */
-    	public String getId(){
-		return id;
-	}
-	
-	/**
-	 *设置ID
-	 */
-	public void setId(String id){
-		this.id = id;
-	}
-	/**
-	 *获取企业名称
-	 */
-	@ApiModelProperty(value = "企业名称")
-    	public String getName(){
-		return name;
-	}
-	
-	/**
-	 *设置企业名称
-	 */
-	public void setName(String name){
-		this.name = name;
-	}
-	/**
-	 *获取法人代表
-	 */
-    	public String getLegalName(){
-		return legalName;
-	}
-	
-	/**
-	 *设置法人代表
-	 */
-	public void setLegalName(String legalName){
-		this.legalName = legalName;
-	}
-	/**
-	 *获取法人代表身份证
-	 */
-    	public String getLegalCard(){
-		return legalCard;
-	}
-	
-	/**
-	 *设置法人代表身份证
-	 */
-	public void setLegalCard(String legalCard){
-		this.legalCard = legalCard;
-	}
-	/**
-	 *获取法人代表身份证附件
-	 */
-    	public String getLegalCardFile(){
-		return legalCardFile;
-	}
-	
-	/**
-	 *设置法人代表身份证附件
-	 */
-	public void setLegalCardFile(String legalCardFile){
-		this.legalCardFile = legalCardFile;
-	}
-	/**
-	 *获取证件编号
-	 */
-    	public String getUsccCode(){
-		return usccCode;
-	}
-	
-	/**
-	 *设置证件编号
-	 */
-	public void setUsccCode(String usccCode){
-		this.usccCode = usccCode;
-	}
-	/**
-	 *获取证件附件(营业执照/企业代码)
-	 */
-    	public String getUsccFiles(){
-		return usccFiles;
-	}
-	
-	/**
-	 *设置证件附件(营业执照/企业代码)
-	 */
-	public void setUsccFiles(String usccFiles){
-		this.usccFiles = usccFiles;
-	}
-	/**
-	 *获取企业类型
-	 */
-    	public String getType(){
-		return type;
-	}
-	
-	/**
-	 *设置企业类型
-	 */
-	public void setType(String type){
-		this.type = type;
-	}
-	/**
-	 *获取营业性质
-	 */
-    	public String getBusinessNature(){
-		return businessNature;
-	}
-	
-	/**
-	 *设置营业性质
-	 */
-	public void setBusinessNature(String businessNature){
-		this.businessNature = businessNature;
-	}
-	/**
-	 *获取营业范围
-	 */
-    	public String getBusinessScope(){
-		return businessScope;
-	}
-	
-	/**
-	 *设置营业范围
-	 */
-	public void setBusinessScope(String businessScope){
-		this.businessScope = businessScope;
-	}
-	/**
-	 *获取行业类型
-	 */
-    	public String getIndustryType(){
-		return industryType;
-	}
-	
-	/**
-	 *设置行业类型
-	 */
-	public void setIndustryType(String industryType){
-		this.industryType = industryType;
-	}
-	/**
-	 *获取雇员人数
-	 */
-    	public Integer getEmployeesNumber(){
-		return employeesNumber;
-	}
-	
-	/**
-	 *设置雇员人数
-	 */
-	public void setEmployeesNumber(Integer employeesNumber){
-		this.employeesNumber = employeesNumber;
-	}
-	/**
-	 *获取已投保人数
-	 */
-    	public Integer getInsuredNumber(){
-		return insuredNumber;
-	}
-	
-	/**
-	 *设置已投保人数
-	 */
-	public void setInsuredNumber(Integer insuredNumber){
-		this.insuredNumber = insuredNumber;
-	}
-	/**
-	 *获取联系人
-	 */
-    	public String getPerson(){
-		return person;
-	}
-	
-	/**
-	 *设置联系人
-	 */
-	public void setPerson(String person){
-		this.person = person;
-	}
-	/**
-	 *获取联系电话
-	 */
-	@ApiModelProperty(value = "联系电话")
-    	public String getTel(){
-		return tel;
-	}
-	
-	/**
-	 *设置联系电话
-	 */
-	public void setTel(String tel){
-		this.tel = tel;
-	}
-	/**
-	 *获取电子邮箱
-	 */
-    	public String getMail(){
-		return mail;
-	}
-	
-	/**
-	 *设置电子邮箱
-	 */
-	public void setMail(String mail){
-		this.mail = mail;
-	}
-	/**
-	 *获取邮政编码
-	 */
-    	public String getPostal(){
-		return postal;
-	}
-	
-	/**
-	 *设置邮政编码
-	 */
-	public void setPostal(String postal){
-		this.postal = postal;
-	}
-	/**
-	 *获取地址
-	 */
-    	public String getAddress(){
-		return address;
-	}
-	
-	/**
-	 *设置地址
-	 */
-	public void setAddress(String address){
-		this.address = address;
-	}
-	/**
-	 *获取企业公章(附件)
-	 */
-    	public String getCompanyStampFile(){
-		return companyStampFile;
-	}
-	
-	/**
-	 *设置企业公章(附件)
-	 */
-	public void setCompanyStampFile(String companyStampFile){
-		this.companyStampFile = companyStampFile;
-	}
-	/**
-	 *获取推广员账号
-	 */
-    	public String getPromoter(){
-		return promoter;
-	}
-	
-	/**
-	 *设置推广员账号
-	 */
-	public void setPromoter(String promoter){
-		this.promoter = promoter;
-	}
-	/**
-	 *获取近三年损失情况(时间、原因、损失金额)
-	 */
-    	public String getRemark(){
-		return remark;
-	}
-	
-	/**
-	 *设置近三年损失情况(时间、原因、损失金额)
-	 */
-	public void setRemark(String remark){
-		this.remark = remark;
-	}
-	/**
-	 *获取云平台买方ID
-	 */
-    	public String getBuyId(){
-		return buyId;
-	}
-	
-	/**
-	 *设置云平台买方ID
-	 */
-	public void setBuyId(String buyId){
-		this.buyId = buyId;
-	}
-	/**
-	 *获取状态
-	 */
-    	public String getStatus(){
-		return status;
-	}
-	
-	/**
-	 *设置状态
-	 */
-	public void setStatus(String status){
-		this.status = status;
-	}
-	/**
-	 *获取创建人
-	 */
-    	public String getCreateBy(){
-		return createBy;
-	}
-	
-	/**
-	 *设置创建人
-	 */
-	public void setCreateBy(String createBy){
-		this.createBy = createBy;
-	}
-	/**
-	 *获取创建时间
-	 */
-	@ApiModelProperty(value = "注册时间")
-    	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
-	@JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone ="GMT+8")
-		public Date getCreateTime(){
-		return createTime;
-	}
-	
-	/**
-	 *设置创建时间
-	 */
-	public void setCreateTime(Date createTime){
-		this.createTime = createTime;
-	}
-	/**
-	 *获取更新人
-	 */
-    	public String getUpdateBy(){
-		return updateBy;
-	}
-	
-	/**
-	 *设置更新人
-	 */
-	public void setUpdateBy(String updateBy){
-		this.updateBy = updateBy;
-	}
-	/**
-	 *获取更新时间
-	 */
-    	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
-	@JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone ="GMT+8")
-		public Date getUpdateTime(){
-		return updateTime;
-	}
-	
-	/**
-	 *设置更新时间
-	 */
-	public void setUpdateTime(Date updateTime){
-		this.updateTime = updateTime;
-	}
-	/**
-	 *获取是否删除
-	 */
-    	public Boolean getDelFlag(){
-		return delFlag;
-	}
-	
-	/**
-	 *设置是否删除
-	 */
-	public void setDelFlag(Boolean delFlag){
-		this.delFlag = delFlag;
-	}
 }

+ 13 - 0
picc-enterprise-server/src/main/java/com/jpsoft/picc/modules/auth/controller/CompanyController.java

@@ -79,6 +79,19 @@ public class CompanyController {
                 company = companyService.get(companyInfoDTO.getId());
             }
 
+            //身份证、营业执照、企业公章(附件)如果没上传时,会传null值
+            if ("null".equals(companyInfoDTO.getLegalCardFile())){
+                companyInfoDTO.setLegalCardFile("");
+            }
+
+            if ("null".equals(companyInfoDTO.getUsccFiles())){
+                companyInfoDTO.setUsccFiles("");
+            }
+
+            if ("null".equals(companyInfoDTO.getCompanyStampFile())){
+                companyInfoDTO.setCompanyStampFile("");
+            }
+
             if (company==null) {
                 company = new Company();
                 PojoUtils.map(companyInfoDTO, company);

+ 15 - 7
picc-enterprise-server/src/main/java/com/jpsoft/picc/modules/auth/controller/InsurancePolicyController.java

@@ -194,16 +194,24 @@ public class InsurancePolicyController {
                 map.put("startTime",sdf.format(policy.getStartTime()));
                 map.put("endTime",sdf.format(policy.getEndTime()));
                 map.put("definitionName",policy.getDefinitionName());
+                //电子投保单下载地址
+                map.put("insurancePolicyFile", policy.getInsurancePolicyFile());
 
-                if (now.before(policy.getStartTime())){
-                    map.put("status","未生效");
+                try {
+                    map.put("status", PolicyStatus.valueOf(Integer.valueOf(policy.getStatus())).getText());
                 }
-                else if(now.after(policy.getEndTime())){
-                    map.put("status","已过期");
-                }
-                else{
-                    map.put("status","保障中");
+                catch (Exception ex){
+                    log.error(ex.getMessage(),ex);
                 }
+//                if (now.before(policy.getStartTime())){
+//                    map.put("status","未生效");
+//                }
+//                else if(now.after(policy.getEndTime())){
+//                    map.put("status","已过期");
+//                }
+//                else{
+//                    map.put("status","保障中");
+//                }
 
                 mapList.add(map);
             }

+ 8 - 0
picc-enterprise-server/src/main/java/com/jpsoft/picc/modules/pub/dto/CompanyInfoDTO.java

@@ -27,4 +27,12 @@ public class CompanyInfoDTO {
     private String usccFiles;
     @ApiModelProperty(value = "企业公章(附件)")
     private String companyStampFile;
+    @ApiModelProperty(value = "营业性质")
+    private String businessNature;
+    @ApiModelProperty(value = "营业范围")
+    private String businessScope;
+    @ApiModelProperty(value = "行业类型")
+    private String industryType;
+    @ApiModelProperty(value = "地址")
+    private String address;
 }