Commit 1ab0987e by kangxiaoshan

合同导出

parent 9734460d
......@@ -64,21 +64,17 @@ public class ContractController {
putdata(this, ContractStatusEnum.SUPPLEMENTARY_AGREEMENT);
}};
private static void putdata(Map map, ContractStatusEnum a) {
map.put(a.getKey(), a.getValue());
}
@Autowired
private ContractService service;
@Autowired
private ShareIncomeService shareIncomeService;
@Autowired
private DmpIncomeService dmpIncomeService;
private static void putdata(Map map, ContractStatusEnum a) {
map.put(a.getKey(), a.getValue());
}
@RequestMapping(value = "find", method = RequestMethod.GET)
@ResponseBody
@AuthKey(AuthMenuEnmm.CONTRACTMNG_V)
......@@ -139,13 +135,13 @@ public class ContractController {
List<String> title;
if (platform.equals("tkio")) {
title = Arrays.asList("录入时间,合同编号,客户账号,我方签约主体,签约方,行政区域,隶属集团,行业分类,销售,开始日期,结束日期,套餐类型,合同流量(万次),赠送流量(万次),合同金额,签约类型,合同状态,回款状态,关联合同,关联合同编号,补充协议签订日期"
title = Arrays.asList("录入时间,合同编号,客户账号,我方签约主体,签约方,行政区域,隶属集团,行业分类,销售,开始日期,结束日期,套餐类型,合同流量(万次),赠送流量(万次),合同金额,收款金额,开票金额,签约类型,合同状态,回款状态,关联合同,关联合同编号,补充协议签订日期"
.split(","));
} else if (platform.equals("cas")) {
title = Arrays.asList("录入时间,合同编号,客户账号,我方签约主体,签约方,行政区域,隶属集团,行业分类,销售,开始日期,结束日期,套餐类型,有效期开始日有效期结束日,合同金额,签约类型,合同状态,回款状态,关联合同"
title = Arrays.asList("录入时间,合同编号,客户账号,我方签约主体,签约方,行政区域,隶属集团,行业分类,销售,开始日期,结束日期,套餐类型,有效期开始日有效期结束日,合同金额,收款金额,开票金额,签约类型,合同状态,回款状态,关联合同"
.split(","));
} else {
title = Arrays.asList("录入时间,合同编号,客户账号,我方签约主体,签约方,行政区域,隶属集团,行业分类,销售,开始日期,结束日期,套餐类型,合同金额,签约类型,合同状态,回款状态,关联合同"
title = Arrays.asList("录入时间,合同编号,客户账号,我方签约主体,签约方,行政区域,隶属集团,行业分类,销售,开始日期,结束日期,套餐类型,合同金额,收款金额,开票金额,签约类型,合同状态,回款状态,关联合同"
.split(","));
}
int lineSize = title.size();
......@@ -173,27 +169,33 @@ public class ContractController {
rowBody.createCell(12).setCellValue(contract.getTrackFlow() == null ? 0 : contract.getTrackFlow());
rowBody.createCell(13).setCellValue(contract.getExtraFlow() == null ? 0 : contract.getExtraFlow());
rowBody.createCell(14).setCellValue(contract.getMoney() == null ? 0 : contract.getMoney());
rowBody.createCell(15).setCellValue(CONTRACT_STATUS.get(contract.getContractType()));
rowBody.createCell(16).setCellValue(CONTRACT_STATUS.get(contract.getStatus()));
rowBody.createCell(17).setCellValue(CONTRACT_STATUS.get(contract.getBackStatus() + "_back"));
rowBody.createCell(18).setCellValue(contract.getRelationCode() == null ? "无" : "有");
rowBody.createCell(19).setCellValue(contract.getRelationCode() == null ? "" : contract.getRelationCode());
rowBody.createCell(20).setCellValue(contract.getSignedDate() == null ? "" : contract.getSignedDate());
rowBody.createCell(15).setCellValue(contract.getAmountCollected());
rowBody.createCell(16).setCellValue(contract.getInvoiceAmount());
rowBody.createCell(17).setCellValue(CONTRACT_STATUS.get(contract.getContractType()));
rowBody.createCell(18).setCellValue(CONTRACT_STATUS.get(contract.getStatus()));
rowBody.createCell(19).setCellValue(CONTRACT_STATUS.get(contract.getBackStatus() + "_back"));
rowBody.createCell(20).setCellValue(contract.getRelationCode() == null ? "无" : "有");
rowBody.createCell(21).setCellValue(contract.getRelationCode() == null ? "" : contract.getRelationCode());
rowBody.createCell(22).setCellValue(contract.getSignedDate() == null ? "" : contract.getSignedDate());
} else {
if (platform.equals("cas")) {
rowBody.createCell(12).setCellValue(contract.getValidStartDate());
rowBody.createCell(13).setCellValue(contract.getValidEndDate());
rowBody.createCell(14).setCellValue(contract.getMoney() == null ? 0 : contract.getMoney());
rowBody.createCell(15).setCellValue(contract.getAmountCollected());
rowBody.createCell(16).setCellValue(contract.getInvoiceAmount());
rowBody.createCell(17).setCellValue(CONTRACT_STATUS.get(contract.getContractType()));
rowBody.createCell(18).setCellValue(CONTRACT_STATUS.get(contract.getStatus()));
rowBody.createCell(19).setCellValue(CONTRACT_STATUS.get(contract.getBackStatus() + "_back"));
rowBody.createCell(20).setCellValue(contract.getRelationCode() == null ? "" : contract.getRelationCode());
} else {
rowBody.createCell(12).setCellValue(contract.getMoney() == null ? 0 : contract.getMoney());
rowBody.createCell(13).setCellValue(contract.getAmountCollected());
rowBody.createCell(14).setCellValue(contract.getInvoiceAmount());
rowBody.createCell(15).setCellValue(CONTRACT_STATUS.get(contract.getContractType()));
rowBody.createCell(16).setCellValue(CONTRACT_STATUS.get(contract.getStatus()));
rowBody.createCell(17).setCellValue(CONTRACT_STATUS.get(contract.getBackStatus() + "_back"));
rowBody.createCell(18).setCellValue(contract.getRelationCode() == null ? "" : contract.getRelationCode());
} else {
rowBody.createCell(12).setCellValue(contract.getMoney() == null ? 0 : contract.getMoney());
rowBody.createCell(13).setCellValue(CONTRACT_STATUS.get(contract.getContractType()));
rowBody.createCell(14).setCellValue(CONTRACT_STATUS.get(contract.getStatus()));
rowBody.createCell(15).setCellValue(CONTRACT_STATUS.get(contract.getBackStatus() + "_back"));
rowBody.createCell(16).setCellValue(contract.getRelationCode() == null ? "" : contract.getRelationCode());
}
}
......
......@@ -20,6 +20,7 @@ public class DmpIncome {
private Date createTime;
private Date modifyTime;
private String uploadUser;
private String myBodyCode;
//contract_code, my_body_name, customer_body, customer_short, business_type, agreement_type
......@@ -164,4 +165,12 @@ public class DmpIncome {
public void setAgreementType(String agreementType) {
this.agreementType = agreementType;
}
public String getMyBodyCode() {
return myBodyCode;
}
public void setMyBodyCode(String myBodyCode) {
this.myBodyCode = myBodyCode;
}
}
......@@ -21,6 +21,7 @@ public class PdIncome {
private Date createTime;
private Date modifyTime;
private String inputUser;//录入人
private String myBodyCode;
//contract_code, my_body_name, customer_body, customer_short, business_type, agreement_type
......@@ -176,4 +177,12 @@ public class PdIncome {
public void setProductType(String productType) {
this.productType = productType;
}
public String getMyBodyCode() {
return myBodyCode;
}
public void setMyBodyCode(String myBodyCode) {
this.myBodyCode = myBodyCode;
}
}
......@@ -115,6 +115,7 @@ public class DmpIncomeServiceImpl implements DmpIncomeService {
Object[] nameItem = names.get(dmpIncome.getContractCode());
//my_body_name, customer_body, customer_short, business_type, agreement_type
if (nameItem != null) {
dmpIncome.setMyBodyCode(nameItem[1] + "");
dmpIncome.setMyBodyName(nameItem[2] + "");
dmpIncome.setCustomerBody(nameItem[3] + "");
dmpIncome.setCustomerShort(nameItem[4] + "");
......@@ -143,14 +144,17 @@ public class DmpIncomeServiceImpl implements DmpIncomeService {
Object[] nameItem = names.get(pdIncome.getContractCode());
//my_body_name, customer_body, customer_short, business_type, agreement_type
if (nameItem != null) {
pdIncome.setMyBodyCode(nameItem[1] + "");
pdIncome.setMyBodyName(nameItem[2] + "");
pdIncome.setCustomerBody(nameItem[3] + "");
pdIncome.setCustomerShort(nameItem[4] + "");
pdIncome.setCustomerShort(nameItem[4] == null ? "" : nameItem[4] + "");
pdIncome.setBusinessType(nameItem[5] + "");
pdIncome.setAgreementType(nameItem[6] + "");
pdIncome.setProductType(nameItem[7] + "");
if (StringUtils.isEmpty(pdIncome.getMyBodyName()) || pdIncome.getMyBodyName().equals("null")) {
pdIncome.setMyBodyName(cBodyMap.get(nameItem[1]));
} else {
pdIncome.setMyBodyName("");
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment