|
|
@@ -297,7 +297,7 @@ func (p *businessService) Create(req *model.AddProjBusinessReq) (err error) {
|
|
|
if business.NboType == "" {
|
|
|
business.NboType = StatusC
|
|
|
}
|
|
|
- business.ApproStatus = ApprovalWaiting
|
|
|
+ business.ApproStatus = ApprovalOK
|
|
|
business.CustProvinceId = customer.CustProvinceId
|
|
|
business.CustProvince = customer.CustProvince
|
|
|
business.CustCityId = customer.CustCityId
|
|
|
@@ -308,10 +308,6 @@ func (p *businessService) Create(req *model.AddProjBusinessReq) (err error) {
|
|
|
service.SetCreatedInfo(business, p.GetCxtUserId(), p.GetCxtUserName())
|
|
|
business.FilingTime = business.CreatedTime
|
|
|
|
|
|
- productLine, _ := service.GetDictLabelByTypeAndValue(p.Ctx, "sys_product_line", business.ProductLine)
|
|
|
- nboSource, _ := service.GetDictLabelByTypeAndValue(p.Ctx, "proj_nbo_source", business.NboSource)
|
|
|
- salesModel, _ := service.GetDictLabelByTypeAndValue(p.Ctx, "proj_sales_model", business.SalesModel)
|
|
|
-
|
|
|
// 事务
|
|
|
err = p.Dao.Transaction(context.TODO(), func(ctx context.Context, tx *gdb.TX) error {
|
|
|
// 添加项目
|
|
|
@@ -326,80 +322,7 @@ func (p *businessService) Create(req *model.AddProjBusinessReq) (err error) {
|
|
|
Remark: business.Remark,
|
|
|
}
|
|
|
_, err = p.CreateProjBusinessDynamics(tx, dynamics, business)
|
|
|
- // 审批流
|
|
|
- workflowSrv, _ := workflowService.NewFlowService(p.Ctx)
|
|
|
- // OMS项目创建 审批
|
|
|
- bizCode := business.NboCode + ":" + gconv.String(lastId)
|
|
|
- business.ApproType = BusinessCreateRequestProcessCode
|
|
|
- instanceId, err := workflowSrv.StartProcessInstance(bizCode, workflowModel.ProjectCreate, "", &workflow.StartProcessInstanceRequest{
|
|
|
- ProcessCode: &business.ApproType,
|
|
|
- FormComponentValues: []*workflow.StartProcessInstanceRequestFormComponentValues{
|
|
|
- {
|
|
|
- Id: utils.String("TextField-K2AD4O5B"),
|
|
|
- Name: utils.String("项目编码"),
|
|
|
- Value: utils.String(business.NboCode),
|
|
|
- },
|
|
|
- {
|
|
|
- Id: utils.String("TextField_BDLSECETVSG0"),
|
|
|
- Name: utils.String("项目名称"),
|
|
|
- Value: utils.String(business.NboName),
|
|
|
- },
|
|
|
- {
|
|
|
- Id: utils.String("DDSelectField_213JKZA1OUO00"),
|
|
|
- Name: utils.String("产品线"),
|
|
|
- Value: utils.String(productLine),
|
|
|
- },
|
|
|
- {
|
|
|
- Id: utils.String("TextField_1J9BJMOZ18F40"),
|
|
|
- Name: utils.String("客户名称"),
|
|
|
- Value: utils.String(business.CustName),
|
|
|
- },
|
|
|
- {
|
|
|
- Id: utils.String("DDSelectField_6CQD451D3800"),
|
|
|
- Name: utils.String("项目来源"),
|
|
|
- Value: utils.String(nboSource),
|
|
|
- },
|
|
|
- {
|
|
|
- Id: utils.String("TextField_1UQFU5BUEWDC"),
|
|
|
- Name: utils.String("历史招标信息"),
|
|
|
- Value: utils.String(req.BidInfo),
|
|
|
- },
|
|
|
- {
|
|
|
- Id: utils.String("TextField_AEUWH63LJ0O0"),
|
|
|
- Name: utils.String("销售工程师"),
|
|
|
- Value: utils.String(business.SaleName),
|
|
|
- },
|
|
|
- {
|
|
|
- Id: utils.String("DDSelectField_34QSUGHO2SO0"),
|
|
|
- Name: utils.String("销售模式"),
|
|
|
- Value: utils.String(salesModel),
|
|
|
- },
|
|
|
- {
|
|
|
- Id: utils.String("TextField_1PWK6WHMGITC0"),
|
|
|
- Name: utils.String("经销商/代理商"),
|
|
|
- Value: utils.String(business.DistributorName),
|
|
|
- },
|
|
|
- {
|
|
|
- Id: utils.String("DDSelectField_5R11VVM6GI00"),
|
|
|
- Name: utils.String("是否为战略项目"),
|
|
|
- Value: utils.String(yesOrNoType[business.IsBig]),
|
|
|
- },
|
|
|
- {
|
|
|
- Id: utils.String("TextareaField_1GEL8JJL3H5S0"),
|
|
|
- Name: utils.String("备注"),
|
|
|
- Value: utils.String(business.Remark),
|
|
|
- },
|
|
|
- },
|
|
|
- })
|
|
|
- if err != nil {
|
|
|
- g.Log().Error(err)
|
|
|
- return err
|
|
|
- }
|
|
|
- // 更新项目审批信息
|
|
|
- _, err = p.Dao.TX(tx).Data(g.Map{p.Dao.C.ApproType: business.ApproType, p.Dao.C.ApproInstanceId: instanceId}).Where(p.Dao.C.Id, lastId).Update()
|
|
|
- if err != nil {
|
|
|
- return err
|
|
|
- }
|
|
|
+
|
|
|
return nil
|
|
|
})
|
|
|
|
|
|
@@ -624,8 +547,12 @@ func (p *businessService) BusinessTransfer(req *model.BusinessTransferReq) error
|
|
|
if business == nil {
|
|
|
return myerrors.TipsError("项目已提交审批任务,无法重复提交。")
|
|
|
}
|
|
|
+ // 修改项目信息
|
|
|
businessMap := g.Map{
|
|
|
- p.Dao.C.ApproStatus: ApprovalWaiting,
|
|
|
+ p.Dao.C.ApproStatus: ApprovalOK,
|
|
|
+ p.Dao.C.SaleId: req.UserId,
|
|
|
+ p.Dao.C.SaleName: req.UserName,
|
|
|
+ p.Dao.C.Remark: req.Remark,
|
|
|
}
|
|
|
service.SetUpdatedInfo(businessMap, p.GetCxtUserId(), p.GetCxtUserName())
|
|
|
|
|
|
@@ -636,10 +563,7 @@ func (p *businessService) BusinessTransfer(req *model.BusinessTransferReq) error
|
|
|
opnContent["saleName"] = req.UserName
|
|
|
opnContent["remark"] = req.Remark
|
|
|
|
|
|
- productLine, _ := service.GetDictLabelByTypeAndValue(p.Ctx, "sys_product_line", business.ProductLine)
|
|
|
-
|
|
|
// 审批流
|
|
|
- workflowSrv, _ := workflowService.NewFlowService(p.Ctx)
|
|
|
err = p.Dao.Transaction(context.TODO(), func(ctx context.Context, tx *gdb.TX) error {
|
|
|
// 更新项目
|
|
|
_, err = p.Dao.TX(tx).WherePri(projDao.ProjBusiness.C.Id, req.Id).Data(businessMap).Update()
|
|
|
@@ -658,73 +582,6 @@ func (p *businessService) BusinessTransfer(req *model.BusinessTransferReq) error
|
|
|
return err
|
|
|
}
|
|
|
|
|
|
- // OMS项目转移 审批
|
|
|
- bizCode := business.NboCode + ":" + strconv.Itoa(business.Id)
|
|
|
- business.ApproType = BusinessTransferRequestProcessCode
|
|
|
- instanceId, err := workflowSrv.StartProcessInstance(bizCode, workflowModel.ProjectTransfer, "", &workflow.StartProcessInstanceRequest{
|
|
|
- ProcessCode: &business.ApproType,
|
|
|
- FormComponentValues: []*workflow.StartProcessInstanceRequestFormComponentValues{
|
|
|
- {
|
|
|
- Id: utils.String("TextField-K2AD4O5B"),
|
|
|
- Name: utils.String("项目编码"),
|
|
|
- Value: utils.String(business.NboCode),
|
|
|
- },
|
|
|
- {
|
|
|
- Id: utils.String("TextField_7EFHRQ9DDF80"),
|
|
|
- Name: utils.String("项目名称"),
|
|
|
- Value: utils.String(business.NboName),
|
|
|
- },
|
|
|
- {
|
|
|
- Id: utils.String("TextField_1T3DEY5FWV7K0"),
|
|
|
- Name: utils.String("客户名称"),
|
|
|
- Value: utils.String(business.CustName),
|
|
|
- },
|
|
|
- {
|
|
|
- Id: utils.String("TextField_QDU06LXYKK00"),
|
|
|
- Name: utils.String("所在省"),
|
|
|
- Value: utils.String(business.CustProvince),
|
|
|
- },
|
|
|
- {
|
|
|
- Id: utils.String("TextField_MVSOO6EG6YO0"),
|
|
|
- Name: utils.String("所在市"),
|
|
|
- Value: utils.String(business.CustCity),
|
|
|
- },
|
|
|
- {
|
|
|
- Id: utils.String("DDSelectField_6OMVO1JV0980"),
|
|
|
- Name: utils.String("产品线"),
|
|
|
- Value: utils.String(productLine),
|
|
|
- },
|
|
|
- {
|
|
|
- Id: utils.String("TextField_1E1WOYGKRTDS0"),
|
|
|
- Name: utils.String("项目级别"),
|
|
|
- Value: utils.String(nboType[business.NboType]),
|
|
|
- },
|
|
|
- {
|
|
|
- Id: utils.String("TextField_NRQXWLJ17HC0"),
|
|
|
- Name: utils.String("申请人"),
|
|
|
- Value: utils.String(p.GetCxtUserName()),
|
|
|
- },
|
|
|
- {
|
|
|
- Id: utils.String("TextField_GHSQYDGD13K0"),
|
|
|
- Name: utils.String("转移原因"),
|
|
|
- Value: utils.String(req.Remark),
|
|
|
- },
|
|
|
- {
|
|
|
- Id: utils.String("TextField_76P8FPHH0UC0"),
|
|
|
- Name: utils.String("接收人"),
|
|
|
- Value: utils.String(req.UserName),
|
|
|
- },
|
|
|
- },
|
|
|
- })
|
|
|
- if err != nil {
|
|
|
- g.Log().Error(err)
|
|
|
- return err
|
|
|
- }
|
|
|
- // 更新项目审批信息
|
|
|
- _, err = p.Dao.TX(tx).Data(g.Map{p.Dao.C.ApproType: business.ApproType, p.Dao.C.ApproInstanceId: instanceId}).Where(p.Dao.C.Id, req.Id).Update()
|
|
|
- if err != nil {
|
|
|
- return err
|
|
|
- }
|
|
|
return nil
|
|
|
})
|
|
|
return err
|
|
|
@@ -849,12 +706,14 @@ func (p *businessService) BusinessUpgrade(req *model.BusinessUpgradeReq, fileMap
|
|
|
if err != nil {
|
|
|
return err
|
|
|
}
|
|
|
- businessMap := g.Map{p.Dao.C.ApproStatus: ApprovalWaiting}
|
|
|
+ var businessMap = g.Map{}
|
|
|
+ //businessMap = gconv.Map(req)
|
|
|
+ businessMap[p.Dao.C.ApproStatus] = ApprovalOK
|
|
|
service.SetUpdatedInfo(businessMap, p.GetCxtUserId(), p.GetCxtUserName())
|
|
|
|
|
|
opnContent := gconv.Map(req)
|
|
|
opnContent["origNboType"] = business.NboType
|
|
|
- opnContent["approStatus"] = ApprovalWaiting
|
|
|
+ opnContent["approStatus"] = ApprovalOK
|
|
|
service.SetUpdatedInfo(opnContent, p.GetCxtUserId(), p.GetCxtUserName())
|
|
|
|
|
|
if fileMap == nil {
|
|
|
@@ -891,6 +750,42 @@ func (p *businessService) BusinessUpgrade(req *model.BusinessUpgradeReq, fileMap
|
|
|
})
|
|
|
}
|
|
|
|
|
|
+ upgradeType := p.getBusDingUpgradeType(business.NboType, req.NboType)
|
|
|
+ if upgradeType == "" {
|
|
|
+ return myerrors.TipsError("错误的升级类型")
|
|
|
+ }
|
|
|
+ productLineMap, err := service.GetDictDataTreeByType(p.Ctx, "sys_product_line")
|
|
|
+ if err != nil {
|
|
|
+ return err
|
|
|
+ }
|
|
|
+ productLine := gconv.String(productLineMap.Get(business.ProductLine))
|
|
|
+
|
|
|
+ businessMap[p.Dao.C.NboType] = req.NboType
|
|
|
+ businessMap[p.Dao.C.ProductLine] = productLine
|
|
|
+ if req.NboType == StatusC {
|
|
|
+ businessMap[p.Dao.C.ProjConversionReason] = req.ProjConversionReason
|
|
|
+ } else if req.NboType == StatusB { // B级项目
|
|
|
+ businessMap[p.Dao.C.NboBudget] = req.NboBudget
|
|
|
+ businessMap[p.Dao.C.DealerSalesId] = req.DealerSalesId
|
|
|
+ businessMap[p.Dao.C.DealerSalesName] = req.DealerSalesName
|
|
|
+ businessMap[p.Dao.C.DealerSalesContact] = req.DealerSalesContact
|
|
|
+ businessMap[p.Dao.C.EstTransPrice] = req.EstTransPrice
|
|
|
+ } else if req.NboType == StatusA { // A级项目
|
|
|
+ businessMap[p.Dao.C.PurchasingWay] = req.PurchasingWay
|
|
|
+ businessMap[p.Dao.C.CapitalSource] = req.CapitalSource
|
|
|
+ businessMap[p.Dao.C.PlanPurchaseTime] = req.PlanPurchaseTime
|
|
|
+ businessMap[p.Dao.C.ContactId] = req.ContactId
|
|
|
+ businessMap[p.Dao.C.ContactName] = req.ContactName
|
|
|
+ businessMap[p.Dao.C.ContactTelephone] = req.ContactTelephone
|
|
|
+ businessMap[p.Dao.C.MakerId] = req.MakerId
|
|
|
+ businessMap[p.Dao.C.MakerName] = req.MakerName
|
|
|
+ businessMap[p.Dao.C.MakerDept] = req.MakerDept
|
|
|
+ businessMap[p.Dao.C.IsAdoptDashoo] = req.IsAdoptDashoo
|
|
|
+ businessMap[p.Dao.C.Competitor] = req.Competitor
|
|
|
+ businessMap[p.Dao.C.CustomerIntentionFactory] = req.CustomerIntentionFactory
|
|
|
+ }
|
|
|
+ //businessMap[p.Dao.C.Remark] = gconv.String(g.Map{"nboType": opnContent["nboType"], "origNboType": opnContent["origNboType"]})
|
|
|
+
|
|
|
err = p.Dao.Transaction(context.TODO(), func(ctx context.Context, tx *gdb.TX) error {
|
|
|
// 更新项目调级
|
|
|
_, err = p.Dao.TX(tx).WherePri(req.Id).Data(businessMap).Update()
|
|
|
@@ -902,6 +797,27 @@ func (p *businessService) BusinessUpgrade(req *model.BusinessUpgradeReq, fileMap
|
|
|
if err != nil {
|
|
|
return err
|
|
|
}
|
|
|
+
|
|
|
+ // 添加产品
|
|
|
+ if req != nil && (req.NboType == "20" || req.NboType == "10") {
|
|
|
+ // 设置产品信息
|
|
|
+ totalPrice, products, err := p.setProductInfo(req.Id, req.Products)
|
|
|
+ if err != nil {
|
|
|
+ return err
|
|
|
+ }
|
|
|
+ // 删除项目产品
|
|
|
+ _, err = projDao.NewProjBusinessProductDao(p.Tenant).TX(tx).Where(projDao.ProjBusinessProduct.C.BusId, req.Id).Delete()
|
|
|
+ if err != nil {
|
|
|
+ return err
|
|
|
+ }
|
|
|
+ // 添加项目产品
|
|
|
+ _, err = projDao.NewProjBusinessProductDao(p.Tenant).TX(tx).Insert(products)
|
|
|
+ if err != nil {
|
|
|
+ return err
|
|
|
+ }
|
|
|
+ businessMap[p.Dao.C.EstTransPrice] = totalPrice
|
|
|
+ }
|
|
|
+
|
|
|
// 添加项目动态
|
|
|
dynamics := model.ProjBusinessDynamics{
|
|
|
BusId: business.Id,
|
|
|
@@ -912,15 +828,7 @@ func (p *businessService) BusinessUpgrade(req *model.BusinessUpgradeReq, fileMap
|
|
|
if err != nil {
|
|
|
return err
|
|
|
}
|
|
|
- instanceId, err := p.BusUpgradeDingEvent(business, req, fileMap)
|
|
|
- if err != nil {
|
|
|
- return err
|
|
|
- }
|
|
|
- // 更新项目审批信息
|
|
|
- _, err = p.Dao.TX(tx).Data(g.Map{p.Dao.C.ApproType: business.ApproType, p.Dao.C.ApproInstanceId: instanceId}).Where(p.Dao.C.Id, req.Id).Update()
|
|
|
- if err != nil {
|
|
|
- return err
|
|
|
- }
|
|
|
+
|
|
|
return nil
|
|
|
})
|
|
|
if err != nil {
|
|
|
@@ -1429,20 +1337,18 @@ func (p *businessService) BusinessDowngrade(req *model.BusinessDowngradeReq) err
|
|
|
if downgradeType == "" {
|
|
|
return myerrors.TipsError("错误的降级类型")
|
|
|
}
|
|
|
- businessMap := g.Map{
|
|
|
- p.Dao.C.ApproStatus: ApprovalWaiting,
|
|
|
- }
|
|
|
+ var businessMap = g.Map{}
|
|
|
+ businessMap = gconv.Map(req)
|
|
|
+ businessMap[p.Dao.C.ApproStatus] = ApprovalOK
|
|
|
+
|
|
|
service.SetUpdatedInfo(businessMap, p.GetCxtUserId(), p.GetCxtUserName())
|
|
|
|
|
|
opnContent := gconv.Map(req)
|
|
|
opnContent["origNboType"] = business.NboType
|
|
|
- opnContent["approStatus"] = ApprovalWaiting
|
|
|
+ opnContent["approStatus"] = ApprovalOK
|
|
|
service.SetUpdatedInfo(opnContent, p.GetCxtUserId(), p.GetCxtUserName())
|
|
|
|
|
|
- productLine, _ := service.GetDictLabelByTypeAndValue(p.Ctx, "sys_product_line", business.ProductLine)
|
|
|
-
|
|
|
// 审批流
|
|
|
- workflowSrv, _ := workflowService.NewFlowService(p.Ctx)
|
|
|
err = p.Dao.Transaction(context.TODO(), func(ctx context.Context, tx *gdb.TX) error {
|
|
|
// 更新项目调级
|
|
|
_, err = p.Dao.TX(tx).WherePri(req.Id).Data(businessMap).Update()
|
|
|
@@ -1459,73 +1365,7 @@ func (p *businessService) BusinessDowngrade(req *model.BusinessDowngradeReq) err
|
|
|
if err != nil {
|
|
|
return err
|
|
|
}
|
|
|
- // OMS项目降级 审批
|
|
|
- bizCode := business.NboCode + ":" + strconv.Itoa(business.Id)
|
|
|
- business.ApproType = BusinessDowngradeRequestProcessCode
|
|
|
- instanceId, err := workflowSrv.StartProcessInstance(bizCode, workflowModel.ProjectDownGrade, "", &workflow.StartProcessInstanceRequest{
|
|
|
- ProcessCode: &business.ApproType,
|
|
|
- FormComponentValues: []*workflow.StartProcessInstanceRequestFormComponentValues{
|
|
|
- {
|
|
|
- Id: utils.String("TextField-K2AD4O5B"),
|
|
|
- Name: utils.String("项目编码"),
|
|
|
- Value: utils.String(business.NboCode),
|
|
|
- },
|
|
|
- {
|
|
|
- Id: utils.String("TextField_BDLSECETVSG0"),
|
|
|
- Name: utils.String("项目名称"),
|
|
|
- Value: utils.String(business.NboName),
|
|
|
- },
|
|
|
- {
|
|
|
- Id: utils.String("TextField_1J9BJMOZ18F40"),
|
|
|
- Name: utils.String("客户名称"),
|
|
|
- Value: utils.String(business.CustName),
|
|
|
- },
|
|
|
- {
|
|
|
- Id: utils.String("TextField_GL7MQUB723K0"),
|
|
|
- Name: utils.String("所在省"),
|
|
|
- Value: utils.String(business.CustProvince),
|
|
|
- },
|
|
|
- {
|
|
|
- Id: utils.String("TextField_CFA88QQQUUO0"),
|
|
|
- Name: utils.String("所在市"),
|
|
|
- Value: utils.String(business.CustCity),
|
|
|
- },
|
|
|
- {
|
|
|
- Id: utils.String("DDSelectField_VSA3U380ZK00"),
|
|
|
- Name: utils.String("降级类型"),
|
|
|
- Value: utils.String(downgradeType),
|
|
|
- },
|
|
|
- {
|
|
|
- Id: utils.String("DDSelectField_1UCNHJ0P8C5C0"),
|
|
|
- Name: utils.String("产品线"),
|
|
|
- Value: utils.String(productLine),
|
|
|
- },
|
|
|
- {
|
|
|
- Id: utils.String("TextField_X4D3QGARU7K0"),
|
|
|
- Name: utils.String("支持内容"),
|
|
|
- Value: utils.String("无"),
|
|
|
- },
|
|
|
- {
|
|
|
- Id: utils.String("TextField_AEUWH63LJ0O0"),
|
|
|
- Name: utils.String("销售工程师"),
|
|
|
- Value: utils.String(business.SaleName),
|
|
|
- },
|
|
|
- {
|
|
|
- Id: utils.String("TextareaField_PTGJOKD3J7K0"),
|
|
|
- Name: utils.String("降级原因"),
|
|
|
- Value: utils.String(req.Remark),
|
|
|
- },
|
|
|
- },
|
|
|
- })
|
|
|
- if err != nil {
|
|
|
- g.Log().Error(err)
|
|
|
- return err
|
|
|
- }
|
|
|
- // 更新项目审批信息
|
|
|
- _, err = p.Dao.TX(tx).Data(g.Map{p.Dao.C.ApproType: business.ApproType, p.Dao.C.ApproInstanceId: instanceId}).Where(p.Dao.C.Id, req.Id).Update()
|
|
|
- if err != nil {
|
|
|
- return err
|
|
|
- }
|
|
|
+
|
|
|
return nil
|
|
|
})
|
|
|
return err
|
|
|
@@ -1684,14 +1524,12 @@ func (p *businessService) ConvertToReserve(req *model.BusinessToReserveReq) erro
|
|
|
return myerrors.TipsError("项目已提交审批任务,无法重复提交。")
|
|
|
}
|
|
|
|
|
|
- productLine, _ := service.GetDictLabelByTypeAndValue(p.Ctx, "sys_product_line", business.ProductLine)
|
|
|
-
|
|
|
// 审批流
|
|
|
- workflowSrv, _ := workflowService.NewFlowService(p.Ctx)
|
|
|
err = p.Dao.Transaction(context.TODO(), func(ctx context.Context, tx *gdb.TX) error {
|
|
|
// 更新项目
|
|
|
businessMap := g.Map{
|
|
|
- p.Dao.C.ApproStatus: ApprovalWaiting,
|
|
|
+ p.Dao.C.ApproStatus: ApprovalOK,
|
|
|
+ p.Dao.C.NboType: StatusReserve,
|
|
|
p.Dao.C.ProjConversionTime: gtime.Now(),
|
|
|
p.Dao.C.ProjConversionReason: req.ProjConversionReason,
|
|
|
}
|
|
|
@@ -1712,58 +1550,6 @@ func (p *businessService) ConvertToReserve(req *model.BusinessToReserveReq) erro
|
|
|
return err
|
|
|
}
|
|
|
|
|
|
- // OMS项目转储备 审批
|
|
|
- bizCode := business.NboCode + ":" + strconv.Itoa(business.Id)
|
|
|
- business.ApproType = ConvertToReserveRequestProcessCode
|
|
|
- instanceId, err := workflowSrv.StartProcessInstance(bizCode, workflowModel.ProjectToReserve, "", &workflow.StartProcessInstanceRequest{
|
|
|
- ProcessCode: &business.ApproType,
|
|
|
- FormComponentValues: []*workflow.StartProcessInstanceRequestFormComponentValues{
|
|
|
- {
|
|
|
- Id: utils.String("TextField-K2AD4O5B"),
|
|
|
- Name: utils.String("项目编码"),
|
|
|
- Value: utils.String(business.NboCode),
|
|
|
- },
|
|
|
- {
|
|
|
- Id: utils.String("TextField_CMH6TBXYR5S0"),
|
|
|
- Name: utils.String("项目名称"),
|
|
|
- Value: utils.String(business.NboName),
|
|
|
- },
|
|
|
- {
|
|
|
- Id: utils.String("TextField_YQBGGYHQPS00"),
|
|
|
- Name: utils.String("客户名称"),
|
|
|
- Value: utils.String(business.CustName),
|
|
|
- },
|
|
|
- {
|
|
|
- Id: utils.String("DDSelectField_VBY9YAIOK5C0"),
|
|
|
- Name: utils.String("项目级别"),
|
|
|
- Value: utils.String(convertToReserveType[business.NboType]),
|
|
|
- },
|
|
|
- {
|
|
|
- Id: utils.String("DDSelectField_1UVBB1LZHIJK0"),
|
|
|
- Name: utils.String("产品线"),
|
|
|
- Value: utils.String(productLine),
|
|
|
- },
|
|
|
- {
|
|
|
- Id: utils.String("TextField_1NDD3TY8KJB40"),
|
|
|
- Name: utils.String("销售工程师"),
|
|
|
- Value: utils.String(business.SaleName),
|
|
|
- },
|
|
|
- {
|
|
|
- Id: utils.String("TextareaField_15KZFM4YHQ8W0"),
|
|
|
- Name: utils.String("转化原因"),
|
|
|
- Value: utils.String(req.ProjConversionReason),
|
|
|
- },
|
|
|
- },
|
|
|
- })
|
|
|
- if err != nil {
|
|
|
- g.Log().Error(err)
|
|
|
- return err
|
|
|
- }
|
|
|
- // 更新项目审批信息
|
|
|
- _, err = p.Dao.TX(tx).Data(g.Map{p.Dao.C.ApproType: business.ApproType, p.Dao.C.ApproInstanceId: instanceId}).Where(p.Dao.C.Id, req.Id).Update()
|
|
|
- if err != nil {
|
|
|
- return err
|
|
|
- }
|
|
|
return nil
|
|
|
})
|
|
|
|