|
@@ -16,8 +16,10 @@ import com.tianhu.system.api.domain.*;
|
|
|
import com.tianhu.system.api.model.LoginUser;
|
|
|
import com.tianhu.system.common.IMessageUtilsService;
|
|
|
import com.tianhu.system.domain.*;
|
|
|
+import com.tianhu.system.mapper.SysDeptMapper;
|
|
|
import com.tianhu.system.mapper.SysProductMenuMapper;
|
|
|
import com.tianhu.system.service.*;
|
|
|
+import com.tianhu.system.utils.FlowableService;
|
|
|
import com.tianhu.system.utils.RegularUtil;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
@@ -63,10 +65,14 @@ public class OwnManagementInfController extends BaseController
|
|
|
@Autowired
|
|
|
private RemoteFileService remoteFileService;
|
|
|
@Autowired
|
|
|
+ private FlowableService flowableService;
|
|
|
+ @Autowired
|
|
|
private ISysCompanyProductService sysCompanyProductService;
|
|
|
@Autowired
|
|
|
private IMessageUtilsService messageUtilsService;
|
|
|
@Autowired
|
|
|
+ private SysDeptMapper deptMapper;
|
|
|
+ @Autowired
|
|
|
private RemoteSystemService remoteSystemService;
|
|
|
@Autowired
|
|
|
private IOwnNoticeService ownNoticeService;
|
|
@@ -269,7 +275,7 @@ public class OwnManagementInfController extends BaseController
|
|
|
}
|
|
|
LoginUser userInfo = tokenService.getLoginUser();
|
|
|
String scyId = IdUtils.fastSimpleUUID();
|
|
|
- //创建用户
|
|
|
+ //创建企业
|
|
|
company.setScyId(scyId);
|
|
|
company.setScyName(scyName);
|
|
|
company.setScyStatus(staust_00);
|
|
@@ -289,6 +295,7 @@ public class OwnManagementInfController extends BaseController
|
|
|
dept.setParentId(defaultId);
|
|
|
dept.setAncestors(defaultAn);
|
|
|
dept.setOrderNum(defaultOrder);
|
|
|
+ dept.setAlternateNumber(IdUtils.fastSimpleUUID());
|
|
|
dept.setCreateBy(use.getUserId()+"");
|
|
|
deptService.insertDept(dept);
|
|
|
List<SysDept> deptList= deptService.selectDeptList(dept);
|
|
@@ -398,6 +405,24 @@ public class OwnManagementInfController extends BaseController
|
|
|
"医疗招商、医疗集采、供应链金融等企业级服务,如果您再平台使用中遇到任何问题," +
|
|
|
"请再首页查看并拨打平台客服专线电话,我们将竭尽所能为您提供免费的咨询服务";
|
|
|
ownNoticeService.sendNotice(scyId,scyId,tittle,"01","00",null,"0",String.valueOf(listUserTwo.getUserId()),null,null,null);
|
|
|
+ //审批表增加数据
|
|
|
+ Map<String, Object> flowableRes = flowableService.addFlowableGroup(scyId, company.getScyName());
|
|
|
+ if (!"200".equals(flowableRes.get("code"))) {
|
|
|
+ throw new Exception("审批数据新增失败!");
|
|
|
+ }
|
|
|
+ flowableRes = flowableService.addFlowableGroup(deptList.get(0).getAlternateNumber(), dept.getDeptName());
|
|
|
+ if (!"200".equals(flowableRes.get("code"))) {
|
|
|
+ throw new Exception("审批数据新增失败!");
|
|
|
+ }
|
|
|
+ flowableRes = flowableService.addFlowableUser(String.valueOf(listUserTwo.getUserId()), sysUser.getNickName(), scyId);
|
|
|
+ if (!"200".equals(flowableRes.get("code"))) {
|
|
|
+ throw new Exception("审批数据新增失败!");
|
|
|
+ }
|
|
|
+ SysDept depts = deptMapper.selectDeptById(deptId);
|
|
|
+ flowableRes = flowableService.addFlowableUser(String.valueOf(listUserTwo.getUserId()), sysUser.getNickName(), depts.getAlternateNumber());
|
|
|
+ if (!"200".equals(flowableRes.get("code"))) {
|
|
|
+ throw new Exception("审批数据新增失败!");
|
|
|
+ }
|
|
|
return R.ok();
|
|
|
}
|
|
|
|