|
@@ -13,6 +13,7 @@ import org.activiti.engine.TaskService;
|
|
import org.activiti.engine.task.Task;
|
|
import org.activiti.engine.task.Task;
|
|
import org.apache.commons.lang.StringUtils;
|
|
import org.apache.commons.lang.StringUtils;
|
|
import org.apache.shiro.SecurityUtils;
|
|
import org.apache.shiro.SecurityUtils;
|
|
|
|
+import org.checkerframework.checker.units.qual.Area;
|
|
import org.jeecg.common.api.vo.Result;
|
|
import org.jeecg.common.api.vo.Result;
|
|
import org.jeecg.common.system.api.ISysBaseAPI;
|
|
import org.jeecg.common.system.api.ISysBaseAPI;
|
|
import org.jeecg.common.system.vo.LoginUser;
|
|
import org.jeecg.common.system.vo.LoginUser;
|
|
@@ -20,6 +21,10 @@ import org.jeecg.modules.activiti.entity.ActBusiness;
|
|
import org.jeecg.modules.activiti.entity.ActZprocess;
|
|
import org.jeecg.modules.activiti.entity.ActZprocess;
|
|
import org.jeecg.modules.activiti.entity.ActivitiConstant;
|
|
import org.jeecg.modules.activiti.entity.ActivitiConstant;
|
|
import org.jeecg.modules.activiti.entity.ProcessNodeVo;
|
|
import org.jeecg.modules.activiti.entity.ProcessNodeVo;
|
|
|
|
+import org.jeecg.modules.activiti.entity.TbTableInfo;
|
|
|
|
+import org.jeecg.modules.activiti.entity.TbTableInfoPractice;
|
|
|
|
+import org.jeecg.modules.activiti.service.ITbTableInfoPracticeService;
|
|
|
|
+import org.jeecg.modules.activiti.service.ITbTableInfoService;
|
|
import org.jeecg.modules.activiti.service.Impl.ActBusinessServiceImpl;
|
|
import org.jeecg.modules.activiti.service.Impl.ActBusinessServiceImpl;
|
|
import org.jeecg.modules.activiti.service.Impl.ActZprocessServiceImpl;
|
|
import org.jeecg.modules.activiti.service.Impl.ActZprocessServiceImpl;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -57,6 +62,11 @@ public class ActBusinessController {
|
|
private RuntimeService runtimeService;
|
|
private RuntimeService runtimeService;
|
|
@Autowired
|
|
@Autowired
|
|
ISysBaseAPI sysBaseAPI;
|
|
ISysBaseAPI sysBaseAPI;
|
|
|
|
+ @Autowired
|
|
|
|
+ private ITbTableInfoService tbTableInfoService;
|
|
|
|
+ @Autowired
|
|
|
|
+ private ITbTableInfoPracticeService tbTableInfoPracticeService;
|
|
|
|
+
|
|
/*添加申请草稿状态*/
|
|
/*添加申请草稿状态*/
|
|
@RequestMapping(value = "/add", method = RequestMethod.POST)
|
|
@RequestMapping(value = "/add", method = RequestMethod.POST)
|
|
public Result add(HttpServletRequest request) throws IOException {
|
|
public Result add(HttpServletRequest request) throws IOException {
|
|
@@ -65,13 +75,23 @@ public class ActBusinessController {
|
|
String procDefId = request.getParameter("procDefId");
|
|
String procDefId = request.getParameter("procDefId");
|
|
String procDeTitle = request.getParameter("procDeTitle");
|
|
String procDeTitle = request.getParameter("procDeTitle");
|
|
String tableName = request.getParameter("tableName");
|
|
String tableName = request.getParameter("tableName");
|
|
|
|
+ String josonContent = request.getParameter("jsonContent");
|
|
|
|
+ /*保存业务表单数据到数据库表*/
|
|
|
|
+ String tableId = IdUtil.simpleUUID();
|
|
|
|
+ List<TbTableInfo> tableInfoList = tbTableInfoService.list(new LambdaQueryWrapper<TbTableInfo>().eq(TbTableInfo::getBusinessTable, tableName));
|
|
|
|
+ for(TbTableInfo tbTableInfo:tableInfoList){
|
|
|
|
+ //申请保存后的表单json
|
|
|
|
+ tbTableInfoPracticeService.save(new TbTableInfoPractice(IdUtil.simpleUUID(), tbTableInfo.getBusinessTable(), tbTableInfo.getText(),
|
|
|
|
+ StringUtils.isNotBlank(josonContent) ? josonContent : tbTableInfo.getContent(),
|
|
|
|
+ tbTableInfo.getPkOrg(), tbTableInfo.getRouteName(), tbTableInfo.getStepMemo(), tbTableInfo.getProcessId(), tbTableInfo.getTaskNodeId(),
|
|
|
|
+ tbTableInfo.getIsInitial(), tableId));
|
|
|
|
+ }
|
|
//获取审核人
|
|
//获取审核人
|
|
ProcessNodeVo node = actZprocessService.getFirstNode(procDefId);
|
|
ProcessNodeVo node = actZprocessService.getFirstNode(procDefId);
|
|
// if(node.getUsers()==null||node.getUsers().size()<=0){
|
|
// if(node.getUsers()==null||node.getUsers().size()<=0){
|
|
// result.error500("流程审核人没关联");
|
|
// result.error500("流程审核人没关联");
|
|
// }
|
|
// }
|
|
- /*保存业务表单数据到数据库表*/
|
|
|
|
- String tableId = IdUtil.simpleUUID();
|
|
|
|
|
|
+
|
|
actBusinessService.saveApplyForm(tableId,request);
|
|
actBusinessService.saveApplyForm(tableId,request);
|
|
// 保存至我的申请业务
|
|
// 保存至我的申请业务
|
|
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
|
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
|
@@ -153,6 +173,17 @@ public class ActBusinessController {
|
|
/*保存业务表单数据到数据库表*/
|
|
/*保存业务表单数据到数据库表*/
|
|
String tableId = request.getParameter("tableId");
|
|
String tableId = request.getParameter("tableId");
|
|
String tableName = request.getParameter("tableName");
|
|
String tableName = request.getParameter("tableName");
|
|
|
|
+ String jsonContent = request.getParameter("jsonContent");
|
|
|
|
+ if(StringUtils.isNotBlank(jsonContent)){
|
|
|
|
+ List<TbTableInfoPractice> list = tbTableInfoPracticeService.list(new LambdaQueryWrapper<TbTableInfoPractice>()
|
|
|
|
+ .eq(TbTableInfoPractice::getBusinessTableId, tableId));
|
|
|
|
+ for(TbTableInfoPractice tbTableInfoPractice : list) {
|
|
|
|
+ //修改申请保存后的表单json
|
|
|
|
+ tbTableInfoPracticeService.updateById(new TbTableInfoPractice(tbTableInfoPractice.getId(), jsonContent));
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
Map<String, Object> map = actBusinessService.getApplyForm(tableId, tableName);
|
|
Map<String, Object> map = actBusinessService.getApplyForm(tableId, tableName);
|
|
String tableNameb = null;
|
|
String tableNameb = null;
|
|
String tableNameChildren = null;
|
|
String tableNameChildren = null;
|