Compare commits

...

7 Commits

Author SHA1 Message Date
5c576ddfcb bug 2026-04-09 14:16:18 +08:00
f89ab0f90d bug 2026-04-09 09:09:00 +08:00
78ec2cbe85 Merge branch 'deng' into deng-release 2026-04-08 19:17:05 +08:00
6c08c4fd1b bug 2026-04-08 19:15:15 +08:00
abdd3b7add Merge branch 'deng' into deng-release 2026-04-05 23:21:52 +08:00
ebe3148a58 bug 2026-04-05 23:21:30 +08:00
0c8b530339 bug 2026-04-05 22:16:12 +08:00
36 changed files with 1040 additions and 81137 deletions

24
pom.xml
View File

@ -21,6 +21,12 @@
<!-- 数据<E695B0>?-->
</properties>
<dependencies>
<dependency>
<groupId>net.java.dev.jna</groupId>
<artifactId>jna</artifactId>
<version>5.4.0</version>
</dependency>
<!-- spring核心<E6A0B8>?-->
<dependency>
<groupId>org.springframework</groupId>
@ -781,11 +787,11 @@
<version>1.6.1</version>
</dependency>
<!-- jna -->
<dependency>
<groupId>net.java.dev.jna</groupId>
<artifactId>jna</artifactId>
<version>1.0</version>
</dependency>
<!-- <dependency>-->
<!-- <groupId>net.java.dev.jna</groupId>-->
<!-- <artifactId>jna</artifactId>-->
<!-- <version>1.0</version>-->
<!-- </dependency>-->
<!-- jna examples -->
<dependency>
<groupId>net.java.dev.jna</groupId>
@ -796,6 +802,14 @@
<build>
<finalName>TGLW</finalName>
<resources>
<!-- <resource>-->
<!-- <directory>libs/win64</directory>-->
<!-- <targetPath>win64</targetPath>-->
<!-- <includes>-->
<!-- <include>*.dll</include>-->
<!-- </includes>-->
<!-- <filtering>false</filtering>-->
<!-- </resource>-->
<resource>
<directory>src/main/java</directory>
<includes>

View File

@ -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);
}
}

View File

@ -122,14 +122,14 @@ public class RptDayLogController {
@RequestParam(value = "rptdt") String rptdt) throws IOException {
User cu = (User) request.getSession().getAttribute("cu");
String userId = cu.getId();
// 权限验证:检查用户是否有填报权限
if (!this.rptDayLogService.checkInputPermission(rptdeptId, cu)) {
Result result = Result.failed("您没有该报表的填报权限");
model.addAttribute("result", CommUtil.toJson(result));
return "result";
}
// 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);
Result result = Result.success(jsonObject);
@ -251,6 +251,29 @@ public class RptDayLogController {
@RequestMapping("/dodeletes.do")
public String dodels(HttpServletRequest request,Model model,
@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(",");
try {
for (int i = 0; i < idArray.length; i++) {

View File

@ -242,11 +242,20 @@ public class ProcessSectionController {
@RequestMapping("/getProcessSection4Select.do")
public String getProcessSection4Select(HttpServletRequest request, Model model) {
String companyId = request.getParameter("companyId"); // 默认查询JSBZ???
// 使用unitService获取Unit信息因为companyId来自tb_unit
// 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 + "' ";
if (unit != null && unit.getType().equals(CommString.UNIT_TYPE_COMPANY)) { // "C";//公司
if (CommString.UNIT_TYPE_COMPANY.equals(unitType)) { // "C";//公司
String bizs = "";//公司下属所有厂id
List<Unit> blist = this.unitService.getParentCompanyChildrenBizByUnitid(companyId);
if (blist != null && blist.size() > 0) {
@ -258,7 +267,7 @@ public class ProcessSectionController {
}
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 + "') ) ";
} else if (unit != null && unit.getType().equals(CommString.UNIT_TYPE_BIZ)) { // B 水厂
} else if (CommString.UNIT_TYPE_BIZ.equals(unitType)) { // B 水厂
wherestr += " and unit_id='" + companyId + "' ";
}
if (request.getParameter("search_name") != null && !request.getParameter("search_name").isEmpty()) {
@ -273,13 +282,16 @@ public class ProcessSectionController {
for (int i = 0; i < processSections.size(); i++) {
JSONObject jsonObject = new JSONObject();
jsonObject.put("id", processSections.get(i).getCode());
if (unit != null && unit.getType().equals(CommString.UNIT_TYPE_COMPANY)) { // "C";//公司
if (CommString.UNIT_TYPE_COMPANY.equals(unitType)) { // "C";//公司
if (!processSections.get(i).getUnitId().equals(ProcessSection.UnitId_Sys)) {
jsonObject.put("text", processSections.get(i).getSname() + "(" + processSections.get(i).getCompanySname() + ")");
} else {
jsonObject.put("text", processSections.get(i).getSname());
}
} else if (unit != null && unit.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());
}

View File

@ -89,11 +89,26 @@ public class KPIPointController {
// 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'");
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) {
list.get(i).setProcessectionname(processSection.getName());
}
Company company = this.unitService.getCompById(list.get(i).getBizid());
Company company = this.unitService.getCompById(rawBizId);
if (company != null) {
list.get(i).setBizid(company.getName());
}

View File

@ -481,7 +481,7 @@ public class SchedulingController {
JSONArray array = new JSONArray();
String[] workpeopleids = scheduling.getWorkpeople().split(",");
if (workpeopleids != null && workpeopleids.length > 0) {
if (!workpeopleids[0].equals("")) {
if (!userId.equals(workpeopleids[0])) {
for (int i = 0; i < workpeopleids.length; i++) {
if (!userId.equals(workpeopleids[i])) {
JSONObject object = new JSONObject();
@ -1156,6 +1156,10 @@ public class SchedulingController {
}
}
// 获取交班表单数据
List<GroupContentFormData> formDataList = this.groupContentFormDataService.selectListByWhere(" where schedulingId='" + schedulingId + "' ");
model.addAttribute("formDataList", formDataList);
model.addAttribute("scheduling", scheduling);
return "work/schedulingView";
}

View File

@ -67,4 +67,11 @@ public interface RptDayLogService {
* @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);
}

View File

@ -71,6 +71,14 @@ public interface RptInfoSetService {
* @return
*/
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);
/**
*

View File

@ -17,6 +17,7 @@ import com.sipai.service.msg.MsgTypeService;
import com.sipai.service.report.RptDayLogService;
import com.sipai.service.report.RptDayValSetService;
import com.sipai.service.report.RptDeptSetService;
import com.sipai.service.report.RptInfoSetService;
import com.sipai.service.scada.MPointExpandService;
import com.sipai.service.scada.MPointHistoryService;
import com.sipai.service.scada.MPointService;
@ -70,6 +71,9 @@ public class RptDayLogServiceImpl implements RptDayLogService {
@Resource
private UserJobService userJobService;
@Resource
private RptInfoSetService rptInfoSetService;
@Override
public RptDayLog selectById(String id) {
RptDayLog rptDayLog =this.rptDayLogDao.selectByPrimaryKey(id);
@ -946,4 +950,23 @@ public class RptDayLogServiceImpl implements RptDayLogService {
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);
}
}

View File

@ -615,4 +615,49 @@ public class RptInfoSetServiceImpl implements RptInfoSetService {
}
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;
}
}

View File

@ -32,18 +32,18 @@ import java.util.List;
import static org.apache.poi.ss.usermodel.CellType.STRING;
@Service
public class SewageService implements CommService<Sewage>{
@Resource
private SewageDao SewageDao;
@Resource
private UnitService unitService;
@Resource
private CompanyService companyService;
@Resource
private ProcessSectionService processSectionService;
public class SewageService implements CommService<Sewage> {
@Resource
private SewageDao SewageDao;
@Resource
private UnitService unitService;
@Resource
private CompanyService companyService;
@Resource
private ProcessSectionService processSectionService;
@Resource
private SewageInputService sewageInputService;
@Resource
private JsywPointService jsywPointService;
@ -62,84 +62,86 @@ public class SewageService implements CommService<Sewage>{
}
return null;
}
@Override
public Sewage selectById(String id) {
Sewage sewage = SewageDao.selectByPrimaryKey(id);
@Override
public Sewage selectById(String id) {
Sewage sewage = SewageDao.selectByPrimaryKey(id);
sewage.setCompany(this.unitService.getCompById(sewage.getUnitId()));
ProcessSection processSection = this.getProcessSectionByStoredValue(sewage.getProcessSectionId());
if (processSection != null) {
sewage.setProcessSection(processSection);
}
List<SewageInput> sewageInputList = this.sewageInputService.selectListByWhere("where sewage_id='"+sewage.getContractNumber()+"' order by insdt");
if(sewageInputList!=null && sewageInputList.size()>0){
List<SewageInput> sewageInputList = this.sewageInputService.selectListByWhere("where sewage_id='" + sewage.getContractNumber() + "' order by insdt");
if (sewageInputList != null && sewageInputList.size() > 0) {
sewage.set_input(true);
}else{
} else {
sewage.set_input(false);
}
List<JsywPoint> jsywPointList = this.jsywPointService.selectListByWhere("where psname='"+sewage.getName()+"' order by update_date");
if(jsywPointList!=null && jsywPointList.size()>0){
List<JsywPoint> jsywPointList = this.jsywPointService.selectListByWhere("where psname='" + sewage.getName() + "' order by update_date");
if (jsywPointList != null && jsywPointList.size() > 0) {
sewage.set_point(true);
}else{
} else {
sewage.set_point(false);
}
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);
}
return sewage;
}
@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{
@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
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);
}
List<JsywPoint> jsywPointList = this.jsywPointService.selectListByWhere("where psname='"+item.getName()+"' order by update_date");
if(jsywPointList!=null && jsywPointList.size()>0){
}
List<JsywPoint> jsywPointList = this.jsywPointService.selectListByWhere("where psname='" + item.getName() + "' order by update_date");
if (jsywPointList != null && jsywPointList.size() > 0) {
item.set_point(true);
}else{
} else {
item.set_point(false);
}
}
return list;
}
@Override
public int deleteByWhere(String wherestr) {
Sewage sewage = new Sewage();
sewage.setWhere(wherestr);
return SewageDao.deleteByWhere(sewage);
}
}
return list;
}
@Override
public int deleteByWhere(String wherestr) {
Sewage sewage = new Sewage();
sewage.setWhere(wherestr);
return SewageDao.deleteByWhere(sewage);
}
public List<Sewage> selectDistinctCityByWhere(String wherestr) {
Sewage sewage = new Sewage();
sewage.setWhere(wherestr);
List<Sewage> list = SewageDao.selectDistinctCityByWhere(sewage);
return list;
}
/**
* xls文件数据转换
*
@ -154,24 +156,26 @@ public class SewageService implements CommService<Sewage>{
return cell.getCellFormula();
case NUMERIC:
//判断是否为日期类型
if (DateUtil.isCellDateFormatted(cell)) {
//用于转化为日期格式
Date d = cell.getDateCellValue();
SimpleDateFormat formater = new SimpleDateFormat("yyyy-MM-dd");
String cellDate = formater.format(d);
return cellDate;
} else {
cell.setCellType(STRING);
return cell.getStringCellValue();
}
//判断是否为日期类型
if (DateUtil.isCellDateFormatted(cell)) {
//用于转化为日期格式
Date d = cell.getDateCellValue();
SimpleDateFormat formater = new SimpleDateFormat("yyyy-MM-dd");
String cellDate = formater.format(d);
return cellDate;
} else {
cell.setCellType(STRING);
return cell.getStringCellValue();
}
case STRING:
return cell.getStringCellValue();
default:
return null;
}
} private String getBizId(String bizName) {
}
private String getBizId(String bizName) {
String bizId = "";
List<Company> CompanyList = this.companyService.selectListByWhere("where sname = '" + bizName + "' or name = '" + bizName + "' ");
if (CompanyList != null && CompanyList.size() > 0) {
@ -201,20 +205,20 @@ public class SewageService implements CommService<Sewage>{
int maxCellNum = row.getLastCellNum();//最后一列
Sewage sewage = new Sewage();
HSSFCell cell = row.getCell(1);
if (getStringVal(cell)==null) {
continue;
}
if (getStringVal(cell) == null) {
continue;
}
sewage.setContractNumber(getStringVal(cell));
cell = row.getCell(2);
System.out.println(getStringVal(cell));
sewage.setContractOrder(Integer.parseInt(getStringVal(cell)));
cell = row.getCell(3);
sewage.setName(getStringVal(cell));
cell = row.getCell(4);
sewage.setAddress(getStringVal(cell));
cell = row.getCell(5);
@ -224,10 +228,10 @@ public class SewageService implements CommService<Sewage>{
cell = row.getCell(7);
sewage.setPhone(getStringVal(cell));
cell = row.getCell(8);
List<ProcessSection> processSectionList = this.processSectionService.selectListByWhere("where name = '"+getStringVal(cell)+"' and unit_id = 'JSBZ'");
if (processSectionList.size()>0) {
sewage.setProcessSectionId(processSectionList.get(0)==null?"":processSectionList.get(0).getCode());
}
List<ProcessSection> processSectionList = this.processSectionService.selectListByWhere("where name = '" + getStringVal(cell) + "' and unit_id = 'JSBZ'");
if (processSectionList.size() > 0) {
sewage.setProcessSectionId(processSectionList.get(0) == null ? "" : processSectionList.get(0).getCode());
}
cell = row.getCell(9);
sewage.setUnitId(this.getBizId(getStringVal(cell)));
cell = row.getCell(10);
@ -241,7 +245,7 @@ public class SewageService implements CommService<Sewage>{
cell = row.getCell(14);
sewage.setPermit(getStringVal(cell));
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);
sewage.setStandard(getStringVal(cell));
cell = row.getCell(17);
@ -254,30 +258,30 @@ public class SewageService implements CommService<Sewage>{
sewage.setAttribute(getStringVal(cell));
cell = row.getCell(27);
sewage.setRemark(getStringVal(cell));
// sewage.setVentNum(ventNum);
sewage.setId(CommUtil.getUUID());
List<Sewage> selectListByWhere = this.selectListByWhere("where contract_number = '"+sewage.getContractNumber()+"'");
if (selectListByWhere!=null&&selectListByWhere.size()>0) {
sewage.setId(selectListByWhere.get(0).getId());
int result = this.update(sewage);
if (result == 1) {
sumNum++;
} else {
failNum++;
}
}else {
int result = this.save(sewage);
if (result == 1) {
sumNum++;
} else {
failNum++;
}
}
List<Sewage> selectListByWhere = this.selectListByWhere("where contract_number = '" + sewage.getContractNumber() + "'");
if (selectListByWhere != null && selectListByWhere.size() > 0) {
sewage.setId(selectListByWhere.get(0).getId());
int result = this.update(sewage);
if (result == 1) {
sumNum++;
} else {
failNum++;
}
} else {
int result = this.save(sewage);
if (result == 1) {
sumNum++;
} else {
failNum++;
}
}
}
}
@ -293,8 +297,8 @@ public class SewageService implements CommService<Sewage>{
return result;
}
public void outExcelFun(HttpServletResponse response) throws IOException {
String fileName = "金山排海工程有限公司纳管企业表.xls";
public void outExcelFun(HttpServletResponse response) throws IOException {
String fileName = "金山卫污水厂纳管企业表.xls";
String title = "纳管企业";
// 声明一个工作薄
HSSFWorkbook workbook = new HSSFWorkbook();
@ -372,7 +376,7 @@ public class SewageService implements CommService<Sewage>{
//产生表格表头
String excelTitleStr = "序号,合同编号,合同顺序,单位名称,单位地址,合同到期日,联系人,联系电话,*所属泵站,*所属车间,排污许可证编号,雨、污水管平面图,环评报告/登记表/批复,所属行业,排水许可证(编号)复印件/申请表,实际日排量(吨/天),排放标准(排水许可证),管网所有权单位,统一社会信用代码,地址位置(经纬度),接入管网坐标-经度(度),接入管网坐标-经度(分),接入管网坐标-经度(秒),接入管网坐标-纬度(度),接入管网坐标-纬度(分),接入管网坐标-纬度(秒),管网属性(分流/合流),备注";
String[] excelTitle = excelTitleStr.split(",");
HSSFRow row = sheet.createRow(1);
row.setHeight((short) 800);
@ -418,17 +422,17 @@ public class SewageService implements CommService<Sewage>{
handRow.setHeight((short) 500);
HSSFCell cell = handRow.createCell(0);
cell.setCellStyle(headStyle);
cell.setCellValue("金山排海工程有限公司纳管企业表");
cell.setCellValue("金山卫污水厂纳管企业表");
// 说明
// HSSFCell smcell = handRow.createCell(5);
// smcell.setCellStyle(tipStyle);
// smcell.setCellValue("注:日期格式(xxxx-xx-xx或xxxx/xx/xx), 班组类型,班组, 班次(根据系统配置名称填写),模式(填写巡检菜单里面的巡检模式) 排版日期,班组类型,班组,班次,模式都为必填项(集控班组可不填模式)。");
List<Sewage> list = this.selectListByWhere("where 1=1 order by contract_order asc");
int n = 1;
List<Sewage> list = this.selectListByWhere("where 1=1 order by contract_order asc");
int n = 1;
if (list != null && list.size() > 0) {
for (int i = 0; i < list.size(); i++) {
Sewage sewage = list.get(i);
Sewage sewage = list.get(i);
HSSFRow listrow1 = sheet.createRow(i + 2);
listrow1.setHeight((short) 400);
HSSFCell listcell0 = listrow1.createCell(0);
@ -441,7 +445,7 @@ public class SewageService implements CommService<Sewage>{
HSSFCell listcell2 = listrow1.createCell(2);
listcell2.setCellStyle(listStyle);
listcell2.setCellValue(sewage.getContractOrder());
listcell2.setCellValue(sewage.getContractOrder() == null ? 1 : sewage.getContractOrder());
HSSFCell listcell3 = listrow1.createCell(3);
listcell3.setCellStyle(listStyle);
@ -501,7 +505,7 @@ public class SewageService implements CommService<Sewage>{
HSSFCell listcell15 = listrow1.createCell(15);
listcell15.setCellStyle(listStyle);
listcell15.setCellValue((sewage.getDisplacement()==null?0:sewage.getDisplacement()));
listcell15.setCellValue((sewage.getDisplacement() == null ? 0 : sewage.getDisplacement()));
HSSFCell listcell16 = listrow1.createCell(16);
listcell16.setCellStyle(listStyle);
@ -572,31 +576,33 @@ public class SewageService implements CommService<Sewage>{
workbook.close();
}
}
/**
/**
* 获取树三层结构processSection为根节点sewage为子节点
* @方法名:getTreeList
* @参数 @param
* @参数 @return
*
* @方法名:getTreeList
* @参数 @param
* @参数 @return
* @返回类型 String
*/
public String getTreeList(List<Sewage> list) {
JSONArray list_result = new JSONArray();
if(list!=null && list.size()>0){
if (list != null && list.size() > 0) {
String processSectionId = null;
String unitId = null;
JSONObject root_childs = new JSONObject();
JSONArray root_childlist = new JSONArray();
JSONObject childs = new JSONObject();
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);
if(unitId==null || unitId.isEmpty()){
if (unitId == null || unitId.isEmpty()) {
unitId = sewage.getUnitId();
Company company = sewage.getCompany();
if(company != null){
if (company != null) {
root_childs.put("id", company.getId());
root_childs.put("text", company.getName());
}else{
} else {
root_childs.put("id", unitId);
//没有关联Company或者unitId不存在
root_childs.put("text", "无区域数据");
@ -604,8 +610,8 @@ public class SewageService implements CommService<Sewage>{
root_childs.put("pid", "-1");
root_childs.put("type", "unit");
}
if(!unitId.equals(sewage.getUnitId())){
//向当前根节点添加所有子节点
if (!unitId.equals(sewage.getUnitId())) {
//向当前根节点添加所有子节点
childs.put("nodes", childlist);
root_childlist.add(childs);
root_childs.put("nodes", root_childlist);
@ -618,10 +624,10 @@ public class SewageService implements CommService<Sewage>{
//初始设置根节点
unitId = sewage.getUnitId();
Company company = sewage.getCompany();
if(company != null){
if (company != null) {
root_childs.put("id", company.getId());
root_childs.put("text", company.getName());
}else{
} else {
root_childs.put("id", unitId);
//没有关联Company或者unitId不存在
root_childs.put("text", "无区域数据");
@ -631,15 +637,15 @@ public class SewageService implements CommService<Sewage>{
//初始设置根节点
processSectionId = null;
}
if(processSectionId==null || processSectionId.isEmpty()){
if (processSectionId == null || processSectionId.isEmpty()) {
//初始设置根节点
processSectionId = sewage.getProcessSectionId();
ProcessSection processSection = sewage.getProcessSection();
if(processSection != null){
if (processSection != null) {
childs.put("id", processSection.getCode());
childs.put("text", processSection.getName());
}else{
if(processSectionId.isEmpty()){
} else {
if (processSectionId.isEmpty()) {
processSectionId = "error";
}
childs.put("id", processSectionId);
@ -648,9 +654,9 @@ public class SewageService implements CommService<Sewage>{
}
childs.put("pid", unitId);
childs.put("type", "processSection");
}
if(processSectionId.equals(sewage.getProcessSectionId())){
if (processSectionId.equals(sewage.getProcessSectionId())) {
//设置子节点sewage
JSONObject child = new JSONObject();
child.put("id", sewage.getId());
@ -658,7 +664,7 @@ public class SewageService implements CommService<Sewage>{
child.put("pid", processSectionId);
child.put("type", "sewage");
childlist.add(child);
}else{
} else {
//向当前根节点添加所有子节点
childs.put("nodes", childlist);
root_childlist.add(childs);
@ -668,11 +674,11 @@ public class SewageService implements CommService<Sewage>{
//初始设置根节点
processSectionId = sewage.getProcessSectionId();
ProcessSection processSection = sewage.getProcessSection();
if(processSection != null){
if (processSection != null) {
childs.put("id", processSection.getCode());
childs.put("text", processSection.getName());
}else{
if(processSectionId.isEmpty()){
} else {
if (processSectionId.isEmpty()) {
processSectionId = "error";
}
childs.put("id", processSectionId);
@ -688,7 +694,7 @@ public class SewageService implements CommService<Sewage>{
child.put("type", "sewage");
childlist.add(child);
}
if((i+1)==list.size()){
if ((i + 1) == list.size()) {
//最后子节点结束时,向当前根节点添加所有子节点
childs.put("nodes", childlist);
root_childlist.add(childs);

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

View File

@ -173,8 +173,8 @@
return repo.text;
} // 函数用于呈现当前的选择
});
selelct_.val('').trigger("change");
selelct_.on('change', function () {
selelct_.val('').trigger("change.select2");
selelct_.off("select2:select select2:clear").on("select2:select select2:clear", function () {
//工艺段选择后,清空原有工艺段选择的设备
$("#equipmentIds").val("");
$("#equipname").val("");

View File

@ -159,8 +159,8 @@
formatResult: function formatRepo(repo){return repo.text;}, // 函数用来渲染结果
formatSelection: function formatRepoSelection(repo){return repo.text;} // 函数用于呈现当前的选择
});
selelct_.val('${abnormity.processSectionId}').trigger("change");
},'json');
selelct_.val('${abnormity.processSectionId}').trigger("change.select2");
},'json');
};
var companyId = "${abnormity.bizId}";
$(function(){
@ -181,9 +181,9 @@
formatSelection: function formatRepoSelection(repo){return repo.text;} // 函数用于呈现当前的选择
});
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("");
$("#equipname").val("");

View File

@ -195,8 +195,8 @@
formatResult: function formatRepo(repo){return repo.text;}, // 函数用来渲染结果
formatSelection: function formatRepoSelection(repo){return repo.text;} // 函数用于呈现当前的选择
});
selelct_.val('').trigger("change");
selelct_.on("change",function(e){
selelct_.val('').trigger("change.select2");
selelct_.off("select2:select select2:clear").on("select2:select select2:clear",function(e){
dosearch();
});
},'json');

View File

@ -156,8 +156,8 @@
return repo.text;
} // 函数用于呈现当前的选择
});
selelct_.val('').trigger("change");
selelct_.on("change", function (e) {
selelct_.val('').trigger("change.select2");
selelct_.off("select2:select select2:clear").on("select2:select select2:clear", function (e) {
initAPPFun();
});
}, 'json');
@ -493,8 +493,8 @@
return repo.text;
} // 函数用于呈现当前的选择
});
selelct_.val('').trigger("change");
selelct_.on("change", function (e) {
selelct_.val('').trigger("change.select2");
selelct_.off("select2:select select2:clear").on("select2:select select2:clear", function (e) {
// dosearch();
$("#table").bootstrapTable('refresh');
});

View File

@ -170,16 +170,16 @@
return repo.text;
} // 函数用于呈现当前的选择
});
selelct_.val('').trigger("change");
selelct_.on("change", function (e) {
selelct_.val('').trigger("change.select2");
selelct_.off("select2:select select2:clear").on("select2:select select2:clear", function (e) {
dosearch();
});
}, 'json');
var statusSelect = $("#statusSelect").select2({
minimumResultsForSearch: 10,
placeholder: '请选择',
}).val('').trigger("change");
statusSelect.on("change", function (e) {
}).val('').trigger("change.select2");
statusSelect.off("select2:select select2:clear").on("select2:select select2:clear", function (e) {
dosearch();
});
$("#table").bootstrapTable({ // 对应table标签的id

View File

@ -174,8 +174,8 @@
return repo.text;
} // 函数用于呈现当前的选择
});
selelct_.val("").trigger("change");
selelct_.on("change", function (e) {
selelct_.val("").trigger("change.select2");
selelct_.off("select2:select select2:clear").on("select2:select select2:clear", function (e) {
dosearch();
});
}, 'json');

View File

@ -187,8 +187,8 @@
return repo.text;
} // 函数用于呈现当前的选择
});
selelct_.val("").trigger("change");
selelct_.on("change", function (e) {
selelct_.val("").trigger("change.select2");
selelct_.off("select2:select select2:clear").on("select2:select select2:clear", function (e) {
dosearch();
});
}, 'json');

View File

@ -271,8 +271,8 @@
formatResult: function formatRepo(repo) { return repo.text; }, // 函数用来渲染结果
formatSelection: function formatRepoSelection(repo) { return repo.text; } // 函数用于呈现当前的选择
});
selelct_.val("").trigger("change");
selelct_.on("change", function (e) {
selelct_.val("").trigger("change.select2");
selelct_.off("select2:select select2:clear").on("select2:select select2:clear", function (e) {
dosearch();
});
}, 'json');

View File

@ -78,8 +78,11 @@
rptdt: time,
rptdeptId: '${param.rptdeptId}'
}, function (data) {
$("#rptDiv").html(data);
openModal('subModal');
if (data.code > 0) {
$("#rptDiv").html(data); openModal('subModal');
} else {
showAlert('d', '您没有该报表的填报权限', 'mainAlertdiv');
}
});
};
@ -160,7 +163,7 @@
if (data.code > 0) {
$("#table").bootstrapTable('refresh');
} else {
showAlert('d', '删除失败', 'mainAlertdiv');
showAlert('d', data.msg, 'mainAlertdiv');
}
}, 'json');

View File

@ -534,7 +534,7 @@
<img src="/images/大屏/企业简介.png" style="height:60px;width:420px;"/>
</div>
<div style="float: left;width: 100%;height: 137px;padding-top: 10px;padding-left: 20px;color: #ffffff;line-height: 30px;font-size: 20px;font-weight: 400;letter-spacing:2px;">
&nbsp;&nbsp;&nbsp;&nbsp;上海金山排海工程有限公司成立于1993年主要承担金山东部地区生活污水和工业废水的收集处理任务服务范围包括金山东部亭林、张堰、山阳、漕泾四镇及金山工业区、金山新城区、金山卫钱圩地区服务区域约155平方公里。
&nbsp;&nbsp;&nbsp;&nbsp;上海金山卫污水厂成立于1993年主要承担金山东部地区生活污水和工业废水的收集处理任务服务范围包括金山东部亭林、张堰、山阳、漕泾四镇及金山工业区、金山新城区、金山卫钱圩地区服务区域约155平方公里。
</div>
</div>
<div style='position: absolute;width: 440px;height: 470px;left: 21px;

View File

@ -113,7 +113,7 @@ var selectMPint = function(pid) {
formatSelection: function formatRepoSelection(repo){return repo.text;} // 函数用于呈现当前的选择
});
if(data!=null && data.length>0){
selelct_.val(data[0].id).trigger("change");
selelct_.val(data[0].id).trigger("change.select2");
}
},'json');
}else{
@ -131,8 +131,8 @@ var selectMPint = function(pid) {
formatResult: function formatRepo(repo){return repo.text;}, // 函数用来渲染结果
formatSelection: function formatRepoSelection(repo){return repo.text;} // 函数用于呈现当前的选择
});
selelct.val('').trigger("change");
selelct.on("change",function(e){
selelct.val('').trigger("change.select2");
selelct.off("select2:select select2:clear").on("select2:select select2:clear",function(){
var companyId= $(this).val();
$.post(ext.contextPath + "/user/processSection/getProcessSection4Select.do", {companyId:companyId}, function(data) {
$("#processsectionid").empty();
@ -147,8 +147,8 @@ var selectMPint = function(pid) {
formatResult: function formatRepo(repo){return repo.text;}, // 函数用来渲染结果
formatSelection: function formatRepoSelection(repo){return repo.text;} // 函数用于呈现当前的选择
});
selelct_.val('${kPIPoint.processsectionid}').trigger("change");
},'json');
selelct_.val('${kPIPoint.processsectionid}').trigger("change.select2");
},'json');
});
}
},'json');

View File

@ -89,8 +89,8 @@ var selectMPint = function(pid) {
formatResult: function formatRepo(repo){return repo.text;}, // 函数用来渲染结果
formatSelection: function formatRepoSelection(repo){return repo.text;} // 函数用于呈现当前的选择
});
selelct_.val('${kPIPoint.processsectionid}').trigger("change");
},'json');
selelct_.val('${kPIPoint.processsectionid}').trigger("change.select2");
},'json');
};
$(function(){
@ -116,8 +116,8 @@ var selectMPint = function(pid) {
formatResult: function formatRepo(repo){return repo.text;}, // 函数用来渲染结果
formatSelection: function formatRepoSelection(repo){return repo.text;} // 函数用于呈现当前的选择
});
selelct_.val('${kPIPoint.processsectionid}').trigger("change");
},'json');
selelct_.val('${kPIPoint.processsectionid}').trigger("change.select2");
},'json');
}else{
$("#hidden_bizid").attr("disabled","disabled");
$("#input_bizid").css("display", "none");
@ -133,8 +133,8 @@ var selectMPint = function(pid) {
formatResult: function formatRepo(repo){return repo.text;}, // 函数用来渲染结果
formatSelection: function formatRepoSelection(repo){return repo.text;} // 函数用于呈现当前的选择
});
selelct.val('${kPIPoint.bizid}').trigger("change");
selelct.on("change",function(e){
selelct.val('${kPIPoint.bizid}').trigger("change.select2");
selelct.off("select2:select select2:clear").on("select2:select select2:clear",function(){
var companyId= $(this).val();
$.post(ext.contextPath + "/user/processSection/getProcessSection4Select.do", {companyId:companyId}, function(data) {
$("#processsectionid").empty();
@ -149,8 +149,8 @@ var selectMPint = function(pid) {
formatResult: function formatRepo(repo){return repo.text;}, // 函数用来渲染结果
formatSelection: function formatRepoSelection(repo){return repo.text;} // 函数用于呈现当前的选择
});
selelct_.val('').trigger("change");
},'json');
selelct_.val('').trigger("change.select2");
},'json');
});
}
},'json');

View File

@ -1,406 +1,435 @@
<%@ 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 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" %>
<!DOCTYPE html>
<!-- <html lang="zh-CN"> -->
<!-- BEGIN HEAD -->
<head>
<title><%= ServerObject.atttable.get("TOPTITLE")%></title>
<title><%= ServerObject.atttable.get("TOPTITLE")%>
</title>
<!-- 引用页头及CSS页-->
<jsp:include page="/jsp/inc.jsp"></jsp:include>
<style type="text/css">
.select2-container .select2-selection--single{
height:34px;
line-height: 34px;
}
.select2-selection__arrow{
margin-top:3px;
}
</style>
<script type="text/javascript">
var companyId = "";
var showMaintenanceList = function(id) {
$.post(ext.contextPath + '/maintenance/showMaintenanceList4Equipment.do', {equipmentId:id} , function(data) {
$("#subDiv").html(data);
openModal('subMaintenanceModal');
});
};
var showHandleDetailList = function(id) {
stopBubbleDefaultEvent();
$.post(ext.contextPath + '/maintenance/showHandleDetailList4Equipment.do', {equipmentId:id} , function(data) {
$("#subDiv").html(data);
openModal('handleDetailModal');
});
};
var viewEquipmentFun = function(equipmentName,equipmentCardID,id) {
$.post(ext.contextPath + '/equipment/viewEquipmentCard.do', {equipmentName:equipmentName,equipmentCardID:equipmentCardID,id:id} , function(data) {
$("#subEquipmentDiv").html(data);
openModal('subEquipmentModal');
});
};
<!-- 引用页头及CSS页-->
<jsp:include page="/jsp/inc.jsp"></jsp:include>
<style type="text/css">
.select2-container .select2-selection--single {
height: 34px;
line-height: 34px;
}
var addFun = function() {
$.post(ext.contextPath + '/work/kpipoint/add.do', {} , function(data) {
$("#subDiv").html(data);
openModal('subModal');
});
};
.select2-selection__arrow {
margin-top: 3px;
}
</style>
<script type="text/javascript">
var companyId = "";
var showMaintenanceList = function (id) {
$.post(ext.contextPath + '/maintenance/showMaintenanceList4Equipment.do', {equipmentId: id}, function (data) {
$("#subDiv").html(data);
openModal('subMaintenanceModal');
});
};
var showHandleDetailList = function (id) {
stopBubbleDefaultEvent();
$.post(ext.contextPath + '/maintenance/showHandleDetailList4Equipment.do', {equipmentId: id}, function (data) {
$("#subDiv").html(data);
openModal('handleDetailModal');
});
};
var viewEquipmentFun = function (equipmentName, equipmentCardID, id) {
$.post(ext.contextPath + '/equipment/viewEquipmentCard.do', {
equipmentName: equipmentName,
equipmentCardID: equipmentCardID,
id: id
}, function (data) {
$("#subEquipmentDiv").html(data);
openModal('subEquipmentModal');
});
};
var editFun = function(id) {
stopBubbleDefaultEvent();
$.post(ext.contextPath + '/work/kpipoint/edit.do', {id:id} , function(data) {
$("#subDiv").html(data);
openModal('subModal');
});
};
var addFun = function () {
$.post(ext.contextPath + '/work/kpipoint/add.do', {}, function (data) {
$("#subDiv").html(data);
openModal('subModal');
});
};
var viewFun = function(id){
$.post(ext.contextPath + '/work/kpipoint/view.do', {id:id} , function(data) {
$("#subDiv").html(data);
openModal('subModal');
});
};
var editFun = function (id) {
stopBubbleDefaultEvent();
$.post(ext.contextPath + '/work/kpipoint/edit.do', {id: id}, function (data) {
$("#subDiv").html(data);
openModal('subModal');
});
};
var viewFun = function (id) {
$.post(ext.contextPath + '/work/kpipoint/view.do', {id: id}, function (data) {
$("#subDiv").html(data);
openModal('subModal');
});
};
var deleteFun = function (id) {
stopBubbleDefaultEvent();
swal({
text: "您确定要删除此记录?",
dangerMode: true,
buttons: {
cancel: {
text: "取消",
value: null,
visible: true,
className: "btn btn-default btn-sm",
closeModal: true,
},
confirm: {
text: "确定",
value: true,
visible: true,
className: "btn btn-danger btn-sm",
closeModal: true
}
}
})
.then(function (willDelete) {
if (willDelete) {
$.post(ext.contextPath + '/work/kpipoint/delete.do', {id: id}, function (data) {
if (data == 1) {
$("#table").bootstrapTable('refresh');
} else {
showAlert('d', '删除失败', 'mainAlertdiv');
}
});
var deleteFun = function(id) {
stopBubbleDefaultEvent();
swal({
text: "您确定要删除此记录?",
dangerMode: true,
buttons: {
cancel: {
text: "取消",
value: null,
visible: true,
className: "btn btn-default btn-sm",
closeModal: true,
},
confirm: {
text: "确定",
value: true,
visible: true,
className: "btn btn-danger btn-sm",
closeModal: true
}
}
})
.then(function(willDelete) {
if (willDelete) {
$.post(ext.contextPath + '/work/kpipoint/delete.do', {id : id}, function(data) {
if(data==1){
$("#table").bootstrapTable('refresh');
}else{
showAlert('d','删除失败','mainAlertdiv');
}
});
}
});
};
//删除多条资产类型数据
var deletesFun = function() {
var checkedItems = $("#table").bootstrapTable('getSelections');
var datas="";
$.each(checkedItems, function(index, item){
datas+=item.id+",";
});
if(datas==""){
showAlert('d','请先选择记录','mainAlertdiv');
}else{
swal({
text: "您确定要删除此记录?",
dangerMode: true,
buttons: {
cancel: {
text: "取消",
value: null,
visible: true,
className: "btn btn-default btn-sm",
closeModal: true,
},
confirm: {
text: "确定",
value: true,
visible: true,
className: "btn btn-danger btn-sm",
closeModal: true
}
}
})
.then(function(willDelete) {
if (willDelete) {
$.post(ext.contextPath + '/work/kpipoint/deletes.do', {ids:datas} , function(data) {
if(data>0){
$("#table").bootstrapTable('refresh');
}else{
showAlert('d','删除失败','mainAlertdiv');
}
});
}
});
}
};
var dosearch = function() {
$("#table").bootstrapTable('refresh');
};
var refreshSelect = function() {
var selelct_ =$("#processSection").select2({
data: null,
placeholder:'请选择',//默认文字提示
allowClear: true,//允许清空
escapeMarkup: function (markup) { return markup; }, // 自定义格式化防止xss注入
language: "zh-CN",
minimumInputLength: 0,
minimumResultsForSearch: 10,//数据超过十个启用搜索框
});
$("#processSection").empty();
// $("#table").bootstrapTable('refresh', {data:null});
$(".select2-selection--single").css({'height':'30px','paddingTop':'4px'})
};
$(function() {
$.post(ext.contextPath + "/user/getSearchBizsByUserId4Select.do", {}, function(data) {
if(data.length == 1){
//选择厂区为一个厂时隐藏选择框
$("#search_code").css("display", "none");
$("#company").text(data[0].text);
companyId=data[0].id;
dosearch();
$.post(ext.contextPath + "/user/processSection/getProcessSection4Select.do", {companyId:companyId}, function(data) {
$("#processSection").empty();
var selelct_ =$("#processSection").select2({
};
//删除多条资产类型数据
var deletesFun = function () {
var checkedItems = $("#table").bootstrapTable('getSelections');
var datas = "";
$.each(checkedItems, function (index, item) {
datas += item.id + ",";
});
if (datas == "") {
showAlert('d', '请先选择记录', 'mainAlertdiv');
} else {
swal({
text: "您确定要删除此记录?",
dangerMode: true,
buttons: {
cancel: {
text: "取消",
value: null,
visible: true,
className: "btn btn-default btn-sm",
closeModal: true,
},
confirm: {
text: "确定",
value: true,
visible: true,
className: "btn btn-danger btn-sm",
closeModal: true
}
}
})
.then(function (willDelete) {
if (willDelete) {
$.post(ext.contextPath + '/work/kpipoint/deletes.do', {ids: datas}, function (data) {
if (data > 0) {
$("#table").bootstrapTable('refresh');
} else {
showAlert('d', '删除失败', 'mainAlertdiv');
}
});
}
});
}
};
var dosearch = function () {
$("#table").bootstrapTable('refresh');
};
var loadProcessSectionSelect = function (bizId) {
if (!bizId) {
refreshSelect();
return;
}
$.post(ext.contextPath + "/user/processSection/getProcessSection4Select.do", {companyId: bizId}, function (data) {
$("#processSection").empty();
var selelct_ = $("#processSection").select2({
data: data,
cache: false,
placeholder: '请选择',
allowClear: true,
escapeMarkup: function (markup) {
return markup;
},
language: "zh-CN",
minimumInputLength: 0,
minimumResultsForSearch: 10,
formatResult: function formatRepo(repo) {
return repo.text;
},
formatSelection: function formatRepoSelection(repo) {
return repo.text;
}
});
$(".select2-selection--single").css({'height': '30px', 'paddingTop': '4px'});
// 初始化时仅刷新控件显示,不触发查询
selelct_.val('').trigger("change.select2");
// 用select2事件触发查询避免普通change导致选中文本被立即重置
selelct_.off("select2:select select2:clear").on("select2:select select2:clear", function () {
// 让select2先完成渲染再执行查询
setTimeout(function () {
dosearch();
}, 0);
});
}, 'json');
};
var refreshSelect = function () {
var selelct_ = $("#processSection").select2({
data: null,
placeholder: '请选择',//默认文字提示
allowClear: true,//允许清空
escapeMarkup: function (markup) {
return markup;
}, // 自定义格式化防止xss注入
language: "zh-CN",
minimumInputLength: 0,
minimumResultsForSearch: 10,//数据超过十个启用搜索框
});
$("#processSection").empty();
// $("#table").bootstrapTable('refresh', {data:null});
$(".select2-selection--single").css({'height': '30px', 'paddingTop': '4px'})
};
$(function () {
$.post(ext.contextPath + "/user/getSearchBizsByUserId4Select.do", {}, function (data) {
if (data.length == 1) {
//选择厂区为一个厂时隐藏选择框
$("#search_code").css("display", "none");
$("#company").text(data[0].text);
companyId = data[0].id;
loadProcessSectionSelect(companyId);
dosearch();
} else {
// 当前页面可能不展示厂区下拉search_code被注释兜底按当前厂区/首个厂区加载工艺段
if ($("#search_code").length == 0) {
companyId = (typeof unitId !== "undefined" && unitId) ? unitId : data[0].id;
loadProcessSectionSelect(companyId);
dosearch();
return;
}
$("#company").css("display", "none");
var selelct = $("#search_code").select2({
data: data,
cache : false,
placeholder:'请选择',//默认文字提示
placeholder: '请选择',//默认文字提示
allowClear: true,//允许清空
escapeMarkup: function (markup) { return markup; }, // 自定义格式化防止xss注入
language: "zh-CN",
escapeMarkup: function (markup) {
return markup;
}, // 自定义格式化防止xss注入
language: "zh-CN",
minimumInputLength: 0,
minimumResultsForSearch: 10,//数据超过十个启用搜索框
formatResult: function formatRepo(repo){return repo.text;}, // 函数用来渲染结果
formatSelection: function formatRepoSelection(repo){return repo.text;} // 函数用于呈现当前的选择
});
$(".select2-selection--single").css({'height':'30px','paddingTop':'4px'})
selelct_.val('').trigger("change");
selelct_.on("change",function(e){
dosearch();
});
},'json');
}else{
$("#company").css("display", "none");
var selelct=$("#search_code").select2({
data : data ,
placeholder:'请选择',//默认文字提示
allowClear: true,//允许清空
escapeMarkup: function (markup) { return markup; }, // 自定义格式化防止xss注入
language: "zh-CN",
minimumInputLength: 0,
minimumResultsForSearch: 10,//数据超过十个启用搜索框
formatResult: function formatRepo(repo){return repo.text;}, // 函数用来渲染结果
formatSelection: function formatRepoSelection(repo){return repo.text;} // 函数用于呈现当前的选择
});
$(".select2-selection--single").css({'height':'30px','paddingTop':'4px'})
selelct.val('').trigger("change");
refreshSelect();
selelct.on("change",function(e){
companyId= $(this).val();
dosearch();
refreshSelect();
$.post(ext.contextPath + "/user/processSection/getProcessSection4Select.do", {companyId:companyId}, function(data) {
$("#processSection").empty();
var selelct_ =$("#processSection").select2({
data: data,
cache : false,
placeholder:'请选择',//默认文字提示
allowClear: true,//允许清空
escapeMarkup: function (markup) { return markup; }, // 自定义格式化防止xss注入
language: "zh-CN",
minimumInputLength: 0,
minimumResultsForSearch: 10,//数据超过十个启用搜索框
formatResult: function formatRepo(repo){return repo.text;}, // 函数用来渲染结果
formatSelection: function formatRepoSelection(repo){return repo.text;} // 函数用于呈现当前的选择
});
$(".select2-selection--single").css({'height':'30px','paddingTop':'4px'})
selelct_.val('').trigger("change");
selelct_.on("change",function(e){
dosearch();
});
},'json');
});
}
},'json');
$("#table").bootstrapTable({ // 对应table标签的id
url: ext.contextPath + '/work/kpipoint/getlist.do', // 获取表格数据的url
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
striped: true, //表格显示条纹默认为false
pagination: true, // 在表格底部显示分页组件默认false
pageList: [10, 20,50], // 设置页面可以显示的数据条数
pageSize: 50, // 页面数据条数
pageNumber: 1, // 首页页码
sidePagination: 'server', // 设置为服务器端分页
queryParams: function (params) { // 请求服务器数据时发送的参数可以在这里添加额外的查询参数返回false则终止请求
return {
rows: params.limit, // 每页要显示的数据条数
page: params.offset/params.limit+1, // 每页显示数据的开始页码
sort: params.sort, // 要排序的字段
order: params.order,
search_name : $('#search_name').val(),
companyId: unitId,
pSectionId: $("#processSection").val(),
formatResult: function formatRepo(repo) {
return repo.text;
}, // 函数用来渲染结果
formatSelection: function formatRepoSelection(repo) {
return repo.text;
} // 函数用于呈现当前的选择
});
$(".select2-selection--single").css({'height': '30px', 'paddingTop': '4px'})
selelct.val('').trigger("change.select2");
refreshSelect();
selelct.off("select2:select select2:clear").on("select2:select select2:clear", function () {
companyId = $(this).val();
dosearch();
refreshSelect();
loadProcessSectionSelect(companyId);
});
}
},
sortName: 'grade', // 要排序的字段
sortOrder: 'asc', // 排序规则
onClickRow: function (row) {//单击行事件,执行查看功能
viewFun(row.id);
},
columns: [
{
checkbox: true, // 显示一个勾选框
},{
field: 'mpointid', // 返回json数据中的name
title: '测量点编号', // 表格表头显示文字
align: 'center', // 左右居中
valign: 'middle' // 上下居中
},{
field: 'mpointname', // 返回json数据中的name
title: '测量点名称', // 表格表头显示文字
align: 'center', // 左右居中
valign: 'middle' // 上下居中
},{
field: 'bizid', // 返回json数据中的name
title: '所属厂区', // 表格表头显示文字
align: 'center', // 左右居中
valign: 'middle' // 上下居中
},{
field: 'processectionname', // 返回json数据中的name
title: '工艺段', // 表格表头显示文字
align: 'center', // 左右居中
valign: 'middle' // 上下居中
},{
field: 'grade', // 返回json数据中的name
title: '重要等级', // 表格表头显示文字
align: 'center', // 左右居中
valign: 'middle'
},{
title: "操作",
align: 'center',
valign: 'middle',
width: 120, // 定义列的宽度单位为像素px
formatter: function (value, row, index) {
var buts="";
buts+= '<security:authorize buttonUrl="work/scadaPic/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+= '</security:authorize>';
buts+= '<security:authorize buttonUrl="work/scadaPic/delete.do">';
buts+='<button class="btn btn-default btn-sm" title="删除" onclick="deleteFun(\''+row.id+'\')"><i class="fa fa fa-trash-o"></i><span class="hidden-md hidden-lg">删除</span></button';
buts+= '</security:authorize>';
buts='<div class="btn-group" >'+buts+'</div>';
return buts;
}, 'json');
$("#table").bootstrapTable({ // 对应table标签的id
url: ext.contextPath + '/work/kpipoint/getlist.do', // 获取表格数据的url
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
striped: true, //表格显示条纹默认为false
pagination: true, // 在表格底部显示分页组件默认false
pageList: [10, 20, 50], // 设置页面可以显示的数据条数
pageSize: 50, // 页面数据条数
pageNumber: 1, // 首页页码
sidePagination: 'server', // 设置为服务器端分页
queryParams: function (params) { // 请求服务器数据时发送的参数可以在这里添加额外的查询参数返回false则终止请求
return {
rows: params.limit, // 每页要显示的数据条数
page: params.offset / params.limit + 1, // 每页显示数据的开始页码
sort: params.sort, // 要排序的字段
order: params.order,
search_name: $('#search_name').val(),
companyId: companyId,
pSectionId: $("#processSection").val(),
}
},
sortName: 'grade', // 要排序的字段
sortOrder: 'asc', // 排序规则
onClickRow: function (row) {//单击行事件,执行查看功能
viewFun(row.id);
},
columns: [
{
checkbox: true, // 显示一个勾选框
}, {
field: 'mpointid', // 返回json数据中的name
title: '测量点编号', // 表格表头显示文字
align: 'center', // 左右居中
valign: 'middle' // 上下居中
}, {
field: 'mpointname', // 返回json数据中的name
title: '测量点名称', // 表格表头显示文字
align: 'center', // 左右居中
valign: 'middle' // 上下居中
}, {
field: 'bizid', // 返回json数据中的name
title: '所属厂区', // 表格表头显示文字
align: 'center', // 左右居中
valign: 'middle' // 上下居中
}, {
field: 'processectionname', // 返回json数据中的name
title: '工艺段', // 表格表头显示文字
align: 'center', // 左右居中
valign: 'middle' // 上下居中
}, {
field: 'grade', // 返回json数据中的name
title: '重要等级', // 表格表头显示文字
align: 'center', // 左右居中
valign: 'middle'
}, {
title: "操作",
align: 'center',
valign: 'middle',
width: 120, // 定义列的宽度单位为像素px
formatter: function (value, row, index) {
var buts = "";
buts += '<security:authorize buttonUrl="work/scadaPic/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 += '</security:authorize>';
buts += '<security:authorize buttonUrl="work/scadaPic/delete.do">';
buts += '<button class="btn btn-default btn-sm" title="删除" onclick="deleteFun(\'' + row.id + '\')"><i class="fa fa fa-trash-o"></i><span class="hidden-md hidden-lg">删除</span></button';
buts += '</security:authorize>';
buts = '<div class="btn-group" >' + buts + '</div>';
return buts;
}
}
],
onLoadSuccess: function () { //加载成功时执行
adjustBootstrapTableView("table");
},
onLoadError: function () { //加载失败时执行
console.info("加载数据失败");
}
],
onLoadSuccess: function(){ //加载成功时执行
adjustBootstrapTableView("table");
},
onLoadError: function(){ //加载失败时执行
console.info("加载数据失败");
}
})
});
</script>
})
});
</script>
</head>
<body onload="initMenu()" class="hold-transition ${cu.themeclass} sidebar-mini">
<div class="wrapper">
<!-- 引用top -->
<%-- <jsp:include page="/jsp/top.jsp"></jsp:include> --%>
<!-- 菜单栏 -->
<%-- <jsp:include page="/jsp/left.jsp"></jsp:include> --%>
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<section class="content-header">
<h1 id ="head_title"></h1>
<ol class="breadcrumb">
<li><a id ='head_firstlevel' href="#"><i class="fa fa-dashboard"></i> </a></li>
<!-- <li class="active">Here</li> -->
</ol>
</section>
<!-- Main content -->
<section class="content container-fluid">
<div id="mainAlertdiv"></div>
<div id="subDiv"></div>
<div id="mpSubDiv"></div>
<div >
<!-- <div class="form-group">
<label class="form-label" id="companylabel">水厂:</label>
<label class="form-label" id="company" style="width:180px;border: none;background: transparent;" ></label>
<select class="form-control select2 " id="search_code" name ="search_code" style="width: 220px;"></select>
</div> -->
<div class="form-group form-inline" style="padding:0;">
<div class="wrapper">
<!-- 引用top -->
<%-- <jsp:include page="/jsp/top.jsp"></jsp:include> --%>
<!-- 菜单栏 -->
<%-- <jsp:include page="/jsp/left.jsp"></jsp:include> --%>
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<section class="content-header">
<h1 id="head_title"></h1>
<ol class="breadcrumb">
<li><a id='head_firstlevel' href="#"><i class="fa fa-dashboard"></i> </a></li>
<!-- <li class="active">Here</li> -->
</ol>
</section>
<!-- Main content -->
<section class="content container-fluid">
<div id="mainAlertdiv"></div>
<div id="subDiv"></div>
<div id="mpSubDiv"></div>
<div>
<!-- <div class="form-group">
<label class="form-label" id="companylabel">水厂:</label>
<label class="form-label" id="company" style="width:180px;border: none;background: transparent;" ></label>
<select class="form-control select2 " id="search_code" name ="search_code" style="width: 220px;"></select>
</div> -->
<div class="form-group form-inline" style="padding:0;">
<div class="form-group form-inline">
<div class="form-group form-inline">
<div class="form-group form-inline">
<div class="btn-group" style="width: 220px;padding-bottom:10px;">
<security:authorize buttonUrl="work/scadaPic/add.do">
<button type="button" class="btn btn-default btn-sm" onclick="addFun();"><i class="fa fa-plus"></i> 新增</button>
<button type="button" class="btn btn-default btn-sm" onclick="deletesFun();"><i class="fa fa-trash-o"></i> 删除</button>
</security:authorize>
</div>
</div>
</div>
<div class="form-group pull-right" >
<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="编号">
<div class="input-group-btn">
<button class="btn btn-default" onclick="dosearch();"><i class="fa fa-search"></i></button>
</div>
<div class="btn-group" style="width: 220px;padding-bottom:10px;">
<security:authorize buttonUrl="work/scadaPic/add.do">
<button type="button" class="btn btn-default btn-sm" onclick="addFun();"><i
class="fa fa-plus"></i> 新增
</button>
<button type="button" class="btn btn-default btn-sm" onclick="deletesFun();"><i
class="fa fa-trash-o"></i> 删除
</button>
</security:authorize>
</div>
</div>
<div class="form-group pull-right">
<label class="form-label">工艺段</label>
<select class="form-control select2 " id="processSection" name ="processSection" style="width: 220px;"></select>
</div>
</div>
<table id="table"></table>
<div class="form-group pull-right">
<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="编号">
<div class="input-group-btn">
<button class="btn btn-default" onclick="dosearch();"><i class="fa fa-search"></i>
</button>
</div>
</div>
</div>
<div class="form-group pull-right">
<label class="form-label">工艺段</label>
<select class="form-control select2 " id="processSection" name="processSection"
style="width: 220px;"></select>
</div>
</div>
</section>
<!-- /.content -->
</div>
<%-- <jsp:include page="/jsp/bottom.jsp"></jsp:include> --%>
<%-- <jsp:include page="/jsp/side.jsp"></jsp:include> --%>
<table id="table"></table>
</div>
</section>
<!-- /.content -->
</div>
<%-- <jsp:include page="/jsp/bottom.jsp"></jsp:include> --%>
<%-- <jsp:include page="/jsp/side.jsp"></jsp:include> --%>
</div>
</body>
<!-- 文件上传-->
<link rel="stylesheet" href="<%=request.getContextPath()%>/node_modules/bootstrap-fileinput/css/fileinput.min.css"/>
<%-- <script type="text/javascript" src="<%=request.getContextPath()%>/node_modules/bootstrap-fileinput/js/fileinput.min.js" charset="utf-8"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/node_modules/bootstrap-fileinput/js/locales/zh.js" charset="utf-8"></script> --%>
<script type="text/javascript">
document.write("<scr"+"ipt src=\"<%=request.getContextPath()%>/node_modules/bootstrap-fileinput/js/fileinput.min.js\"></sc"+"ript>")
document.write("<scr"+"ipt src=\"<%=request.getContextPath()%>/node_modules/bootstrap-fileinput/js/locales/zh.js\"></sc"+"ript>")
</script>
document.write("<scr" + "ipt src=\"<%=request.getContextPath()%>/node_modules/bootstrap-fileinput/js/fileinput.min.js\"></sc" + "ript>")
document.write("<scr" + "ipt src=\"<%=request.getContextPath()%>/node_modules/bootstrap-fileinput/js/locales/zh.js\"></sc" + "ript>")
</script>
<!-- 引入ChartJS-->
<script type="text/javascript" src="<%=request.getContextPath()%>/node_modules/chart.js/dist/Chart.min.js" charset="utf-8"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/node_modules/chart.js/dist/Chart.bundle.min.js" charset="utf-8"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/node_modules/chart.js/dist/Chart.min.js"
charset="utf-8"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/node_modules/chart.js/dist/Chart.bundle.min.js"
charset="utf-8"></script>
<!-- 引入daterangepicker-->
<link rel="stylesheet" href="<%=request.getContextPath()%>/plugins/bootstrap-daterangepicker/daterangepicker.css"/>
<script type="text/javascript" src="<%=request.getContextPath()%>/plugins/bootstrap-daterangepicker/moment.min.js" charset="utf-8"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/plugins/bootstrap-daterangepicker/daterangepicker.js" charset="utf-8"></script>
<link rel="stylesheet" href="<%=request.getContextPath()%>/plugins/bootstrap-daterangepicker/daterangepicker.css"/>
<script type="text/javascript" src="<%=request.getContextPath()%>/plugins/bootstrap-daterangepicker/moment.min.js"
charset="utf-8"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/plugins/bootstrap-daterangepicker/daterangepicker.js"
charset="utf-8"></script>
<!-- echarts-->
<script type="text/javascript" src="<%=request.getContextPath()%>/plugins/echarts/echarts.js" charset="utf-8"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/plugins/echarts/macarons.js" charset="utf-8"></script>

View File

@ -139,6 +139,34 @@ var companyId = "";
var dosearch = function() {
$("#table").bootstrapTable('refresh');
};
var loadProcessSectionSelect = function(companyId) {
if (!companyId) {
refreshSelect();
return;
}
$.post(ext.contextPath + "/user/processSection/getProcessSection4Select.do", {companyId:companyId}, function(data) {
$("#processSection").empty();
var selelct_ =$("#processSection").select2({
data: data,
cache : false,
placeholder:'请选择',
allowClear: true,
escapeMarkup: function (markup) { return markup; },
language: "zh-CN",
minimumInputLength: 0,
minimumResultsForSearch: 10,
formatResult: function formatRepo(repo){return repo.text;},
formatSelection: function formatRepoSelection(repo){return repo.text;}
});
$(".select2-selection--single").css({'height':'30px','paddingTop':'4px'});
selelct_.val('').trigger("change.select2");
selelct_.off("select2:select select2:clear").on("select2:select select2:clear",function(){
setTimeout(function(){
dosearch();
},0);
});
},'json');
};
var refreshSelect = function() {
var selelct_ =$("#processSection").select2({
data: null,
@ -163,27 +191,7 @@ var companyId = "";
$("#company").text(data[0].text);
companyId=data[0].id;
dosearch();
$.post(ext.contextPath + "/user/processSection/getProcessSection4Select.do", {companyId:companyId}, function(data) {
$("#processSection").empty();
var selelct_ =$("#processSection").select2({
data: data,
cache : false,
placeholder:'请选择',//默认文字提示
allowClear: true,//允许清空
escapeMarkup: function (markup) { return markup; }, // 自定义格式化防止xss注入
language: "zh-CN",
minimumInputLength: 0,
minimumResultsForSearch: 10,//数据超过十个启用搜索框
formatResult: function formatRepo(repo){return repo.text;}, // 函数用来渲染结果
formatSelection: function formatRepoSelection(repo){return repo.text;} // 函数用于呈现当前的选择
});
$(".select2-selection--single").css({'height':'30px','paddingTop':'4px'})
selelct_.val('').trigger("change");
selelct_.on("change",function(e){
dosearch();
});
},'json');
loadProcessSectionSelect(companyId);
}else{
$("#company").css("display", "none");
var selelct=$("#search_code").select2({
@ -198,33 +206,14 @@ var companyId = "";
formatSelection: function formatRepoSelection(repo){return repo.text;} // 函数用于呈现当前的选择
});
$(".select2-selection--single").css({'height':'30px','paddingTop':'4px'})
selelct.val('').trigger("change");
selelct.val('').trigger("change.select2");
refreshSelect();
selelct.on("change",function(e){
selelct.off("select2:select select2:clear").on("select2:select select2:clear",function(){
companyId= $(this).val();
dosearch();
refreshSelect();
$.post(ext.contextPath + "/user/processSection/getProcessSection4Select.do", {companyId:companyId}, function(data) {
$("#processSection").empty();
var selelct_ =$("#processSection").select2({
data: data,
cache : false,
placeholder:'请选择',//默认文字提示
allowClear: true,//允许清空
escapeMarkup: function (markup) { return markup; }, // 自定义格式化防止xss注入
language: "zh-CN",
minimumInputLength: 0,
minimumResultsForSearch: 10,//数据超过十个启用搜索框
formatResult: function formatRepo(repo){return repo.text;}, // 函数用来渲染结果
formatSelection: function formatRepoSelection(repo){return repo.text;} // 函数用于呈现当前的选择
});
$(".select2-selection--single").css({'height':'30px','paddingTop':'4px'})
selelct_.val('').trigger("change");
selelct_.on("change",function(e){
dosearch();
});
},'json');
});
loadProcessSectionSelect(companyId);
});
}
},'json');

View File

@ -366,8 +366,8 @@
} // 函数用于呈现当前的选择
});
$(".select2-selection--single").css({'height': '30px', 'paddingTop': '4px'})
selelct_.val('').trigger("change");
selelct_.on("change", function (e) {
selelct_.val('').trigger("change.select2");
selelct_.off("select2:select select2:clear").on("select2:select select2:clear", function (e) {
dosearch();
});
}, 'json');
@ -394,9 +394,8 @@
} // 函数用于呈现当前的选择
});
$(".select2-selection--single").css({'height': '30px', 'paddingTop': '4px'})
selelct.val('').trigger("change");
//refreshSelect();
selelct.on("change", function (e) {
selelct.val('').trigger("change.select2");
selelct.off("select2:select select2:clear").on("select2:select select2:clear", function (e) {
companyId = $(this).val();
//dosearch();
//refreshSelect();
@ -422,8 +421,8 @@
} // 函数用于呈现当前的选择
});
$(".select2-selection--single").css({'height': '30px', 'paddingTop': '4px'})
selelct_.val('').trigger("change");
selelct_.on("change", function (e) {
selelct_.val('').trigger("change.select2");
selelct_.off("select2:select select2:clear").on("select2:select select2:clear", function (e) {
dosearch();
});
}, 'json');

View File

@ -325,8 +325,8 @@
} // 函数用于呈现当前的选择
});
$(".select2-selection--single").css({'height': '30px', 'paddingTop': '4px'})
selelct_.val('').trigger("change");
selelct_.on("change", function (e) {
selelct_.val('').trigger("change.select2");
selelct_.off("select2:select select2:clear").on("select2:select select2:clear", function (e) {
dosearch();
});
}, 'json');
@ -353,9 +353,8 @@
} // 函数用于呈现当前的选择
});
$(".select2-selection--single").css({'height': '30px', 'paddingTop': '4px'})
selelct.val('').trigger("change");
//refreshSelect();
selelct.on("change", function (e) {
selelct.val('').trigger("change.select2");
selelct.off("select2:select select2:clear").on("select2:select select2:clear", function (e) {
companyId = $(this).val();
//dosearch();
//refreshSelect();
@ -381,8 +380,8 @@
} // 函数用于呈现当前的选择
});
$(".select2-selection--single").css({'height': '30px', 'paddingTop': '4px'})
selelct_.val('').trigger("change");
selelct_.on("change", function (e) {
selelct_.val('').trigger("change.select2");
selelct_.off("select2:select select2:clear").on("select2:select select2:clear", function (e) {
dosearch();
});
}, 'json');

View File

@ -133,8 +133,8 @@
formatSelection: function formatRepoSelection(repo) { return repo.text; } // 函数用于呈现当前的选择
});
$(".select2-selection--single").css({ 'height': '30px', 'paddingTop': '4px' })
selelct_.val('').trigger("change");
selelct_.on("change", function (e) {
selelct_.val('').trigger("change.select2");
selelct_.off("select2:select select2:clear").on("select2:select select2:clear", function () {
$("#table").bootstrapTable('refresh');
});

View File

@ -149,8 +149,8 @@
minimumInputLength: 0,
minimumResultsForSearch: 10,//数据超过十个启用搜索框
});
select.val('').trigger("change");
select.on("change", function (e) {
select.val('').trigger("change.select2");
select.off("select2:select select2:clear").on("select2:select select2:clear", function () {
$("#table").bootstrapTable('refresh');
});
@ -166,8 +166,8 @@
minimumInputLength: 0,
minimumResultsForSearch: 10,//数据超过十个启用搜索框
});
select.val("").trigger("change");
select.on("change", function (e) {
select.val("").trigger("change.select2");
select.off("select2:select select2:clear").on("select2:select select2:clear", function () {
$("#table").bootstrapTable('refresh');
});
@ -196,8 +196,8 @@
} // 函数用于呈现当前的选择
});
$(".select2-selection--single").css({'height': '30px', 'paddingTop': '4px'})
selelct_.val('').trigger("change");
selelct_.on("change", function (e) {
selelct_.val('').trigger("change.select2");
selelct_.off("select2:select select2:clear").on("select2:select select2:clear", function () {
$("#table").bootstrapTable('refresh');
});

View File

@ -181,8 +181,8 @@
minimumInputLength: 0,
minimumResultsForSearch: 10,//数据超过十个启用搜索框
});
select.val('').trigger("change");
select.on("change", function (e) {
select.val('').trigger("change.select2");
select.off("select2:select select2:clear").on("select2:select select2:clear", function () {
$("#table").bootstrapTable('refresh', {pageNumber: 1});
});
@ -200,8 +200,8 @@
minimumInputLength: 0,
minimumResultsForSearch: 10,//数据超过十个启用搜索框
});
select.val("").trigger("change");
select.on("change", function (e) {
select.val("").trigger("change.select2");
select.off("select2:select select2:clear").on("select2:select select2:clear", function () {
$("#table").bootstrapTable('refresh', {pageNumber: 1});
});
@ -231,8 +231,8 @@
} // 函数用于呈现当前的选择
});
$(".select2-selection--single").css({'height': '30px', 'paddingTop': '4px'})
selelct_.val('').trigger("change");
selelct_.on("change", function (e) {
selelct_.val('').trigger("change.select2");
selelct_.off("select2:select select2:clear").on("select2:select select2:clear", function () {
$("#table").bootstrapTable('refresh', {pageNumber: 1});
});

View File

@ -108,7 +108,7 @@
formatSelection: function formatRepoSelection(repo){return repo.text;} // 函数用于呈现当前的选择
});
if(data!=null && data.length>0){
selelct_.val(data[0].id).trigger("change");
selelct_.val(data[0].id).trigger("change.select2");
}
},'json');
}else{
@ -126,7 +126,7 @@
formatResult: function formatRepo(repo){return repo.text;}, // 函数用来渲染结果
formatSelection: function formatRepoSelection(repo){return repo.text;} // 函数用于呈现当前的选择
});
selelct.on("change",function(e){
selelct.off("select2:select select2:clear").on("select2:select select2:clear",function(){
companyId= $(this).val();
//重新选择厂区后清空设备和工艺段数据
$("#equipname").val("");
@ -134,7 +134,7 @@
$("#processSectionId").val("");
$("#processectionname").val("");
});
selelct.val('').trigger("change");
selelct.val('').trigger("change.select2");
}
},'json');
@ -149,9 +149,9 @@
.updateStatus('plannedenddt', 'NOT_VALIDATED',null)
.validateField('plannedenddt');
});
$("#active").select2({minimumResultsForSearch: 10}).val('${Active_True}').trigger("change");
$("#maintenanceWay").select2({minimumResultsForSearch: 10}).val('${INTER_MAINTENANCE}').trigger("change");
});
$("#active").select2({minimumResultsForSearch: 10}).val('${Active_True}').trigger("change.select2");
$("#maintenanceWay").select2({minimumResultsForSearch: 10}).val('${INTER_MAINTENANCE}').trigger("change.select2");
});
//选择设备根据厂区id选择厂内设备
var selectEquipmentCard = function() {
$.post(ext.contextPath + '/equipment/showEquipmentCardForSelect.do', {companyId:companyId, equipmentId:$("#equipid").val()} , function(data) {

View File

@ -101,7 +101,7 @@
formatSelection: function formatRepoSelection(repo){return repo.text;} // 函数用于呈现当前的选择
});
if(data!=null && data.length>0){
selelct_.val(data[0].id).trigger("change");
selelct_.val(data[0].id).trigger("change.select2");
}
},'json');
}else{
@ -119,7 +119,7 @@
formatSelection: function formatRepoSelection(repo){return repo.text;} // 函数用于呈现当前的选择
});
selelct.on("change",function(e){
selelct.off("select2:select select2:clear").on("select2:select select2:clear", function(e){
companyId = $(this).val();
//重新选择厂区后清空设备和工艺段数据
if(companyId != "${maintenanceDetail.companyid}"){
@ -129,10 +129,10 @@
$("#processectionname").val("");
}
});
selelct.val('${maintenanceDetail.companyid}').trigger("change");
selelct.val('${maintenanceDetail.companyid}').trigger("change.select2");
}
},'json');
$("#maintenanceWay").select2({minimumResultsForSearch: 10}).val("${maintenanceDetail.maintenanceWay}").trigger("change");
$("#maintenanceWay").select2({minimumResultsForSearch: 10}).val("${maintenanceDetail.maintenanceWay}").trigger("change.select2");
//选择时间
$('#startDate').datepicker({
language: 'zh-CN',

View File

@ -133,8 +133,8 @@
formatSelection: function formatRepoSelection(repo){return repo.text;} // 函数用于呈现当前的选择
});
$(".select2-selection--single").css({'height':'30px','paddingTop':'4px'})
selelct_.val('').trigger("change");
selelct_.on("change",function(e){
selelct_.val('').trigger("change.select2");
selelct_.off("select2:select select2:clear").on("select2:select select2:clear",function(){
dosearch();
});
@ -153,9 +153,9 @@
formatSelection: function formatRepoSelection(repo){return repo.text;} // 函数用于呈现当前的选择
});
$(".select2-selection--single").css({'height':'30px','paddingTop':'4px'})
selelct.val('').trigger("change");
selelct.val('').trigger("change.select2");
refreshSelect();
selelct.on("change",function(e){
selelct.off("select2:select select2:clear").on("select2:select select2:clear",function(){
companyId= $(this).val();
dosearch();
refreshSelect();
@ -174,8 +174,8 @@
formatSelection: function formatRepoSelection(repo){return repo.text;} // 函数用于呈现当前的选择
});
$(".select2-selection--single").css({'height':'30px','paddingTop':'4px'})
selelct_.val('').trigger("change");
selelct_.on("change",function(e){
selelct_.val('').trigger("change.select2");
selelct_.off("select2:select select2:clear").on("select2:select select2:clear",function(){
dosearch();
});
},'json');

205
使用说明文档.md Normal file
View File

@ -0,0 +1,205 @@
# SIPAIIS_WMS_JSSW 项目使用说明文档
## 项目概述
SIPAIIS_WMS_JSSW 是一个基于Java的污水处理管理平台SIPAIIS Wastewater Management System for JSSW旨在提供全过程的监控、管理和优化服务。该系统采用Spring框架、MyBatis ORM、Activiti工作流引擎等技术栈支持多种集成如Redis缓存、RabbitMQ消息队列、MQTT物联网通信等。
### 技术栈
- **后端框架**: Spring 5.1.12, Spring MVC, Spring Security
- **数据库ORM**: MyBatis 3.5.1
- **工作流**: Activiti 5.22.0
- **缓存**: Redis, Redisson
- **消息队列**: RabbitMQ, Spring AMQP
- **物联网**: MQTT (Eclipse Paho), Modbus
- **搜索**: Elasticsearch
- **定时任务**: Quartz, XXL-Job
- **WebSocket**: 实时通信
- **报表**: JasperReports, iText PDF
- **Excel处理**: Apache POI, EasyExcel
- **对象存储**: MinIO
- **其他**: Hutool工具库, Lombok, Knife4j API文档
### 部署环境
- **Java版本**: JDK 1.8
- **应用服务器**: 支持WAR包部署如Tomcat, Jetty
- **数据库**: SQL Server (推荐), 支持其他JDBC兼容数据库
- **端口**: 默认8088 (Jetty)
## 功能点梳理
基于项目中的功能清单,系统包含以下主要功能模块:
### 1. 用户管理
- 用户信息增删改查
- 部门组织架构管理
- 角色权限管理
- 菜单配置
### 2. 监控与报警
- 测点数据管理
- 报警记录管理
- 报警类型配置
- 设备监控
### 3. 设备管理
- 设备基本信息管理
- 设备类型分类
- 设备生命周期管理(采购、入库、出库、维修、保养、巡检、点检、润滑、校准、报废等)
- 设备统计、分析、排名、对比、预警
- BIM设备关联与巡检
### 4. 工单管理
- 工作工单管理
- 维修工单处理
- 保养工单管理
- 工单执行与跟踪
### 5. 备品备件管理
- 备件库存管理
- 采购记录管理
- 库存调拨管理
### 6. 视频监控
- 摄像头管理
- NVR设备管理
### 7. 巡检与考核
- 巡检计划与记录
- KPI考核指标、计划、结果
### 8. 消息与通知
- 系统消息管理
- 短信用户管理
### 9. 工作流管理
- 工作流流程管理
- 请假申请
- 任务管理
### 10. 文档管理
- 文档资料管理
- 图书资料管理
- 图纸管理
### 11. 报表与分析
- 数据报表管理
- 工作日报管理
- 能源数据监控
- 生产工艺参数
- 生产指标管理
### 12. 可视化展示
- 大屏数据可视化
- 工艺流程图管理
- 页面布局配置
### 13. 计划与交互
- 生产计划管理
- 页面交互配置
- 数据类型定义
### 14. BIM管理
- BIM模型管理
- BIM巡检路线
- BIM设备关联
- BIM报警记录
### 15. 其他模块
- 缓存数据管理
- JSP配置
- 第三方接口集成
## 功能点间相互依赖关系
### 核心依赖关系
- **设备管理** 是基础模块其他模块如报警、工单、巡检、BIM等均依赖设备数据。
- **测点与报警**: 报警依赖测点数据和设备状态。
- **工单管理**: 维修、保养工单依赖设备信息和工作流引擎。
- **工作流**: 工单、请假、任务等流程依赖Activiti工作流。
- **巡检与KPI**: 巡检记录影响KPI考核结果。
- **BIM**: BIM设备关联依赖设备管理BIM报警依赖报警模块。
- **报表与可视化**: 依赖各模块数据进行统计和展示。
- **消息通知**: 报警、工单等事件触发消息发送。
- **缓存与消息队列**: Redis用于缓存热点数据RabbitMQ用于异步处理MQTT用于设备通信。
### 数据流依赖
- 用户权限控制贯穿所有模块。
- 设备数据是中心,影响报警、工单、统计等。
- 工作流驱动业务流程,如工单审批。
- 集成技术Redis、MQ、ES支持高性能和实时性。
## 安装与部署
### 环境要求
- JDK 1.8+
- Maven 3.6+
- 数据库SQL Server 2012+ 或兼容JDBC数据库
- Redis 2.6+
- RabbitMQ 5.9+
- Elasticsearch 3.2+
- MinIO (可选,用于文件存储)
### 部署步骤
1. **克隆或下载项目**:
```
git clone <repository-url>
cd SIPAIIS_WMS_JSSW
```
2. **配置数据库**:
- 编辑 `src/main/resources/db.properties` 配置数据库连接。
- 执行数据库脚本初始化表结构。
3. **配置其他服务**:
- 编辑 `config.properties`, `redis.properties`, `rabbitmq.properties`, `mqtt.properties` 等配置文件。
- 启动Redis, RabbitMQ, Elasticsearch等服务。
4. **构建项目**:
```
mvn clean package
```
5. **部署WAR包**:
- 将 `target/TGLW.war` 部署到Tomcat或Jetty。
- 默认端口8088可在 `pom.xml` 中修改。
6. **启动应用**:
- 访问 `http://localhost:8088/` 进入系统。
### 配置说明
- **applicationContext.xml**: Spring上下文配置XXL-Job执行器。
- **log4j.properties**: 日志配置。
- **xxl-job-executor.properties**: 定时任务配置。
## 使用指南
### 系统登录
- 默认管理员账号:根据配置。
- 登录后,根据角色权限访问不同模块。
### 主要操作
- **设备管理**: 添加设备,配置参数,监控状态。
- **报警处理**: 查看报警记录,确认处理。
- **工单执行**: 创建工单,分配任务,跟踪进度。
- **巡检管理**: 设置巡检计划,记录巡检结果。
- **报表查看**: 生成各类统计报表。
- **BIM可视化**: 查看3D模型关联设备数据。
### API文档
- 使用Knife4j查看API接口`http://localhost:8088/doc.html`
### 维护与监控
- 日志文件:`logs/TGLW.log`
- 监控Redis、MQ连接状态。
- 使用XXL-Job管理定时任务。
## 注意事项
- 确保数据库和外部服务正常运行。
- 定期备份数据。
- 根据实际环境调整配置文件。
- 安全配置启用Spring Security定期更新密码。
## 联系与支持
- 项目维护者JSSW团队
- 版本0.0.1-SNAPSHOT
- 更新日期2026-04-05