Commit b7238acd by 王军业

122154545412

1 parent ac9941fe
...@@ -25,6 +25,7 @@ public class ImportModel { ...@@ -25,6 +25,7 @@ public class ImportModel {
@DateTimeFormat(pattern="yyyy-MM-dd") @DateTimeFormat(pattern="yyyy-MM-dd")
private Date sign_date; private Date sign_date;
@Excel(name="产品线类型") @Excel(name="产品线类型")
// @Pattern(regexp="[\\u667a\\u6167\\u57ce\\u5e02,\\u667a\\u6167\\u5546\\u4e1a,\\u5176\\u5b83]")
// @Pattern(regexp="[智慧城市,智慧商业,其它]") // @Pattern(regexp="[智慧城市,智慧商业,其它]")
private String product_line_type_name; private String product_line_type_name;
@Excel(name="销售员") @Excel(name="销售员")
...@@ -40,6 +41,7 @@ public class ImportModel { ...@@ -40,6 +41,7 @@ public class ImportModel {
@Excel(name="项目名称") @Excel(name="项目名称")
private String project_name; private String project_name;
@Excel(name="合同金额") @Excel(name="合同金额")
//@Pattern(regexp="[^[0-9]+(.[0-9]{2})]")
private Double contract_amount; private Double contract_amount;
@Excel(name="暂停金额") @Excel(name="暂停金额")
private Double stop_amount; private Double stop_amount;
...@@ -50,6 +52,7 @@ public class ImportModel { ...@@ -50,6 +52,7 @@ public class ImportModel {
@Excel(name="折扣金额") @Excel(name="折扣金额")
private Double deduct_amount; private Double deduct_amount;
@Excel(name="合同状态") @Excel(name="合同状态")
// @Pattern(regexp="[\\u5df2\\u5b8c\\u6210,\\u8fdb\\u884c\\u4e2d]")
// @Pattern(regexp="[已完成,进行中]") // @Pattern(regexp="[已完成,进行中]")
private String contract_state_name; private String contract_state_name;
@Excel(name="回款金额") @Excel(name="回款金额")
...@@ -79,6 +82,7 @@ public class ImportModel { ...@@ -79,6 +82,7 @@ public class ImportModel {
@Excel(name="质保周期") @Excel(name="质保周期")
private Integer guarantee_period; private Integer guarantee_period;
@Excel(name="合同性质") @Excel(name="合同性质")
// @Pattern(regexp="[\\u4f9b\\u8d27,\\u96c6\\u6210]")
// @Pattern(regexp="[供货,集成]") // @Pattern(regexp="[供货,集成]")
private String contract_type; private String contract_type;
@Excel(name="是否归档") @Excel(name="是否归档")
...@@ -86,7 +90,8 @@ public class ImportModel { ...@@ -86,7 +90,8 @@ public class ImportModel {
@Excel(name="确认收入金额") @Excel(name="确认收入金额")
private Double confirm_income_amount; private Double confirm_income_amount;
@Excel(name="账款状态") @Excel(name="账款状态")
// @Pattern(regexp="[正常验收款,正常维保,正常预付款,正常到货款,正常质保款,逾期预付款,逾期到货款,逾期验收款,逾期质保款]") // @Pattern(regexp="[\\u6b63\\u5e38\\u9a8c\\u6536\\u6b3e,\\u6b63\\u5e38\\u7ef4\\u4fdd,\\u6b63\\u5e38\\u9884\\u4ed8\\u6b3e,\\u6b63\\u5e38\\u5230\\u8d27\\u6b3e,\\u6b63\\u5e38\\u8d28\\u4fdd\\u6b3e,\\u903e\\u671f\\u9884\\u4ed8\\u6b3e,\\u903e\\u671f\\u5230\\u8d27\\u6b3e,\\u903e\\u671f\\u9a8c\\u6536\\u6b3e,\\u903e\\u671f\\u8d28\\u4fdd\\u6b3e]")
// @Pattern(regexp="[\\u4e00-\\u9fa5][正常验收款,正常维保,正常预付款,正常到货款,正常质保款,逾期预付款,逾期到货款,逾期验收款,逾期质保款]")
private String amount_state_name; private String amount_state_name;
@Excel(name="维保服务期开始节点") @Excel(name="维保服务期开始节点")
private Date start_guarantee_date; private Date start_guarantee_date;
......
...@@ -28,7 +28,7 @@ public class ImportExcel { ...@@ -28,7 +28,7 @@ public class ImportExcel {
List<ImportModel> successList=result.getList(); List<ImportModel> successList=result.getList();
List<ImportModel> failList=result.getFailList(); List<ImportModel> failList=result.getFailList();
List<List<ImportModel>> list = new ArrayList<List<ImportModel>>(); List<List<ImportModel>> list = new ArrayList<List<ImportModel>>(2);
list.add(successList); list.add(successList);
list.add(failList); list.add(failList);
log.info(list.get(0).size()+ ""); log.info(list.get(0).size()+ "");
......
...@@ -4,6 +4,7 @@ import java.io.IOException; ...@@ -4,6 +4,7 @@ import java.io.IOException;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date; import java.util.Date;
import java.util.HashMap;
import java.util.Iterator; import java.util.Iterator;
import com.vion.financial.handler.DownLoad; import com.vion.financial.handler.DownLoad;
...@@ -621,8 +622,14 @@ public class ContractServiceImpl implements ContractService { ...@@ -621,8 +622,14 @@ public class ContractServiceImpl implements ContractService {
logger.info(s); logger.info(s);
} }
boolean is_repeat=true; boolean is_repeat=true;
String authorization="";
List<String> repeatListId=new ArrayList<String>(); List<String> repeatListId=new ArrayList<String>();
if(list.get(1).size()==0) { if(list.get(1).size()==0) {
List<Map> list_data = null;
String url = financeConfig.getAuthurl();
String result = HttpNetClient.doGet(url, null);
Map map = JavaBean2Json.Json2JavaBean(result, Map.class);
list_data = (List<Map>) map.get("list_data");
ContractVo contractVo = null; ContractVo contractVo = null;
ReturnInfo returnInfo=null; ReturnInfo returnInfo=null;
Receipt receipt=null; Receipt receipt=null;
...@@ -673,11 +680,6 @@ public class ContractServiceImpl implements ContractService { ...@@ -673,11 +680,6 @@ public class ContractServiceImpl implements ContractService {
break; break;
} }
} }
List<Map> list_data = null;
String url = financeConfig.getAuthurl();
String result = HttpNetClient.doGet(url, null);
Map map = JavaBean2Json.Json2JavaBean(result, Map.class);
list_data = (List<Map>) map.get("list_data");
if(list_data != null && list_data.size() > 0) { if(list_data != null && list_data.size() > 0) {
for(Map _map:list_data) { for(Map _map:list_data) {
if(importModel.getSalesperson_name()!=null && importModel.getSalesperson_name().equals(_map.get("name"))) { if(importModel.getSalesperson_name()!=null && importModel.getSalesperson_name().equals(_map.get("name"))) {
...@@ -685,6 +687,16 @@ public class ContractServiceImpl implements ContractService { ...@@ -685,6 +687,16 @@ public class ContractServiceImpl implements ContractService {
} }
} }
} }
if(contractVo.getSalesperson_unid()==null) {
Map tempMap=new HashMap();
tempMap.put("norm_type", "employee");
tempMap.put("username", importModel.getSalesperson_name());
tempMap.put("name", importModel.getSalesperson_name());
tempMap.put("password", "0000");
String addResult = HttpNetClient.doPost(url, JavaBean2Json.javaBean2Json(tempMap),authorization);
Map resultMap = JavaBean2Json.Json2JavaBean(addResult, Map.class);
contractVo.setSalesperson_unid(resultMap.get("user_unid").toString());
}
contractVo.setProvince_name(importModel.getProvince_name()); contractVo.setProvince_name(importModel.getProvince_name());
contractVo.setCity_name(importModel.getCity_name()); contractVo.setCity_name(importModel.getCity_name());
contractVo.setCounty_name(importModel.getCounty_name()); contractVo.setCounty_name(importModel.getCounty_name());
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!