Commit 431fcc9ffa44fdef56d389c774c72b9a765699cb

Authored by 房远帅
1 parent 838cb5e4

楚江ERP:客户开发流程参数增加科班code

@@ -133,6 +133,12 @@ public class CustomerDevelopPlan extends BaseEntity implements BaseDto { @@ -133,6 +133,12 @@ public class CustomerDevelopPlan extends BaseEntity implements BaseDto {
133 private Long flowInstanceId; 133 private Long flowInstanceId;
134 134
135 /** 135 /**
  136 + * 办事处code
  137 + */
  138 + @TableField(exist = false)
  139 + private String deptCode;
  140 +
  141 + /**
136 * 创建人ID 142 * 创建人ID
137 */ 143 */
138 @TableField(fill = FieldFill.INSERT) 144 @TableField(fill = FieldFill.INSERT)
@@ -10,8 +10,10 @@ import com.lframework.starter.web.core.components.security.SecurityUtil; @@ -10,8 +10,10 @@ import com.lframework.starter.web.core.components.security.SecurityUtil;
10 import com.lframework.starter.web.core.utils.*; 10 import com.lframework.starter.web.core.utils.*;
11 import com.lframework.starter.web.inner.service.system.SysUserRoleService; 11 import com.lframework.starter.web.inner.service.system.SysUserRoleService;
12 import com.lframework.xingyun.basedata.entity.Customer; 12 import com.lframework.xingyun.basedata.entity.Customer;
  13 +import com.lframework.xingyun.basedata.entity.Office;
13 import com.lframework.xingyun.basedata.entity.Workshop; 14 import com.lframework.xingyun.basedata.entity.Workshop;
14 import com.lframework.xingyun.basedata.service.customer.CustomerService; 15 import com.lframework.xingyun.basedata.service.customer.CustomerService;
  16 +import com.lframework.xingyun.basedata.service.office.OfficeService;
15 import com.lframework.xingyun.basedata.service.workshop.WorkshopService; 17 import com.lframework.xingyun.basedata.service.workshop.WorkshopService;
16 import com.lframework.xingyun.sc.bo.customer.develop.CustomerDevelopPlanStatisticsBo; 18 import com.lframework.xingyun.sc.bo.customer.develop.CustomerDevelopPlanStatisticsBo;
17 import com.lframework.xingyun.sc.entity.CustomerDevelopPlan; 19 import com.lframework.xingyun.sc.entity.CustomerDevelopPlan;
@@ -62,6 +64,9 @@ public class CustomerDevelopPlanServiceImpl extends BaseMpServiceImpl<CustomerDe @@ -62,6 +64,9 @@ public class CustomerDevelopPlanServiceImpl extends BaseMpServiceImpl<CustomerDe
62 private SysUserRoleService sysUserRoleService; 64 private SysUserRoleService sysUserRoleService;
63 @Resource 65 @Resource
64 private CustomerService customerService; 66 private CustomerService customerService;
  67 + @Resource
  68 + private OfficeService officeService;
  69 +
65 70
66 71
67 @Override 72 @Override
@@ -207,6 +212,8 @@ public class CustomerDevelopPlanServiceImpl extends BaseMpServiceImpl<CustomerDe @@ -207,6 +212,8 @@ public class CustomerDevelopPlanServiceImpl extends BaseMpServiceImpl<CustomerDe
207 data.setCreateById(SecurityUtil.getCurrentUser().getId()); 212 data.setCreateById(SecurityUtil.getCurrentUser().getId());
208 data.setUpdateById(SecurityUtil.getCurrentUser().getId()); 213 data.setUpdateById(SecurityUtil.getCurrentUser().getId());
209 // 流程处理 214 // 流程处理
  215 + Office office = officeService.findById(vo.getOfficeId());
  216 + data.setDeptCode(office.getCode());
210 Instance instance = flowInstanceWrapperService.startInstance("CUSTOMER_DEVELOP", id, BPM_FLAG, data); 217 Instance instance = flowInstanceWrapperService.startInstance("CUSTOMER_DEVELOP", id, BPM_FLAG, data);
211 data.setFlowInstanceId(instance.getId()); 218 data.setFlowInstanceId(instance.getId());
212 219
@@ -245,6 +252,8 @@ public class CustomerDevelopPlanServiceImpl extends BaseMpServiceImpl<CustomerDe @@ -245,6 +252,8 @@ public class CustomerDevelopPlanServiceImpl extends BaseMpServiceImpl<CustomerDe
245 data.setWorkshopName(workshop == null ? null : workshop.getName()); 252 data.setWorkshopName(workshop == null ? null : workshop.getName());
246 } 253 }
247 // 重新发起流程 254 // 重新发起流程
  255 + Office office = officeService.findById(vo.getOfficeId());
  256 + data.setDeptCode(office.getCode());
248 Instance instance = flowInstanceWrapperService.startInstance("CUSTOMER_DEVELOP", vo.getId(), BPM_FLAG, data); 257 Instance instance = flowInstanceWrapperService.startInstance("CUSTOMER_DEVELOP", vo.getId(), BPM_FLAG, data);
249 258
250 LambdaUpdateWrapper<CustomerDevelopPlan> updateWrapper = Wrappers.lambdaUpdate(CustomerDevelopPlan.class) 259 LambdaUpdateWrapper<CustomerDevelopPlan> updateWrapper = Wrappers.lambdaUpdate(CustomerDevelopPlan.class)