|
|
@@ -9,6 +9,8 @@ package models
|
|
|
import (
|
|
|
"fmt"
|
|
|
"mtp2_if/db"
|
|
|
+ "mtp2_if/mtpcache"
|
|
|
+ "strconv"
|
|
|
)
|
|
|
|
|
|
// ErmcpOPLogModel 变更变记录
|
|
|
@@ -26,6 +28,13 @@ type ErmcpOPLogModel struct {
|
|
|
APPLYNAME string `json:"applyname" xorm:"'APPLYNAME'"` // 操作人名称
|
|
|
}
|
|
|
|
|
|
+func (r *ErmcpOPLogModel) calc() {
|
|
|
+ if r.APPLYNAME == "" {
|
|
|
+ id, _ := strconv.ParseInt(r.APPLYID, 10, 64)
|
|
|
+ r.APPLYNAME = mtpcache.GetSystemmangerLoginCode(id)
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
func (r *ErmcpOPLogModel) decodeOperateLogType() {
|
|
|
//1:点价价格 2:点价数量 3:结算量 4:其它费用 5:追加保证金 6溢短金额 7:调整金额 8:付款金额 9:收款金额 10:退款金额
|
|
|
//11:收票金额 12:开票金额 13:提交审核(合同) 14:审核通过(合同) 15:审核拒绝(合同) 16:合同撤回 17:提交审核(计划)
|
|
|
@@ -67,6 +76,7 @@ func (r *ErmcpOPLogModel) GetData() ([]ErmcpOPLogModel, error) {
|
|
|
// 类型解析成中文
|
|
|
for i := range sData {
|
|
|
sData[i].decodeOperateLogType()
|
|
|
+ sData[i].calc()
|
|
|
}
|
|
|
return sData, nil
|
|
|
}
|