Commit c7c7f28e by 王军业

45445114554

1 parent 6f403d18
...@@ -3,6 +3,7 @@ package com.vion.financial.excel; ...@@ -3,6 +3,7 @@ package com.vion.financial.excel;
import java.util.Date; import java.util.Date;
import javax.validation.constraints.Max; import javax.validation.constraints.Max;
import javax.validation.constraints.Pattern;
import org.hibernate.validator.constraints.NotBlank; import org.hibernate.validator.constraints.NotBlank;
import org.springframework.format.annotation.DateTimeFormat; import org.springframework.format.annotation.DateTimeFormat;
...@@ -18,12 +19,13 @@ import cn.afterturn.easypoi.excel.annotation.Excel; ...@@ -18,12 +19,13 @@ import cn.afterturn.easypoi.excel.annotation.Excel;
@JsonInclude(value=Include.NON_NULL) @JsonInclude(value=Include.NON_NULL)
public class ImportModel { public class ImportModel {
@Excel(name="合同编号") @Excel(name="合同编号")
@NotBlank(message="该字段不为空") @NotBlank()
private String contract_unid; private String contract_unid;
@Excel(name="签订日期",importFormat="yyyy-MM-dd",databaseFormat="yyyy-mm-dd",format="yyyy-MM-dd") @Excel(name="签订日期",importFormat="yyyy-MM-dd",databaseFormat="yyyy-mm-dd",format="yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd") @DateTimeFormat(pattern="yyyy-MM-dd")
private Date sign_date; private Date sign_date;
@Excel(name="产品线类型") @Excel(name="产品线类型")
@Pattern(regexp="[智慧城市,智慧商业,其它]")
private String product_line_type_name; private String product_line_type_name;
@Excel(name="销售员") @Excel(name="销售员")
private String salesperson_name; private String salesperson_name;
...@@ -48,10 +50,11 @@ public class ImportModel { ...@@ -48,10 +50,11 @@ public class ImportModel {
@Excel(name="折扣金额") @Excel(name="折扣金额")
private Double deduct_amount; private Double deduct_amount;
@Excel(name="合同状态") @Excel(name="合同状态")
@Pattern(regexp="[已完成,进行中]")
private String contract_state_name; private String contract_state_name;
@Excel(name="回款金额") @Excel(name="回款金额")
private Double reback_amount; private Double reback_amount;
@Excel(name="回款日期") @Excel(name="回款日期",importFormat="yyyy-MM-dd")
private Date reback_date; private Date reback_date;
@Excel(name="回款备注") @Excel(name="回款备注")
private String reback_note; private String reback_note;
...@@ -63,29 +66,31 @@ public class ImportModel { ...@@ -63,29 +66,31 @@ public class ImportModel {
private String receipt_note; private String receipt_note;
@Excel(name="初验") @Excel(name="初验")
private String pre_acceptanc; private String pre_acceptanc;
@Excel(name="初验日期") @Excel(name="初验日期",importFormat="yyyy-MM-dd")
private Date pre_acceptanc_date; private Date pre_acceptanc_date;
@Excel(name="初验备注") @Excel(name="初验备注")
private String pre_acceptanc_note; private String pre_acceptanc_note;
@Excel(name="终验") @Excel(name="终验")
private String end_acceptanc; private String end_acceptanc;
@Excel(name="终验日期") @Excel(name="终验日期",importFormat="yyyy-MM-dd")
private Date end_acceptanc_date; private Date end_acceptanc_date;
@Excel(name="终验备注") @Excel(name="终验备注")
private String end_acceptanc_note; private String end_acceptanc_note;
@Excel(name="质保周期") @Excel(name="质保周期")
private Integer guarantee_period; private Integer guarantee_period;
@Excel(name="合同性质") @Excel(name="合同性质")
@Pattern(regexp="[供货,集成]")
private String contract_type; private String contract_type;
@Excel(name="是否归档") @Excel(name="是否归档")
private String is_archive; private String is_archive;
@Excel(name="确认收入金额") @Excel(name="确认收入金额")
private Double confirm_income_amount; private Double confirm_income_amount;
@Excel(name="账款状态") @Excel(name="账款状态")
@Pattern(regexp="[正常验收款,正常维保,正常预付款,正常到货款,正常质保款,逾期预付款,逾期到货款,逾期验收款,逾期质保款]")
private String amount_state_name; private String amount_state_name;
@Excel(name="维保服务期开始节点") @Excel(name="维保服务期开始节点",importFormat="yyyy-MM-dd")
private Date start_guarantee_date; private Date start_guarantee_date;
@Excel(name="维保服务期结束节点") @Excel(name="维保服务期结束节点",importFormat="yyyy-MM-dd")
private Date end_guarantee_date; private Date end_guarantee_date;
/* @Excel(name="质保期开始节点") /* @Excel(name="质保期开始节点")
private String mainten_start_point;*/ private String mainten_start_point;*/
...@@ -100,7 +105,7 @@ public class ImportModel { ...@@ -100,7 +105,7 @@ public class ImportModel {
@Excel(name="合同备注") @Excel(name="合同备注")
private String contract_note; private String contract_note;
@Excel(name="预付款天数") @Excel(name="预付款天数")
@Max(value=30) //@Max(value=30)
private Integer advance_payment_days; private Integer advance_payment_days;
@Excel(name="预付款比例") @Excel(name="预付款比例")
private Double advance_payment_propority; private Double advance_payment_propority;
...@@ -124,11 +129,12 @@ public class ImportModel { ...@@ -124,11 +129,12 @@ public class ImportModel {
private Double mainten_payment_propority; private Double mainten_payment_propority;
@Excel(name="质保款付款条件") @Excel(name="质保款付款条件")
private String mainten_payment_requirement; private String mainten_payment_requirement;
@Excel(name="发货日期") @Excel(name="发货日期",importFormat="yyyy-MM-dd")
private Date deliver_date; private Date deliver_date;
@Excel(name="到货验收时间") @Excel(name="到货验收时间",importFormat="yyyy-MM-dd")
private Date goods_acceptanc_date; private Date goods_acceptanc_date;
@Excel(name="质保款类型") @Excel(name="质保款类型")//只有两种1和2
@Pattern(regexp="[1,2]")
private String mainten_payment_type; private String mainten_payment_type;
/* @Excel(name="产品线类型") /* @Excel(name="产品线类型")
private String product_line_type_name; private String product_line_type_name;
......
...@@ -620,6 +620,8 @@ public class ContractServiceImpl implements ContractService { ...@@ -620,6 +620,8 @@ public class ContractServiceImpl implements ContractService {
s=s+"!"; s=s+"!";
logger.info(s); logger.info(s);
} }
boolean is_repeat=true;
List<String> repeatListId=new ArrayList<String>();
if(list.get(1).size()==0) { if(list.get(1).size()==0) {
ContractVo contractVo = null; ContractVo contractVo = null;
ReturnInfo returnInfo=null; ReturnInfo returnInfo=null;
...@@ -901,10 +903,14 @@ public class ContractServiceImpl implements ContractService { ...@@ -901,10 +903,14 @@ public class ContractServiceImpl implements ContractService {
deliverGoodsMapper.addDeliverGoods(deliverGoods); deliverGoodsMapper.addDeliverGoods(deliverGoods);
} }
}else { }else {
contractMapper.updateOne(contractVo); is_repeat=false;
repeatListId.add(contractVo.getContract_unid());
}
}if(is_repeat) {
return repeatListId;
}else {
return successCode;
} }
}
return successCode;
} }
return list.get(1); return list.get(1);
} catch (IOException e) { } catch (IOException e) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!