作者 yangfu
... ... @@ -19,13 +19,13 @@ type CreditAccountItem struct {
UserPhone string `json:"userPhone"` // 用户手机号
UserType int `json:"userType"` // 用户类型,1员工,2共创用户,3公开
} `json:"participator"` // 参与人
ParticipateType string `json:"participateType"` // 参与类型
PaymentDocumentAttachment domain.Attachment `json:"paymentDocumentAttachment"` // 支付凭证附件
ParticipateType string `json:"participateType"` // 参与类型
PaymentDocumentAttachment *domain.Attachment `json:"paymentDocumentAttachment"` // 支付凭证附件
Org struct {
OrgID int `json:"orgId,string"`
OrgName string `json:"orgName"`
} `json:"org"` // 数据所属组织机构
Company domain.CompanyData `json:"company11"` // TODO:暂时不需要公司
Company domain.CompanyData `json:"-"` // TODO:暂时不需要公司
CreatedAt int64 `json:"createdAt"` // 创建时间
UpdatedAt int64 `json:"updatedAt"` // 更新时间
AccountDetail []struct {
... ... @@ -57,7 +57,7 @@ func ToCreditAccountItem(param *allied_creation_cooperation.CreditAccount) *Cred
SettlementTime: 0,
CooperationContractNumber: param.CooperationContractNumber,
ParticipateType: param.ParticipateType, // 参与类型
PaymentDocumentAttachment: param.PaymentDocumentAttachment, // 支付凭证附件
PaymentDocumentAttachment: nil, // 支付凭证附件
Company: param.Company, // 公司
CreatedAt: param.CreatedAt.UnixNano() / 1e6, // 创建时间
UpdatedAt: param.UpdatedAt.UnixNano() / 1e6, // 更新时间
... ... @@ -69,6 +69,9 @@ func ToCreditAccountItem(param *allied_creation_cooperation.CreditAccount) *Cred
if !param.SettlementTime.IsZero() {
data.SettlementTime = param.PaymentTime.UnixNano() / 1e6
}
if len(param.PaymentDocumentAttachment.Url) > 0 {
data.PaymentDocumentAttachment = &param.PaymentDocumentAttachment
}
data.Org.OrgID = param.Org.OrgID
data.Org.OrgName = param.Org.OrgName
data.Participator.UserName = param.Participator.UserName
... ...
... ... @@ -8,7 +8,7 @@ type UpdateDividendsOrderCommand struct {
//操作人
Operator domain.Operator `json:"-"`
//分红订单
DividendsOrderID int `json:"dividendsOrderId"`
DividendsOrderID int `json:"-"`
//客户名称
CustomerName string `json:"customerName"`
//分红订单金额
... ... @@ -23,6 +23,7 @@ type UpdateDividendsOrderCommand struct {
RegionName string `json:"regionName"`
//订单产品列表
OrderGoods []struct {
OrderGoodId int `json:"orderGoodId,string"`
CooperationContractNumber string `json:"cooperationContractNumber"` //关联的共创合约编号
DividendsOrderNumber string `json:"dividendsOrderNumber"` //关联分红订单号
// OrderGoodAmount float64 `json:"orderGoodAmount"` //订单产品金额
... ...
... ... @@ -109,9 +109,10 @@ func (dividendsOrderService *DividendsOrderService) UpdateDividendsOrder(updateD
// if err := updateDividendsOrderCommand.ValidateCommand(); err != nil {
// return nil, application.ThrowError(application.ARG_ERROR, err.Error())
// }
orderGoods := []allied_creation_cooperation.DividendsOrderGoods{}
orderGoods := []allied_creation_cooperation.DividendsOrderGoodAdd{}
for _, v := range updateDividendsOrderCommand.OrderGoods {
good := allied_creation_cooperation.DividendsOrderGoods{
good := allied_creation_cooperation.DividendsOrderGoodAdd{
OrderGoodId: int64(v.OrderGoodId),
CooperationContractNumber: v.CooperationContractNumber,
DividendsOrderNumber: v.DividendsOrderNumber,
OrderGoodExpense: v.OrderGoodExpense,
... ...
... ... @@ -146,7 +146,7 @@ func (dividendsReturnedOrderService *DividendsReturnedOrderService) SelectorDivi
"dividendsOrderNumber": v.DividendsOrderNumber,
"dividendsOriginalOrderNum": v.DividendsOriginalOrderNum,
"dividendsOrderId": strconv.Itoa(v.DividendsOrderID),
"orderTime": v.OrderTime.Unix(),
"orderTime": v.OrderTime.UnixNano() / 1e6,
}
listData = append(listData, m)
}
... ...
... ... @@ -350,7 +350,7 @@ func (usersService *UsersService) CooperationUserGet(cooperationUserGetQuery *qu
}
var deadline int64
if !result.CooperationInfo.CooperationDeadline.IsZero() {
deadline = result.CooperationInfo.CooperationDeadline.Unix()
deadline = result.CooperationInfo.CooperationDeadline.UnixNano() / 1e6
}
userInfo := dto.CooperationUserInfo{
UserId: strconv.Itoa(result.UserId),
... ...
... ... @@ -165,7 +165,7 @@ type (
// 共创项目合约编号,自生成,生成规则:XM+6位年月日+#+3位流水,例XM210601#001
CooperationContractNumber string `json:"cooperationContractNumber"`
// 分红用户(共创参与)
DividendsUser *struct {
DividendsUser struct {
// 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员
UserId int64 `json:"userId,string"`
// 用户基本id
... ...
... ... @@ -101,19 +101,19 @@ type (
//更新分红订单
type (
ReqDividendsOrderUpdate struct {
DividendsOrderId int `json:"dividendsOrderId,string"`
CompanyId int `json:"companyId,string"`
CustomerName string `json:"customerName"` //客户名称
DividendsOrderAmount float64 `json:"dividendsOrderAmount"` //分红订单金额
DividendsOrderNumber string `json:"dividendsOrderNumber"` //分红订单号
DividendsOriginalOrderNum string `json:"dividendsOriginalOrderNum"` //分红订单原单号
OperatorUid int `json:"operatorUid,string"` //订单操作人id
OrderGoods []DividendsOrderGoods `json:"orderGoods"` //订单产品列表
OrderTime string `json:"orderTime"` //订单日期,13位长度字符串类型时间戳
Remarks string `json:"remarks"` //备注
SalesmanUid string `json:"salesmanUid"` //订单业务员uid
UserId int `json:"userId,string"` //
RegionName string `json:"regionName"` //区域名称
DividendsOrderId int `json:"dividendsOrderId,string"`
CompanyId int `json:"companyId,string"`
CustomerName string `json:"customerName"` //客户名称
DividendsOrderAmount float64 `json:"dividendsOrderAmount"` //分红订单金额
DividendsOrderNumber string `json:"dividendsOrderNumber"` //分红订单号
DividendsOriginalOrderNum string `json:"dividendsOriginalOrderNum"` //分红订单原单号
OperatorUid int `json:"operatorUid,string"` //订单操作人id
OrderGoods []DividendsOrderGoodAdd `json:"orderGoods"` //订单产品列表
OrderTime string `json:"orderTime"` //订单日期,13位长度字符串类型时间戳
Remarks string `json:"remarks"` //备注
SalesmanUid string `json:"salesmanUid"` //订单业务员uid
UserId int `json:"userId,string"` //
RegionName string `json:"regionName"` //区域名称
}
DataDividendsOrderUpdate struct {
... ...