|
@@ -16,8 +16,11 @@ 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.checkerframework.checker.units.qual.Area;
|
|
import org.jeecg.common.api.vo.Result;
|
|
import org.jeecg.common.api.vo.Result;
|
|
|
|
+import org.jeecg.common.constant.CommonConstant;
|
|
import org.jeecg.common.system.api.ISysBaseAPI;
|
|
import org.jeecg.common.system.api.ISysBaseAPI;
|
|
|
|
+import org.jeecg.common.system.util.JwtUtil;
|
|
import org.jeecg.common.system.vo.LoginUser;
|
|
import org.jeecg.common.system.vo.LoginUser;
|
|
|
|
+import org.jeecg.common.util.RedisUtil;
|
|
import org.jeecg.modules.activiti.entity.*;
|
|
import org.jeecg.modules.activiti.entity.*;
|
|
import org.jeecg.modules.activiti.service.ITbTableInfoPracticeService;
|
|
import org.jeecg.modules.activiti.service.ITbTableInfoPracticeService;
|
|
import org.jeecg.modules.activiti.service.ITbTableInfoService;
|
|
import org.jeecg.modules.activiti.service.ITbTableInfoService;
|
|
@@ -80,7 +83,7 @@ public class ActBusinessController {
|
|
tbTableInfoPracticeService.save(new TbTableInfoPractice(IdUtil.simpleUUID(), tbTableInfo.getBusinessTable(), tbTableInfo.getText(),
|
|
tbTableInfoPracticeService.save(new TbTableInfoPractice(IdUtil.simpleUUID(), tbTableInfo.getBusinessTable(), tbTableInfo.getText(),
|
|
StringUtils.isNotBlank(josonContent) ? josonContent : tbTableInfo.getContent(),
|
|
StringUtils.isNotBlank(josonContent) ? josonContent : tbTableInfo.getContent(),
|
|
tbTableInfo.getPkOrg(), tbTableInfo.getRouteName(), tbTableInfo.getStepMemo(), tbTableInfo.getProcessId(), tbTableInfo.getTaskNodeId(),
|
|
tbTableInfo.getPkOrg(), tbTableInfo.getRouteName(), tbTableInfo.getStepMemo(), tbTableInfo.getProcessId(), tbTableInfo.getTaskNodeId(),
|
|
- tbTableInfo.getIsInitial(), tableId));
|
|
+ tbTableInfo.getIsInitial(), tableId,tbTableInfo.getType()));
|
|
}
|
|
}
|
|
|
|
|
|
ProcessNodeVo node = actZprocessService.getFirstNode(procDefId);
|
|
ProcessNodeVo node = actZprocessService.getFirstNode(procDefId);
|
|
@@ -148,12 +151,12 @@ public class ActBusinessController {
|
|
String tableId = actBusiness.getTableId();
|
|
String tableId = actBusiness.getTableId();
|
|
String tableName = actBusiness.getTableName();
|
|
String tableName = actBusiness.getTableName();
|
|
act.setTableId(tableId);
|
|
act.setTableId(tableId);
|
|
- Map<String, Object> busiData = actBusinessService.getBaseMapper().getBusiData(tableId, tableName);
|
|
+
|
|
-
|
|
+
|
|
- if (MapUtil.isNotEmpty(busiData)&&busiData.get(ActivitiConstant.titleKey)!=null){
|
|
+
|
|
-
|
|
+
|
|
- actBusiness.setTitle(busiData.get(ActivitiConstant.titleKey)+"");
|
|
+
|
|
- }
|
|
+
|
|
String processInstanceId = actZprocessService.startProcess(act);
|
|
String processInstanceId = actZprocessService.startProcess(act);
|
|
actBusiness.setProcInstId(processInstanceId);
|
|
actBusiness.setProcInstId(processInstanceId);
|
|
actBusiness.setStatus(1);
|
|
actBusiness.setStatus(1);
|
|
@@ -224,12 +227,12 @@ public class ActBusinessController {
|
|
String tableId = request.getParameter("id");
|
|
String tableId = request.getParameter("id");
|
|
String jsonContent1 = JSON.toJSONString(jsonContent.getJsonContent());
|
|
String jsonContent1 = JSON.toJSONString(jsonContent.getJsonContent());
|
|
if(StringUtils.isNotBlank(jsonContent1)){
|
|
if(StringUtils.isNotBlank(jsonContent1)){
|
|
- List<TbTableInfoPractice> list = tbTableInfoPracticeService.list(new LambdaQueryWrapper<TbTableInfoPractice>()
|
|
+
|
|
- .eq(TbTableInfoPractice::getBusinessTableId, tableId));
|
|
+
|
|
- for(TbTableInfoPractice tbTableInfoPractice : list) {
|
|
+
|
|
-
|
|
+
|
|
- tbTableInfoPracticeService.updateById(new TbTableInfoPractice(tbTableInfoPractice.getId(), jsonContent1));
|
|
+
|
|
- }
|
|
+
|
|
}
|
|
}
|
|
actBusinessService.saveApplyForm(tableId,request);
|
|
actBusinessService.saveApplyForm(tableId,request);
|
|
return Result.ok();
|
|
return Result.ok();
|
|
@@ -274,6 +277,38 @@ public class ActBusinessController {
|
|
actBusinessService.updateById(actBusiness);
|
|
actBusinessService.updateById(actBusiness);
|
|
return Result.ok("操作成功");
|
|
return Result.ok("操作成功");
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ * @Author chenchuang
|
|
|
|
+ * @Description
|
|
|
|
+ * @Date 2021/11/26 10:52
|
|
|
|
+ * @Param [act]
|
|
|
|
+ * @return org.jeecg.common.api.vo.Result
|
|
|
|
+ */
|
|
|
|
+ @RequestMapping(value = "/external/apply", method = RequestMethod.POST)
|
|
|
|
+ public Result externalApply(ActBusiness act){
|
|
|
|
+ Result result=new Result();
|
|
|
|
+ try {
|
|
|
|
+
|
|
|
|
+ ProcessNodeVo node = actZprocessService.getFirstNode(act.getProcDefId());
|
|
|
|
+ ActBusiness actBusiness = new ActBusiness();
|
|
|
|
+ actBusiness.setUserId(act.getExternalUsername());
|
|
|
|
+ actBusiness.setTableId(act.getTableId());
|
|
|
|
+ actBusiness.setProcDefId(act.getProcDefId());
|
|
|
|
+ actBusiness.setTitle(act.getTitle());
|
|
|
|
+ actBusiness.setTableName(act.getTableName());
|
|
|
|
+ actBusiness.setPkOrg("4adf2baae8d644e7be6ead18bdf2ff2f");
|
|
|
|
+ actBusiness.setExternalUsername(act.getExternalUsername());
|
|
|
|
+ actBusinessService.save(actBusiness);
|
|
|
|
+ submit(actBusiness,node);
|
|
|
|
+ result.success("操作成功");
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ e.printStackTrace();
|
|
|
|
+ result.error500("操作失败");
|
|
|
|
+ }
|
|
|
|
+ return result;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
|
|
@RequestMapping(value = "/cancel", method = RequestMethod.POST)
|
|
@RequestMapping(value = "/cancel", method = RequestMethod.POST)
|
|
public Result<Object> cancel(@RequestParam String id,
|
|
public Result<Object> cancel(@RequestParam String id,
|
|
@@ -340,9 +375,9 @@ public class ActBusinessController {
|
|
public Result<Object> listData(){
|
|
public Result<Object> listData(){
|
|
List<Map> list = new ArrayList();
|
|
List<Map> list = new ArrayList();
|
|
Map map = Maps.newHashMap();
|
|
Map map = Maps.newHashMap();
|
|
- map.put("text", "实例表单1");
|
|
+ map.put("text", "合同表单");
|
|
- map.put("routeName", "外部表单test_demo1");
|
|
+ map.put("routeName", "外部表单contract-file");
|
|
- map.put("businessTable", "test_demo1");
|
|
+ map.put("businessTable", "contract-file");
|
|
list.add(map);
|
|
list.add(map);
|
|
return Result.ok(list);
|
|
return Result.ok(list);
|
|
}
|
|
}
|