Compare commits
48 Commits
1c8f1f98d5
...
deng-relea
| Author | SHA1 | Date | |
|---|---|---|---|
| 2ca6153cda | |||
| 6738104534 | |||
| e5da30098f | |||
| 65c2a978b8 | |||
| 80fa5872fd | |||
| 5c576ddfcb | |||
| f89ab0f90d | |||
| 78ec2cbe85 | |||
| 6c08c4fd1b | |||
| 3c9ba8a7f5 | |||
| abdd3b7add | |||
| ebe3148a58 | |||
| 6d5c8bfd65 | |||
| 0c8b530339 | |||
| b9d6a7458f | |||
| 784ac30847 | |||
| b0e2e58d93 | |||
| 785654a510 | |||
| dafda57a0e | |||
| 9cc4d4a988 | |||
| fadbe2b59f | |||
| c11112b066 | |||
| f33f57f6a7 | |||
| c3babf2c4d | |||
| 04610aa678 | |||
| 596b2a68bf | |||
| 5bacfa37d4 | |||
| a5ac9fb038 | |||
| 1cd6750710 | |||
| b745bb8482 | |||
| 9a9dc780e4 | |||
| 3208f2b8a3 | |||
| 7048001c0c | |||
| 44b6bf04d5 | |||
| e50422d7a7 | |||
| 75f33e37d7 | |||
| 17751bd0ab | |||
| 82d68ed669 | |||
| 09fce43c98 | |||
| 9895757c92 | |||
| bce9cc42e8 | |||
| 9a9a743945 | |||
| 6de1aabe80 | |||
| 3ea3e0a9af | |||
| 56da3dc9ff | |||
| 2bfa643373 | |||
| 5e52e1db7c | |||
| acd1967b1f |
24
pom.xml
24
pom.xml
@ -21,6 +21,12 @@
|
|||||||
<!-- 数据<E695B0>?-->
|
<!-- 数据<E695B0>?-->
|
||||||
</properties>
|
</properties>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>net.java.dev.jna</groupId>
|
||||||
|
<artifactId>jna</artifactId>
|
||||||
|
<version>5.4.0</version>
|
||||||
|
</dependency>
|
||||||
<!-- spring核心<E6A0B8>?-->
|
<!-- spring核心<E6A0B8>?-->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework</groupId>
|
<groupId>org.springframework</groupId>
|
||||||
@ -781,11 +787,11 @@
|
|||||||
<version>1.6.1</version>
|
<version>1.6.1</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- jna -->
|
<!-- jna -->
|
||||||
<dependency>
|
<!-- <dependency>-->
|
||||||
<groupId>net.java.dev.jna</groupId>
|
<!-- <groupId>net.java.dev.jna</groupId>-->
|
||||||
<artifactId>jna</artifactId>
|
<!-- <artifactId>jna</artifactId>-->
|
||||||
<version>1.0</version>
|
<!-- <version>1.0</version>-->
|
||||||
</dependency>
|
<!-- </dependency>-->
|
||||||
<!-- jna examples -->
|
<!-- jna examples -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>net.java.dev.jna</groupId>
|
<groupId>net.java.dev.jna</groupId>
|
||||||
@ -796,6 +802,14 @@
|
|||||||
<build>
|
<build>
|
||||||
<finalName>TGLW</finalName>
|
<finalName>TGLW</finalName>
|
||||||
<resources>
|
<resources>
|
||||||
|
<!-- <resource>-->
|
||||||
|
<!-- <directory>libs/win64</directory>-->
|
||||||
|
<!-- <targetPath>win64</targetPath>-->
|
||||||
|
<!-- <includes>-->
|
||||||
|
<!-- <include>*.dll</include>-->
|
||||||
|
<!-- </includes>-->
|
||||||
|
<!-- <filtering>false</filtering>-->
|
||||||
|
<!-- </resource>-->
|
||||||
<resource>
|
<resource>
|
||||||
<directory>src/main/java</directory>
|
<directory>src/main/java</directory>
|
||||||
<includes>
|
<includes>
|
||||||
|
|||||||
@ -1,9 +0,0 @@
|
|||||||
package com.sipai.activiti;
|
|
||||||
|
|
||||||
public class Test {
|
|
||||||
public static void main(String[] args) {
|
|
||||||
int a = 3;
|
|
||||||
int b = 3;
|
|
||||||
System.out.println(a % b);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -369,7 +369,9 @@ public class AlarmPointController {
|
|||||||
this.mPointService.updateLalarmmin(alarmPoint.getUnitId(), mPoint.getMpointcode());
|
this.mPointService.updateLalarmmin(alarmPoint.getUnitId(), mPoint.getMpointcode());
|
||||||
// mPoint.setLalarmmin(null);
|
// mPoint.setLalarmmin(null);
|
||||||
}
|
}
|
||||||
// this.mPointService.update2(alarmPoint.getUnitId(),mPoint);
|
// Enable TriggerAlarm to allow ScadaAlarmJob to process this MPoint
|
||||||
|
mPoint.setTriggeralarm("1");
|
||||||
|
this.mPointService.update2(alarmPoint.getUnitId(), mPoint);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (code == Result.SUCCESS) {
|
if (code == Result.SUCCESS) {
|
||||||
|
|||||||
@ -197,16 +197,15 @@ public class ProAlarmController {
|
|||||||
// Iterator<String> sIterator = jsonObject.keys();
|
// Iterator<String> sIterator = jsonObject.keys();
|
||||||
|
|
||||||
JSONArray arr = new JSONArray();
|
JSONArray arr = new JSONArray();
|
||||||
List<XServer> allxServerList = this.xServerService.selectListByWhere(" where 1=1 ");
|
// List<XServer> allxServerList = this.xServerService.selectListByWhere(" where 1=1 ");
|
||||||
for (XServer xServer :
|
// for (XServer xServer : allxServerList) {
|
||||||
allxServerList) {
|
|
||||||
// if (jsonObject.get(xServer.getBizid()) != null) {
|
// if (jsonObject.get(xServer.getBizid()) != null) {
|
||||||
// String code_value = jsonObject.get(xServer.getBizid()).toString();
|
// String code_value = jsonObject.get(xServer.getBizid()).toString();
|
||||||
// code_value = code_value + ",data_stop_alarm";
|
// code_value = code_value + ",data_stop_alarm";
|
||||||
// code_value = code_value.replace(",", "','");
|
// code_value = code_value.replace(",", "','");
|
||||||
// List<ProAlarm> list = this.proAlarmService.selectListByWhere(xServer.getBizid(), wherestr + " and point_code in ('" + code_value + "')"
|
// List<ProAlarm> list = this.proAlarmService.selectListByWhere(xServer.getBizid(), wherestr + " and point_code in ('" + code_value + "')"
|
||||||
// + orderstr);
|
// + orderstr);
|
||||||
List<ProAlarm> list = this.proAlarmService.selectListByWhere(xServer.getBizid(), wherestr + orderstr);
|
List<ProAlarm> list = this.proAlarmService.selectListByWhere(companyId, wherestr + orderstr);
|
||||||
// System.out.println(wherestr + " and point_code in ('" + code_value + "')");
|
// System.out.println(wherestr + " and point_code in ('" + code_value + "')");
|
||||||
if (list != null && list.size() > 0) {
|
if (list != null && list.size() > 0) {
|
||||||
for (int i = 0; i < list.size(); i++) {
|
for (int i = 0; i < list.size(); i++) {
|
||||||
@ -249,7 +248,7 @@ public class ProAlarmController {
|
|||||||
}
|
}
|
||||||
// }
|
// }
|
||||||
|
|
||||||
}
|
// }
|
||||||
model.addAttribute("result", arr);
|
model.addAttribute("result", arr);
|
||||||
return new ModelAndView("result");
|
return new ModelAndView("result");
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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(",","','");
|
||||||
|
|||||||
@ -2217,12 +2217,27 @@ public class EquipmentCardController {
|
|||||||
HttpServletResponse response, Model model) throws IOException {
|
HttpServletResponse response, Model model) throws IOException {
|
||||||
String wherestr = " where 1=1 ";
|
String wherestr = " where 1=1 ";
|
||||||
String unitId = request.getParameter("unitId");
|
String unitId = request.getParameter("unitId");
|
||||||
|
if (unitId == null || unitId.isEmpty()) {
|
||||||
|
unitId = request.getParameter("companyId");
|
||||||
|
}
|
||||||
String search_name = request.getParameter("search_name");
|
String search_name = request.getParameter("search_name");
|
||||||
|
if (search_name == null || search_name.trim().isEmpty()) {
|
||||||
|
search_name = request.getParameter("equipmentName");
|
||||||
|
}
|
||||||
String processSectionId = request.getParameter("processSectionId");
|
String processSectionId = request.getParameter("processSectionId");
|
||||||
|
if (processSectionId == null || processSectionId.trim().isEmpty() || "undefined".equals(processSectionId)) {
|
||||||
|
processSectionId = request.getParameter("processSection");
|
||||||
|
}
|
||||||
String equipmentClassId = request.getParameter("equipmentClassId");
|
String equipmentClassId = request.getParameter("equipmentClassId");
|
||||||
|
if (equipmentClassId == null || equipmentClassId.trim().isEmpty() || "undefined".equals(equipmentClassId)) {
|
||||||
|
equipmentClassId = request.getParameter("search_pid1");
|
||||||
|
}
|
||||||
String equipmentLevel = request.getParameter("equipmentLevel");
|
String equipmentLevel = request.getParameter("equipmentLevel");
|
||||||
String equipmentClassCode = request.getParameter("equipmentClassCode");//类似竹一的计量表 该页面仅显示一种设备类型的
|
String equipmentClassCode = request.getParameter("equipmentClassCode");//类似竹一的计量表 该页面仅显示一种设备类型的
|
||||||
String ids = request.getParameter("ids");//页面勾选的设备id
|
String ids = request.getParameter("ids");//页面勾选的设备id
|
||||||
|
if (ids == null || ids.trim().isEmpty()) {
|
||||||
|
ids = request.getParameter("equipmentIds");
|
||||||
|
}
|
||||||
|
|
||||||
if (unitId != null && !unitId.isEmpty()) {
|
if (unitId != null && !unitId.isEmpty()) {
|
||||||
//获取公司下所有子节点
|
//获取公司下所有子节点
|
||||||
@ -2272,6 +2287,26 @@ public class EquipmentCardController {
|
|||||||
|
|
||||||
// System.out.println(wherestr);
|
// System.out.println(wherestr);
|
||||||
|
|
||||||
|
if (ids != null && !ids.trim().isEmpty()) {
|
||||||
|
// 兼容前端可能携带的首尾逗号与空白,确保仅导出选中设备。
|
||||||
|
String[] idArr = ids.split(",");
|
||||||
|
StringBuilder selectedIds = new StringBuilder();
|
||||||
|
for (String id : idArr) {
|
||||||
|
if (id != null) {
|
||||||
|
String trimmedId = id.trim();
|
||||||
|
if (!trimmedId.isEmpty()) {
|
||||||
|
if (selectedIds.length() > 0) {
|
||||||
|
selectedIds.append("','");
|
||||||
|
}
|
||||||
|
selectedIds.append(trimmedId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (selectedIds.length() > 0) {
|
||||||
|
wherestr += " and id in ('" + selectedIds + "') ";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
List<EquipmentCard> equipmentCards = this.equipmentCardService.selectListByWhere(wherestr);
|
List<EquipmentCard> equipmentCards = this.equipmentCardService.selectListByWhere(wherestr);
|
||||||
//导出文件到指定目录,兼容Linux
|
//导出文件到指定目录,兼容Linux
|
||||||
this.equipmentCardService.downloadEquipmentExcel(response, equipmentCards);
|
this.equipmentCardService.downloadEquipmentExcel(response, equipmentCards);
|
||||||
@ -5696,6 +5731,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");
|
||||||
|
|||||||
@ -37,6 +37,7 @@ import org.activiti.engine.history.HistoricTaskInstance;
|
|||||||
import org.activiti.engine.impl.pvm.process.ActivityImpl;
|
import org.activiti.engine.impl.pvm.process.ActivityImpl;
|
||||||
import org.activiti.engine.runtime.ProcessInstance;
|
import org.activiti.engine.runtime.ProcessInstance;
|
||||||
import org.activiti.engine.task.Task;
|
import org.activiti.engine.task.Task;
|
||||||
|
import org.apache.commons.collections.CollectionUtils;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
import org.springframework.ui.Model;
|
import org.springframework.ui.Model;
|
||||||
@ -356,7 +357,9 @@ public class MaintenancePlanController {
|
|||||||
model.addAttribute("nowDate", CommUtil.nowDate());
|
model.addAttribute("nowDate", CommUtil.nowDate());
|
||||||
String maintenancePlanId = pInstance.getBusinessKey();
|
String maintenancePlanId = pInstance.getBusinessKey();
|
||||||
List<BusinessUnitAudit> list = this.businessUnitAuditService.selectListByWhere("where businessId = '" + maintenancePlanId + "' order by insdt desc ");
|
List<BusinessUnitAudit> list = this.businessUnitAuditService.selectListByWhere("where businessId = '" + maintenancePlanId + "' order by insdt desc ");
|
||||||
model.addAttribute("businessUnitAudit", list.get(0));
|
if (CollectionUtils.isNotEmpty(list)){
|
||||||
|
model.addAttribute("businessUnitAudit", list.get(0));
|
||||||
|
}
|
||||||
MaintenancePlan maintenancePlan = this.maintenancePlanService.selectById(maintenancePlanId);
|
MaintenancePlan maintenancePlan = this.maintenancePlanService.selectById(maintenancePlanId);
|
||||||
model.addAttribute("maintenancePlan", maintenancePlan);
|
model.addAttribute("maintenancePlan", maintenancePlan);
|
||||||
EquipmentPlan equipmentPlan = this.equipmentPlanService.selectById(maintenancePlanId);
|
EquipmentPlan equipmentPlan = this.equipmentPlanService.selectById(maintenancePlanId);
|
||||||
|
|||||||
@ -104,7 +104,7 @@ public class KpiPlanController {
|
|||||||
if (StringUtils.isNotBlank(positonTypeList)) {
|
if (StringUtils.isNotBlank(positonTypeList)) {
|
||||||
wherestr += " and j.level_type = " + positonTypeList;
|
wherestr += " and j.level_type = " + positonTypeList;
|
||||||
}
|
}
|
||||||
wherestr += "and p.create_user_id ='" + id + "'";
|
wherestr += " and p.create_user_id ='" + id + "'";
|
||||||
PageHelper.startPage(page, rows);
|
PageHelper.startPage(page, rows);
|
||||||
List<KpiPlan> list = kpiPlanService.selectListByWhere(wherestr + orderstr);
|
List<KpiPlan> list = kpiPlanService.selectListByWhere(wherestr + orderstr);
|
||||||
|
|
||||||
@ -387,7 +387,8 @@ public class KpiPlanController {
|
|||||||
@RequestMapping("/export.do")
|
@RequestMapping("/export.do")
|
||||||
public void export(HttpServletRequest request, HttpServletResponse response,
|
public void export(HttpServletRequest request, HttpServletResponse response,
|
||||||
@RequestParam(value = "periodTypeName", required = false) String periodTypeList,
|
@RequestParam(value = "periodTypeName", required = false) String periodTypeList,
|
||||||
@RequestParam(value = "positionType", required = false) String positonTypeList) throws IOException {
|
@RequestParam(value = "positionType", required = false) String positonTypeList,
|
||||||
|
@RequestParam(value = "ids", required = false) String ids) throws IOException {
|
||||||
// 摘自列表查询接口 start
|
// 摘自列表查询接口 start
|
||||||
User cu = (User) request.getSession().getAttribute("cu");
|
User cu = (User) request.getSession().getAttribute("cu");
|
||||||
String id = cu.getId();
|
String id = cu.getId();
|
||||||
@ -399,6 +400,10 @@ public class KpiPlanController {
|
|||||||
if (StringUtils.isNotBlank(positonTypeList) && !"null".equals(positonTypeList)) {
|
if (StringUtils.isNotBlank(positonTypeList) && !"null".equals(positonTypeList)) {
|
||||||
wherestr += " and j.level_type = " + positonTypeList;
|
wherestr += " and j.level_type = " + positonTypeList;
|
||||||
}
|
}
|
||||||
|
if (StringUtils.isNotBlank(ids)) {
|
||||||
|
String idstr = ids.replace("'", "").replace(",", "','");
|
||||||
|
wherestr += " and p.id in ('" + idstr + "')";
|
||||||
|
}
|
||||||
wherestr += "and p.create_user_id ='" + id + "'";
|
wherestr += "and p.create_user_id ='" + id + "'";
|
||||||
|
|
||||||
List<KpiPlan> list = kpiPlanService.selectListByWhere(wherestr + orderstr);
|
List<KpiPlan> list = kpiPlanService.selectListByWhere(wherestr + orderstr);
|
||||||
|
|||||||
@ -279,10 +279,8 @@ public class EquipmentPlanController {
|
|||||||
if (company != null) {
|
if (company != null) {
|
||||||
model.addAttribute("companyName", company.getSname());
|
model.addAttribute("companyName", company.getSname());
|
||||||
}
|
}
|
||||||
User user = userService.getUserById(equipmentPlan.getAuditId());
|
String userNames = userService.getUserNamesByUserIds(equipmentPlan.getAuditId());
|
||||||
if (user != null) {
|
model.addAttribute("userName", userNames);
|
||||||
model.addAttribute("userName", user.getCaption());
|
|
||||||
}
|
|
||||||
EquipmentPlanType equipmentPlanType_big = equipmentPlanTypeService.selectById(equipmentPlan.getPlanTypeBig());
|
EquipmentPlanType equipmentPlanType_big = equipmentPlanTypeService.selectById(equipmentPlan.getPlanTypeBig());
|
||||||
if (equipmentPlanType_big != null) {
|
if (equipmentPlanType_big != null) {
|
||||||
model.addAttribute("planTypeBigName", equipmentPlanType_big.getName());
|
model.addAttribute("planTypeBigName", equipmentPlanType_big.getName());
|
||||||
@ -308,10 +306,8 @@ public class EquipmentPlanController {
|
|||||||
if (company != null) {
|
if (company != null) {
|
||||||
model.addAttribute("companyName", company.getSname());
|
model.addAttribute("companyName", company.getSname());
|
||||||
}
|
}
|
||||||
User user = userService.getUserById(equipmentPlan.getAuditId());
|
String userNames = userService.getUserNamesByUserIds(equipmentPlan.getAuditId());
|
||||||
if (user != null) {
|
model.addAttribute("userName", userNames);
|
||||||
model.addAttribute("userName", user.getCaption());
|
|
||||||
}
|
|
||||||
EquipmentPlanType equipmentPlanType_big = equipmentPlanTypeService.selectById(equipmentPlan.getPlanTypeBig());
|
EquipmentPlanType equipmentPlanType_big = equipmentPlanTypeService.selectById(equipmentPlan.getPlanTypeBig());
|
||||||
if (equipmentPlanType_big != null) {
|
if (equipmentPlanType_big != null) {
|
||||||
model.addAttribute("planTypeBigName", equipmentPlanType_big.getName());
|
model.addAttribute("planTypeBigName", equipmentPlanType_big.getName());
|
||||||
@ -422,10 +418,8 @@ public class EquipmentPlanController {
|
|||||||
if (company != null) {
|
if (company != null) {
|
||||||
model.addAttribute("companyName", company.getSname());
|
model.addAttribute("companyName", company.getSname());
|
||||||
}
|
}
|
||||||
User user = userService.getUserById(equipmentPlan.getAuditId());
|
String userNames = userService.getUserNamesByUserIds(equipmentPlan.getAuditId());
|
||||||
if (user != null) {
|
model.addAttribute("userName", userNames);
|
||||||
model.addAttribute("userName", user.getCaption());
|
|
||||||
}
|
|
||||||
EquipmentPlanType equipmentPlanType_big = equipmentPlanTypeService.selectById(equipmentPlan.getPlanTypeBig());
|
EquipmentPlanType equipmentPlanType_big = equipmentPlanTypeService.selectById(equipmentPlan.getPlanTypeBig());
|
||||||
if (equipmentPlanType_big != null) {
|
if (equipmentPlanType_big != null) {
|
||||||
model.addAttribute("planTypeBigName", equipmentPlanType_big.getName());
|
model.addAttribute("planTypeBigName", equipmentPlanType_big.getName());
|
||||||
|
|||||||
@ -123,7 +123,9 @@ public class PipelineDataController {
|
|||||||
@RequestMapping("/deletes.do")
|
@RequestMapping("/deletes.do")
|
||||||
public String dodeletes(HttpServletRequest request, Model model,
|
public String dodeletes(HttpServletRequest request, Model model,
|
||||||
@RequestParam(value = "ids") String ids) {
|
@RequestParam(value = "ids") String ids) {
|
||||||
int result = this.pipelineDataService.deleteByWhere("where id in (" + ids + ")");
|
// 移除末尾逗号,防止SQL语法错误
|
||||||
|
String cleanIds = ids.replaceAll("[,\\s]+$", "").replaceAll("^[,\\s]+", "");
|
||||||
|
int result = this.pipelineDataService.deleteByWhere("where id in (" + cleanIds + ")");
|
||||||
model.addAttribute("result", result);
|
model.addAttribute("result", result);
|
||||||
return "result";
|
return "result";
|
||||||
}
|
}
|
||||||
|
|||||||
@ -374,6 +374,16 @@ public class RptCreateController {
|
|||||||
@RequestMapping("/doadd.do")
|
@RequestMapping("/doadd.do")
|
||||||
public String doadd(HttpServletRequest request, Model model) {
|
public String doadd(HttpServletRequest request, Model model) {
|
||||||
User cu = (User) request.getSession().getAttribute("cu");
|
User cu = (User) request.getSession().getAttribute("cu");
|
||||||
|
String rptsetId = request.getParameter("rptsetId");
|
||||||
|
|
||||||
|
// 权限验证:检查用户是否有报表生成权限
|
||||||
|
if (rptsetId != null && !rptsetId.isEmpty()) {
|
||||||
|
if (!this.rptCreateService.checkGeneratePermission(rptsetId, cu)) {
|
||||||
|
model.addAttribute("result", "{\"res\":\"您没有该报表的生成权限\",\"msg\":\"您没有该报表的生成权限\"}");
|
||||||
|
return "result";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
request.setAttribute("userId", cu.getId());
|
request.setAttribute("userId", cu.getId());
|
||||||
request.setAttribute("userName", cu.getCaption());
|
request.setAttribute("userName", cu.getCaption());
|
||||||
request.setAttribute("id", CommUtil.getUUID());
|
request.setAttribute("id", CommUtil.getUUID());
|
||||||
@ -432,6 +442,14 @@ public class RptCreateController {
|
|||||||
String rptsetId = request.getParameter("rptsetId");
|
String rptsetId = request.getParameter("rptsetId");
|
||||||
int result = 0;
|
int result = 0;
|
||||||
|
|
||||||
|
// 权限验证:检查用户是否有报表生成权限
|
||||||
|
if (rptCreate.getRptsetId() != null && !rptCreate.getRptsetId().isEmpty()) {
|
||||||
|
if (!this.rptCreateService.checkGeneratePermission(rptCreate.getRptsetId(), cu)) {
|
||||||
|
model.addAttribute("result", "{\"res\":\"您没有该报表的生成权限\",\"msg\":\"您没有该报表的生成权限\"}");
|
||||||
|
return new ModelAndView("result");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
RptInfoSet rptInfoSet = rptInfoSetService.selectById(rptCreate.getRptsetId());
|
RptInfoSet rptInfoSet = rptInfoSetService.selectById(rptCreate.getRptsetId());
|
||||||
if (rptInfoSet != null) {
|
if (rptInfoSet != null) {
|
||||||
//日报
|
//日报
|
||||||
@ -545,6 +563,15 @@ public class RptCreateController {
|
|||||||
User cu = (User) request.getSession().getAttribute("cu");
|
User cu = (User) request.getSession().getAttribute("cu");
|
||||||
String rptsetId = request.getParameter("rptsetId");
|
String rptsetId = request.getParameter("rptsetId");
|
||||||
int result = 0;
|
int result = 0;
|
||||||
|
|
||||||
|
// 权限验证:检查用户是否有报表生成权限
|
||||||
|
if (rptCreate.getRptsetId() != null && !rptCreate.getRptsetId().isEmpty()) {
|
||||||
|
if (!this.rptCreateService.checkGeneratePermission(rptCreate.getRptsetId(), cu)) {
|
||||||
|
model.addAttribute("result", "{\"res\":\"您没有该报表的生成权限\",\"msg\":\"您没有该报表的生成权限\"}");
|
||||||
|
return new ModelAndView("result");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
RptInfoSet rptInfoSet = rptInfoSetService.selectById(rptCreate.getRptsetId());
|
RptInfoSet rptInfoSet = rptInfoSetService.selectById(rptCreate.getRptsetId());
|
||||||
if (rptInfoSet != null) {
|
if (rptInfoSet != null) {
|
||||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||||
@ -750,13 +777,26 @@ public class RptCreateController {
|
|||||||
@RequestMapping("/getSheet.do")
|
@RequestMapping("/getSheet.do")
|
||||||
public String getSheet(HttpServletRequest request, Model model,
|
public String getSheet(HttpServletRequest request, Model model,
|
||||||
@RequestParam(value = "id") String id) {
|
@RequestParam(value = "id") String id) {
|
||||||
|
String path = "";
|
||||||
|
String name = "";
|
||||||
Result_Report result1 = new Result_Report();
|
Result_Report result1 = new Result_Report();
|
||||||
RptCreate rptCreate = this.rptCreateService.selectById(id);
|
RptCreate rptCreate = this.rptCreateService.selectById(id);
|
||||||
if (rptCreate != null) {//报表生成中的预览
|
if (rptCreate != null) {//报表生成中的预览
|
||||||
|
// 优先使用数据库中存储的文件路径,如果没有则构造路径(兼容旧数据)
|
||||||
|
if (rptCreate.getAbspath() != null && !rptCreate.getAbspath().isEmpty()) {
|
||||||
|
path = rptCreate.getAbspath();
|
||||||
|
} else {
|
||||||
|
path = rptCreate.getRptname() + rptCreate.getId() + ".xls";
|
||||||
|
}
|
||||||
|
// 获取文件扩展名
|
||||||
|
String extension = ".xls";
|
||||||
|
if (path.toLowerCase().endsWith(".xlsx")) {
|
||||||
|
extension = ".xlsx";
|
||||||
|
}
|
||||||
|
String sourcePath = rptCreate.getRptname() + extension;
|
||||||
List<RptInfoSetSheet> list = rptInfoSetSheetService.selectListByWhere("where rptInfoSet_id = '" + rptCreate.getRptsetId() + "'");
|
List<RptInfoSetSheet> list = rptInfoSetSheetService.selectListByWhere("where rptInfoSet_id = '" + rptCreate.getRptsetId() + "'");
|
||||||
try {
|
try {
|
||||||
String sourcePath = rptCreate.getRptname();
|
byte[] isb = commonFileService.getInputStreamBytes(FileNameSpaceEnum.RptCreateFile.getNameSpace(), path);
|
||||||
byte[] isb = commonFileService.getInputStreamBytes(FileNameSpaceEnum.RptCreateFile.getNameSpace(), CommUtil.fixRptCreateFileName(rptCreate.getRptname() + rptCreate.getId()));
|
|
||||||
if (isb == null || isb.length == 0) {
|
if (isb == null || isb.length == 0) {
|
||||||
result1 = Result_Report.failed("文件不存在或已被删除");
|
result1 = Result_Report.failed("文件不存在或已被删除");
|
||||||
model.addAttribute("result", CommUtil.toJson(result1));
|
model.addAttribute("result", CommUtil.toJson(result1));
|
||||||
@ -774,7 +814,7 @@ public class RptCreateController {
|
|||||||
List<RptInfoSetSheet> list = rptInfoSetSheetService.selectListByWhere("where rptInfoSet_id = '" + rptInfoSetFile.getMasterid() + "'");
|
List<RptInfoSetSheet> list = rptInfoSetSheetService.selectListByWhere("where rptInfoSet_id = '" + rptInfoSetFile.getMasterid() + "'");
|
||||||
try {
|
try {
|
||||||
String sourcePath = "";
|
String sourcePath = "";
|
||||||
String path = rptInfoSetFile.getAbspath();
|
path = rptInfoSetFile.getAbspath();
|
||||||
// path = path.replaceAll("\\.xlsx", "").replaceAll("\\.xls", "");
|
// path = path.replaceAll("\\.xlsx", "").replaceAll("\\.xls", "");
|
||||||
// byte[] isb = commonFileService.getInputStreamBytes(FileNameSpaceEnum.RptInfoSetFile.getNameSpace(), CommUtil.fixRptCreateFileName(path));
|
// byte[] isb = commonFileService.getInputStreamBytes(FileNameSpaceEnum.RptInfoSetFile.getNameSpace(), CommUtil.fixRptCreateFileName(path));
|
||||||
byte[] isb = commonFileService.getInputStreamBytes(FileNameSpaceEnum.RptInfoSetFile.getNameSpace(), path);
|
byte[] isb = commonFileService.getInputStreamBytes(FileNameSpaceEnum.RptInfoSetFile.getNameSpace(), path);
|
||||||
@ -850,8 +890,18 @@ public class RptCreateController {
|
|||||||
String name = "";
|
String name = "";
|
||||||
RptCreate rptCreate = this.rptCreateService.selectById(id);
|
RptCreate rptCreate = this.rptCreateService.selectById(id);
|
||||||
if (rptCreate != null) {
|
if (rptCreate != null) {
|
||||||
path = rptCreate.getRptname() + rptCreate.getId() + ".xls";
|
// 优先使用数据库中存储的文件路径,如果没有则构造路径(兼容旧数据)
|
||||||
name = rptCreate.getRptname() + ".xls";
|
if (rptCreate.getAbspath() != null && !rptCreate.getAbspath().isEmpty()) {
|
||||||
|
path = rptCreate.getAbspath();
|
||||||
|
} else {
|
||||||
|
path = rptCreate.getRptname() + rptCreate.getId() + ".xls";
|
||||||
|
}
|
||||||
|
// 获取文件扩展名
|
||||||
|
String extension = ".xls";
|
||||||
|
if (path.toLowerCase().endsWith(".xlsx")) {
|
||||||
|
extension = ".xlsx";
|
||||||
|
}
|
||||||
|
name = rptCreate.getRptname() + extension;
|
||||||
}
|
}
|
||||||
byte[] bytes = commonFileService.getInputStreamBytes(FileNameSpaceEnum.RptCreateFile.getNameSpace(), path);
|
byte[] bytes = commonFileService.getInputStreamBytes(FileNameSpaceEnum.RptCreateFile.getNameSpace(), path);
|
||||||
if (bytes == null || bytes.length == 0) {
|
if (bytes == null || bytes.length == 0) {
|
||||||
|
|||||||
@ -122,7 +122,14 @@ public class RptDayLogController {
|
|||||||
@RequestParam(value = "rptdt") String rptdt) throws IOException {
|
@RequestParam(value = "rptdt") String rptdt) throws IOException {
|
||||||
User cu = (User) request.getSession().getAttribute("cu");
|
User cu = (User) request.getSession().getAttribute("cu");
|
||||||
String userId = cu.getId();
|
String userId = cu.getId();
|
||||||
|
|
||||||
|
// 权限验证:检查用户是否有填报权限
|
||||||
|
// if (!this.rptDayLogService.checkInputPermission(rptdeptId, cu)) {
|
||||||
|
// Result result = Result.failed("您没有该报表的填报权限");
|
||||||
|
// model.addAttribute("result", CommUtil.toJson(result));
|
||||||
|
// return "result";
|
||||||
|
// }
|
||||||
|
|
||||||
JSONObject jsonObject = this.rptDayLogService.getJson(null,rptdeptId,rptdt,userId);
|
JSONObject jsonObject = this.rptDayLogService.getJson(null,rptdeptId,rptdt,userId);
|
||||||
|
|
||||||
Result result = Result.success(jsonObject);
|
Result result = Result.success(jsonObject);
|
||||||
@ -149,6 +156,14 @@ public class RptDayLogController {
|
|||||||
@RequestParam(value = "rptdeptId") String rptdeptId) throws IOException {
|
@RequestParam(value = "rptdeptId") String rptdeptId) throws IOException {
|
||||||
User cu = (User) request.getSession().getAttribute("cu");
|
User cu = (User) request.getSession().getAttribute("cu");
|
||||||
String userId = cu.getId();
|
String userId = cu.getId();
|
||||||
|
|
||||||
|
// 权限验证:检查用户是否有填报权限
|
||||||
|
if (!this.rptDayLogService.checkInputPermission(rptdeptId, cu)) {
|
||||||
|
Result result = Result.failed("您没有该报表的填报权限");
|
||||||
|
model.addAttribute("result", CommUtil.toJson(result));
|
||||||
|
return "result";
|
||||||
|
}
|
||||||
|
|
||||||
JSONObject jsonObject = this.rptDayLogService.getJson(id,rptdeptId,null,userId);
|
JSONObject jsonObject = this.rptDayLogService.getJson(id,rptdeptId,null,userId);
|
||||||
model.addAttribute("rptDayLog", jsonObject);
|
model.addAttribute("rptDayLog", jsonObject);
|
||||||
// return "/report/reportdetail";
|
// return "/report/reportdetail";
|
||||||
@ -191,11 +206,19 @@ public class RptDayLogController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@RequestMapping("/dosave.do")
|
@RequestMapping("/dosave.do")
|
||||||
public String dosave(HttpServletRequest request,Model model){
|
public ModelAndView dosave(HttpServletRequest request,Model model){
|
||||||
User cu = (User) request.getSession().getAttribute("cu");
|
User cu = (User) request.getSession().getAttribute("cu");
|
||||||
String userId = cu.getId();
|
String userId = cu.getId();
|
||||||
String json = request.getParameter("json");
|
String json = request.getParameter("json");
|
||||||
JSONObject jsonObject = JSONObject.fromObject(json);
|
JSONObject jsonObject = JSONObject.fromObject(json);
|
||||||
|
|
||||||
|
// 权限验证:检查用户是否有填报权限
|
||||||
|
String rptdeptId = (String) jsonObject.get("rptdeptId");
|
||||||
|
if (!this.rptDayLogService.checkInputPermission(rptdeptId, cu)) {
|
||||||
|
model.addAttribute("result", "{\"res\":\"您没有该报表的填报权限\",\"msg\":\"您没有该报表的填报权限\"}");
|
||||||
|
return new ModelAndView("result");
|
||||||
|
}
|
||||||
|
|
||||||
if (jsonObject.get("id")==null||jsonObject.get("id").equals("")) {
|
if (jsonObject.get("id")==null||jsonObject.get("id").equals("")) {
|
||||||
jsonObject.put("id", CommUtil.getUUID());
|
jsonObject.put("id", CommUtil.getUUID());
|
||||||
}
|
}
|
||||||
@ -206,12 +229,12 @@ public class RptDayLogController {
|
|||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
Result result = Result.failed("插入失败");
|
Result result = Result.failed("插入失败");
|
||||||
model.addAttribute("result", CommUtil.toJson(result));
|
model.addAttribute("result", CommUtil.toJson(result));
|
||||||
return "result";
|
return new ModelAndView("result");
|
||||||
}
|
}
|
||||||
|
|
||||||
Result result = Result.success(null);
|
Result result = Result.success(null);
|
||||||
model.addAttribute("result", CommUtil.toJson(result));
|
model.addAttribute("result", CommUtil.toJson(result));
|
||||||
return "result";
|
return new ModelAndView("result");
|
||||||
}
|
}
|
||||||
|
|
||||||
@RequestMapping("/onekeyAudit.do")//一键审核
|
@RequestMapping("/onekeyAudit.do")//一键审核
|
||||||
@ -228,6 +251,29 @@ public class RptDayLogController {
|
|||||||
@RequestMapping("/dodeletes.do")
|
@RequestMapping("/dodeletes.do")
|
||||||
public String dodels(HttpServletRequest request,Model model,
|
public String dodels(HttpServletRequest request,Model model,
|
||||||
@RequestParam(value="ids") String ids){
|
@RequestParam(value="ids") String ids){
|
||||||
|
// User cu = (User) request.getSession().getAttribute("cu");
|
||||||
|
// String userId = cu.getId();
|
||||||
|
|
||||||
|
// 获取rptdeptId,假设从参数或第一个ID推断
|
||||||
|
// String rptdeptId = request.getParameter("rptdeptId");
|
||||||
|
// if (rptdeptId == null || rptdeptId.isEmpty()) {
|
||||||
|
// // 如果没有提供rptdeptId,从第一个ID获取
|
||||||
|
// String[] idArray = ids.split(",");
|
||||||
|
// if (idArray.length > 0) {
|
||||||
|
// RptDayLog rptDayLog = this.rptDayLogService.selectById(idArray[0]);
|
||||||
|
// if (rptDayLog != null) {
|
||||||
|
// rptdeptId = rptDayLog.getRptdeptId();
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// 权限验证:检查用户是否有生成权限
|
||||||
|
// if (!this.rptDayLogService.checkGeneratePermission(rptdeptId, cu)) {
|
||||||
|
// Result result = Result.failed("您没有该报表的删除权限,无法删除");// 生成权限=删除权限
|
||||||
|
// model.addAttribute("result", CommUtil.toJson(result));
|
||||||
|
// return "result";
|
||||||
|
// }
|
||||||
|
|
||||||
String[] idArray = ids.split(",");
|
String[] idArray = ids.split(",");
|
||||||
try {
|
try {
|
||||||
for (int i = 0; i < idArray.length; i++) {
|
for (int i = 0; i < idArray.length; i++) {
|
||||||
@ -268,6 +314,14 @@ public class RptDayLogController {
|
|||||||
@RequestParam(value = "rptdeptId", required=false) String rptdeptId) {
|
@RequestParam(value = "rptdeptId", required=false) String rptdeptId) {
|
||||||
User cu = (User) request.getSession().getAttribute("cu");
|
User cu = (User) request.getSession().getAttribute("cu");
|
||||||
String userId = cu.getId();
|
String userId = cu.getId();
|
||||||
|
|
||||||
|
// 权限验证:检查用户是否有填报权限
|
||||||
|
if (!this.rptDayLogService.checkInputPermission(rptdeptId, cu)) {
|
||||||
|
Result result = Result.failed("您没有该报表的填报权限");
|
||||||
|
model.addAttribute("result", CommUtil.toJson(result));
|
||||||
|
return "result";
|
||||||
|
}
|
||||||
|
|
||||||
MultipartRequest multipartRequest = (MultipartRequest)request;
|
MultipartRequest multipartRequest = (MultipartRequest)request;
|
||||||
|
|
||||||
List<MultipartFile> fileList = multipartRequest.getFiles("filelist");
|
List<MultipartFile> fileList = multipartRequest.getFiles("filelist");
|
||||||
|
|||||||
@ -222,18 +222,50 @@ public class SafetyCertificateController {
|
|||||||
|
|
||||||
@RequestMapping("/deletes.do")
|
@RequestMapping("/deletes.do")
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public String delete(HttpServletRequest request, Model model, String[] ids) throws IOException {
|
public String delete(HttpServletRequest request, Model model,
|
||||||
|
@RequestParam(value = "ids", required = false) String ids,
|
||||||
|
@RequestParam(value = "staffIds", required = false) String staffIds) throws IOException {
|
||||||
int result = 0;
|
int result = 0;
|
||||||
for (String id : ids) {
|
|
||||||
|
// 兼容:支持 ids/staffIds 传 CSV,也支持重复参数数组
|
||||||
|
Set<String> idSet = new LinkedHashSet<>(parseRequestIds(request, "ids", ids));
|
||||||
|
idSet.addAll(parseRequestIds(request, "staffIds", staffIds));
|
||||||
|
|
||||||
|
for (String id : idSet) {
|
||||||
result += service.deleteById(id);
|
result += service.deleteById(id);
|
||||||
}
|
|
||||||
for (String id : ids) {
|
|
||||||
safetyFilesService.deleteByBizId(id);
|
safetyFilesService.deleteByBizId(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
model.addAttribute("result", result);
|
model.addAttribute("result", result);
|
||||||
return "result";
|
return "result";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private List<String> parseRequestIds(HttpServletRequest request, String paramName, String rawIds) {
|
||||||
|
List<String> result = new ArrayList<>(parseIdTokens(rawIds));
|
||||||
|
String[] values = request.getParameterValues(paramName);
|
||||||
|
if (values != null) {
|
||||||
|
for (String value : values) {
|
||||||
|
result.addAll(parseIdTokens(value));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
private List<String> parseIdTokens(String rawIds) {
|
||||||
|
List<String> result = new ArrayList<>();
|
||||||
|
if (org.apache.commons.lang3.StringUtils.isBlank(rawIds) || "null".equals(rawIds)) {
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
String[] split = rawIds.split(",");
|
||||||
|
for (String id : split) {
|
||||||
|
String value = org.apache.commons.lang3.StringUtils.trim(id);
|
||||||
|
if (org.apache.commons.lang3.StringUtils.isNotBlank(value) && value.matches("^[0-9A-Za-z_-]+$")) {
|
||||||
|
result.add(value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 跳转导入页面
|
* 跳转导入页面
|
||||||
*
|
*
|
||||||
|
|||||||
@ -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,8 +156,8 @@ 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("整改负责人不能为空!");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -178,8 +181,8 @@ public class SafetyCheckComprehensiveController {
|
|||||||
SafetyCheckStatusEnum.RESPONSE.getTaskTitle(),
|
SafetyCheckStatusEnum.RESPONSE.getTaskTitle(),
|
||||||
bean.getDutyUserId(), // 当前节点审批人
|
bean.getDutyUserId(), // 当前节点审批人
|
||||||
bean.getDutyUserName(), // 当前节点审批人
|
bean.getDutyUserName(), // 当前节点审批人
|
||||||
null, // 抄送人
|
bean.getCopyUserId(), // 抄送人
|
||||||
null,// 抄送人
|
bean.getCopyUserName(),// 抄送人
|
||||||
null);
|
null);
|
||||||
}
|
}
|
||||||
return Result.success();
|
return Result.success();
|
||||||
@ -232,7 +235,7 @@ public class SafetyCheckComprehensiveController {
|
|||||||
@ResponseBody
|
@ResponseBody
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public Result apply(HttpServletRequest request, SafetyCheckComprehensive bean) throws IOException, ServiceException {
|
public Result apply(HttpServletRequest request, SafetyCheckComprehensive bean) throws IOException, ServiceException {
|
||||||
if(StringUtils.isEmpty(bean.getDutyUserId())){
|
if (StringUtils.isEmpty(bean.getDutyUserId())) {
|
||||||
return Result.failed("整改负责人不能为空!");
|
return Result.failed("整改负责人不能为空!");
|
||||||
}
|
}
|
||||||
update(request, bean);
|
update(request, bean);
|
||||||
@ -336,7 +339,7 @@ public class SafetyCheckComprehensiveController {
|
|||||||
@ResponseBody
|
@ResponseBody
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public Result response(HttpServletRequest request, SafetyCheckComprehensive bean, String processInstanceId) throws IOException, ServiceException {
|
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("验证人不能为空!");
|
return Result.failed("验证人不能为空!");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -374,10 +377,9 @@ public class SafetyCheckComprehensiveController {
|
|||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public Result response(HttpServletRequest request, SafetyCheckComprehensive bean, String processInstanceId, int pass) throws IOException, ServiceException {
|
public Result response(HttpServletRequest request, SafetyCheckComprehensive bean, String processInstanceId, int pass) throws IOException, ServiceException {
|
||||||
|
|
||||||
safetyCheckActivityService.audit(bean.getConfirmUserId(), processInstanceId, pass);
|
|
||||||
|
|
||||||
//通过
|
//通过
|
||||||
if (pass == 1) {
|
if (pass == 1) {
|
||||||
|
safetyCheckActivityService.audit(bean.getConfirmUserId(), processInstanceId, pass);
|
||||||
bean.setStatus(SafetyCheckStatusEnum.COMPLETE.getId());
|
bean.setStatus(SafetyCheckStatusEnum.COMPLETE.getId());
|
||||||
service.update(bean);
|
service.update(bean);
|
||||||
|
|
||||||
@ -388,7 +390,7 @@ public class SafetyCheckComprehensiveController {
|
|||||||
bean.getConfirmUserName(),
|
bean.getConfirmUserName(),
|
||||||
bean.getCopyUserId(),
|
bean.getCopyUserId(),
|
||||||
bean.getCopyUserName(),
|
bean.getCopyUserName(),
|
||||||
SafetyCheckStatusEnum.COMPLETE.getTaskRecordPass( bean.getConfirmUserName()));
|
SafetyCheckStatusEnum.COMPLETE.getTaskRecordPass(bean.getConfirmUserName()));
|
||||||
safetyFlowTaskService.saveWorkFlowRecord(true,
|
safetyFlowTaskService.saveWorkFlowRecord(true,
|
||||||
bean.getId(),
|
bean.getId(),
|
||||||
"结束",
|
"结束",
|
||||||
@ -400,6 +402,7 @@ public class SafetyCheckComprehensiveController {
|
|||||||
}
|
}
|
||||||
//不通过
|
//不通过
|
||||||
else {
|
else {
|
||||||
|
safetyCheckActivityService.audit(bean.getDutyUserId(), processInstanceId, pass);
|
||||||
bean.setStatus(SafetyCheckStatusEnum.APPLY.getId());
|
bean.setStatus(SafetyCheckStatusEnum.APPLY.getId());
|
||||||
service.update(bean);
|
service.update(bean);
|
||||||
safetyFlowTaskService.saveWorkFlowRecord(true,
|
safetyFlowTaskService.saveWorkFlowRecord(true,
|
||||||
|
|||||||
@ -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("整改负责人不能为空!");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -235,8 +236,8 @@ public class SafetyCheckDaylyController {
|
|||||||
SafetyCheckStatusEnum.RESPONSE.getTaskTitle(),
|
SafetyCheckStatusEnum.RESPONSE.getTaskTitle(),
|
||||||
bean.getDutyUserId(), // 当前节点审批人
|
bean.getDutyUserId(), // 当前节点审批人
|
||||||
bean.getDutyUserName(), // 当前节点审批人
|
bean.getDutyUserName(), // 当前节点审批人
|
||||||
null, // 抄送人
|
bean.getCopyUserId(), // 抄送人
|
||||||
null,// 抄送人
|
bean.getCopyUserName(),// 抄送人
|
||||||
null);
|
null);
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -372,10 +373,9 @@ public class SafetyCheckDaylyController {
|
|||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public Result response(HttpServletRequest request, SafetyCheckDayly bean, String processInstanceId, int pass) throws IOException, ServiceException {
|
public Result response(HttpServletRequest request, SafetyCheckDayly bean, String processInstanceId, int pass) throws IOException, ServiceException {
|
||||||
|
|
||||||
safetyCheckActivityService.audit(bean.getConfirmUserId(), processInstanceId, pass);
|
|
||||||
|
|
||||||
//通过
|
//通过
|
||||||
if (pass == 1) {
|
if (pass == 1) {
|
||||||
|
safetyCheckActivityService.audit(bean.getConfirmUserId(), processInstanceId, pass);
|
||||||
bean.setStatus(SafetyCheckStatusEnum.COMPLETE.getId());
|
bean.setStatus(SafetyCheckStatusEnum.COMPLETE.getId());
|
||||||
safetyCheckDaylyService.update(bean);
|
safetyCheckDaylyService.update(bean);
|
||||||
|
|
||||||
@ -399,6 +399,7 @@ public class SafetyCheckDaylyController {
|
|||||||
}
|
}
|
||||||
//不通过
|
//不通过
|
||||||
else {
|
else {
|
||||||
|
safetyCheckActivityService.audit(bean.getDutyUserId(), processInstanceId, pass);
|
||||||
bean.setStatus(SafetyCheckStatusEnum.APPLY.getId());
|
bean.setStatus(SafetyCheckStatusEnum.APPLY.getId());
|
||||||
safetyCheckDaylyService.update(bean);
|
safetyCheckDaylyService.update(bean);
|
||||||
safetyFlowTaskService.saveWorkFlowRecord(true,
|
safetyFlowTaskService.saveWorkFlowRecord(true,
|
||||||
|
|||||||
@ -197,8 +197,8 @@ public class SafetyCheckSpecialController {
|
|||||||
SafetyCheckStatusEnum.RESPONSE.getTaskTitle(),
|
SafetyCheckStatusEnum.RESPONSE.getTaskTitle(),
|
||||||
bean.getDutyUserId(), // 当前节点审批人
|
bean.getDutyUserId(), // 当前节点审批人
|
||||||
bean.getDutyUserName(), // 当前节点审批人
|
bean.getDutyUserName(), // 当前节点审批人
|
||||||
null, // 抄送人
|
bean.getCopyUserId(), // 抄送人
|
||||||
null,// 抄送人
|
bean.getCopyUserName(),// 抄送人
|
||||||
null);
|
null);
|
||||||
}
|
}
|
||||||
return Result.success();
|
return Result.success();
|
||||||
@ -393,10 +393,9 @@ public class SafetyCheckSpecialController {
|
|||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public Result response(HttpServletRequest request, SafetyCheckSpecial bean, String processInstanceId, int pass) throws IOException, ServiceException {
|
public Result response(HttpServletRequest request, SafetyCheckSpecial bean, String processInstanceId, int pass) throws IOException, ServiceException {
|
||||||
|
|
||||||
safetyCheckActivityService.audit(bean.getConfirmUserId(), processInstanceId, pass);
|
|
||||||
|
|
||||||
//通过
|
//通过
|
||||||
if (pass == 1) {
|
if (pass == 1) {
|
||||||
|
safetyCheckActivityService.audit(bean.getConfirmUserId(), processInstanceId, pass);
|
||||||
bean.setStatus(SafetyCheckStatusEnum.COMPLETE.getId());
|
bean.setStatus(SafetyCheckStatusEnum.COMPLETE.getId());
|
||||||
service.update(bean);
|
service.update(bean);
|
||||||
|
|
||||||
@ -419,6 +418,7 @@ public class SafetyCheckSpecialController {
|
|||||||
}
|
}
|
||||||
//不通过
|
//不通过
|
||||||
else {
|
else {
|
||||||
|
safetyCheckActivityService.audit(bean.getDutyUserId(), processInstanceId, pass);
|
||||||
bean.setStatus(SafetyCheckStatusEnum.APPLY.getId());
|
bean.setStatus(SafetyCheckStatusEnum.APPLY.getId());
|
||||||
service.update(bean);
|
service.update(bean);
|
||||||
safetyFlowTaskService.saveWorkFlowRecord(true,
|
safetyFlowTaskService.saveWorkFlowRecord(true,
|
||||||
|
|||||||
@ -66,7 +66,7 @@ public class SafetyEducationTraineeController {
|
|||||||
**/
|
**/
|
||||||
@RequestMapping("/add.do")
|
@RequestMapping("/add.do")
|
||||||
public String add(HttpServletRequest request, Model model) throws Exception {
|
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);
|
model.addAttribute("educationCode", educationCode);
|
||||||
return "safety/EducationTraineeAdd";
|
return "safety/EducationTraineeAdd";
|
||||||
}
|
}
|
||||||
@ -82,9 +82,10 @@ public class SafetyEducationTraineeController {
|
|||||||
SafetyEducationTrainee educationTrainee = safetyEducationTraineeService.selectById(id);
|
SafetyEducationTrainee educationTrainee = safetyEducationTraineeService.selectById(id);
|
||||||
SafetyFiles file = safetyFilesService.selectById(educationTrainee.getFileId());
|
SafetyFiles file = safetyFilesService.selectById(educationTrainee.getFileId());
|
||||||
model.addAttribute("bean", educationTrainee);
|
model.addAttribute("bean", educationTrainee);
|
||||||
model.addAttribute("fileName", file==null?"":file.getOriginalFileName());
|
model.addAttribute("fileName", file == null ? "" : file.getOriginalFileName());
|
||||||
return "safety/EducationTraineeEdit";
|
return "safety/EducationTraineeEdit";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 跳转至编辑弹窗
|
* 跳转至编辑弹窗
|
||||||
*
|
*
|
||||||
@ -96,9 +97,10 @@ public class SafetyEducationTraineeController {
|
|||||||
SafetyEducationTrainee educationTrainee = safetyEducationTraineeService.selectById(id);
|
SafetyEducationTrainee educationTrainee = safetyEducationTraineeService.selectById(id);
|
||||||
SafetyFiles file = safetyFilesService.selectById(educationTrainee.getFileId());
|
SafetyFiles file = safetyFilesService.selectById(educationTrainee.getFileId());
|
||||||
model.addAttribute("bean", educationTrainee);
|
model.addAttribute("bean", educationTrainee);
|
||||||
model.addAttribute("fileName",file==null?"":file.getOriginalFileName());
|
model.addAttribute("fileName", file == null ? "" : file.getOriginalFileName());
|
||||||
return "safety/EducationTraineeView";
|
return "safety/EducationTraineeView";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取分页列表信息
|
* 获取分页列表信息
|
||||||
*
|
*
|
||||||
@ -169,24 +171,24 @@ public class SafetyEducationTraineeController {
|
|||||||
@RequestMapping("/update.do")
|
@RequestMapping("/update.do")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@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)) {
|
if (!safetyEducationTraineeService.timeRangeCheck(bean)) {
|
||||||
return Result.failed("培训有效期早于培训日期!");
|
return Result.failed("培训有效期早于培训日期!");
|
||||||
}
|
}
|
||||||
SafetyEducationTrainee oldBean = safetyEducationTraineeService.selectById(bean.getId());
|
SafetyEducationTrainee oldBean = safetyEducationTraineeService.selectById(bean.getId());
|
||||||
//如果文件id是空的,代表用户重新上传的文件,先删除原来的文件,然后再上传新文件。
|
//如果文件id是空的,代表用户重新上传的文件,先删除原来的文件,然后再上传新文件。
|
||||||
if (StringUtils.isEmpty(bean.getFileId())&&file.getSize()>0) {
|
if (StringUtils.isEmpty(bean.getFileId()) && file.getSize() > 0) {
|
||||||
List<SafetyFiles> fileBeanList = safetyFilesService.upload(request,file, SafetyFunctionEnum.EDUCATION_TRAINEE.getId(), null, bean.getId());
|
List<SafetyFiles> fileBeanList = safetyFilesService.upload(request, file, SafetyFunctionEnum.EDUCATION_TRAINEE.getId(), null, bean.getId());
|
||||||
bean.setFileId(fileBeanList.get(0).getId());
|
bean.setFileId(fileBeanList.get(0).getId());
|
||||||
safetyEducationTraineeService.update(bean);
|
safetyEducationTraineeService.update(bean);
|
||||||
// 删除原来的附件记录
|
// 删除原来的附件记录
|
||||||
safetyFilesService.deleteById(oldBean.getFileId());
|
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);
|
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);
|
||||||
}
|
}
|
||||||
return Result.success();
|
return Result.success();
|
||||||
@ -210,6 +212,7 @@ public class SafetyEducationTraineeController {
|
|||||||
}
|
}
|
||||||
return Result.success();
|
return Result.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除附件
|
* 删除附件
|
||||||
*
|
*
|
||||||
@ -223,8 +226,8 @@ public class SafetyEducationTraineeController {
|
|||||||
SafetyEducationTrainee bean = safetyEducationTraineeService.selectById(id);
|
SafetyEducationTrainee bean = safetyEducationTraineeService.selectById(id);
|
||||||
safetyFilesService.deleteById(bean.getFileId());
|
safetyFilesService.deleteById(bean.getFileId());
|
||||||
bean.setFileId("");
|
bean.setFileId("");
|
||||||
int row = safetyEducationTraineeService.update(bean);
|
int row = safetyEducationTraineeService.update(bean);
|
||||||
if (row!=0) {
|
if (row != 0) {
|
||||||
return Result.success();
|
return Result.success();
|
||||||
}
|
}
|
||||||
return Result.failed("删除失败!");
|
return Result.failed("删除失败!");
|
||||||
|
|||||||
@ -339,18 +339,39 @@ public class SafetyExternalCertificateController {
|
|||||||
|
|
||||||
@RequestMapping("/deletes.do")
|
@RequestMapping("/deletes.do")
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public String delete(HttpServletRequest request, Model model, String[] ids) throws IOException {
|
public String delete(HttpServletRequest request, Model model,
|
||||||
|
@RequestParam(value = "ids", required = false) String ids,
|
||||||
|
@RequestParam(value = "staffIds", required = false) String staffIds) throws IOException {
|
||||||
int result = 0;
|
int result = 0;
|
||||||
for (String id : ids) {
|
|
||||||
|
// 兼容:支持 ids/staffIds 传 CSV,也支持重复参数数组
|
||||||
|
Set<String> certificateIdSet = new LinkedHashSet<>(parseRequestIds(request, "ids", ids));
|
||||||
|
Set<String> staffIdSet = new LinkedHashSet<>(parseRequestIds(request, "staffIds", staffIds));
|
||||||
|
|
||||||
|
for (String id : certificateIdSet) {
|
||||||
result += service.deleteById(id);
|
result += service.deleteById(id);
|
||||||
}
|
|
||||||
for (String id : ids) {
|
|
||||||
safetyFilesService.deleteByBizId(id);
|
safetyFilesService.deleteByBizId(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (String staffId : staffIdSet) {
|
||||||
|
safetyExternalStaffService.deleteById(staffId);
|
||||||
|
}
|
||||||
|
|
||||||
model.addAttribute("result", result);
|
model.addAttribute("result", result);
|
||||||
return "result";
|
return "result";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private List<String> parseRequestIds(HttpServletRequest request, String paramName, String rawIds) {
|
||||||
|
List<String> result = new ArrayList<>(parseExportIds(rawIds));
|
||||||
|
String[] values = request.getParameterValues(paramName);
|
||||||
|
if (values != null) {
|
||||||
|
for (String value : values) {
|
||||||
|
result.addAll(parseExportIds(value));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 跳转导入页面
|
* 跳转导入页面
|
||||||
*
|
*
|
||||||
@ -538,67 +559,61 @@ public class SafetyExternalCertificateController {
|
|||||||
public void export(HttpServletRequest request, HttpServletResponse response,
|
public void export(HttpServletRequest request, HttpServletResponse response,
|
||||||
@RequestParam(value = "issueDate", required = false) String issueDate,
|
@RequestParam(value = "issueDate", required = false) String issueDate,
|
||||||
@RequestParam(value = "jobType", required = false) String jobType,
|
@RequestParam(value = "jobType", required = false) String jobType,
|
||||||
@RequestParam(value = "companyParam", required = false) String companyParam) throws IOException {
|
@RequestParam(value = "companyParam", required = false) String companyParam,
|
||||||
// 摘自列表查询接口 start
|
@RequestParam(value = "search_name", required = false) String searchName,
|
||||||
User cu = (User) request.getSession().getAttribute("cu");
|
@RequestParam(value = "ids", required = false) String ids,
|
||||||
|
@RequestParam(value = "staffIds", required = false) String staffIds) throws IOException {
|
||||||
|
// 与列表接口保持一致,避免“页面有数据但导出为空”
|
||||||
String sort = " sc.userid, sc.create_time ";
|
String sort = " sc.userid, sc.create_time ";
|
||||||
String order = " desc ";
|
String order = " desc ";
|
||||||
String orderstr = " order by " + sort + " " + order;
|
String orderstr = " order by " + sort + " " + order;
|
||||||
String wherestr = " where flag='2' ";
|
String wherestr = " where 1=1 ";
|
||||||
if (request.getParameter("search_code") != null && !request.getParameter("search_code").isEmpty()) {
|
|
||||||
List<Unit> unitlist = unitService.getUnitChildrenById(request.getParameter("search_code"));
|
|
||||||
String pidstr = "";
|
|
||||||
for (int i = 0; i < unitlist.size(); i++) {
|
|
||||||
pidstr += "'" + unitlist.get(i).getId() + "',";
|
|
||||||
}
|
|
||||||
if (pidstr != "") {
|
|
||||||
pidstr = pidstr.substring(0, pidstr.length() - 1);
|
|
||||||
wherestr += "and u.pid in (" + pidstr + ") ";
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Company company = unitService.getCompanyByUserId(cu.getId());
|
|
||||||
String companyId = "-1";
|
|
||||||
if (company != null) {
|
|
||||||
companyId = company.getId();
|
|
||||||
}
|
|
||||||
List<User> users = unitService.getChildrenUsersById(companyId);
|
|
||||||
String userIds = "";
|
|
||||||
for (User user : users) {
|
|
||||||
if (!userIds.isEmpty()) {
|
|
||||||
userIds += "','";
|
|
||||||
}
|
|
||||||
userIds += user.getId();
|
|
||||||
}
|
|
||||||
if (!userIds.isEmpty()) {
|
|
||||||
wherestr += "and u.id in ('" + userIds + "') ";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 搜索框筛选
|
// 搜索框筛选
|
||||||
if (request.getParameter("search_name") != null && !request.getParameter("search_name").isEmpty()) {
|
if (StringUtils.isNotBlank(searchName)) {
|
||||||
wherestr += " and (sc.certificate_name like '%" + request.getParameter("search_name") + "%'" +
|
wherestr += " and (sc.certificate_name like '%" + searchName + "%'" +
|
||||||
" or ses.name like '%" + request.getParameter("search_name") + "%')";
|
" or ses.name like '%" + searchName + "%')";
|
||||||
}
|
}
|
||||||
|
|
||||||
// 领证时间筛选
|
// 领证时间筛选
|
||||||
if (StringUtils.isNotBlank(issueDate) && !"null".equals(issueDate)) {
|
if (StringUtils.isNotBlank(issueDate) && !"null".equals(issueDate)) {
|
||||||
String[] split = issueDate.split("~");
|
String[] split = issueDate.split("~");
|
||||||
String issueDate_param_start_time = split[0].trim();
|
if (split.length == 2) {
|
||||||
String issueDate_param_end_time = split[1].trim();
|
String issueDate_param_start_time = split[0].trim();
|
||||||
wherestr += " and sc.issue_date >= '" + issueDate_param_start_time + "'" +
|
String issueDate_param_end_time = split[1].trim();
|
||||||
" and sc.issue_date <= '" + issueDate_param_end_time + "'";
|
wherestr += " and sc.issue_date >= '" + issueDate_param_start_time + "'" +
|
||||||
|
" and sc.issue_date <= '" + issueDate_param_end_time + "'";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//作业类型
|
// 作业类型
|
||||||
if (StringUtils.isNotBlank(jobType) && !"null".equals(jobType)) {
|
if (StringUtils.isNotBlank(jobType) && !"null".equals(jobType)) {
|
||||||
wherestr += " and sc.job_type = '" + jobType + "'";
|
wherestr += " and sc.job_type = '" + jobType + "'";
|
||||||
}
|
}
|
||||||
|
|
||||||
//施工单位
|
// 施工单位
|
||||||
if (StringUtils.isNotBlank(companyParam) && !"null".equals(companyParam)) {
|
if (StringUtils.isNotBlank(companyParam) && !"null".equals(companyParam)) {
|
||||||
wherestr += " and ses.company = '" + companyParam + "'";
|
wherestr += " and ses.company = '" + companyParam + "'";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 勾选导出:有勾选则仅导出勾选数据;无勾选则按筛选条件导出全部
|
||||||
|
List<String> certificateIdList = parseExportIds(ids);
|
||||||
|
List<String> staffIdList = parseExportIds(staffIds);
|
||||||
|
if (!CollectionUtils.isEmpty(certificateIdList) || !CollectionUtils.isEmpty(staffIdList)) {
|
||||||
|
StringBuilder selectedWhere = new StringBuilder(" and (");
|
||||||
|
if (!CollectionUtils.isEmpty(certificateIdList)) {
|
||||||
|
selectedWhere.append("sc.id in (").append(joinForSqlIn(certificateIdList)).append(")");
|
||||||
|
}
|
||||||
|
if (!CollectionUtils.isEmpty(staffIdList)) {
|
||||||
|
if (!CollectionUtils.isEmpty(certificateIdList)) {
|
||||||
|
selectedWhere.append(" or ");
|
||||||
|
}
|
||||||
|
selectedWhere.append("ses.id in (").append(joinForSqlIn(staffIdList)).append(")");
|
||||||
|
}
|
||||||
|
selectedWhere.append(")");
|
||||||
|
wherestr += selectedWhere;
|
||||||
|
}
|
||||||
|
|
||||||
List<SafetyExternalCertificateVo> list = this.service.selectListByConditionForExternal(wherestr + orderstr);
|
List<SafetyExternalCertificateVo> list = this.service.selectListByConditionForExternal(wherestr + orderstr);
|
||||||
List<SafetyExternalCertificateExcel> excelList = new ArrayList<>();
|
List<SafetyExternalCertificateExcel> excelList = new ArrayList<>();
|
||||||
SafetyExternalCertificateExcel excelEntity = null;
|
SafetyExternalCertificateExcel excelEntity = null;
|
||||||
@ -607,7 +622,7 @@ public class SafetyExternalCertificateController {
|
|||||||
BeanUtils.copyProperties(vo, excelEntity);
|
BeanUtils.copyProperties(vo, excelEntity);
|
||||||
excelList.add(excelEntity);
|
excelList.add(excelEntity);
|
||||||
}
|
}
|
||||||
// 摘自列表查询接口 end
|
|
||||||
response.setContentType("application/vnd.ms-excel");
|
response.setContentType("application/vnd.ms-excel");
|
||||||
response.setCharacterEncoding("utf8");
|
response.setCharacterEncoding("utf8");
|
||||||
response.setHeader("Content-disposition", "attachment;filename=" + java.net.URLEncoder.encode("外部人员证书信息", "UTF-8") + ".xlsx");
|
response.setHeader("Content-disposition", "attachment;filename=" + java.net.URLEncoder.encode("外部人员证书信息", "UTF-8") + ".xlsx");
|
||||||
@ -618,4 +633,31 @@ public class SafetyExternalCertificateController {
|
|||||||
excelWriter.finish();
|
excelWriter.finish();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private List<String> parseExportIds(String rawIds) {
|
||||||
|
List<String> result = new ArrayList<>();
|
||||||
|
if (StringUtils.isBlank(rawIds) || "null".equals(rawIds)) {
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
String[] split = rawIds.split(",");
|
||||||
|
for (String id : split) {
|
||||||
|
String value = StringUtils.trim(id);
|
||||||
|
// 仅保留安全字符,避免拼接 SQL 时引入非法字符
|
||||||
|
if (StringUtils.isNotBlank(value) && value.matches("^[0-9A-Za-z_-]+$")) {
|
||||||
|
result.add(value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
private String joinForSqlIn(List<String> idList) {
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
for (int i = 0; i < idList.size(); i++) {
|
||||||
|
if (i > 0) {
|
||||||
|
sb.append(",");
|
||||||
|
}
|
||||||
|
sb.append("'").append(idList.get(i)).append("'");
|
||||||
|
}
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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";
|
||||||
|
|||||||
@ -134,6 +134,12 @@ public class SewageController {
|
|||||||
public String dosave(HttpServletRequest request,Model model,
|
public String dosave(HttpServletRequest request,Model model,
|
||||||
@ModelAttribute Sewage sewage) {
|
@ModelAttribute Sewage sewage) {
|
||||||
User cu = (User) request.getSession().getAttribute("cu");
|
User cu = (User) request.getSession().getAttribute("cu");
|
||||||
|
String contractNumber = sewage.getContractNumber() == null ? null : sewage.getContractNumber().trim();
|
||||||
|
sewage.setContractNumber(contractNumber);
|
||||||
|
if (this.sewageService.existsByContractNumber(contractNumber)) {
|
||||||
|
model.addAttribute("result", "{\"res\":\"合同编号已存在,不可重复\"}");
|
||||||
|
return "result";
|
||||||
|
}
|
||||||
sewage.setId(CommUtil.getUUID());
|
sewage.setId(CommUtil.getUUID());
|
||||||
int result = this.sewageService.save(sewage);
|
int result = this.sewageService.save(sewage);
|
||||||
String resultstr = "{\"res\":\""+result+"\",\"id\":\""+sewage.getId()+"\"}";
|
String resultstr = "{\"res\":\""+result+"\",\"id\":\""+sewage.getId()+"\"}";
|
||||||
@ -193,6 +199,12 @@ public class SewageController {
|
|||||||
public String doupdate(HttpServletRequest request,Model model,
|
public String doupdate(HttpServletRequest request,Model model,
|
||||||
@ModelAttribute Sewage sewage) {
|
@ModelAttribute Sewage sewage) {
|
||||||
User cu = (User) request.getSession().getAttribute("cu");
|
User cu = (User) request.getSession().getAttribute("cu");
|
||||||
|
String contractNumber = sewage.getContractNumber() == null ? null : sewage.getContractNumber().trim();
|
||||||
|
sewage.setContractNumber(contractNumber);
|
||||||
|
if (this.sewageService.existsByContractNumberExcludeId(contractNumber, sewage.getId())) {
|
||||||
|
model.addAttribute("result", "{\"res\":\"合同编号已存在,不可重复\"}");
|
||||||
|
return "result";
|
||||||
|
}
|
||||||
int result = this.sewageService.update(sewage);
|
int result = this.sewageService.update(sewage);
|
||||||
String resstr="{\"res\":\""+result+"\",\"id\":\""+sewage.getId()+"\"}";
|
String resstr="{\"res\":\""+result+"\",\"id\":\""+sewage.getId()+"\"}";
|
||||||
model.addAttribute("result", resstr);
|
model.addAttribute("result", resstr);
|
||||||
@ -348,7 +360,8 @@ public class SewageController {
|
|||||||
@RequestMapping(value = "downloadExcelFun.do")
|
@RequestMapping(value = "downloadExcelFun.do")
|
||||||
public ModelAndView downloadExcelFun(HttpServletRequest request,
|
public ModelAndView downloadExcelFun(HttpServletRequest request,
|
||||||
HttpServletResponse response, Model model) throws IOException {
|
HttpServletResponse response, Model model) throws IOException {
|
||||||
this.sewageService.outExcelFun(response);
|
String ids = request.getParameter("ids");
|
||||||
|
this.sewageService.outExcelFun(response, ids);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -227,7 +227,7 @@ public class PatrolModelController {
|
|||||||
User cu=(User)request.getSession().getAttribute("cu");
|
User cu=(User)request.getSession().getAttribute("cu");
|
||||||
String companyId = request.getParameter("bizId");
|
String companyId = request.getParameter("bizId");
|
||||||
String type = request.getParameter("type");
|
String type = request.getParameter("type");
|
||||||
List<PatrolModel> list = this.patrolModelService.selectListByWhere("where unit_id = '"+companyId+"' and type='"+type+"' order by insdt");
|
List<PatrolModel> list = this.patrolModelService.selectListByWhere("where unit_id = '"+companyId+"' order by insdt");
|
||||||
ArrayList<Select2> list4select2 = new ArrayList<Select2>();
|
ArrayList<Select2> list4select2 = new ArrayList<Select2>();
|
||||||
for (int i=0;i<list.size();i++){
|
for (int i=0;i<list.size();i++){
|
||||||
Select2 select2 = new Select2();
|
Select2 select2 = new Select2();
|
||||||
|
|||||||
@ -242,10 +242,20 @@ public class ProcessSectionController {
|
|||||||
@RequestMapping("/getProcessSection4Select.do")
|
@RequestMapping("/getProcessSection4Select.do")
|
||||||
public String getProcessSection4Select(HttpServletRequest request, Model model) {
|
public String getProcessSection4Select(HttpServletRequest request, Model model) {
|
||||||
String companyId = request.getParameter("companyId"); // 默认查询JSBZ???
|
String companyId = request.getParameter("companyId"); // 默认查询JSBZ???
|
||||||
Company company = this.companyService.selectByPrimaryKey(companyId);
|
// companyId在不同页面可能来自tb_unit或tb_company,统一兼容两种来源
|
||||||
|
Unit unit = this.unitService.getUnitById(companyId);
|
||||||
|
String unitType = null;
|
||||||
|
if (unit != null) {
|
||||||
|
unitType = unit.getType();
|
||||||
|
} else if (companyId != null && !companyId.isEmpty()) {
|
||||||
|
Company company = this.unitService.getCompById(companyId);
|
||||||
|
if (company != null) {
|
||||||
|
unitType = company.getType();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
String wherestr = "where 1=1 and active='" + CommString.Active_True + "' ";
|
String wherestr = "where 1=1 and active='" + CommString.Active_True + "' ";
|
||||||
if (company != null && company.getType().equals(CommString.UNIT_TYPE_COMPANY)) { // "C";//公司
|
if (CommString.UNIT_TYPE_COMPANY.equals(unitType)) { // "C";//公司
|
||||||
String bizs = "";//公司下属所有厂id
|
String bizs = "";//公司下属所有厂id
|
||||||
List<Unit> blist = this.unitService.getParentCompanyChildrenBizByUnitid(companyId);
|
List<Unit> blist = this.unitService.getParentCompanyChildrenBizByUnitid(companyId);
|
||||||
if (blist != null && blist.size() > 0) {
|
if (blist != null && blist.size() > 0) {
|
||||||
@ -257,7 +267,7 @@ public class ProcessSectionController {
|
|||||||
}
|
}
|
||||||
bizs = bizs.replace(",", "','");
|
bizs = bizs.replace(",", "','");
|
||||||
wherestr += " and (unit_id='" + ProcessSection.UnitId_Sys + "' or (code not in (select code from tb_process_section where unit_id='" + ProcessSection.UnitId_Sys + "')) and unit_id in ('" + bizs + "') ) ";
|
wherestr += " and (unit_id='" + ProcessSection.UnitId_Sys + "' or (code not in (select code from tb_process_section where unit_id='" + ProcessSection.UnitId_Sys + "')) and unit_id in ('" + bizs + "') ) ";
|
||||||
} else if (company != null && company.getType().equals(CommString.UNIT_TYPE_BIZ)) { // B 水厂
|
} else if (CommString.UNIT_TYPE_BIZ.equals(unitType)) { // B 水厂
|
||||||
wherestr += " and unit_id='" + companyId + "' ";
|
wherestr += " and unit_id='" + companyId + "' ";
|
||||||
}
|
}
|
||||||
if (request.getParameter("search_name") != null && !request.getParameter("search_name").isEmpty()) {
|
if (request.getParameter("search_name") != null && !request.getParameter("search_name").isEmpty()) {
|
||||||
@ -272,13 +282,16 @@ public class ProcessSectionController {
|
|||||||
for (int i = 0; i < processSections.size(); i++) {
|
for (int i = 0; i < processSections.size(); i++) {
|
||||||
JSONObject jsonObject = new JSONObject();
|
JSONObject jsonObject = new JSONObject();
|
||||||
jsonObject.put("id", processSections.get(i).getCode());
|
jsonObject.put("id", processSections.get(i).getCode());
|
||||||
if (company != null && company.getType().equals(CommString.UNIT_TYPE_COMPANY)) { // "C";//公司
|
if (CommString.UNIT_TYPE_COMPANY.equals(unitType)) { // "C";//公司
|
||||||
if (!processSections.get(i).getUnitId().equals(ProcessSection.UnitId_Sys)) {
|
if (!processSections.get(i).getUnitId().equals(ProcessSection.UnitId_Sys)) {
|
||||||
jsonObject.put("text", processSections.get(i).getSname() + "(" + processSections.get(i).getCompanySname() + ")");
|
jsonObject.put("text", processSections.get(i).getSname() + "(" + processSections.get(i).getCompanySname() + ")");
|
||||||
} else {
|
} else {
|
||||||
jsonObject.put("text", processSections.get(i).getSname());
|
jsonObject.put("text", processSections.get(i).getSname());
|
||||||
}
|
}
|
||||||
} else if (company != null && company.getType().equals(CommString.UNIT_TYPE_BIZ)) { // "B";//水厂
|
} else if (CommString.UNIT_TYPE_BIZ.equals(unitType)) { // "B";//水厂
|
||||||
|
jsonObject.put("text", processSections.get(i).getSname());
|
||||||
|
} else {
|
||||||
|
// 兜底,避免前端下拉出现有id无text导致显示为空
|
||||||
jsonObject.put("text", processSections.get(i).getSname());
|
jsonObject.put("text", processSections.get(i).getSname());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -213,6 +213,9 @@ public class RoleController {
|
|||||||
JSONArray json = JSONArray.fromObject(list);
|
JSONArray json = JSONArray.fromObject(list);
|
||||||
model.addAttribute("json", json);
|
model.addAttribute("json", json);
|
||||||
model.addAttribute("roleid", roleid);
|
model.addAttribute("roleid", roleid);
|
||||||
|
if(request.getParameter("bizid") != null && !request.getParameter("bizid").isEmpty()){
|
||||||
|
model.addAttribute("companyId", request.getParameter("bizid"));
|
||||||
|
}
|
||||||
return "user/roleUser";
|
return "user/roleUser";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -17,6 +17,7 @@ import io.swagger.annotations.*;
|
|||||||
import net.sf.json.JSONArray;
|
import net.sf.json.JSONArray;
|
||||||
import net.sf.json.JSONObject;
|
import net.sf.json.JSONObject;
|
||||||
import org.activiti.engine.RepositoryService;
|
import org.activiti.engine.RepositoryService;
|
||||||
|
import org.apache.commons.collections.CollectionUtils;
|
||||||
import org.apache.commons.fileupload.servlet.ServletFileUpload;
|
import org.apache.commons.fileupload.servlet.ServletFileUpload;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@ -852,11 +853,13 @@ public class UserController {
|
|||||||
public String userForSelectByCompany(HttpServletRequest request, Model model) {
|
public String userForSelectByCompany(HttpServletRequest request, Model model) {
|
||||||
String userIds = request.getParameter("userIds");
|
String userIds = request.getParameter("userIds");
|
||||||
String jobIds = request.getParameter("jobIds");
|
String jobIds = request.getParameter("jobIds");
|
||||||
|
String displayDept = request.getParameter("displayDept");
|
||||||
if (userIds != null && !userIds.isEmpty()) {
|
if (userIds != null && !userIds.isEmpty()) {
|
||||||
List<User> list = this.userService.selectListByWhere("where id in ('" + userIds.replace(",", "','") + "') order by CHARINDEX(','+ id +',','," + userIds + ",')");
|
List<User> list = this.userService.selectListByWhere("where id in ('" + userIds.replace(",", "','") + "') order by CHARINDEX(','+ id +',',','" + userIds + ",')");
|
||||||
model.addAttribute("users", JSONArray.fromObject(list));
|
model.addAttribute("users", JSONArray.fromObject(list));
|
||||||
}
|
}
|
||||||
model.addAttribute("jobIds", jobIds);
|
model.addAttribute("jobIds", jobIds);
|
||||||
|
model.addAttribute("displayDept", displayDept);
|
||||||
return "user/userForSelectByCompany";
|
return "user/userForSelectByCompany";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -864,6 +867,9 @@ public class UserController {
|
|||||||
public String getUsersByIds(HttpServletRequest request, Model model) {
|
public String getUsersByIds(HttpServletRequest request, Model model) {
|
||||||
String userIds = request.getParameter("userIds");
|
String userIds = request.getParameter("userIds");
|
||||||
List<User> list = this.userService.selectListByWhere("where id in ('" + userIds.replace(",", "','") + "') order by CHARINDEX(','+ id +',','," + userIds + ",')");
|
List<User> list = this.userService.selectListByWhere("where id in ('" + userIds.replace(",", "','") + "') order by CHARINDEX(','+ id +',','," + userIds + ",')");
|
||||||
|
if (CollectionUtils.isNotEmpty(list)){
|
||||||
|
list = list.stream().filter(u -> StringUtils.isNotBlank(u.getId())).collect(toList());
|
||||||
|
}
|
||||||
JSONArray json = JSONArray.fromObject(list);
|
JSONArray json = JSONArray.fromObject(list);
|
||||||
model.addAttribute("result", json);
|
model.addAttribute("result", json);
|
||||||
return "result";
|
return "result";
|
||||||
@ -1255,6 +1261,7 @@ public class UserController {
|
|||||||
model.addAttribute("users", JSONArray.fromObject(list));
|
model.addAttribute("users", JSONArray.fromObject(list));
|
||||||
}
|
}
|
||||||
model.addAttribute("jobIds", jobIds);
|
model.addAttribute("jobIds", jobIds);
|
||||||
|
model.addAttribute("displayDept", request.getParameter("displayDept"));
|
||||||
return "user/userForSelectByWorkOrder";
|
return "user/userForSelectByWorkOrder";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1454,6 +1461,7 @@ public class UserController {
|
|||||||
model.addAttribute("users", JSONArray.fromObject(list));
|
model.addAttribute("users", JSONArray.fromObject(list));
|
||||||
}
|
}
|
||||||
model.addAttribute("jobIds", jobIds);
|
model.addAttribute("jobIds", jobIds);
|
||||||
|
model.addAttribute("displayDept", request.getParameter("displayDept"));
|
||||||
return "user/userSelectLayer";
|
return "user/userSelectLayer";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -89,11 +89,26 @@ public class KPIPointController {
|
|||||||
// List<MPointHistory> lists = mPointHistoryService.selectListByTableAWhere("tb_mp_11_GNJ1_F","MeasureDT='2016-01-10 10:16:57'");
|
// List<MPointHistory> lists = mPointHistoryService.selectListByTableAWhere("tb_mp_11_GNJ1_F","MeasureDT='2016-01-10 10:16:57'");
|
||||||
// int dd= mPointHistoryService.deleteByTableAWhere("tb_mp_11_GNJ1_F","MeasureDT='2016-01-10 10:16:57'");
|
// int dd= mPointHistoryService.deleteByTableAWhere("tb_mp_11_GNJ1_F","MeasureDT='2016-01-10 10:16:57'");
|
||||||
for (int i=0; i < list.size(); i++) {
|
for (int i=0; i < list.size(); i++) {
|
||||||
ProcessSection processSection = this.processSectionService.selectById(list.get(i).getProcesssectionid());
|
String rawBizId = list.get(i).getBizid();
|
||||||
|
ProcessSection processSection = this.processSectionService.selectById(list.get(i).getProcesssectionid());
|
||||||
|
if (processSection == null && list.get(i).getProcesssectionid() != null && !list.get(i).getProcesssectionid().isEmpty()) {
|
||||||
|
// KPI里历史数据存在按code保存工艺段的场景,优先按厂区code匹配,再回退到系统库
|
||||||
|
List<ProcessSection> processSectionList = this.processSectionService.selectSimpleListByWhere(
|
||||||
|
"where code='" + list.get(i).getProcesssectionid() + "' and unit_id='" + rawBizId + "' "
|
||||||
|
);
|
||||||
|
if (processSectionList == null || processSectionList.isEmpty()) {
|
||||||
|
processSectionList = this.processSectionService.selectSimpleListByWhere(
|
||||||
|
"where code='" + list.get(i).getProcesssectionid() + "' and unit_id='" + ProcessSection.UnitId_Sys + "' "
|
||||||
|
);
|
||||||
|
}
|
||||||
|
if (processSectionList != null && !processSectionList.isEmpty()) {
|
||||||
|
processSection = processSectionList.get(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
if (processSection != null) {
|
if (processSection != null) {
|
||||||
list.get(i).setProcessectionname(processSection.getName());
|
list.get(i).setProcessectionname(processSection.getName());
|
||||||
}
|
}
|
||||||
Company company = this.unitService.getCompById(list.get(i).getBizid());
|
Company company = this.unitService.getCompById(rawBizId);
|
||||||
if (company != null) {
|
if (company != null) {
|
||||||
list.get(i).setBizid(company.getName());
|
list.get(i).setBizid(company.getName());
|
||||||
}
|
}
|
||||||
|
|||||||
@ -514,6 +514,21 @@ public class MPointController {
|
|||||||
mp.setProcessSection(processSections.get(0));
|
mp.setProcessSection(processSections.get(0));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// 取redis点位数据最新值,没有就是0
|
||||||
|
for (MPoint mPoint : list) {
|
||||||
|
String id = mPoint.getId();
|
||||||
|
int num = mPoint.getId().hashCode() % 25;
|
||||||
|
RMapCache<String, String> map_redis_data = redissonClient.getMapCache(CommString.RedisMpointFlag + num);
|
||||||
|
if (map_redis_data.get(id) != null && !"".equals(map_redis_data.get(id))) {
|
||||||
|
String[] str = map_redis_data.get(id).split(";");
|
||||||
|
if (str.length >= 3 && str[1] != null && !str[1].isEmpty() && !"null".equals(str[1])) {
|
||||||
|
mPoint.setParmvalue(new BigDecimal(str[1]));
|
||||||
|
mPoint.setMeasuredt(str[2]);
|
||||||
|
} else {
|
||||||
|
mPoint.setParmvalue(BigDecimal.ZERO);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
PageInfo<MPoint> pi = new PageInfo<MPoint>(list);
|
PageInfo<MPoint> pi = new PageInfo<MPoint>(list);
|
||||||
JSONArray json = JSONArray.fromObject(list);
|
JSONArray json = JSONArray.fromObject(list);
|
||||||
result = "{\"total\":" + pi.getTotal() + ",\"rows\":" + json + "}";
|
result = "{\"total\":" + pi.getTotal() + ",\"rows\":" + json + "}";
|
||||||
@ -1607,7 +1622,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());
|
||||||
@ -4137,8 +4152,15 @@ public class MPointController {
|
|||||||
for (int i = 0; i < ids.length; i++) {
|
for (int i = 0; i < ids.length; i++) {
|
||||||
com.alibaba.fastjson.JSONObject jsonObject2 = new com.alibaba.fastjson.JSONObject();
|
com.alibaba.fastjson.JSONObject jsonObject2 = new com.alibaba.fastjson.JSONObject();
|
||||||
|
|
||||||
//通过es查询bizid
|
//通过数据库查询测点(优先通过unitId和测点编码查询)
|
||||||
MPoint mPoint_es = mPointService.selectById(ids[i]);
|
MPoint mPoint_es = mPointService.selectById(unitId, ids[i]);
|
||||||
|
if (mPoint_es == null) {
|
||||||
|
// 尝试通过测点编码查询
|
||||||
|
List<MPoint> mPointList = mPointService.selectListByWhere(unitId, "where mpointcode='" + ids[i] + "'");
|
||||||
|
if (mPointList != null && mPointList.size() > 0) {
|
||||||
|
mPoint_es = mPointList.get(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
if (mPoint_es != null) {
|
if (mPoint_es != null) {
|
||||||
unitId = mPoint_es.getBizid();
|
unitId = mPoint_es.getBizid();
|
||||||
|
|
||||||
|
|||||||
@ -133,6 +133,9 @@ public class SchedulingController {
|
|||||||
public String doadd(HttpServletRequest request, Model model,
|
public String doadd(HttpServletRequest request, Model model,
|
||||||
@RequestParam(value = "date") String date) {
|
@RequestParam(value = "date") String date) {
|
||||||
model.addAttribute("date", date.substring(0, 10));
|
model.addAttribute("date", date.substring(0, 10));
|
||||||
|
if(request.getParameter("bizid") != null && !request.getParameter("bizid").isEmpty()){
|
||||||
|
model.addAttribute("bizid", request.getParameter("bizid"));
|
||||||
|
}
|
||||||
return "work/schedulingAdd";
|
return "work/schedulingAdd";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -142,6 +145,9 @@ public class SchedulingController {
|
|||||||
String wherestr = " where s.id = '" + schedulingId + "'";
|
String wherestr = " where s.id = '" + schedulingId + "'";
|
||||||
List<Scheduling> scheduling = this.schedulingService.selectCalenderListByWhere(wherestr);
|
List<Scheduling> scheduling = this.schedulingService.selectCalenderListByWhere(wherestr);
|
||||||
model.addAttribute("scheduling", scheduling.get(0));
|
model.addAttribute("scheduling", scheduling.get(0));
|
||||||
|
if(request.getParameter("bizid") != null && !request.getParameter("bizid").isEmpty()){
|
||||||
|
model.addAttribute("bizid", request.getParameter("bizid"));
|
||||||
|
}
|
||||||
return "work/schedulingEdit";
|
return "work/schedulingEdit";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -475,7 +481,7 @@ public class SchedulingController {
|
|||||||
JSONArray array = new JSONArray();
|
JSONArray array = new JSONArray();
|
||||||
String[] workpeopleids = scheduling.getWorkpeople().split(",");
|
String[] workpeopleids = scheduling.getWorkpeople().split(",");
|
||||||
if (workpeopleids != null && workpeopleids.length > 0) {
|
if (workpeopleids != null && workpeopleids.length > 0) {
|
||||||
if (!workpeopleids[0].equals("")) {
|
if (!userId.equals(workpeopleids[0])) {
|
||||||
for (int i = 0; i < workpeopleids.length; i++) {
|
for (int i = 0; i < workpeopleids.length; i++) {
|
||||||
if (!userId.equals(workpeopleids[i])) {
|
if (!userId.equals(workpeopleids[i])) {
|
||||||
JSONObject object = new JSONObject();
|
JSONObject object = new JSONObject();
|
||||||
@ -1150,6 +1156,10 @@ public class SchedulingController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 获取交班表单数据
|
||||||
|
List<GroupContentFormData> formDataList = this.groupContentFormDataService.selectListByWhere(" where schedulingId='" + schedulingId + "' ");
|
||||||
|
model.addAttribute("formDataList", formDataList);
|
||||||
|
|
||||||
model.addAttribute("scheduling", scheduling);
|
model.addAttribute("scheduling", scheduling);
|
||||||
return "work/schedulingView";
|
return "work/schedulingView";
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1252,21 +1252,14 @@ public class WorkorderDetailController {
|
|||||||
@RequestMapping("/doExportRepair.do")
|
@RequestMapping("/doExportRepair.do")
|
||||||
public ModelAndView doExportRepair(HttpServletRequest request,
|
public ModelAndView doExportRepair(HttpServletRequest request,
|
||||||
HttpServletResponse response, Model model,
|
HttpServletResponse response, Model model,
|
||||||
@RequestParam(value = "ids") String ids,
|
@RequestParam(value = "ids", required = false) String ids,
|
||||||
@RequestParam(value = "type") String type) throws IOException {
|
@RequestParam(value = "type") String type) throws IOException {
|
||||||
if (ids != null && !ids.equals("")) {
|
String whereStr = buildExportWhereByIdsAndType(ids, type);
|
||||||
String[] id = ids.split(",");
|
try {
|
||||||
String workorderDetailsIds = "";
|
List<WorkorderDetail> workorderDetails = workorderDetailService.selectListByWhere(whereStr);
|
||||||
for (String s : id) {
|
this.workorderDetailService.doExportRepair(response, workorderDetails, type);
|
||||||
workorderDetailsIds += "'" + s + "',";
|
} catch (Exception e) {
|
||||||
}
|
e.printStackTrace();
|
||||||
String whereStr = "where id in (" + workorderDetailsIds.substring(0, workorderDetailsIds.length() - 1) + ")";
|
|
||||||
try {
|
|
||||||
List<WorkorderDetail> workorderDetails = workorderDetailService.selectListByWhere(whereStr);
|
|
||||||
this.workorderDetailService.doExportRepair(response, workorderDetails, type);
|
|
||||||
} catch (Exception e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@ -1292,21 +1285,14 @@ public class WorkorderDetailController {
|
|||||||
@RequestMapping("/doExportRepairJS.do")
|
@RequestMapping("/doExportRepairJS.do")
|
||||||
public ModelAndView doExportRepairJS(HttpServletRequest request,
|
public ModelAndView doExportRepairJS(HttpServletRequest request,
|
||||||
HttpServletResponse response, Model model,
|
HttpServletResponse response, Model model,
|
||||||
@RequestParam(value = "ids") String ids,
|
@RequestParam(value = "ids", required = false) String ids,
|
||||||
@RequestParam(value = "type") String type) throws IOException {
|
@RequestParam(value = "type") String type) throws IOException {
|
||||||
if (ids != null && !ids.equals("")) {
|
String whereStr = buildExportWhereByIdsAndType(ids, type);
|
||||||
String[] id = ids.split(",");
|
try {
|
||||||
String workorderDetailsIds = "";
|
List<WorkorderDetail> workorderDetails = workorderDetailService.selectListByWhere(whereStr);
|
||||||
for (String s : id) {
|
this.workorderDetailService.doExportRepairJS(response, workorderDetails, type);
|
||||||
workorderDetailsIds += "'" + s + "',";
|
} catch (Exception e) {
|
||||||
}
|
e.printStackTrace();
|
||||||
String whereStr = "where id in (" + workorderDetailsIds.substring(0, workorderDetailsIds.length() - 1) + ")";
|
|
||||||
try {
|
|
||||||
List<WorkorderDetail> workorderDetails = workorderDetailService.selectListByWhere(whereStr);
|
|
||||||
this.workorderDetailService.doExportRepairJS(response, workorderDetails, type);
|
|
||||||
} catch (Exception e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@ -1332,26 +1318,47 @@ public class WorkorderDetailController {
|
|||||||
@RequestMapping("/doExportMain.do")
|
@RequestMapping("/doExportMain.do")
|
||||||
public ModelAndView doExportMain(HttpServletRequest request,
|
public ModelAndView doExportMain(HttpServletRequest request,
|
||||||
HttpServletResponse response, Model model,
|
HttpServletResponse response, Model model,
|
||||||
@RequestParam(value = "ids") String ids,
|
@RequestParam(value = "ids", required = false) String ids,
|
||||||
@RequestParam(value = "type") String type) throws IOException {
|
@RequestParam(value = "type") String type) throws IOException {
|
||||||
if (ids != null && !ids.equals("")) {
|
String whereStr = buildExportWhereByIdsAndType(ids, type);
|
||||||
String[] id = ids.split(",");
|
try {
|
||||||
String workorderDetailsIds = "";
|
List<WorkorderDetail> workorderDetails = workorderDetailService.selectListByWhere(whereStr);
|
||||||
for (String s : id) {
|
this.workorderDetailService.doExportMain(response, workorderDetails, type);
|
||||||
workorderDetailsIds += "'" + s + "',";
|
} catch (Exception e) {
|
||||||
}
|
e.printStackTrace();
|
||||||
String whereStr = "where id in (" + workorderDetailsIds.substring(0, workorderDetailsIds.length() - 1) + ")";
|
|
||||||
// System.out.println(whereStr);
|
|
||||||
try {
|
|
||||||
List<WorkorderDetail> workorderDetails = workorderDetailService.selectListByWhere(whereStr);
|
|
||||||
this.workorderDetailService.doExportMain(response, workorderDetails, type);
|
|
||||||
} catch (Exception e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private String buildExportWhereByIdsAndType(String ids, String type) {
|
||||||
|
String normalizedIds = normalizeIds(ids);
|
||||||
|
if (!normalizedIds.isEmpty()) {
|
||||||
|
String[] idArr = normalizedIds.split(",");
|
||||||
|
StringBuilder idBuilder = new StringBuilder();
|
||||||
|
for (String item : idArr) {
|
||||||
|
String id = item.trim();
|
||||||
|
if (id.isEmpty()) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (idBuilder.length() > 0) {
|
||||||
|
idBuilder.append(",");
|
||||||
|
}
|
||||||
|
idBuilder.append("'").append(id).append("'");
|
||||||
|
}
|
||||||
|
if (idBuilder.length() > 0) {
|
||||||
|
return "where id in (" + idBuilder + ")";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return "where type = '" + type + "'";
|
||||||
|
}
|
||||||
|
|
||||||
|
private String normalizeIds(String ids) {
|
||||||
|
if (ids == null || ids.trim().isEmpty()) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
return ids.replace("'", "").replace(" ", "").replaceAll(",+$", "");
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 日历中弹出指定日期的 维修单
|
* 日历中弹出指定日期的 维修单
|
||||||
*
|
*
|
||||||
|
|||||||
@ -5,6 +5,7 @@ import com.sipai.entity.sparepart.Sewage;
|
|||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
@Repository
|
@Repository
|
||||||
public class SewageDao extends CommDaoImpl<Sewage> {
|
public class SewageDao extends CommDaoImpl<Sewage> {
|
||||||
@ -16,5 +17,13 @@ public class SewageDao extends CommDaoImpl<Sewage> {
|
|||||||
List<Sewage> list = getSqlSession().selectList(this.getMappernamespace()+"."+Thread.currentThread().getStackTrace()[1].getMethodName(), sewage);
|
List<Sewage> list = getSqlSession().selectList(this.getMappernamespace()+"."+Thread.currentThread().getStackTrace()[1].getMethodName(), sewage);
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Integer selectCountByContractNumber(String contractNumber) {
|
||||||
|
return getSqlSession().selectOne(this.getMappernamespace() + "." + Thread.currentThread().getStackTrace()[1].getMethodName(), contractNumber);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer selectCountByContractNumberExcludeId(Map<String, String> params) {
|
||||||
|
return getSqlSession().selectOne(this.getMappernamespace() + "." + Thread.currentThread().getStackTrace()[1].getMethodName(), params);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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" />
|
||||||
|
|||||||
@ -312,6 +312,17 @@
|
|||||||
delete from TB_Sewage_Source
|
delete from TB_Sewage_Source
|
||||||
${where}
|
${where}
|
||||||
</delete>
|
</delete>
|
||||||
|
<select id="selectCountByContractNumber" resultType="java.lang.Integer" parameterType="java.lang.String" >
|
||||||
|
select count(1)
|
||||||
|
from TB_Sewage_Source
|
||||||
|
where contract_number = #{contractNumber,jdbcType=VARCHAR}
|
||||||
|
</select>
|
||||||
|
<select id="selectCountByContractNumberExcludeId" resultType="java.lang.Integer" parameterType="java.util.Map" >
|
||||||
|
select count(1)
|
||||||
|
from TB_Sewage_Source
|
||||||
|
where contract_number = #{contractNumber,jdbcType=VARCHAR}
|
||||||
|
and id != #{id,jdbcType=VARCHAR}
|
||||||
|
</select>
|
||||||
<select id="selectDistinctCityByWhere" resultMap="BaseResultMap" parameterType="java.lang.String" >
|
<select id="selectDistinctCityByWhere" resultMap="BaseResultMap" parameterType="java.lang.String" >
|
||||||
select Distinct [city] as [city]
|
select Distinct [city] as [city]
|
||||||
from TB_Sewage_Source
|
from TB_Sewage_Source
|
||||||
|
|||||||
@ -362,9 +362,22 @@ public class WorkflowProcessDefinitionService {
|
|||||||
String pvmTransitionId = "";
|
String pvmTransitionId = "";
|
||||||
for (WorkTask workTask : list) {
|
for (WorkTask workTask : list) {
|
||||||
PvmTransition item=this.getTransition(processDefId, taskDefId,workTask.getId(),pvmTransitionId);
|
PvmTransition item=this.getTransition(processDefId, taskDefId,workTask.getId(),pvmTransitionId);
|
||||||
|
if (item == null) {
|
||||||
|
// 未找到对应路径时默认标记为通过路径,继续处理其他任务
|
||||||
|
workTask.setPassFlag(true);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
pvmTransitionId = item.getId();
|
pvmTransitionId = item.getId();
|
||||||
String conditionText=String.valueOf(item.getProperty("conditionText"));
|
String conditionText=String.valueOf(item.getProperty("conditionText"));
|
||||||
if (conditionText!=null && conditionText.contains("!"+CommString.ACTI_KEK_Condition)) {
|
// 检测退回路径:支持多种条件表达式格式
|
||||||
|
// ${!pass} / ${pass == false} / ${pass==false} / ${pass != true} / ${pass!=true}
|
||||||
|
boolean isRejectPath = conditionText != null && (
|
||||||
|
conditionText.contains("!"+CommString.ACTI_KEK_Condition) ||
|
||||||
|
conditionText.contains(CommString.ACTI_KEK_Condition+" == false") ||
|
||||||
|
conditionText.contains(CommString.ACTI_KEK_Condition+"==false") ||
|
||||||
|
conditionText.contains(CommString.ACTI_KEK_Condition+" != true") ||
|
||||||
|
conditionText.contains(CommString.ACTI_KEK_Condition+"!=true"));
|
||||||
|
if (isRejectPath) {
|
||||||
workTask.setPassFlag(false);
|
workTask.setPassFlag(false);
|
||||||
}else{
|
}else{
|
||||||
workTask.setPassFlag(true);
|
workTask.setPassFlag(true);
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -20,9 +20,12 @@ import org.slf4j.Logger;
|
|||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
import org.springframework.web.context.request.RequestContextHolder;
|
||||||
|
import org.springframework.web.context.request.ServletRequestAttributes;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import java.io.ByteArrayOutputStream;
|
import java.io.ByteArrayOutputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
@ -351,6 +354,8 @@ public class CommonFileServiceImpl implements CommonFileService {
|
|||||||
String errorMsg = e.getMessage();
|
String errorMsg = e.getMessage();
|
||||||
if (errorMsg != null && errorMsg.contains("NoSuchKey")) {
|
if (errorMsg != null && errorMsg.contains("NoSuchKey")) {
|
||||||
logger.error("MinIO文件不存在: bucketName={}, objectName={}", nameSpace, filePath);
|
logger.error("MinIO文件不存在: bucketName={}, objectName={}", nameSpace, filePath);
|
||||||
|
} else if (errorMsg != null && errorMsg.contains("NoSuchBucket")) {
|
||||||
|
logger.error("MinIO存储桶不存在: bucketName={}, objectName={}", nameSpace, filePath);
|
||||||
} else {
|
} else {
|
||||||
logger.error("获取MinIO文件失败: bucketName={}, objectName={}, 错误: {}", nameSpace, filePath, errorMsg, e);
|
logger.error("获取MinIO文件失败: bucketName={}, objectName={}, 错误: {}", nameSpace, filePath, errorMsg, e);
|
||||||
}
|
}
|
||||||
@ -375,12 +380,12 @@ public class CommonFileServiceImpl implements CommonFileService {
|
|||||||
try {
|
try {
|
||||||
// 安全获取文件名(自动检测编码)
|
// 安全获取文件名(自动检测编码)
|
||||||
fileName = getSafeFileName(item);
|
fileName = getSafeFileName(item);
|
||||||
|
|
||||||
// 生成MinIO安全的对象名称
|
// 生成MinIO安全的对象名称
|
||||||
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd-HH-mm-ss");
|
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd-HH-mm-ss");
|
||||||
String timestamp = dateFormat.format(new Date());
|
String timestamp = dateFormat.format(new Date());
|
||||||
filePath = generateMinioObjectName(fileName, timestamp);
|
filePath = generateMinioObjectName(fileName, timestamp);
|
||||||
|
|
||||||
InputStream in = item.getInputStream();
|
InputStream in = item.getInputStream();
|
||||||
String contentType = item.getContentType();
|
String contentType = item.getContentType();
|
||||||
minioTemplate.makeBucket(nameSpace);
|
minioTemplate.makeBucket(nameSpace);
|
||||||
@ -389,7 +394,7 @@ public class CommonFileServiceImpl implements CommonFileService {
|
|||||||
CommonFile commonFile = new CommonFile();
|
CommonFile commonFile = new CommonFile();
|
||||||
commonFile.setId(CommUtil.getUUID());
|
commonFile.setId(CommUtil.getUUID());
|
||||||
commonFile.setMasterid(masterId);
|
commonFile.setMasterid(masterId);
|
||||||
// 20210105 YYJ 用于文件表绑定资料节点用字段 tb_doc_file内和masterId一样
|
// 20210105 YYJ 用于文件表绑定<EFBFBD><EFBFBD>料节点用字段 tb_doc_file内和masterId一样
|
||||||
// commonFile.setPid(masterId);
|
// commonFile.setPid(masterId);
|
||||||
commonFile.setFilename(fileName); // 保存原始文件名用于显示
|
commonFile.setFilename(fileName); // 保存原始文件名用于显示
|
||||||
commonFile.setType(contentType);
|
commonFile.setType(contentType);
|
||||||
@ -398,6 +403,19 @@ public class CommonFileServiceImpl implements CommonFileService {
|
|||||||
commonFile.setAbspath(filePath); // 保存MinIO对象名称
|
commonFile.setAbspath(filePath); // 保存MinIO对象名称
|
||||||
commonFile.setInsdt(CommUtil.nowDate());
|
commonFile.setInsdt(CommUtil.nowDate());
|
||||||
commonFile.setSize((int) item.getSize());
|
commonFile.setSize((int) item.getSize());
|
||||||
|
// 获取当前用户ID并设置
|
||||||
|
try {
|
||||||
|
ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
|
||||||
|
if (attributes != null) {
|
||||||
|
HttpServletRequest request = attributes.getRequest();
|
||||||
|
User cu = (User) request.getSession().getAttribute("cu");
|
||||||
|
if (cu != null) {
|
||||||
|
commonFile.setInsuser(cu.getId());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
logger.warn("无法获取当前用户信息: {}", e.getMessage());
|
||||||
|
}
|
||||||
res = this.insertByTable(tableName, commonFile);
|
res = this.insertByTable(tableName, commonFile);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.error("Failed to update file to MinIO for masterId: {}", masterId, e);
|
logger.error("Failed to update file to MinIO for masterId: {}", masterId, e);
|
||||||
|
|||||||
@ -112,17 +112,24 @@ public class BusinessUnitAuditService implements CommService<BusinessUnitAudit>{
|
|||||||
}
|
}
|
||||||
List<HistoricActivityInstance> list=historyService.createHistoricActivityInstanceQuery().processInstanceId(entity.getProcessid()).activityId(wortTaskId)
|
List<HistoricActivityInstance> list=historyService.createHistoricActivityInstanceQuery().processInstanceId(entity.getProcessid()).activityId(wortTaskId)
|
||||||
.orderByHistoricActivityInstanceStartTime().desc().list();
|
.orderByHistoricActivityInstanceStartTime().desc().list();
|
||||||
if (list != null && list.size()>0) {
|
// 优先取历史记录中的 assignee;若 assignee 为空(候选人任务未签收),则查 BusinessUnitAudit 记录获取实际提交人
|
||||||
variables.put(CommString.ACTI_KEK_Assignee, list.get(0).getAssignee());
|
String targetAssignee = null;
|
||||||
if(entity.getAuditopinion()!=null && !entity.getAuditopinion().isEmpty()){
|
if (list != null && list.size() > 0) {
|
||||||
taskService.addComment(entity.getTaskid(), entity.getProcessid(), entity.getAuditopinion());
|
targetAssignee = list.get(0).getAssignee();
|
||||||
}
|
|
||||||
}else {
|
|
||||||
variables.put(CommString.ACTI_KEK_Assignee, businessUnitAdapter.getInsuser());
|
|
||||||
if(entity.getAuditopinion()!=null && !entity.getAuditopinion().isEmpty()){
|
|
||||||
taskService.addComment(entity.getTaskid(), entity.getProcessid(), entity.getAuditopinion());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
if (targetAssignee == null && !wortTaskId.isEmpty()) {
|
||||||
|
// 历史 assignee 为空时,从 BusinessUnitAudit 记录中查找该步骤的实际提交人
|
||||||
|
List<BusinessUnitAudit> previousAuditList = this.selectListByWhere(
|
||||||
|
"where businessid='" + entity.getBusinessid() + "' and taskdefinitionkey='" + wortTaskId + "' order by insdt desc");
|
||||||
|
if (previousAuditList != null && previousAuditList.size() > 0) {
|
||||||
|
targetAssignee = previousAuditList.get(0).getInsuser();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 设置退回目标处理人(若仍为空则由流程变量 userIds 确定候选人,不再回退到工单创建人)
|
||||||
|
variables.put(CommString.ACTI_KEK_Assignee, targetAssignee);
|
||||||
|
if(entity.getAuditopinion()!=null && !entity.getAuditopinion().isEmpty()){
|
||||||
|
taskService.addComment(entity.getTaskid(), entity.getProcessid(), entity.getAuditopinion());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
//int res=0;
|
//int res=0;
|
||||||
taskService.complete(entity.getTaskid(), variables);
|
taskService.complete(entity.getTaskid(), variables);
|
||||||
@ -141,17 +148,24 @@ public class BusinessUnitAuditService implements CommService<BusinessUnitAudit>{
|
|||||||
BusinessUnitRecord businessUnitRecord = new BusinessUnitRecord(entity);
|
BusinessUnitRecord businessUnitRecord = new BusinessUnitRecord(entity);
|
||||||
if(entity.getPassstatus()){
|
if(entity.getPassstatus()){
|
||||||
//通过
|
//通过
|
||||||
if(variables.get(CommString.ACTI_KEK_Candidate_Users)!=null){
|
String candidateUsers = variables.get(CommString.ACTI_KEK_Candidate_Users) != null
|
||||||
businessUnitRecord.sendMessage(variables.get(CommString.ACTI_KEK_Candidate_Users).toString(),"");
|
? variables.get(CommString.ACTI_KEK_Candidate_Users).toString() : null;
|
||||||
|
if(candidateUsers != null && !candidateUsers.isEmpty()){
|
||||||
|
// 有下一步接收人,通知下一步处理人
|
||||||
|
businessUnitRecord.sendMessage(candidateUsers, "");
|
||||||
|
}else if(variables.get(CommString.ACTI_KEK_AssigneeList) != null){
|
||||||
|
// 会签
|
||||||
|
businessUnitRecord.sendMessage(entity.getTargetusers(), "");
|
||||||
}else{
|
}else{
|
||||||
//会签
|
// 最后一步,无下一步处理人,通知当前提交人(完成确认)
|
||||||
if(variables.get(CommString.ACTI_KEK_AssigneeList)!=null){
|
if(entity.getInsuser() != null && !entity.getInsuser().isEmpty()){
|
||||||
businessUnitRecord.sendMessage(entity.getTargetusers(),"");
|
businessUnitRecord.sendMessage(entity.getInsuser(), "");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
if(variables.get(CommString.ACTI_KEK_Assignee)!=null){
|
// 退回:通知目标处理人(排除空值,避免错误发送)
|
||||||
businessUnitRecord.sendMessage(variables.get(CommString.ACTI_KEK_Assignee).toString(),"");
|
if(variables.get(CommString.ACTI_KEK_Assignee) != null){
|
||||||
|
businessUnitRecord.sendMessage(variables.get(CommString.ACTI_KEK_Assignee).toString(), "");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -8424,7 +8424,13 @@ public class EquipmentCardService implements CommService<EquipmentCard> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (childlist.size() > 0) {
|
if (childlist.size() > 0) {
|
||||||
mp.put("nodes", childlist);
|
// 保留已有的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);
|
getTreeList4ProcessSection(childlist, list);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -8491,7 +8497,13 @@ public class EquipmentCardService implements CommService<EquipmentCard> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (childlist.size() > 0) {
|
if (childlist.size() > 0) {
|
||||||
mp.put("nodes", childlist);
|
// 保留已有的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);
|
getTreeList4EquipmentClass(childlist, list);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,6 +2,7 @@ package com.sipai.service.report;
|
|||||||
|
|
||||||
import com.sipai.entity.business.BusinessUnitAudit;
|
import com.sipai.entity.business.BusinessUnitAudit;
|
||||||
import com.sipai.entity.report.RptCreate;
|
import com.sipai.entity.report.RptCreate;
|
||||||
|
import com.sipai.entity.user.User;
|
||||||
import org.xmlpull.v1.XmlPullParserException;
|
import org.xmlpull.v1.XmlPullParserException;
|
||||||
|
|
||||||
import javax.xml.parsers.ParserConfigurationException;
|
import javax.xml.parsers.ParserConfigurationException;
|
||||||
@ -45,4 +46,11 @@ public interface RptCreateService {
|
|||||||
|
|
||||||
//改变状态
|
//改变状态
|
||||||
public abstract int updateStatus(String id);
|
public abstract int updateStatus(String id);
|
||||||
|
|
||||||
|
/** 检查用户是否有报表生成权限
|
||||||
|
* @param rptInfoSetId 报表配置id
|
||||||
|
* @param user 当前用户
|
||||||
|
* @return true=有权限, false=无权限
|
||||||
|
*/
|
||||||
|
public abstract boolean checkGeneratePermission(String rptInfoSetId, User user);
|
||||||
}
|
}
|
||||||
@ -60,4 +60,18 @@ public interface RptDayLogService {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public abstract Result onekeyAudit(String ids ,User cu,String rptdeptId);
|
public abstract Result onekeyAudit(String ids ,User cu,String rptdeptId);
|
||||||
|
|
||||||
|
/** 检查用户是否有填报权限
|
||||||
|
* @param rptdeptId 填报配置id
|
||||||
|
* @param user 当前用户
|
||||||
|
* @return true=有权限, false=无权限
|
||||||
|
*/
|
||||||
|
public abstract boolean checkInputPermission(String rptdeptId, User user);
|
||||||
|
|
||||||
|
/** 检查用户是否有生成权限
|
||||||
|
* @param rptdeptId 填报配置id
|
||||||
|
* @param user 当前用户
|
||||||
|
* @return true=有权限, false=无权限
|
||||||
|
*/
|
||||||
|
public abstract boolean checkGeneratePermission(String rptdeptId, User user);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -71,6 +71,14 @@ public interface RptInfoSetService {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public abstract String getRptInfoSetIds(String userId, String unitId, String type);
|
public abstract String getRptInfoSetIds(String userId, String unitId, String type);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 检查用户是否有生成权限
|
||||||
|
* @param rptInfoSetId 报表配置ID
|
||||||
|
* @param user 用户
|
||||||
|
* @return true=有权限, false=无权限
|
||||||
|
*/
|
||||||
|
public abstract boolean checkGeneratePermission(String rptInfoSetId, com.sipai.entity.user.User user);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
|||||||
@ -13,6 +13,7 @@ import com.sipai.entity.report.*;
|
|||||||
import com.sipai.entity.scada.MPoint;
|
import com.sipai.entity.scada.MPoint;
|
||||||
import com.sipai.entity.scada.TempReport;
|
import com.sipai.entity.scada.TempReport;
|
||||||
import com.sipai.entity.user.User;
|
import com.sipai.entity.user.User;
|
||||||
|
import com.sipai.entity.user.UserJob;
|
||||||
import com.sipai.entity.work.GroupDetail;
|
import com.sipai.entity.work.GroupDetail;
|
||||||
import com.sipai.entity.work.Scheduling;
|
import com.sipai.entity.work.Scheduling;
|
||||||
import com.sipai.service.activiti.WorkflowProcessDefinitionService;
|
import com.sipai.service.activiti.WorkflowProcessDefinitionService;
|
||||||
@ -24,6 +25,7 @@ import com.sipai.service.report.*;
|
|||||||
import com.sipai.service.scada.MPointService;
|
import com.sipai.service.scada.MPointService;
|
||||||
import com.sipai.service.scada.TempReportService;
|
import com.sipai.service.scada.TempReportService;
|
||||||
import com.sipai.service.user.UserService;
|
import com.sipai.service.user.UserService;
|
||||||
|
import com.sipai.service.user.UserJobService;
|
||||||
import com.sipai.service.work.GroupDetailService;
|
import com.sipai.service.work.GroupDetailService;
|
||||||
import com.sipai.service.work.SchedulingService;
|
import com.sipai.service.work.SchedulingService;
|
||||||
import com.sipai.tools.*;
|
import com.sipai.tools.*;
|
||||||
@ -46,6 +48,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 +74,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
|
||||||
@ -104,6 +109,8 @@ public class RptCreateServiceImpl implements RptCreateService {
|
|||||||
private BusinessUnitHandleDetailService businessUnitHandleDetailService;
|
private BusinessUnitHandleDetailService businessUnitHandleDetailService;
|
||||||
@Resource
|
@Resource
|
||||||
private GroupDetailService groupDetailService;
|
private GroupDetailService groupDetailService;
|
||||||
|
@Resource
|
||||||
|
private UserJobService userJobService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public RptCreate selectById(String id) {
|
public RptCreate selectById(String id) {
|
||||||
@ -393,7 +400,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;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -830,6 +837,20 @@ public class RptCreateServiceImpl implements RptCreateService {
|
|||||||
// System.out.println("rptdt==============================================================" + rptdt);
|
// System.out.println("rptdt==============================================================" + rptdt);
|
||||||
String rpttype = rptInfoSet.getRpttype();//报表类型
|
String rpttype = rptInfoSet.getRpttype();//报表类型
|
||||||
String bucketName = "rptinfosetfile";
|
String bucketName = "rptinfosetfile";
|
||||||
|
String endtype = ".xls"; // 默认文件扩展名
|
||||||
|
|
||||||
|
// 首先确保report bucket存在
|
||||||
|
try {
|
||||||
|
MinioClient minioClient = new MinioClient(minioProp.getEndPoint(), minioProp.getAccessKey(), minioProp.getSecretKey());
|
||||||
|
boolean isExist = minioClient.bucketExists("report");
|
||||||
|
if (!isExist) {
|
||||||
|
minioClient.makeBucket("report");
|
||||||
|
logger.info("Created MinIO bucket: report");
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
logger.error("Failed to create report bucket", e);
|
||||||
|
}
|
||||||
|
|
||||||
List<RptInfoSetFile> filelist = this.rptInfoSetFileService.selectListByWhere(" where masterid='" + rptInfoSet.getId() + "' ");
|
List<RptInfoSetFile> filelist = this.rptInfoSetFileService.selectListByWhere(" where masterid='" + rptInfoSet.getId() + "' ");
|
||||||
String path = "";
|
String path = "";
|
||||||
try {
|
try {
|
||||||
@ -840,52 +861,59 @@ public class RptCreateServiceImpl implements RptCreateService {
|
|||||||
rptInfoSetFile.setAbspath(obj);
|
rptInfoSetFile.setAbspath(obj);
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
System.out.println(e);
|
logger.error("Failed to get template file from MinIO", e);
|
||||||
|
}
|
||||||
|
if (filelist == null || filelist.size() == 0) {
|
||||||
|
logger.error("No template file configured for report: {}", rptInfoSet.getId());
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
if (filelist != null && filelist.size() > 0) {
|
if (filelist != null && filelist.size() > 0) {
|
||||||
// 设定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 template 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";
|
// 更新文件扩展名(根据模板文件)
|
||||||
|
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);
|
listStyle.setBorderLeft(BorderStyle.THIN);
|
||||||
listStyle.setBorderLeft(BorderStyle.THIN);
|
listStyle.setBorderRight(BorderStyle.THIN);
|
||||||
listStyle.setBorderRight(BorderStyle.THIN);
|
listStyle.setBorderTop(BorderStyle.THIN);
|
||||||
listStyle.setBorderTop(BorderStyle.THIN);
|
listStyle.setAlignment(HorizontalAlignment.CENTER);//水平居中
|
||||||
listStyle.setAlignment(HorizontalAlignment.CENTER);//水平居中
|
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);
|
listStyle2.setBorderLeft(BorderStyle.THIN);
|
||||||
listStyle2.setBorderLeft(BorderStyle.THIN);
|
listStyle2.setBorderRight(BorderStyle.THIN);
|
||||||
listStyle2.setBorderRight(BorderStyle.THIN);
|
listStyle2.setBorderTop(BorderStyle.THIN);
|
||||||
listStyle2.setBorderTop(BorderStyle.THIN);
|
listStyle2.setAlignment(HorizontalAlignment.CENTER);//水平居中
|
||||||
listStyle2.setAlignment(HorizontalAlignment.CENTER);//水平居中
|
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 +1021,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 +1057,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 +1086,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 +1122,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 +1162,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 +1314,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) {
|
||||||
@ -1369,6 +1397,10 @@ public class RptCreateServiceImpl implements RptCreateService {
|
|||||||
//删除文件 只保留minio中的文件
|
//删除文件 只保留minio中的文件
|
||||||
File file = new File(file3);//根据指定的文件名创建File对象
|
File file = new File(file3);//根据指定的文件名创建File对象
|
||||||
file.delete();
|
file.delete();
|
||||||
|
|
||||||
|
// 保存文件路径到数据库
|
||||||
|
rptCreate.setAbspath(showname + endtype);
|
||||||
|
rptCreateDao.updateByPrimaryKeySelective(rptCreate);
|
||||||
} catch (NoSuchAlgorithmException e) {
|
} catch (NoSuchAlgorithmException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
@ -1907,4 +1939,54 @@ public class RptCreateServiceImpl implements RptCreateService {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 检查用户是否有报表生成权限
|
||||||
|
* @param rptInfoSetId 报表配置id
|
||||||
|
* @param user 当前用户
|
||||||
|
* @return true=有权限, false=无权限
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public boolean checkGeneratePermission(String rptInfoSetId, User user) {
|
||||||
|
if (user == null || rptInfoSetId == null || rptInfoSetId.isEmpty()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 管理员默认有权限
|
||||||
|
if ("emp01".equals(user.getId())) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取报表配置信息
|
||||||
|
RptInfoSet rptInfoSet = rptInfoSetService.selectById4Simple(rptInfoSetId);
|
||||||
|
if (rptInfoSet == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
String userId = user.getId();
|
||||||
|
|
||||||
|
// 检查用户是否在createusers列表中
|
||||||
|
String createusers = rptInfoSet.getCreateusers();
|
||||||
|
if (createusers != null && !createusers.isEmpty()) {
|
||||||
|
if (createusers.contains(userId)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 检查用户岗位是否在generate_position列表中
|
||||||
|
String generatePosition = rptInfoSet.getGeneratePosition();
|
||||||
|
if (generatePosition != null && !generatePosition.isEmpty()) {
|
||||||
|
// 获取用户的所有岗位
|
||||||
|
List<UserJob> userJobs = userJobService.selectListByWhere(" where userid='" + userId + "'");
|
||||||
|
if (userJobs != null && !userJobs.isEmpty()) {
|
||||||
|
for (UserJob userJob : userJobs) {
|
||||||
|
if (generatePosition.contains(userJob.getJobid())) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -10,16 +10,19 @@ import com.sipai.entity.scada.MPoint;
|
|||||||
import com.sipai.entity.scada.MPointExpand;
|
import com.sipai.entity.scada.MPointExpand;
|
||||||
import com.sipai.entity.scada.MPointHistory;
|
import com.sipai.entity.scada.MPointHistory;
|
||||||
import com.sipai.entity.user.User;
|
import com.sipai.entity.user.User;
|
||||||
|
import com.sipai.entity.user.UserJob;
|
||||||
import com.sipai.service.msg.MsgService;
|
import com.sipai.service.msg.MsgService;
|
||||||
import com.sipai.service.msg.MsgServiceImpl;
|
import com.sipai.service.msg.MsgServiceImpl;
|
||||||
import com.sipai.service.msg.MsgTypeService;
|
import com.sipai.service.msg.MsgTypeService;
|
||||||
import com.sipai.service.report.RptDayLogService;
|
import com.sipai.service.report.RptDayLogService;
|
||||||
import com.sipai.service.report.RptDayValSetService;
|
import com.sipai.service.report.RptDayValSetService;
|
||||||
import com.sipai.service.report.RptDeptSetService;
|
import com.sipai.service.report.RptDeptSetService;
|
||||||
|
import com.sipai.service.report.RptInfoSetService;
|
||||||
import com.sipai.service.scada.MPointExpandService;
|
import com.sipai.service.scada.MPointExpandService;
|
||||||
import com.sipai.service.scada.MPointHistoryService;
|
import com.sipai.service.scada.MPointHistoryService;
|
||||||
import com.sipai.service.scada.MPointService;
|
import com.sipai.service.scada.MPointService;
|
||||||
import com.sipai.service.user.UserService;
|
import com.sipai.service.user.UserService;
|
||||||
|
import com.sipai.service.user.UserJobService;
|
||||||
import com.sipai.tools.CommUtil;
|
import com.sipai.tools.CommUtil;
|
||||||
import com.sipai.tools.SpringContextUtil;
|
import com.sipai.tools.SpringContextUtil;
|
||||||
import net.sf.json.JSONArray;
|
import net.sf.json.JSONArray;
|
||||||
@ -65,6 +68,11 @@ public class RptDayLogServiceImpl implements RptDayLogService {
|
|||||||
private MsgTypeService msgtypeService;
|
private MsgTypeService msgtypeService;
|
||||||
@Resource
|
@Resource
|
||||||
private MPointExpandService mPointExpandService;
|
private MPointExpandService mPointExpandService;
|
||||||
|
@Resource
|
||||||
|
private UserJobService userJobService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private RptInfoSetService rptInfoSetService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public RptDayLog selectById(String id) {
|
public RptDayLog selectById(String id) {
|
||||||
@ -877,5 +885,88 @@ public class RptDayLogServiceImpl implements RptDayLogService {
|
|||||||
Result result = Result.success(1);
|
Result result = Result.success(1);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean checkInputPermission(String rptdeptId, User user) {
|
||||||
|
if (rptdeptId == null || user == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
RptDeptSet rptDeptSet = this.rptDeptSetService.selectById(rptdeptId);
|
||||||
|
if (rptDeptSet == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
Integer roleType = rptDeptSet.getRoleType();
|
||||||
|
String inputuser = rptDeptSet.getInputuser();
|
||||||
|
String inputjob = rptDeptSet.getInputjob();
|
||||||
|
String userId = user.getId();
|
||||||
|
|
||||||
|
// role_type=2: 不控制权限,所有人都可以填报
|
||||||
|
if (roleType != null && roleType == 2) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// role_type 为 null 或空字符串: 允许所有人
|
||||||
|
if (roleType == null || roleType == 0 && (inputuser == null || inputuser.isEmpty())
|
||||||
|
|| roleType == 1 && (inputjob == null || inputjob.isEmpty())) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// role_type=0: 按用户控制权限
|
||||||
|
if (roleType == 0) {
|
||||||
|
if (inputuser != null && !inputuser.isEmpty()) {
|
||||||
|
// 检查当前用户ID是否在inputuser中
|
||||||
|
String[] userIds = inputuser.split(",");
|
||||||
|
for (String uid : userIds) {
|
||||||
|
if (userId.equals(uid.trim())) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// role_type=1: 按岗位控制权限
|
||||||
|
if (roleType == 1) {
|
||||||
|
if (inputjob != null && !inputjob.isEmpty()) {
|
||||||
|
// 获取当前用户的所有岗位
|
||||||
|
List<UserJob> userJobs = this.userJobService.selectListByWhere("where userid = '" + userId + "'");
|
||||||
|
if (userJobs != null && !userJobs.isEmpty()) {
|
||||||
|
String[] jobIds = inputjob.split(",");
|
||||||
|
for (UserJob userJob : userJobs) {
|
||||||
|
String userJobId = userJob.getJobid();
|
||||||
|
for (String jobId : jobIds) {
|
||||||
|
if (userJobId != null && userJobId.equals(jobId.trim())) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean checkGeneratePermission(String rptdeptId, User user) {
|
||||||
|
if (rptdeptId == null || user == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
RptDeptSet rptDeptSet = this.rptDeptSetService.selectById(rptdeptId);
|
||||||
|
if (rptDeptSet == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
String rptInfoSetId = rptDeptSet.getBizId(); // 假设bizId是RptInfoSet的ID
|
||||||
|
if (rptInfoSetId == null || rptInfoSetId.isEmpty()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return this.rptInfoSetService.checkGeneratePermission(rptInfoSetId, user);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -615,4 +615,49 @@ public class RptInfoSetServiceImpl implements RptInfoSetService {
|
|||||||
}
|
}
|
||||||
return list_result;
|
return list_result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean checkGeneratePermission(String rptInfoSetId, User user) {
|
||||||
|
if (rptInfoSetId == null || user == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
RptInfoSet rptInfoSet = this.selectById(rptInfoSetId);
|
||||||
|
if (rptInfoSet == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
String userId = user.getId();
|
||||||
|
String createusers = rptInfoSet.getCreateusers();
|
||||||
|
String generatePosition = rptInfoSet.getGeneratePosition();
|
||||||
|
|
||||||
|
// 检查createusers
|
||||||
|
if (createusers != null && !createusers.isEmpty()) {
|
||||||
|
String[] userIds = createusers.split(",");
|
||||||
|
for (String uid : userIds) {
|
||||||
|
if (userId.equals(uid.trim())) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 检查generatePosition
|
||||||
|
if (generatePosition != null && !generatePosition.isEmpty()) {
|
||||||
|
// 获取当前用户的所有岗位
|
||||||
|
List<UserJob> userJobs = userJobService.selectListByWhere("where userid = '" + userId + "'");
|
||||||
|
if (userJobs != null && !userJobs.isEmpty()) {
|
||||||
|
String[] jobIds = generatePosition.split(",");
|
||||||
|
for (UserJob userJob : userJobs) {
|
||||||
|
String userJobId = userJob.getJobid();
|
||||||
|
for (String jobId : jobIds) {
|
||||||
|
if (userJobId != null && userJobId.equals(jobId.trim())) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -47,12 +47,22 @@ public class SafetyCheckActivityService {
|
|||||||
if (processDefinitions == null || processDefinitions.size() == 0) {
|
if (processDefinitions == null || processDefinitions.size() == 0) {
|
||||||
return Result.failed(company.getName() + "缺少该流程定义。");
|
return Result.failed(company.getName() + "缺少该流程定义。");
|
||||||
}
|
}
|
||||||
|
// 防止重复发起:若该业务已有运行中的流程实例,则跳过,避免创建双倍待办任务
|
||||||
|
List<org.activiti.engine.runtime.ProcessInstance> existingInstances = workflowService.getRuntimeService()
|
||||||
|
.createProcessInstanceQuery()
|
||||||
|
.processDefinitionKey(processKey)
|
||||||
|
.processInstanceBusinessKey(bizId)
|
||||||
|
.active()
|
||||||
|
.list();
|
||||||
|
if (existingInstances != null && !existingInstances.isEmpty()) {
|
||||||
|
return Result.success();
|
||||||
|
}
|
||||||
// 启动流程实例
|
// 启动流程实例
|
||||||
// 设置网关条件
|
// 设置网关条件
|
||||||
Map<String, Object> map = new HashMap<>();
|
Map<String, Object> map = new HashMap<>();
|
||||||
map.put(CommString.ACTI_KEK_Condition, 1);
|
map.put(CommString.ACTI_KEK_Condition, 1);
|
||||||
map.put(CommString.ACTI_KEK_Assignee, applyUserId);
|
map.put(CommString.ACTI_KEK_Assignee, applyUserId);
|
||||||
map.put(CommString.ACTI_KEK_Candidate_Users, applyUserId);
|
map.put(CommString.ACTI_KEK_Candidate_Users, "");
|
||||||
|
|
||||||
// 启动流程
|
// 启动流程
|
||||||
ProcessInstance processInstance = workflowService.startWorkflow(
|
ProcessInstance processInstance = workflowService.startWorkflow(
|
||||||
@ -71,7 +81,7 @@ public class SafetyCheckActivityService {
|
|||||||
Map<String, Object> map2 = new HashMap<>();
|
Map<String, Object> map2 = new HashMap<>();
|
||||||
map2.put(CommString.ACTI_KEK_Condition, 1);
|
map2.put(CommString.ACTI_KEK_Condition, 1);
|
||||||
map2.put(CommString.ACTI_KEK_Assignee, nextUserId);
|
map2.put(CommString.ACTI_KEK_Assignee, nextUserId);
|
||||||
map2.put(CommString.ACTI_KEK_Candidate_Users, nextUserId);
|
map2.put(CommString.ACTI_KEK_Candidate_Users, "");
|
||||||
workflowService.getTaskService().complete(task.getId(), map2);
|
workflowService.getTaskService().complete(task.getId(), map2);
|
||||||
|
|
||||||
return Result.success();
|
return Result.success();
|
||||||
@ -84,13 +94,16 @@ 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, "");
|
||||||
workflowService.getTaskService().complete(task.getId(), map);
|
// 只完成第一个任务,防止多任务场景下指数级创建待办(如因重复发起导致有多个并发任务时)
|
||||||
|
workflowService.getTaskService().complete(tasks.get(0).getId(), map);
|
||||||
return Result.success();
|
return Result.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -101,6 +101,9 @@ public class SafetyFilesService implements CommService<SafetyFiles> {
|
|||||||
MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
|
MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
|
||||||
List<MultipartFile> files = multipartRequest.getFiles("file");
|
List<MultipartFile> files = multipartRequest.getFiles("file");
|
||||||
for (MultipartFile mfile : files) {
|
for (MultipartFile mfile : files) {
|
||||||
|
if (mfile == null || mfile.getSize() == 0) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
String suffix = mfile.getOriginalFilename().substring(mfile.getOriginalFilename().lastIndexOf("."));
|
String suffix = mfile.getOriginalFilename().substring(mfile.getOriginalFilename().lastIndexOf("."));
|
||||||
|
|
||||||
//判断保存文件的路径是否存在
|
//判断保存文件的路径是否存在
|
||||||
|
|||||||
@ -100,44 +100,65 @@ public class SafetyFlowTaskService implements CommService<SafetyFlowTask> {
|
|||||||
String copyNames,
|
String copyNames,
|
||||||
String record) throws ServiceException {
|
String record) throws ServiceException {
|
||||||
|
|
||||||
SafetyFlowTask safetyFlowTask;
|
SafetyFlowTask safetyFlowTask = null;
|
||||||
List<SafetyFlowTask> list = selectListByWhere(" where biz_id='" + bizId + "' order by create_time desc");
|
List<SafetyFlowTask> list = selectListByWhere(" where biz_id='" + bizId + "' order by create_time desc");
|
||||||
if (list != null && list.size() != 0 && list.get(0).getTaskName().equals(taskTitle)) {
|
|
||||||
safetyFlowTask = list.get(0);
|
// 查找是否已存在相同taskTitle的记录
|
||||||
safetyFlowTask.setIsDone(true);
|
SafetyFlowTask existingTask = null;
|
||||||
safetyFlowTask.setCopy(copyNames);
|
if (list != null && !list.isEmpty()) {
|
||||||
safetyFlowTask.setDoneTime(DateUtil.toStr(null, new Date()));
|
for (SafetyFlowTask task : list) {
|
||||||
update(safetyFlowTask);
|
if (task.getTaskName().equals(taskTitle)) {
|
||||||
} else if (list != null && list.size() != 0 && !list.get(0).getTaskName().equals(taskTitle)) {
|
existingTask = task;
|
||||||
safetyFlowTask = list.get(0);
|
break;
|
||||||
safetyFlowTask.setIsDone(true);
|
}
|
||||||
safetyFlowTask.setCopy(copyNames);
|
}
|
||||||
safetyFlowTask.setDoneTime(DateUtil.toStr(null, new Date()));
|
|
||||||
update(safetyFlowTask);
|
|
||||||
|
|
||||||
safetyFlowTask = new SafetyFlowTask();
|
|
||||||
|
|
||||||
safetyFlowTask.setId(UUID.randomUUID().toString());
|
|
||||||
safetyFlowTask.setBizId(bizId);
|
|
||||||
safetyFlowTask.setTaskName(taskTitle);
|
|
||||||
safetyFlowTask.setIsDone(isDone);
|
|
||||||
safetyFlowTask.setDoneTime(isDone ? DateUtil.toStr(null, new Date()) : null);
|
|
||||||
safetyFlowTask.setAuditor(auditorName);
|
|
||||||
safetyFlowTask.setCopy(copyNames);
|
|
||||||
save(safetyFlowTask);
|
|
||||||
|
|
||||||
} else {
|
|
||||||
safetyFlowTask = new SafetyFlowTask();
|
|
||||||
|
|
||||||
safetyFlowTask.setId(UUID.randomUUID().toString());
|
|
||||||
safetyFlowTask.setBizId(bizId);
|
|
||||||
safetyFlowTask.setTaskName(taskTitle);
|
|
||||||
safetyFlowTask.setIsDone(isDone);
|
|
||||||
safetyFlowTask.setDoneTime(isDone ? DateUtil.toStr(null, new Date()) : null);
|
|
||||||
safetyFlowTask.setAuditor(auditorName);
|
|
||||||
safetyFlowTask.setCopy(copyNames);
|
|
||||||
save(safetyFlowTask);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isDone) {
|
||||||
|
// 标记任务为完成
|
||||||
|
if (existingTask != null) {
|
||||||
|
// 更新已存在的记录
|
||||||
|
existingTask.setIsDone(true);
|
||||||
|
existingTask.setCopy(copyNames);
|
||||||
|
existingTask.setDoneTime(DateUtil.toStr(null, new Date()));
|
||||||
|
update(existingTask);
|
||||||
|
safetyFlowTask = existingTask;
|
||||||
|
} else {
|
||||||
|
// 创建新的完成记录
|
||||||
|
safetyFlowTask = new SafetyFlowTask();
|
||||||
|
safetyFlowTask.setId(UUID.randomUUID().toString());
|
||||||
|
safetyFlowTask.setBizId(bizId);
|
||||||
|
safetyFlowTask.setTaskName(taskTitle);
|
||||||
|
safetyFlowTask.setIsDone(true);
|
||||||
|
safetyFlowTask.setDoneTime(DateUtil.toStr(null, new Date()));
|
||||||
|
safetyFlowTask.setAuditor(auditorName);
|
||||||
|
safetyFlowTask.setCopy(copyNames);
|
||||||
|
save(safetyFlowTask);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// 创建待处理任务
|
||||||
|
if (existingTask == null) {
|
||||||
|
// 不存在才创建
|
||||||
|
safetyFlowTask = new SafetyFlowTask();
|
||||||
|
safetyFlowTask.setId(UUID.randomUUID().toString());
|
||||||
|
safetyFlowTask.setBizId(bizId);
|
||||||
|
safetyFlowTask.setTaskName(taskTitle);
|
||||||
|
safetyFlowTask.setIsDone(false);
|
||||||
|
safetyFlowTask.setDoneTime(null);
|
||||||
|
safetyFlowTask.setAuditor(auditorName);
|
||||||
|
safetyFlowTask.setCopy(copyNames);
|
||||||
|
save(safetyFlowTask);
|
||||||
|
} else {
|
||||||
|
// 已存在,重置为待处理状态(用于流程回退后重新处理)
|
||||||
|
existingTask.setIsDone(false);
|
||||||
|
existingTask.setDoneTime(null);
|
||||||
|
existingTask.setAuditor(auditorName);
|
||||||
|
existingTask.setCopy(copyNames);
|
||||||
|
update(existingTask);
|
||||||
|
safetyFlowTask = existingTask;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (StringUtils.isNotEmpty(record)) {
|
if (StringUtils.isNotEmpty(record)) {
|
||||||
SafetyFlowTaskDetail safetyFlowTaskDetail = new SafetyFlowTaskDetail();
|
SafetyFlowTaskDetail safetyFlowTaskDetail = new SafetyFlowTaskDetail();
|
||||||
safetyFlowTaskDetail.setId(UUID.randomUUID().toString());
|
safetyFlowTaskDetail.setId(UUID.randomUUID().toString());
|
||||||
|
|||||||
@ -1474,7 +1474,7 @@ public class MPointService {
|
|||||||
if (DateUtil.isCellDateFormatted(cell)) {
|
if (DateUtil.isCellDateFormatted(cell)) {
|
||||||
//用于转化为日期格式
|
//用于转化为日期格式
|
||||||
Date d = cell.getDateCellValue();
|
Date d = cell.getDateCellValue();
|
||||||
SimpleDateFormat formater = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
|
SimpleDateFormat formater = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||||
String cellDate = formater.format(d);
|
String cellDate = formater.format(d);
|
||||||
return cellDate;
|
return cellDate;
|
||||||
} else {
|
} else {
|
||||||
@ -1510,7 +1510,7 @@ public class MPointService {
|
|||||||
if (DateUtil.isCellDateFormatted(cell)) {
|
if (DateUtil.isCellDateFormatted(cell)) {
|
||||||
//用于转化为日期格式
|
//用于转化为日期格式
|
||||||
Date d = cell.getDateCellValue();
|
Date d = cell.getDateCellValue();
|
||||||
SimpleDateFormat formater = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
|
SimpleDateFormat formater = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||||
String cellDate = formater.format(d);
|
String cellDate = formater.format(d);
|
||||||
return cellDate;
|
return cellDate;
|
||||||
} else {
|
} else {
|
||||||
@ -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();
|
||||||
|
|||||||
@ -26,24 +26,27 @@ import java.io.InputStream;
|
|||||||
import java.io.OutputStream;
|
import java.io.OutputStream;
|
||||||
import java.net.URLEncoder;
|
import java.net.URLEncoder;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
import static org.apache.poi.ss.usermodel.CellType.STRING;
|
import static org.apache.poi.ss.usermodel.CellType.STRING;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
public class SewageService implements CommService<Sewage>{
|
public class SewageService implements CommService<Sewage> {
|
||||||
@Resource
|
@Resource
|
||||||
private SewageDao SewageDao;
|
private SewageDao SewageDao;
|
||||||
@Resource
|
@Resource
|
||||||
private UnitService unitService;
|
private UnitService unitService;
|
||||||
@Resource
|
@Resource
|
||||||
private CompanyService companyService;
|
private CompanyService companyService;
|
||||||
@Resource
|
@Resource
|
||||||
private ProcessSectionService processSectionService;
|
private ProcessSectionService processSectionService;
|
||||||
@Resource
|
@Resource
|
||||||
private SewageInputService sewageInputService;
|
private SewageInputService sewageInputService;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private JsywPointService jsywPointService;
|
private JsywPointService jsywPointService;
|
||||||
|
|
||||||
@ -62,84 +65,108 @@ public class SewageService implements CommService<Sewage>{
|
|||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Sewage selectById(String id) {
|
public Sewage selectById(String id) {
|
||||||
Sewage sewage = SewageDao.selectByPrimaryKey(id);
|
Sewage sewage = SewageDao.selectByPrimaryKey(id);
|
||||||
sewage.setCompany(this.unitService.getCompById(sewage.getUnitId()));
|
sewage.setCompany(this.unitService.getCompById(sewage.getUnitId()));
|
||||||
ProcessSection processSection = this.getProcessSectionByStoredValue(sewage.getProcessSectionId());
|
ProcessSection processSection = this.getProcessSectionByStoredValue(sewage.getProcessSectionId());
|
||||||
if (processSection != null) {
|
if (processSection != null) {
|
||||||
sewage.setProcessSection(processSection);
|
sewage.setProcessSection(processSection);
|
||||||
}
|
}
|
||||||
List<SewageInput> sewageInputList = this.sewageInputService.selectListByWhere("where sewage_id='"+sewage.getContractNumber()+"' order by insdt");
|
List<SewageInput> sewageInputList = this.sewageInputService.selectListByWhere("where sewage_id='" + sewage.getContractNumber() + "' order by insdt");
|
||||||
if(sewageInputList!=null && sewageInputList.size()>0){
|
if (sewageInputList != null && sewageInputList.size() > 0) {
|
||||||
sewage.set_input(true);
|
sewage.set_input(true);
|
||||||
}else{
|
} else {
|
||||||
sewage.set_input(false);
|
sewage.set_input(false);
|
||||||
}
|
}
|
||||||
List<JsywPoint> jsywPointList = this.jsywPointService.selectListByWhere("where psname='"+sewage.getName()+"' order by update_date");
|
List<JsywPoint> jsywPointList = this.jsywPointService.selectListByWhere("where psname='" + sewage.getName() + "' order by update_date");
|
||||||
if(jsywPointList!=null && jsywPointList.size()>0){
|
if (jsywPointList != null && jsywPointList.size() > 0) {
|
||||||
sewage.set_point(true);
|
sewage.set_point(true);
|
||||||
}else{
|
} else {
|
||||||
sewage.set_point(false);
|
sewage.set_point(false);
|
||||||
}
|
}
|
||||||
return sewage;
|
return sewage;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public int deleteById(String id) {
|
|
||||||
return SewageDao.deleteByPrimaryKey(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int save(Sewage sewage) {
|
|
||||||
return SewageDao.insert(sewage);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int update(Sewage sewage) {
|
|
||||||
return SewageDao.updateByPrimaryKeySelective(sewage);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<Sewage> selectListByWhere(String wherestr) {
|
public int deleteById(String id) {
|
||||||
Sewage sewage = new Sewage();
|
return SewageDao.deleteByPrimaryKey(id);
|
||||||
sewage.setWhere(wherestr);
|
}
|
||||||
List<Sewage> list = SewageDao.selectListByWhere(sewage);
|
|
||||||
for (Sewage item : list) {
|
@Override
|
||||||
item.setCompany(this.unitService.getCompById(item.getUnitId()));
|
public int save(Sewage sewage) {
|
||||||
ProcessSection processSection = this.getProcessSectionByStoredValue(item.getProcessSectionId());
|
return SewageDao.insert(sewage);
|
||||||
if (processSection != null) {
|
}
|
||||||
item.setProcessSection(processSection);
|
|
||||||
}
|
@Override
|
||||||
List<SewageInput> sewageInputList = this.sewageInputService.selectListByWhere4Pure("where sewage_id='"+item.getContractNumber()+"' order by insdt");
|
public int update(Sewage sewage) {
|
||||||
if(sewageInputList!=null && sewageInputList.size()>0){
|
return SewageDao.updateByPrimaryKeySelective(sewage);
|
||||||
item.set_input(true);
|
}
|
||||||
}else{
|
|
||||||
|
@Override
|
||||||
|
public List<Sewage> selectListByWhere(String wherestr) {
|
||||||
|
Sewage sewage = new Sewage();
|
||||||
|
sewage.setWhere(wherestr);
|
||||||
|
List<Sewage> list = SewageDao.selectListByWhere(sewage);
|
||||||
|
for (Sewage item : list) {
|
||||||
|
item.setCompany(this.unitService.getCompById(item.getUnitId()));
|
||||||
|
ProcessSection processSection = this.getProcessSectionByStoredValue(item.getProcessSectionId());
|
||||||
|
if (processSection != null) {
|
||||||
|
item.setProcessSection(processSection);
|
||||||
|
}
|
||||||
|
List<SewageInput> sewageInputList = this.sewageInputService.selectListByWhere4Pure("where sewage_id='" + item.getContractNumber() + "' order by insdt");
|
||||||
|
if (sewageInputList != null && sewageInputList.size() > 0) {
|
||||||
|
item.set_input(true);
|
||||||
|
} else {
|
||||||
item.set_input(false);
|
item.set_input(false);
|
||||||
}
|
}
|
||||||
List<JsywPoint> jsywPointList = this.jsywPointService.selectListByWhere("where psname='"+item.getName()+"' order by update_date");
|
List<JsywPoint> jsywPointList = this.jsywPointService.selectListByWhere("where psname='" + item.getName() + "' order by update_date");
|
||||||
if(jsywPointList!=null && jsywPointList.size()>0){
|
if (jsywPointList != null && jsywPointList.size() > 0) {
|
||||||
item.set_point(true);
|
item.set_point(true);
|
||||||
}else{
|
} else {
|
||||||
item.set_point(false);
|
item.set_point(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
@Override
|
|
||||||
public int deleteByWhere(String wherestr) {
|
@Override
|
||||||
Sewage sewage = new Sewage();
|
public int deleteByWhere(String wherestr) {
|
||||||
sewage.setWhere(wherestr);
|
Sewage sewage = new Sewage();
|
||||||
return SewageDao.deleteByWhere(sewage);
|
sewage.setWhere(wherestr);
|
||||||
}
|
return SewageDao.deleteByWhere(sewage);
|
||||||
|
}
|
||||||
|
|
||||||
public List<Sewage> selectDistinctCityByWhere(String wherestr) {
|
public List<Sewage> selectDistinctCityByWhere(String wherestr) {
|
||||||
Sewage sewage = new Sewage();
|
Sewage sewage = new Sewage();
|
||||||
sewage.setWhere(wherestr);
|
sewage.setWhere(wherestr);
|
||||||
List<Sewage> list = SewageDao.selectDistinctCityByWhere(sewage);
|
List<Sewage> list = SewageDao.selectDistinctCityByWhere(sewage);
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean existsByContractNumber(String contractNumber) {
|
||||||
|
if (contractNumber == null || contractNumber.trim().isEmpty()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
Integer count = SewageDao.selectCountByContractNumber(contractNumber.trim());
|
||||||
|
return count != null && count > 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean existsByContractNumberExcludeId(String contractNumber, String id) {
|
||||||
|
if (contractNumber == null || contractNumber.trim().isEmpty()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (id == null || id.trim().isEmpty()) {
|
||||||
|
return existsByContractNumber(contractNumber);
|
||||||
|
}
|
||||||
|
Map<String, String> params = new HashMap<String, String>();
|
||||||
|
params.put("contractNumber", contractNumber.trim());
|
||||||
|
params.put("id", id.trim());
|
||||||
|
Integer count = SewageDao.selectCountByContractNumberExcludeId(params);
|
||||||
|
return count != null && count > 0;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* xls文件数据转换
|
* xls文件数据转换
|
||||||
*
|
*
|
||||||
@ -154,24 +181,26 @@ public class SewageService implements CommService<Sewage>{
|
|||||||
return cell.getCellFormula();
|
return cell.getCellFormula();
|
||||||
case NUMERIC:
|
case NUMERIC:
|
||||||
|
|
||||||
//判断是否为日期类型
|
//判断是否为日期类型
|
||||||
if (DateUtil.isCellDateFormatted(cell)) {
|
if (DateUtil.isCellDateFormatted(cell)) {
|
||||||
//用于转化为日期格式
|
//用于转化为日期格式
|
||||||
Date d = cell.getDateCellValue();
|
Date d = cell.getDateCellValue();
|
||||||
SimpleDateFormat formater = new SimpleDateFormat("yyyy-MM-dd");
|
SimpleDateFormat formater = new SimpleDateFormat("yyyy-MM-dd");
|
||||||
String cellDate = formater.format(d);
|
String cellDate = formater.format(d);
|
||||||
return cellDate;
|
return cellDate;
|
||||||
} else {
|
} else {
|
||||||
cell.setCellType(STRING);
|
cell.setCellType(STRING);
|
||||||
return cell.getStringCellValue();
|
return cell.getStringCellValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
case STRING:
|
case STRING:
|
||||||
return cell.getStringCellValue();
|
return cell.getStringCellValue();
|
||||||
default:
|
default:
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
} private String getBizId(String bizName) {
|
}
|
||||||
|
|
||||||
|
private String getBizId(String bizName) {
|
||||||
String bizId = "";
|
String bizId = "";
|
||||||
List<Company> CompanyList = this.companyService.selectListByWhere("where sname = '" + bizName + "' or name = '" + bizName + "' ");
|
List<Company> CompanyList = this.companyService.selectListByWhere("where sname = '" + bizName + "' or name = '" + bizName + "' ");
|
||||||
if (CompanyList != null && CompanyList.size() > 0) {
|
if (CompanyList != null && CompanyList.size() > 0) {
|
||||||
@ -201,20 +230,20 @@ public class SewageService implements CommService<Sewage>{
|
|||||||
int maxCellNum = row.getLastCellNum();//最后一列
|
int maxCellNum = row.getLastCellNum();//最后一列
|
||||||
|
|
||||||
Sewage sewage = new Sewage();
|
Sewage sewage = new Sewage();
|
||||||
|
|
||||||
HSSFCell cell = row.getCell(1);
|
HSSFCell cell = row.getCell(1);
|
||||||
if (getStringVal(cell)==null) {
|
if (getStringVal(cell) == null) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
sewage.setContractNumber(getStringVal(cell));
|
sewage.setContractNumber(getStringVal(cell));
|
||||||
|
|
||||||
cell = row.getCell(2);
|
cell = row.getCell(2);
|
||||||
System.out.println(getStringVal(cell));
|
System.out.println(getStringVal(cell));
|
||||||
sewage.setContractOrder(Integer.parseInt(getStringVal(cell)));
|
sewage.setContractOrder(Integer.parseInt(getStringVal(cell)));
|
||||||
|
|
||||||
cell = row.getCell(3);
|
cell = row.getCell(3);
|
||||||
sewage.setName(getStringVal(cell));
|
sewage.setName(getStringVal(cell));
|
||||||
|
|
||||||
cell = row.getCell(4);
|
cell = row.getCell(4);
|
||||||
sewage.setAddress(getStringVal(cell));
|
sewage.setAddress(getStringVal(cell));
|
||||||
cell = row.getCell(5);
|
cell = row.getCell(5);
|
||||||
@ -224,10 +253,10 @@ public class SewageService implements CommService<Sewage>{
|
|||||||
cell = row.getCell(7);
|
cell = row.getCell(7);
|
||||||
sewage.setPhone(getStringVal(cell));
|
sewage.setPhone(getStringVal(cell));
|
||||||
cell = row.getCell(8);
|
cell = row.getCell(8);
|
||||||
List<ProcessSection> processSectionList = this.processSectionService.selectListByWhere("where name = '"+getStringVal(cell)+"' and unit_id = 'JSBZ'");
|
List<ProcessSection> processSectionList = this.processSectionService.selectListByWhere("where name = '" + getStringVal(cell) + "' and unit_id = 'JSBZ'");
|
||||||
if (processSectionList.size()>0) {
|
if (processSectionList.size() > 0) {
|
||||||
sewage.setProcessSectionId(processSectionList.get(0)==null?"":processSectionList.get(0).getCode());
|
sewage.setProcessSectionId(processSectionList.get(0) == null ? "" : processSectionList.get(0).getCode());
|
||||||
}
|
}
|
||||||
cell = row.getCell(9);
|
cell = row.getCell(9);
|
||||||
sewage.setUnitId(this.getBizId(getStringVal(cell)));
|
sewage.setUnitId(this.getBizId(getStringVal(cell)));
|
||||||
cell = row.getCell(10);
|
cell = row.getCell(10);
|
||||||
@ -241,7 +270,7 @@ public class SewageService implements CommService<Sewage>{
|
|||||||
cell = row.getCell(14);
|
cell = row.getCell(14);
|
||||||
sewage.setPermit(getStringVal(cell));
|
sewage.setPermit(getStringVal(cell));
|
||||||
cell = row.getCell(15);
|
cell = row.getCell(15);
|
||||||
sewage.setDisplacement(Integer.parseInt((getStringVal(cell)==null?"0":getStringVal(cell))));
|
sewage.setDisplacement(Integer.parseInt((getStringVal(cell) == null ? "0" : getStringVal(cell))));
|
||||||
cell = row.getCell(16);
|
cell = row.getCell(16);
|
||||||
sewage.setStandard(getStringVal(cell));
|
sewage.setStandard(getStringVal(cell));
|
||||||
cell = row.getCell(17);
|
cell = row.getCell(17);
|
||||||
@ -254,30 +283,30 @@ public class SewageService implements CommService<Sewage>{
|
|||||||
sewage.setAttribute(getStringVal(cell));
|
sewage.setAttribute(getStringVal(cell));
|
||||||
cell = row.getCell(27);
|
cell = row.getCell(27);
|
||||||
sewage.setRemark(getStringVal(cell));
|
sewage.setRemark(getStringVal(cell));
|
||||||
|
|
||||||
// sewage.setVentNum(ventNum);
|
// sewage.setVentNum(ventNum);
|
||||||
|
|
||||||
sewage.setId(CommUtil.getUUID());
|
sewage.setId(CommUtil.getUUID());
|
||||||
|
|
||||||
List<Sewage> selectListByWhere = this.selectListByWhere("where contract_number = '"+sewage.getContractNumber()+"'");
|
List<Sewage> selectListByWhere = this.selectListByWhere("where contract_number = '" + sewage.getContractNumber() + "'");
|
||||||
if (selectListByWhere!=null&&selectListByWhere.size()>0) {
|
if (selectListByWhere != null && selectListByWhere.size() > 0) {
|
||||||
sewage.setId(selectListByWhere.get(0).getId());
|
sewage.setId(selectListByWhere.get(0).getId());
|
||||||
|
|
||||||
int result = this.update(sewage);
|
int result = this.update(sewage);
|
||||||
if (result == 1) {
|
if (result == 1) {
|
||||||
sumNum++;
|
sumNum++;
|
||||||
} else {
|
} else {
|
||||||
failNum++;
|
failNum++;
|
||||||
}
|
}
|
||||||
}else {
|
} else {
|
||||||
|
|
||||||
int result = this.save(sewage);
|
int result = this.save(sewage);
|
||||||
if (result == 1) {
|
if (result == 1) {
|
||||||
sumNum++;
|
sumNum++;
|
||||||
} else {
|
} else {
|
||||||
failNum++;
|
failNum++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -293,8 +322,12 @@ public class SewageService implements CommService<Sewage>{
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void outExcelFun(HttpServletResponse response) throws IOException {
|
public void outExcelFun(HttpServletResponse response) throws IOException {
|
||||||
String fileName = "金山排海工程有限公司纳管企业表.xls";
|
outExcelFun(response, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void outExcelFun(HttpServletResponse response, String ids) throws IOException {
|
||||||
|
String fileName = "金山卫污水厂纳管企业表.xls";
|
||||||
String title = "纳管企业";
|
String title = "纳管企业";
|
||||||
// 声明一个工作薄
|
// 声明一个工作薄
|
||||||
HSSFWorkbook workbook = new HSSFWorkbook();
|
HSSFWorkbook workbook = new HSSFWorkbook();
|
||||||
@ -372,7 +405,7 @@ public class SewageService implements CommService<Sewage>{
|
|||||||
|
|
||||||
//产生表格表头
|
//产生表格表头
|
||||||
String excelTitleStr = "序号,合同编号,合同顺序,单位名称,单位地址,合同到期日,联系人,联系电话,*所属泵站,*所属车间,排污许可证编号,雨、污水管平面图,环评报告/登记表/批复,所属行业,排水许可证(编号)复印件/申请表,实际日排量(吨/天),排放标准(排水许可证),管网所有权单位,统一社会信用代码,地址位置(经纬度),接入管网坐标-经度(度),接入管网坐标-经度(分),接入管网坐标-经度(秒),接入管网坐标-纬度(度),接入管网坐标-纬度(分),接入管网坐标-纬度(秒),管网属性(分流/合流),备注";
|
String excelTitleStr = "序号,合同编号,合同顺序,单位名称,单位地址,合同到期日,联系人,联系电话,*所属泵站,*所属车间,排污许可证编号,雨、污水管平面图,环评报告/登记表/批复,所属行业,排水许可证(编号)复印件/申请表,实际日排量(吨/天),排放标准(排水许可证),管网所有权单位,统一社会信用代码,地址位置(经纬度),接入管网坐标-经度(度),接入管网坐标-经度(分),接入管网坐标-经度(秒),接入管网坐标-纬度(度),接入管网坐标-纬度(分),接入管网坐标-纬度(秒),管网属性(分流/合流),备注";
|
||||||
|
|
||||||
String[] excelTitle = excelTitleStr.split(",");
|
String[] excelTitle = excelTitleStr.split(",");
|
||||||
HSSFRow row = sheet.createRow(1);
|
HSSFRow row = sheet.createRow(1);
|
||||||
row.setHeight((short) 800);
|
row.setHeight((short) 800);
|
||||||
@ -418,17 +451,17 @@ public class SewageService implements CommService<Sewage>{
|
|||||||
handRow.setHeight((short) 500);
|
handRow.setHeight((short) 500);
|
||||||
HSSFCell cell = handRow.createCell(0);
|
HSSFCell cell = handRow.createCell(0);
|
||||||
cell.setCellStyle(headStyle);
|
cell.setCellStyle(headStyle);
|
||||||
cell.setCellValue("金山排海工程有限公司纳管企业表");
|
cell.setCellValue("金山卫污水厂纳管企业表");
|
||||||
// 说明
|
// 说明
|
||||||
// HSSFCell smcell = handRow.createCell(5);
|
// HSSFCell smcell = handRow.createCell(5);
|
||||||
// smcell.setCellStyle(tipStyle);
|
// smcell.setCellStyle(tipStyle);
|
||||||
// smcell.setCellValue("注:日期格式(xxxx-xx-xx或xxxx/xx/xx), 班组类型,班组, 班次(根据系统配置名称填写),模式(填写巡检菜单里面的巡检模式) 排版日期,班组类型,班组,班次,模式都为必填项(集控班组可不填模式)。");
|
// smcell.setCellValue("注:日期格式(xxxx-xx-xx或xxxx/xx/xx), 班组类型,班组, 班次(根据系统配置名称填写),模式(填写巡检菜单里面的巡检模式) 排版日期,班组类型,班组,班次,模式都为必填项(集控班组可不填模式)。");
|
||||||
|
|
||||||
List<Sewage> list = this.selectListByWhere("where 1=1 order by contract_order asc");
|
List<Sewage> list = this.selectListByWhere(buildExportWhere(ids));
|
||||||
int n = 1;
|
int n = 1;
|
||||||
if (list != null && list.size() > 0) {
|
if (list != null && list.size() > 0) {
|
||||||
for (int i = 0; i < list.size(); i++) {
|
for (int i = 0; i < list.size(); i++) {
|
||||||
Sewage sewage = list.get(i);
|
Sewage sewage = list.get(i);
|
||||||
HSSFRow listrow1 = sheet.createRow(i + 2);
|
HSSFRow listrow1 = sheet.createRow(i + 2);
|
||||||
listrow1.setHeight((short) 400);
|
listrow1.setHeight((short) 400);
|
||||||
HSSFCell listcell0 = listrow1.createCell(0);
|
HSSFCell listcell0 = listrow1.createCell(0);
|
||||||
@ -441,7 +474,7 @@ public class SewageService implements CommService<Sewage>{
|
|||||||
|
|
||||||
HSSFCell listcell2 = listrow1.createCell(2);
|
HSSFCell listcell2 = listrow1.createCell(2);
|
||||||
listcell2.setCellStyle(listStyle);
|
listcell2.setCellStyle(listStyle);
|
||||||
listcell2.setCellValue(sewage.getContractOrder());
|
listcell2.setCellValue(sewage.getContractOrder() == null ? 1 : sewage.getContractOrder());
|
||||||
|
|
||||||
HSSFCell listcell3 = listrow1.createCell(3);
|
HSSFCell listcell3 = listrow1.createCell(3);
|
||||||
listcell3.setCellStyle(listStyle);
|
listcell3.setCellStyle(listStyle);
|
||||||
@ -501,7 +534,7 @@ public class SewageService implements CommService<Sewage>{
|
|||||||
|
|
||||||
HSSFCell listcell15 = listrow1.createCell(15);
|
HSSFCell listcell15 = listrow1.createCell(15);
|
||||||
listcell15.setCellStyle(listStyle);
|
listcell15.setCellStyle(listStyle);
|
||||||
listcell15.setCellValue((sewage.getDisplacement()==null?0:sewage.getDisplacement()));
|
listcell15.setCellValue((sewage.getDisplacement() == null ? 0 : sewage.getDisplacement()));
|
||||||
|
|
||||||
HSSFCell listcell16 = listrow1.createCell(16);
|
HSSFCell listcell16 = listrow1.createCell(16);
|
||||||
listcell16.setCellStyle(listStyle);
|
listcell16.setCellStyle(listStyle);
|
||||||
@ -572,31 +605,56 @@ public class SewageService implements CommService<Sewage>{
|
|||||||
workbook.close();
|
workbook.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
|
private String buildExportWhere(String ids) {
|
||||||
|
String orderBy = " order by contract_order asc";
|
||||||
|
if (ids == null || ids.trim().isEmpty()) {
|
||||||
|
return "where 1=1" + orderBy;
|
||||||
|
}
|
||||||
|
String[] arr = ids.split(",");
|
||||||
|
List<String> idList = new ArrayList<String>();
|
||||||
|
for (String item : arr) {
|
||||||
|
if (item == null) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
String id = item.trim();
|
||||||
|
if (!id.isEmpty() && id.matches("[A-Za-z0-9-]+")) {
|
||||||
|
idList.add("'" + id + "'");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (idList.isEmpty()) {
|
||||||
|
return "where 1=1" + orderBy;
|
||||||
|
}
|
||||||
|
String idstr = String.join(",", idList);
|
||||||
|
return "where id in (" + idstr + ")" + orderBy;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
* 获取树,三层结构,processSection为根节点,sewage为子节点
|
* 获取树,三层结构,processSection为根节点,sewage为子节点
|
||||||
* @方法名:getTreeList
|
*
|
||||||
* @参数 @param
|
* @方法名:getTreeList
|
||||||
* @参数 @return
|
* @参数 @param
|
||||||
|
* @参数 @return
|
||||||
* @返回类型 String
|
* @返回类型 String
|
||||||
*/
|
*/
|
||||||
public String getTreeList(List<Sewage> list) {
|
public String getTreeList(List<Sewage> list) {
|
||||||
JSONArray list_result = new JSONArray();
|
JSONArray list_result = new JSONArray();
|
||||||
if(list!=null && list.size()>0){
|
if (list != null && list.size() > 0) {
|
||||||
String processSectionId = null;
|
String processSectionId = null;
|
||||||
String unitId = null;
|
String unitId = null;
|
||||||
JSONObject root_childs = new JSONObject();
|
JSONObject root_childs = new JSONObject();
|
||||||
JSONArray root_childlist = new JSONArray();
|
JSONArray root_childlist = new JSONArray();
|
||||||
JSONObject childs = new JSONObject();
|
JSONObject childs = new JSONObject();
|
||||||
JSONArray childlist = new JSONArray();
|
JSONArray childlist = new JSONArray();
|
||||||
for(int i=0;i<list.size();i++){
|
for (int i = 0; i < list.size(); i++) {
|
||||||
Sewage sewage = list.get(i);
|
Sewage sewage = list.get(i);
|
||||||
if(unitId==null || unitId.isEmpty()){
|
if (unitId == null || unitId.isEmpty()) {
|
||||||
unitId = sewage.getUnitId();
|
unitId = sewage.getUnitId();
|
||||||
Company company = sewage.getCompany();
|
Company company = sewage.getCompany();
|
||||||
if(company != null){
|
if (company != null) {
|
||||||
root_childs.put("id", company.getId());
|
root_childs.put("id", company.getId());
|
||||||
root_childs.put("text", company.getName());
|
root_childs.put("text", company.getName());
|
||||||
}else{
|
} else {
|
||||||
root_childs.put("id", unitId);
|
root_childs.put("id", unitId);
|
||||||
//没有关联Company或者unitId不存在
|
//没有关联Company或者unitId不存在
|
||||||
root_childs.put("text", "无区域数据");
|
root_childs.put("text", "无区域数据");
|
||||||
@ -604,8 +662,8 @@ public class SewageService implements CommService<Sewage>{
|
|||||||
root_childs.put("pid", "-1");
|
root_childs.put("pid", "-1");
|
||||||
root_childs.put("type", "unit");
|
root_childs.put("type", "unit");
|
||||||
}
|
}
|
||||||
if(!unitId.equals(sewage.getUnitId())){
|
if (!unitId.equals(sewage.getUnitId())) {
|
||||||
//向当前根节点添加所有子节点
|
//向当前根节点添加所有子节点
|
||||||
childs.put("nodes", childlist);
|
childs.put("nodes", childlist);
|
||||||
root_childlist.add(childs);
|
root_childlist.add(childs);
|
||||||
root_childs.put("nodes", root_childlist);
|
root_childs.put("nodes", root_childlist);
|
||||||
@ -618,10 +676,10 @@ public class SewageService implements CommService<Sewage>{
|
|||||||
//初始设置根节点
|
//初始设置根节点
|
||||||
unitId = sewage.getUnitId();
|
unitId = sewage.getUnitId();
|
||||||
Company company = sewage.getCompany();
|
Company company = sewage.getCompany();
|
||||||
if(company != null){
|
if (company != null) {
|
||||||
root_childs.put("id", company.getId());
|
root_childs.put("id", company.getId());
|
||||||
root_childs.put("text", company.getName());
|
root_childs.put("text", company.getName());
|
||||||
}else{
|
} else {
|
||||||
root_childs.put("id", unitId);
|
root_childs.put("id", unitId);
|
||||||
//没有关联Company或者unitId不存在
|
//没有关联Company或者unitId不存在
|
||||||
root_childs.put("text", "无区域数据");
|
root_childs.put("text", "无区域数据");
|
||||||
@ -631,15 +689,15 @@ public class SewageService implements CommService<Sewage>{
|
|||||||
//初始设置根节点
|
//初始设置根节点
|
||||||
processSectionId = null;
|
processSectionId = null;
|
||||||
}
|
}
|
||||||
if(processSectionId==null || processSectionId.isEmpty()){
|
if (processSectionId == null || processSectionId.isEmpty()) {
|
||||||
//初始设置根节点
|
//初始设置根节点
|
||||||
processSectionId = sewage.getProcessSectionId();
|
processSectionId = sewage.getProcessSectionId();
|
||||||
ProcessSection processSection = sewage.getProcessSection();
|
ProcessSection processSection = sewage.getProcessSection();
|
||||||
if(processSection != null){
|
if (processSection != null) {
|
||||||
childs.put("id", processSection.getCode());
|
childs.put("id", processSection.getCode());
|
||||||
childs.put("text", processSection.getName());
|
childs.put("text", processSection.getName());
|
||||||
}else{
|
} else {
|
||||||
if(processSectionId.isEmpty()){
|
if (processSectionId.isEmpty()) {
|
||||||
processSectionId = "error";
|
processSectionId = "error";
|
||||||
}
|
}
|
||||||
childs.put("id", processSectionId);
|
childs.put("id", processSectionId);
|
||||||
@ -648,9 +706,9 @@ public class SewageService implements CommService<Sewage>{
|
|||||||
}
|
}
|
||||||
childs.put("pid", unitId);
|
childs.put("pid", unitId);
|
||||||
childs.put("type", "processSection");
|
childs.put("type", "processSection");
|
||||||
|
|
||||||
}
|
}
|
||||||
if(processSectionId.equals(sewage.getProcessSectionId())){
|
if (processSectionId.equals(sewage.getProcessSectionId())) {
|
||||||
//设置子节点sewage
|
//设置子节点sewage
|
||||||
JSONObject child = new JSONObject();
|
JSONObject child = new JSONObject();
|
||||||
child.put("id", sewage.getId());
|
child.put("id", sewage.getId());
|
||||||
@ -658,7 +716,7 @@ public class SewageService implements CommService<Sewage>{
|
|||||||
child.put("pid", processSectionId);
|
child.put("pid", processSectionId);
|
||||||
child.put("type", "sewage");
|
child.put("type", "sewage");
|
||||||
childlist.add(child);
|
childlist.add(child);
|
||||||
}else{
|
} else {
|
||||||
//向当前根节点添加所有子节点
|
//向当前根节点添加所有子节点
|
||||||
childs.put("nodes", childlist);
|
childs.put("nodes", childlist);
|
||||||
root_childlist.add(childs);
|
root_childlist.add(childs);
|
||||||
@ -668,11 +726,11 @@ public class SewageService implements CommService<Sewage>{
|
|||||||
//初始设置根节点
|
//初始设置根节点
|
||||||
processSectionId = sewage.getProcessSectionId();
|
processSectionId = sewage.getProcessSectionId();
|
||||||
ProcessSection processSection = sewage.getProcessSection();
|
ProcessSection processSection = sewage.getProcessSection();
|
||||||
if(processSection != null){
|
if (processSection != null) {
|
||||||
childs.put("id", processSection.getCode());
|
childs.put("id", processSection.getCode());
|
||||||
childs.put("text", processSection.getName());
|
childs.put("text", processSection.getName());
|
||||||
}else{
|
} else {
|
||||||
if(processSectionId.isEmpty()){
|
if (processSectionId.isEmpty()) {
|
||||||
processSectionId = "error";
|
processSectionId = "error";
|
||||||
}
|
}
|
||||||
childs.put("id", processSectionId);
|
childs.put("id", processSectionId);
|
||||||
@ -688,7 +746,7 @@ public class SewageService implements CommService<Sewage>{
|
|||||||
child.put("type", "sewage");
|
child.put("type", "sewage");
|
||||||
childlist.add(child);
|
childlist.add(child);
|
||||||
}
|
}
|
||||||
if((i+1)==list.size()){
|
if ((i + 1) == list.size()) {
|
||||||
//最后子节点结束时,向当前根节点添加所有子节点
|
//最后子节点结束时,向当前根节点添加所有子节点
|
||||||
childs.put("nodes", childlist);
|
childs.put("nodes", childlist);
|
||||||
root_childlist.add(childs);
|
root_childlist.add(childs);
|
||||||
|
|||||||
@ -132,6 +132,7 @@ public class PatrolContentsServiceImpl implements PatrolContentsService {
|
|||||||
jsonObject.put("id", list3.get(j).getId());
|
jsonObject.put("id", list3.get(j).getId());
|
||||||
jsonObject.put("name", list3.get(j).getContents());
|
jsonObject.put("name", list3.get(j).getContents());
|
||||||
jsonObject.put("text", list3.get(j).getContents());
|
jsonObject.put("text", list3.get(j).getContents());
|
||||||
|
jsonObject.put("contentsDetail", list3.get(j).getContentsDetail());
|
||||||
jsonObject.put("type", TimeEfficiencyCommStr.PatrolEquipment_Equipment);
|
jsonObject.put("type", TimeEfficiencyCommStr.PatrolEquipment_Equipment);
|
||||||
jsonObject.put("icon", TimeEfficiencyCommStr.PatrolContents);
|
jsonObject.put("icon", TimeEfficiencyCommStr.PatrolContents);
|
||||||
jsonArrayEqu.add(jsonObject);
|
jsonArrayEqu.add(jsonObject);
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
BIN
src/main/webapp/IMG/loginbp.png
Normal file
BIN
src/main/webapp/IMG/loginbp.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 72 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 82 KiB After Width: | Height: | Size: 80 KiB |
BIN
src/main/webapp/IMG/logo1.png
Normal file
BIN
src/main/webapp/IMG/logo1.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 82 KiB |
@ -346,6 +346,10 @@ var processSelectNodeForHandle = function(taskId){
|
|||||||
//选择下一节点,先选择审核结果,再选择节点
|
//选择下一节点,先选择审核结果,再选择节点
|
||||||
$.post(ext.contextPath + "/activiti/workflow/getRoutesForSelect2.do", {taskId:taskId,passFlag:passFlag}, function(data) {
|
$.post(ext.contextPath + "/activiti/workflow/getRoutesForSelect2.do", {taskId:taskId,passFlag:passFlag}, function(data) {
|
||||||
$("#routeNum").empty();
|
$("#routeNum").empty();
|
||||||
|
if (!data || data.length === 0) {
|
||||||
|
console.warn('getRoutesForSelect2: no routes found for passFlag=' + passFlag);
|
||||||
|
return;
|
||||||
|
}
|
||||||
var selelct = $("#routeNum").select2({
|
var selelct = $("#routeNum").select2({
|
||||||
data: data,
|
data: data,
|
||||||
placeholder:'请先选择审核结果',//默认文字提示
|
placeholder:'请先选择审核结果',//默认文字提示
|
||||||
@ -374,6 +378,10 @@ var processSelectNodeForHandle = function(taskId){
|
|||||||
})
|
})
|
||||||
selectResult.val('').trigger("change");
|
selectResult.val('').trigger("change");
|
||||||
$.post(ext.contextPath + "/activiti/workflow/getRoutesForSelect2.do", {taskId:taskId,passFlag:true}, function(data) {
|
$.post(ext.contextPath + "/activiti/workflow/getRoutesForSelect2.do", {taskId:taskId,passFlag:true}, function(data) {
|
||||||
|
if (!data || data.length === 0) {
|
||||||
|
console.warn('getRoutesForSelect2: no routes found for passFlag=true');
|
||||||
|
return;
|
||||||
|
}
|
||||||
var selelct = $("#routeNum").select2({
|
var selelct = $("#routeNum").select2({
|
||||||
data: data,
|
data: data,
|
||||||
placeholder:'请先选择审核结果',//默认文字提示
|
placeholder:'请先选择审核结果',//默认文字提示
|
||||||
|
|||||||
@ -870,7 +870,7 @@ function openModal(modalId) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1060,6 +1060,12 @@ $(function () {
|
|||||||
});
|
});
|
||||||
//FastClick.attach(document.body);
|
//FastClick.attach(document.body);
|
||||||
|
|
||||||
|
// 解决嵌套模态框中输入框无法获得焦点的问题
|
||||||
|
// 禁用Bootstrap模态框的enforceFocus,允许嵌套模态框中的输入框正常工作
|
||||||
|
if ($.fn.modal && $.fn.modal.Constructor) {
|
||||||
|
$.fn.modal.Constructor.prototype.enforceFocus = function() {};
|
||||||
|
}
|
||||||
|
|
||||||
//弹窗关闭触发方法
|
//弹窗关闭触发方法
|
||||||
/*$(".modal").on("hidden.bs.modal", function() {
|
/*$(".modal").on("hidden.bs.modal", function() {
|
||||||
$('.modal').css("overflow","auto");
|
$('.modal').css("overflow","auto");
|
||||||
|
|||||||
@ -116,8 +116,11 @@ var getFileListMinioPic = function (divId, status, entityId, previews, previewCo
|
|||||||
tbName: tbName,
|
tbName: tbName,
|
||||||
bucketName: bucketName
|
bucketName: bucketName
|
||||||
}, function (data) {
|
}, function (data) {
|
||||||
|
// 清空数组而不是重新赋值,这样可以保持引用不变
|
||||||
|
previews.length = 0;
|
||||||
|
previewConfigs.length = 0;
|
||||||
|
|
||||||
if (data.length > 0) {
|
if (data.length > 0) {
|
||||||
previews = new Array();
|
|
||||||
$('#maintenancefile').show();
|
$('#maintenancefile').show();
|
||||||
for (var i = 0; i < data.length; i++) {
|
for (var i = 0; i < data.length; i++) {
|
||||||
var previewConfig = new Object();
|
var previewConfig = new Object();
|
||||||
@ -133,10 +136,9 @@ var getFileListMinioPic = function (divId, status, entityId, previews, previewCo
|
|||||||
}
|
}
|
||||||
previewConfigs.push(previewConfig);
|
previewConfigs.push(previewConfig);
|
||||||
}
|
}
|
||||||
showFileInput_new(divId, previews, previewConfigs);
|
|
||||||
} else {
|
|
||||||
$('#' + divId).hide();
|
|
||||||
}
|
}
|
||||||
|
// 无论是否有数据都重新初始化控件
|
||||||
|
showFileInput_new(divId, previews, previewConfigs);
|
||||||
}, 'json');
|
}, 'json');
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
//金山项目首页
|
//金山项目首页
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取点位实时值
|
* 获取点位实时值
|
||||||
* @param unitId
|
* @param unitId
|
||||||
@ -8,30 +7,64 @@
|
|||||||
* @param valueId
|
* @param valueId
|
||||||
* @param textId
|
* @param textId
|
||||||
*/
|
*/
|
||||||
function getValue(unitId, mpointCode, valueId, textId) {
|
function getValue4Es(unitId, mpointCode, valueId, textId) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: 'GET',
|
type: "GET",
|
||||||
url: ext.contextPath + '/work/mpoint/getValue4Es.do?unitId=' + unitId + '&mpointCode=' + mpointCode,
|
url:
|
||||||
|
ext.contextPath +
|
||||||
|
"/work/mpoint/getValue4Es.do?unitId=" +
|
||||||
|
unitId +
|
||||||
|
"&mpointCode=" +
|
||||||
|
mpointCode,
|
||||||
async: true,
|
async: true,
|
||||||
globle: false,
|
globle: false,
|
||||||
error: function () {
|
error: function () {
|
||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
success: function (data) {
|
success: function (data) {
|
||||||
if (data != null && data != '') {
|
if (data != null && data != "") {
|
||||||
var data = eval('(' + data + ')');
|
var data = eval("(" + data + ")");
|
||||||
//只限制上限为0.8 下限根据设定值自己设
|
//只限制上限为0.8 下限根据设定值自己设
|
||||||
// var maxvalue = data.alarmmax/0.8;
|
// var maxvalue = data.alarmmax/0.8;
|
||||||
// var minvalue = data.alarmmin/maxvalue;
|
// var minvalue = data.alarmmin/maxvalue;
|
||||||
// var acvalue = data.parmvalue/maxvalue*100;
|
// var acvalue = data.parmvalue/maxvalue*100;
|
||||||
$('#' + valueId).html(data.parmvalue);//赋值
|
$("#" + valueId).html(data.parmvalue); //赋值
|
||||||
if (data.unit == undefined) {
|
if (data.unit == undefined) {
|
||||||
$('#' + textId).html(data.parmname);//赋值名称
|
$("#" + textId).html(data.parmname); //赋值名称
|
||||||
} else {
|
} else {
|
||||||
$('#' + textId).html(data.parmname + ' (' + data.unit + ')');//赋值名称+单位
|
$("#" + textId).html(data.parmname + " (" + data.unit + ")"); //赋值名称+单位
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function getValue(unitId, mpointCode, valueId, textId) {
|
||||||
|
$.ajax({
|
||||||
|
type: "GET",
|
||||||
|
url:
|
||||||
|
ext.contextPath +
|
||||||
|
"/work/mpoint/getValue.do?unitId=" +
|
||||||
|
unitId +
|
||||||
|
"&mpointCode=" +
|
||||||
|
mpointCode,
|
||||||
|
async: true,
|
||||||
|
globle: false,
|
||||||
|
error: function () {
|
||||||
|
return false;
|
||||||
|
},
|
||||||
|
success: function (data) {
|
||||||
|
if (data != null && data != "") {
|
||||||
|
var data = eval("(" + data + ")");
|
||||||
|
console.log(data);
|
||||||
|
$("#" + valueId).html(data.parmvalue); //赋值
|
||||||
|
if (data.unit == undefined) {
|
||||||
|
$("#" + textId).html(data.parmname); //赋值名称
|
||||||
|
} else {
|
||||||
|
$("#" + textId).html(data.parmname + " (" + data.unit + ")"); //赋值名称+单位
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -41,19 +74,24 @@ function getValue(unitId, mpointCode, valueId, textId) {
|
|||||||
function echartPie(unitId, mpointCode, echartId, textId) {
|
function echartPie(unitId, mpointCode, echartId, textId) {
|
||||||
var myChart = echarts.init(document.getElementById(echartId));
|
var myChart = echarts.init(document.getElementById(echartId));
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: 'GET',
|
type: "GET",
|
||||||
url: ext.contextPath + '/work/mpoint/getValue4Es.do?unitId=' + unitId + '&mpointCode=' + mpointCode,
|
url:
|
||||||
|
ext.contextPath +
|
||||||
|
"/work/mpoint/getValue4Es.do?unitId=" +
|
||||||
|
unitId +
|
||||||
|
"&mpointCode=" +
|
||||||
|
mpointCode,
|
||||||
async: true,
|
async: true,
|
||||||
globle: false,
|
globle: false,
|
||||||
error: function () {
|
error: function () {
|
||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
success: function (data) {
|
success: function (data) {
|
||||||
if (data != null && data != '') {
|
if (data != null && data != "") {
|
||||||
var echart_minvalue = 0.2;
|
var echart_minvalue = 0.2;
|
||||||
var echart_maxvalue = 0.8;
|
var echart_maxvalue = 0.8;
|
||||||
|
|
||||||
var data = eval('(' + data + ')');
|
var data = eval("(" + data + ")");
|
||||||
//180度的上限
|
//180度的上限
|
||||||
var maxvalue_20 = data.alarmmax * 1.2;
|
var maxvalue_20 = data.alarmmax * 1.2;
|
||||||
//0度的下限
|
//0度的下限
|
||||||
@ -63,7 +101,7 @@ function echartPie(unitId, mpointCode, echartId, textId) {
|
|||||||
var minvalue = data.alarmmin;
|
var minvalue = data.alarmmin;
|
||||||
|
|
||||||
//判断是否需要下限
|
//判断是否需要下限
|
||||||
if (data.alarmmin == null || data.alarmmin == '') {
|
if (data.alarmmin == null || data.alarmmin == "") {
|
||||||
minvalue_20 = 0;
|
minvalue_20 = 0;
|
||||||
minvalue = 0;
|
minvalue = 0;
|
||||||
echart_minvalue = 0;
|
echart_minvalue = 0;
|
||||||
@ -71,12 +109,12 @@ function echartPie(unitId, mpointCode, echartId, textId) {
|
|||||||
|
|
||||||
var parmvalue = data.parmvalue;
|
var parmvalue = data.parmvalue;
|
||||||
var rate = 0;
|
var rate = 0;
|
||||||
var unit = '';
|
var unit = "";
|
||||||
|
|
||||||
$('#' + textId).html(data.parmname);
|
$("#" + textId).html(data.parmname);
|
||||||
|
|
||||||
if (data.unit != undefined && data.unit != null && data.unit != '') {
|
if (data.unit != undefined && data.unit != null && data.unit != "") {
|
||||||
unit = '(' + data.unit + ')';
|
unit = "(" + data.unit + ")";
|
||||||
}
|
}
|
||||||
|
|
||||||
//计算实际值比例
|
//计算实际值比例
|
||||||
@ -87,7 +125,7 @@ function echartPie(unitId, mpointCode, echartId, textId) {
|
|||||||
minvalue = minvalue * 100;
|
minvalue = minvalue * 100;
|
||||||
maxvalue = maxvalue * 100;
|
maxvalue = maxvalue * 100;
|
||||||
if (maxvalue != undefined && minvalue != undefined) {
|
if (maxvalue != undefined && minvalue != undefined) {
|
||||||
rate = parmvalue / (maxvalue_20 - minvalue_20) * 100;
|
rate = (parmvalue / (maxvalue_20 - minvalue_20)) * 100;
|
||||||
} else {
|
} else {
|
||||||
rate = parmvalue;
|
rate = parmvalue;
|
||||||
}
|
}
|
||||||
@ -103,52 +141,92 @@ function echartPie(unitId, mpointCode, echartId, textId) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//计算颜色
|
//计算颜色
|
||||||
var colorStr = '#6C6C6C';
|
var colorStr = "#6C6C6C";
|
||||||
if (parmvalue < minvalue) {
|
if (parmvalue < minvalue) {
|
||||||
colorStr = '#6C6C6C';
|
colorStr = "#6C6C6C";
|
||||||
} else if (parmvalue > maxvalue) {
|
} else if (parmvalue > maxvalue) {
|
||||||
colorStr = '#f35a4a';
|
colorStr = "#f35a4a";
|
||||||
} else {
|
} else {
|
||||||
colorStr = '#66d99f';
|
colorStr = "#66d99f";
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(data.parmname + '扩大下限:' + minvalue_20 + '------扩大上限:' + maxvalue_20 + '------实际比率:' + rate + '------实际值:' + parmvalue + '------实际下限:' + minvalue + '------实际上限:' + maxvalue);
|
console.log(
|
||||||
|
data.parmname +
|
||||||
|
"扩大下限:" +
|
||||||
|
minvalue_20 +
|
||||||
|
"------扩大上限:" +
|
||||||
|
maxvalue_20 +
|
||||||
|
"------实际比率:" +
|
||||||
|
rate +
|
||||||
|
"------实际值:" +
|
||||||
|
parmvalue +
|
||||||
|
"------实际下限:" +
|
||||||
|
minvalue +
|
||||||
|
"------实际上限:" +
|
||||||
|
maxvalue,
|
||||||
|
);
|
||||||
|
|
||||||
var option = {
|
var option = {
|
||||||
toolbox: { //可视化的工具箱
|
toolbox: {
|
||||||
show: false, feature: {
|
//可视化的工具箱
|
||||||
restore: { //重置
|
show: false,
|
||||||
show: true
|
feature: {
|
||||||
}, saveAsImage: {//保存图片
|
restore: {
|
||||||
show: true
|
//重置
|
||||||
}
|
show: true,
|
||||||
}
|
},
|
||||||
}, series: [{
|
saveAsImage: {
|
||||||
name: '业务指标', type: 'gauge', startAngle: 180, endAngle: 0, radius: 70, center: ['50%', '80%'],//设置饼图位置
|
//保存图片
|
||||||
axisLine: {
|
show: true,
|
||||||
show: true, // 属性lineStyle控制线条样式
|
},
|
||||||
lineStyle: {
|
},
|
||||||
width: 15, // color: [[0.2, '#e2e2e2'], [0.8, '#66d99f'], [maxvalue, '#f35a4a']]
|
},
|
||||||
color: [[echart_minvalue, '#f35a4a'], [echart_maxvalue, '#66d99f'], [maxvalue_20, '#f35a4a']]
|
series: [
|
||||||
}
|
{
|
||||||
}, splitLine: {
|
name: "业务指标",
|
||||||
show: false,
|
type: "gauge",
|
||||||
}, axisTick: {
|
startAngle: 180,
|
||||||
show: false,
|
endAngle: 0,
|
||||||
}, axisLabel: {
|
radius: 70,
|
||||||
show: false,
|
center: ["50%", "80%"], //设置饼图位置
|
||||||
}, pointer: {
|
axisLine: {
|
||||||
length: '40px', width: '3px',
|
show: true, // 属性lineStyle控制线条样式
|
||||||
}, detail: {
|
lineStyle: {
|
||||||
offsetCenter: [0, '20%'], fontSize: 14, color: colorStr, //formatter: data.parmname,
|
width: 15, // color: [[0.2, '#e2e2e2'], [0.8, '#66d99f'], [maxvalue, '#f35a4a']]
|
||||||
formatter: data.parmvalue + unit//data.parmvalue为实际值 acvalue为计算后的比例
|
color: [
|
||||||
}, data: [{value: rate}]
|
[echart_minvalue, "#f35a4a"],
|
||||||
}]
|
[echart_maxvalue, "#66d99f"],
|
||||||
|
[maxvalue_20, "#f35a4a"],
|
||||||
|
],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
splitLine: {
|
||||||
|
show: false,
|
||||||
|
},
|
||||||
|
axisTick: {
|
||||||
|
show: false,
|
||||||
|
},
|
||||||
|
axisLabel: {
|
||||||
|
show: false,
|
||||||
|
},
|
||||||
|
pointer: {
|
||||||
|
length: "40px",
|
||||||
|
width: "3px",
|
||||||
|
},
|
||||||
|
detail: {
|
||||||
|
offsetCenter: [0, "20%"],
|
||||||
|
fontSize: 14,
|
||||||
|
color: colorStr, //formatter: data.parmname,
|
||||||
|
formatter: data.parmvalue + unit, //data.parmvalue为实际值 acvalue为计算后的比例
|
||||||
|
},
|
||||||
|
data: [{ value: rate }],
|
||||||
|
},
|
||||||
|
],
|
||||||
};
|
};
|
||||||
myChart.setOption(option);
|
myChart.setOption(option);
|
||||||
myChart.resize();
|
myChart.resize();
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -159,42 +237,97 @@ function echartLine(unitId, mpointCode, echartId) {
|
|||||||
var myChart = echarts.init(document.getElementById(echartId));
|
var myChart = echarts.init(document.getElementById(echartId));
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: 'GET',
|
type: "GET",
|
||||||
url: ext.contextPath + '/work/mpoint/getValueMonth.do?unitId=' + unitId + '&mpointCode=' + mpointCode,
|
url:
|
||||||
|
ext.contextPath +
|
||||||
|
"/work/mpoint/getValueMonth.do?unitId=" +
|
||||||
|
unitId +
|
||||||
|
"&mpointCode=" +
|
||||||
|
mpointCode,
|
||||||
async: true,
|
async: true,
|
||||||
globle: false,
|
globle: false,
|
||||||
error: function () {
|
error: function () {
|
||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
success: function (data) {
|
success: function (data) {
|
||||||
var data = eval('(' + data + ')');
|
var data = eval("(" + data + ")");
|
||||||
var option = {
|
var option = {
|
||||||
tooltip: {
|
tooltip: {
|
||||||
trigger: 'axis'
|
trigger: "axis",
|
||||||
}, title: [{
|
},
|
||||||
left: 'center', text: data.name
|
title: [
|
||||||
}], grid: {
|
{
|
||||||
left: '3%', right: '4%', bottom: '3%', containLabel: true
|
left: "center",
|
||||||
}, xAxis: {
|
text: data.name,
|
||||||
type: 'category',
|
},
|
||||||
|
],
|
||||||
|
grid: {
|
||||||
|
left: "3%",
|
||||||
|
right: "4%",
|
||||||
|
bottom: "3%",
|
||||||
|
containLabel: true,
|
||||||
|
},
|
||||||
|
xAxis: {
|
||||||
|
type: "category",
|
||||||
boundaryGap: false,
|
boundaryGap: false,
|
||||||
data: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26', '27', '28', '29', '30', '31']
|
data: [
|
||||||
}, yAxis: {
|
"1",
|
||||||
type: 'value'
|
"2",
|
||||||
}, series: [{
|
"3",
|
||||||
name: '上限', type: 'line', // stack: '总量',
|
"4",
|
||||||
data: data.maxlist
|
"5",
|
||||||
}, {
|
"6",
|
||||||
name: '下限', type: 'line', // stack: '总量',
|
"7",
|
||||||
data: data.minlist
|
"8",
|
||||||
}, {
|
"9",
|
||||||
name: '实际值', type: 'line', // stack: '总量',
|
"10",
|
||||||
data: data.datalist
|
"11",
|
||||||
}]
|
"12",
|
||||||
|
"13",
|
||||||
|
"14",
|
||||||
|
"15",
|
||||||
|
"16",
|
||||||
|
"17",
|
||||||
|
"18",
|
||||||
|
"19",
|
||||||
|
"20",
|
||||||
|
"21",
|
||||||
|
"22",
|
||||||
|
"23",
|
||||||
|
"24",
|
||||||
|
"25",
|
||||||
|
"26",
|
||||||
|
"27",
|
||||||
|
"28",
|
||||||
|
"29",
|
||||||
|
"30",
|
||||||
|
"31",
|
||||||
|
],
|
||||||
|
},
|
||||||
|
yAxis: {
|
||||||
|
type: "value",
|
||||||
|
},
|
||||||
|
series: [
|
||||||
|
{
|
||||||
|
name: "上限",
|
||||||
|
type: "line", // stack: '总量',
|
||||||
|
data: data.maxlist,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "下限",
|
||||||
|
type: "line", // stack: '总量',
|
||||||
|
data: data.minlist,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "实际值",
|
||||||
|
type: "line", // stack: '总量',
|
||||||
|
data: data.datalist,
|
||||||
|
},
|
||||||
|
],
|
||||||
};
|
};
|
||||||
myChart.setOption(option);
|
myChart.setOption(option);
|
||||||
myChart.resize();
|
myChart.resize();
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -205,76 +338,381 @@ function echartColumnar(unitId, mpointCode, echartId) {
|
|||||||
var myChart = echarts.init(document.getElementById(echartId));
|
var myChart = echarts.init(document.getElementById(echartId));
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: 'GET',
|
type: "GET",
|
||||||
url: ext.contextPath + '/work/mpoint/getValueMonth.do?unitId=' + unitId + '&mpointCode=' + mpointCode,
|
url:
|
||||||
|
ext.contextPath +
|
||||||
|
"/work/mpoint/getValueMonth.do?unitId=" +
|
||||||
|
unitId +
|
||||||
|
"&mpointCode=" +
|
||||||
|
mpointCode,
|
||||||
async: true,
|
async: true,
|
||||||
globle: false,
|
globle: false,
|
||||||
error: function () {
|
error: function () {
|
||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
success: function (data) {
|
success: function (data) {
|
||||||
var data = eval('(' + data + ')');
|
var data = eval("(" + data + ")");
|
||||||
var option = {
|
var option = {
|
||||||
color: '#62AEDF', tooltip: {
|
color: "#62AEDF",
|
||||||
trigger: 'axis', axisPointer: { // 坐标轴指示器,坐标轴触发有效
|
tooltip: {
|
||||||
type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
|
trigger: "axis",
|
||||||
}
|
axisPointer: {
|
||||||
}, xAxis: {
|
// 坐标轴指示器,坐标轴触发有效
|
||||||
type: 'category',
|
type: "shadow", // 默认为直线,可选为:'line' | 'shadow'
|
||||||
data: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26', '27', '28', '29', '30', '31']
|
},
|
||||||
}, yAxis: {
|
},
|
||||||
type: 'value'
|
xAxis: {
|
||||||
}, title: [{
|
type: "category",
|
||||||
left: 'center', text: data.name
|
data: [
|
||||||
}], grid: {
|
"1",
|
||||||
left: '3%', right: '4%', bottom: '3%', containLabel: true
|
"2",
|
||||||
}, series: [{
|
"3",
|
||||||
data: data.datalist, type: 'bar', showBackground: true
|
"4",
|
||||||
// backgroundStyle: {
|
"5",
|
||||||
// //color: '#62AEDF'
|
"6",
|
||||||
// }
|
"7",
|
||||||
}]
|
"8",
|
||||||
|
"9",
|
||||||
|
"10",
|
||||||
|
"11",
|
||||||
|
"12",
|
||||||
|
"13",
|
||||||
|
"14",
|
||||||
|
"15",
|
||||||
|
"16",
|
||||||
|
"17",
|
||||||
|
"18",
|
||||||
|
"19",
|
||||||
|
"20",
|
||||||
|
"21",
|
||||||
|
"22",
|
||||||
|
"23",
|
||||||
|
"24",
|
||||||
|
"25",
|
||||||
|
"26",
|
||||||
|
"27",
|
||||||
|
"28",
|
||||||
|
"29",
|
||||||
|
"30",
|
||||||
|
"31",
|
||||||
|
],
|
||||||
|
},
|
||||||
|
yAxis: {
|
||||||
|
type: "value",
|
||||||
|
},
|
||||||
|
title: [
|
||||||
|
{
|
||||||
|
left: "center",
|
||||||
|
text: data.name,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
grid: {
|
||||||
|
left: "3%",
|
||||||
|
right: "4%",
|
||||||
|
bottom: "3%",
|
||||||
|
containLabel: true,
|
||||||
|
},
|
||||||
|
series: [
|
||||||
|
{
|
||||||
|
data: data.datalist,
|
||||||
|
type: "bar",
|
||||||
|
showBackground: true,
|
||||||
|
// backgroundStyle: {
|
||||||
|
// //color: '#62AEDF'
|
||||||
|
// }
|
||||||
|
},
|
||||||
|
],
|
||||||
};
|
};
|
||||||
myChart.setOption(option);
|
myChart.setOption(option);
|
||||||
myChart.resize();
|
myChart.resize();
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* echart柱状图--多点
|
* echart柱状图--多点 (原有)
|
||||||
*/
|
*/
|
||||||
function echartColumnar2(unitId, mpointCode, echartId) {
|
function echartColumnar2_1(unitId, mpointCode, echartId) {
|
||||||
var myChart = echarts.init(document.getElementById(echartId));
|
var myChart = echarts.init(document.getElementById(echartId));
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: 'GET',
|
type: "GET",
|
||||||
url: ext.contextPath + '/work/mpoint/getValueWeekS.do?unitId=' + unitId + '&mpointCode=' + mpointCode,
|
url:
|
||||||
|
ext.contextPath +
|
||||||
|
"/work/mpoint/getValueWeekS.do?unitId=" +
|
||||||
|
unitId +
|
||||||
|
"&mpointCode=" +
|
||||||
|
mpointCode,
|
||||||
async: true,
|
async: true,
|
||||||
globle: false,
|
globle: false,
|
||||||
error: function () {
|
error: function () {
|
||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
success: function (data) {
|
success: function (data) {
|
||||||
var datastr = eval('(' + data + ')');
|
var datastr = eval("(" + data + ")");
|
||||||
|
|
||||||
var data1 = datastr.dataJson;
|
var data1 = datastr.dataJson;
|
||||||
var data2 = datastr.timeJson;
|
var data2 = datastr.timeJson;
|
||||||
|
|
||||||
var option = {
|
var option = {
|
||||||
color: ['#67D89F', '#FFBB00'], legend: {}, calculable: true, xAxis: [{
|
color: ["#67D89F", "#FFBB00"],
|
||||||
type: 'category', axisLabel: {
|
legend: {},
|
||||||
interval: 0,//代表显示所有x轴标签显示
|
calculable: true,
|
||||||
}, data: data2
|
xAxis: [
|
||||||
}], yAxis: [{
|
{
|
||||||
type: 'value'
|
type: "category",
|
||||||
}], grid: {
|
axisLabel: {
|
||||||
left: '2%', right: '5%', bottom: '3%', containLabel: true
|
interval: 0, //代表显示所有x轴标签显示
|
||||||
}, series: data1
|
},
|
||||||
|
data: data2,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
yAxis: [
|
||||||
|
{
|
||||||
|
type: "value",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
grid: {
|
||||||
|
left: "2%",
|
||||||
|
right: "5%",
|
||||||
|
bottom: "3%",
|
||||||
|
containLabel: true,
|
||||||
|
},
|
||||||
|
series: data1,
|
||||||
};
|
};
|
||||||
myChart.setOption(option);
|
myChart.setOption(option);
|
||||||
myChart.resize();
|
myChart.resize();
|
||||||
}
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function initEchartColumnar2() {
|
||||||
|
var chart = echarts.init(document.getElementById('myChartProduce8'));
|
||||||
|
var option = {
|
||||||
|
tooltip: {
|
||||||
|
trigger: 'axis',
|
||||||
|
axisPointer: {
|
||||||
|
type: 'shadow'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
legend: {
|
||||||
|
data: ['工业进水', '工业出水', '生活进水', '生活出水'],
|
||||||
|
top: 5,
|
||||||
|
textStyle: {
|
||||||
|
fontSize: 12
|
||||||
|
}
|
||||||
|
},
|
||||||
|
grid: {
|
||||||
|
left: '5%',
|
||||||
|
right: '5%',
|
||||||
|
bottom: '8%',
|
||||||
|
top: '18%',
|
||||||
|
containLabel: true
|
||||||
|
},
|
||||||
|
xAxis: {
|
||||||
|
type: 'category',
|
||||||
|
data: ['3/16', '3/17', '3/18', '3/19', '3/20', '3/21', '3/22'],
|
||||||
|
axisLine: {
|
||||||
|
lineStyle: {
|
||||||
|
color: '#e8e8e8'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
axisLabel: {
|
||||||
|
color: '#666',
|
||||||
|
fontSize: 12
|
||||||
|
}
|
||||||
|
},
|
||||||
|
yAxis: {
|
||||||
|
type: 'value',
|
||||||
|
name: 'm³/D',
|
||||||
|
nameTextStyle: {
|
||||||
|
fontSize: 12
|
||||||
|
},
|
||||||
|
axisLine: {
|
||||||
|
show: false
|
||||||
|
},
|
||||||
|
axisTick: {
|
||||||
|
show: false
|
||||||
|
},
|
||||||
|
axisLabel: {
|
||||||
|
color: '#666',
|
||||||
|
fontSize: 12
|
||||||
|
},
|
||||||
|
splitLine: {
|
||||||
|
lineStyle: {
|
||||||
|
color: '#f0f0f0'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
series: [
|
||||||
|
{
|
||||||
|
name: '工业进水',
|
||||||
|
type: 'bar',
|
||||||
|
barWidth: '20%',
|
||||||
|
itemStyle: {
|
||||||
|
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
||||||
|
{offset: 0, color: '#378dcc'},
|
||||||
|
{offset: 1, color: '#5ba3d9'}
|
||||||
|
])
|
||||||
|
},
|
||||||
|
data: [0, 0, 0, 0, 0, 0, 0]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '工业出水',
|
||||||
|
type: 'bar',
|
||||||
|
barWidth: '20%',
|
||||||
|
itemStyle: {
|
||||||
|
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
||||||
|
{offset: 0, color: '#5b8def'},
|
||||||
|
{offset: 1, color: '#40a9ff'}
|
||||||
|
])
|
||||||
|
},
|
||||||
|
data: [0, 0, 0, 0, 0, 0, 0]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '生活进水',
|
||||||
|
type: 'bar',
|
||||||
|
barWidth: '20%',
|
||||||
|
itemStyle: {
|
||||||
|
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
||||||
|
{offset: 0, color: '#52c41a'},
|
||||||
|
{offset: 1, color: '#73d13d'}
|
||||||
|
])
|
||||||
|
},
|
||||||
|
data: [0, 0, 0, 0, 0, 0, 0]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '生活出水',
|
||||||
|
type: 'bar',
|
||||||
|
barWidth: '20%',
|
||||||
|
itemStyle: {
|
||||||
|
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
||||||
|
{offset: 0, color: '#2ecc71'},
|
||||||
|
{offset: 1, color: '#58d68d'}
|
||||||
|
])
|
||||||
|
},
|
||||||
|
data: [0, 0, 0, 0, 0, 0, 0]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
};
|
||||||
|
chart.setOption(option);
|
||||||
|
chart.resize();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* echart柱状图--多点 (TGLW新版)- (工业生活污水流量7天日趋势)
|
||||||
|
*/
|
||||||
|
function echartColumnar2(unitId, mpointCode, echartId) {
|
||||||
|
var myChart = echarts.init(document.getElementById(echartId));
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
type: "GET",
|
||||||
|
// url: ext.contextPath + '/work/mpoint/getValueWeekS.do?unitId=' + unitId + '&mpointCode=' + mpointCode,
|
||||||
|
url:
|
||||||
|
ext.contextPath +
|
||||||
|
"/work/mpoint/getValueWeekS.do?unitId=" +
|
||||||
|
unitId +
|
||||||
|
"&mpointCode=" +
|
||||||
|
"C_GYJsssll,C_GYCsssll,C_SHJsssll,C_SHCsssll",
|
||||||
|
async: true,
|
||||||
|
globle: false,
|
||||||
|
error: function () {
|
||||||
|
return false;
|
||||||
|
},
|
||||||
|
success: function (data) {
|
||||||
|
var datastr = eval("(" + data + ")");
|
||||||
|
|
||||||
|
var data1 = datastr.dataJson;
|
||||||
|
var data2 = datastr.timeJson;
|
||||||
|
var series = [];
|
||||||
|
var legendData = [];
|
||||||
|
|
||||||
|
if (data1) {
|
||||||
|
data1.forEach(function(item, index) {
|
||||||
|
legendData.push(item.name);
|
||||||
|
var colors = [
|
||||||
|
[{offset: 0, color: '#378dcc'}, {offset: 1, color: '#5ba3d9'}],
|
||||||
|
[{offset: 0, color: '#5b8def'}, {offset: 1, color: '#40a9ff'}],
|
||||||
|
[{offset: 0, color: '#52c41a'}, {offset: 1, color: '#73d13d'}],
|
||||||
|
[{offset: 0, color: '#2ecc71'}, {offset: 1, color: '#58d68d'}]
|
||||||
|
];
|
||||||
|
series.push({
|
||||||
|
name: item.name,
|
||||||
|
type: item.type || 'bar',
|
||||||
|
barWidth: '20%',
|
||||||
|
itemStyle: {
|
||||||
|
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, colors[index % colors.length])
|
||||||
|
},
|
||||||
|
data: item.data
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
var option = {
|
||||||
|
tooltip: {
|
||||||
|
trigger: "axis",
|
||||||
|
axisPointer: {
|
||||||
|
type: "shadow",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
legend: {
|
||||||
|
data: legendData,
|
||||||
|
top: 5,
|
||||||
|
textStyle: {
|
||||||
|
fontSize: 12,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
grid: {
|
||||||
|
left: "5%",
|
||||||
|
right: "5%",
|
||||||
|
bottom: "8%",
|
||||||
|
top: "18%",
|
||||||
|
containLabel: true,
|
||||||
|
},
|
||||||
|
xAxis: [
|
||||||
|
{
|
||||||
|
type: "category",
|
||||||
|
data: data2,
|
||||||
|
axisLine: {
|
||||||
|
lineStyle: {
|
||||||
|
color: "#e8e8e8",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
axisLabel: {
|
||||||
|
color: "#666",
|
||||||
|
fontSize: 12,
|
||||||
|
interval: 0, //代表显示所有x轴标签显示
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
yAxis: {
|
||||||
|
type: "value",
|
||||||
|
name: "m³/D",
|
||||||
|
nameTextStyle: {
|
||||||
|
fontSize: 12,
|
||||||
|
},
|
||||||
|
axisLine: {
|
||||||
|
show: false,
|
||||||
|
},
|
||||||
|
axisTick: {
|
||||||
|
show: false,
|
||||||
|
},
|
||||||
|
axisLabel: {
|
||||||
|
color: "#666",
|
||||||
|
fontSize: 12,
|
||||||
|
},
|
||||||
|
splitLine: {
|
||||||
|
lineStyle: {
|
||||||
|
color: "#f0f0f0",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
series: series,
|
||||||
|
};
|
||||||
|
myChart.setOption(option);
|
||||||
|
myChart.resize();
|
||||||
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -283,7 +721,10 @@ function echartColumnar2(unitId, mpointCode, echartId) {
|
|||||||
* @param unitId
|
* @param unitId
|
||||||
*/
|
*/
|
||||||
function getPic(unitId) {
|
function getPic(unitId) {
|
||||||
$("#mainImg").attr("src", ext.contextPath + "/IMG/main/main_" + unitId + ".jpg");
|
$("#mainImg").attr(
|
||||||
|
"src",
|
||||||
|
ext.contextPath + "/IMG/main/main_" + unitId + ".jpg",
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -294,21 +735,37 @@ function getPic(unitId, unit, proDatavisualFrame) {
|
|||||||
//$("#mainImg").attr("src", ext.contextPath + "/IMG/main/main_" + unitId + ".jpg");
|
//$("#mainImg").attr("src", ext.contextPath + "/IMG/main/main_" + unitId + ".jpg");
|
||||||
var unitIds = JSON.parse(unit);
|
var unitIds = JSON.parse(unit);
|
||||||
var proDatavisualFrames = JSON.parse(proDatavisualFrame);
|
var proDatavisualFrames = JSON.parse(proDatavisualFrame);
|
||||||
var active = '';
|
var active = "";
|
||||||
var item = '';
|
var item = "";
|
||||||
var proDatavisualFrames_i = 0;
|
var proDatavisualFrames_i = 0;
|
||||||
if (unitIds != null && unitIds.length > 0) {
|
if (unitIds != null && unitIds.length > 0) {
|
||||||
for (var i = 0; i < unitIds.length; i++) {
|
for (var i = 0; i < unitIds.length; i++) {
|
||||||
if (unitIds[i].type == 'B' || unitIds[i].type == 'C') {
|
if (unitIds[i].type == "B" || unitIds[i].type == "C") {
|
||||||
var proDatavisualFrameId = proDatavisualFrames[proDatavisualFrames_i];
|
var proDatavisualFrameId = proDatavisualFrames[proDatavisualFrames_i];
|
||||||
proDatavisualFrames_i++;
|
proDatavisualFrames_i++;
|
||||||
if (unitId == unitIds[i].id) {
|
if (unitId == unitIds[i].id) {
|
||||||
active = 'active';
|
active = "active";
|
||||||
} else {
|
} else {
|
||||||
active = '';
|
active = "";
|
||||||
}
|
}
|
||||||
var src = ext.contextPath + "/IMG/main/main_" + unitIds[i].id + ".jpg";
|
var src = ext.contextPath + "/IMG/main/main_" + unitIds[i].id + ".jpg";
|
||||||
item += '<div class="item ' + active + ' ">' + '<img src="' + src + '" class="mainImg">' + '<div class="carousel-caption" onclick="proDatavisualFrame(\'' + unitIds[i].id + '\',\'' + proDatavisualFrameId + '\')">' + '<h4>' + unitIds[i].text + '</h4>' + '</div>' + '</div>';
|
item +=
|
||||||
|
'<div class="item ' +
|
||||||
|
active +
|
||||||
|
' ">' +
|
||||||
|
'<img src="' +
|
||||||
|
src +
|
||||||
|
'" class="mainImg">' +
|
||||||
|
'<div class="carousel-caption" onclick="proDatavisualFrame(\'' +
|
||||||
|
unitIds[i].id +
|
||||||
|
"','" +
|
||||||
|
proDatavisualFrameId +
|
||||||
|
"')\">" +
|
||||||
|
"<h4>" +
|
||||||
|
unitIds[i].text +
|
||||||
|
"</h4>" +
|
||||||
|
"</div>" +
|
||||||
|
"</div>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -316,15 +773,39 @@ function getPic(unitId, unit, proDatavisualFrame) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function getUnitsByUnitId4Select(id, funname, proDatavisualFrame) {
|
function getUnitsByUnitId4Select(id, funname, proDatavisualFrame) {
|
||||||
$.post(ext.contextPath + "/user/getUnitsByUnitId4Select.do", {id: id}, function (data) {
|
$.post(
|
||||||
//console.log(data);
|
ext.contextPath + "/user/getUnitsByUnitId4Select.do",
|
||||||
var unitIds = data;
|
{ id: id },
|
||||||
eval(funname + "('" + id + "','" + unitIds + "','" + proDatavisualFrame + "')")
|
function (data) {
|
||||||
});
|
//console.log(data);
|
||||||
|
var unitIds = data;
|
||||||
|
eval(
|
||||||
|
funname +
|
||||||
|
"('" +
|
||||||
|
id +
|
||||||
|
"','" +
|
||||||
|
unitIds +
|
||||||
|
"','" +
|
||||||
|
proDatavisualFrame +
|
||||||
|
"')",
|
||||||
|
);
|
||||||
|
},
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function proDatavisualFrame(unitId, proDatavisualFrameId) {
|
function proDatavisualFrame(unitId, proDatavisualFrameId) {
|
||||||
if (proDatavisualFrameId != null && proDatavisualFrameId != undefined && proDatavisualFrameId != '') {
|
if (
|
||||||
parent.addTab(proDatavisualFrameId, '工艺可视化', 'process/dataVisualFrame/view.do?frameId=' + proDatavisualFrameId + '&unitId=' + unitId);
|
proDatavisualFrameId != null &&
|
||||||
|
proDatavisualFrameId != undefined &&
|
||||||
|
proDatavisualFrameId != ""
|
||||||
|
) {
|
||||||
|
parent.addTab(
|
||||||
|
proDatavisualFrameId,
|
||||||
|
"工艺可视化",
|
||||||
|
"process/dataVisualFrame/view.do?frameId=" +
|
||||||
|
proDatavisualFrameId +
|
||||||
|
"&unitId=" +
|
||||||
|
unitId,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -174,7 +174,7 @@
|
|||||||
page: params.offset/params.limit+1, // 每页显示数据的开始页码
|
page: params.offset/params.limit+1, // 每页显示数据的开始页码
|
||||||
sort: params.sort, // 要排序的字段
|
sort: params.sort, // 要排序的字段
|
||||||
order: params.order,
|
order: params.order,
|
||||||
search_name: $('#search_name').val(),
|
// search_name: $('#search_name').val(),
|
||||||
search_code: $('#search_code').val()
|
search_code: $('#search_code').val()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -301,14 +301,14 @@
|
|||||||
<label class="form-label" id="companylabel">公司</label>
|
<label class="form-label" id="companylabel">公司</label>
|
||||||
<select class="form-control select2 " id="search_code" name ="search_code" style="width: 220px;"></select>
|
<select class="form-control select2 " id="search_code" name ="search_code" style="width: 220px;"></select>
|
||||||
<span class="select2-selection select2-selection--single" id="company" style="width:220px;border: none;background: transparent;" ></span>
|
<span class="select2-selection select2-selection--single" id="company" style="width:220px;border: none;background: transparent;" ></span>
|
||||||
<div class="form-group pull-right" >
|
<!-- <div class="form-group pull-right" >
|
||||||
<div class="input-group input-group-sm" style="width: 250px;">
|
<div class="input-group input-group-sm" style="width: 250px;">
|
||||||
<input type="text" id="search_name" name="search_name" class="form-control pull-right" placeholder="名称">
|
<input type="text" id="search_name" name="search_name" class="form-control pull-right" placeholder="名称">
|
||||||
<div class="input-group-btn">
|
<div class="input-group-btn">
|
||||||
<button class="btn btn-default" onclick="dosearch();"><i class="fa fa-search"></i></button>
|
<button class="btn btn-default" onclick="dosearch();"><i class="fa fa-search"></i></button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div> -->
|
||||||
</div>
|
</div>
|
||||||
<table id="table"></table>
|
<table id="table"></table>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -533,6 +533,14 @@
|
|||||||
$("#subDiv").html(data);
|
$("#subDiv").html(data);
|
||||||
openModal('subModal');
|
openModal('subModal');
|
||||||
});
|
});
|
||||||
|
} else if (type.indexOf('${SAFETY_JOB_INSIDE}') != -1) {
|
||||||
|
$.post(ext.contextPath + '/safety/SafetyJobInside/view.do', {id: id}, function (data) {
|
||||||
|
$("#subDiv").html(data);
|
||||||
|
openModal('subModal');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
showAlert('w', `未查询到任务模块!${type}`, 'mainAlertdiv');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
var deleteFun = function (id) {
|
var deleteFun = function (id) {
|
||||||
|
|||||||
@ -1,9 +1,10 @@
|
|||||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
|
||||||
var previews = new Array();
|
// 不重新定义这些变量,直接使用主页面的全局变量
|
||||||
var previewConfigs = new Array();
|
// var previews = new Array();
|
||||||
var filelist = new Array();
|
// var previewConfigs = new Array();
|
||||||
|
// var filelist = new Array();
|
||||||
|
|
||||||
//初始化fileinput控件(第一次初始化)
|
//初始化fileinput控件(第一次初始化)
|
||||||
function initFileInput(ctrlName, uploadUrl) {
|
function initFileInput(ctrlName, uploadUrl) {
|
||||||
@ -55,9 +56,10 @@
|
|||||||
//导入文件上传完成之后的事件
|
//导入文件上传完成之后的事件
|
||||||
control.on("fileuploaded", function (event, data, previewId, index) {
|
control.on("fileuploaded", function (event, data, previewId, index) {
|
||||||
if (data.response.suc) {
|
if (data.response.suc) {
|
||||||
<%--getFileListMinioPic('${param.divId}','edit');--%>
|
// 直接使用主页面的全局变量重新加载文件列表
|
||||||
// getFileListMinioPic('abnormityFileId', 'edit', '', previews, previewConfigs);
|
|
||||||
getFileListMinioPic('${param.divId}', 'edit', '', previews, previewConfigs);
|
getFileListMinioPic('${param.divId}', 'edit', '', previews, previewConfigs);
|
||||||
|
// 关闭上传弹窗,返回主页面
|
||||||
|
closeModal('fileInputModal');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@ -7,6 +7,8 @@ pageEncoding="UTF-8"%>
|
|||||||
<title>区域管线大屏展示</title>
|
<title>区域管线大屏展示</title>
|
||||||
<script type="text/javascript" src="<%=request.getContextPath()%>/node_modules/jquery/dist/jquery.min.js"></script>
|
<script type="text/javascript" src="<%=request.getContextPath()%>/node_modules/jquery/dist/jquery.min.js"></script>
|
||||||
<script type="text/javascript" src="<%=request.getContextPath()%>/JS/echarts3.0.js"></script>
|
<script type="text/javascript" src="<%=request.getContextPath()%>/JS/echarts3.0.js"></script>
|
||||||
|
<!-- 天地图 API -->
|
||||||
|
<script type="text/javascript" src="http://api.tianditu.gov.cn/api?v=4.0&tk=f423193014cde7bf44b224c6ab2b1210"></script>
|
||||||
<!-- <script
|
<!-- <script
|
||||||
type="text/javascript"
|
type="text/javascript"
|
||||||
src="../../node_modules/jquery/dist/jquery.min.js"
|
src="../../node_modules/jquery/dist/jquery.min.js"
|
||||||
@ -162,6 +164,7 @@ pageEncoding="UTF-8"%>
|
|||||||
<%-- </div>--%>
|
<%-- </div>--%>
|
||||||
<%-- </div>--%>
|
<%-- </div>--%>
|
||||||
<div class="screen-container">
|
<div class="screen-container">
|
||||||
|
<div id="map-container" style="position: absolute; top: 280px; left: 70px; width: 1760px; height: 1470px; background-color: white;"></div>
|
||||||
<div class="stat-card card-1">53829.5</div>
|
<div class="stat-card card-1">53829.5</div>
|
||||||
<div class="stat-card card-2">2495</div>
|
<div class="stat-card card-2">2495</div>
|
||||||
<div class="stat-card card-3">2460</div>
|
<div class="stat-card card-3">2460</div>
|
||||||
@ -198,6 +201,138 @@ pageEncoding="UTF-8"%>
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
// ==================== 天地图初始化 ====================
|
||||||
|
var contextPath = "<%=request.getContextPath()%>";
|
||||||
|
var map = null;
|
||||||
|
var pipelineOverlays = [];
|
||||||
|
|
||||||
|
// 初始化天地图
|
||||||
|
function initTiandituMap() {
|
||||||
|
// 创建地图实例
|
||||||
|
map = new T.Map("map-container");
|
||||||
|
|
||||||
|
// 放大地图级别 (15比13更放大)
|
||||||
|
map.centerAndZoom(new T.LngLat(121.34, 30.74), 15);
|
||||||
|
map.enableScrollWheelZoom();
|
||||||
|
|
||||||
|
// 设置暗色主题 - 切换为卫星影像底图
|
||||||
|
map.setMapType(TMAP_SATELLITE_MAP);
|
||||||
|
|
||||||
|
// 添加控件
|
||||||
|
var scale = new T.Control.Scale();
|
||||||
|
map.addControl(scale);
|
||||||
|
var zoom = new T.Control.Zoom();
|
||||||
|
map.addControl(zoom);
|
||||||
|
|
||||||
|
// 隐藏地图类型切换控件,保持暗色主题
|
||||||
|
setTimeout(function() {
|
||||||
|
var mapTypeCtrl = document.querySelector(".TMAP_maptype");
|
||||||
|
if (mapTypeCtrl) {
|
||||||
|
mapTypeCtrl.style.display = "none";
|
||||||
|
}
|
||||||
|
}, 500);
|
||||||
|
|
||||||
|
console.log("[天地图] 初始化完成 - 暗色主题,缩放级别15");
|
||||||
|
|
||||||
|
// 加载管道数据
|
||||||
|
loadPipelineData();
|
||||||
|
}
|
||||||
|
|
||||||
|
// 加载管道数据
|
||||||
|
function loadPipelineData() {
|
||||||
|
$.ajax({
|
||||||
|
url: contextPath + '/jsp/z_bigScreen/geo.json',
|
||||||
|
type: 'GET',
|
||||||
|
dataType: 'json',
|
||||||
|
success: function(data) {
|
||||||
|
if (data && data.features) {
|
||||||
|
var pipelines = data.features.map(function(feature) {
|
||||||
|
var attr = feature.attributes || {};
|
||||||
|
var geom = feature.geometry || {};
|
||||||
|
var paths = geom.paths || null;
|
||||||
|
var lengthM = attr.Shape_Leng ? (attr.Shape_Leng * 111000).toFixed(2) : '-';
|
||||||
|
|
||||||
|
return {
|
||||||
|
id: attr.FID,
|
||||||
|
name: '管线-' + attr.FID,
|
||||||
|
length: lengthM,
|
||||||
|
elevation: attr.Elevation || 0,
|
||||||
|
color: attr.Color || 6,
|
||||||
|
layer: attr.Layer || 'WS_LINE',
|
||||||
|
paths: paths
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
|
renderPipelines(pipelines);
|
||||||
|
console.log("[管道数据] 加载完成,共", pipelines.length, "条");
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error: function(xhr, status, error) {
|
||||||
|
console.error("[管道数据] 加载失败:", error);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 渲染管道到地图
|
||||||
|
function renderPipelines(pipelines) {
|
||||||
|
// 先清除之前的管线
|
||||||
|
clearPipelines();
|
||||||
|
|
||||||
|
pipelines.forEach(function(item) {
|
||||||
|
if (!item.paths || !item.paths.length) return;
|
||||||
|
|
||||||
|
var pathsArray = item.paths;
|
||||||
|
|
||||||
|
// 如果 paths 的第一个元素不是数组,说明是单路径格式,需要包装
|
||||||
|
if (!Array.isArray(pathsArray[0]) || !Array.isArray(pathsArray[0][0])) {
|
||||||
|
pathsArray = [pathsArray];
|
||||||
|
}
|
||||||
|
|
||||||
|
// 按颜色区分管线 (Color === 6 为深蓝色,其他为深红色)
|
||||||
|
var lineColor = item.color === 6 ? '#0066cc' : '#0ea6c1';
|
||||||
|
|
||||||
|
// 渲染每条路径
|
||||||
|
pathsArray.forEach(function(pathCoords) {
|
||||||
|
if (!pathCoords || pathCoords.length < 2) return;
|
||||||
|
|
||||||
|
var points = pathCoords.map(function(p) {
|
||||||
|
return new T.LngLat(p[0], p[1]);
|
||||||
|
});
|
||||||
|
|
||||||
|
var polyline = new T.Polyline(points, {
|
||||||
|
color: lineColor,
|
||||||
|
weight: 8,
|
||||||
|
opacity: 1
|
||||||
|
});
|
||||||
|
map.addOverLay(polyline);
|
||||||
|
pipelineOverlays.push(polyline);
|
||||||
|
|
||||||
|
// 信息窗口
|
||||||
|
var infoHtml = '<div style="font-size:13px;line-height:1.5;">' +
|
||||||
|
'<strong style="color:#007bff;">管线 #' + item.id + '</strong><br>' +
|
||||||
|
'名称: ' + (item.name || '-') + '<br>' +
|
||||||
|
'管长: ' + (item.length || '-') + ' m<br>' +
|
||||||
|
'高程: ' + (item.elevation || 0).toFixed(2) + ' m' +
|
||||||
|
'</div>';
|
||||||
|
|
||||||
|
var infoWindow = new T.InfoWindow(infoHtml, { offset: new T.Point(0, 0) });
|
||||||
|
polyline.addEventListener('click', function(e) {
|
||||||
|
map.openInfoWindow(infoWindow, e.lnglat);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
console.log("[管线渲染] 完成,共渲染", pipelineOverlays.length, "条管线段");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 清除管道覆盖物
|
||||||
|
function clearPipelines() {
|
||||||
|
pipelineOverlays.forEach(function(overlay) {
|
||||||
|
map.removeOverLay(overlay);
|
||||||
|
});
|
||||||
|
pipelineOverlays = [];
|
||||||
|
}
|
||||||
|
|
||||||
// ==================== 数据统一管理 ====================
|
// ==================== 数据统一管理 ====================
|
||||||
var pageData = {
|
var pageData = {
|
||||||
// 统计卡片数据
|
// 统计卡片数据
|
||||||
@ -414,6 +549,9 @@ pageEncoding="UTF-8"%>
|
|||||||
}
|
}
|
||||||
|
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
|
// 初始化天地图
|
||||||
|
initTiandituMap();
|
||||||
|
|
||||||
// 初始化统计数据
|
// 初始化统计数据
|
||||||
updateStatCards();
|
updateStatCards();
|
||||||
|
|
||||||
|
|||||||
@ -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({
|
||||||
|
|||||||
@ -19,6 +19,10 @@
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
var dosearchBelong = function() {
|
||||||
|
$("#equipmentBelongTable").bootstrapTable('refresh');
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
//显示已经勾选的数据
|
//显示已经勾选的数据
|
||||||
function stateFormatter(value, row, index) {
|
function stateFormatter(value, row, index) {
|
||||||
@ -53,6 +57,7 @@
|
|||||||
page: params.offset/params.limit+1, // 每页显示数据的开始页码
|
page: params.offset/params.limit+1, // 每页显示数据的开始页码
|
||||||
sort: params.sort, // 要排序的字段
|
sort: params.sort, // 要排序的字段
|
||||||
order: params.order,
|
order: params.order,
|
||||||
|
search_name: $('#search_belongname').val()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
queryParamsType: "limit",
|
queryParamsType: "limit",
|
||||||
@ -110,6 +115,12 @@
|
|||||||
<div id="mainAlertdiv"></div>
|
<div id="mainAlertdiv"></div>
|
||||||
<div id="menu4SelectDiv"></div>
|
<div id="menu4SelectDiv"></div>
|
||||||
<div id="modal-body">
|
<div id="modal-body">
|
||||||
|
<div class="input-group input-group-sm" style="width: 250px;float: right;margin-bottom: 15px;">
|
||||||
|
<input type="text" id="search_belongname" name="search_belongname" class="form-control pull-right" placeholder="归属名称/编码">
|
||||||
|
<div class="input-group-btn">
|
||||||
|
<button class="btn btn-default" onclick="dosearchBelong();"><i class="fa fa-search"></i></button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="table-scrollable">
|
<div class="table-scrollable">
|
||||||
<table class="table table-bordered table-striped" style="overflow:auto;width:100%" id="equipmentBelongTable"></table>
|
<table class="table table-bordered table-striped" style="overflow:auto;width:100%" id="equipmentBelongTable"></table>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -141,9 +141,9 @@
|
|||||||
formatter: function (value, row, index) {
|
formatter: function (value, row, index) {
|
||||||
var buts = "";
|
var buts = "";
|
||||||
|
|
||||||
buts += '<security:authorize buttonUrl="equipment/location.do">';
|
// buts += '<security:authorize buttonUrl="equipment/location.do">';
|
||||||
buts += '<button class="btn btn-default btn-sm" title="定位" onclick="locationFun(\'' + row.id + '\')"><i class="fa fa-map-marker"></i><span class="hidden-md hidden-lg"> 定位</span></button>';
|
// buts += '<button class="btn btn-default btn-sm" title="定位" onclick="locationFun(\'' + row.id + '\')"><i class="fa fa-map-marker"></i><span class="hidden-md hidden-lg"> 定位</span></button>';
|
||||||
buts += '</security:authorize>';
|
// buts += '</security:authorize>';
|
||||||
|
|
||||||
buts += '<security:authorize buttonUrl="equipment/edit.do">';
|
buts += '<security:authorize buttonUrl="equipment/edit.do">';
|
||||||
buts += '<button class="btn btn-default btn-sm" title="编辑" onclick="editFun(\'' + row.id + '\')"><i class="fa fa-edit"></i><span class="hidden-md hidden-lg"> 编辑</span></button>';
|
buts += '<button class="btn btn-default btn-sm" title="编辑" onclick="editFun(\'' + row.id + '\')"><i class="fa fa-edit"></i><span class="hidden-md hidden-lg"> 编辑</span></button>';
|
||||||
|
|||||||
@ -105,16 +105,15 @@
|
|||||||
masterId: id,
|
masterId: id,
|
||||||
tbName: tbName
|
tbName: tbName
|
||||||
}, function (data) {
|
}, function (data) {
|
||||||
//console.info(data)
|
// 清空之前的配置
|
||||||
|
previews = [];
|
||||||
|
previewConfigs = [];
|
||||||
if (data.length > 0) {
|
if (data.length > 0) {
|
||||||
previews = new Array();
|
|
||||||
$('#maintenancefile').show();
|
$('#maintenancefile').show();
|
||||||
for (var i = 0; i < data.length; i++) {
|
for (var i = 0; i < data.length; i++) {
|
||||||
var previewConfig = new Object();
|
var previewConfig = new Object();
|
||||||
var path = data[i].abspath;
|
// 预览地址:添加preview=true参数,让浏览器内嵌显示
|
||||||
path = path.substring(path.indexOf('webapps') + 7, path.length);
|
var path = ext.contextPath + "/report/rptInfoSetFile/downloadFile4minio.do?id=" + data[i].id + "&tbName=" + tbName + "&preview=true";
|
||||||
path = ext.basePath.replace(ext.contextPath, '') + path.replace(/\\/g, "\/");
|
|
||||||
;
|
|
||||||
previews.push(path);
|
previews.push(path);
|
||||||
previewConfig['width'] = '2500px';
|
previewConfig['width'] = '2500px';
|
||||||
previewConfig['caption'] = data[i].filename;
|
previewConfig['caption'] = data[i].filename;
|
||||||
|
|||||||
@ -47,7 +47,7 @@
|
|||||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||||
//setTimeout(function(){
|
//setTimeout(function(){
|
||||||
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||||
$.post(ext.contextPath + "/equipment/maintenancePlan/doupdate.do", $("#subForm").serialize(), function(data) {
|
$.post(ext.contextPath + "/maintenance/equipmentPlan/doupdate.do", $("#subForm").serialize(), function(data) {
|
||||||
if (data.res == 1){
|
if (data.res == 1){
|
||||||
$("#table").bootstrapTable('refresh');
|
$("#table").bootstrapTable('refresh');
|
||||||
closeModal("subModal");
|
closeModal("subModal");
|
||||||
@ -70,7 +70,7 @@
|
|||||||
$("#subUnitForm").bootstrapValidator('validate');//提交验证
|
$("#subUnitForm").bootstrapValidator('validate');//提交验证
|
||||||
//setTimeout(function(){
|
//setTimeout(function(){
|
||||||
if ($("#subForm").data('bootstrapValidator').isValid() && $("#subUnitForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
if ($("#subForm").data('bootstrapValidator').isValid() && $("#subUnitForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||||
$.post(ext.contextPath + "/equipment/maintenancePlan/doupdate.do", $("#subForm").serialize(), function(data) {
|
$.post(ext.contextPath + "/maintenance/equipmentPlan/doupdate.do", $("#subForm").serialize(), function(data) {
|
||||||
var routeNum = $("#routeNum").val();
|
var routeNum = $("#routeNum").val();
|
||||||
if (data.res == 1){
|
if (data.res == 1){
|
||||||
$.post(ext.contextPath + "/equipment/maintenancePlan/submitAuditAgain.do", $("#subUnitForm").serialize()+"&routeNum="+routeNum, function(unitdata) {
|
$.post(ext.contextPath + "/equipment/maintenancePlan/submitAuditAgain.do", $("#subUnitForm").serialize()+"&routeNum="+routeNum, function(unitdata) {
|
||||||
@ -426,6 +426,43 @@
|
|||||||
</div>
|
</div>
|
||||||
<div id="fileArea"></div>--%>
|
<div id="fileArea"></div>--%>
|
||||||
</form>
|
</form>
|
||||||
|
<!--流程审核退回后显示-->
|
||||||
|
<form class="form-horizontal" id="subUnitForm" enctype="multipart/form-data">
|
||||||
|
<input type="hidden" class="form-control" name="id" value="${businessUnitHandle.id}">
|
||||||
|
<input type="hidden" class="form-control" name="processid" value="${businessUnitHandle.processid}">
|
||||||
|
<input type="hidden" class="form-control" name="taskid" value="${businessUnitHandle.taskid}">
|
||||||
|
<input type="hidden" class="form-control" name="businessid" value="${businessUnitHandle.businessid}">
|
||||||
|
<input type="hidden" class="form-control" name="taskdefinitionkey" value="${businessUnitHandle.taskdefinitionkey}">
|
||||||
|
<input type="hidden" class="form-control" name="unitid" value="${businessUnitHandle.unitid}">
|
||||||
|
<c:if test='${not empty businessUnitAudit.auditopinion}'>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-2 control-label">审核意见:</label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<textarea class="form-control" id="auditopinion" name="auditopinion" rows="2" placeholder="审核意见">${businessUnitAudit.auditopinion}</textarea>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</c:if>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-2 control-label">*下一节点</label>
|
||||||
|
<div class="col-sm-6">
|
||||||
|
<select class="form-control select2" id="routeNum" name="routeNum" style="width: 270px;">
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="selectUsers" class="form-group">
|
||||||
|
<label class="col-sm-2 control-label">提交至:</label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<input type="text" class="form-control" id="targetUsersName" name="targetUsersName" placeholder="下一级人员" onclick="showUser4AuditSelectsFun();">
|
||||||
|
<input id="targetusers" name="targetusers" type="hidden" value="${businessUnitHandle.targetusers}"/>
|
||||||
|
<input class="form-control" id="targetjobs" name="targetjobs" type="hidden" value=""/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- 文件上传,显示 -->
|
||||||
|
<div class="form-group" style="margin:8px">
|
||||||
|
<button type="button" class="btn btn-default btn-file" onclick="fileinput_process()"><i class="fa fa-paperclip"></i>上传文件</button>
|
||||||
|
</div>
|
||||||
|
<div class="file-border" id="fileArea"></div>
|
||||||
|
</form>
|
||||||
<div class="box box-primary">
|
<div class="box box-primary">
|
||||||
<div class="box-header with-border">
|
<div class="box-header with-border">
|
||||||
<h3 class="box-title">关联设备</h3>
|
<h3 class="box-title">关联设备</h3>
|
||||||
|
|||||||
@ -166,9 +166,8 @@
|
|||||||
$.widget.bridge('uibutton', $.ui.button);
|
$.widget.bridge('uibutton', $.ui.button);
|
||||||
</script>
|
</script>
|
||||||
<!-- END 布局样式 -->
|
<!-- END 布局样式 -->
|
||||||
<LINK href="<%=contextPath%>/IMG/sipai.ico" type="image/x-icon" rel="shortcut icon"></LINK>
|
<LINK href="<%=contextPath%>/IMG/logo.png" type="image/png" rel="shortcut icon"></LINK>
|
||||||
<!-- END HEAD -->
|
<LINK href="<%=contextPath%>/IMG/logo.png" type="image/png" rel="icon"></LINK>
|
||||||
<LINK href="<%=contextPath%>/IMG/logo.ico" type="image/x-icon" rel="shortcut icon"></LINK>
|
|
||||||
|
|
||||||
<script type="text/javascript" src="<%=contextPath%>/node_modules/bootstrap/layer/layer.js" charset="utf-8"></script>
|
<script type="text/javascript" src="<%=contextPath%>/node_modules/bootstrap/layer/layer.js" charset="utf-8"></script>
|
||||||
|
|
||||||
|
|||||||
@ -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">
|
||||||
|
|||||||
@ -296,7 +296,17 @@
|
|||||||
function exportExcel() {
|
function exportExcel() {
|
||||||
var periodTypeName = $('#periodTypeList').val();
|
var periodTypeName = $('#periodTypeList').val();
|
||||||
var positionType = $('#positionTypeList').val();
|
var positionType = $('#positionTypeList').val();
|
||||||
window.open(ext.contextPath + "/kpi/kpiPlan/export.do?periodTypeName=" + periodTypeName + "&positionType=" + positionType);
|
let checkedItems = $("#table").bootstrapTable('getSelections');
|
||||||
|
let ids = "";
|
||||||
|
$.each(checkedItems, function (index, item) {
|
||||||
|
ids += item.id + ",";
|
||||||
|
});
|
||||||
|
if (ids !== "") {
|
||||||
|
ids = ids.substring(0, ids.length - 1);
|
||||||
|
window.open(ext.contextPath + "/kpi/kpiPlan/export.do?periodTypeName=" + periodTypeName + "&positionType=" + positionType + "&ids=" + encodeURIComponent(ids));
|
||||||
|
} else {
|
||||||
|
window.open(ext.contextPath + "/kpi/kpiPlan/export.do?periodTypeName=" + periodTypeName + "&positionType=" + positionType);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -135,7 +135,7 @@
|
|||||||
//配置logo
|
//配置logo
|
||||||
var array = eval(${jsonArray});
|
var array = eval(${jsonArray});
|
||||||
var verCode = true;
|
var verCode = true;
|
||||||
var bgpath = ["IMG/login/bg1.png"];
|
var bgpath = ["IMG/loginbp.png"];
|
||||||
if(array!=null && array!=undefined && array.length>0){
|
if(array!=null && array!=undefined && array.length>0){
|
||||||
for(var i =0;i<array.length;i++){
|
for(var i =0;i<array.length;i++){
|
||||||
var img = null;
|
var img = null;
|
||||||
@ -325,15 +325,9 @@
|
|||||||
<div class="content" style="height:100%;vertical-align: middle;" id="login-content">
|
<div class="content" style="height:100%;vertical-align: middle;" id="login-content">
|
||||||
<!-- BEGIN 登录 FORM -->
|
<!-- BEGIN 登录 FORM -->
|
||||||
<form class="login-form " id="loginForm">
|
<form class="login-form " id="loginForm">
|
||||||
<div class="logo row">
|
<!-- <div class="logo row">
|
||||||
<img src="IMG/login/title.png" style="width:100%;" alt="" id="login-title" />
|
<img src="IMG/login/title.png" style="width:100%;" alt="" id="login-title" />
|
||||||
<!-- <div class="col-lg-8 col-sm-8 col-md-8 col-xs-8">
|
</div> -->
|
||||||
<h5 style="color:black" class="form-title">西派埃智能</h4>
|
|
||||||
<h2 style="margin:0px">南康智慧水厂运管平台</h2>
|
|
||||||
<h4 style="color:black;margin-top:4px" >精益运行工业互联网平台</h4>
|
|
||||||
|
|
||||||
</div> -->
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div id="alertDiv"></div>
|
<div id="alertDiv"></div>
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
839
src/main/webapp/jsp/main_JS_Company2.jsp
Normal file
839
src/main/webapp/jsp/main_JS_Company2.jsp
Normal file
@ -0,0 +1,839 @@
|
|||||||
|
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||||
|
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
|
||||||
|
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
|
||||||
|
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
|
||||||
|
<%@ page import="com.sipai.entity.base.ServerObject" %>
|
||||||
|
<%@ taglib uri="http://www.springsecurity.org/jsp" prefix="security" %>
|
||||||
|
|
||||||
|
<%@ page import="com.sipai.entity.base.MainConfig" %>
|
||||||
|
<% request.setAttribute("type_pro", MainConfig.type_pro); %>
|
||||||
|
<% request.setAttribute("type_safe", MainConfig.type_safe); %>
|
||||||
|
<% request.setAttribute("type_eff", MainConfig.type_eff); %>
|
||||||
|
<% request.setAttribute("type_pic", MainConfig.type_pic); %>
|
||||||
|
|
||||||
|
<!DOCTYPE html>
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<title><%= ServerObject.atttable.get("TOPTITLE")%>
|
||||||
|
</title>
|
||||||
|
|
||||||
|
<!-- 引用页头及CSS页-->
|
||||||
|
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
||||||
|
<!-- echarts-->
|
||||||
|
<script type="text/javascript" src="<%=request.getContextPath()%>/plugins/echarts/echarts.4.1.0.min.js"
|
||||||
|
charset="utf-8"></script>
|
||||||
|
|
||||||
|
<script type="text/javascript" src="<%=request.getContextPath()%>/JS/main/main_js.js" charset="utf-8"></script>
|
||||||
|
<style>
|
||||||
|
/*
|
||||||
|
根据不同分辨率显示不同px的文字大小
|
||||||
|
*/
|
||||||
|
@media (min-width: 1080px) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (min-width: 1550px) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.fontValue {
|
||||||
|
text-align: center;
|
||||||
|
margin-top: 20px;
|
||||||
|
margin-left: 70px;
|
||||||
|
font-size: 20px;
|
||||||
|
color: #ffffff;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fontText {
|
||||||
|
margin: 20px;
|
||||||
|
font-size: 18px;
|
||||||
|
color: #ffffff;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
.carousel-inner,
|
||||||
|
.carousel-inner >.item,
|
||||||
|
.carousel-inner >.item >img{
|
||||||
|
width:100%;height:100%;
|
||||||
|
}
|
||||||
|
.carousel-caption{
|
||||||
|
cursor: pointer;
|
||||||
|
padding: 0;
|
||||||
|
background-color: RGBA(55,141,204,0.5);
|
||||||
|
bottom: 10px;
|
||||||
|
}
|
||||||
|
.section-header {
|
||||||
|
width: 100%;
|
||||||
|
height: 48px;
|
||||||
|
float: left;
|
||||||
|
border-bottom: 2px solid #67aad7;
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 16px;
|
||||||
|
color: #0c4377;
|
||||||
|
padding-left: 15px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
background: linear-gradient(to right, rgba(103, 170, 215, 0.1), transparent);
|
||||||
|
}
|
||||||
|
.section-header::before {
|
||||||
|
content: "";
|
||||||
|
display: block;
|
||||||
|
width: 4px;
|
||||||
|
height: 60%;
|
||||||
|
background-color: #0c4377;
|
||||||
|
margin-right: 10px;
|
||||||
|
border-radius: 2px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<script type="text/javascript">
|
||||||
|
|
||||||
|
|
||||||
|
$(function () {
|
||||||
|
firstFun();
|
||||||
|
});
|
||||||
|
|
||||||
|
window.onresize = function () {
|
||||||
|
firstFun();
|
||||||
|
}
|
||||||
|
|
||||||
|
function firstFun() {
|
||||||
|
// 不再设置固定高度,让页面自然滚动
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
type: 'GET',
|
||||||
|
url: ext.contextPath + '/base/mainConfig/getJson.do',
|
||||||
|
async: true,
|
||||||
|
data: {unitId: unitId},
|
||||||
|
globle: false,
|
||||||
|
error: function () {
|
||||||
|
return false;
|
||||||
|
},
|
||||||
|
success: function (data1) {
|
||||||
|
// var data = eval('(' + data + ')');
|
||||||
|
|
||||||
|
console.log(data);
|
||||||
|
var data = {
|
||||||
|
"status": "pass",
|
||||||
|
"mpcode": [
|
||||||
|
{
|
||||||
|
"divId": "valueProduce1_js",
|
||||||
|
"funName": "getValue",
|
||||||
|
"id": "9A46F4D7-3C49-42DD-9603-BC55890F6829",
|
||||||
|
"memo": "AUTO_HOME_PRO_VAL_1",
|
||||||
|
"morder": 1,
|
||||||
|
"mpointId": "C_Jsssll",
|
||||||
|
"sql": "",
|
||||||
|
"testId": "textProduce1_js",
|
||||||
|
"type": "pro",
|
||||||
|
"unitId": "0533JS",
|
||||||
|
"where": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"divId": "",
|
||||||
|
"funName": "getPic",
|
||||||
|
"id": "D071B1E9-EADC-466A-86E8-300EE5ED35B2",
|
||||||
|
"memo": "AUTO_HOME_PIC",
|
||||||
|
"morder": 1,
|
||||||
|
"mpointId": "",
|
||||||
|
"sql": "",
|
||||||
|
"testId": "",
|
||||||
|
"type": "pic",
|
||||||
|
"unitId": "0533JS",
|
||||||
|
"where": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"divId": "valueProduce2_js",
|
||||||
|
"funName": "getValue",
|
||||||
|
"id": "7A212EF9-6A0D-415D-BEA5-5A1B23250069",
|
||||||
|
"memo": "AUTO_HOME_PRO_VAL_2",
|
||||||
|
"morder": 2,
|
||||||
|
"mpointId": "C_Csssll",
|
||||||
|
"sql": "",
|
||||||
|
"testId": "textProduce2_js",
|
||||||
|
"type": "pro",
|
||||||
|
"unitId": "0533JS",
|
||||||
|
"where": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"divId": "valueProduce3_js",
|
||||||
|
"funName": "getValue",
|
||||||
|
"id": "37D4878E-82D5-4A06-A7FC-3D1D9298D5F7",
|
||||||
|
"memo": "AUTO_HOME_PRO_VAL_3",
|
||||||
|
"morder": 3,
|
||||||
|
"mpointId": "C_Mrddh",
|
||||||
|
"sql": "",
|
||||||
|
"testId": "textProduce3_js",
|
||||||
|
"type": "pro",
|
||||||
|
"unitId": "0533JS",
|
||||||
|
"where": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"divId": "myChartProduce1_js",
|
||||||
|
"funName": "echartPie",
|
||||||
|
"id": "D88301BC-ACF7-48F5-A1B1-6672CB686786",
|
||||||
|
"memo": "AUTO_HOME_PRO_PIE_1",
|
||||||
|
"morder": 14,
|
||||||
|
"mpointId": "D_JinSCOD",
|
||||||
|
"sql": "",
|
||||||
|
"testId": "myChartProduceText1_js",
|
||||||
|
"type": "pro",
|
||||||
|
"unitId": "0533JS",
|
||||||
|
"where": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"divId": "myChartProduce2_js",
|
||||||
|
"funName": "echartPie",
|
||||||
|
"id": "D90B7C5B-76F4-4B70-9C65-58AD3F70C127",
|
||||||
|
"memo": "AUTO_HOME_PRO_PIE_2",
|
||||||
|
"morder": 15,
|
||||||
|
"mpointId": "D_JinSPH",
|
||||||
|
"sql": "",
|
||||||
|
"testId": "myChartProduceText2_js",
|
||||||
|
"type": "pro",
|
||||||
|
"unitId": "0533JS",
|
||||||
|
"where": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"divId": "myChartProduce3_js",
|
||||||
|
"funName": "echartPie",
|
||||||
|
"id": "B2309C35-5F47-402C-A7C3-F710F67A0AE3",
|
||||||
|
"memo": "AUTO_HOME_PRO_PIE_3",
|
||||||
|
"morder": 16,
|
||||||
|
"mpointId": "C_Jstp",
|
||||||
|
"sql": "",
|
||||||
|
"testId": "myChartProduceText3_js",
|
||||||
|
"type": "pro",
|
||||||
|
"unitId": "0533JS",
|
||||||
|
"where": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"divId": "myChartProduce4_js",
|
||||||
|
"funName": "echartPie",
|
||||||
|
"id": "B054F2EA-CF10-4976-B308-EE6A929468A3",
|
||||||
|
"memo": "AUTO_HOME_PRO_PIE_4",
|
||||||
|
"morder": 17,
|
||||||
|
"mpointId": "C_Jstn",
|
||||||
|
"sql": "",
|
||||||
|
"testId": "myChartProduceText4_js",
|
||||||
|
"type": "pro",
|
||||||
|
"unitId": "0533JS",
|
||||||
|
"where": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"divId": "myChartProduce5_js",
|
||||||
|
"funName": "echartPie",
|
||||||
|
"id": "0DDD5D71-2D8F-400D-A99E-0D19C3D8DADF",
|
||||||
|
"memo": "AUTO_HOME_PRO_PIE_5",
|
||||||
|
"morder": 18,
|
||||||
|
"mpointId": "C_Jsnh4n",
|
||||||
|
"sql": "",
|
||||||
|
"testId": "myChartProduceText5_js",
|
||||||
|
"type": "pro",
|
||||||
|
"unitId": "0533JS",
|
||||||
|
"where": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"divId": "myChartProduce6_js",
|
||||||
|
"funName": "echartPie",
|
||||||
|
"id": "DAB3ABF7-5135-462F-80FC-E717A09391C0",
|
||||||
|
"memo": "AUTO_HOME_PRO_PIE_6",
|
||||||
|
"morder": 19,
|
||||||
|
"mpointId": "D_ChuSCOD",
|
||||||
|
"sql": "",
|
||||||
|
"testId": "myChartProduceText6_js",
|
||||||
|
"type": "pro",
|
||||||
|
"unitId": "0533JS",
|
||||||
|
"where": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"divId": "myChartProduce7_js",
|
||||||
|
"funName": "echartPie",
|
||||||
|
"id": "9864A8F9-6362-49F9-8F10-812E45F22FFB",
|
||||||
|
"memo": "AUTO_HOME_PRO_PIE_7",
|
||||||
|
"morder": 20,
|
||||||
|
"mpointId": "D_ChuSPH",
|
||||||
|
"sql": "",
|
||||||
|
"testId": "myChartProduceText7_js",
|
||||||
|
"type": "pro",
|
||||||
|
"unitId": "0533JS",
|
||||||
|
"where": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"divId": "myChartProduce8_js",
|
||||||
|
"funName": "echartPie",
|
||||||
|
"id": "B989F914-9883-47BA-B261-F12DC2CA1365",
|
||||||
|
"memo": "AUTO_HOME_PRO_PIE_8",
|
||||||
|
"morder": 21,
|
||||||
|
"mpointId": "C_Cstp",
|
||||||
|
"sql": "",
|
||||||
|
"testId": "myChartProduceText8_js",
|
||||||
|
"type": "pro",
|
||||||
|
"unitId": "0533JS",
|
||||||
|
"where": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"divId": "myChartProduce9_js",
|
||||||
|
"funName": "echartPie",
|
||||||
|
"id": "BBA7F23F-197F-4FF0-AD42-426DE4569907",
|
||||||
|
"memo": "AUTO_HOME_PRO_PIE_9",
|
||||||
|
"morder": 22,
|
||||||
|
"mpointId": "C_Cstn",
|
||||||
|
"sql": "",
|
||||||
|
"testId": "myChartProduceText9_js",
|
||||||
|
"type": "pro",
|
||||||
|
"unitId": "0533JS",
|
||||||
|
"where": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"divId": "myChartProduce10_js",
|
||||||
|
"funName": "echartPie",
|
||||||
|
"id": "E179A4CE-D159-4B11-A517-7CC760C27E70",
|
||||||
|
"memo": "AUTO_HOME_PRO_PIE_10",
|
||||||
|
"morder": 23,
|
||||||
|
"mpointId": "C_Csnh4n",
|
||||||
|
"sql": "",
|
||||||
|
"testId": "myChartProduceText10_js",
|
||||||
|
"type": "pro",
|
||||||
|
"unitId": "0533JS",
|
||||||
|
"where": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"divId": "myChartProduce11_js",
|
||||||
|
"funName": "echartPie",
|
||||||
|
"id": "E179A4CE-D159-4B11-A517-7CC760C27E70",
|
||||||
|
"memo": "AUTO_HOME_PRO_PIE_10",
|
||||||
|
"morder": 23,
|
||||||
|
"mpointId": "C_Csnh4n",
|
||||||
|
"sql": "",
|
||||||
|
"testId": "myChartProduceText11_js",
|
||||||
|
"type": "pro",
|
||||||
|
"unitId": "0533JS",
|
||||||
|
"where": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"divId": "myChartProduce12_js",
|
||||||
|
"funName": "echartPie",
|
||||||
|
"id": "E179A4CE-D159-4B11-A517-7CC760C27E70",
|
||||||
|
"memo": "AUTO_HOME_PRO_PIE_10",
|
||||||
|
"morder": 23,
|
||||||
|
"mpointId": "C_Csnh4n",
|
||||||
|
"sql": "",
|
||||||
|
"testId": "myChartProduceText12_js",
|
||||||
|
"type": "pro",
|
||||||
|
"unitId": "0533JS",
|
||||||
|
"where": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"divId": "myChartProduce13_js",
|
||||||
|
"funName": "echartPie",
|
||||||
|
"id": "E179A4CE-D159-4B11-A517-7CC760C27E70",
|
||||||
|
"memo": "AUTO_HOME_PRO_PIE_10",
|
||||||
|
"morder": 23,
|
||||||
|
"mpointId": "C_Csnh4n",
|
||||||
|
"sql": "",
|
||||||
|
"testId": "myChartProduceText13_js",
|
||||||
|
"type": "pro",
|
||||||
|
"unitId": "0533JS",
|
||||||
|
"where": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"divId": "myChartProduce14_js",
|
||||||
|
"funName": "echartPie",
|
||||||
|
"id": "E179A4CE-D159-4B11-A517-7CC760C27E70",
|
||||||
|
"memo": "AUTO_HOME_PRO_PIE_10",
|
||||||
|
"morder": 23,
|
||||||
|
"mpointId": "C_Csnh4n",
|
||||||
|
"sql": "",
|
||||||
|
"testId": "myChartProduceText14_js",
|
||||||
|
"type": "pro",
|
||||||
|
"unitId": "0533JS",
|
||||||
|
"where": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"divId": "myChartProduce15_js",
|
||||||
|
"funName": "echartPie",
|
||||||
|
"id": "E179A4CE-D159-4B11-A517-7CC760C27E70",
|
||||||
|
"memo": "AUTO_HOME_PRO_PIE_10",
|
||||||
|
"morder": 23,
|
||||||
|
"mpointId": "C_Csnh4n",
|
||||||
|
"sql": "",
|
||||||
|
"testId": "myChartProduceText15_js",
|
||||||
|
"type": "pro",
|
||||||
|
"unitId": "0533JS",
|
||||||
|
"where": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"divId": "myChartProduce16_js",
|
||||||
|
"funName": "echartPie",
|
||||||
|
"id": "E179A4CE-D159-4B11-A517-7CC760C27E70",
|
||||||
|
"memo": "AUTO_HOME_PRO_PIE_10",
|
||||||
|
"morder": 23,
|
||||||
|
"mpointId": "C_Csnh4n",
|
||||||
|
"sql": "",
|
||||||
|
"testId": "myChartProduceText16_js",
|
||||||
|
"type": "pro",
|
||||||
|
"unitId": "0533JS",
|
||||||
|
"where": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"divId": "myChartProduce17_js",
|
||||||
|
"funName": "echartPie",
|
||||||
|
"id": "E179A4CE-D159-4B11-A517-7CC760C27E70",
|
||||||
|
"memo": "AUTO_HOME_PRO_PIE_10",
|
||||||
|
"morder": 23,
|
||||||
|
"mpointId": "C_Csnh4n",
|
||||||
|
"sql": "",
|
||||||
|
"testId": "myChartProduceText17_js",
|
||||||
|
"type": "pro",
|
||||||
|
"unitId": "0533JS",
|
||||||
|
"where": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"divId": "myChartProduce18_js",
|
||||||
|
"funName": "echartPie",
|
||||||
|
"id": "E179A4CE-D159-4B11-A517-7CC760C27E70",
|
||||||
|
"memo": "AUTO_HOME_PRO_PIE_10",
|
||||||
|
"morder": 23,
|
||||||
|
"mpointId": "C_Csnh4n",
|
||||||
|
"sql": "",
|
||||||
|
"testId": "myChartProduceText18_js",
|
||||||
|
"type": "pro",
|
||||||
|
"unitId": "0533JS",
|
||||||
|
"where": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"divId": "myChartProduce19_js",
|
||||||
|
"funName": "echartPie",
|
||||||
|
"id": "E179A4CE-D159-4B11-A517-7CC760C27E70",
|
||||||
|
"memo": "AUTO_HOME_PRO_PIE_10",
|
||||||
|
"morder": 23,
|
||||||
|
"mpointId": "C_Csnh4n",
|
||||||
|
"sql": "",
|
||||||
|
"testId": "myChartProduceText19_js",
|
||||||
|
"type": "pro",
|
||||||
|
"unitId": "0533JS",
|
||||||
|
"where": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"divId": "myChartProduce20_js",
|
||||||
|
"funName": "echartPie",
|
||||||
|
"id": "E179A4CE-D159-4B11-A517-7CC760C27E70",
|
||||||
|
"memo": "AUTO_HOME_PRO_PIE_10",
|
||||||
|
"morder": 23,
|
||||||
|
"mpointId": "C_Csnh4n",
|
||||||
|
"sql": "",
|
||||||
|
"testId": "myChartProduceText20_js",
|
||||||
|
"type": "pro",
|
||||||
|
"unitId": "0533JS",
|
||||||
|
"where": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"divId": "safe_value_1",
|
||||||
|
"funName": "getValue",
|
||||||
|
"id": "E39427C5-3120-46CB-B94B-53B76190ED39",
|
||||||
|
"memo": "AUTO_HOME_SAFE_VAL_1",
|
||||||
|
"morder": 44,
|
||||||
|
"mpointId": "C_Ydrjjs",
|
||||||
|
"sql": "",
|
||||||
|
"testId": "safe_text_1",
|
||||||
|
"type": "safe",
|
||||||
|
"unitId": "0533JS",
|
||||||
|
"where": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"divId": "safe_value_2",
|
||||||
|
"funName": "getValue",
|
||||||
|
"id": "541399E8-7413-444F-85A9-22D746E4A3A2",
|
||||||
|
"memo": "AUTO_HOME_SAFE_VAL_2",
|
||||||
|
"morder": 45,
|
||||||
|
"mpointId": "C_Ndzjs",
|
||||||
|
"sql": "",
|
||||||
|
"testId": "safe_text_2",
|
||||||
|
"type": "safe",
|
||||||
|
"unitId": "0533JS",
|
||||||
|
"where": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"divId": "safe_value_3",
|
||||||
|
"funName": "getValue",
|
||||||
|
"id": "E109D0CB-4458-4A63-B714-A6AC7B6979F1",
|
||||||
|
"memo": "AUTO_HOME_SAFE_VAL_3",
|
||||||
|
"morder": 46,
|
||||||
|
"mpointId": "C_Sbwhl",
|
||||||
|
"sql": "",
|
||||||
|
"testId": "safe_text_3",
|
||||||
|
"type": "safe",
|
||||||
|
"unitId": "0533JS",
|
||||||
|
"where": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"divId": "safe_value_4",
|
||||||
|
"funName": "getValue",
|
||||||
|
"id": "024F849A-E7F3-4665-862A-49B2944277B7",
|
||||||
|
"memo": "AUTO_HOME_SAFE_VAL_4",
|
||||||
|
"morder": 47,
|
||||||
|
"mpointId": "C_Mrddh",
|
||||||
|
"sql": "",
|
||||||
|
"testId": "safe_text_4",
|
||||||
|
"type": "safe",
|
||||||
|
"unitId": "0533JS",
|
||||||
|
"where": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"divId": "myChartProduce8",
|
||||||
|
"funName": "echartMixed",
|
||||||
|
"id": "B414A41C-DC87-47A0-BB07-5BC64E5E61CB",
|
||||||
|
"memo": "AUTO_HOME_SAFE_BAR",
|
||||||
|
"morder": 100,
|
||||||
|
"mpointId": "C_Mrjsy,C_Mrjse",
|
||||||
|
"sql": "",
|
||||||
|
"testId": "",
|
||||||
|
"type": "safe",
|
||||||
|
"unitId": "0533JS",
|
||||||
|
"where": ""
|
||||||
|
},
|
||||||
|
// {
|
||||||
|
// "divId": "myChartProduce9",
|
||||||
|
// "funName": "echartColumnar2",
|
||||||
|
// "id": "B414A41C-DC87-47A0-BB07-5BC64E5E61CB",
|
||||||
|
// "memo": "AUTO_HOME_SAFE_BAR",
|
||||||
|
// "morder": 100,
|
||||||
|
// "mpointId": "C_Mrjsy,C_Mrjse",
|
||||||
|
// "sql": "",
|
||||||
|
// "testId": "",
|
||||||
|
// "type": "safe",
|
||||||
|
// "unitId": "0533JS",
|
||||||
|
// "where": ""
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// "divId": "myChartProduce10",
|
||||||
|
// "funName": "echartLine2",
|
||||||
|
// "id": "B414A41C-DC87-47A0-BB07-5BC64E5E61CB",
|
||||||
|
// "memo": "AUTO_HOME_SAFE_BAR",
|
||||||
|
// "morder": 100,
|
||||||
|
// "mpointId": "C_Mrjsy,C_Mrjse",
|
||||||
|
// "sql": "",
|
||||||
|
// "testId": "",
|
||||||
|
// "type": "safe",
|
||||||
|
// "unitId": "0533JS",
|
||||||
|
// "where": ""
|
||||||
|
// }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
for (var i = 0; i < data.mpcode.length; i++) {
|
||||||
|
var code = data.mpcode[i].mpointId;
|
||||||
|
var funname = data.mpcode[i].funName;
|
||||||
|
var divid = data.mpcode[i].divId;
|
||||||
|
var testid = data.mpcode[i].testId;
|
||||||
|
var mpointId = data.mpcode[i].mpointId;
|
||||||
|
if (data.mpcode[i].type == '${type_pro}') {//生产
|
||||||
|
eval(funname + "('" + unitId + "','" + code + "','" + divid + "','" + testid + "')")
|
||||||
|
}
|
||||||
|
if (data.mpcode[i].type == '${type_safe}') {//安全
|
||||||
|
eval(funname + "('" + unitId + "','" + code + "','" + divid + "','" + testid + "')")
|
||||||
|
}
|
||||||
|
if (data.mpcode[i].type == '${type_eff}') {//效率
|
||||||
|
eval(funname + "('" + unitId + "','" + code + "','" + divid + "','" + testid + "')")
|
||||||
|
}
|
||||||
|
if (data.mpcode[i].type == '${type_pic}') {//左上角图片
|
||||||
|
//eval(funname + "('" + unitId + "')")
|
||||||
|
getUnitsByUnitId4Select(unitId,funname,mpointId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//安全
|
||||||
|
// echartColumnar2(unitId, 'TH_03_FIT040001D_FLOW_C', 'myChartsafe1');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
//优良差
|
||||||
|
$(".evaluateIcon").attr("src", ext.contextPath + "/IMG/main/evaluate.png");
|
||||||
|
|
||||||
|
//左上角图片
|
||||||
|
// $("#mainImg").attr("src", ext.contextPath + "/IMG/main/main.jpg");
|
||||||
|
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<div id="mainDiv" style="background:#f1f1f1;min-height:100vh; width:100%;">
|
||||||
|
|
||||||
|
<div style="float:left;width:100%;">
|
||||||
|
<!-- 水质指标区域 -->
|
||||||
|
<div style="float:left;width:100%;padding:5px;">
|
||||||
|
<div style="width:100%;background-color:#ffffff;border-radius:5px;">
|
||||||
|
<div class="section-header">
|
||||||
|
金山卫污水厂
|
||||||
|
</div>
|
||||||
|
<div style="display:flex;width:100%;">
|
||||||
|
<!-- 左侧卡片 -->
|
||||||
|
<div style="width:300px;min-width:300px;display:flex;flex-direction:column;justify-content:space-evenly;padding:10px;gap:10px;">
|
||||||
|
<div></div>
|
||||||
|
<div style="width:100%;height:120px;background-color:#cbe3f9;border-radius:5px;">
|
||||||
|
<div class="fontText" style="color: #0c4377;" id="textProduce1_js">进水瞬时流量(m³/h)</div>
|
||||||
|
<div class="fontValue" style="color: #0c4377;" id="valueProduce1_js">3551</div>
|
||||||
|
</div>
|
||||||
|
<div style="width:100%;height:120px;background-color:#badaf8;border-radius:5px;">
|
||||||
|
<div class="fontText" style="color: #0c4377;" id="textProduce2_js">出水瞬时流量(m³/h)</div>
|
||||||
|
<div class="fontValue" style="color: #0c4377;" id="valueProduce2_js">3551</div>
|
||||||
|
</div>
|
||||||
|
<div></div>
|
||||||
|
<div style="width:100%;height:120px;background-color:#73afd8;border-radius:5px;">
|
||||||
|
<div class="fontText" style="color: #0c4377;" id="textProduce3_js">进水瞬时流量(m³/h)</div>
|
||||||
|
<div class="fontValue" style="color: #0c4377;" id="valueProduce3_js">3551</div>
|
||||||
|
</div>
|
||||||
|
<div style="width:100%;height:120px;background-color:#378dcc;border-radius:5px;">
|
||||||
|
<div class="fontText" style="color: #0c4377;" id="textProduce4_js">出水瞬时流量(m³/h)</div>
|
||||||
|
<div class="fontValue" style="color: #0c4377;" id="valueProduce4_js">3551</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- 右侧图表区域 -->
|
||||||
|
<div style="flex:1;padding:10px;">
|
||||||
|
<!-- 工业污水质量指标 标题 -->
|
||||||
|
<div style="width:100%;height:30px;font-weight:bold;color:#0c4377;padding-left:10px;border-bottom:2px solid #67aad7;display:flex;align-items:center;">
|
||||||
|
工业污水质量指标
|
||||||
|
</div>
|
||||||
|
<!-- 工业污水质量指标 第一行 (1-5) -->
|
||||||
|
<div style="width:100%;height:180px;display:flex;padding:5px 0;">
|
||||||
|
<div style="width:20%;height:100%;padding:0 5px;">
|
||||||
|
<div style="width:100%;height:30px;text-align:center; line-height: 40px;" id="myChartProduceText1_js">-</div>
|
||||||
|
<div style="width:100%;height:110px;" id="myChartProduce1_js"></div>
|
||||||
|
</div>
|
||||||
|
<div style="width:20%;height:100%;padding:0 5px;">
|
||||||
|
<div style="width:100%;height:30px;text-align:center; line-height: 40px" id="myChartProduceText2_js">-</div>
|
||||||
|
<div style="width:100%;height:110px;" id="myChartProduce2_js"></div>
|
||||||
|
</div>
|
||||||
|
<div style="width:20%;height:100%;padding:0 5px;">
|
||||||
|
<div style="width:100%;height:25px;text-align:center; line-height: 40px" id="myChartProduceText3_js">-</div>
|
||||||
|
<div style="width:100%;height:110px;" id="myChartProduce3_js"></div>
|
||||||
|
</div>
|
||||||
|
<div style="width:20%;height:100%;padding:0 5px;">
|
||||||
|
<div style="width:100%;height:25px;text-align:center; line-height: 40px" id="myChartProduceText4_js">-</div>
|
||||||
|
<div style="width:100%;height:110px;" id="myChartProduce4_js"></div>
|
||||||
|
</div>
|
||||||
|
<div style="width:20%;height:100%;padding:0 5px;">
|
||||||
|
<div style="width:100%;height:25px;text-align:center; line-height: 40px" id="myChartProduceText5_js">-</div>
|
||||||
|
<div style="width:100%;height:110px;" id="myChartProduce5_js"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- 工业污水质量指标 第二行 (6-10) -->
|
||||||
|
<div style="width:100%;height:180px;display:flex;padding:5px 0;">
|
||||||
|
<div style="width:20%;height:100%;padding:0 5px;">
|
||||||
|
<div style="width:100%;height:25px;text-align:center; line-height: 40px" id="myChartProduceText6_js">-</div>
|
||||||
|
<div style="width:100%;height:110px;" id="myChartProduce6_js"></div>
|
||||||
|
</div>
|
||||||
|
<div style="width:20%;height:100%;padding:0 5px;">
|
||||||
|
<div style="width:100%;height:25px;text-align:center; line-height: 40px" id="myChartProduceText7_js">-</div>
|
||||||
|
<div style="width:100%;height:110px;" id="myChartProduce7_js"></div>
|
||||||
|
</div>
|
||||||
|
<div style="width:20%;height:100%;padding:0 5px;">
|
||||||
|
<div style="width:100%;height:25px;text-align:center; line-height: 40px" id="myChartProduceText8_js">-</div>
|
||||||
|
<div style="width:100%;height:110px;" id="myChartProduce8_js"></div>
|
||||||
|
</div>
|
||||||
|
<div style="width:20%;height:100%;padding:0 5px;">
|
||||||
|
<div style="width:100%;height:25px;text-align:center; line-height: 40px" id="myChartProduceText9_js">-</div>
|
||||||
|
<div style="width:100%;height:110px;" id="myChartProduce9_js"></div>
|
||||||
|
</div>
|
||||||
|
<div style="width:20%;height:100%;padding:0 5px;">
|
||||||
|
<div style="width:100%;height:25px;text-align:center; line-height: 40px" id="myChartProduceText10_js">-</div>
|
||||||
|
<div style="width:100%;height:110px;" id="myChartProduce10_js"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- 生活污水质量指标 标题 -->
|
||||||
|
<div style="width:100%;height:30px;font-weight:bold;color:#0c4377;padding-left:10px;border-bottom:2px solid #67aad7;display:flex;align-items:center;margin-top:10px;">
|
||||||
|
生活污水质量指标
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<!-- 生活污水质量指标 第一行 (11-15) -->
|
||||||
|
<div style="width:100%;height:180px;display:flex;padding:5px 0;">
|
||||||
|
<div style="width:20%;height:100%;padding:0 5px;">
|
||||||
|
<div style="width:100%;height:25px;text-align:center; line-height: 40px" id="myChartProduceText11_js">-</div>
|
||||||
|
<div style="width:100%;height:110px;" id="myChartProduce11_js"></div>
|
||||||
|
</div>
|
||||||
|
<div style="width:20%;height:100%;padding:0 5px;">
|
||||||
|
<div style="width:100%;height:25px;text-align:center; line-height: 40px" id="myChartProduceText12_js">-</div>
|
||||||
|
<div style="width:100%;height:110px;" id="myChartProduce12_js"></div>
|
||||||
|
</div>
|
||||||
|
<div style="width:20%;height:100%;padding:0 5px;">
|
||||||
|
<div style="width:100%;height:25px;text-align:center; line-height: 40px" id="myChartProduceText13_js">-</div>
|
||||||
|
<div style="width:100%;height:110px;" id="myChartProduce13_js"></div>
|
||||||
|
</div>
|
||||||
|
<div style="width:20%;height:100%;padding:0 5px;">
|
||||||
|
<div style="width:100%;height:25px;text-align:center; line-height: 40px" id="myChartProduceText14_js">-</div>
|
||||||
|
<div style="width:100%;height:110px;" id="myChartProduce14_js"></div>
|
||||||
|
</div>
|
||||||
|
<div style="width:20%;height:100%;padding:0 5px;">
|
||||||
|
<div style="width:100%;height:25px;text-align:center; line-height: 40px" id="myChartProduceText15_js">-</div>
|
||||||
|
<div style="width:100%;height:110px;" id="myChartProduce15_js"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- 生活污水质量指标 第二行 (16-20) -->
|
||||||
|
<div style="width:100%;height:180px;display:flex;padding:5px 0;">
|
||||||
|
<div style="width:20%;height:100%;padding:0 5px;">
|
||||||
|
<div style="width:100%;height:25px;text-align:center; line-height: 40px" id="myChartProduceText16_js">-</div>
|
||||||
|
<div style="width:100%;height:110px;" id="myChartProduce16_js"></div>
|
||||||
|
</div>
|
||||||
|
<div style="width:20%;height:100%;padding:0 5px;">
|
||||||
|
<div style="width:100%;height:25px;text-align:center; line-height: 40px" id="myChartProduceText17_js">-</div>
|
||||||
|
<div style="width:100%;height:110px;" id="myChartProduce17_js"></div>
|
||||||
|
</div>
|
||||||
|
<div style="width:20%;height:100%;padding:0 5px;">
|
||||||
|
<div style="width:100%;height:25px;text-align:center; line-height: 40px" id="myChartProduceText18_js">-</div>
|
||||||
|
<div style="width:100%;height:110px;" id="myChartProduce18_js"></div>
|
||||||
|
</div>
|
||||||
|
<div style="width:20%;height:100%;padding:0 5px;">
|
||||||
|
<div style="width:100%;height:25px;text-align:center; line-height: 40px" id="myChartProduceText19_js">-</div>
|
||||||
|
<div style="width:100%;height:110px;" id="myChartProduce19_js"></div>
|
||||||
|
</div>
|
||||||
|
<div style="width:20%;height:100%;padding:0 5px;">
|
||||||
|
<div style="width:100%;height:25px;text-align:center; line-height: 40px" id="myChartProduceText20_js">-</div>
|
||||||
|
<div style="width:100%;height:110px;" id="myChartProduce20_js"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- 水量及电耗区域 -->
|
||||||
|
<div style="float:left;width:100%;padding:5px;">
|
||||||
|
<div style="width:100%;background-color:#ffffff;border-radius:5px;">
|
||||||
|
<div class="section-header">
|
||||||
|
水量及电耗
|
||||||
|
</div>
|
||||||
|
<div style="display:flex;width:100%;padding:10px;gap:10px;">
|
||||||
|
<div style="flex:1;height:100px;background-color:#378dcc;border-radius:5px;">
|
||||||
|
<div class="fontValue" id="safe_value_1">16532</div>
|
||||||
|
<div class="fontText" id="safe_text_1">工业进水量 (m3)</div>
|
||||||
|
</div>
|
||||||
|
<div style="flex:1;height:100px;background-color:#67aad7;border-radius:5px;">
|
||||||
|
<div class="fontValue" id="safe_value_2">16532</div>
|
||||||
|
<div class="fontText" id="safe_text_2">工业出水量 (m3)</div>
|
||||||
|
</div>
|
||||||
|
<div style="flex:1;height:100px;background-color:#FACA00;border-radius:5px;">
|
||||||
|
<div class="fontValue" id="safe_value_3">16532</div>
|
||||||
|
<div class="fontText" id="safe_text_3">生活进水量 (m3)</div>
|
||||||
|
</div>
|
||||||
|
<div style="flex:1;height:100px;background-color:#66D97C;border-radius:5px;">
|
||||||
|
<div class="fontValue" id="safe_value_4">16532</div>
|
||||||
|
<div class="fontText" id="safe_text_4">生活出水量 (m3)</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div style="width:100%;height:300px;padding:10px;">
|
||||||
|
<div style="width:100%;height:100%;" id="myChartProduce8"></div>
|
||||||
|
<%-- <div style="width:100%;height:100%;" id="myChartProduce9"></div>--%>
|
||||||
|
<%-- <div style="width:100%;height:100%;" id="myChartProduce10"></div>--%>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!--
|
||||||
|
<div style="float:left;height:50%;width:100%;padding:5px 5px 5px 5px;">
|
||||||
|
<div style="height:100%;width:100%;background-color:#ffffff;">
|
||||||
|
<div style="width:100%;height:5%;float:left;border-bottom:2px solid #67aad7;font-weight: bold;">
|
||||||
|
二车间
|
||||||
|
</div>
|
||||||
|
<div style="width:20%;height:96%;float:left;">
|
||||||
|
<div style="width:100%;height:25%;float:left;background-color:#cbe3f9;margin:6%;">
|
||||||
|
<div class="fontValue" style="color: #0c4377;" id="valueProduce1_cs"></div>
|
||||||
|
<div class="fontText" style="color: #0c4377;" id="textProduce1_cs"></div>
|
||||||
|
</div>
|
||||||
|
<div style="width:100%;height:25%;float:left;background-color:#badaf8;margin:6%;">
|
||||||
|
<div class="fontValue" style="color: #0c4377;" id="valueProduce2_cs"></div>
|
||||||
|
<div class="fontText" style="color: #0c4377;" id="textProduce2_cs"></div>
|
||||||
|
</div>
|
||||||
|
<div style="width:100%;height:25%;float:left;background-color:#73afd8;margin:6%;">
|
||||||
|
<div class="fontValue" style="color: #0c4377;" id="valueProduce3_cs"></div>
|
||||||
|
<div class="fontText" style="color: #0c4377;" id="textProduce3_cs"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div style="width:80%;height:96%;float:left;padding: 5px 10px 30px 10px;">
|
||||||
|
<div style="width:100%;height:100%;float:left;">
|
||||||
|
<div style="width:100%;height:3%;float:left;"></div>
|
||||||
|
<div style="width:100%;height:40%;float:left;">
|
||||||
|
<div style="width:20%;height:100%;float:left;">
|
||||||
|
<div style="width:100%;height:20%;padding-top:10%;padding-right:5%;" align="center"
|
||||||
|
id="myChartProduceText1_cs">
|
||||||
|
-
|
||||||
|
</div>
|
||||||
|
<div style="width:100%;height:80%;" id="myChartProduce1_cs"></div>
|
||||||
|
</div>
|
||||||
|
<div style="width:20%;height:100%;float:left;">
|
||||||
|
<div style="width:100%;height:20%;padding-top:10%;padding-right:5%;" align="center"
|
||||||
|
id="myChartProduceText2_cs">
|
||||||
|
-
|
||||||
|
</div>
|
||||||
|
<div style="width:100%;height:80%;" id="myChartProduce2_cs"></div>
|
||||||
|
</div>
|
||||||
|
<div style="width:20%;height:100%;float:left;">
|
||||||
|
<div style="width:100%;height:20%;padding-top:10%;padding-right:5%;" align="center"
|
||||||
|
id="myChartProduceText3_cs">
|
||||||
|
-
|
||||||
|
</div>
|
||||||
|
<div style="width:100%;height:80%;" id="myChartProduce3_cs"></div>
|
||||||
|
</div>
|
||||||
|
<div style="width:20%;height:100%;float:left;">
|
||||||
|
<div style="width:100%;height:20%;padding-top:10%;padding-right:5%;" align="center"
|
||||||
|
id="myChartProduceText4_cs">
|
||||||
|
-
|
||||||
|
</div>
|
||||||
|
<div style="width:100%;height:80%;" id="myChartProduce4_cs"></div>
|
||||||
|
</div>
|
||||||
|
<div style="width:20%;height:100%;float:left;">
|
||||||
|
<div style="width:100%;height:20%;padding-top:10%;padding-right:5%;" align="center"
|
||||||
|
id="myChartProduceText5_cs">
|
||||||
|
-
|
||||||
|
</div>
|
||||||
|
<div style="width:100%;height:80%;" id="myChartProduce5_cs"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div style="width:100%;height:4%;float:left;"></div>
|
||||||
|
<div style="width:100%;height:40%;float:left;">
|
||||||
|
<div style="width:20%;height:100%;float:left;">
|
||||||
|
<div style="width:100%;height:20%;padding-top:10%;padding-right:5%;" align="center"
|
||||||
|
id="myChartProduceText6_cs">
|
||||||
|
-
|
||||||
|
</div>
|
||||||
|
<div style="width:100%;height:80%;" id="myChartProduce6_cs"></div>
|
||||||
|
</div>
|
||||||
|
<div style="width:20%;height:100%;float:left;">
|
||||||
|
<div style="width:100%;height:20%;padding-top:10%;padding-right:5%;" align="center"
|
||||||
|
id="myChartProduceText7_cs">
|
||||||
|
-
|
||||||
|
</div>
|
||||||
|
<div style="width:100%;height:80%;" id="myChartProduce7_cs"></div>
|
||||||
|
</div>
|
||||||
|
<div style="width:20%;height:100%;float:left;">
|
||||||
|
<div style="width:100%;height:20%;padding-top:10%;padding-right:5%;" align="center"
|
||||||
|
id="myChartProduceText8_cs">
|
||||||
|
-
|
||||||
|
</div>
|
||||||
|
<div style="width:100%;height:80%;" id="myChartProduce8_cs"></div>
|
||||||
|
</div>
|
||||||
|
<div style="width:20%;height:100%;float:left;">
|
||||||
|
<div style="width:100%;height:20%;padding-top:10%;padding-right:5%;" align="center"
|
||||||
|
id="myChartProduceText9_cs">
|
||||||
|
-
|
||||||
|
</div>
|
||||||
|
<div style="width:100%;height:80%;" id="myChartProduce9_cs"></div>
|
||||||
|
</div>
|
||||||
|
<div style="width:20%;height:100%;float:left;">
|
||||||
|
<div style="width:100%;height:20%;padding-top:10%;padding-right:5%;" align="center"
|
||||||
|
id="myChartProduceText10_cs">
|
||||||
|
-
|
||||||
|
</div>
|
||||||
|
<div style="width:100%;height:80%;" id="myChartProduce10_cs"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div style="width:100%;height:3%;float:left;"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
-->
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
||||||
398
src/main/webapp/jsp/main_JS_Company2_init.jsp
Normal file
398
src/main/webapp/jsp/main_JS_Company2_init.jsp
Normal file
@ -0,0 +1,398 @@
|
|||||||
|
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||||
|
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
|
||||||
|
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
|
||||||
|
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
|
||||||
|
<%@ page import="com.sipai.entity.base.ServerObject" %>
|
||||||
|
<%@ taglib uri="http://www.springsecurity.org/jsp" prefix="security" %>
|
||||||
|
|
||||||
|
<%@ page import="com.sipai.entity.base.MainConfig" %>
|
||||||
|
<% request.setAttribute("type_pro", MainConfig.type_pro); %>
|
||||||
|
<% request.setAttribute("type_safe", MainConfig.type_safe); %>
|
||||||
|
<% request.setAttribute("type_eff", MainConfig.type_eff); %>
|
||||||
|
<% request.setAttribute("type_pic", MainConfig.type_pic); %>
|
||||||
|
|
||||||
|
<!DOCTYPE html>
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<title><%= ServerObject.atttable.get("TOPTITLE")%>
|
||||||
|
</title>
|
||||||
|
|
||||||
|
<!-- 引用页头及CSS页-->
|
||||||
|
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
||||||
|
<!-- echarts-->
|
||||||
|
<script type="text/javascript" src="<%=request.getContextPath()%>/plugins/echarts/echarts.4.1.0.min.js"
|
||||||
|
charset="utf-8"></script>
|
||||||
|
|
||||||
|
<script type="text/javascript" src="<%=request.getContextPath()%>/JS/main/main_js.js" charset="utf-8"></script>
|
||||||
|
<style>
|
||||||
|
/*
|
||||||
|
根据不同分辨率显示不同px的文字大小
|
||||||
|
*/
|
||||||
|
@media (min-width: 1080px) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (min-width: 1550px) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.fontValue {
|
||||||
|
text-align: center;
|
||||||
|
margin-top: 20px;
|
||||||
|
margin-left: 70px;
|
||||||
|
font-size: 20px;
|
||||||
|
color: #ffffff;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fontText {
|
||||||
|
margin-left: 20px;
|
||||||
|
font-size: 14px;
|
||||||
|
color: #ffffff;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
.carousel-inner,
|
||||||
|
.carousel-inner >.item,
|
||||||
|
.carousel-inner >.item >img{
|
||||||
|
width:100%;height:100%;
|
||||||
|
}
|
||||||
|
.carousel-caption{
|
||||||
|
cursor: pointer;
|
||||||
|
padding: 0;
|
||||||
|
background-color: RGBA(55,141,204,0.5);
|
||||||
|
bottom: 10px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<script type="text/javascript">
|
||||||
|
|
||||||
|
|
||||||
|
$(function () {
|
||||||
|
firstFun();
|
||||||
|
});
|
||||||
|
|
||||||
|
window.onresize = function () {
|
||||||
|
firstFun();
|
||||||
|
}
|
||||||
|
|
||||||
|
function firstFun() {
|
||||||
|
//var height = document.documentElement.clientHeight;
|
||||||
|
var height = $(window).height();
|
||||||
|
$('#mainDiv').css('height', height);//页面加载先给高度
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
type: 'GET',
|
||||||
|
url: ext.contextPath + '/base/mainConfig/getJson.do',
|
||||||
|
async: true,
|
||||||
|
data: {unitId: unitId},
|
||||||
|
globle: false,
|
||||||
|
error: function () {
|
||||||
|
return false;
|
||||||
|
},
|
||||||
|
success: function (data) {
|
||||||
|
var data = eval('(' + data + ')');
|
||||||
|
for (var i = 0; i < data.mpcode.length; i++) {
|
||||||
|
var code = data.mpcode[i].mpointId;
|
||||||
|
var funname = data.mpcode[i].funName;
|
||||||
|
var divid = data.mpcode[i].divId;
|
||||||
|
var testid = data.mpcode[i].testId;
|
||||||
|
var mpointId = data.mpcode[i].mpointId;
|
||||||
|
if (data.mpcode[i].type == '${type_pro}') {//生产
|
||||||
|
eval(funname + "('" + unitId + "','" + code + "','" + divid + "','" + testid + "')")
|
||||||
|
}
|
||||||
|
if (data.mpcode[i].type == '${type_safe}') {//安全
|
||||||
|
eval(funname + "('" + unitId + "','" + code + "','" + divid + "','" + testid + "')")
|
||||||
|
}
|
||||||
|
if (data.mpcode[i].type == '${type_eff}') {//效率
|
||||||
|
eval(funname + "('" + unitId + "','" + code + "','" + divid + "','" + testid + "')")
|
||||||
|
}
|
||||||
|
if (data.mpcode[i].type == '${type_pic}') {//左上角图片
|
||||||
|
//eval(funname + "('" + unitId + "')")
|
||||||
|
getUnitsByUnitId4Select(unitId,funname,mpointId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//安全
|
||||||
|
// echartColumnar2(unitId, 'TH_03_FIT040001D_FLOW_C', 'myChartsafe1');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
//优良差
|
||||||
|
$(".evaluateIcon").attr("src", ext.contextPath + "/IMG/main/evaluate.png");
|
||||||
|
|
||||||
|
//左上角图片
|
||||||
|
// $("#mainImg").attr("src", ext.contextPath + "/IMG/main/main.jpg");
|
||||||
|
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<div id="mainDiv" style="background:#f1f1f1;">
|
||||||
|
|
||||||
|
<div style="float:left;height:100%;width:35%;">
|
||||||
|
<div style="float:left;height:45%;width:100%;padding:5px 5px 5px 5px;">
|
||||||
|
<div style="height:100%;width:100%;background-color:#ffffff;">
|
||||||
|
<%--图片--%>
|
||||||
|
<!-- <img src="" id="mainImg" style="width:100%;height:100%;"> -->
|
||||||
|
<div id="carousel-example-generic" class="carousel slide" data-ride="carousel" style="width:100%;height:100%;">
|
||||||
|
|
||||||
|
<!-- Wrapper for slides -->
|
||||||
|
<div class="carousel-inner" role="listbox" id="carousel-items">
|
||||||
|
</div>
|
||||||
|
<!-- Controls -->
|
||||||
|
<a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev">
|
||||||
|
<span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
|
||||||
|
<span class="sr-only">Previous</span>
|
||||||
|
</a>
|
||||||
|
<a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next">
|
||||||
|
<span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
|
||||||
|
<span class="sr-only">Next</span>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div style="float:left;height:55%;width:100%;padding:5px 5px 5px 5px;">
|
||||||
|
<div style="height:100%;width:100%;background-color:#ffffff;">
|
||||||
|
<div style="width:100%;height:5%;float:left;border-bottom:2px solid #67aad7;font-weight: bold;">
|
||||||
|
水量及电耗
|
||||||
|
</div>
|
||||||
|
<div style="width:100%;height:40%;float:left;">
|
||||||
|
|
||||||
|
<div style="width:48%;height:45%;float:left;background-color:#378dcc;margin:1%;">
|
||||||
|
<div class="fontValue" id="safe_value_1">-</div>
|
||||||
|
<div class="fontText" id="safe_text_1">-</div>
|
||||||
|
</div>
|
||||||
|
<div style="width:48%;height:45%;float:right;background-color:#67aad7;margin:1%;">
|
||||||
|
<div class="fontValue" id="safe_value_2">-</div>
|
||||||
|
<div class="fontText" id="safe_text_2">-</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style="width:48%;height:45%;float:left;background-color:#FACA00;margin:1%;">
|
||||||
|
<div class="fontValue" id="safe_value_3">-</div>
|
||||||
|
<div class="fontText" id="safe_text_3">-</div>
|
||||||
|
</div>
|
||||||
|
<div style="width:48%;height:45%;float:right;background-color:#66D97C;margin:1%;">
|
||||||
|
<div class="fontValue" id="safe_value_4">-</div>
|
||||||
|
<div class="fontText" id="safe_text_4">-</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div style="width:100%;height:55%;float:left;padding: 5px 5px 5px 5px;">
|
||||||
|
<div style="width:100%;height:100%;float:left;">
|
||||||
|
<div style="width:100%;height:100%;float:left;" id="myChartProduce8"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style="float:left;height:100%;width:65%;">
|
||||||
|
<div style="float:left;height:50%;width:100%;padding:5px 5px 5px 5px;">
|
||||||
|
<div style="height:100%;width:100%;background-color:#ffffff;">
|
||||||
|
<div style="width:100%;height:5%;float:left;border-bottom:2px solid #67aad7;font-weight: bold;">
|
||||||
|
一车间
|
||||||
|
</div>
|
||||||
|
<div style="width:20%;height:100%;float:left;">
|
||||||
|
<div style="width:100%;height:25%;float:left;background-color:#cbe3f9;margin:6%;">
|
||||||
|
<div class="fontValue" style="color: #0c4377;" id="valueProduce1_js"></div>
|
||||||
|
<div class="fontText" style="color: #0c4377;" id="textProduce1_js"></div>
|
||||||
|
</div>
|
||||||
|
<div style="width:100%;height:25%;float:left;background-color:#badaf8;margin:6%;">
|
||||||
|
<div class="fontValue" style="color: #0c4377;" id="valueProduce2_js"></div>
|
||||||
|
<div class="fontText" style="color: #0c4377;" id="textProduce2_js"></div>
|
||||||
|
</div>
|
||||||
|
<div style="width:100%;height:25%;float:left;background-color:#73afd8;margin:6%;">
|
||||||
|
<div class="fontValue" style="color: #0c4377;" id="valueProduce3_js"></div>
|
||||||
|
<div class="fontText" style="color: #0c4377;" id="textProduce3_js"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div style="width:80%;height:100%;float:left;padding: 5px 10px 30px 10px;">
|
||||||
|
<div style="width:100%;height:100%;float:left;">
|
||||||
|
<div style="width:100%;height:3%;float:left;"></div>
|
||||||
|
<div style="width:100%;height:40%;float:left;">
|
||||||
|
<div style="width:20%;height:100%;float:left;">
|
||||||
|
<div style="width:100%;height:20%;padding-top:10%;padding-right:5%;" align="center"
|
||||||
|
id="myChartProduceText1_js">
|
||||||
|
-
|
||||||
|
</div>
|
||||||
|
<div style="width:100%;height:80%;" id="myChartProduce1_js"></div>
|
||||||
|
</div>
|
||||||
|
<div style="width:20%;height:100%;float:left;">
|
||||||
|
<div style="width:100%;height:20%;padding-top:10%;padding-right:5%;" align="center"
|
||||||
|
id="myChartProduceText2_js">
|
||||||
|
-
|
||||||
|
</div>
|
||||||
|
<div style="width:100%;height:80%;" id="myChartProduce2_js"></div>
|
||||||
|
</div>
|
||||||
|
<div style="width:20%;height:100%;float:left;">
|
||||||
|
<div style="width:100%;height:20%;padding-top:10%;padding-right:5%;" align="center"
|
||||||
|
id="myChartProduceText3_js">
|
||||||
|
-
|
||||||
|
</div>
|
||||||
|
<div style="width:100%;height:80%;" id="myChartProduce3_js"></div>
|
||||||
|
</div>
|
||||||
|
<div style="width:20%;height:100%;float:left;">
|
||||||
|
<div style="width:100%;height:20%;padding-top:10%;padding-right:5%;" align="center"
|
||||||
|
id="myChartProduceText4_js">
|
||||||
|
-
|
||||||
|
</div>
|
||||||
|
<div style="width:100%;height:80%;" id="myChartProduce4_js"></div>
|
||||||
|
</div>
|
||||||
|
<div style="width:20%;height:100%;float:left;">
|
||||||
|
<div style="width:100%;height:20%;padding-top:10%;padding-right:5%;" align="center"
|
||||||
|
id="myChartProduceText5_js">
|
||||||
|
-
|
||||||
|
</div>
|
||||||
|
<div style="width:100%;height:80%;" id="myChartProduce5_js"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div style="width:100%;height:4%;float:left;"></div>
|
||||||
|
<div style="width:100%;height:40%;float:left;">
|
||||||
|
<div style="width:20%;height:100%;float:left;">
|
||||||
|
<div style="width:100%;height:20%;padding-top:10%;padding-right:5%;" align="center"
|
||||||
|
id="myChartProduceText6_js">
|
||||||
|
-
|
||||||
|
</div>
|
||||||
|
<div style="width:100%;height:80%;" id="myChartProduce6_js"></div>
|
||||||
|
</div>
|
||||||
|
<div style="width:20%;height:100%;float:left;">
|
||||||
|
<div style="width:100%;height:20%;padding-top:10%;padding-right:5%;" align="center"
|
||||||
|
id="myChartProduceText7_js">
|
||||||
|
-
|
||||||
|
</div>
|
||||||
|
<div style="width:100%;height:80%;" id="myChartProduce7_js"></div>
|
||||||
|
</div>
|
||||||
|
<div style="width:20%;height:100%;float:left;">
|
||||||
|
<div style="width:100%;height:20%;padding-top:10%;padding-right:5%;" align="center"
|
||||||
|
id="myChartProduceText8_js">
|
||||||
|
-
|
||||||
|
</div>
|
||||||
|
<div style="width:100%;height:80%;" id="myChartProduce8_js"></div>
|
||||||
|
</div>
|
||||||
|
<div style="width:20%;height:100%;float:left;">
|
||||||
|
<div style="width:100%;height:20%;padding-top:10%;padding-right:5%;" align="center"
|
||||||
|
id="myChartProduceText9_js">
|
||||||
|
-
|
||||||
|
</div>
|
||||||
|
<div style="width:100%;height:80%;" id="myChartProduce9_js"></div>
|
||||||
|
</div>
|
||||||
|
<div style="width:20%;height:100%;float:left;">
|
||||||
|
<div style="width:100%;height:20%;padding-top:10%;padding-right:5%;" align="center"
|
||||||
|
id="myChartProduceText10_js">
|
||||||
|
-
|
||||||
|
</div>
|
||||||
|
<div style="width:100%;height:80%;" id="myChartProduce10_js"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div style="width:100%;height:3%;float:left;"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div style="float:left;height:50%;width:100%;padding:5px 5px 5px 5px;">
|
||||||
|
<div style="height:100%;width:100%;background-color:#ffffff;">
|
||||||
|
<div style="width:100%;height:5%;float:left;border-bottom:2px solid #67aad7;font-weight: bold;">
|
||||||
|
二车间
|
||||||
|
</div>
|
||||||
|
<div style="width:20%;height:96%;float:left;">
|
||||||
|
<div style="width:100%;height:25%;float:left;background-color:#cbe3f9;margin:6%;">
|
||||||
|
<div class="fontValue" style="color: #0c4377;" id="valueProduce1_cs"></div>
|
||||||
|
<div class="fontText" style="color: #0c4377;" id="textProduce1_cs"></div>
|
||||||
|
</div>
|
||||||
|
<div style="width:100%;height:25%;float:left;background-color:#badaf8;margin:6%;">
|
||||||
|
<div class="fontValue" style="color: #0c4377;" id="valueProduce2_cs"></div>
|
||||||
|
<div class="fontText" style="color: #0c4377;" id="textProduce2_cs"></div>
|
||||||
|
</div>
|
||||||
|
<div style="width:100%;height:25%;float:left;background-color:#73afd8;margin:6%;">
|
||||||
|
<div class="fontValue" style="color: #0c4377;" id="valueProduce3_cs"></div>
|
||||||
|
<div class="fontText" style="color: #0c4377;" id="textProduce3_cs"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div style="width:80%;height:96%;float:left;padding: 5px 10px 30px 10px;">
|
||||||
|
<div style="width:100%;height:100%;float:left;">
|
||||||
|
<div style="width:100%;height:3%;float:left;"></div>
|
||||||
|
<div style="width:100%;height:40%;float:left;">
|
||||||
|
<div style="width:20%;height:100%;float:left;">
|
||||||
|
<div style="width:100%;height:20%;padding-top:10%;padding-right:5%;" align="center"
|
||||||
|
id="myChartProduceText1_cs">
|
||||||
|
-
|
||||||
|
</div>
|
||||||
|
<div style="width:100%;height:80%;" id="myChartProduce1_cs"></div>
|
||||||
|
</div>
|
||||||
|
<div style="width:20%;height:100%;float:left;">
|
||||||
|
<div style="width:100%;height:20%;padding-top:10%;padding-right:5%;" align="center"
|
||||||
|
id="myChartProduceText2_cs">
|
||||||
|
-
|
||||||
|
</div>
|
||||||
|
<div style="width:100%;height:80%;" id="myChartProduce2_cs"></div>
|
||||||
|
</div>
|
||||||
|
<div style="width:20%;height:100%;float:left;">
|
||||||
|
<div style="width:100%;height:20%;padding-top:10%;padding-right:5%;" align="center"
|
||||||
|
id="myChartProduceText3_cs">
|
||||||
|
-
|
||||||
|
</div>
|
||||||
|
<div style="width:100%;height:80%;" id="myChartProduce3_cs"></div>
|
||||||
|
</div>
|
||||||
|
<div style="width:20%;height:100%;float:left;">
|
||||||
|
<div style="width:100%;height:20%;padding-top:10%;padding-right:5%;" align="center"
|
||||||
|
id="myChartProduceText4_cs">
|
||||||
|
-
|
||||||
|
</div>
|
||||||
|
<div style="width:100%;height:80%;" id="myChartProduce4_cs"></div>
|
||||||
|
</div>
|
||||||
|
<div style="width:20%;height:100%;float:left;">
|
||||||
|
<div style="width:100%;height:20%;padding-top:10%;padding-right:5%;" align="center"
|
||||||
|
id="myChartProduceText5_cs">
|
||||||
|
-
|
||||||
|
</div>
|
||||||
|
<div style="width:100%;height:80%;" id="myChartProduce5_cs"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div style="width:100%;height:4%;float:left;"></div>
|
||||||
|
<div style="width:100%;height:40%;float:left;">
|
||||||
|
<div style="width:20%;height:100%;float:left;">
|
||||||
|
<div style="width:100%;height:20%;padding-top:10%;padding-right:5%;" align="center"
|
||||||
|
id="myChartProduceText6_cs">
|
||||||
|
-
|
||||||
|
</div>
|
||||||
|
<div style="width:100%;height:80%;" id="myChartProduce6_cs"></div>
|
||||||
|
</div>
|
||||||
|
<div style="width:20%;height:100%;float:left;">
|
||||||
|
<div style="width:100%;height:20%;padding-top:10%;padding-right:5%;" align="center"
|
||||||
|
id="myChartProduceText7_cs">
|
||||||
|
-
|
||||||
|
</div>
|
||||||
|
<div style="width:100%;height:80%;" id="myChartProduce7_cs"></div>
|
||||||
|
</div>
|
||||||
|
<div style="width:20%;height:100%;float:left;">
|
||||||
|
<div style="width:100%;height:20%;padding-top:10%;padding-right:5%;" align="center"
|
||||||
|
id="myChartProduceText8_cs">
|
||||||
|
-
|
||||||
|
</div>
|
||||||
|
<div style="width:100%;height:80%;" id="myChartProduce8_cs"></div>
|
||||||
|
</div>
|
||||||
|
<div style="width:20%;height:100%;float:left;">
|
||||||
|
<div style="width:100%;height:20%;padding-top:10%;padding-right:5%;" align="center"
|
||||||
|
id="myChartProduceText9_cs">
|
||||||
|
-
|
||||||
|
</div>
|
||||||
|
<div style="width:100%;height:80%;" id="myChartProduce9_cs"></div>
|
||||||
|
</div>
|
||||||
|
<div style="width:20%;height:100%;float:left;">
|
||||||
|
<div style="width:100%;height:20%;padding-top:10%;padding-right:5%;" align="center"
|
||||||
|
id="myChartProduceText10_cs">
|
||||||
|
-
|
||||||
|
</div>
|
||||||
|
<div style="width:100%;height:80%;" id="myChartProduce10_cs"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div style="width:100%;height:3%;float:left;"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
||||||
@ -173,8 +173,8 @@
|
|||||||
return repo.text;
|
return repo.text;
|
||||||
} // 函数用于呈现当前的选择
|
} // 函数用于呈现当前的选择
|
||||||
});
|
});
|
||||||
selelct_.val('').trigger("change");
|
selelct_.val('').trigger("change.select2");
|
||||||
selelct_.on('change', function () {
|
selelct_.off("select2:select select2:clear").on("select2:select select2:clear", function () {
|
||||||
//工艺段选择后,清空原有工艺段选择的设备
|
//工艺段选择后,清空原有工艺段选择的设备
|
||||||
$("#equipmentIds").val("");
|
$("#equipmentIds").val("");
|
||||||
$("#equipname").val("");
|
$("#equipname").val("");
|
||||||
|
|||||||
@ -159,8 +159,8 @@
|
|||||||
formatResult: function formatRepo(repo){return repo.text;}, // 函数用来渲染结果
|
formatResult: function formatRepo(repo){return repo.text;}, // 函数用来渲染结果
|
||||||
formatSelection: function formatRepoSelection(repo){return repo.text;} // 函数用于呈现当前的选择
|
formatSelection: function formatRepoSelection(repo){return repo.text;} // 函数用于呈现当前的选择
|
||||||
});
|
});
|
||||||
selelct_.val('${abnormity.processSectionId}').trigger("change");
|
selelct_.val('${abnormity.processSectionId}').trigger("change.select2");
|
||||||
},'json');
|
},'json');
|
||||||
};
|
};
|
||||||
var companyId = "${abnormity.bizId}";
|
var companyId = "${abnormity.bizId}";
|
||||||
$(function(){
|
$(function(){
|
||||||
@ -181,9 +181,9 @@
|
|||||||
formatSelection: function formatRepoSelection(repo){return repo.text;} // 函数用于呈现当前的选择
|
formatSelection: function formatRepoSelection(repo){return repo.text;} // 函数用于呈现当前的选择
|
||||||
});
|
});
|
||||||
if(data!=null && data.length>0){
|
if(data!=null && data.length>0){
|
||||||
selelct_.val('${abnormity.processSectionId}').trigger("change");
|
selelct_.val('${abnormity.processSectionId}').trigger("change.select2");
|
||||||
}
|
}
|
||||||
selelct_.on('change',function(){
|
selelct_.off("select2:select select2:clear").on("select2:select select2:clear",function(){
|
||||||
//工艺段选择后,清空原有工艺段选择的设备
|
//工艺段选择后,清空原有工艺段选择的设备
|
||||||
$("#equipmentIds").val("");
|
$("#equipmentIds").val("");
|
||||||
$("#equipname").val("");
|
$("#equipname").val("");
|
||||||
|
|||||||
@ -195,8 +195,8 @@
|
|||||||
formatResult: function formatRepo(repo){return repo.text;}, // 函数用来渲染结果
|
formatResult: function formatRepo(repo){return repo.text;}, // 函数用来渲染结果
|
||||||
formatSelection: function formatRepoSelection(repo){return repo.text;} // 函数用于呈现当前的选择
|
formatSelection: function formatRepoSelection(repo){return repo.text;} // 函数用于呈现当前的选择
|
||||||
});
|
});
|
||||||
selelct_.val('').trigger("change");
|
selelct_.val('').trigger("change.select2");
|
||||||
selelct_.on("change",function(e){
|
selelct_.off("select2:select select2:clear").on("select2:select select2:clear",function(e){
|
||||||
dosearch();
|
dosearch();
|
||||||
});
|
});
|
||||||
},'json');
|
},'json');
|
||||||
|
|||||||
@ -156,8 +156,8 @@
|
|||||||
return repo.text;
|
return repo.text;
|
||||||
} // 函数用于呈现当前的选择
|
} // 函数用于呈现当前的选择
|
||||||
});
|
});
|
||||||
selelct_.val('').trigger("change");
|
selelct_.val('').trigger("change.select2");
|
||||||
selelct_.on("change", function (e) {
|
selelct_.off("select2:select select2:clear").on("select2:select select2:clear", function (e) {
|
||||||
initAPPFun();
|
initAPPFun();
|
||||||
});
|
});
|
||||||
}, 'json');
|
}, 'json');
|
||||||
@ -493,8 +493,8 @@
|
|||||||
return repo.text;
|
return repo.text;
|
||||||
} // 函数用于呈现当前的选择
|
} // 函数用于呈现当前的选择
|
||||||
});
|
});
|
||||||
selelct_.val('').trigger("change");
|
selelct_.val('').trigger("change.select2");
|
||||||
selelct_.on("change", function (e) {
|
selelct_.off("select2:select select2:clear").on("select2:select select2:clear", function (e) {
|
||||||
// dosearch();
|
// dosearch();
|
||||||
$("#table").bootstrapTable('refresh');
|
$("#table").bootstrapTable('refresh');
|
||||||
});
|
});
|
||||||
|
|||||||
@ -170,16 +170,16 @@
|
|||||||
return repo.text;
|
return repo.text;
|
||||||
} // 函数用于呈现当前的选择
|
} // 函数用于呈现当前的选择
|
||||||
});
|
});
|
||||||
selelct_.val('').trigger("change");
|
selelct_.val('').trigger("change.select2");
|
||||||
selelct_.on("change", function (e) {
|
selelct_.off("select2:select select2:clear").on("select2:select select2:clear", function (e) {
|
||||||
dosearch();
|
dosearch();
|
||||||
});
|
});
|
||||||
}, 'json');
|
}, 'json');
|
||||||
var statusSelect = $("#statusSelect").select2({
|
var statusSelect = $("#statusSelect").select2({
|
||||||
minimumResultsForSearch: 10,
|
minimumResultsForSearch: 10,
|
||||||
placeholder: '请选择',
|
placeholder: '请选择',
|
||||||
}).val('').trigger("change");
|
}).val('').trigger("change.select2");
|
||||||
statusSelect.on("change", function (e) {
|
statusSelect.off("select2:select select2:clear").on("select2:select select2:clear", function (e) {
|
||||||
dosearch();
|
dosearch();
|
||||||
});
|
});
|
||||||
$("#table").bootstrapTable({ // 对应table标签的id
|
$("#table").bootstrapTable({ // 对应table标签的id
|
||||||
|
|||||||
@ -174,8 +174,8 @@
|
|||||||
return repo.text;
|
return repo.text;
|
||||||
} // 函数用于呈现当前的选择
|
} // 函数用于呈现当前的选择
|
||||||
});
|
});
|
||||||
selelct_.val("").trigger("change");
|
selelct_.val("").trigger("change.select2");
|
||||||
selelct_.on("change", function (e) {
|
selelct_.off("select2:select select2:clear").on("select2:select select2:clear", function (e) {
|
||||||
dosearch();
|
dosearch();
|
||||||
});
|
});
|
||||||
}, 'json');
|
}, 'json');
|
||||||
|
|||||||
@ -354,7 +354,7 @@
|
|||||||
</div>--%>
|
</div>--%>
|
||||||
|
|
||||||
<div class="form-group" style="margin:8px">
|
<div class="form-group" style="margin:8px">
|
||||||
<button type="button" class="btn btn-default btn-file" onclick="fileinputPic('maintenanceDetailFile')"
|
<button type="button" class="btn btn-default btn-file" onclick="fileinputPic('abnormityFileId')"
|
||||||
id="btn_save"><i
|
id="btn_save"><i
|
||||||
class="fa fa-paperclip"></i>上传图片
|
class="fa fa-paperclip"></i>上传图片
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@ -187,8 +187,8 @@
|
|||||||
return repo.text;
|
return repo.text;
|
||||||
} // 函数用于呈现当前的选择
|
} // 函数用于呈现当前的选择
|
||||||
});
|
});
|
||||||
selelct_.val("").trigger("change");
|
selelct_.val("").trigger("change.select2");
|
||||||
selelct_.on("change", function (e) {
|
selelct_.off("select2:select select2:clear").on("select2:select select2:clear", function (e) {
|
||||||
dosearch();
|
dosearch();
|
||||||
});
|
});
|
||||||
}, 'json');
|
}, 'json');
|
||||||
|
|||||||
@ -271,8 +271,8 @@
|
|||||||
formatResult: function formatRepo(repo) { return repo.text; }, // 函数用来渲染结果
|
formatResult: function formatRepo(repo) { return repo.text; }, // 函数用来渲染结果
|
||||||
formatSelection: function formatRepoSelection(repo) { return repo.text; } // 函数用于呈现当前的选择
|
formatSelection: function formatRepoSelection(repo) { return repo.text; } // 函数用于呈现当前的选择
|
||||||
});
|
});
|
||||||
selelct_.val("").trigger("change");
|
selelct_.val("").trigger("change.select2");
|
||||||
selelct_.on("change", function (e) {
|
selelct_.off("select2:select select2:clear").on("select2:select select2:clear", function (e) {
|
||||||
dosearch();
|
dosearch();
|
||||||
});
|
});
|
||||||
}, 'json');
|
}, 'json');
|
||||||
|
|||||||
@ -88,7 +88,10 @@
|
|||||||
var checkedItems = $("#table").bootstrapTable('getSelections');
|
var checkedItems = $("#table").bootstrapTable('getSelections');
|
||||||
var datas = "";
|
var datas = "";
|
||||||
$.each(checkedItems, function(index, item) {
|
$.each(checkedItems, function(index, item) {
|
||||||
datas += item.id + ",";
|
if (datas != "") {
|
||||||
|
datas += ",";
|
||||||
|
}
|
||||||
|
datas += item.id;
|
||||||
});
|
});
|
||||||
if (datas == "") {
|
if (datas == "") {
|
||||||
showAlert('d', '请先选择记录', 'mainAlertdiv');
|
showAlert('d', '请先选择记录', 'mainAlertdiv');
|
||||||
|
|||||||
@ -78,8 +78,11 @@
|
|||||||
rptdt: time,
|
rptdt: time,
|
||||||
rptdeptId: '${param.rptdeptId}'
|
rptdeptId: '${param.rptdeptId}'
|
||||||
}, function (data) {
|
}, function (data) {
|
||||||
$("#rptDiv").html(data);
|
if (data.code > 0) {
|
||||||
openModal('subModal');
|
$("#rptDiv").html(data); openModal('subModal');
|
||||||
|
} else {
|
||||||
|
showAlert('d', '您没有该报表的填报权限', 'mainAlertdiv');
|
||||||
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -160,7 +163,7 @@
|
|||||||
if (data.code > 0) {
|
if (data.code > 0) {
|
||||||
$("#table").bootstrapTable('refresh');
|
$("#table").bootstrapTable('refresh');
|
||||||
} else {
|
} else {
|
||||||
showAlert('d', '删除失败', 'mainAlertdiv');
|
showAlert('d', data.msg, 'mainAlertdiv');
|
||||||
}
|
}
|
||||||
}, 'json');
|
}, 'json');
|
||||||
|
|
||||||
|
|||||||
@ -263,7 +263,8 @@
|
|||||||
field: 'name', // 返回json数据中的name
|
field: 'name', // 返回json数据中的name
|
||||||
title: '姓名', // 表格表头显示文字
|
title: '姓名', // 表格表头显示文字
|
||||||
align: 'center', // 左右居中
|
align: 'center', // 左右居中
|
||||||
valign: 'middle' // 上下居中
|
valign: 'middle', // 上下居中
|
||||||
|
width: 200,
|
||||||
}, {
|
}, {
|
||||||
/* field: 'gender', // 返回json数据中的name
|
/* field: 'gender', // 返回json数据中的name
|
||||||
title: '性别', // 表格表头显示文字
|
title: '性别', // 表格表头显示文字
|
||||||
|
|||||||
@ -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");
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -129,11 +129,17 @@
|
|||||||
};
|
};
|
||||||
var deletesFun = function () {
|
var deletesFun = function () {
|
||||||
var checkedItems = $("#table").bootstrapTable('getSelections');
|
var checkedItems = $("#table").bootstrapTable('getSelections');
|
||||||
var datas = "";
|
var ids = [];
|
||||||
|
var staffIds = [];
|
||||||
$.each(checkedItems, function (index, item) {
|
$.each(checkedItems, function (index, item) {
|
||||||
datas += item.id + ",";
|
if (item.id) {
|
||||||
|
ids.push(item.id);
|
||||||
|
} else if (item.staffId) {
|
||||||
|
// 兼容模式:若后续行模型提供备用ID,批删也可工作
|
||||||
|
staffIds.push(item.staffId);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
if (datas == "") {
|
if (ids.length === 0 && staffIds.length === 0) {
|
||||||
showAlert('d', '请先选择记录', 'mainAlertdiv');
|
showAlert('d', '请先选择记录', 'mainAlertdiv');
|
||||||
} else {
|
} else {
|
||||||
swal({
|
swal({
|
||||||
@ -157,7 +163,10 @@
|
|||||||
}
|
}
|
||||||
}).then(function (willDelete) {
|
}).then(function (willDelete) {
|
||||||
if (willDelete) {
|
if (willDelete) {
|
||||||
$.post(ext.contextPath + '/safety/internalCertificate/deletes.do', {ids: datas}, function (data) {
|
$.post(ext.contextPath + '/safety/internalCertificate/deletes.do', {
|
||||||
|
ids: ids.join(","),
|
||||||
|
staffIds: staffIds.join(",")
|
||||||
|
}, function (data) {
|
||||||
if (data > 0) {
|
if (data > 0) {
|
||||||
$("#table").bootstrapTable('refresh');
|
$("#table").bootstrapTable('refresh');
|
||||||
// 初始化 作业类型
|
// 初始化 作业类型
|
||||||
@ -313,17 +322,17 @@
|
|||||||
field: 'jobType', // 返回json数据中的name
|
field: 'jobType', // 返回json数据中的name
|
||||||
title: '作业类型', // 表格表头显示文字
|
title: '作业类型', // 表格表头显示文字
|
||||||
align: 'center', // 左右居中
|
align: 'center', // 左右居中
|
||||||
valign: 'middle', // 上下居中
|
valign: 'middle' // 上下居中
|
||||||
}, {
|
}, {
|
||||||
field: 'issuingAuthority', // 返回json数据中的name
|
field: 'issuingAuthority', // 返回json数据中的name
|
||||||
title: '发证机构', // 表格表头显示文字
|
title: '发证机构', // 表格表头显示文字
|
||||||
align: 'center', // 左右居中
|
align: 'center', // 左右居中
|
||||||
valign: 'middle', // 上下居中
|
valign: 'middle' // 上下居中
|
||||||
}, {
|
}, {
|
||||||
field: 'issueDate', // 返回json数据中的name
|
field: 'issueDate', // 返回json数据中的name
|
||||||
title: '领证时间', // 表格表头显示文字
|
title: '领证时间', // 表格表头显示文字
|
||||||
align: 'center', // 左右居中
|
align: 'center', // 左右居中
|
||||||
valign: 'middle', // 上下居中
|
valign: 'middle' // 上下居中
|
||||||
}, {
|
}, {
|
||||||
field: 'expirationDate', // 返回json数据中的name
|
field: 'expirationDate', // 返回json数据中的name
|
||||||
title: '有效期至', // 表格表头显示文字
|
title: '有效期至', // 表格表头显示文字
|
||||||
|
|||||||
@ -115,7 +115,7 @@ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD
|
|||||||
var fileinput = function () {
|
var fileinput = function () {
|
||||||
$('#file').click();
|
$('#file').click();
|
||||||
};
|
};
|
||||||
var filedel = function () {
|
var filedel = function (index) {
|
||||||
fileList.splice(index,1)
|
fileList.splice(index,1)
|
||||||
$('#test').html(initFileInputView())
|
$('#test').html(initFileInputView())
|
||||||
};
|
};
|
||||||
|
|||||||
@ -72,7 +72,7 @@ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD
|
|||||||
var fileinput = function () {
|
var fileinput = function () {
|
||||||
$('#file').click();
|
$('#file').click();
|
||||||
};
|
};
|
||||||
var filedel = function () {
|
var filedel = function (index) {
|
||||||
fileList.splice(index, 1)
|
fileList.splice(index, 1)
|
||||||
$('#test').html(initFileInputView())
|
$('#test').html(initFileInputView())
|
||||||
};
|
};
|
||||||
@ -234,7 +234,8 @@ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD
|
|||||||
{
|
{
|
||||||
formId: "addForm",
|
formId: "addForm",
|
||||||
hiddenId: "userId",
|
hiddenId: "userId",
|
||||||
textId: "userName"
|
textId: "userName",
|
||||||
|
displayDept: "true"
|
||||||
}, function (data) {
|
}, function (data) {
|
||||||
$("#user4SelectDiv").html(data);
|
$("#user4SelectDiv").html(data);
|
||||||
openModal("user4SelectModal");
|
openModal("user4SelectModal");
|
||||||
|
|||||||
@ -47,6 +47,11 @@ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD
|
|||||||
display: inline-block;
|
display: inline-block;
|
||||||
vertical-align: top;
|
vertical-align: top;
|
||||||
padding: 8px;
|
padding: 8px;
|
||||||
|
width: 140px;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
.detail-row {
|
||||||
|
clear: both;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
@ -253,7 +258,7 @@ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD
|
|||||||
function initdeTail(list) {
|
function initdeTail(list) {
|
||||||
let temp = `<div >`
|
let temp = `<div >`
|
||||||
list.forEach((item, index) => {
|
list.forEach((item, index) => {
|
||||||
temp += `<div><div class="AAA">` + item.deptName + `</div>`
|
temp += `<div class="detail-row"><div class="AAA">` + item.deptName + `</div>`
|
||||||
temp += `<div class="AAA">` + item.userName + `</div>`
|
temp += `<div class="AAA">` + item.userName + `</div>`
|
||||||
temp += `<div class="AAA">` + item.pass + `</div>`
|
temp += `<div class="AAA">` + item.pass + `</div>`
|
||||||
temp += `<div class="AAA">` + item.time + `</div></div>`
|
temp += `<div class="AAA">` + item.time + `</div></div>`
|
||||||
@ -426,7 +431,9 @@ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD
|
|||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-2 control-label ">查看其它会签意见</label>
|
<label class="col-sm-2 control-label ">查看其它会签意见</label>
|
||||||
<div id="deTail"></div>
|
<div class="col-sm-10">
|
||||||
|
<div id="deTail"></div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group" style="margin-left: 39px">
|
<div class="form-group" style="margin-left: 39px">
|
||||||
<div id="fileList"></div>
|
<div id="fileList"></div>
|
||||||
|
|||||||
@ -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>
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user