bug fixed active

This commit is contained in:
Timer
2026-03-23 21:42:19 +08:00
parent 6de1aabe80
commit bce9cc42e8

View File

@ -63,6 +63,7 @@ import java.util.Locale;
import java.util.Map; import java.util.Map;
import java.util.regex.Matcher; import java.util.regex.Matcher;
import java.util.regex.Pattern; import java.util.regex.Pattern;
/** /**
* 流程模型控制器 * 流程模型控制器
* *
@ -95,10 +96,12 @@ public class ModelController {
public String showModelList(HttpServletRequest request, Model model) { public String showModelList(HttpServletRequest request, Model model) {
return "/activiti/modelList"; return "/activiti/modelList";
} }
@RequestMapping("/showProcessTechnicsList.do") @RequestMapping("/showProcessTechnicsList.do")
public String showProcessTechnicsList(HttpServletRequest request, Model model) { public String showProcessTechnicsList(HttpServletRequest request, Model model) {
return "/activiti/processTechnicsList"; return "/activiti/processTechnicsList";
} }
/* /*
* 模型副本 * 模型副本
* */ * */
@ -135,6 +138,7 @@ public class ModelController {
model.addAttribute("result", result); model.addAttribute("result", result);
return new ModelAndView("result"); return new ModelAndView("result");
} }
@RequestMapping("/doimportExcel.do") @RequestMapping("/doimportExcel.do")
public String doimportTechnics(HttpServletRequest request, Model model) { public String doimportTechnics(HttpServletRequest request, Model model) {
return "/activiti/importExcel4Model"; return "/activiti/importExcel4Model";
@ -418,8 +422,10 @@ public class ModelController {
/* /*
* 获取主工序code * 获取主工序code
* */ * */
/** /**
* 获取合并单元格的值 * 获取合并单元格的值
*
* @param sheet * @param sheet
* @param row * @param row
* @param column * @param column
@ -448,8 +454,10 @@ public class ModelController {
return null; return null;
} }
/** /**
* 获取单元格的值 * 获取单元格的值
*
* @param cell * @param cell
* @return * @return
*/ */
@ -479,6 +487,7 @@ public class ModelController {
return ""; return "";
} }
/* /*
* 将存在的值赋给目标变量 * 将存在的值赋给目标变量
* */ * */
@ -504,6 +513,7 @@ public class ModelController {
throw new Exception("属性复制失败:" + e.getMessage()); throw new Exception("属性复制失败:" + e.getMessage());
} }
} }
/** /**
* 流程定义列表 * 流程定义列表
* *
@ -572,13 +582,13 @@ public class ModelController {
return new ModelAndView("result"); return new ModelAndView("result");
// page.setTotalCount(processDefinitionQuery.count()); // page.setTotalCount(processDefinitionQuery.count());
// page.setResult(objects); // page.setResult(objects);
// mav.addObject("page", page); // mav.addObject("page", page);
// //
// return mav; // return mav;
} }
/** /**
* 流程定义列表 * 流程定义列表
* *
@ -611,12 +621,14 @@ public class ModelController {
return new ModelAndView("result"); return new ModelAndView("result");
} }
@RequestMapping("/addModel.do") @RequestMapping("/addModel.do")
public String addModel(HttpServletRequest request, Model model) { public String addModel(HttpServletRequest request, Model model) {
Company company = this.unitService.getCompById(request.getParameter("companyId")); Company company = this.unitService.getCompById(request.getParameter("companyId"));
request.setAttribute("company", company); request.setAttribute("company", company);
return "/activiti/modelAdd"; return "/activiti/modelAdd";
} }
@RequestMapping("/editModel.do") @RequestMapping("/editModel.do")
public String editModel(HttpServletRequest request, Model model) { public String editModel(HttpServletRequest request, Model model) {
String modelId = request.getParameter("modelid"); String modelId = request.getParameter("modelid");
@ -637,10 +649,12 @@ public class ModelController {
} }
return "/activiti/modelEdit"; return "/activiti/modelEdit";
} }
/** /**
* 编辑流程图 * 编辑流程图
* @author wuping *
* @return * @return
* @author wuping
*/ */
@RequestMapping("/editFlow.do") @RequestMapping("/editFlow.do")
public String editFlow(HttpServletRequest request, Model model) { public String editFlow(HttpServletRequest request, Model model) {
@ -649,8 +663,9 @@ public class ModelController {
/** /**
* 编辑流程节点添加业务 * 编辑流程节点添加业务
* @author wuping *
* @return * @return
* @author wuping
*/ */
@RequestMapping("/editNode.do") @RequestMapping("/editNode.do")
public String editNode(HttpServletRequest request, Model model) { public String editNode(HttpServletRequest request, Model model) {
@ -709,8 +724,9 @@ public class ModelController {
/** /**
* 流程节点列表 * 流程节点列表
* @author wuping *
* @return * @return
* @author wuping
*/ */
@RequestMapping("modelNode.do") @RequestMapping("modelNode.do")
public ModelAndView modelNode(HttpServletRequest request, Model model) { public ModelAndView modelNode(HttpServletRequest request, Model model) {
@ -729,17 +745,21 @@ public class ModelController {
if (stencil.get("id").asText().toString().equals("UserTask")) { if (stencil.get("id").asText().toString().equals("UserTask")) {
JSONObject json = JSONObject.fromObject(childShapes.path(i).toString()); JSONObject json = JSONObject.fromObject(childShapes.path(i).toString());
JSONObject properties = JSONObject.fromObject(json.get("properties").toString()); JSONObject properties = JSONObject.fromObject(json.get("properties").toString());
String documentation = properties.get("documentation").toString(); String documentation = "";
Object documentation1 = properties.get("documentation");
if (documentation1 != null) {
documentation = documentation1.toString();
json.put("businessunit", businessUnitService.selectById(documentation));
}
// 获取节点名称 // 获取节点名称
String nodeName = ""; String nodeName = "";
if (properties.has("name") && properties.get("name") != null) { if (properties.has("name") && properties.get("name") != null) {
nodeName = properties.get("name").toString(); nodeName = properties.get("name").toString();
}else if(properties.has("namename") && properties.get("namename") != null) {
nodeName = properties.get("namename").toString();
} }
// 添加节点名称字段,方便前端显示 // 添加节点名称字段,方便前端显示
json.put("nodeName", nodeName); json.put("nodeName", nodeName);
json.put("businessunit", businessUnitService.selectById(documentation));
String resourceId = json.get("resourceId").toString(); String resourceId = json.get("resourceId").toString();
List<ModelNodeJob> list = this.jobService.selectModelNodeJobListByWhere(" where resource_id='" + resourceId + "' and model_id ='" + modelData.getId() + "' "); List<ModelNodeJob> list = this.jobService.selectModelNodeJobListByWhere(" where resource_id='" + resourceId + "' and model_id ='" + modelData.getId() + "' ");
StringBuilder jobNames = new StringBuilder(); StringBuilder jobNames = new StringBuilder();
@ -782,6 +802,7 @@ public class ModelController {
return new ModelAndView("result"); return new ModelAndView("result");
} }
/** /**
* 更新模型 * 更新模型
*/ */
@ -827,6 +848,7 @@ public class ModelController {
model.addAttribute("result", result); model.addAttribute("result", result);
return "result"; return "result";
} }
/** /**
* 创建模型 * 创建模型
*/ */
@ -876,10 +898,12 @@ public class ModelController {
model.addAttribute("result", result); model.addAttribute("result", result);
return "result"; return "result";
} }
/** /**
* 更新业务流程节点 * 更新业务流程节点
* @author wuping *
* @return * @return
* @author wuping
*/ */
@RequestMapping("/saveNode.do") @RequestMapping("/saveNode.do")
public String saveNode(HttpServletRequest request, Model model, public String saveNode(HttpServletRequest request, Model model,