|
@@ -172,6 +172,8 @@ public class WeiXinCorpController {
|
|
|
private DepartmentWxMapper departmentWxMapper;
|
|
|
@Resource
|
|
|
private SysFormService sysFormService;
|
|
|
+ @Resource
|
|
|
+ private StageService stageService;
|
|
|
|
|
|
public static String SUITE_ACCESS_TOKEN = null;
|
|
|
public static long suiteTokenExpireTime = 0L;
|
|
@@ -1342,6 +1344,9 @@ public class WeiXinCorpController {
|
|
|
});
|
|
|
sysFormService.saveBatch(baseList);
|
|
|
|
|
|
+ List<Stage> stageList=getStageBaseList(company);
|
|
|
+ stageService.saveBatch(stageList);
|
|
|
+
|
|
|
//生成工作时长
|
|
|
TimeType timeType = new TimeType();
|
|
|
timeType.setCompanyId(company.getId());
|
|
@@ -1509,6 +1514,17 @@ public class WeiXinCorpController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ private List<Stage> getStageBaseList(Company company) {
|
|
|
+ ArrayList<Stage> stages = new ArrayList<>();
|
|
|
+ Stage stage1 = new Stage().setName("赢单").setPlan("100%").setSeq(4).setIsFinish(1).setCompanyId(company.getId());
|
|
|
+ stages.add(stage1);
|
|
|
+ Stage stage2 = new Stage().setName("输单").setPlan("0%").setSeq(5).setIsFinish(1).setCompanyId(company.getId());
|
|
|
+ stages.add(stage2);
|
|
|
+ Stage stage3 = new Stage().setName("无效").setPlan("0%").setSeq(6).setIsFinish(1).setCompanyId(company.getId());
|
|
|
+ stages.add(stage3);
|
|
|
+ return stages;
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
private JSONArray getDeptUserSimple(String accessToken, int deptId) {
|
|
|
String url = GET_DEPARTMENT_USER_SIMPLE_URL.replace("ACCESS_TOKEN", accessToken).replace("DEPARTMENT_ID", ""+deptId);
|