Przeglądaj źródła

feature: 完善领取用户审批调用参数

liuyaqi 3 lat temu
rodzic
commit
46f60fc888

+ 1 - 1
opms_parent/app/handler/dingtalk/ding_event.go

@@ -80,7 +80,7 @@ func (h *DingHandler) handleBpmsInstanceChange(msg *message.MixMessage, ctx *din
 	// 处理实例数据(不需要钉钉审批实例参数)
 	switch instance.BizType {
 	case model.CustomerReceive:
-		if msg.ProcessType == "finish" {
+		if msg.ProcessType == "finish" || msg.ProcessType == "terminate" {
 			srv, err := custServer.NewCustomerService(ctx.SubsMessage.Ctx)
 			if err != nil {
 				glog.Error(err)

+ 14 - 2
opms_parent/app/service/cust/cust_customer.go

@@ -334,7 +334,7 @@ func (s *CustomerService) MoveToPubic(Ids []int64) (err error) {
 	return
 }
 
-var AssignCustomerRequestProcessCode = ""
+var AssignCustomerRequestProcessCode = "PROC-FE42B2D1-6097-4DE8-8AC5-23541B7D5C8A"
 
 func ptrString(s string) *string {
 	return &s
@@ -366,7 +366,19 @@ func (s *CustomerService) AssignCustomerRequest(ctx context.Context, req *model.
 			ProcessCode: &AssignCustomerRequestProcessCode,
 			FormComponentValues: []*workflow.StartProcessInstanceRequestFormComponentValues{
 				{
-					Name:  ptrString(""),
+					Name:  ptrString("客户编码"),
+					Value: ptrString(u.CustCode),
+				},
+				{
+					Name:  ptrString("客户名称"),
+					Value: ptrString(u.CustName),
+				},
+				{
+					Name:  ptrString("申请人"),
+					Value: ptrString(s.GetCxtUserName()),
+				},
+				{
+					Name:  ptrString("申请说明"),
 					Value: ptrString(""),
 				},
 			},