Commit d60d3763 authored by lizhichao's avatar lizhichao

资金操作表,添加document_type字段。1.交易单 2.借支单 3.外部采购单 4.借贷单

关联单据,记录单据id
parent 50f60a9f
......@@ -48,6 +48,16 @@ public class TCashOperate extends BaseEntity
private String operateDeptName;
public String getDocumentType() {
return documentType;
}
public void setDocumentType(String documentType) {
this.documentType = documentType;
}
private String documentType;
public void setOperateId(Long operateId)
{
this.operateId = operateId;
......
......@@ -113,7 +113,8 @@ public class SettlementTrade {
tAccount.setAbleAmount(tAccount.getAbleAmount().add(amount));
tAccountMapper.updateTAccount(tAccount);
//更新资金变动日志
TCashOperate operate = OperatorParam(tAccount.getDeptId(),amount,this.tradeProject.getReceiptNum());
TCashOperate operate = OperatorParam(tAccount.getDeptId(),amount,this.tradeProject.getTradeId().toString());
operate.setDocumentType("1");//1.交易单 2.借支单 3.外部采购单 4.借贷单
operate.setOperateType(amount.compareTo(BigDecimal.ZERO) == 1 ? "1" : "2");
cashOperateMapper.insertTCashOperate(operate);
}
......@@ -132,8 +133,9 @@ public class SettlementTrade {
project.setPendingPayment(pendingPayment);
tTradeProjectMapper.updateTTradeProject(project);
//更新资金变动日志
TCashOperate operate = OperatorParam(project.getTradeDeptId(),amount,project.getReceiptNum());
TCashOperate operate = OperatorParam(project.getTradeDeptId(),amount,project.getTradeId().toString());
operate.setOperateType("3");
operate.setDocumentType("1");//1.交易单 2.借支单 3.外部采购单 4.借贷单
cashOperateMapper.insertTCashOperate(operate);
return amount;
}
......
......@@ -51,6 +51,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateTime != null">update_time,</if>
<if test="isDel != null">is_del,</if>
<if test="remark != null">remark,</if>
<if test="documentType != null">document_type,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="operateDeptId != null">#{operateDeptId},</if>
......@@ -62,6 +63,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateTime != null">#{updateTime},</if>
<if test="isDel != null">#{isDel},</if>
<if test="remark != null">#{remark},</if>
<if test="documentType != null">#{documentType}</if>
</trim>
</insert>
......
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