Commit 7b124412 by 王军业

[导出加入确定收入金额,累计开票金额]

1 parent 97aca691
...@@ -109,7 +109,7 @@ public class ContractController extends BaseController { ...@@ -109,7 +109,7 @@ public class ContractController extends BaseController {
*/ */
@PostMapping(value="/import") @PostMapping(value="/import")
@ResponseBody @ResponseBody
public Object importExcel(@RequestParam("file") MultipartFile file) { public Object importExcel(@RequestParam("file") MultipartFile file ,String ranke) {
return contractService.importExcel(file); return contractService.importExcel(file);
} }
......
...@@ -89,7 +89,26 @@ public class ExportModel { ...@@ -89,7 +89,26 @@ public class ExportModel {
@Excel(name="到货验收日期",width=15) @Excel(name="到货验收日期",width=15)
private String goods_acceptanc_date; private String goods_acceptanc_date;
@Excel(name="确认收入金额",width=15,type=1,numFormat="###############.00")
private Double confirm_income_amount;
@Excel(name="累计开票金额",width=15,type=1,numFormat="###############.00")
private Double total_receipt_amount;
public Double getConfirm_income_amount() {
return confirm_income_amount;
}
public void setConfirm_income_amount(Double confirm_income_amount) {
this.confirm_income_amount = confirm_income_amount;
}
public Double getTotal_receipt_amount() {
return total_receipt_amount;
}
public void setTotal_receipt_amount(Double total_receipt_amount) {
this.total_receipt_amount = total_receipt_amount;
}
public String getGoods_acceptanc_date() { public String getGoods_acceptanc_date() {
return goods_acceptanc_date; return goods_acceptanc_date;
} }
......
...@@ -595,6 +595,8 @@ ...@@ -595,6 +595,8 @@
amount_state_unid, to_char(start_guarantee_date, 'yyyy-MM-dd') as start_guarantee_date, to_char(end_guarantee_date, 'yyyy-MM-dd') as end_guarantee_date, amount_state_unid, to_char(start_guarantee_date, 'yyyy-MM-dd') as start_guarantee_date, to_char(end_guarantee_date, 'yyyy-MM-dd') as end_guarantee_date,
mainten_start_point, contract_note, is_delete, project_unid, mainten_start_point, contract_note, is_delete, project_unid,
customer_unid, customer_unid,
cast(confirm_income_amount as decimal(18,2)),
(select cast(sum(receipt_amount) as decimal(18,2)) from tb_receipt where tb_receipt.contract_unid = tb_contract.contract_unid) as total_receipt_amount ,
to_char(sign_date,'yyyy') as year, to_char(sign_date,'MM') as month, to_char(sign_date,'yyyy') as year, to_char(sign_date,'MM') as month,
(cast(contract_amount as decimal(18,2))-(select cast(total_reback_view."sum" as decimal(18,2)) from total_reback_view where total_reback_view.contract_unid=tb_contract.contract_unid)-cast(CASE WHEN deduct_amount IS NULL THEN 0 ELSE deduct_amount end as decimal(18,2))-cast(CASE WHEN stop_amount IS NULL THEN 0 ELSE stop_amount END as decimal(18,2)) (cast(contract_amount as decimal(18,2))-(select cast(total_reback_view."sum" as decimal(18,2)) from total_reback_view where total_reback_view.contract_unid=tb_contract.contract_unid)-cast(CASE WHEN deduct_amount IS NULL THEN 0 ELSE deduct_amount end as decimal(18,2))-cast(CASE WHEN stop_amount IS NULL THEN 0 ELSE stop_amount END as decimal(18,2))
-cast(CASE WHEN exemptions_amount IS NULL THEN 0 ELSE exemptions_amount END as decimal(18,2))-cast(CASE WHEN bad_amount IS NULL THEN 0 ELSE bad_amount END as decimal(18,2))) as contract_remain,(select cast(total_reback_view.sum as decimal(18,2)) from total_reback_view where total_reback_view.contract_unid=tb_contract.contract_unid) as total_reback_amount, -cast(CASE WHEN exemptions_amount IS NULL THEN 0 ELSE exemptions_amount END as decimal(18,2))-cast(CASE WHEN bad_amount IS NULL THEN 0 ELSE bad_amount END as decimal(18,2))) as contract_remain,(select cast(total_reback_view.sum as decimal(18,2)) from total_reback_view where total_reback_view.contract_unid=tb_contract.contract_unid) as total_reback_amount,
......
...@@ -102,6 +102,8 @@ public class ContractServiceImpl implements ContractService { ...@@ -102,6 +102,8 @@ public class ContractServiceImpl implements ContractService {
head_title_name.put("mainten_pay","质保金额"); head_title_name.put("mainten_pay","质保金额");
head_title_name.put("mainten_pay_date","质保款到期日"); head_title_name.put("mainten_pay_date","质保款到期日");
head_title_name.put("goods_acceptanc_date", "到货验收日期"); head_title_name.put("goods_acceptanc_date", "到货验收日期");
head_title_name.put("confirm_income_amount", "确认收入金额");
head_title_name.put("total_receipt_amount", "累计开票金额");
} }
private static Map<String,String> head_title_key = new HashMap<String,String>(); private static Map<String,String> head_title_key = new HashMap<String,String>();
...@@ -138,6 +140,8 @@ public class ContractServiceImpl implements ContractService { ...@@ -138,6 +140,8 @@ public class ContractServiceImpl implements ContractService {
head_title_key.put("mainten_pay","mainten_pay"); head_title_key.put("mainten_pay","mainten_pay");
head_title_key.put("mainten_pay_date","mainten_pay_date"); head_title_key.put("mainten_pay_date","mainten_pay_date");
head_title_key.put("goods_acceptanc_date", "goods_acceptanc_date"); head_title_key.put("goods_acceptanc_date", "goods_acceptanc_date");
head_title_key.put("confirm_income_amount", "confirm_income_amount");
head_title_key.put("total_receipt_amount", "total_receipt_amount");
} }
private static Map<String,String> num_key = new HashMap<String,String>(); private static Map<String,String> num_key = new HashMap<String,String>();
...@@ -155,6 +159,8 @@ public class ContractServiceImpl implements ContractService { ...@@ -155,6 +159,8 @@ public class ContractServiceImpl implements ContractService {
num_key.put("arrive_pay","###############.00"); num_key.put("arrive_pay","###############.00");
num_key.put("acceptanc_pay","###############.00"); num_key.put("acceptanc_pay","###############.00");
num_key.put("mainten_pay","###############.00"); num_key.put("mainten_pay","###############.00");
num_key.put("confirm_income_amount","###############.00");
num_key.put("total_receipt_amount","###############.00");
} }
@Autowired @Autowired
...@@ -788,12 +794,16 @@ public class ContractServiceImpl implements ContractService { ...@@ -788,12 +794,16 @@ public class ContractServiceImpl implements ContractService {
projectAcceptanc_end.setAcceptanc_date(importModel.getEnd_acceptanc_date()); projectAcceptanc_end.setAcceptanc_date(importModel.getEnd_acceptanc_date());
projectAcceptanc_end.setAcceptanc_note(importModel.getEnd_acceptanc_note()); projectAcceptanc_end.setAcceptanc_note(importModel.getEnd_acceptanc_note());
} }
if(contractIdList.contains(contractVo.getContract_unid())) {
contractMapper.updateOne(contractVo);
}
//ContractVo contracto=contractMapper.queryOne(contractVo.getContract_unid()); //ContractVo contracto=contractMapper.queryOne(contractVo.getContract_unid());
if(!contractIdList.contains(contractVo.getContract_unid())) { if(!contractIdList.contains(contractVo.getContract_unid())) {
contractMapper.addOne(contractVo); contractMapper.addOne(contractVo);
contractIdList.add(contractVo.getContract_unid()); contractIdList.add(contractVo.getContract_unid());
}
//if(paymentAgreeMapper.queryPaymentAgree(importModel.getContract_unid()).size()==0 ) { //if(paymentAgreeMapper.queryPaymentAgree(importModel.getContract_unid()).size()==0 ) {
if(returnInfo.getReback_date()!=null ||returnInfo.getActual_reback_amount()!=null ||returnInfo.getReback_note()!=null) { /* if(returnInfo.getReback_date()!=null ||returnInfo.getActual_reback_amount()!=null ||returnInfo.getReback_note()!=null) {
returnInfoMapper.addReturnInfo(returnInfo); returnInfoMapper.addReturnInfo(returnInfo);
} }
if(receipt.getReceipt_amount()!=null||receipt.getOa_flow_id()!=null||receipt.getReceipt_note()!=null) { if(receipt.getReceipt_amount()!=null||receipt.getOa_flow_id()!=null||receipt.getReceipt_note()!=null) {
...@@ -821,13 +831,13 @@ public class ContractServiceImpl implements ContractService { ...@@ -821,13 +831,13 @@ public class ContractServiceImpl implements ContractService {
deliverGoodsMapper.addDeliverGoods(deliverGoods); deliverGoodsMapper.addDeliverGoods(deliverGoods);
} }
continue; continue;
//} }
}else { }else {
if(importModel.getSalesperson_name()!=null && contractVo.getContract_unid()!=null) { if(importModel.getSalesperson_name()!=null && contractVo.getContract_unid()!=null) {
is_repeat=false; is_repeat=false;
repeatListId.add(contractVo.getContract_unid()); repeatListId.add(contractVo.getContract_unid());
} }
} }*/
//else {} if(paymentAgreeMapper.queryPaymentAgree(importModel.getContract_unid()).size()==0 ){ //else {} if(paymentAgreeMapper.queryPaymentAgree(importModel.getContract_unid()).size()==0 ){
//if( returnInfoMapper.queryReturnInfo(importModel.getContract_unid()).size()==0) { //if( returnInfoMapper.queryReturnInfo(importModel.getContract_unid()).size()==0) {
if(returnInfo.getReback_date()!=null ||returnInfo.getActual_reback_amount()!=null ||returnInfo.getReback_note()!=null) { if(returnInfo.getReback_date()!=null ||returnInfo.getActual_reback_amount()!=null ||returnInfo.getReback_note()!=null) {
...@@ -844,10 +854,14 @@ public class ContractServiceImpl implements ContractService { ...@@ -844,10 +854,14 @@ public class ContractServiceImpl implements ContractService {
projectAcceptancMapper.addProjectAcceptanc(projectAcceptanc_end); projectAcceptancMapper.addProjectAcceptanc(projectAcceptanc_end);
} }
}else { }else {
if(importModel.getPre_acceptanc_date()!=null ||importModel.getPre_acceptanc_note()!=null ||importModel.getPre_acceptanc()!=null || if(importModel.getPre_acceptanc_date()!=null ||importModel.getPre_acceptanc_note()!=null ||importModel.getPre_acceptanc()!=null ) {
importModel.getEnd_acceptanc_date()!=null ||importModel.getEnd_acceptanc_note()!=null ||importModel.getEnd_acceptanc()!=null) { //is_repeat=false;
is_repeat=false; //repeatListId.add(contractVo.getContract_unid());
repeatListId.add(contractVo.getContract_unid()); projectAcceptancMapper.updateProjectAcceptanc(projectAcceptanc_pre);
}
if(importModel.getEnd_acceptanc_date()!=null ||importModel.getEnd_acceptanc_note()!=null ||importModel.getEnd_acceptanc()!=null) {
projectAcceptancMapper.updateProjectAcceptanc(projectAcceptanc_end);
} }
} }
...@@ -865,25 +879,32 @@ public class ContractServiceImpl implements ContractService { ...@@ -865,25 +879,32 @@ public class ContractServiceImpl implements ContractService {
paymentAgreeMapper.addPaymentAgree(mainten_aymentAgree); paymentAgreeMapper.addPaymentAgree(mainten_aymentAgree);
} }
}else { }else {
if(importModel.getAdvance_payment_propority()!=null ||importModel.getAdvance_payment_requirement()!=null||importModel.getAdvance_payment_days()!=null if(importModel.getAdvance_payment_propority()!=null ||importModel.getAdvance_payment_requirement()!=null||importModel.getAdvance_payment_days()!=null) {
|| importModel.getArrival_payment_propority()!=null ||importModel.getArrival_payment_requirement()!=null||importModel.getArrival_payment_days()!=null /*is_repeat=false;
||importModel.getAcceptanc_payment_propority()!=null ||importModel.getAcceptanc_payment_requirement()!=null||importModel.getAcceptanc_payment_days()!=null repeatListId.add(contractVo.getContract_unid());*/
||importModel.getMainten_payment_propority()!=null ||importModel.getMainten_payment_requirement()!=null||importModel.getMainten_payment_days()!=null) { paymentAgreeMapper.updatePaymentAgree(pre_aymentAgree);
is_repeat=false; }
repeatListId.add(contractVo.getContract_unid()); if(importModel.getArrival_payment_propority()!=null ||importModel.getArrival_payment_requirement()!=null||importModel.getArrival_payment_days()!=null) {
paymentAgreeMapper.updatePaymentAgree(arrival_aymentAgree);
}
if(importModel.getAcceptanc_payment_propority()!=null ||importModel.getAcceptanc_payment_requirement()!=null||importModel.getAcceptanc_payment_days()!=null) {
paymentAgreeMapper.updatePaymentAgree(acceptanc_aymentAgree);
}
if(importModel.getMainten_payment_propority()!=null ||importModel.getMainten_payment_requirement()!=null||importModel.getMainten_payment_days()!=null) {
paymentAgreeMapper.updatePaymentAgree(mainten_aymentAgree);
} }
} }
if(deliverGoodsMapper.queryDeliverGoods(importModel.getContract_unid()).size()==0) { //if(deliverGoodsMapper.queryDeliverGoods(importModel.getContract_unid()).size()==0) {
if(deliverGoods.getDeliver_goods_date()!=null ||deliverGoods.getGoods_acceptanc_date()!=null) { if(deliverGoods.getDeliver_goods_date()!=null ||deliverGoods.getGoods_acceptanc_date()!=null) {
deliverGoodsMapper.addDeliverGoods(deliverGoods); deliverGoodsMapper.addDeliverGoods(deliverGoods);
} }
}else { /*}else {
if(importModel.getDeliver_date()!=null || importModel.getGoods_acceptanc_date()!=null) { if(importModel.getDeliver_date()!=null || importModel.getGoods_acceptanc_date()!=null) {
is_repeat=false; is_repeat=false;
repeatListId.add(contractVo.getContract_unid()); repeatListId.add(contractVo.getContract_unid());
} }
} }*/
}if(!is_repeat) { }if(!is_repeat) {
return repeatListId; return repeatListId;
}else { }else {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!