Commit f0daa277 by 谢明辉

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

2 parents b185b915 813092f8
......@@ -3,32 +3,34 @@ package com.vion.financial.entity;
import java.util.Date;
public class Receipt {
private int receipt_unid;
private Integer receipt_unid;
private String contract_unid;
private int receipt_progress;
private Integer receipt_progress;
private Double receipt_amount;
private String oa_flow_id;
private String receipt_note;
private Date create_date;
public int getReceipt_unid() {
return receipt_unid;
}
public void setReceipt_unid(int receipt_unid) {
this.receipt_unid = receipt_unid;
}
public String getContract_unid() {
return contract_unid;
}
public void setContract_unid(String contract_unid) {
this.contract_unid = contract_unid;
}
public int getReceipt_progress() {
public Integer getReceipt_unid() {
return receipt_unid;
}
public void setReceipt_unid(Integer receipt_unid) {
this.receipt_unid = receipt_unid;
}
public Integer getReceipt_progress() {
return receipt_progress;
}
public void setReceipt_progress(int receipt_progress) {
public void setReceipt_progress(Integer receipt_progress) {
this.receipt_progress = receipt_progress;
}
public Double getReceipt_amount() {
return receipt_amount;
}
......
......@@ -6,28 +6,30 @@ import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.vion.financial.serializer.DateYMDHMSJsonSerializer;
public class ReturnInfo {
private int reback_unid;
private Integer reback_unid;
private String contract_unid;
private int reback_progress;
private Integer reback_progress;
private Date reback_date;
private Double actual_reback_amount;
private String reback_note;
public int getReback_unid() {
return reback_unid;
}
public void setReback_unid(int reback_unid) {
this.reback_unid = reback_unid;
}
public String getContract_unid() {
return contract_unid;
}
public void setContract_unid(String contract_unid) {
this.contract_unid = contract_unid;
}
public int getReback_progress() {
public Integer getReback_unid() {
return reback_unid;
}
public void setReback_unid(Integer reback_unid) {
this.reback_unid = reback_unid;
}
public Integer getReback_progress() {
return reback_progress;
}
public void setReback_progress(int reback_progress) {
public void setReback_progress(Integer reback_progress) {
this.reback_progress = reback_progress;
}
@JsonSerialize(using = DateYMDHMSJsonSerializer.class)
......
......@@ -302,8 +302,8 @@
where contract_unid=#{contract_unid}
</update>
<delete id="deleteOne" parameterType="java.lang.String">
update tb_contract set is_delete = true where contract_unid = #{contract_unid}
<!-- delete from tb_contract where contract_unid = #{contract_unid} -->
<!-- update tb_contract set is_delete = true where contract_unid = #{contract_unid} -->
delete from tb_contract where contract_unid = #{contract_unid}
</delete>
<select id="count" parameterType="com.vion.financial.vo.SelectVo" resultType="int">
......@@ -565,7 +565,14 @@
<select id="exportContracts" parameterType="com.vion.financial.vo.SelectVo" resultType="com.vion.financial.excel.ExportModel">
select
select (
<if test="columns == null">
*
</if>
<foreach collection="columns" index="index" item="column" open=" " separator="," close=" ">
#{column}
</foreach>
) from (select
contract_unid, salesperson_unid, province, city, county, province_name,city_name,county_name,
guarantee_period, sign_date, product_line_type, contract_state,
contract_type, cast(contract_amount as decimal(18,2)), cast(deduct_amount as decimal(18,2)), contract_amount_note,
......@@ -709,7 +716,8 @@
</if>
and is_delete=false
and project_unid is not null
and customer_unid is not null
and customer_unid is not null
)
</select>
......
......@@ -7,7 +7,16 @@
receipt_note,
</if>
create_date)
values( #{contract_unid},#{receipt_progress},#{receipt_amount},#{oa_flow_id},
values( #{contract_unid},
<choose>
<when test="receipt_progress == null">
(select case when max(receipt_progress) is null then 1 else max(receipt_progress)+1 end as receipt_progress from tb_receipt where tb_receipt.contract_unid=#{contract_unid})
</when>
<otherwise>
#{receipt_progress}
</otherwise>
</choose>
,#{receipt_amount},#{oa_flow_id},
<if test="receipt_note !=null and receipt_note !=''">
#{receipt_note},
</if>
......
......@@ -4,9 +4,7 @@
<insert id="addReturnInfo" parameterType="com.vion.financial.entity.ReturnInfo">
insert into tb_return_info (
contract_unid,
<if test="reback_progress !=null and reback_progress !=''">
reback_progress,
</if>
<if test="reback_date !=null">
reback_date,
</if>
......@@ -17,9 +15,12 @@
)
values (
#{contract_unid},
<if test="reback_progress !=null and reback_progress !=''">
<if test="reback_progress !=null">
#{reback_progress},
</if>
<if test="reback_progress ==null">
(select case when max(reback_progress) is null then 1 else max(reback_progress)+1 end as reback_progress from tb_return_info where tb_return_info.contract_unid=#{contract_unid}),
</if>
<if test="reback_date !=null">
#{reback_date,typeHandler=com.vion.financial.handler.MilliDateTypeHandler},
</if>
......
......@@ -697,7 +697,7 @@ public class ContractServiceImpl implements ContractService {
}
}
}
if(contractVo.getSalesperson_unid()==null) {
if(contractVo.getSalesperson_unid()==null && StringUtils.isNotBlank(importModel.getSalesperson_name())) {
Map tempMap=new HashMap();
tempMap.put("norm_type", "employee");
tempMap.put("username", importModel.getSalesperson_name());
......@@ -888,12 +888,12 @@ public class ContractServiceImpl implements ContractService {
returnInfo.setActual_reback_amount(importModel.getReback_amount());
returnInfo.setReback_date(importModel.getReback_date());
returnInfo.setReback_note(importModel.getReback_note());
returnInfo.setReback_progress(1);
//returnInfo.setReback_progress(1);
receipt.setContract_unid(importModel.getContract_unid());
receipt.setReceipt_amount(importModel.getReceipt_amount());
receipt.setOa_flow_id(importModel.getOa_flow_id());
receipt.setReceipt_note(importModel.getReceipt_note());
receipt.setReceipt_progress(1);
//receipt.setReceipt_progress(1);
if(importModel.getPre_acceptanc() != null && importModel.getPre_acceptanc().equals("是")) {
projectAcceptanc_pre.setAcceptanc_type("1");
projectAcceptanc_pre.setContract_unid(importModel.getContract_unid());
......@@ -908,7 +908,6 @@ public class ContractServiceImpl implements ContractService {
}
//ContractVo contracto=contractMapper.queryOne(contractVo.getContract_unid());
if(!contractIdList.contains(contractVo.getContract_unid())) {
System.out.println("contractVo="+JavaBean2Json.javaBean2Json(contractVo));
contractMapper.addOne(contractVo);
contractIdList.add(contractVo.getContract_unid());
//if(paymentAgreeMapper.queryPaymentAgree(importModel.getContract_unid()).size()==0 ) {
......@@ -948,26 +947,26 @@ public class ContractServiceImpl implements ContractService {
}
}
//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) {
returnInfoMapper.addReturnInfo(returnInfo);
}
}else {
/*}else {
if(importModel.getReback_date()!=null ||importModel.getReback_amount()!=null ||importModel.getReback_note()!=null) {
is_repeat=false;
repeatListId.add(contractVo.getContract_unid());
}
}
if( receiptMapper.queryReceipt(importModel.getContract_unid()).size()==0) {
}*/
//if( receiptMapper.queryReceipt(importModel.getContract_unid()).size()==0) {
if(receipt.getReceipt_amount()!=null||receipt.getOa_flow_id()!=null||receipt.getReceipt_note()!=null) {
receiptMapper.addReceipt(receipt);
}
}else {
/*}else {
if(importModel.getReceipt_amount()!=null||importModel.getOa_flow_id()!=null||importModel.getReceipt_note()!=null) {
is_repeat=false;
repeatListId.add(contractVo.getContract_unid());
}
}
}*/
if(/*projectAcceptanc_pre.getContract_unid() != null && projectAcceptanc_end.getContract_unid() != null &&*/ projectAcceptancMapper.queryProjectAcceptanc(importModel.getContract_unid()).size()==0) {
if(projectAcceptanc_pre.getAcceptanc_date()!=null ||projectAcceptanc_pre.getAcceptanc_note()!=null ||projectAcceptanc_pre.getAcceptanc_type()!=null) {
projectAcceptancMapper.addProjectAcceptanc(projectAcceptanc_pre);
......@@ -1055,4 +1054,6 @@ public class ContractServiceImpl implements ContractService {
failCode.setEnote("导入异常");
return failCode;
}
}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!