Compare commits

...

18 Commits

Author SHA1 Message Date
1cd6750710 bug 2026-03-26 01:47:35 +08:00
b745bb8482 bug 2026-03-26 01:14:31 +08:00
9a9dc780e4 Merge branch 'deng' into deng-release 2026-03-26 00:48:29 +08:00
3208f2b8a3 bug 2026-03-26 00:48:05 +08:00
44b6bf04d5 Merge branch 'deng' into deng-release 2026-03-25 21:05:48 +08:00
75f33e37d7 bug 2026-03-25 00:56:45 +08:00
17751bd0ab bug fixed 内部人员教育下载不了文件 2026-03-25 00:48:45 +08:00
82d68ed669 bug fixed mpoint 2026-03-23 23:23:22 +08:00
09fce43c98 bug fixed mpoint 2026-03-23 23:20:00 +08:00
9895757c92 Merge branch 'deng' into deng-release 2026-03-23 21:42:59 +08:00
bce9cc42e8 bug fixed active 2026-03-23 21:42:19 +08:00
6de1aabe80 bug fixed 所属部门 2026-03-17 00:53:23 +08:00
3ea3e0a9af bug fixed 2026-03-17 00:04:44 +08:00
56da3dc9ff bug fixed 2026-03-16 20:31:00 +08:00
2bfa643373 namespace 2026-03-12 09:01:47 +08:00
5e52e1db7c Merge branch 'deng' into deng-release 2026-03-12 01:45:42 +08:00
1c8f1f98d5 Merge branch 'deng' into deng-release 2026-03-12 01:13:27 +08:00
3da9c9afb5 业务流程类别bug bak 2026-03-12 01:02:22 +08:00
29 changed files with 2159 additions and 1817 deletions

View File

@ -63,6 +63,7 @@ import java.util.Locale;
import java.util.Map;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/**
* 流程模型控制器
*
@ -92,94 +93,97 @@ public class ModelController {
protected TaskService taskService;
@RequestMapping("/showModelList.do")
public String showModelList(HttpServletRequest request,Model model) {
public String showModelList(HttpServletRequest request, Model model) {
return "/activiti/modelList";
}
@RequestMapping("/showProcessTechnicsList.do")
public String showProcessTechnicsList(HttpServletRequest request,Model model) {
public String showProcessTechnicsList(HttpServletRequest request, Model model) {
return "/activiti/processTechnicsList";
}
/*
* 模型副本
* */
@RequestMapping(value = "copycreat.do")
public ModelAndView copycreat(HttpServletRequest request,
HttpServletResponse response,Model model
HttpServletResponse response, Model model
) throws IOException {
int result =0;
User cu = (User)request.getSession().getAttribute("cu");
int result = 0;
User cu = (User) request.getSession().getAttribute("cu");
String modelid = request.getParameter("id");
org.activiti.engine.repository.Model modelData = repositoryService.getModel(modelid);
ObjectNode modelNode = (ObjectNode) new ObjectMapper().readTree(repositoryService.getModelEditorSource(modelData.getId()));
byte[] bpmnBytes = null;
try {
bpmnBytes=modelNode.toString().getBytes("utf-8");
bpmnBytes = modelNode.toString().getBytes("utf-8");
} catch (Exception e) {
}
org.activiti.engine.repository.Model modelData_new = repositoryService.newModel();
ObjectMapper objectMapper = new ObjectMapper();
ObjectNode modelObjectNode = objectMapper.createObjectNode();
modelObjectNode.put(ModelDataJsonConstants.MODEL_NAME,modelData.getName()+"(副本)" );
modelObjectNode.put(ModelDataJsonConstants.MODEL_NAME, modelData.getName() + "(副本)");
modelObjectNode.put(ModelDataJsonConstants.MODEL_REVISION, 1);
modelObjectNode.put(ModelDataJsonConstants.MODEL_DESCRIPTION, modelData.getName()+"(副本)");
modelObjectNode.put(ModelDataJsonConstants.MODEL_DESCRIPTION, modelData.getName() + "(副本)");
modelData_new.setMetaInfo(modelObjectNode.toString());
modelData_new.setName(modelData.getName()+"(副本)");
modelData_new.setName(modelData.getName() + "(副本)");
modelData_new.setKey(modelData.getKey());
repositoryService.saveModel(modelData_new);
repositoryService.addModelEditorSource(modelData_new.getId(),bpmnBytes );
repositoryService.addModelEditorSource(modelData_new.getId(), bpmnBytes);
result =1;
model.addAttribute("result",result);
result = 1;
model.addAttribute("result", result);
return new ModelAndView("result");
}
@RequestMapping("/doimportExcel.do")
public String doimportTechnics(HttpServletRequest request,Model model){
public String doimportTechnics(HttpServletRequest request, Model model) {
return "/activiti/importExcel4Model";
}
@RequestMapping(value = "saveImportModel.do")
public ModelAndView saveImportActiviti(@RequestParam MultipartFile[] file, HttpServletRequest request,
HttpServletResponse response,Model model) throws IOException {
int result=0;
User cu = (User)request.getSession().getAttribute("cu");
HttpServletResponse response, Model model) throws IOException {
int result = 0;
User cu = (User) request.getSession().getAttribute("cu");
//要存入的实际地址
String realPath = request.getSession().getServletContext().getRealPath("/");
String pjName = request.getContextPath().substring(1, request.getContextPath().length());
realPath = realPath.replace(pjName,"Temp");
realPath = realPath.replace(pjName, "Temp");
//String technicsname="";
List<TaskModel> taskModels= new ArrayList<>();//(technicsname,ptList);
List<TaskModel> taskModels = new ArrayList<>();//(technicsname,ptList);
String modelid =processModelService.autoImport(taskModels);
String modelid = processModelService.autoImport(taskModels);
List<String> unmainProcedure =new ArrayList<>();//存储未匹配预设工序的工序名
if(modelid!=null && !modelid.isEmpty()){
try{
List<String> unmainProcedure = new ArrayList<>();//存储未匹配预设工序的工序名
if (modelid != null && !modelid.isEmpty()) {
try {
SimpleDateFormat dateFormat = new SimpleDateFormat(
"yyyy-MM-dd HH:mm:ss.SSS", Locale.SIMPLIFIED_CHINESE);
result=1;
}catch(Exception e){
result = 1;
} catch (Exception e) {
e.printStackTrace();
repositoryService.deleteModel(modelid);//管控信息保存失败时,删除模型
}
}
String res_str="";
String res_str = "";
for (String str : unmainProcedure) {
if(!res_str.isEmpty()){
res_str+=",";
if (!res_str.isEmpty()) {
res_str += ",";
}
str=str.replace(" ", "").replace("\n", "");
res_str+=str;
str = str.replace(" ", "").replace("\n", "");
res_str += str;
}
model.addAttribute("result","{\"res\":\""+result+"\",\"unmatch\":\""+res_str+"\"}");
model.addAttribute("result", "{\"res\":\"" + result + "\",\"unmatch\":\"" + res_str + "\"}");
return new ModelAndView("result");
}
/* //导入文档最后一个sheet
/* //导入文档最后一个sheet
public String importByExcel(String realPath, MultipartFile[] file,List<ProcessTechnics> ptList) throws IOException {
String technicsname="";
//上传文件的原名(即上传前的文件名字)
@ -240,16 +244,16 @@ public class ModelController {
return technicsname;
}
*/ //根据导入excel获取工艺名称即产品编号
private String getTechnicsName(Sheet sheet ,int row_NO){
String res="";
*/ //根据导入excel获取工艺名称即产品编号
private String getTechnicsName(Sheet sheet, int row_NO) {
String res = "";
Row row = sheet.getRow(row_NO);
for(int i=0;i<row.getLastCellNum();i++){
String cellcontent=getMergedRegionValue(sheet,row_NO,i);
if(cellcontent!=null && cellcontent.equals(CommString.Flag_Technics_Name)){
for (int i = 0; i < row.getLastCellNum(); i++) {
String cellcontent = getMergedRegionValue(sheet, row_NO, i);
if (cellcontent != null && cellcontent.equals(CommString.Flag_Technics_Name)) {
continue;
}else{
res=cellcontent;
} else {
res = cellcontent;
break;
}
@ -418,60 +422,64 @@ public class ModelController {
/*
* 获取主工序code
* */
/**
* 获取合并单元格的值
*
* @param sheet
* @param row
* @param column
* @return
*/
public String getMergedRegionValue(Sheet sheet ,int row , int column){
public String getMergedRegionValue(Sheet sheet, int row, int column) {
int sheetMergeCount = sheet.getNumMergedRegions();
for(int i = 0 ; i < sheetMergeCount ; i++){
for (int i = 0; i < sheetMergeCount; i++) {
CellRangeAddress ca = sheet.getMergedRegion(i);
int firstColumn = ca.getFirstColumn();
int lastColumn = ca.getLastColumn();
int firstRow = ca.getFirstRow();
int lastRow = ca.getLastRow();
if(row >= firstRow && row <= lastRow){
if (row >= firstRow && row <= lastRow) {
if(column >= firstColumn && column <= lastColumn){
if (column >= firstColumn && column <= lastColumn) {
Row fRow = sheet.getRow(firstRow);
Cell fCell = fRow.getCell(firstColumn);
return getCellValue(fCell) ;
return getCellValue(fCell);
}
}
}
return null ;
return null;
}
/**
* 获取单元格的值
*
* @param cell
* @return
*/
public String getCellValue(Cell cell){
public String getCellValue(Cell cell) {
if(cell == null) {
if (cell == null) {
return "";
}
if(cell.getCellType() == CellType.STRING){
if (cell.getCellType() == CellType.STRING) {
return cell.getStringCellValue();
}else if(cell.getCellType() == CellType.BOOLEAN){
} else if (cell.getCellType() == CellType.BOOLEAN) {
return String.valueOf(cell.getBooleanCellValue());
}else if(cell.getCellType() == CellType.FORMULA){
} else if (cell.getCellType() == CellType.FORMULA) {
return cell.getCellFormula() ;
return cell.getCellFormula();
}else if(cell.getCellType() == CellType.NUMERIC){
} else if (cell.getCellType() == CellType.NUMERIC) {
return String.valueOf(cell.getNumericCellValue());
@ -479,6 +487,7 @@ public class ModelController {
return "";
}
/*
* 将存在的值赋给目标变量
* */
@ -504,44 +513,45 @@ public class ModelController {
throw new Exception("属性复制失败:" + e.getMessage());
}
}
/**
* 流程定义列表
*
* @return
*/
@RequestMapping(value = "/getModelList.do")
public ModelAndView getModelList(HttpServletRequest request,Model model,
public ModelAndView getModelList(HttpServletRequest request, Model model,
@RequestParam(value = "page") Integer page,
@RequestParam(value = "rows") Integer rows,
@RequestParam(value = "sort", required=false) String sort,
@RequestParam(value = "order", required=false) String order) {
User cu= (User)request.getSession().getAttribute("cu");
@RequestParam(value = "sort", required = false) String sort,
@RequestParam(value = "order", required = false) String order) {
User cu = (User) request.getSession().getAttribute("cu");
int startNum=0;
if(rows==null || rows==0){
int startNum = 0;
if (rows == null || rows == 0) {
rows = 50;
}
if(page!=null && page>0){
startNum =(page-1)*rows;
if (page != null && page > 0) {
startNum = (page - 1) * rows;
}
String wherestr = " where 1=1 ";
if(request.getParameter("search_name")!=null && !request.getParameter("search_name").isEmpty()){
wherestr += " and NAME_ like '%"+request.getParameter("search_name")+"%' ";
if (request.getParameter("search_name") != null && !request.getParameter("search_name").isEmpty()) {
wherestr += " and NAME_ like '%" + request.getParameter("search_name") + "%' ";
}
if(request.getParameter("search_code")!=null && !request.getParameter("search_code").isEmpty()){
wherestr += " and KEY_ like '%"+request.getParameter("search_code")+"%' ";
}else{
if(!cu.getId().equals(CommString.ID_Admin)){
if (request.getParameter("search_code") != null && !request.getParameter("search_code").isEmpty()) {
wherestr += " and KEY_ like '%" + request.getParameter("search_code") + "%' ";
} else {
if (!cu.getId().equals(CommString.ID_Admin)) {
List<Company> companies = unitService.getCompaniesByUserId(cu.getId());
if(companies!=null && companies.size()>0){
for(int i=0;i<companies.size();i++){
wherestr += " and KEY_ like '%"+companies.get(0).getId()+"%' ";
if (companies != null && companies.size() > 0) {
for (int i = 0; i < companies.size(); i++) {
wherestr += " and KEY_ like '%" + companies.get(0).getId() + "%' ";
}
}
}
}
String sql = "select * from [ACT_RE_MODEL]"+wherestr;
String sql = "select * from [ACT_RE_MODEL]" + wherestr;
//page = 2;
// List<org.activiti.engine.repository.Model> list = repositoryService.createModelQuery().orderByCreateTime().desc().listPage(startNum, rows);
List<org.activiti.engine.repository.Model> list = repositoryService.createNativeModelQuery().sql(sql).list();
@ -565,98 +575,103 @@ public class ModelController {
}
}*/
PageInfo<org.activiti.engine.repository.Model> pi = new PageInfo<org.activiti.engine.repository.Model>(list);
JSONArray json=JSONArray.fromObject(list);
String result="{\"total\":"+list.size()+",\"rows\":"+json+"}";
model.addAttribute("result",result);
JSONArray json = JSONArray.fromObject(list);
String result = "{\"total\":" + list.size() + ",\"rows\":" + json + "}";
model.addAttribute("result", result);
return new ModelAndView("result");
// page.setTotalCount(processDefinitionQuery.count());
// page.setResult(objects);
// mav.addObject("page", page);
//
// return mav;
}
/**
* 流程定义列表
*
* @return
*/
@RequestMapping(value = "/getModelAll.do")
public ModelAndView getModelAll(HttpServletRequest request,Model model) {
User cu=(User)request.getSession().getAttribute("cu");
public ModelAndView getModelAll(HttpServletRequest request, Model model) {
User cu = (User) request.getSession().getAttribute("cu");
String userId = cu.getId();
String wherestr = " where 1=1 ";
if(request.getParameter("bizid")!=null && !request.getParameter("bizid").isEmpty()){
wherestr += " and KEY_ like '%"+request.getParameter("bizid")+"%' ";
if (request.getParameter("bizid") != null && !request.getParameter("bizid").isEmpty()) {
wherestr += " and KEY_ like '%" + request.getParameter("bizid") + "%' ";
}
String sql = "select * from [ACT_RE_MODEL]"+wherestr;
String sql = "select * from [ACT_RE_MODEL]" + wherestr;
List<org.activiti.engine.repository.Model> list = repositoryService.createNativeModelQuery().sql(sql).list();
JSONArray json=JSONArray.fromObject(list);
JSONArray json = JSONArray.fromObject(list);
JSONArray rows = new JSONArray();
if(json!=null && json.size()>0){
for(int i=0;i<json.size();i++){
if (json != null && json.size() > 0) {
for (int i = 0; i < json.size(); i++) {
JSONObject job = json.getJSONObject(i);
TaskQuery taskQuery = taskService.createTaskQuery().taskCandidateOrAssigned(userId).processDefinitionKey(job.get("key").toString());
List<Task> taskList = taskQuery.list();
int taskNum = taskList.size();
job.put("taskNum",taskNum);
job.put("taskNum", taskNum);
rows.add(job);
}
}
String result="{\"total\":"+list.size()+",\"rows\":"+rows+"}";
model.addAttribute("result",result);
String result = "{\"total\":" + list.size() + ",\"rows\":" + rows + "}";
model.addAttribute("result", result);
return new ModelAndView("result");
}
@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"));
request.setAttribute("company", company);
return "/activiti/modelAdd";
}
@RequestMapping("/editModel.do")
public String editModel(HttpServletRequest request,Model model) {
public String editModel(HttpServletRequest request, Model model) {
String modelId = request.getParameter("modelid");
org.activiti.engine.repository.Model modelData = repositoryService.getModel(modelId);
model.addAttribute("model", modelData);
String metainfo = modelData.getMetaInfo();
JSONObject modelObjectNode = JSONObject.fromObject(metainfo) ;
JSONObject modelObjectNode = JSONObject.fromObject(metainfo);
String description = modelObjectNode.getString(ModelDataJsonConstants.MODEL_DESCRIPTION);
String[] str =modelData.getKey().split("-");
String[] str = modelData.getKey().split("-");
model.addAttribute("processTypeId", str[0]);
String companyId = str[1];
Company company = this.unitService.getCompById(companyId);
request.setAttribute("company", company);
model.addAttribute("description", description);
if (str.length>2) {
if (str.length > 2) {
String maintenanceType = str[2];
model.addAttribute("maintenanceType", maintenanceType);
}
return "/activiti/modelEdit";
}
/**
* 编辑流程图
* @author wuping
*
* @return
* @author wuping
*/
@RequestMapping("/editFlow.do")
public String editFlow(HttpServletRequest request,Model model) {
public String editFlow(HttpServletRequest request, Model model) {
return "/activiti/modelFlowEdit";
}
/**
* 编辑流程节点添加业务
* @author wuping
*
* @return
* @author wuping
*/
@RequestMapping("/editNode.do")
public String editNode(HttpServletRequest request,Model model) {
public String editNode(HttpServletRequest request, Model model) {
//String prString= request.getParameter("processTypeId");
String modelid = request.getParameter("modelid");
int index=0;
int index = 0;
String resourceId = request.getParameter("resourceId");
String bizId = request.getParameter("bizId");
Company company = this.unitService.getCompById(bizId);
@ -667,22 +682,22 @@ public class ModelController {
Object businessid = "";
try {
modelNode = (ObjectNode) new ObjectMapper().readTree(repositoryService.getModelEditorSource(modelid));
for(int i=0;i<modelNode.get("childShapes").size();i++){
if(modelNode.get("childShapes").path(i).get("resourceId").asText().equals(resourceId)){
for (int i = 0; i < modelNode.get("childShapes").size(); i++) {
if (modelNode.get("childShapes").path(i).get("resourceId").asText().equals(resourceId)) {
index = i;
break;
}
}
JsonNode json =modelNode.get("childShapes").path(index);
JsonNode json = modelNode.get("childShapes").path(index);
JsonNode properties = json.get("properties");
System.out.println(properties);
name =properties.get("name").asText();
name = properties.get("name").asText();
JsonNode stencil = json.get("stencil");
nodetype =stencil.get("id").asText();
businessid =properties.get("documentation");
if(businessid != null){
businessid =properties.get("documentation").asText();
}else{
nodetype = stencil.get("id").asText();
businessid = properties.get("documentation");
if (businessid != null) {
businessid = properties.get("documentation").asText();
} else {
businessid = "";
}
@ -709,45 +724,50 @@ public class ModelController {
/**
* 流程节点列表
* @author wuping
*
* @return
* @author wuping
*/
@RequestMapping("modelNode.do")
public ModelAndView modelNode(HttpServletRequest request,Model model) {
public ModelAndView modelNode(HttpServletRequest request, Model model) {
String modelId = request.getParameter("modelid");
org.activiti.engine.repository.Model modelData = repositoryService.getModel(modelId);
model.addAttribute("model", modelData);
JSONArray jsonArray =new JSONArray();
JSONArray jsonArray = new JSONArray();
Map map;
try {
ObjectNode modelNode = (ObjectNode) new ObjectMapper().readTree(repositoryService.getModelEditorSource(modelData.getId()));
JsonNode childShapes =modelNode.get("childShapes");
if(childShapes!= null && childShapes.size()>0){
for(int i=0;i<childShapes.size();i++){
JsonNode childShapes = modelNode.get("childShapes");
if (childShapes != null && childShapes.size() > 0) {
for (int i = 0; i < childShapes.size(); i++) {
JsonNode stencil = childShapes.path(i).get("stencil");
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 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 = "";
if(properties.has("name") && properties.get("name") != null) {
if (properties.has("name") && properties.get("name") != null) {
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("businessunit", businessUnitService.selectById(documentation));
String resourceId = json.get("resourceId").toString();
List<ModelNodeJob> list = this.jobService.selectModelNodeJobListByWhere(" where resource_id='"+resourceId+"' and model_id ='"+modelData.getId()+"' ");
StringBuilder jobNames= new StringBuilder();
StringBuilder jobIds= new StringBuilder();
if(list != null && !list.isEmpty()){
for(int j=0;j<list.size();j++){
if(list.get(j)!=null){
if(list.get(j).getName() != null && list.get(j).getName() !="" && list.get(j).getName() != "null"){
List<ModelNodeJob> list = this.jobService.selectModelNodeJobListByWhere(" where resource_id='" + resourceId + "' and model_id ='" + modelData.getId() + "' ");
StringBuilder jobNames = new StringBuilder();
StringBuilder jobIds = new StringBuilder();
if (list != null && !list.isEmpty()) {
for (int j = 0; j < list.size(); j++) {
if (list.get(j) != null) {
if (list.get(j).getName() != null && list.get(j).getName() != "" && list.get(j).getName() != "null") {
jobNames.append(list.get(j).getName()).append(",");
jobIds.append(list.get(j).getJobId()).append(",");
}
@ -756,7 +776,7 @@ public class ModelController {
}
}
if(!jobNames.toString().isEmpty()){
if (!jobNames.toString().isEmpty()) {
json.put("jobNames", jobNames.toString());
json.put("jobIds", jobIds.toString());
@ -768,7 +788,7 @@ public class ModelController {
}
}
String result = "{\"total\":" + jsonArray.size() + ",\"rows\":" + jsonArray + "}";
model.addAttribute("result",result);
model.addAttribute("result", result);
} catch (JsonProcessingException e) {
@ -782,32 +802,33 @@ public class ModelController {
return new ModelAndView("result");
}
/**
* 更新模型
*/
@RequestMapping(value = "update", method = RequestMethod.POST)
public String update(HttpServletRequest request,Model model,
@RequestParam(value ="id") String id,
@RequestParam(value ="name") String name,
@RequestParam(value ="description", required=false) String description,
@RequestParam(value ="companyid") String companyid,
@RequestParam(value ="processType") String processType,HttpServletResponse response){
User cu= (User)request.getSession().getAttribute("cu");
public String update(HttpServletRequest request, Model model,
@RequestParam(value = "id") String id,
@RequestParam(value = "name") String name,
@RequestParam(value = "description", required = false) String description,
@RequestParam(value = "companyid") String companyid,
@RequestParam(value = "processType") String processType, HttpServletResponse response) {
User cu = (User) request.getSession().getAttribute("cu");
String result="";
String result = "";
try {
org.activiti.engine.repository.Model modelData = repositoryService.getModel(id);
modelData.setName(name);
String modelKey=processType+"-"+companyid;
String maintenanceType=request.getParameter("maintenanceType");
String modelKey = processType + "-" + companyid;
String maintenanceType = request.getParameter("maintenanceType");
if (ProcessType.B_Maintenance.getId().equals(processType)) {
modelKey+="-"+maintenanceType;
modelKey += "-" + maintenanceType;
}
modelData.setKey(modelKey);//模型key
description = StringUtils.defaultString(description);
String metainfo = modelData.getMetaInfo();
JSONObject modelObjectNode = JSONObject.fromObject(metainfo) ;
JSONObject modelObjectNode = JSONObject.fromObject(metainfo);
modelObjectNode.put(ModelDataJsonConstants.MODEL_DESCRIPTION, description);
modelData.setMetaInfo(modelObjectNode.toString());
repositoryService.saveModel(modelData);
@ -819,7 +840,7 @@ public class ModelController {
propertiesNode.put("name", modelData.getName());
modelNode.put("properties", propertiesNode);
repositoryService.addModelEditorSource(modelData.getId(), modelNode.toString().getBytes("utf-8"));
result=modelData.getId();
result = modelData.getId();
} catch (Exception e) {
logger.error("创建模型失败:", e);
}
@ -827,17 +848,18 @@ public class ModelController {
model.addAttribute("result", result);
return "result";
}
/**
* 创建模型
*/
@RequestMapping(value = "create", method = RequestMethod.POST)
public String create(HttpServletRequest request,Model model,
@RequestParam(value ="name") String name,
@RequestParam(value ="description", required=false) String description,
@RequestParam(value ="companyid") String companyid,
@RequestParam(value ="processType") String processType,
public String create(HttpServletRequest request, Model model,
@RequestParam(value = "name") String name,
@RequestParam(value = "description", required = false) String description,
@RequestParam(value = "companyid") String companyid,
@RequestParam(value = "processType") String processType,
HttpServletResponse response) {
String result="";
String result = "";
try {
ObjectMapper objectMapper = new ObjectMapper();
ObjectNode editorNode = objectMapper.createObjectNode();
@ -854,10 +876,10 @@ public class ModelController {
modelObjectNode.put(ModelDataJsonConstants.MODEL_DESCRIPTION, description);
modelData.setMetaInfo(modelObjectNode.toString());
modelData.setName(name);
String maintenanceType=request.getParameter("maintenanceType");
String modelKey=processType+"-"+companyid;
String maintenanceType = request.getParameter("maintenanceType");
String modelKey = processType + "-" + companyid;
if (ProcessType.B_Maintenance.getId().equals(processType)) {
modelKey+="-"+maintenanceType;
modelKey += "-" + maintenanceType;
}
modelData.setKey(modelKey);//模型key
@ -869,37 +891,39 @@ public class ModelController {
repositoryService.saveModel(modelData);
repositoryService.addModelEditorSource(modelData.getId(), editorNode.toString().getBytes("utf-8"));
result=modelData.getId();
result = modelData.getId();
} catch (Exception e) {
logger.error("创建模型失败:", e);
}
model.addAttribute("result",result );
model.addAttribute("result", result);
return "result";
}
/**
* 更新业务流程节点
* @author wuping
*
* @return
* @author wuping
*/
@RequestMapping("/saveNode.do")
public String saveNode(HttpServletRequest request,Model model,
@RequestParam(value ="businessid") String businessid,
@RequestParam(value ="nodename") String nodename,
@RequestParam(value ="modelid") String modelid,
@RequestParam(value ="index") String index,
@RequestParam(value = "countersign",required = false,defaultValue = "false") boolean countersign,
public String saveNode(HttpServletRequest request, Model model,
@RequestParam(value = "businessid") String businessid,
@RequestParam(value = "nodename") String nodename,
@RequestParam(value = "modelid") String modelid,
@RequestParam(value = "index") String index,
@RequestParam(value = "countersign", required = false, defaultValue = "false") boolean countersign,
HttpServletResponse response) {
String result="";
String result = "";
JsonNode modelNode;
JSONObject modelobject;
BpmnModel bpmnModel ;
BpmnModel bpmnModel;
BpmnJsonConverter bpmnJsonConverter;
try {
int i = Integer.valueOf(index);
modelNode = new ObjectMapper().readTree(repositoryService.getModelEditorSource(modelid));
modelobject = JSONObject.fromObject(new ObjectMapper().writeValueAsString(modelNode));
JSONObject json= modelobject.getJSONArray("childShapes").getJSONObject(i);
JSONObject properties =json.getJSONObject("properties");
JSONObject json = modelobject.getJSONArray("childShapes").getJSONObject(i);
JSONObject properties = json.getJSONObject("properties");
properties.put("documentation", businessid);
properties.put("name", nodename);
properties.put("nodename", nodename);
@ -944,7 +968,7 @@ public class ModelController {
} catch (Exception e) {
logger.error("创建模型失败:", e);
}
model.addAttribute("result",result );
model.addAttribute("result", result);
return "result";
}
@ -952,64 +976,64 @@ public class ModelController {
* 根据Model部署流程
*/
@RequestMapping(value = "deploy", method = RequestMethod.POST)
public String deploy(HttpServletRequest request,Model model,
@RequestParam(value ="modelId") String modelId) {
public String deploy(HttpServletRequest request, Model model,
@RequestParam(value = "modelId") String modelId) {
/*String result=processModelService.deploy(modelId);
model.addAttribute("result",result);
return "result";*/
String result="";
String result = "";
JsonNode modelNode;
JSONObject modelobject;
JSONArray childShapes;
try {
modelNode = new ObjectMapper().readTree(repositoryService.getModelEditorSource(modelId));
modelobject = JSONObject.fromObject(new ObjectMapper().writeValueAsString(modelNode));
if(modelobject.get("childShapes")!=null){
childShapes= modelobject.getJSONArray("childShapes");
for(int i=0;i<childShapes.size();i++){
JSONObject json= childShapes.getJSONObject(i);
JSONObject properties =json.getJSONObject("properties");
JSONObject stencil =json.getJSONObject("stencil");
if(!stencil.get("id").toString().equals("StartNoneEvent")&&!stencil.get("id").toString().equals("UserTask")&&!stencil.get("id").toString().equals("SequenceFlow")&&!stencil.get("id").toString().equals("EndNoneEvent")
&&!stencil.get("id").toString().equals("ExclusiveGateway")){
model.addAttribute("result","{\"res\":\"0\",\"restr\":\"部署失败,请勿添加除任务、单一选择的网关、开始、结束以外的流程图元素!\"}" );
if (modelobject.get("childShapes") != null) {
childShapes = modelobject.getJSONArray("childShapes");
for (int i = 0; i < childShapes.size(); i++) {
JSONObject json = childShapes.getJSONObject(i);
JSONObject properties = json.getJSONObject("properties");
JSONObject stencil = json.getJSONObject("stencil");
if (!stencil.get("id").toString().equals("StartNoneEvent") && !stencil.get("id").toString().equals("UserTask") && !stencil.get("id").toString().equals("SequenceFlow") && !stencil.get("id").toString().equals("EndNoneEvent")
&& !stencil.get("id").toString().equals("ExclusiveGateway")) {
model.addAttribute("result", "{\"res\":\"0\",\"restr\":\"部署失败,请勿添加除任务、单一选择的网关、开始、结束以外的流程图元素!\"}");
return "result";
}
if(stencil.get("id").toString().equals("UserTask")){
if(properties.get("documentation").toString().equals("")||properties.get("documentation").toString()== null){
model.addAttribute("result","{\"res\":\"0\",\"restr\":\"部署失败,请为节点添加业务!\"}" );
if (stencil.get("id").toString().equals("UserTask")) {
if (properties.get("documentation").toString().equals("") || properties.get("documentation").toString() == null) {
model.addAttribute("result", "{\"res\":\"0\",\"restr\":\"部署失败,请为节点添加业务!\"}");
return "result";
}
}
//properties.put("documentation", businessid);
//properties.put("usertaskassignment", "{\"assignment\":{\"candidateUsers\":[{\"value\":\"#{userIds}\",\"$$hashKey\":\"0BQ\"}],\"assignee\":\"${applicantId}\"}}");
if(stencil.get("id").toString().indexOf("SequenceFlow")!=-1){
String regEx="[^0-9]";
if (stencil.get("id").toString().indexOf("SequenceFlow") != -1) {
String regEx = "[^0-9]";
Pattern p = Pattern.compile(regEx);
Matcher m = p.matcher(properties.get("name").toString());
String numstr = m.replaceAll("").trim();
numstr=numstr.isEmpty()?"0":numstr;
numstr = numstr.isEmpty() ? "0" : numstr;
int num = Integer.valueOf(numstr);
if(properties.get("name").toString().startsWith("通过")){
if(num>0){
properties.put("conditionsequenceflow", "${pass && route=="+num+"}");
}else{
if (properties.get("name").toString().startsWith("通过")) {
if (num > 0) {
properties.put("conditionsequenceflow", "${pass && route==" + num + "}");
} else {
properties.put("conditionsequenceflow", "${pass}");
}
}
if(properties.get("name").toString().startsWith("不通过")){
if(num>0){
properties.put("conditionsequenceflow", "${!pass && route=="+num+"}");
}else{
if (properties.get("name").toString().startsWith("不通过")) {
if (num > 0) {
properties.put("conditionsequenceflow", "${!pass && route==" + num + "}");
} else {
properties.put("conditionsequenceflow", "${!pass}");
}
}
}
}
}else{
model.addAttribute("result","{\"res\":\"0\",\"restr\":\"部署失败,请编辑流程图!\"}" );
} else {
model.addAttribute("result", "{\"res\":\"0\",\"restr\":\"部署失败,请编辑流程图!\"}");
return "result";
}
@ -1018,12 +1042,12 @@ public class ModelController {
//JSON ----> JsonNode
JsonNode editorNode = mapper.readTree(modelobject.toString());
repositoryService.addModelEditorSource(modelId, editorNode.toString().getBytes("utf-8"));
result=processModelService.deploy(modelId);
model.addAttribute("result",result );
result = processModelService.deploy(modelId);
model.addAttribute("result", result);
return "result";
} catch (Exception e) {
logger.error("创建模型失败:", e);
model.addAttribute("result","{\"res\":\"0\",\"restr\":\"部署失败!\"}" );
model.addAttribute("result", "{\"res\":\"0\",\"restr\":\"部署失败!\"}");
return "result";
}
@ -1053,8 +1077,8 @@ public class ModelController {
}
@RequestMapping("/delete.do")
public String dodel(HttpServletRequest request,Model model,
@RequestParam(value="id") String id){
public String dodel(HttpServletRequest request, Model model,
@RequestParam(value = "id") String id) {
repositoryService.deleteModel(id);
model.addAttribute("result", 1);
return "result";
@ -1094,7 +1118,7 @@ public class ModelController {
// 构建模型Key
String modelKey = null;
User cu = (User)request.getSession().getAttribute("cu");
User cu = (User) request.getSession().getAttribute("cu");
if (companyId != null && !companyId.isEmpty()) {
modelKey = "imported-" + companyId;
} else if (cu != null && !cu.getId().equals(CommString.ID_Admin)) {
@ -1145,7 +1169,7 @@ public class ModelController {
try {
// 获取当前用户和公司信息
User cu = (User)request.getSession().getAttribute("cu");
User cu = (User) request.getSession().getAttribute("cu");
String processTypeId = request.getParameter("processTypeId");
String companyId = request.getParameter("companyId");
String maintenanceType = request.getParameter("maintenanceType");

View File

@ -93,11 +93,7 @@ public class BusinessUnitController {
public String dosave(HttpServletRequest request,Model model,
@ModelAttribute BusinessUnit businessUnit){
User cu= (User)request.getSession().getAttribute("cu");
// Use custom ID if provided, otherwise generate UUID
String id = businessUnit.getId();
if(id == null || id.trim().isEmpty()) {
id = CommUtil.getUUID();
}
String id = CommUtil.getUUID();
businessUnit.setId(id);
businessUnit.setInsuser(cu.getId());
businessUnit.setInsdt(CommUtil.nowDate());

View File

@ -327,13 +327,13 @@ public class DataController {
fileIds = fileIds.replace(",","','");
wherestr += " and (id in ('"+fileIds+"') or filename like '%"+fileName+"%') ";
}
if(request.getParameter("masterId")!=null && !request.getParameter("masterId").isEmpty()){
String masterId = request.getParameter("masterId");
masterId = masterId.replace(",","','");
wherestr += " and masterid in ('"+masterId+"')";
}else if(request.getParameter("equipmentId") == null){
wherestr += " and masterid in ('')";
}
// if(request.getParameter("masterId")!=null && !request.getParameter("masterId").isEmpty()){
// String masterId = request.getParameter("masterId");
// masterId = masterId.replace(",","','");
// wherestr += " and masterid in ('"+masterId+"')";
// }else if(request.getParameter("equipmentId") == null){
// wherestr += " and masterid in ('')";
// }
if(request.getParameter("equipmentId")!=null && !request.getParameter("equipmentId").isEmpty()){
String fileIds = this.equipmentFileService.getFileIds(request.getParameter("equipmentId"));
fileIds = fileIds.replace(",","','");

View File

@ -5696,6 +5696,14 @@ public class EquipmentCardController {
* @param model
* @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")
public String getProcessSection4EquipmentCardTree(HttpServletRequest request, Model model) {
String unitId = request.getParameter("unitId");

View File

@ -36,6 +36,7 @@ import java.util.UUID;
/**
* 综合检查
*
* @author lt
*/
@Controller
@ -125,11 +126,13 @@ public class SafetyCheckComprehensiveController {
@RequestMapping("/save.do")
@ResponseBody
@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");
bean.setId(UUID.randomUUID().toString());
if (file.getSize() > 0) {
safetyFilesService.upload(request, null, SafetyFunctionEnum.SAFETY_CHECK_COMPREHENSIVE.getId(), SafetyCheckStatusEnum.APPLY.getId(), bean.getId());
if (multipartFiles != null) {
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));
if (bean.getCheckResult() == SafetyCheckResultEnum.OK.getId()) {
@ -153,8 +156,8 @@ public class SafetyCheckComprehensiveController {
@RequestMapping("/saveApply.do")
@ResponseBody
@Transactional(rollbackFor = Exception.class)
public Result saveApply(HttpServletRequest request, SafetyCheckComprehensive bean, MultipartFile file) throws Exception {
if(StringUtils.isEmpty(bean.getDutyUserId())){
public Result saveApply(HttpServletRequest request, SafetyCheckComprehensive bean, MultipartFile[] file) throws Exception {
if (StringUtils.isEmpty(bean.getDutyUserId())) {
return Result.failed("整改负责人不能为空!");
}
@ -232,7 +235,7 @@ public class SafetyCheckComprehensiveController {
@ResponseBody
@Transactional(rollbackFor = Exception.class)
public Result apply(HttpServletRequest request, SafetyCheckComprehensive bean) throws IOException, ServiceException {
if(StringUtils.isEmpty(bean.getDutyUserId())){
if (StringUtils.isEmpty(bean.getDutyUserId())) {
return Result.failed("整改负责人不能为空!");
}
update(request, bean);
@ -336,7 +339,7 @@ public class SafetyCheckComprehensiveController {
@ResponseBody
@Transactional(rollbackFor = Exception.class)
public Result response(HttpServletRequest request, SafetyCheckComprehensive bean, String processInstanceId) throws IOException, ServiceException {
if(StringUtils.isEmpty(bean.getConfirmUserId())){
if (StringUtils.isEmpty(bean.getConfirmUserId())) {
return Result.failed("验证人不能为空!");
}
@ -388,7 +391,7 @@ public class SafetyCheckComprehensiveController {
bean.getConfirmUserName(),
bean.getCopyUserId(),
bean.getCopyUserName(),
SafetyCheckStatusEnum.COMPLETE.getTaskRecordPass( bean.getConfirmUserName()));
SafetyCheckStatusEnum.COMPLETE.getTaskRecordPass(bean.getConfirmUserName()));
safetyFlowTaskService.saveWorkFlowRecord(true,
bean.getId(),
"结束",

View File

@ -211,7 +211,8 @@ public class SafetyCheckDaylyController {
@ResponseBody
@Transactional(rollbackFor = Exception.class)
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("整改负责人不能为空!");
}

View File

@ -66,7 +66,7 @@ public class SafetyEducationTraineeController {
**/
@RequestMapping("/add.do")
public String add(HttpServletRequest request, Model model) throws Exception {
String educationCode =safetySeqService.code(request,SafetyFunctionEnum.EDUCATION_TRAINEE);
String educationCode = safetySeqService.code(request, SafetyFunctionEnum.EDUCATION_TRAINEE);
model.addAttribute("educationCode", educationCode);
return "safety/EducationTraineeAdd";
}
@ -82,9 +82,10 @@ public class SafetyEducationTraineeController {
SafetyEducationTrainee educationTrainee = safetyEducationTraineeService.selectById(id);
SafetyFiles file = safetyFilesService.selectById(educationTrainee.getFileId());
model.addAttribute("bean", educationTrainee);
model.addAttribute("fileName", file==null?"":file.getOriginalFileName());
model.addAttribute("fileName", file == null ? "" : file.getOriginalFileName());
return "safety/EducationTraineeEdit";
}
/**
* 跳转至编辑弹窗
*
@ -96,9 +97,10 @@ public class SafetyEducationTraineeController {
SafetyEducationTrainee educationTrainee = safetyEducationTraineeService.selectById(id);
SafetyFiles file = safetyFilesService.selectById(educationTrainee.getFileId());
model.addAttribute("bean", educationTrainee);
model.addAttribute("fileName",file==null?"":file.getOriginalFileName());
model.addAttribute("fileName", file == null ? "" : file.getOriginalFileName());
return "safety/EducationTraineeView";
}
/**
* 获取分页列表信息
*
@ -169,24 +171,24 @@ public class SafetyEducationTraineeController {
@RequestMapping("/update.do")
@ResponseBody
@Transactional(rollbackFor = Exception.class)
public Result update(HttpServletRequest request,SafetyEducationTrainee bean, MultipartFile file) throws IOException, ParseException {
public Result update(HttpServletRequest request, SafetyEducationTrainee bean, MultipartFile file) throws IOException, ParseException {
if (!safetyEducationTraineeService.timeRangeCheck(bean)) {
return Result.failed("培训有效期早于培训日期!");
}
SafetyEducationTrainee oldBean = safetyEducationTraineeService.selectById(bean.getId());
//如果文件id是空的代表用户重新上传的文件先删除原来的文件然后再上传新文件。
if (StringUtils.isEmpty(bean.getFileId())&&file.getSize()>0) {
List<SafetyFiles> fileBeanList = safetyFilesService.upload(request,file, SafetyFunctionEnum.EDUCATION_TRAINEE.getId(), null, bean.getId());
if (StringUtils.isEmpty(bean.getFileId()) && file.getSize() > 0) {
List<SafetyFiles> fileBeanList = safetyFilesService.upload(request, file, SafetyFunctionEnum.EDUCATION_TRAINEE.getId(), null, bean.getId());
bean.setFileId(fileBeanList.get(0).getId());
safetyEducationTraineeService.update(bean);
// 删除原来的附件记录
safetyFilesService.deleteById(oldBean.getFileId());
} else if (StringUtils.isEmpty(bean.getFileId()) && file.getSize()==0) {
} else if (StringUtils.isEmpty(bean.getFileId()) && file.getSize() == 0) {
bean.setFileId(null);
safetyEducationTraineeService.update(bean);
safetyFilesService.deleteById(oldBean.getFileId());
}else {
// safetyFilesService.deleteById(oldBean.getFileId());
} else {
safetyEducationTraineeService.update(bean);
}
return Result.success();
@ -210,6 +212,7 @@ public class SafetyEducationTraineeController {
}
return Result.success();
}
/**
* 删除附件
*
@ -224,7 +227,7 @@ public class SafetyEducationTraineeController {
safetyFilesService.deleteById(bean.getFileId());
bean.setFileId("");
int row = safetyEducationTraineeService.update(bean);
if (row!=0) {
if (row != 0) {
return Result.success();
}
return Result.failed("删除失败!");

View File

@ -170,6 +170,16 @@ public class StaffArchivesController {
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);
model.addAttribute("result", CommUtil.toJson(Result.success()));
return "result";
@ -195,6 +205,16 @@ public class StaffArchivesController {
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);
model.addAttribute("result", CommUtil.toJson(Result.success()));
return "result";

View File

@ -1607,7 +1607,7 @@ public class MPointController {
mPointExpandService.update(mPoint.getBizid(), mPointExpand);
} else {
MPointExpand mPointExpand2 = new MPointExpand();
mPointExpand2.setId(CommUtil.getUUID());
// mPointExpand2.setId(CommUtil.getUUID());
mPointExpand2.setInsdt(CommUtil.nowDate());
mPointExpand2.setExplain(explain);
mPointExpand2.setMeasurePointId(mPoint.getId());

View File

@ -22,6 +22,10 @@ public class SafetyStaffArchivesVo extends SafetyStaffArchives {
* 性别翻译
*/
private String sexText;
/**
* 所属部门ID
*/
private String pid;
/**
* 所属部门
*/

View File

@ -28,6 +28,7 @@
<result column="caption" property="caption" jdbcType="VARCHAR"/>
<result column="sex" property="sex" jdbcType="VARCHAR"/>
<result column="sexText" property="sexText" jdbcType="VARCHAR"/>
<result column="pid" property="pid" jdbcType="VARCHAR"/>
<result column="deptName" property="deptName" jdbcType="VARCHAR"/>
</resultMap>
@ -164,6 +165,7 @@
u.caption,
u.sex,
(case when u.sex='0' then '女' else '男' end) as sexText,
u.pid,
uu.name as deptName
from tb_safety_staff_archives ssa
INNER JOIN tb_user u ON ssa.userid = u.id
@ -178,6 +180,7 @@
u.caption,
u.sex,
(case when u.sex='0' then '女' else '男' end) as sexText,
u.pid,
uu.name as deptName
from tb_safety_staff_archives ssa
INNER JOIN tb_user u ON ssa.userid = u.id

View File

@ -1,6 +1,6 @@
<?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" >
<mapper namespace="com.sipai.mapper.scada.MPointDataMapper">
<mapper namespace="scada.MPointDataMapper">
<resultMap id="BaseResultMap" type="com.sipai.entity.scada.MPointData" >
<id column="ItemID" property="itemId" jdbcType="BIGINT" />
<result column="ParmValue" property="parmValue" jdbcType="DECIMAL" />

View File

@ -22,17 +22,14 @@
where id = #{id,jdbcType=VARCHAR}
</delete>
<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)
values (#{id,jdbcType=VARCHAR}, #{insdt,jdbcType=TIMESTAMP}, #{insuser,jdbcType=VARCHAR},
values (#{insdt,jdbcType=TIMESTAMP}, #{insuser,jdbcType=VARCHAR},
#{measurePointId,jdbcType=VARCHAR}, #{explain,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.sipai.entity.scada.MPointExpand" >
insert into TB_MeasurePoint_Expand
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="id != null" >
id,
</if>
<if test="insdt != null" >
insdt,
</if>
@ -47,9 +44,6 @@
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="id != null" >
#{id,jdbcType=VARCHAR},
</if>
<if test="insdt != null" >
#{insdt,jdbcType=TIMESTAMP},
</if>

View File

@ -1,6 +1,6 @@
<?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" >
<mapper namespace="com.sipai.mapper.scada.WaterVolumeLJLLMapper">
<mapper namespace="scada.WaterVolumeLJLLMapper">
<resultMap id="BaseResultMap" type="com.sipai.entity.scada.WaterVolumeLJLL" >
<id column="ItemID" property="itemId" jdbcType="BIGINT" />
<result column="ParmValue" property="parmValue" jdbcType="DECIMAL" />

View File

@ -8424,7 +8424,13 @@ public class EquipmentCardService implements CommService<EquipmentCard> {
}
}
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);
}
getTreeList4ProcessSection(childlist, list);
}
}
@ -8491,7 +8497,13 @@ public class EquipmentCardService implements CommService<EquipmentCard> {
}
}
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);
}
getTreeList4EquipmentClass(childlist, list);
}
}

View File

@ -46,6 +46,8 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.xmlpull.v1.XmlPullParserException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import javax.annotation.Resource;
import javax.xml.parsers.DocumentBuilderFactory;
@ -70,6 +72,7 @@ import static org.apache.poi.ss.usermodel.CellType.FORMULA;
@Service("rptCreateService")
//@Service
public class RptCreateServiceImpl implements RptCreateService {
private static final Logger logger = LoggerFactory.getLogger(RptCreateServiceImpl.class);
@Resource
private RptCreateDao rptCreateDao;
@Resource
@ -393,7 +396,7 @@ public class RptCreateServiceImpl implements RptCreateService {
}
}
Row row2 = sheet.getRow(row);
HSSFCell cell = (HSSFCell) row2.getCell(column);
Cell cell = row2.getCell(column);
return list;
}
@ -846,21 +849,26 @@ public class RptCreateServiceImpl implements RptCreateService {
// 设定Excel文件所在路径
String excelFileName = filelist.get(0).getAbspath();
// 读取Excel文件内容
HSSFWorkbook workbook = null;
Workbook workbook = null;
FileInputStream inputStream = null;
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
InputStream ins = new ByteArrayInputStream(bytes_m);
// 构建Workbook对象, 只读Workbook对象
// 构建Workbook对象, 只读Workbook对象 - use WorkbookFactory to support both .xls and .xlsx
try {
workbook = new HSSFWorkbook(ins);
workbook = WorkbookFactory.create(ins);
} catch (IOException e) {
logger.error("Failed to create workbook from file: " + path, e);
e.printStackTrace();
}
String endtype = ".xls";
String endtype = path.toLowerCase().endsWith(".xlsx") ? ".xlsx" : ".xls";
// 生成一个样式,用在表格数据
HSSFCellStyle listStyle = null;
if (endtype.equals(".xls")) {
CellStyle listStyle = null;
listStyle = workbook.createCellStyle();
// 设置这些样式
listStyle.setBorderBottom(BorderStyle.THIN);
@ -871,10 +879,8 @@ public class RptCreateServiceImpl implements RptCreateService {
listStyle.setVerticalAlignment(VerticalAlignment.CENTER);//垂直居中
//listStyle.setWrapText(false);//不自动换行
//listStyle.setDataFormat(HSSFDataFormat.getBuiltinFormat("0.00"));//设置格式
}
// 生成一个样式,用在表格数据 修改过的数据
HSSFCellStyle listStyle2 = null;
if (endtype.equals(".xls")) {
CellStyle listStyle2 = null;
listStyle2 = workbook.createCellStyle();
// 设置这些样式
listStyle2.setBorderBottom(BorderStyle.THIN);
@ -885,7 +891,6 @@ public class RptCreateServiceImpl implements RptCreateService {
listStyle2.setVerticalAlignment(VerticalAlignment.CENTER);//垂直居中
listStyle2.setFillPattern(FillPatternType.SOLID_FOREGROUND);
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");
if (rptSpSetlist != null && rptSpSetlist.size() > 0) {
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)) { //接班人 类型
for (int ws = 0; ws < workbook.getNumberOfSheets(); ws++) {//获取每个Sheet表
if (workbook.getSheetName(ws).equals(rptSpSetlist.get(s).getSheet())) {
HSSFSheet sheet = workbook.getSheetAt(ws);
HSSFRow row = sheet.getRow(posy - 1);
Sheet sheet = workbook.getSheetAt(ws);
Row row = sheet.getRow(posy - 1);
if (row != null) {
HSSFCell cell_d = row.getCell(posx - 1);
Cell cell_d = row.getCell(posx - 1);
if (cell_d != null) {
//插入日志表
RptLog rptLog = new RptLog();
@ -1029,10 +1034,10 @@ public class RptCreateServiceImpl implements RptCreateService {
} else if (spname != null && spname.equals(RptSpSet.RptSpSet_Type_Rptdt)) {//日期 类型
for (int ws = 0; ws < workbook.getNumberOfSheets(); ws++) {//获取每个Sheet表
if (workbook.getSheetName(ws).equals(rptSpSetlist.get(s).getSheet())) {
HSSFSheet sheet = workbook.getSheetAt(ws);
HSSFRow row = sheet.getRow(posy - 1);
Sheet sheet = workbook.getSheetAt(ws);
Row row = sheet.getRow(posy - 1);
if (row != null) {
HSSFCell cell_d = row.getCell(posx - 1);
Cell cell_d = row.getCell(posx - 1);
if (cell_d != null) {
try {
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)) {//值班班长 类型
for (int ws = 0; ws < workbook.getNumberOfSheets(); ws++) {//获取每个Sheet表
if (workbook.getSheetName(ws).equals(rptSpSetlist.get(s).getSheet())) {
HSSFSheet sheet = workbook.getSheetAt(ws);
HSSFRow row = sheet.getRow(posy - 1);
Sheet sheet = workbook.getSheetAt(ws);
Row row = sheet.getRow(posy - 1);
if (row != null) {
HSSFCell cell_d = row.getCell(posx - 1);
Cell cell_d = row.getCell(posx - 1);
if (cell_d != null) {
//插入日志表
RptLog rptLog = new RptLog();
@ -1094,10 +1099,10 @@ public class RptCreateServiceImpl implements RptCreateService {
} else if (spname != null && spname.equals(RptSpSet.RptSpSet_Type_ZuYuan)) { //值班组员 类型
for (int ws = 0; ws < workbook.getNumberOfSheets(); ws++) {//获取每个Sheet表
if (workbook.getSheetName(ws).equals(rptSpSetlist.get(s).getSheet())) {
HSSFSheet sheet = workbook.getSheetAt(ws);
HSSFRow row = sheet.getRow(posy - 1);
Sheet sheet = workbook.getSheetAt(ws);
Row row = sheet.getRow(posy - 1);
if (row != null) {
HSSFCell cell_d = row.getCell(posx - 1);
Cell cell_d = row.getCell(posx - 1);
if (cell_d != null) {
//插入日志表
RptLog rptLog = new RptLog();
@ -1134,12 +1139,12 @@ public class RptCreateServiceImpl implements RptCreateService {
for (int r = 0; r < rpttemplist.size(); r++) {
for (int ws = 0; ws < workbook.getNumberOfSheets(); ws++) {//获取每个Sheet表
if (workbook.getSheetName(ws).equals(rptSpSetlist.get(s).getSheet())) {
HSSFSheet sheet = workbook.getSheetAt(ws);
HSSFRow row = sheet.getRow(rpttemplist.get(r).getColposy() - 1);
Sheet sheet = workbook.getSheetAt(ws);
Row row = sheet.getRow(rpttemplist.get(r).getColposy() - 1);
if (row != null) {
Cell cell_d = row.getCell(rpttemplist.get(r).getColposx() - 1);
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();
try {
/**
@ -1286,9 +1291,9 @@ public class RptCreateServiceImpl implements RptCreateService {
*/
List<RptLog> list = rptLogService.selectListByWhere("where creat_id = '" + rptCreate.getId() + "'");
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) {
HSSFRow row = sheet.getRow(Integer.parseInt(rptLog.getPosyE()) - 1);
Row row = sheet.getRow(Integer.parseInt(rptLog.getPosyE()) - 1);
if (row != null) {
Cell cell_d = row.getCell(Integer.parseInt(rptLog.getPosxE()) - 1);
if (cell_d != null) {

View File

@ -84,13 +84,17 @@ public class SafetyCheckActivityService {
* @Date: 2022/10/10
**/
public Result audit(String nextUserId, String processInstanceId, int pass) {
Task task =
workflowService.getTaskService().createTaskQuery().processInstanceId(processInstanceId).singleResult();
List<Task> tasks = workflowService.getTaskService().createTaskQuery().processInstanceId(processInstanceId).active().list();
if (tasks == null || tasks.isEmpty()) {
return Result.failed("No active task found for process instance: " + processInstanceId);
}
Map<String, Object> map = new HashMap<>();
map.put(CommString.ACTI_KEK_Condition, pass);
map.put(CommString.ACTI_KEK_Assignee, nextUserId);
map.put(CommString.ACTI_KEK_Candidate_Users, nextUserId);
for (Task task : tasks) {
workflowService.getTaskService().complete(task.getId(), map);
}
return Result.success();
}

View File

@ -1661,7 +1661,7 @@ public class MPointService {
for (int i = minCellNum; i < maxCellNum; i++) {
HSSFCell mpidCell = mpidRow.getCell(i);
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) {
String mpid = mPoint.getMpointcode();
MPointHistory mPointHistory = new MPointHistory();

View File

@ -75,12 +75,6 @@
<form class="form-horizontal" id="subForm">
<!-- 界面提醒div强制id为alertDiv -->
<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">
<label class="col-sm-3 control-label">*业务单元名称</label>
<div class="col-sm-9">

View File

@ -53,12 +53,6 @@
<form class="form-horizontal" id="subForm">
<div id="alertDiv"></div>
<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">
<label class="col-sm-3 control-label">*业务单元名称</label>
<div class="col-sm-9">

View File

@ -110,6 +110,11 @@
url: ext.contextPath +"/activiti/workflow/getProcessTypes4Combo.do",
dataType: 'json',
delay: 250,
data: function (params) {
return {
term: params.term
};
},
processResults: function (data) {
return {
results: data
@ -123,8 +128,8 @@
language: "zh-CN",
minimumInputLength: 0,
minimumResultsForSearch: 10,
formatResult: function formatRepo(repo){return repo.text;},
formatSelection: function formatRepoSelection(repo){return repo.text;}
templateResult: function formatRepo(repo){return repo.text;},
templateSelection: function formatRepoSelection(repo){return repo.text;}
});
fixSelect2ToTool("search_processType");
$("#table").bootstrapTable({
@ -151,11 +156,6 @@
columns: [
{
checkbox: true,
}, {
field: 'id',
title: '业务单元ID',
align: 'center',
valign: 'middle'
}, {
field: 'name',
title: '业务单元名称',

View File

@ -62,7 +62,8 @@ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD
selelct_4.val('').trigger("change");
//TODO 代码有冲突
// Initialize job dropdown with all jobs
onValueChange();
key = setInterval(() => {
// console.log(document.getElementById('objUserName'))
if ($('#objUserId').val() != old) {
@ -140,7 +141,14 @@ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD
jobId: {
validators: {
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() {
// 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({
data: data,
data: transformedData,
cache: false,
placeholder: '请选择',//默认文字提示
// 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>
</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">
<label class="col-sm-3 control-label">* 周期类型:</label>
<div class="col-sm-9">

View File

@ -17,17 +17,11 @@ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD
display: flex;
padding-left: 50px;
}
/*.layout{*/
/ display: flex;*/
/ padding-left: 15px;*/
/*}*/
.form-horizontal {
padding-top: 20px;
padding-left: 60px;
}
.right {
margin-left: 50px;
}

View File

@ -50,10 +50,10 @@ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD
formatResult: function formatRepo(repo) {
return repo.text;
}, // 函数用来渲染结果
formatSelection: function formatRepoSelection(repo) {
return repo.text;
} // 函数用于呈现当前的选择
});
});
$(".select2-selection--single").css({'height': '30px', 'paddingTop': '4px'});
select_3.val('${bean.educationType}').trigger("change");

View File

@ -147,6 +147,7 @@
hiddenId: "userid",
textId: "username",
deptNameDom: "deptName",
deptIdDom: "pid",
sexDom: "sex",
userCardIdDom: "userCardId",
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>
<div class="modal fade" id="subModal">
<div class="modal-dialog" style="width: 53%">
@ -239,8 +252,9 @@
</div>
<label class="col-sm-2 control-label">*所属部门:</label>
<div class="col-sm-4">
<input type="text" class="form-control" id="deptName" name="deptName" placeholder="所属部门"
value="" disabled>
<input type="text" class="form-control" id="deptName" name="deptName" placeholder="点击选择所属部门"
value="" onclick="showDept4SelectFun();" readonly>
<input type="hidden" id="pid" name="pid" value="">
</div>
</div>
@ -274,3 +288,4 @@
</div>
<!-- /.modal-dialog -->
</div>
<div id="deptSelectDiv"></div>

View File

@ -152,6 +152,7 @@
hiddenId: "userid",
textId: "username",
deptNameDom: "deptName",
deptIdDom: "pid",
sexDom: "sex",
userCardIdDom: "userCardId",
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>
<div class="modal fade" id="subModal">
<div class="modal-dialog modal-lg">
@ -245,8 +258,9 @@
<label class="col-sm-2 control-label">*所属部门:</label>
<div class="col-sm-4">
<input type="text" class="form-control" id="deptName" name="deptName" placeholder="所属部门"
value="${safetyStaffArchives.deptName}" disabled>
<input type="text" class="form-control" id="deptName" name="deptName" placeholder="点击选择所属部门"
value="${safetyStaffArchives.deptName}" onclick="showDept4SelectFun();" readonly>
<input type="hidden" id="pid" name="pid" value="${safetyStaffArchives.pid}">
</div>
</div>
@ -282,3 +296,4 @@
</div>
<!-- /.modal-dialog -->
</div>
<div id="deptSelectDiv"></div>

View File

@ -26,6 +26,9 @@
if(`${param.deptNameDom}` != ""){
$('#${param.formId} #${param.deptNameDom}').val(resp[0]._pname);
}
if(`${param.deptIdDom}` != ""){
$('#${param.formId} #${param.deptIdDom}').val(resp[0].pid);
}
if(`${param.sexDom}` != ""){
$('#${param.formId} #${param.sexDom}').val(resp[0].sex);
}

View File

@ -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">&times;</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>