Compare commits
18 Commits
7048001c0c
...
1cd6750710
| Author | SHA1 | Date | |
|---|---|---|---|
| 1cd6750710 | |||
| b745bb8482 | |||
| 9a9dc780e4 | |||
| 3208f2b8a3 | |||
| 44b6bf04d5 | |||
| 75f33e37d7 | |||
| 17751bd0ab | |||
| 82d68ed669 | |||
| 09fce43c98 | |||
| 9895757c92 | |||
| bce9cc42e8 | |||
| 6de1aabe80 | |||
| 3ea3e0a9af | |||
| 56da3dc9ff | |||
| 2bfa643373 | |||
| 5e52e1db7c | |||
| 1c8f1f98d5 | |||
| 3da9c9afb5 |
@ -74,6 +74,7 @@ import org.activiti.engine.task.Task;
|
|||||||
import org.activiti.image.ProcessDiagramGenerator;
|
import org.activiti.image.ProcessDiagramGenerator;
|
||||||
import org.activiti.spring.ProcessEngineFactoryBean;
|
import org.activiti.spring.ProcessEngineFactoryBean;
|
||||||
import org.apache.commons.io.FilenameUtils;
|
import org.apache.commons.io.FilenameUtils;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.codehaus.jackson.map.ObjectMapper;
|
import org.codehaus.jackson.map.ObjectMapper;
|
||||||
import org.codehaus.jackson.node.ObjectNode;
|
import org.codehaus.jackson.node.ObjectNode;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
@ -225,12 +226,12 @@ public class ActivitiController {
|
|||||||
private EquipmentCardService equipmentCardService;
|
private EquipmentCardService equipmentCardService;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@RequestMapping("/showProcessList.do")
|
@RequestMapping("/showProcessList.do")
|
||||||
public String showProcessList(HttpServletRequest request, Model model) {
|
public String showProcessList(HttpServletRequest request, Model model) {
|
||||||
System.out.println("basic");
|
System.out.println("basic");
|
||||||
return "/activiti/processList";
|
return "/activiti/processList";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 流程定义列表
|
* 流程定义列表
|
||||||
*
|
*
|
||||||
@ -307,13 +308,13 @@ public class ActivitiController {
|
|||||||
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 流程定义列表
|
* 流程定义列表
|
||||||
*
|
*
|
||||||
@ -334,8 +335,7 @@ public class ActivitiController {
|
|||||||
try {//解决中文乱码问题
|
try {//解决中文乱码问题
|
||||||
wherestr_search_name = new String(wherestr_search_name.getBytes("ISO-8859-1"), "UTF-8");
|
wherestr_search_name = new String(wherestr_search_name.getBytes("ISO-8859-1"), "UTF-8");
|
||||||
wherestr_search_code = new String(wherestr_search_code.getBytes("ISO-8859-1"), "UTF-8");
|
wherestr_search_code = new String(wherestr_search_code.getBytes("ISO-8859-1"), "UTF-8");
|
||||||
} catch (UnsupportedEncodingException e)
|
} catch (UnsupportedEncodingException e) {
|
||||||
{
|
|
||||||
logger.error("Failed to encode search parameters", e);
|
logger.error("Failed to encode search parameters", e);
|
||||||
}
|
}
|
||||||
// Page<Object[]> page1 = new Page<Object[]>(PageUtil.PAGE_SIZE);
|
// Page<Object[]> page1 = new Page<Object[]>(PageUtil.PAGE_SIZE);
|
||||||
@ -395,13 +395,13 @@ public class ActivitiController {
|
|||||||
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据流程定义,获取流程所有工序
|
* 根据流程定义,获取流程所有工序
|
||||||
*
|
*
|
||||||
@ -438,8 +438,10 @@ public class ActivitiController {
|
|||||||
List<WorkTask> workTasks = ActivitiUtil.activitiImplToWorkTask(usertasks);
|
List<WorkTask> workTasks = ActivitiUtil.activitiImplToWorkTask(usertasks);
|
||||||
return workTasks;
|
return workTasks;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取流程下一步的所有任务清单
|
* 获取流程下一步的所有任务清单
|
||||||
|
*
|
||||||
* @param request
|
* @param request
|
||||||
* @param model
|
* @param model
|
||||||
* @returnq
|
* @returnq
|
||||||
@ -468,6 +470,7 @@ public class ActivitiController {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取流程下一步的所有任务清单,select2选择
|
* 获取流程下一步的所有任务清单,select2选择
|
||||||
|
*
|
||||||
* @param request
|
* @param request
|
||||||
* @param model
|
* @param model
|
||||||
* @returnq
|
* @returnq
|
||||||
@ -512,6 +515,7 @@ public class ActivitiController {
|
|||||||
}
|
}
|
||||||
return "/activiti/processForSelect";
|
return "/activiti/processForSelect";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 流程定义列表
|
* 流程定义列表
|
||||||
*
|
*
|
||||||
@ -540,7 +544,6 @@ public class ActivitiController {
|
|||||||
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);
|
||||||
@ -552,10 +555,12 @@ public class ActivitiController {
|
|||||||
public String taskList(HttpServletRequest request, Model model) {
|
public String taskList(HttpServletRequest request, Model model) {
|
||||||
return "/activiti/taskList";
|
return "/activiti/taskList";
|
||||||
}
|
}
|
||||||
|
|
||||||
@RequestMapping("/taskList4main.do")
|
@RequestMapping("/taskList4main.do")
|
||||||
public String taskList4main(HttpServletRequest request, Model model) {
|
public String taskList4main(HttpServletRequest request, Model model) {
|
||||||
return "/activiti/taskList4main";
|
return "/activiti/taskList4main";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取生产总流程任务列表
|
* 获取生产总流程任务列表
|
||||||
*
|
*
|
||||||
@ -581,6 +586,7 @@ public class ActivitiController {
|
|||||||
|
|
||||||
return new ModelAndView("result");
|
return new ModelAndView("result");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取生产总流程任务列表
|
* 获取生产总流程任务列表
|
||||||
*
|
*
|
||||||
@ -781,8 +787,7 @@ public class ActivitiController {
|
|||||||
}
|
}
|
||||||
maintenance.setStatus(todoTask.getTask().getDescription());
|
maintenance.setStatus(todoTask.getTask().getDescription());
|
||||||
todoTask.setBusiness(maintenance);
|
todoTask.setBusiness(maintenance);
|
||||||
}
|
} else if (todoTask.getType().contains(ProcessType.Repair_Plan.getId())) {
|
||||||
else if(todoTask.getType().contains(ProcessType.Repair_Plan.getId())){
|
|
||||||
//之前老的单条计划
|
//之前老的单条计划
|
||||||
/*EquipmentRepairPlan maintenancePlan = this.equipmentRepairPlanService.selectById(businessKey);
|
/*EquipmentRepairPlan maintenancePlan = this.equipmentRepairPlanService.selectById(businessKey);
|
||||||
maintenance=new Maintenance();
|
maintenance=new Maintenance();
|
||||||
@ -807,8 +812,7 @@ public class ActivitiController {
|
|||||||
}
|
}
|
||||||
maintenance.setStatus(todoTask.getTask().getDescription());
|
maintenance.setStatus(todoTask.getTask().getDescription());
|
||||||
todoTask.setBusiness(maintenance);
|
todoTask.setBusiness(maintenance);
|
||||||
}
|
} else if (todoTask.getType().contains(ProcessType.Lose_Apply.getId())) {
|
||||||
else if(todoTask.getType().contains(ProcessType.Lose_Apply.getId())){
|
|
||||||
EquipmentLoseApply loseApply = this.equipmentLoseApplyService.selectById(businessKey);
|
EquipmentLoseApply loseApply = this.equipmentLoseApplyService.selectById(businessKey);
|
||||||
maintenance = new Maintenance();
|
maintenance = new Maintenance();
|
||||||
Company company = unitService.getCompById(loseApply.getBizId());
|
Company company = unitService.getCompById(loseApply.getBizId());
|
||||||
@ -930,8 +934,7 @@ public class ActivitiController {
|
|||||||
maintenance.setProblem(overhaul.getProjectDescribe());
|
maintenance.setProblem(overhaul.getProjectDescribe());
|
||||||
maintenance.setStatus(todoTask.getTask().getDescription());
|
maintenance.setStatus(todoTask.getTask().getDescription());
|
||||||
todoTask.setBusiness(maintenance);
|
todoTask.setBusiness(maintenance);
|
||||||
}
|
} else if (todoTask.getType().contains(ProcessType.Report_Check.getId())) {
|
||||||
else if(todoTask.getType().contains(ProcessType.Report_Check.getId())){
|
|
||||||
RptCreate rptCreate = rptCreateService.selectById(businessKey);
|
RptCreate rptCreate = rptCreateService.selectById(businessKey);
|
||||||
maintenance = new Maintenance();
|
maintenance = new Maintenance();
|
||||||
if (rptCreate != null) {
|
if (rptCreate != null) {
|
||||||
@ -1051,8 +1054,10 @@ public class ActivitiController {
|
|||||||
|
|
||||||
return new ModelAndView("result");
|
return new ModelAndView("result");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 对json数组排序,
|
* 对json数组排序,
|
||||||
|
*
|
||||||
* @param jsonArr
|
* @param jsonArr
|
||||||
* @param sortKey 排序关键字
|
* @param sortKey 排序关键字
|
||||||
* @param is_desc is_desc-false升序列 is_desc-true降序 (排序字段为字符串)
|
* @param is_desc is_desc-false升序列 is_desc-true降序 (排序字段为字符串)
|
||||||
@ -1071,6 +1076,7 @@ public class ActivitiController {
|
|||||||
Collections.sort(jsonValues, new Comparator<JSONObject>() {
|
Collections.sort(jsonValues, new Comparator<JSONObject>() {
|
||||||
//排序字段
|
//排序字段
|
||||||
private final String KEY_NAME = sortKey;
|
private final String KEY_NAME = sortKey;
|
||||||
|
|
||||||
//重写compare方法
|
//重写compare方法
|
||||||
@Override
|
@Override
|
||||||
public int compare(JSONObject a, JSONObject b) {
|
public int compare(JSONObject a, JSONObject b) {
|
||||||
@ -1102,6 +1108,7 @@ public class ActivitiController {
|
|||||||
public String donetaskList(HttpServletRequest request, Model model) {
|
public String donetaskList(HttpServletRequest request, Model model) {
|
||||||
return "/activiti/donetaskList";
|
return "/activiti/donetaskList";
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 已办事项
|
* 已办事项
|
||||||
*/
|
*/
|
||||||
@ -1128,6 +1135,7 @@ public class ActivitiController {
|
|||||||
model.addAttribute("result", json);
|
model.addAttribute("result", json);
|
||||||
return new ModelAndView("result");
|
return new ModelAndView("result");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取生产总流程任务列表
|
* 获取生产总流程任务列表
|
||||||
*
|
*
|
||||||
@ -1160,6 +1168,7 @@ public class ActivitiController {
|
|||||||
|
|
||||||
return new ModelAndView("result");
|
return new ModelAndView("result");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取生产总流程任务列表
|
* 获取生产总流程任务列表
|
||||||
*
|
*
|
||||||
@ -1199,24 +1208,48 @@ public class ActivitiController {
|
|||||||
|
|
||||||
return new ModelAndView("result");
|
return new ModelAndView("result");
|
||||||
}
|
}
|
||||||
|
|
||||||
@RequestMapping("/processInstaceList.do")
|
@RequestMapping("/processInstaceList.do")
|
||||||
public String processInstaceList(HttpServletRequest request, Model model) {
|
public String processInstaceList(HttpServletRequest request, Model model) {
|
||||||
return "/activiti/processInstanceList";
|
return "/activiti/processInstanceList";
|
||||||
}
|
}
|
||||||
/**获取所有实例类型*/
|
|
||||||
|
/**
|
||||||
|
* 获取所有实例类型
|
||||||
|
*/
|
||||||
@RequestMapping("/getProcessTypes4Combo.do")
|
@RequestMapping("/getProcessTypes4Combo.do")
|
||||||
public ModelAndView getProcessTypes4Combo(HttpServletRequest request, Model model) {
|
public ModelAndView getProcessTypes4Combo(HttpServletRequest request, Model model) {
|
||||||
JSONArray jsonArray = new JSONArray();
|
JSONArray jsonArray = new JSONArray();
|
||||||
ProcessType[] types = ProcessType.values();
|
ProcessType[] types = ProcessType.values();
|
||||||
|
// Read search term from request parameter (for Select2 AJAX) or session
|
||||||
|
String term = request.getParameter("term");
|
||||||
|
if (term == null || term.isEmpty()) {
|
||||||
|
Object sessionTerm = request.getSession().getAttribute("term");
|
||||||
|
if (sessionTerm != null) {
|
||||||
|
term = sessionTerm.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (term != null && !term.isEmpty()) {
|
||||||
|
for (ProcessType item : types) {
|
||||||
|
if(item.getName().contains(term)){
|
||||||
|
JSONObject jsonObject = new JSONObject();
|
||||||
|
jsonObject.put("id", item.getId());
|
||||||
|
jsonObject.put("text", item.getName());
|
||||||
|
jsonArray.add(jsonObject);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
for (ProcessType item : types) {
|
for (ProcessType item : types) {
|
||||||
JSONObject jsonObject = new JSONObject();
|
JSONObject jsonObject = new JSONObject();
|
||||||
jsonObject.put("id", item.getId());
|
jsonObject.put("id", item.getId());
|
||||||
jsonObject.put("text", item.getName());
|
jsonObject.put("text", item.getName());
|
||||||
jsonArray.add(jsonObject);
|
jsonArray.add(jsonObject);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
model.addAttribute("result", jsonArray.toString());
|
model.addAttribute("result", jsonArray.toString());
|
||||||
return new ModelAndView("result");
|
return new ModelAndView("result");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取所有生产流程
|
* 获取所有生产流程
|
||||||
*
|
*
|
||||||
@ -1244,6 +1277,7 @@ public class ActivitiController {
|
|||||||
|
|
||||||
return new ModelAndView("result");
|
return new ModelAndView("result");
|
||||||
}
|
}
|
||||||
|
|
||||||
private JSONArray todoTasklistToJsonArray(List list) {
|
private JSONArray todoTasklistToJsonArray(List list) {
|
||||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||||
JSONArray json = new JSONArray();
|
JSONArray json = new JSONArray();
|
||||||
@ -1302,6 +1336,7 @@ public class ActivitiController {
|
|||||||
sdf = null;
|
sdf = null;
|
||||||
return json;
|
return json;
|
||||||
}
|
}
|
||||||
|
|
||||||
private JSONArray listToJsonArray(List list) {
|
private JSONArray listToJsonArray(List list) {
|
||||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||||
JSONArray json = new JSONArray();
|
JSONArray json = new JSONArray();
|
||||||
@ -1339,6 +1374,7 @@ public class ActivitiController {
|
|||||||
sdf = null;
|
sdf = null;
|
||||||
return json;
|
return json;
|
||||||
}
|
}
|
||||||
|
|
||||||
private JSONArray listToJsonArray_ProcessDefinition(List list) {
|
private JSONArray listToJsonArray_ProcessDefinition(List list) {
|
||||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||||
JSONArray json = new JSONArray();
|
JSONArray json = new JSONArray();
|
||||||
@ -1365,6 +1401,7 @@ public class ActivitiController {
|
|||||||
sdf = null;
|
sdf = null;
|
||||||
return json;
|
return json;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 部署全部流程
|
* 部署全部流程
|
||||||
*
|
*
|
||||||
@ -1456,7 +1493,10 @@ public class ActivitiController {
|
|||||||
model.addAttribute("result", result);
|
model.addAttribute("result", result);
|
||||||
return "result";
|
return "result";
|
||||||
}
|
}
|
||||||
/**删除流程*/
|
|
||||||
|
/**
|
||||||
|
* 删除流程
|
||||||
|
*/
|
||||||
@RequestMapping(value = "/process/delProcessInstance")
|
@RequestMapping(value = "/process/delProcessInstance")
|
||||||
public String delProcessInstance(HttpServletRequest request, Model model,
|
public String delProcessInstance(HttpServletRequest request, Model model,
|
||||||
@RequestParam("id") String processInstanceId) {
|
@RequestParam("id") String processInstanceId) {
|
||||||
@ -1473,6 +1513,7 @@ public class ActivitiController {
|
|||||||
model.addAttribute("result", result);
|
model.addAttribute("result", result);
|
||||||
return "result";
|
return "result";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 输出跟踪流程信息
|
* 输出跟踪流程信息
|
||||||
*
|
*
|
||||||
@ -1493,6 +1534,7 @@ public class ActivitiController {
|
|||||||
}
|
}
|
||||||
return activityInfos;
|
return activityInfos;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 输出定义流程信息
|
* 输出定义流程信息
|
||||||
*
|
*
|
||||||
@ -1769,7 +1811,6 @@ public class ActivitiController {
|
|||||||
|
|
||||||
return result;
|
return result;
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
private Map<String, Object> packageTaskInfo(SimpleDateFormat sdf, Task task, ProcessDefinition processDefinition) {
|
private Map<String, Object> packageTaskInfo(SimpleDateFormat sdf, Task task, ProcessDefinition processDefinition) {
|
||||||
Map<String, Object> singleTask = new HashMap<String, Object>();
|
Map<String, Object> singleTask = new HashMap<String, Object>();
|
||||||
singleTask.put("id", task.getId());
|
singleTask.put("id", task.getId());
|
||||||
@ -1808,6 +1849,7 @@ public class ActivitiController {
|
|||||||
model.addAttribute("result", result);
|
model.addAttribute("result", result);
|
||||||
return "result";
|
return "result";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 挂起、激活流程实例
|
* 挂起、激活流程实例
|
||||||
*/
|
*/
|
||||||
@ -1848,6 +1890,7 @@ public class ActivitiController {
|
|||||||
model.addAttribute("result", result);
|
model.addAttribute("result", result);
|
||||||
return "result";
|
return "result";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量签收任务
|
* 批量签收任务
|
||||||
*/
|
*/
|
||||||
@ -1875,8 +1918,10 @@ public class ActivitiController {
|
|||||||
model.addAttribute("result", result);
|
model.addAttribute("result", result);
|
||||||
return "result";
|
return "result";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获得流程节点关联人员
|
* 获得流程节点关联人员
|
||||||
|
*
|
||||||
* @param request
|
* @param request
|
||||||
* @param model
|
* @param model
|
||||||
* @param resourceId
|
* @param resourceId
|
||||||
@ -1917,6 +1962,7 @@ public class ActivitiController {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 获得流程节点关联职位
|
* 获得流程节点关联职位
|
||||||
|
*
|
||||||
* @param request
|
* @param request
|
||||||
* @param model
|
* @param model
|
||||||
* @param resourceId
|
* @param resourceId
|
||||||
@ -1941,6 +1987,7 @@ public class ActivitiController {
|
|||||||
model.addAttribute("result", json);
|
model.addAttribute("result", json);
|
||||||
return "result";
|
return "result";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 导出图片文件到硬盘
|
* 导出图片文件到硬盘
|
||||||
*
|
*
|
||||||
|
|||||||
@ -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,
|
||||||
|
|||||||
@ -93,11 +93,7 @@ public class BusinessUnitController {
|
|||||||
public String dosave(HttpServletRequest request,Model model,
|
public String dosave(HttpServletRequest request,Model model,
|
||||||
@ModelAttribute BusinessUnit businessUnit){
|
@ModelAttribute BusinessUnit businessUnit){
|
||||||
User cu= (User)request.getSession().getAttribute("cu");
|
User cu= (User)request.getSession().getAttribute("cu");
|
||||||
// Use custom ID if provided, otherwise generate UUID
|
String id = CommUtil.getUUID();
|
||||||
String id = businessUnit.getId();
|
|
||||||
if(id == null || id.trim().isEmpty()) {
|
|
||||||
id = CommUtil.getUUID();
|
|
||||||
}
|
|
||||||
businessUnit.setId(id);
|
businessUnit.setId(id);
|
||||||
businessUnit.setInsuser(cu.getId());
|
businessUnit.setInsuser(cu.getId());
|
||||||
businessUnit.setInsdt(CommUtil.nowDate());
|
businessUnit.setInsdt(CommUtil.nowDate());
|
||||||
|
|||||||
@ -327,13 +327,13 @@ public class DataController {
|
|||||||
fileIds = fileIds.replace(",","','");
|
fileIds = fileIds.replace(",","','");
|
||||||
wherestr += " and (id in ('"+fileIds+"') or filename like '%"+fileName+"%') ";
|
wherestr += " and (id in ('"+fileIds+"') or filename like '%"+fileName+"%') ";
|
||||||
}
|
}
|
||||||
if(request.getParameter("masterId")!=null && !request.getParameter("masterId").isEmpty()){
|
// if(request.getParameter("masterId")!=null && !request.getParameter("masterId").isEmpty()){
|
||||||
String masterId = request.getParameter("masterId");
|
// String masterId = request.getParameter("masterId");
|
||||||
masterId = masterId.replace(",","','");
|
// masterId = masterId.replace(",","','");
|
||||||
wherestr += " and masterid in ('"+masterId+"')";
|
// wherestr += " and masterid in ('"+masterId+"')";
|
||||||
}else if(request.getParameter("equipmentId") == null){
|
// }else if(request.getParameter("equipmentId") == null){
|
||||||
wherestr += " and masterid in ('')";
|
// wherestr += " and masterid in ('')";
|
||||||
}
|
// }
|
||||||
if(request.getParameter("equipmentId")!=null && !request.getParameter("equipmentId").isEmpty()){
|
if(request.getParameter("equipmentId")!=null && !request.getParameter("equipmentId").isEmpty()){
|
||||||
String fileIds = this.equipmentFileService.getFileIds(request.getParameter("equipmentId"));
|
String fileIds = this.equipmentFileService.getFileIds(request.getParameter("equipmentId"));
|
||||||
fileIds = fileIds.replace(",","','");
|
fileIds = fileIds.replace(",","','");
|
||||||
|
|||||||
@ -5696,6 +5696,14 @@ public class EquipmentCardController {
|
|||||||
* @param model
|
* @param model
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
// ├── Water Plant (水厂)
|
||||||
|
//│ ├── Process Section A (工艺段) ← Previously lost
|
||||||
|
//│ ├── Process Section B (工艺段) ← Previously lost
|
||||||
|
//│ ├── Pump Station 1 (泵站) ← Was overwriting above
|
||||||
|
//│ │ ├── Process Section C (工艺段)
|
||||||
|
//│ │ └── Process Section D (工艺段)
|
||||||
|
//│ └── Pump Station 2 (泵站)
|
||||||
|
// │ └── Process Section E (工艺段)
|
||||||
@RequestMapping("/getProcessSection4EquipmentCardTree.do")
|
@RequestMapping("/getProcessSection4EquipmentCardTree.do")
|
||||||
public String getProcessSection4EquipmentCardTree(HttpServletRequest request, Model model) {
|
public String getProcessSection4EquipmentCardTree(HttpServletRequest request, Model model) {
|
||||||
String unitId = request.getParameter("unitId");
|
String unitId = request.getParameter("unitId");
|
||||||
|
|||||||
@ -36,6 +36,7 @@ import java.util.UUID;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 综合检查
|
* 综合检查
|
||||||
|
*
|
||||||
* @author lt
|
* @author lt
|
||||||
*/
|
*/
|
||||||
@Controller
|
@Controller
|
||||||
@ -125,11 +126,13 @@ public class SafetyCheckComprehensiveController {
|
|||||||
@RequestMapping("/save.do")
|
@RequestMapping("/save.do")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public Result save(HttpServletRequest request, SafetyCheckComprehensive bean, MultipartFile file) throws Exception {
|
public Result save(HttpServletRequest request, SafetyCheckComprehensive bean, MultipartFile[] multipartFiles) throws Exception {
|
||||||
User cu = (User) request.getSession().getAttribute("cu");
|
User cu = (User) request.getSession().getAttribute("cu");
|
||||||
bean.setId(UUID.randomUUID().toString());
|
bean.setId(UUID.randomUUID().toString());
|
||||||
if (file.getSize() > 0) {
|
if (multipartFiles != null) {
|
||||||
safetyFilesService.upload(request, null, SafetyFunctionEnum.SAFETY_CHECK_COMPREHENSIVE.getId(), SafetyCheckStatusEnum.APPLY.getId(), bean.getId());
|
for (MultipartFile file : multipartFiles) {
|
||||||
|
safetyFilesService.upload(request, file, SafetyFunctionEnum.SAFETY_CHECK_COMPREHENSIVE.getId(), SafetyCheckStatusEnum.APPLY.getId(), bean.getId());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
bean.setCheckCode(safetySeqService.code(request, SafetyFunctionEnum.SAFETY_CHECK_COMPREHENSIVE));
|
bean.setCheckCode(safetySeqService.code(request, SafetyFunctionEnum.SAFETY_CHECK_COMPREHENSIVE));
|
||||||
if (bean.getCheckResult() == SafetyCheckResultEnum.OK.getId()) {
|
if (bean.getCheckResult() == SafetyCheckResultEnum.OK.getId()) {
|
||||||
@ -153,7 +156,7 @@ public class SafetyCheckComprehensiveController {
|
|||||||
@RequestMapping("/saveApply.do")
|
@RequestMapping("/saveApply.do")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public Result saveApply(HttpServletRequest request, SafetyCheckComprehensive bean, MultipartFile file) throws Exception {
|
public Result saveApply(HttpServletRequest request, SafetyCheckComprehensive bean, MultipartFile[] file) throws Exception {
|
||||||
if (StringUtils.isEmpty(bean.getDutyUserId())) {
|
if (StringUtils.isEmpty(bean.getDutyUserId())) {
|
||||||
return Result.failed("整改负责人不能为空!");
|
return Result.failed("整改负责人不能为空!");
|
||||||
}
|
}
|
||||||
|
|||||||
@ -211,7 +211,8 @@ public class SafetyCheckDaylyController {
|
|||||||
@ResponseBody
|
@ResponseBody
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public Result saveApply(HttpServletRequest request, SafetyCheckDayly bean, MultipartFile file) throws Exception {
|
public Result saveApply(HttpServletRequest request, SafetyCheckDayly bean, MultipartFile file) throws Exception {
|
||||||
if(StringUtils.isEmpty(bean.getDutyUserId())){
|
if(bean.getCheckResult() != 1 && StringUtils.isEmpty(bean.getDutyUserId())){
|
||||||
|
// 弱智东西,不相符的才需要整改负责人
|
||||||
return Result.failed("整改负责人不能为空!");
|
return Result.failed("整改负责人不能为空!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -85,6 +85,7 @@ public class SafetyEducationTraineeController {
|
|||||||
model.addAttribute("fileName", file == null ? "" : file.getOriginalFileName());
|
model.addAttribute("fileName", file == null ? "" : file.getOriginalFileName());
|
||||||
return "safety/EducationTraineeEdit";
|
return "safety/EducationTraineeEdit";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 跳转至编辑弹窗
|
* 跳转至编辑弹窗
|
||||||
*
|
*
|
||||||
@ -99,6 +100,7 @@ public class SafetyEducationTraineeController {
|
|||||||
model.addAttribute("fileName", file == null ? "" : file.getOriginalFileName());
|
model.addAttribute("fileName", file == null ? "" : file.getOriginalFileName());
|
||||||
return "safety/EducationTraineeView";
|
return "safety/EducationTraineeView";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取分页列表信息
|
* 获取分页列表信息
|
||||||
*
|
*
|
||||||
@ -185,7 +187,7 @@ public class SafetyEducationTraineeController {
|
|||||||
} else if (StringUtils.isEmpty(bean.getFileId()) && file.getSize() == 0) {
|
} else if (StringUtils.isEmpty(bean.getFileId()) && file.getSize() == 0) {
|
||||||
bean.setFileId(null);
|
bean.setFileId(null);
|
||||||
safetyEducationTraineeService.update(bean);
|
safetyEducationTraineeService.update(bean);
|
||||||
safetyFilesService.deleteById(oldBean.getFileId());
|
// safetyFilesService.deleteById(oldBean.getFileId());
|
||||||
} else {
|
} else {
|
||||||
safetyEducationTraineeService.update(bean);
|
safetyEducationTraineeService.update(bean);
|
||||||
}
|
}
|
||||||
@ -210,6 +212,7 @@ public class SafetyEducationTraineeController {
|
|||||||
}
|
}
|
||||||
return Result.success();
|
return Result.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除附件
|
* 删除附件
|
||||||
*
|
*
|
||||||
|
|||||||
@ -170,6 +170,16 @@ public class StaffArchivesController {
|
|||||||
return "result";
|
return "result";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 更新用户的所属部门
|
||||||
|
String pid = request.getParameter("pid");
|
||||||
|
if(StringUtils.isNotBlank(pid)){
|
||||||
|
User user = this.userService.getUserById(safetyStaffArchives.getUserid());
|
||||||
|
if(user != null){
|
||||||
|
user.setPid(pid);
|
||||||
|
this.userService.updateUserById(user);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
this.staffArchivesService.save(safetyStaffArchives);
|
this.staffArchivesService.save(safetyStaffArchives);
|
||||||
model.addAttribute("result", CommUtil.toJson(Result.success()));
|
model.addAttribute("result", CommUtil.toJson(Result.success()));
|
||||||
return "result";
|
return "result";
|
||||||
@ -195,6 +205,16 @@ public class StaffArchivesController {
|
|||||||
return "result";
|
return "result";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 更新用户的所属部门
|
||||||
|
String pid = request.getParameter("pid");
|
||||||
|
if(StringUtils.isNotBlank(pid)){
|
||||||
|
User user = this.userService.getUserById(safetyStaffArchives.getUserid());
|
||||||
|
if(user != null){
|
||||||
|
user.setPid(pid);
|
||||||
|
this.userService.updateUserById(user);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
int result = this.staffArchivesService.update(safetyStaffArchives);
|
int result = this.staffArchivesService.update(safetyStaffArchives);
|
||||||
model.addAttribute("result", CommUtil.toJson(Result.success()));
|
model.addAttribute("result", CommUtil.toJson(Result.success()));
|
||||||
return "result";
|
return "result";
|
||||||
|
|||||||
@ -1607,7 +1607,7 @@ public class MPointController {
|
|||||||
mPointExpandService.update(mPoint.getBizid(), mPointExpand);
|
mPointExpandService.update(mPoint.getBizid(), mPointExpand);
|
||||||
} else {
|
} else {
|
||||||
MPointExpand mPointExpand2 = new MPointExpand();
|
MPointExpand mPointExpand2 = new MPointExpand();
|
||||||
mPointExpand2.setId(CommUtil.getUUID());
|
// mPointExpand2.setId(CommUtil.getUUID());
|
||||||
mPointExpand2.setInsdt(CommUtil.nowDate());
|
mPointExpand2.setInsdt(CommUtil.nowDate());
|
||||||
mPointExpand2.setExplain(explain);
|
mPointExpand2.setExplain(explain);
|
||||||
mPointExpand2.setMeasurePointId(mPoint.getId());
|
mPointExpand2.setMeasurePointId(mPoint.getId());
|
||||||
|
|||||||
@ -22,6 +22,10 @@ public class SafetyStaffArchivesVo extends SafetyStaffArchives {
|
|||||||
* 性别翻译
|
* 性别翻译
|
||||||
*/
|
*/
|
||||||
private String sexText;
|
private String sexText;
|
||||||
|
/**
|
||||||
|
* 所属部门ID
|
||||||
|
*/
|
||||||
|
private String pid;
|
||||||
/**
|
/**
|
||||||
* 所属部门
|
* 所属部门
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -28,6 +28,7 @@
|
|||||||
<result column="caption" property="caption" jdbcType="VARCHAR"/>
|
<result column="caption" property="caption" jdbcType="VARCHAR"/>
|
||||||
<result column="sex" property="sex" jdbcType="VARCHAR"/>
|
<result column="sex" property="sex" jdbcType="VARCHAR"/>
|
||||||
<result column="sexText" property="sexText" jdbcType="VARCHAR"/>
|
<result column="sexText" property="sexText" jdbcType="VARCHAR"/>
|
||||||
|
<result column="pid" property="pid" jdbcType="VARCHAR"/>
|
||||||
<result column="deptName" property="deptName" jdbcType="VARCHAR"/>
|
<result column="deptName" property="deptName" jdbcType="VARCHAR"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
@ -164,6 +165,7 @@
|
|||||||
u.caption,
|
u.caption,
|
||||||
u.sex,
|
u.sex,
|
||||||
(case when u.sex='0' then '女' else '男' end) as sexText,
|
(case when u.sex='0' then '女' else '男' end) as sexText,
|
||||||
|
u.pid,
|
||||||
uu.name as deptName
|
uu.name as deptName
|
||||||
from tb_safety_staff_archives ssa
|
from tb_safety_staff_archives ssa
|
||||||
INNER JOIN tb_user u ON ssa.userid = u.id
|
INNER JOIN tb_user u ON ssa.userid = u.id
|
||||||
@ -178,6 +180,7 @@
|
|||||||
u.caption,
|
u.caption,
|
||||||
u.sex,
|
u.sex,
|
||||||
(case when u.sex='0' then '女' else '男' end) as sexText,
|
(case when u.sex='0' then '女' else '男' end) as sexText,
|
||||||
|
u.pid,
|
||||||
uu.name as deptName
|
uu.name as deptName
|
||||||
from tb_safety_staff_archives ssa
|
from tb_safety_staff_archives ssa
|
||||||
INNER JOIN tb_user u ON ssa.userid = u.id
|
INNER JOIN tb_user u ON ssa.userid = u.id
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||||
<mapper namespace="com.sipai.mapper.scada.MPointDataMapper">
|
<mapper namespace="scada.MPointDataMapper">
|
||||||
<resultMap id="BaseResultMap" type="com.sipai.entity.scada.MPointData" >
|
<resultMap id="BaseResultMap" type="com.sipai.entity.scada.MPointData" >
|
||||||
<id column="ItemID" property="itemId" jdbcType="BIGINT" />
|
<id column="ItemID" property="itemId" jdbcType="BIGINT" />
|
||||||
<result column="ParmValue" property="parmValue" jdbcType="DECIMAL" />
|
<result column="ParmValue" property="parmValue" jdbcType="DECIMAL" />
|
||||||
|
|||||||
@ -22,17 +22,14 @@
|
|||||||
where id = #{id,jdbcType=VARCHAR}
|
where id = #{id,jdbcType=VARCHAR}
|
||||||
</delete>
|
</delete>
|
||||||
<insert id="insert" parameterType="com.sipai.entity.scada.MPointExpand" >
|
<insert id="insert" parameterType="com.sipai.entity.scada.MPointExpand" >
|
||||||
insert into TB_MeasurePoint_Expand (id, insdt, insuser,
|
insert into TB_MeasurePoint_Expand (insdt, insuser,
|
||||||
measure_point_id, explain)
|
measure_point_id, explain)
|
||||||
values (#{id,jdbcType=VARCHAR}, #{insdt,jdbcType=TIMESTAMP}, #{insuser,jdbcType=VARCHAR},
|
values (#{insdt,jdbcType=TIMESTAMP}, #{insuser,jdbcType=VARCHAR},
|
||||||
#{measurePointId,jdbcType=VARCHAR}, #{explain,jdbcType=VARCHAR})
|
#{measurePointId,jdbcType=VARCHAR}, #{explain,jdbcType=VARCHAR})
|
||||||
</insert>
|
</insert>
|
||||||
<insert id="insertSelective" parameterType="com.sipai.entity.scada.MPointExpand" >
|
<insert id="insertSelective" parameterType="com.sipai.entity.scada.MPointExpand" >
|
||||||
insert into TB_MeasurePoint_Expand
|
insert into TB_MeasurePoint_Expand
|
||||||
<trim prefix="(" suffix=")" suffixOverrides="," >
|
<trim prefix="(" suffix=")" suffixOverrides="," >
|
||||||
<if test="id != null" >
|
|
||||||
id,
|
|
||||||
</if>
|
|
||||||
<if test="insdt != null" >
|
<if test="insdt != null" >
|
||||||
insdt,
|
insdt,
|
||||||
</if>
|
</if>
|
||||||
@ -47,9 +44,6 @@
|
|||||||
</if>
|
</if>
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides="," >
|
<trim prefix="values (" suffix=")" suffixOverrides="," >
|
||||||
<if test="id != null" >
|
|
||||||
#{id,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="insdt != null" >
|
<if test="insdt != null" >
|
||||||
#{insdt,jdbcType=TIMESTAMP},
|
#{insdt,jdbcType=TIMESTAMP},
|
||||||
</if>
|
</if>
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||||
<mapper namespace="com.sipai.mapper.scada.WaterVolumeLJLLMapper">
|
<mapper namespace="scada.WaterVolumeLJLLMapper">
|
||||||
<resultMap id="BaseResultMap" type="com.sipai.entity.scada.WaterVolumeLJLL" >
|
<resultMap id="BaseResultMap" type="com.sipai.entity.scada.WaterVolumeLJLL" >
|
||||||
<id column="ItemID" property="itemId" jdbcType="BIGINT" />
|
<id column="ItemID" property="itemId" jdbcType="BIGINT" />
|
||||||
<result column="ParmValue" property="parmValue" jdbcType="DECIMAL" />
|
<result column="ParmValue" property="parmValue" jdbcType="DECIMAL" />
|
||||||
|
|||||||
@ -8424,7 +8424,13 @@ public class EquipmentCardService implements CommService<EquipmentCard> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (childlist.size() > 0) {
|
if (childlist.size() > 0) {
|
||||||
|
// 保留已有的nodes(如工艺段),将子单元添加到现有nodes中
|
||||||
|
List<Map<String, Object>> existingNodes = (List<Map<String, Object>>) mp.get("nodes");
|
||||||
|
if (existingNodes != null && existingNodes.size() > 0) {
|
||||||
|
existingNodes.addAll(childlist);
|
||||||
|
} else {
|
||||||
mp.put("nodes", childlist);
|
mp.put("nodes", childlist);
|
||||||
|
}
|
||||||
getTreeList4ProcessSection(childlist, list);
|
getTreeList4ProcessSection(childlist, list);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -8491,7 +8497,13 @@ public class EquipmentCardService implements CommService<EquipmentCard> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (childlist.size() > 0) {
|
if (childlist.size() > 0) {
|
||||||
|
// 保留已有的nodes(如设备类型),将子单元添加到现有nodes中
|
||||||
|
List<Map<String, Object>> existingNodes = (List<Map<String, Object>>) mp.get("nodes");
|
||||||
|
if (existingNodes != null && existingNodes.size() > 0) {
|
||||||
|
existingNodes.addAll(childlist);
|
||||||
|
} else {
|
||||||
mp.put("nodes", childlist);
|
mp.put("nodes", childlist);
|
||||||
|
}
|
||||||
getTreeList4EquipmentClass(childlist, list);
|
getTreeList4EquipmentClass(childlist, list);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -46,6 +46,8 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
import org.xmlpull.v1.XmlPullParserException;
|
import org.xmlpull.v1.XmlPullParserException;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import javax.xml.parsers.DocumentBuilderFactory;
|
import javax.xml.parsers.DocumentBuilderFactory;
|
||||||
@ -70,6 +72,7 @@ import static org.apache.poi.ss.usermodel.CellType.FORMULA;
|
|||||||
@Service("rptCreateService")
|
@Service("rptCreateService")
|
||||||
//@Service
|
//@Service
|
||||||
public class RptCreateServiceImpl implements RptCreateService {
|
public class RptCreateServiceImpl implements RptCreateService {
|
||||||
|
private static final Logger logger = LoggerFactory.getLogger(RptCreateServiceImpl.class);
|
||||||
@Resource
|
@Resource
|
||||||
private RptCreateDao rptCreateDao;
|
private RptCreateDao rptCreateDao;
|
||||||
@Resource
|
@Resource
|
||||||
@ -393,7 +396,7 @@ public class RptCreateServiceImpl implements RptCreateService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
Row row2 = sheet.getRow(row);
|
Row row2 = sheet.getRow(row);
|
||||||
HSSFCell cell = (HSSFCell) row2.getCell(column);
|
Cell cell = row2.getCell(column);
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -846,21 +849,26 @@ public class RptCreateServiceImpl implements RptCreateService {
|
|||||||
// 设定Excel文件所在路径
|
// 设定Excel文件所在路径
|
||||||
String excelFileName = filelist.get(0).getAbspath();
|
String excelFileName = filelist.get(0).getAbspath();
|
||||||
// 读取Excel文件内容
|
// 读取Excel文件内容
|
||||||
HSSFWorkbook workbook = null;
|
Workbook workbook = null;
|
||||||
FileInputStream inputStream = null;
|
FileInputStream inputStream = null;
|
||||||
byte[] bytes_m = commonFileService.getInputStreamBytes(FileNameSpaceEnum.RptInfoSetFile.getNameSpace(), path);
|
byte[] bytes_m = commonFileService.getInputStreamBytes(FileNameSpaceEnum.RptInfoSetFile.getNameSpace(), path);
|
||||||
|
// Check if bytes_m is null or empty
|
||||||
|
if (bytes_m == null || bytes_m.length == 0) {
|
||||||
|
logger.error("Excel file is empty or not found: " + path);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
// 直接从本地文件创建Workbook, 从输入流创建Workbook
|
// 直接从本地文件创建Workbook, 从输入流创建Workbook
|
||||||
InputStream ins = new ByteArrayInputStream(bytes_m);
|
InputStream ins = new ByteArrayInputStream(bytes_m);
|
||||||
// 构建Workbook对象, 只读Workbook对象
|
// 构建Workbook对象, 只读Workbook对象 - use WorkbookFactory to support both .xls and .xlsx
|
||||||
try {
|
try {
|
||||||
workbook = new HSSFWorkbook(ins);
|
workbook = WorkbookFactory.create(ins);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
|
logger.error("Failed to create workbook from file: " + path, e);
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
String endtype = ".xls";
|
String endtype = path.toLowerCase().endsWith(".xlsx") ? ".xlsx" : ".xls";
|
||||||
// 生成一个样式,用在表格数据
|
// 生成一个样式,用在表格数据
|
||||||
HSSFCellStyle listStyle = null;
|
CellStyle listStyle = null;
|
||||||
if (endtype.equals(".xls")) {
|
|
||||||
listStyle = workbook.createCellStyle();
|
listStyle = workbook.createCellStyle();
|
||||||
// 设置这些样式
|
// 设置这些样式
|
||||||
listStyle.setBorderBottom(BorderStyle.THIN);
|
listStyle.setBorderBottom(BorderStyle.THIN);
|
||||||
@ -871,10 +879,8 @@ public class RptCreateServiceImpl implements RptCreateService {
|
|||||||
listStyle.setVerticalAlignment(VerticalAlignment.CENTER);//垂直居中
|
listStyle.setVerticalAlignment(VerticalAlignment.CENTER);//垂直居中
|
||||||
//listStyle.setWrapText(false);//不自动换行
|
//listStyle.setWrapText(false);//不自动换行
|
||||||
//listStyle.setDataFormat(HSSFDataFormat.getBuiltinFormat("0.00"));//设置格式
|
//listStyle.setDataFormat(HSSFDataFormat.getBuiltinFormat("0.00"));//设置格式
|
||||||
}
|
|
||||||
// 生成一个样式,用在表格数据 修改过的数据
|
// 生成一个样式,用在表格数据 修改过的数据
|
||||||
HSSFCellStyle listStyle2 = null;
|
CellStyle listStyle2 = null;
|
||||||
if (endtype.equals(".xls")) {
|
|
||||||
listStyle2 = workbook.createCellStyle();
|
listStyle2 = workbook.createCellStyle();
|
||||||
// 设置这些样式
|
// 设置这些样式
|
||||||
listStyle2.setBorderBottom(BorderStyle.THIN);
|
listStyle2.setBorderBottom(BorderStyle.THIN);
|
||||||
@ -885,7 +891,6 @@ public class RptCreateServiceImpl implements RptCreateService {
|
|||||||
listStyle2.setVerticalAlignment(VerticalAlignment.CENTER);//垂直居中
|
listStyle2.setVerticalAlignment(VerticalAlignment.CENTER);//垂直居中
|
||||||
listStyle2.setFillPattern(FillPatternType.SOLID_FOREGROUND);
|
listStyle2.setFillPattern(FillPatternType.SOLID_FOREGROUND);
|
||||||
listStyle2.setFillForegroundColor(IndexedColors.GREEN.getIndex());
|
listStyle2.setFillForegroundColor(IndexedColors.GREEN.getIndex());
|
||||||
}
|
|
||||||
List<RptSpSet> rptSpSetlist = this.rptSpSetService.selectListByWhere(" where pid='" + rptInfoSet.getId() + "' and (active !='" + CommString.Active_False_CH + "' or active is null) order by morder asc");
|
List<RptSpSet> rptSpSetlist = this.rptSpSetService.selectListByWhere(" where pid='" + rptInfoSet.getId() + "' and (active !='" + CommString.Active_False_CH + "' or active is null) order by morder asc");
|
||||||
if (rptSpSetlist != null && rptSpSetlist.size() > 0) {
|
if (rptSpSetlist != null && rptSpSetlist.size() > 0) {
|
||||||
for (int s = 0; s < rptSpSetlist.size(); s++) {
|
for (int s = 0; s < rptSpSetlist.size(); s++) {
|
||||||
@ -993,10 +998,10 @@ public class RptCreateServiceImpl implements RptCreateService {
|
|||||||
if (spname != null && spname.equals(RptSpSet.RptSpSet_Type_Confirm)) { //接班人 类型
|
if (spname != null && spname.equals(RptSpSet.RptSpSet_Type_Confirm)) { //接班人 类型
|
||||||
for (int ws = 0; ws < workbook.getNumberOfSheets(); ws++) {//获取每个Sheet表
|
for (int ws = 0; ws < workbook.getNumberOfSheets(); ws++) {//获取每个Sheet表
|
||||||
if (workbook.getSheetName(ws).equals(rptSpSetlist.get(s).getSheet())) {
|
if (workbook.getSheetName(ws).equals(rptSpSetlist.get(s).getSheet())) {
|
||||||
HSSFSheet sheet = workbook.getSheetAt(ws);
|
Sheet sheet = workbook.getSheetAt(ws);
|
||||||
HSSFRow row = sheet.getRow(posy - 1);
|
Row row = sheet.getRow(posy - 1);
|
||||||
if (row != null) {
|
if (row != null) {
|
||||||
HSSFCell cell_d = row.getCell(posx - 1);
|
Cell cell_d = row.getCell(posx - 1);
|
||||||
if (cell_d != null) {
|
if (cell_d != null) {
|
||||||
//插入日志表
|
//插入日志表
|
||||||
RptLog rptLog = new RptLog();
|
RptLog rptLog = new RptLog();
|
||||||
@ -1029,10 +1034,10 @@ public class RptCreateServiceImpl implements RptCreateService {
|
|||||||
} else if (spname != null && spname.equals(RptSpSet.RptSpSet_Type_Rptdt)) {//日期 类型
|
} else if (spname != null && spname.equals(RptSpSet.RptSpSet_Type_Rptdt)) {//日期 类型
|
||||||
for (int ws = 0; ws < workbook.getNumberOfSheets(); ws++) {//获取每个Sheet表
|
for (int ws = 0; ws < workbook.getNumberOfSheets(); ws++) {//获取每个Sheet表
|
||||||
if (workbook.getSheetName(ws).equals(rptSpSetlist.get(s).getSheet())) {
|
if (workbook.getSheetName(ws).equals(rptSpSetlist.get(s).getSheet())) {
|
||||||
HSSFSheet sheet = workbook.getSheetAt(ws);
|
Sheet sheet = workbook.getSheetAt(ws);
|
||||||
HSSFRow row = sheet.getRow(posy - 1);
|
Row row = sheet.getRow(posy - 1);
|
||||||
if (row != null) {
|
if (row != null) {
|
||||||
HSSFCell cell_d = row.getCell(posx - 1);
|
Cell cell_d = row.getCell(posx - 1);
|
||||||
if (cell_d != null) {
|
if (cell_d != null) {
|
||||||
try {
|
try {
|
||||||
cell_d.setCellStyle(cell_d.getCellStyle());
|
cell_d.setCellStyle(cell_d.getCellStyle());
|
||||||
@ -1058,10 +1063,10 @@ public class RptCreateServiceImpl implements RptCreateService {
|
|||||||
} else if (spname != null && spname.equals(RptSpSet.RptSpSet_Type_BanZhang)) {//值班班长 类型
|
} else if (spname != null && spname.equals(RptSpSet.RptSpSet_Type_BanZhang)) {//值班班长 类型
|
||||||
for (int ws = 0; ws < workbook.getNumberOfSheets(); ws++) {//获取每个Sheet表
|
for (int ws = 0; ws < workbook.getNumberOfSheets(); ws++) {//获取每个Sheet表
|
||||||
if (workbook.getSheetName(ws).equals(rptSpSetlist.get(s).getSheet())) {
|
if (workbook.getSheetName(ws).equals(rptSpSetlist.get(s).getSheet())) {
|
||||||
HSSFSheet sheet = workbook.getSheetAt(ws);
|
Sheet sheet = workbook.getSheetAt(ws);
|
||||||
HSSFRow row = sheet.getRow(posy - 1);
|
Row row = sheet.getRow(posy - 1);
|
||||||
if (row != null) {
|
if (row != null) {
|
||||||
HSSFCell cell_d = row.getCell(posx - 1);
|
Cell cell_d = row.getCell(posx - 1);
|
||||||
if (cell_d != null) {
|
if (cell_d != null) {
|
||||||
//插入日志表
|
//插入日志表
|
||||||
RptLog rptLog = new RptLog();
|
RptLog rptLog = new RptLog();
|
||||||
@ -1094,10 +1099,10 @@ public class RptCreateServiceImpl implements RptCreateService {
|
|||||||
} else if (spname != null && spname.equals(RptSpSet.RptSpSet_Type_ZuYuan)) { //值班组员 类型
|
} else if (spname != null && spname.equals(RptSpSet.RptSpSet_Type_ZuYuan)) { //值班组员 类型
|
||||||
for (int ws = 0; ws < workbook.getNumberOfSheets(); ws++) {//获取每个Sheet表
|
for (int ws = 0; ws < workbook.getNumberOfSheets(); ws++) {//获取每个Sheet表
|
||||||
if (workbook.getSheetName(ws).equals(rptSpSetlist.get(s).getSheet())) {
|
if (workbook.getSheetName(ws).equals(rptSpSetlist.get(s).getSheet())) {
|
||||||
HSSFSheet sheet = workbook.getSheetAt(ws);
|
Sheet sheet = workbook.getSheetAt(ws);
|
||||||
HSSFRow row = sheet.getRow(posy - 1);
|
Row row = sheet.getRow(posy - 1);
|
||||||
if (row != null) {
|
if (row != null) {
|
||||||
HSSFCell cell_d = row.getCell(posx - 1);
|
Cell cell_d = row.getCell(posx - 1);
|
||||||
if (cell_d != null) {
|
if (cell_d != null) {
|
||||||
//插入日志表
|
//插入日志表
|
||||||
RptLog rptLog = new RptLog();
|
RptLog rptLog = new RptLog();
|
||||||
@ -1134,12 +1139,12 @@ public class RptCreateServiceImpl implements RptCreateService {
|
|||||||
for (int r = 0; r < rpttemplist.size(); r++) {
|
for (int r = 0; r < rpttemplist.size(); r++) {
|
||||||
for (int ws = 0; ws < workbook.getNumberOfSheets(); ws++) {//获取每个Sheet表
|
for (int ws = 0; ws < workbook.getNumberOfSheets(); ws++) {//获取每个Sheet表
|
||||||
if (workbook.getSheetName(ws).equals(rptSpSetlist.get(s).getSheet())) {
|
if (workbook.getSheetName(ws).equals(rptSpSetlist.get(s).getSheet())) {
|
||||||
HSSFSheet sheet = workbook.getSheetAt(ws);
|
Sheet sheet = workbook.getSheetAt(ws);
|
||||||
HSSFRow row = sheet.getRow(rpttemplist.get(r).getColposy() - 1);
|
Row row = sheet.getRow(rpttemplist.get(r).getColposy() - 1);
|
||||||
if (row != null) {
|
if (row != null) {
|
||||||
Cell cell_d = row.getCell(rpttemplist.get(r).getColposx() - 1);
|
Cell cell_d = row.getCell(rpttemplist.get(r).getColposx() - 1);
|
||||||
if (cell_d != null) {
|
if (cell_d != null) {
|
||||||
HSSFCellStyle cellStyle = row.getCell(rpttemplist.get(r).getColposx() - 1).getCellStyle();
|
CellStyle cellStyle = row.getCell(rpttemplist.get(r).getColposx() - 1).getCellStyle();
|
||||||
// HSSFCellStyle cellStyle_r = row.getCell(rpttemplist.get(r).getColposx() - 1).getCellStyle();
|
// HSSFCellStyle cellStyle_r = row.getCell(rpttemplist.get(r).getColposx() - 1).getCellStyle();
|
||||||
try {
|
try {
|
||||||
/**
|
/**
|
||||||
@ -1286,9 +1291,9 @@ public class RptCreateServiceImpl implements RptCreateService {
|
|||||||
*/
|
*/
|
||||||
List<RptLog> list = rptLogService.selectListByWhere("where creat_id = '" + rptCreate.getId() + "'");
|
List<RptLog> list = rptLogService.selectListByWhere("where creat_id = '" + rptCreate.getId() + "'");
|
||||||
for (RptLog rptLog : list) {
|
for (RptLog rptLog : list) {
|
||||||
HSSFSheet sheet = workbook.getSheet(rptLog.getSheet());
|
Sheet sheet = workbook.getSheet(rptLog.getSheet());
|
||||||
if (rptLog.getPosyE() != null && !rptLog.getPosyE().equals("") && sheet != null) {
|
if (rptLog.getPosyE() != null && !rptLog.getPosyE().equals("") && sheet != null) {
|
||||||
HSSFRow row = sheet.getRow(Integer.parseInt(rptLog.getPosyE()) - 1);
|
Row row = sheet.getRow(Integer.parseInt(rptLog.getPosyE()) - 1);
|
||||||
if (row != null) {
|
if (row != null) {
|
||||||
Cell cell_d = row.getCell(Integer.parseInt(rptLog.getPosxE()) - 1);
|
Cell cell_d = row.getCell(Integer.parseInt(rptLog.getPosxE()) - 1);
|
||||||
if (cell_d != null) {
|
if (cell_d != null) {
|
||||||
|
|||||||
@ -84,13 +84,17 @@ public class SafetyCheckActivityService {
|
|||||||
* @Date: 2022/10/10
|
* @Date: 2022/10/10
|
||||||
**/
|
**/
|
||||||
public Result audit(String nextUserId, String processInstanceId, int pass) {
|
public Result audit(String nextUserId, String processInstanceId, int pass) {
|
||||||
Task task =
|
List<Task> tasks = workflowService.getTaskService().createTaskQuery().processInstanceId(processInstanceId).active().list();
|
||||||
workflowService.getTaskService().createTaskQuery().processInstanceId(processInstanceId).singleResult();
|
if (tasks == null || tasks.isEmpty()) {
|
||||||
|
return Result.failed("No active task found for process instance: " + processInstanceId);
|
||||||
|
}
|
||||||
Map<String, Object> map = new HashMap<>();
|
Map<String, Object> map = new HashMap<>();
|
||||||
map.put(CommString.ACTI_KEK_Condition, pass);
|
map.put(CommString.ACTI_KEK_Condition, pass);
|
||||||
map.put(CommString.ACTI_KEK_Assignee, nextUserId);
|
map.put(CommString.ACTI_KEK_Assignee, nextUserId);
|
||||||
map.put(CommString.ACTI_KEK_Candidate_Users, nextUserId);
|
map.put(CommString.ACTI_KEK_Candidate_Users, nextUserId);
|
||||||
|
for (Task task : tasks) {
|
||||||
workflowService.getTaskService().complete(task.getId(), map);
|
workflowService.getTaskService().complete(task.getId(), map);
|
||||||
|
}
|
||||||
return Result.success();
|
return Result.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1661,7 +1661,7 @@ public class MPointService {
|
|||||||
for (int i = minCellNum; i < maxCellNum; i++) {
|
for (int i = minCellNum; i < maxCellNum; i++) {
|
||||||
HSSFCell mpidCell = mpidRow.getCell(i);
|
HSSFCell mpidCell = mpidRow.getCell(i);
|
||||||
String mpidStr = getStringVal(mpidCell);
|
String mpidStr = getStringVal(mpidCell);
|
||||||
MPoint mPoint = this.selectByWhere(unitId, "where MPointCode like '%" + mpidStr + "%' or ParmName like '%" + mpidStr + "%' ");
|
MPoint mPoint = this.selectByWhere(unitId, "where MPointCode = '"+ mpidStr+"'");
|
||||||
if (mPoint != null) {
|
if (mPoint != null) {
|
||||||
String mpid = mPoint.getMpointcode();
|
String mpid = mPoint.getMpointcode();
|
||||||
MPointHistory mPointHistory = new MPointHistory();
|
MPointHistory mPointHistory = new MPointHistory();
|
||||||
|
|||||||
@ -75,12 +75,6 @@
|
|||||||
<form class="form-horizontal" id="subForm">
|
<form class="form-horizontal" id="subForm">
|
||||||
<!-- 界面提醒div强制id为alertDiv -->
|
<!-- 界面提醒div强制id为alertDiv -->
|
||||||
<div id="alertDiv"></div>
|
<div id="alertDiv"></div>
|
||||||
<div class="form-group">
|
|
||||||
<label class="col-sm-3 control-label">业务单元ID</label>
|
|
||||||
<div class="col-sm-9">
|
|
||||||
<input type="text" class="form-control" id="id" name="id" placeholder="业务单元ID(不填则自动生成)" >
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-3 control-label">*业务单元名称</label>
|
<label class="col-sm-3 control-label">*业务单元名称</label>
|
||||||
<div class="col-sm-9">
|
<div class="col-sm-9">
|
||||||
|
|||||||
@ -53,12 +53,6 @@
|
|||||||
<form class="form-horizontal" id="subForm">
|
<form class="form-horizontal" id="subForm">
|
||||||
<div id="alertDiv"></div>
|
<div id="alertDiv"></div>
|
||||||
<input id="id" name="id" type="hidden" value="${businessUnit.id}"/>
|
<input id="id" name="id" type="hidden" value="${businessUnit.id}"/>
|
||||||
<div class="form-group">
|
|
||||||
<label class="col-sm-3 control-label">业务单元ID</label>
|
|
||||||
<div class="col-sm-9">
|
|
||||||
<input type="text" class="form-control" id="displayId" value="${businessUnit.id}" readonly style="background-color: #eee;">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-3 control-label">*业务单元名称</label>
|
<label class="col-sm-3 control-label">*业务单元名称</label>
|
||||||
<div class="col-sm-9">
|
<div class="col-sm-9">
|
||||||
|
|||||||
@ -110,6 +110,11 @@
|
|||||||
url: ext.contextPath +"/activiti/workflow/getProcessTypes4Combo.do",
|
url: ext.contextPath +"/activiti/workflow/getProcessTypes4Combo.do",
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
delay: 250,
|
delay: 250,
|
||||||
|
data: function (params) {
|
||||||
|
return {
|
||||||
|
term: params.term
|
||||||
|
};
|
||||||
|
},
|
||||||
processResults: function (data) {
|
processResults: function (data) {
|
||||||
return {
|
return {
|
||||||
results: data
|
results: data
|
||||||
@ -123,8 +128,8 @@
|
|||||||
language: "zh-CN",
|
language: "zh-CN",
|
||||||
minimumInputLength: 0,
|
minimumInputLength: 0,
|
||||||
minimumResultsForSearch: 10,
|
minimumResultsForSearch: 10,
|
||||||
formatResult: function formatRepo(repo){return repo.text;},
|
templateResult: function formatRepo(repo){return repo.text;},
|
||||||
formatSelection: function formatRepoSelection(repo){return repo.text;}
|
templateSelection: function formatRepoSelection(repo){return repo.text;}
|
||||||
});
|
});
|
||||||
fixSelect2ToTool("search_processType");
|
fixSelect2ToTool("search_processType");
|
||||||
$("#table").bootstrapTable({
|
$("#table").bootstrapTable({
|
||||||
@ -151,11 +156,6 @@
|
|||||||
columns: [
|
columns: [
|
||||||
{
|
{
|
||||||
checkbox: true,
|
checkbox: true,
|
||||||
}, {
|
|
||||||
field: 'id',
|
|
||||||
title: '业务单元ID',
|
|
||||||
align: 'center',
|
|
||||||
valign: 'middle'
|
|
||||||
}, {
|
}, {
|
||||||
field: 'name',
|
field: 'name',
|
||||||
title: '业务单元名称',
|
title: '业务单元名称',
|
||||||
|
|||||||
@ -62,7 +62,8 @@ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD
|
|||||||
selelct_4.val('').trigger("change");
|
selelct_4.val('').trigger("change");
|
||||||
|
|
||||||
|
|
||||||
//TODO 代码有冲突
|
// Initialize job dropdown with all jobs
|
||||||
|
onValueChange();
|
||||||
key = setInterval(() => {
|
key = setInterval(() => {
|
||||||
// console.log(document.getElementById('objUserName'))
|
// console.log(document.getElementById('objUserName'))
|
||||||
if ($('#objUserId').val() != old) {
|
if ($('#objUserId').val() != old) {
|
||||||
@ -140,7 +141,14 @@ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD
|
|||||||
jobId: {
|
jobId: {
|
||||||
validators: {
|
validators: {
|
||||||
notEmpty: {
|
notEmpty: {
|
||||||
message: '周期类型不能为空'
|
message: '岗位不能为空'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
levelType: {
|
||||||
|
validators: {
|
||||||
|
notEmpty: {
|
||||||
|
message: '岗位类型不能为空'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -165,9 +173,17 @@ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD
|
|||||||
|
|
||||||
function onValueChange() {
|
function onValueChange() {
|
||||||
// console.log($('#objUserId').val())
|
// console.log($('#objUserId').val())
|
||||||
$.post(ext.contextPath + "/user/getJsonJobByUser.do?userId=" + $('#objUserId').val(), function (data) {
|
$.get(ext.contextPath + "/user/getJsonJob.do", function (data) {
|
||||||
|
// Transform data to Select2 format: {id, text}
|
||||||
|
var transformedData = [];
|
||||||
|
$.each(data, function(index, item) {
|
||||||
|
transformedData.push({
|
||||||
|
id: item.id,
|
||||||
|
text: item.name
|
||||||
|
});
|
||||||
|
});
|
||||||
$("#jobId").select2({
|
$("#jobId").select2({
|
||||||
data: data,
|
data: transformedData,
|
||||||
cache: false,
|
cache: false,
|
||||||
placeholder: '请选择',//默认文字提示
|
placeholder: '请选择',//默认文字提示
|
||||||
// allowClear: true,//允许清空
|
// allowClear: true,//允许清空
|
||||||
@ -230,6 +246,13 @@ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD
|
|||||||
<select class="form-control" id="jobId" name="jobId"></select>
|
<select class="form-control" id="jobId" name="jobId"></select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">* 岗位类型:</label>
|
||||||
|
<div class="col-sm-9">
|
||||||
|
<select class="form-control" name="levelType" id="status3" style="width: 100%;">
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-3 control-label">* 周期类型:</label>
|
<label class="col-sm-3 control-label">* 周期类型:</label>
|
||||||
<div class="col-sm-9">
|
<div class="col-sm-9">
|
||||||
|
|||||||
@ -17,17 +17,11 @@ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD
|
|||||||
display: flex;
|
display: flex;
|
||||||
padding-left: 50px;
|
padding-left: 50px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*.layout{*/
|
|
||||||
/ display: flex;*/
|
|
||||||
/ padding-left: 15px;*/
|
|
||||||
/*}*/
|
|
||||||
.form-horizontal {
|
.form-horizontal {
|
||||||
padding-top: 20px;
|
padding-top: 20px;
|
||||||
padding-left: 60px;
|
padding-left: 60px;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.right {
|
.right {
|
||||||
margin-left: 50px;
|
margin-left: 50px;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -50,10 +50,10 @@ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD
|
|||||||
formatResult: function formatRepo(repo) {
|
formatResult: function formatRepo(repo) {
|
||||||
return repo.text;
|
return repo.text;
|
||||||
}, // 函数用来渲染结果
|
}, // 函数用来渲染结果
|
||||||
|
formatSelection: function formatRepoSelection(repo) {
|
||||||
return repo.text;
|
return repo.text;
|
||||||
} // 函数用于呈现当前的选择
|
} // 函数用于呈现当前的选择
|
||||||
});
|
});
|
||||||
});
|
|
||||||
$(".select2-selection--single").css({'height': '30px', 'paddingTop': '4px'});
|
$(".select2-selection--single").css({'height': '30px', 'paddingTop': '4px'});
|
||||||
|
|
||||||
select_3.val('${bean.educationType}').trigger("change");
|
select_3.val('${bean.educationType}').trigger("change");
|
||||||
|
|||||||
@ -147,6 +147,7 @@
|
|||||||
hiddenId: "userid",
|
hiddenId: "userid",
|
||||||
textId: "username",
|
textId: "username",
|
||||||
deptNameDom: "deptName",
|
deptNameDom: "deptName",
|
||||||
|
deptIdDom: "pid",
|
||||||
sexDom: "sex",
|
sexDom: "sex",
|
||||||
userCardIdDom: "userCardId",
|
userCardIdDom: "userCardId",
|
||||||
userId: userId
|
userId: userId
|
||||||
@ -156,6 +157,18 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//选择所属部门
|
||||||
|
function showDept4SelectFun() {
|
||||||
|
$.post(ext.contextPath + '/user/showUnit4Select_Limited.do', {
|
||||||
|
formId: "subForm",
|
||||||
|
hiddenId: "pid",
|
||||||
|
textId: "deptName"
|
||||||
|
}, function (data) {
|
||||||
|
$("#deptSelectDiv").html(data);
|
||||||
|
openModal('unit4SelectModal_Limited');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<div class="modal fade" id="subModal">
|
<div class="modal fade" id="subModal">
|
||||||
<div class="modal-dialog" style="width: 53%">
|
<div class="modal-dialog" style="width: 53%">
|
||||||
@ -239,8 +252,9 @@
|
|||||||
</div>
|
</div>
|
||||||
<label class="col-sm-2 control-label">*所属部门:</label>
|
<label class="col-sm-2 control-label">*所属部门:</label>
|
||||||
<div class="col-sm-4">
|
<div class="col-sm-4">
|
||||||
<input type="text" class="form-control" id="deptName" name="deptName" placeholder="所属部门"
|
<input type="text" class="form-control" id="deptName" name="deptName" placeholder="点击选择所属部门"
|
||||||
value="" disabled>
|
value="" onclick="showDept4SelectFun();" readonly>
|
||||||
|
<input type="hidden" id="pid" name="pid" value="">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -274,3 +288,4 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- /.modal-dialog -->
|
<!-- /.modal-dialog -->
|
||||||
</div>
|
</div>
|
||||||
|
<div id="deptSelectDiv"></div>
|
||||||
|
|||||||
@ -152,6 +152,7 @@
|
|||||||
hiddenId: "userid",
|
hiddenId: "userid",
|
||||||
textId: "username",
|
textId: "username",
|
||||||
deptNameDom: "deptName",
|
deptNameDom: "deptName",
|
||||||
|
deptIdDom: "pid",
|
||||||
sexDom: "sex",
|
sexDom: "sex",
|
||||||
userCardIdDom: "userCardId",
|
userCardIdDom: "userCardId",
|
||||||
userId: userId
|
userId: userId
|
||||||
@ -161,6 +162,18 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//选择所属部门
|
||||||
|
function showDept4SelectFun() {
|
||||||
|
$.post(ext.contextPath + '/user/showUnit4Select_Limited.do', {
|
||||||
|
formId: "subForm",
|
||||||
|
hiddenId: "pid",
|
||||||
|
textId: "deptName"
|
||||||
|
}, function (data) {
|
||||||
|
$("#deptSelectDiv").html(data);
|
||||||
|
openModal('unit4SelectModal_Limited');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<div class="modal fade" id="subModal">
|
<div class="modal fade" id="subModal">
|
||||||
<div class="modal-dialog modal-lg">
|
<div class="modal-dialog modal-lg">
|
||||||
@ -245,8 +258,9 @@
|
|||||||
|
|
||||||
<label class="col-sm-2 control-label">*所属部门:</label>
|
<label class="col-sm-2 control-label">*所属部门:</label>
|
||||||
<div class="col-sm-4">
|
<div class="col-sm-4">
|
||||||
<input type="text" class="form-control" id="deptName" name="deptName" placeholder="所属部门"
|
<input type="text" class="form-control" id="deptName" name="deptName" placeholder="点击选择所属部门"
|
||||||
value="${safetyStaffArchives.deptName}" disabled>
|
value="${safetyStaffArchives.deptName}" onclick="showDept4SelectFun();" readonly>
|
||||||
|
<input type="hidden" id="pid" name="pid" value="${safetyStaffArchives.pid}">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -282,3 +296,4 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- /.modal-dialog -->
|
<!-- /.modal-dialog -->
|
||||||
</div>
|
</div>
|
||||||
|
<div id="deptSelectDiv"></div>
|
||||||
|
|||||||
@ -26,6 +26,9 @@
|
|||||||
if(`${param.deptNameDom}` != ""){
|
if(`${param.deptNameDom}` != ""){
|
||||||
$('#${param.formId} #${param.deptNameDom}').val(resp[0]._pname);
|
$('#${param.formId} #${param.deptNameDom}').val(resp[0]._pname);
|
||||||
}
|
}
|
||||||
|
if(`${param.deptIdDom}` != ""){
|
||||||
|
$('#${param.formId} #${param.deptIdDom}').val(resp[0].pid);
|
||||||
|
}
|
||||||
if(`${param.sexDom}` != ""){
|
if(`${param.sexDom}` != ""){
|
||||||
$('#${param.formId} #${param.sexDom}').val(resp[0].sex);
|
$('#${param.formId} #${param.sexDom}').val(resp[0].sex);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,180 @@
|
|||||||
|
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||||
|
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
|
||||||
|
|
||||||
|
<style type="text/css">
|
||||||
|
#map_canvas {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
#result {
|
||||||
|
width: 100%
|
||||||
|
}
|
||||||
|
|
||||||
|
#btns {
|
||||||
|
z-index: 999;
|
||||||
|
position: fixed;
|
||||||
|
bottom: 3.5rem;
|
||||||
|
margin-left: 2.5rem;
|
||||||
|
padding-left: 0;
|
||||||
|
border-radius: .25rem;
|
||||||
|
display: flex;
|
||||||
|
box-shadow: 0 2px 6px 0 rgba(27, 142, 236, 0.5);
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
#btns li {
|
||||||
|
border-right: 1px solid #d2d2d2;
|
||||||
|
padding: 10px 10px;
|
||||||
|
height: 100%;
|
||||||
|
background-color: #fff;
|
||||||
|
cursor: pointer;
|
||||||
|
color: #3a79b5;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*.modal-body {
|
||||||
|
position: relative;
|
||||||
|
padding: 15px;
|
||||||
|
}*/
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
window.BMAP_AUTHENTIC_KEY = '7Cc5Kmn672miPzG4qQhvlOrERcXMMinq';
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
var lushuArray = [];//多人巡检轨迹数
|
||||||
|
|
||||||
|
// var map = new BMapGL.Map('map_canvas');
|
||||||
|
var map = new BMapGL.Map('map_canvas', {
|
||||||
|
minZoom: 19,
|
||||||
|
maxZoom: 19
|
||||||
|
});
|
||||||
|
map.enableScrollWheelZoom();
|
||||||
|
// 113.044283, 23.028002 沙口
|
||||||
|
// 112.911564,23.370377 北江
|
||||||
|
// 121.374879,30.73846 金山一厂
|
||||||
|
// 121.363482,30.807332 金山二厂
|
||||||
|
var x1 = '121.363482';
|
||||||
|
var y1 = '30.807332';
|
||||||
|
map.centerAndZoom(new BMapGL.Point(x1, y1), 19);
|
||||||
|
map.enableScrollWheelZoom(true);//禁止鼠标滚动
|
||||||
|
map.setMapType(BMAP_EARTH_MAP);// 设置地图类型为地球模式
|
||||||
|
// var lushu;
|
||||||
|
//实例化一个轨迹用来生成路线
|
||||||
|
var drv = new BMapGL.DrivingRoute('佛山', {
|
||||||
|
onSearchComplete: function (res) {
|
||||||
|
// if (drv.getStatus() == BMAP_STATUS_SUCCESS) {
|
||||||
|
|
||||||
|
var userName = '';//人员名称
|
||||||
|
var userIcon = '';//人员头像
|
||||||
|
|
||||||
|
$.post(ext.contextPath + "/timeEfficiency/patrolRecord/getGPS.do", {patrolRecordId: '${patrolRecord.id}'}, function (data) {
|
||||||
|
for (let i = 0; i < data.length; i++) {
|
||||||
|
var gpsStr = [];//gps数组
|
||||||
|
|
||||||
|
var str = data[i].data;
|
||||||
|
for (let j = 0; j < str.length; j++) {
|
||||||
|
gpsStr.push(str[j])
|
||||||
|
}
|
||||||
|
|
||||||
|
userName = data[i].userName;
|
||||||
|
|
||||||
|
if (data[i].icon != null && data[i].icon != '') {
|
||||||
|
userIcon = data[i].icon;
|
||||||
|
} else {
|
||||||
|
userIcon = ext.contextPath + '/IMG/sy/headportrait.png';
|
||||||
|
}
|
||||||
|
|
||||||
|
creatGPSLine(gpsStr, userName, userIcon);
|
||||||
|
}
|
||||||
|
|
||||||
|
}, 'json');
|
||||||
|
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
//调用不同人员的巡检路线
|
||||||
|
function creatGPSLine(gpsStr, userName, userIcon) {
|
||||||
|
if (gpsStr != null && gpsStr != '') {
|
||||||
|
map.addOverlay(new BMapGL.Marker(gpsStr[0]));
|
||||||
|
map.addOverlay(new BMapGL.Marker(gpsStr[gpsStr.length - 1]));
|
||||||
|
map.addOverlay(new BMapGL.Polyline(gpsStr, {strokeColor: 'blue'}));
|
||||||
|
map.setViewport(gpsStr);
|
||||||
|
var lushu = new BMapGLLib.LuShu(map, gpsStr, {
|
||||||
|
defaultContent: userName, // "信息窗口文案"
|
||||||
|
autoView: true, // 是否开启自动视野调整,如果开启那么路书在运动过程中会根据视野自动调整
|
||||||
|
speed: 50,
|
||||||
|
icon: new BMapGL.Icon(userIcon, new BMapGL.Size(40, 40), {anchor: new BMapGL.Size(20, 40)}),
|
||||||
|
enableRotation: false, // 是否设置marker随着道路的走向进行旋转
|
||||||
|
});
|
||||||
|
lushuArray.push(lushu);
|
||||||
|
} else {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var start = new BMapGL.Point(116.404844, 40);
|
||||||
|
var end = new BMapGL.Point(116.308102, 40.056057);
|
||||||
|
drv.search(start, end);
|
||||||
|
|
||||||
|
//开始
|
||||||
|
function run() {
|
||||||
|
// lushu.start();
|
||||||
|
for (var i = 0; i < lushuArray.length; i++) {
|
||||||
|
// console.log(lushuArray[i]);
|
||||||
|
lushuArray[i].start();//多人轨迹演示
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//停止
|
||||||
|
function stop() {
|
||||||
|
// lushu.stop();
|
||||||
|
for (var i = 0; i < lushuArray.length; i++) {
|
||||||
|
// console.log(lushuArray[i]);
|
||||||
|
lushuArray[i].stop();//多人轨迹演示
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//暂停
|
||||||
|
function pause() {
|
||||||
|
// lushu.pause();
|
||||||
|
for (var i = 0; i < lushuArray.length; i++) {
|
||||||
|
// console.log(lushuArray[i]);
|
||||||
|
lushuArray[i].pause();//多人轨迹演示
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*$("hide").onclick = function () {
|
||||||
|
//隐藏信息窗口
|
||||||
|
lushu.hideInfoWindow();
|
||||||
|
}
|
||||||
|
$("show").onclick = function () {
|
||||||
|
//展示信息窗口
|
||||||
|
lushu.showInfoWindow();
|
||||||
|
}*/
|
||||||
|
|
||||||
|
</script>
|
||||||
|
<div class="modal fade" id="subModal_recordMap">
|
||||||
|
<div class="modal-dialog modal-xlg" style="width: 1800px;height: 700px;">
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header">
|
||||||
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||||
|
<span aria-hidden="true">×</span></button>
|
||||||
|
<h4 class="modal-title">巡检轨迹</h4>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body" style="width: 1800px;height: 700px;padding: 0px;">
|
||||||
|
<div id="map_canvas"></div>
|
||||||
|
<div id="result"></div>
|
||||||
|
<ul id='btns'>
|
||||||
|
<li id="run" onclick="run();">开始</li>
|
||||||
|
<li id="stop" onclick="stop();">停止</li>
|
||||||
|
<li id="pause" onclick="pause();">暂停</li>
|
||||||
|
<%--<li id="hide" onclick="hide();">隐藏信息窗口</li>
|
||||||
|
<li id="show" onclick="show();">展示信息窗口</li>--%>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
Reference in New Issue
Block a user