Commit 8b68128c by 谢明辉

Merge branch 'develop' of http://192.168.9.26/platform/finance_serv into develop

2 parents 35274cd6 2f085937
......@@ -193,13 +193,11 @@
(select cast(e17_view.e17 as decimal(18,2)) from e17_view where e17_view.contract_unid=tb_contract.contract_unid) as advance_pay,
(select cast(e18_view.e18 as decimal(18,2)) from e18_view where e18_view.contract_unid=tb_contract.contract_unid) as arrive_pay,
(select cast(e19_view.e19 as decimal(18,2)) from e19_view where e19_view.contract_unid=tb_contract.contract_unid) as acceptanc_pay,
(select cast(e20_view.e20 as decimal(18,2)) from e20_view where e20_view.contract_unid=tb_contract.contract_unid) as mainten_pay_deliver,
(select cast(e21_view.e21 as decimal(18,2)) from e21_view where e21_view.contract_unid=tb_contract.contract_unid) as mainten_pay_acceptanc,
(select cast(e21_view.e21 as decimal(18,2)) from e21_view where e21_view.contract_unid=tb_contract.contract_unid) as mainten_pay,
(select d18_view.d18 from d18_view where d18_view.contract_unid=tb_contract.contract_unid) as advance_pay_date,
(select d19_view.d19 from d19_view where d19_view.contract_unid=tb_contract.contract_unid) as arrive_pay_date,
(select d20_view.d20 from d20_view where d20_view.contract_unid=tb_contract.contract_unid) as acceptanc_pay_date,
(select d21_view.d21 from d21_view where d21_view.contract_unid=tb_contract.contract_unid) as mainten_pay_deliver_date,
(select d22_view.d21 from d22_view where d22_view.contract_unid=tb_contract.contract_unid) as mainten_pay_acceptanc_date,
(select d22_view.d21 from d22_view where d22_view.contract_unid=tb_contract.contract_unid) as mainten_pay_date,
(select max(tb_deliver_goods.deliver_goods_date) from tb_deliver_goods where tb_deliver_goods.contract_unid=tb_contract.contract_unid ) as deliver_date,
(select max(tb_project_acceptanc.acceptanc_date) from tb_project_acceptanc where tb_project_acceptanc.contract_unid=tb_contract.contract_unid ) as acceptanc_date
from tb_contract where contract_unid = #{contract_unid}
......@@ -412,13 +410,11 @@
(select cast(e17_view.e17 as decimal(18,2)) from e17_view where e17_view.contract_unid=tb_contract.contract_unid) as advance_pay,
(select cast(e18_view.e18 as decimal(18,2)) from e18_view where e18_view.contract_unid=tb_contract.contract_unid) as arrive_pay,
(select cast(e19_view.e19 as decimal(18,2)) from e19_view where e19_view.contract_unid=tb_contract.contract_unid) as acceptanc_pay,
(select cast(e20_view.e20 as decimal(18,2)) from e20_view where e20_view.contract_unid=tb_contract.contract_unid) as mainten_pay_deliver,
(select cast(e21_view.e21 as decimal(18,2)) from e21_view where e21_view.contract_unid=tb_contract.contract_unid) as mainten_pay_acceptanc,
(select cast(e21_view.e21 as decimal(18,2)) from e21_view where e21_view.contract_unid=tb_contract.contract_unid) as mainten_pay,
(select d18_view.d18 from d18_view where d18_view.contract_unid=tb_contract.contract_unid) as advance_pay_date,
(select d19_view.d19 from d19_view where d19_view.contract_unid=tb_contract.contract_unid) as arrive_pay_date,
(select d20_view.d20 from d20_view where d20_view.contract_unid=tb_contract.contract_unid) as acceptanc_pay_date,
(select d21_view.d21 from d21_view where d21_view.contract_unid=tb_contract.contract_unid) as mainten_pay_deliver_date,
(select d22_view.d21 from d22_view where d22_view.contract_unid=tb_contract.contract_unid) as mainten_pay_acceptanc_date,
(select d22_view.d21 from d22_view where d22_view.contract_unid=tb_contract.contract_unid) as mainten_pay_date,
(select max(tb_deliver_goods.deliver_goods_date) from tb_deliver_goods where tb_deliver_goods.contract_unid=tb_contract.contract_unid ) as deliver_date,
(select max(tb_project_acceptanc.acceptanc_date) from tb_project_acceptanc where tb_project_acceptanc.contract_unid=tb_contract.contract_unid ) as acceptanc_date
from tb_contract where 1=1
......@@ -553,17 +549,11 @@
(select cast(e17_view.e17 as decimal(18,2)) from e17_view where e17_view.contract_unid=tb_contract.contract_unid) as advance_pay,
(select cast(e18_view.e18 as decimal(18,2)) from e18_view where e18_view.contract_unid=tb_contract.contract_unid) as arrive_pay,
(select cast(e19_view.e19 as decimal(18,2)) from e19_view where e19_view.contract_unid=tb_contract.contract_unid) as acceptanc_pay,
case when (select e20_view.e20 from e20_view where e20_view.contract_unid=tb_contract.contract_unid) is null
then (select cast(e21_view.e21 as decimal(18,2)) from e21_view where e21_view.contract_unid=tb_contract.contract_unid)
else (select cast(e20_view.e20 as decimal(18,2)) from e20_view where e20_view.contract_unid=tb_contract.contract_unid)
end as mainten_pay,
(select cast(e21_view.e21 as decimal(18,2)) from e21_view where e21_view.contract_unid=tb_contract.contract_unid) as mainten_pay,
(select d18_view.d18 from d18_view where d18_view.contract_unid=tb_contract.contract_unid) as advance_pay_date,
(select d19_view.d19 from d19_view where d19_view.contract_unid=tb_contract.contract_unid) as arrive_pay_date,
(select d20_view.d20 from d20_view where d20_view.contract_unid=tb_contract.contract_unid) as acceptanc_pay_date,
case when (select d21_view.d21 from d21_view where d21_view.contract_unid=tb_contract.contract_unid) is null
then (select d22_view.d21 from d22_view where d22_view.contract_unid=tb_contract.contract_unid)
else (select d21_view.d21 from d21_view where d21_view.contract_unid=tb_contract.contract_unid)
end as mainten_pay_date,
(select d22_view.d21 from d22_view where d22_view.contract_unid=tb_contract.contract_unid) as mainten_pay_date,
<!-- (select d21_view.d21 from d21_view where d21_view.contract_unid=tb_contract.contract_unid) as mainten_pay_deliver_date,
(select d22_view.d21 from d22_view where d22_view.contract_unid=tb_contract.contract_unid) as mainten_pay_acceptanc_date, -->
(select max(tb_deliver_goods.deliver_goods_date) from tb_deliver_goods where tb_deliver_goods.contract_unid=tb_contract.contract_unid ) as deliver_date,
......@@ -614,7 +604,7 @@
</if>
<if test="contract_state !=null and contract_state!=''">
and
contract_state=#{contract_state}
contract_state=#{contract_state}
</if>
<if test="contract_type !=null and contract_type !=''">
and
......@@ -672,7 +662,7 @@
</select>
<select id="isDelete" parameterType="String" resultType="boolean">
<select id="isDelete" parameterType="String" resultType="Boolean">
select is_delete from tb_contract where contract_unid = #{contract_unid}
</select>
<select id="queryList" resultType="String">
......
......@@ -11,7 +11,7 @@ public interface ContractService {
public Object updateOne(ContractVo vontractVo);
public Object deleteOne(String s);
public Object queryList();
boolean isDelete(String s);
Boolean isDelete(String s);
public Object selectByCondition(SelectVo selectVo);
public void exportExcel(SelectVo selectVo,HttpServletResponse response);
}
......@@ -60,7 +60,9 @@ public class ContractServiceImpl implements ContractService {
// 根据附件unid集合更新附件表信息
Appendix appendix = new Appendix();
if (contractMapper.queryOne(contractVo.getContract_unid()) != null) {
contractMapper.updateOne(contractVo);
failCode.setEcode("600");
failCode.setEnote("已存在");
return failCode;
} else {
contractVo.setIs_delete(false);
contractMapper.addOne(contractVo);
......@@ -156,7 +158,7 @@ public class ContractServiceImpl implements ContractService {
}
}
public boolean isDelete(String s) {
public Boolean isDelete(String s) {
return contractMapper.isDelete(s);
}
......@@ -426,36 +428,48 @@ public class ContractServiceImpl implements ContractService {
if(exportModel.getAmount_state_unid()!=null) {
switch(exportModel.getAmount_state_unid()) {
case "50001" :
exportModel.setAmount_state_unid_name("正常预付款");
exportModel.setAmount_state_unid_name("正常验收款");
break;
case "50002" :
exportModel.setAmount_state_unid_name("正常到货款");
exportModel.setAmount_state_unid_name("正常维保");
break;
case "50003" :
exportModel.setAmount_state_unid_name("正常验收款");
exportModel.setAmount_state_unid_name("正常预付款");
break;
case "50004" :
exportModel.setAmount_state_unid_name("正常维保款");
exportModel.setAmount_state_unid_name("正常到货款");
break;
case "50005" :
exportModel.setAmount_state_unid_name("正常质保款");
break;
case "50006" :
exportModel.setAmount_state_unid_name("逾期预付款");
break;
case "50007" :
exportModel.setAmount_state_unid_name("逾期到货款");
break;
case "50008" :
exportModel.setAmount_state_unid_name("逾期验收款");
break;
case "50009" :
exportModel.setAmount_state_unid_name("逾期质保款");
break;
default:
break;
}
}
if(exportModel.getProduct_line_type()!=null) {
switch(exportModel.getProduct_line_type()) {
case "1" :
case "20001" :
exportModel.setProduct_line_type_name("安防");
break;
case "2" :
case "20002" :
exportModel.setProduct_line_type_name("交通");
break;
case "3" :
case "20003" :
exportModel.setProduct_line_type_name("客流");
break;
case "4" :
case "20004" :
exportModel.setProduct_line_type_name("维保");
break;
default:
......
......@@ -39,7 +39,8 @@ public class DeliverGoodsServiceImpl implements DeliverGoodsService {
try {
Appendix appendix = new Appendix();
logger.info("=====================增加发货信息=====================");
if(!contractService.isDelete(s)) {
Boolean isdelete = contractService.isDelete(s);
if (isdelete != null && !isdelete) {
List<DeliverGoods> list=deliverGoodsVo.getList_deliver_data();
for(DeliverGoods deliverGoods:list) {
deliverGoods.setContract_unid(s);
......@@ -75,7 +76,8 @@ public class DeliverGoodsServiceImpl implements DeliverGoodsService {
deliverGoodsVo.setList_deliver_data(new ArrayList());
Appendix appendix = null;
logger.info("========================查询发货信息========================");
if(!contractService.isDelete(s)) {
Boolean isdelete = contractService.isDelete(s);
if (isdelete != null && !isdelete) {
List<DeliverGoods> list=deliverGoodsMapper.queryDeliverGoods(s);
if(list!=null) {
for(DeliverGoods deliverGoods:list) {
......@@ -109,7 +111,8 @@ public class DeliverGoodsServiceImpl implements DeliverGoodsService {
try {
Appendix appendix=null;
logger.info("===========================修改发货信息===========================");
if(!contractService.isDelete(s)) {
Boolean isdelete = contractService.isDelete(s);
if (isdelete != null && !isdelete) {
List<DeliverGoods> list_deliver_data=deliverGoodsVo.getList_deliver_data();
for(DeliverGoods deliverGoods:list_deliver_data) {
deliverGoodsMapper.updateDeliverGoods(deliverGoods);
......@@ -144,7 +147,8 @@ public class DeliverGoodsServiceImpl implements DeliverGoodsService {
try {
logger.info("=========================删除合同发货信息=======================");
Appendix appendix=null;
if(!contractService.isDelete(s)) {
Boolean isdelete = contractService.isDelete(s);
if (isdelete != null && !isdelete) {
if(deliverGoodsVo.getDeliver_unids()!=null) {
for(int deliverUnid :deliverGoodsVo.getDeliver_unids()) {
deliverGoodsMapper.deleteDeliverGoods(deliverUnid);
......
......@@ -31,7 +31,8 @@ public class PaymentAgreeServiceImpl implements PaymentAgreeService {
public Object addPaymentAgree(PaymentAgreeVo paymentAgreeVo, String s) {
try {
logger.info("==============增加付款约定信息===================");
if (!contractServiceImpl.isDelete(s)) {
Boolean isdelete = contractServiceImpl.isDelete(s);
if (isdelete != null && !isdelete) {
List<PaymentAgree> list = paymentAgreeVo.getList_payment_data();
for (PaymentAgree paymentAgree : list) {
paymentAgree.setContract_unid(s);
......@@ -56,7 +57,8 @@ public class PaymentAgreeServiceImpl implements PaymentAgreeService {
public Object queryPaymentAgree(String s) {
try {
logger.info("===============查询付款约定信息start=====================");
if (!contractServiceImpl.isDelete(s)) {
Boolean isdelete = contractServiceImpl.isDelete(s);
if (isdelete != null && !isdelete) {
return paymentAgreeMapper.queryPaymentAgree(s);
}
failCode.setEcode("100");
......@@ -77,7 +79,8 @@ public class PaymentAgreeServiceImpl implements PaymentAgreeService {
try {
logger.info("==============修改付款约定信息===================");
if (!contractServiceImpl.isDelete(s)) {
Boolean isdelete = contractServiceImpl.isDelete(s);
if (isdelete != null && !isdelete) {
List<PaymentAgree> list = paymentAgreeVo.getList_payment_data();
for (PaymentAgree paymentAgree : list) {
paymentAgree.setContract_unid(s);
......@@ -103,7 +106,8 @@ public class PaymentAgreeServiceImpl implements PaymentAgreeService {
// TODO Auto-generated method stub
try {
logger.info("==============删除付款约定信息===================");
if (!contractServiceImpl.isDelete(s)) {
Boolean isdelete = contractServiceImpl.isDelete(s);
if (isdelete != null && !isdelete) {
List<Integer> list = paymentAgreeVo.getPayment_unids();
for (int n : list) {
//paymentAgree.setContract_unid(s);
......
......@@ -39,7 +39,8 @@ public class ProjectAcceptancServiceImpl implements ProjectAcceptancService {
try {
Appendix appendix = new Appendix();
logger.info("=====================增加合同验收信息=====================");
if(!contractService.isDelete(s)) {
Boolean isdelete = contractService.isDelete(s);
if (isdelete != null && !isdelete) {
List<ProjectAcceptanc> list=projectAcceptancVo.getList_check_data();
for(ProjectAcceptanc projectAcceptanc:list) {
projectAcceptanc.setContract_unid(s);
......@@ -76,7 +77,8 @@ public class ProjectAcceptancServiceImpl implements ProjectAcceptancService {
projectAcceptancVo.setList_check_data(new ArrayList());
Appendix appendix = null;
logger.info("========================查询合同验收信息========================");
if(!contractService.isDelete(s)) {
Boolean isdelete = contractService.isDelete(s);
if (isdelete != null && !isdelete) {
List<ProjectAcceptanc> list=projectAcceptancMapper.queryProjectAcceptanc(s);
for(ProjectAcceptanc projectAcceptanc:list) {
appendix = new Appendix();
......@@ -108,7 +110,8 @@ public class ProjectAcceptancServiceImpl implements ProjectAcceptancService {
try {
logger.info("===========================修改合同验收信息===========================");
Appendix appendix=null;
if(!contractService.isDelete(s)) {
Boolean isdelete = contractService.isDelete(s);
if (isdelete != null && !isdelete){
List<ProjectAcceptanc> list=projectAcceptancVo.getList_check_data();
for(ProjectAcceptanc projectAcceptanc:list) {
projectAcceptanc.setContract_unid(s);
......@@ -144,7 +147,8 @@ public class ProjectAcceptancServiceImpl implements ProjectAcceptancService {
try {
logger.info("===========================删除合同验收信息===========================");
Appendix appendix =null;
if(!contractService.isDelete(s)) {
Boolean isdelete = contractService.isDelete(s);
if (isdelete != null && !isdelete) {
List<Integer> list=projectAcceptancVo.getAcceptanc_unids();
for(int n:list) {
projectAcceptancMapper.deleteProjectAcceptanc(n);
......
......@@ -31,7 +31,8 @@ public class ReceiptServiceImpl implements ReceiptService {
// TODO Auto-generated method stub
try {
logger.info("=====================增加合同开票信息=====================");
if(! contractServiceImpl.isDelete(s)) {
Boolean isdelete = contractServiceImpl.isDelete(s);
if (isdelete != null && !isdelete) {
List<Receipt> list=receiptVo.getList_receipt_data();
for(Receipt receipt: list) {
receipt.setContract_unid(s);
......@@ -56,7 +57,8 @@ public class ReceiptServiceImpl implements ReceiptService {
// TODO Auto-generated method stub
try {
logger.info("========================查询合同开票信息=======================");
if(!contractServiceImpl.isDelete(s)) {
Boolean isdelete = contractServiceImpl.isDelete(s);
if (isdelete != null && !isdelete) {
return receiptMapper.queryReceipt(s);
}else {
failCode.setEcode("100");
......@@ -76,7 +78,8 @@ public class ReceiptServiceImpl implements ReceiptService {
// TODO Auto-generated method stub
try {
logger.info("===================修改合同开票信息========================");
if(!contractServiceImpl.isDelete(s)) {
Boolean isdelete = contractServiceImpl.isDelete(s);
if (isdelete != null && !isdelete) {
List<Receipt> list=receiptVo.getList_receipt_data();
for(Receipt receipt:list) {
receipt.setContract_unid(s);
......@@ -102,7 +105,8 @@ public class ReceiptServiceImpl implements ReceiptService {
// TODO Auto-generated method stub
try {
logger.info("=========================删除合同开票信息=======================");
if(!contractServiceImpl.isDelete(s)) {
Boolean isdelete = contractServiceImpl.isDelete(s);
if (isdelete != null && !isdelete) {
List<Integer> list=receiptVo.getReceipt_unids();
for(int n :list) {
receiptMapper.deleteReceipt(n);
......
......@@ -33,7 +33,8 @@ public class ReturnInfoServiceImpl implements ReturnInfoService {
// TODO Auto-generated method stub
try {
logger.info("==============增加合同回款信息===================");
if(! contractServiceImpl.isDelete(s)) {
Boolean isdelete = contractServiceImpl.isDelete(s);
if (isdelete != null && !isdelete) {
List<ReturnInfo> list = returnInfoVo.getList_reback_data();
for(ReturnInfo returnInfo:list) {
returnInfo.setContract_unid(s);
......@@ -59,7 +60,8 @@ public class ReturnInfoServiceImpl implements ReturnInfoService {
// TODO Auto-generated method stub
try {
logger.info("===============查询回款信息=====================");
if(!contractServiceImpl.isDelete(s)){
Boolean isdelete = contractServiceImpl.isDelete(s);
if (isdelete != null && !isdelete) {
return returnInfoMapper.queryReturnInfo(s);
}else {
failCode.setEcode("100");
......@@ -80,7 +82,8 @@ public class ReturnInfoServiceImpl implements ReturnInfoService {
// TODO Auto-generated method stub
try {
logger.info("==============修改回款信息===================");
if(! contractServiceImpl.isDelete(s)) {
Boolean isdelete = contractServiceImpl.isDelete(s);
if (isdelete != null && !isdelete) {
List<ReturnInfo> list = returnInfoVo.getList_reback_data();
for(ReturnInfo returnInfo:list) {
returnInfo.setContract_unid(s);
......@@ -106,7 +109,8 @@ public class ReturnInfoServiceImpl implements ReturnInfoService {
// TODO Auto-generated method stub
try {
logger.info("==============删除回款信息===================");
if(!contractServiceImpl.isDelete(s)) {
Boolean isdelete = contractServiceImpl.isDelete(s);
if (isdelete != null && !isdelete) {
List<Integer> list = paymentAgreeVo.getReback_unids();
for(int n:list) {
//returnInfo.setContract_unid(s);
......
......@@ -55,7 +55,7 @@ public class ContractVo extends SelectVo{
private Integer over_days;
private String year;
private String month;
private String salesperson_name;
private String salesperson_name;
private String province_name;
private String city_name;
private String county_name;
......@@ -69,14 +69,12 @@ public class ContractVo extends SelectVo{
private Double advance_pay; //预付款金额
private Double arrive_pay;
private Double acceptanc_pay;
private Double mainten_pay_deliver;
private Double mainten_pay_acceptanc;
private Double mainten_pay;
private Date advance_pay_date; //预付款到期日
private Date arrive_pay_date;
private Date acceptanc_pay_date;
private Date mainten_pay_deliver_date; //质保款发货节点计算
private Date mainten_pay_acceptanc_date; //质保款验收节点计算
private Date mainten_pay_date; //质保款
private Date deliver_date; //发货日期
private Date acceptanc_date; //验收日期
......@@ -377,18 +375,6 @@ public class ContractVo extends SelectVo{
public void setAcceptanc_pay(Double acceptanc_pay) {
this.acceptanc_pay = acceptanc_pay;
}
public Double getMainten_pay_deliver() {
return mainten_pay_deliver;
}
public void setMainten_pay_deliver(Double mainten_pay_deliver) {
this.mainten_pay_deliver = mainten_pay_deliver;
}
public Double getMainten_pay_acceptanc() {
return mainten_pay_acceptanc;
}
public void setMainten_pay_acceptanc(Double mainten_pay_acceptanc) {
this.mainten_pay_acceptanc = mainten_pay_acceptanc;
}
@JsonSerialize(using = DateYMDHMSJsonSerializer.class)
public Date getAdvance_pay_date() {
return advance_pay_date;
......@@ -411,20 +397,6 @@ public class ContractVo extends SelectVo{
this.acceptanc_pay_date = acceptanc_pay_date;
}
@JsonSerialize(using = DateYMDHMSJsonSerializer.class)
public Date getMainten_pay_deliver_date() {
return mainten_pay_deliver_date;
}
public void setMainten_pay_deliver_date(Date mainten_pay_deliver_date) {
this.mainten_pay_deliver_date = mainten_pay_deliver_date;
}
@JsonSerialize(using = DateYMDHMSJsonSerializer.class)
public Date getMainten_pay_acceptanc_date() {
return mainten_pay_acceptanc_date;
}
public void setMainten_pay_acceptanc_date(Date mainten_pay_acceptanc_date) {
this.mainten_pay_acceptanc_date = mainten_pay_acceptanc_date;
}
@JsonSerialize(using = DateYMDHMSJsonSerializer.class)
public Date getDeliver_date() {
return deliver_date;
}
......@@ -498,6 +470,19 @@ public class ContractVo extends SelectVo{
public void setAmount_state_unid_name(String amount_state_unid_name) {
this.amount_state_unid_name = amount_state_unid_name;
}
public Double getMainten_pay() {
return mainten_pay;
}
public void setMainten_pay(Double mainten_pay) {
this.mainten_pay = mainten_pay;
}
@JsonSerialize(using = DateYMDHMSJsonSerializer.class)
public Date getMainten_pay_date() {
return mainten_pay_date;
}
public void setMainten_pay_date(Date mainten_pay_date) {
this.mainten_pay_date = mainten_pay_date;
}
}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!