作者 yangfu
@@ -9,7 +9,6 @@ type CooperationContractItem struct { @@ -9,7 +9,6 @@ type CooperationContractItem struct {
9 CooperationContractId int `json:"cooperationContractId,string,"` 9 CooperationContractId int `json:"cooperationContractId,string,"`
10 CooperationContractNumber string `json:"cooperationContractNumber"` //合约编号 10 CooperationContractNumber string `json:"cooperationContractNumber"` //合约编号
11 CooperationProjectNumber string `json:"cooperationProjectNumber"` //项目编号 11 CooperationProjectNumber string `json:"cooperationProjectNumber"` //项目编号
12 - CooperationProjectId string `json:"cooperationProjectId"` //项目编号  
13 CooperationContractName string `json:"cooperationContractName"` //合约名称 12 CooperationContractName string `json:"cooperationContractName"` //合约名称
14 Status int `json:"status"` //合约状态 13 Status int `json:"status"` //合约状态
15 CreateTime int `json:"createTime"` 14 CreateTime int `json:"createTime"`
@@ -35,7 +34,6 @@ func ToCooperationContractItem(param *allied_creation_cooperation.CooperationCon @@ -35,7 +34,6 @@ func ToCooperationContractItem(param *allied_creation_cooperation.CooperationCon
35 CooperationContractDescription: param.CooperationContractDescription, 34 CooperationContractDescription: param.CooperationContractDescription,
36 CooperationContractId: param.CooperationContractId, 35 CooperationContractId: param.CooperationContractId,
37 CooperationProjectNumber: param.CooperationProjectNumber, 36 CooperationProjectNumber: param.CooperationProjectNumber,
38 - CooperationProjectId: param.CooperationProjectNumber,  
39 CooperationContractName: param.CooperationContractName, 37 CooperationContractName: param.CooperationContractName,
40 CooperationContractNumber: param.CooperationContractNumber, 38 CooperationContractNumber: param.CooperationContractNumber,
41 Status: param.Status, 39 Status: param.Status,
@@ -75,7 +73,7 @@ type DividendsIncentivesRule struct { @@ -75,7 +73,7 @@ type DividendsIncentivesRule struct {
75 ReferrerPercentage float64 `json:"referrerPercentage"` // 推荐人抽成比例 73 ReferrerPercentage float64 `json:"referrerPercentage"` // 推荐人抽成比例
76 SalesmanPercentage float64 `json:"salesmanPercentage"` // 业务员抽成比例 74 SalesmanPercentage float64 `json:"salesmanPercentage"` // 业务员抽成比例
77 DividendsPercentage float64 `json:"dividendsPercentage"` // 分红规则激励百分点 75 DividendsPercentage float64 `json:"dividendsPercentage"` // 分红规则激励百分点
78 - DividendsStage int `json:"dividendsStage,string"` // 分红规则激励阶段, 76 + DividendsStage int `json:"dividendsStage"` // 分红规则激励阶段,
79 DividendsStageEnd int64 `json:"dividendsStageEnd"` // 分红规则激励阶段结束 77 DividendsStageEnd int64 `json:"dividendsStageEnd"` // 分红规则激励阶段结束
80 DividendsStageStart int64 `json:"dividendsStageStart"` // 分红规则激励阶段开始 78 DividendsStageStart int64 `json:"dividendsStageStart"` // 分红规则激励阶段开始
81 } 79 }
@@ -181,6 +179,7 @@ func ToCooperationContractInfo(param *allied_creation_cooperation.CooperationCon @@ -181,6 +179,7 @@ func ToCooperationContractInfo(param *allied_creation_cooperation.CooperationCon
181 UsersName: v.UserInfo.UserName, 179 UsersName: v.UserInfo.UserName,
182 UsersId: v.UserId, 180 UsersId: v.UserId,
183 Phone: v.UserInfo.UserPhone, 181 Phone: v.UserInfo.UserPhone,
  182 + UserCode: v.UserInfo.UserCode,
184 }, 183 },
185 } 184 }
186 u.SalesmanUser.UserId = v.Salesman.UserId 185 u.SalesmanUser.UserId = v.Salesman.UserId
@@ -52,9 +52,9 @@ func ToCreditAccountItem(param *allied_creation_cooperation.CreditAccount) *Cred @@ -52,9 +52,9 @@ func ToCreditAccountItem(param *allied_creation_cooperation.CreditAccount) *Cred
52 ActuallyPaidAmount: param.ActuallyPaidAmount, 52 ActuallyPaidAmount: param.ActuallyPaidAmount,
53 CreditAccountOrderNum: param.CreditAccountOrderNum, 53 CreditAccountOrderNum: param.CreditAccountOrderNum,
54 PaymentStatus: param.PaymentStatus, 54 PaymentStatus: param.PaymentStatus,
55 - PaymentTime: param.PaymentTime.UnixNano() / 1e6, 55 + PaymentTime: 0,
56 SettlementAmount: param.SettlementAmount, 56 SettlementAmount: param.SettlementAmount,
57 - SettlementTime: param.SettlementTime.UnixNano() / 1e6, 57 + SettlementTime: 0,
58 CooperationContractNumber: param.CooperationContractNumber, 58 CooperationContractNumber: param.CooperationContractNumber,
59 ParticipateType: param.ParticipateType, // 参与类型 59 ParticipateType: param.ParticipateType, // 参与类型
60 PaymentDocumentAttachment: param.PaymentDocumentAttachment, // 支付凭证附件 60 PaymentDocumentAttachment: param.PaymentDocumentAttachment, // 支付凭证附件
@@ -63,6 +63,12 @@ func ToCreditAccountItem(param *allied_creation_cooperation.CreditAccount) *Cred @@ -63,6 +63,12 @@ func ToCreditAccountItem(param *allied_creation_cooperation.CreditAccount) *Cred
63 UpdatedAt: param.UpdatedAt.UnixNano() / 1e6, // 更新时间 63 UpdatedAt: param.UpdatedAt.UnixNano() / 1e6, // 更新时间
64 AccountDetail: param.AccountDetail, 64 AccountDetail: param.AccountDetail,
65 } 65 }
  66 + if !param.PaymentTime.IsZero() {
  67 + data.PaymentTime = param.PaymentTime.UnixNano() / 1e6
  68 + }
  69 + if !param.SettlementTime.IsZero() {
  70 + data.SettlementTime = param.PaymentTime.UnixNano() / 1e6
  71 + }
66 data.Org.OrgID = param.Org.OrgID 72 data.Org.OrgID = param.Org.OrgID
67 data.Org.OrgName = param.Org.OrgName 73 data.Org.OrgName = param.Org.OrgName
68 data.Participator.UserName = param.Participator.UserName 74 data.Participator.UserName = param.Participator.UserName
@@ -30,7 +30,7 @@ func (dividendsOrderService *DividendsOrderService) CreateDividendsOrder(createD @@ -30,7 +30,7 @@ func (dividendsOrderService *DividendsOrderService) CreateDividendsOrder(createD
30 OrderGoodPrice: v.OrderGoodPrice, 30 OrderGoodPrice: v.OrderGoodPrice,
31 OrderGoodQuantity: v.OrderGoodQuantity, 31 OrderGoodQuantity: v.OrderGoodQuantity,
32 } 32 }
33 - orderGoodAmount := v.OrderGoodPrice * float64(v.OrderGoodQuantity) 33 + orderGoodAmount := v.OrderGoodPrice*float64(v.OrderGoodQuantity) - v.OrderGoodExpense
34 good.OrderGoodAmount = orderGoodAmount 34 good.OrderGoodAmount = orderGoodAmount
35 orderGoods = append(orderGoods, good) 35 orderGoods = append(orderGoods, good)
36 } 36 }
@@ -120,7 +120,7 @@ func (dividendsOrderService *DividendsOrderService) UpdateDividendsOrder(updateD @@ -120,7 +120,7 @@ func (dividendsOrderService *DividendsOrderService) UpdateDividendsOrder(updateD
120 OrderGoodPrice: v.OrderGoodPrice, 120 OrderGoodPrice: v.OrderGoodPrice,
121 OrderGoodQuantity: v.OrderGoodQuantity, 121 OrderGoodQuantity: v.OrderGoodQuantity,
122 } 122 }
123 - orderGoodAmount := v.OrderGoodPrice * float64(v.OrderGoodQuantity) 123 + orderGoodAmount := v.OrderGoodPrice*float64(v.OrderGoodQuantity) - v.OrderGoodExpense
124 good.OrderGoodAmount = orderGoodAmount 124 good.OrderGoodAmount = orderGoodAmount
125 orderGoods = append(orderGoods, good) 125 orderGoods = append(orderGoods, good)
126 } 126 }
@@ -13,6 +13,7 @@ type CooperationApplication struct { @@ -13,6 +13,7 @@ type CooperationApplication struct {
13 UserAvatar string `json:"userAvatar"` 13 UserAvatar string `json:"userAvatar"`
14 UserEmail string `json:"userEmail"` 14 UserEmail string `json:"userEmail"`
15 UserName string `json:"userName"` 15 UserName string `json:"userName"`
  16 + UserCode string `json:"userCode"`
16 UserPhone string `json:"userPhone"` 17 UserPhone string `json:"userPhone"`
17 UserAccount string `json:"userAccount"` 18 UserAccount string `json:"userAccount"`
18 } `json:"userInfo"` 19 } `json:"userInfo"`
@@ -63,6 +63,7 @@ type CooperationContract struct { @@ -63,6 +63,7 @@ type CooperationContract struct {
63 UserName string `json:"userName"` // 共创人员姓名 63 UserName string `json:"userName"` // 共创人员姓名
64 UserPhone string `json:"userPhone"` // 用户手机号 64 UserPhone string `json:"userPhone"` // 用户手机号
65 UserAccount string `json:"userAccount"` // 用户账号,区别于手机号,冗余字段 65 UserAccount string `json:"userAccount"` // 用户账号,区别于手机号,冗余字段
  66 + UserCode string `json:"userCode"`
66 } `json:"userInfo"` 67 } `json:"userInfo"`
67 Department struct { 68 Department struct {
68 DepartmentId int64 `json:"departmentId,string,"` // 部门ID 69 DepartmentId int64 `json:"departmentId,string,"` // 部门ID
@@ -74,6 +74,7 @@ func (controller *CooperationContractController) EnableCooperationContract() { @@ -74,6 +74,7 @@ func (controller *CooperationContractController) EnableCooperationContract() {
74 controller.Response(nil, err) 74 controller.Response(nil, err)
75 return 75 return
76 } 76 }
  77 + enableCooperationContractCommand.Operator = controller.GetOperator()
77 data, err := cooperationContractService.EnableCooperationContract(enableCooperationContractCommand) 78 data, err := cooperationContractService.EnableCooperationContract(enableCooperationContractCommand)
78 controller.Response(data, err) 79 controller.Response(data, err)
79 } 80 }
@@ -101,6 +102,7 @@ func (controller *CooperationContractController) RemoveCooperationContract() { @@ -101,6 +102,7 @@ func (controller *CooperationContractController) RemoveCooperationContract() {
101 controller.Response(nil, err) 102 controller.Response(nil, err)
102 return 103 return
103 } 104 }
  105 + removeCooperationContractCommand.Operator = controller.GetOperator()
104 data, err := cooperationContractService.RemoveCooperationContract(removeCooperationContractCommand) 106 data, err := cooperationContractService.RemoveCooperationContract(removeCooperationContractCommand)
105 controller.Response(data, err) 107 controller.Response(data, err)
106 } 108 }