forked from integrated_whb/integrated_whb
优化BUG
parent
ad906e4af8
commit
87eb2f9857
|
@ -15,6 +15,7 @@ import org.springframework.web.bind.annotation.RequestParam;
|
||||||
import org.springframework.web.bind.annotation.ResponseBody;
|
import org.springframework.web.bind.annotation.ResponseBody;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -43,7 +44,7 @@ public class TrafficSafetyActivitiesController extends BaseController {
|
||||||
pd.put("COMPLETIONSTATUS", "0");
|
pd.put("COMPLETIONSTATUS", "0");
|
||||||
pd.put("ISDELETE", "0");
|
pd.put("ISDELETE", "0");
|
||||||
|
|
||||||
if (DateUtil.compareDate(DateUtil.getDay(), pd.getString("EXPIRYDATE"))) {
|
if (DateUtil.compareDate(pd.getString("EXPIRYDATE"), DateUtil.getDay())) {
|
||||||
pd.put("VALIDSTATUS", "0");
|
pd.put("VALIDSTATUS", "0");
|
||||||
} else {
|
} else {
|
||||||
pd.put("VALIDSTATUS", "1");
|
pd.put("VALIDSTATUS", "1");
|
||||||
|
@ -88,10 +89,10 @@ public class TrafficSafetyActivitiesController extends BaseController {
|
||||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); // 经营企业
|
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); // 经营企业
|
||||||
pd.put("ISDELETE", "0");
|
pd.put("ISDELETE", "0");
|
||||||
|
|
||||||
if(!StringUtils.isEmpty(pd.getString("EXPIRYDATE")) && DateUtil.compareDate(pd.getString("EXPIRYDATE"),DateUtil.getDay())) {
|
if (DateUtil.compareDate(pd.getString("EXPIRYDATE"), DateUtil.getDay())) {
|
||||||
pd.put("VALIDSTATUS","1");
|
pd.put("VALIDSTATUS", "0");
|
||||||
} else if (DateUtil.compareDate(DateUtil.getDay(),pd.getString("EXPIRYDATE"))) {
|
} else {
|
||||||
pd.put("VALIDSTATUS","0");
|
pd.put("VALIDSTATUS", "1");
|
||||||
}
|
}
|
||||||
|
|
||||||
String ffile = DateUtil.getDays();
|
String ffile = DateUtil.getDays();
|
||||||
|
@ -136,10 +137,10 @@ public class TrafficSafetyActivitiesController extends BaseController {
|
||||||
page.setPd(pd);
|
page.setPd(pd);
|
||||||
List<PageData> varList = activeService.listForSafetyActivitieslist(page);
|
List<PageData> varList = activeService.listForSafetyActivitieslist(page);
|
||||||
varList.forEach(active -> {
|
varList.forEach(active -> {
|
||||||
if(DateUtil.getDay().equals(active.getString("EXPIRYDATE")) || DateUtil.compareDate(active.getString("EXPIRYDATE"),DateUtil.getDay())){
|
if (DateUtil.compareDate(active.getString("EXPIRYDATE"), DateUtil.getDay())) {
|
||||||
active.put("VALIDSTATUS","1");
|
active.put("VALIDSTATUS", "0");
|
||||||
} else if (DateUtil.compareDate(DateUtil.getDay(),active.getString("EXPIRYDATE"))) {
|
} else {
|
||||||
active.put("VALIDSTATUS","0");
|
active.put("VALIDSTATUS", "1");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
map.put("varList", varList);
|
map.put("varList", varList);
|
||||||
|
|
|
@ -41,11 +41,14 @@ public class TrafficSafetyManualController extends BaseController {
|
||||||
pd.put("COMPLETIONSTATUS", "0");
|
pd.put("COMPLETIONSTATUS", "0");
|
||||||
pd.put("ISDELETE", "0");
|
pd.put("ISDELETE", "0");
|
||||||
|
|
||||||
if (DateUtil.compareDate(DateUtil.getDay(), pd.getString("EXPIRYDATE"))) {
|
pd.put("EXPIRYDATE", "");
|
||||||
|
pd.put("VALIDSTATUS", "");
|
||||||
|
|
||||||
|
/*if (DateUtil.compareDate(DateUtil.getDay(), pd.getString("EXPIRYDATE"))) {
|
||||||
pd.put("VALIDSTATUS", "0");
|
pd.put("VALIDSTATUS", "0");
|
||||||
} else {
|
} else {
|
||||||
pd.put("VALIDSTATUS", "1");
|
pd.put("VALIDSTATUS", "1");
|
||||||
}
|
}*/
|
||||||
String ffile = DateUtil.getDays();
|
String ffile = DateUtil.getDays();
|
||||||
|
|
||||||
if (file != null && StringUtils.isNotBlank(pd.getString("CREATORNAME"))){
|
if (file != null && StringUtils.isNotBlank(pd.getString("CREATORNAME"))){
|
||||||
|
@ -87,11 +90,11 @@ public class TrafficSafetyManualController extends BaseController {
|
||||||
pd.put("ISDELETE", "0");
|
pd.put("ISDELETE", "0");
|
||||||
|
|
||||||
|
|
||||||
if(!StringUtils.isEmpty(pd.getString("EXPIRYDATE")) && DateUtil.compareDate(pd.getString("EXPIRYDATE"),DateUtil.getDay())) {
|
/*if(!StringUtils.isEmpty(pd.getString("EXPIRYDATE")) && DateUtil.compareDate(pd.getString("EXPIRYDATE"),DateUtil.getDay())) {
|
||||||
pd.put("VALIDSTATUS","1");
|
pd.put("VALIDSTATUS","1");
|
||||||
} else if (DateUtil.compareDate(DateUtil.getDay(),pd.getString("EXPIRYDATE"))) {
|
} else if (DateUtil.compareDate(DateUtil.getDay(),pd.getString("EXPIRYDATE"))) {
|
||||||
pd.put("VALIDSTATUS","0");
|
pd.put("VALIDSTATUS","0");
|
||||||
}
|
}*/
|
||||||
|
|
||||||
String ffile = DateUtil.getDays();
|
String ffile = DateUtil.getDays();
|
||||||
|
|
||||||
|
@ -135,13 +138,6 @@ public class TrafficSafetyManualController extends BaseController {
|
||||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); // 运输企业
|
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); // 运输企业
|
||||||
page.setPd(pd);
|
page.setPd(pd);
|
||||||
List<PageData> varList = safetyManualService.listForSafetyManuallist(page);
|
List<PageData> varList = safetyManualService.listForSafetyManuallist(page);
|
||||||
varList.forEach(manual -> {
|
|
||||||
if(DateUtil.getDay().equals(manual.getString("EXPIRYDATE")) || DateUtil.compareDate(manual.getString("EXPIRYDATE"),DateUtil.getDay())){
|
|
||||||
manual.put("VALIDSTATUS","1");
|
|
||||||
} else if (DateUtil.compareDate(DateUtil.getDay(),manual.getString("EXPIRYDATE"))) {
|
|
||||||
manual.put("VALIDSTATUS","0");
|
|
||||||
}
|
|
||||||
});
|
|
||||||
map.put("varList", varList);
|
map.put("varList", varList);
|
||||||
map.put("page", page);
|
map.put("page", page);
|
||||||
map.put("result", errInfo);
|
map.put("result", errInfo);
|
||||||
|
|
|
@ -5,7 +5,9 @@ import com.zcloud.entity.Page;
|
||||||
import com.zcloud.entity.PageData;
|
import com.zcloud.entity.PageData;
|
||||||
import com.zcloud.service.comprehensive.TrafficSafetyMeetingRecipienService;
|
import com.zcloud.service.comprehensive.TrafficSafetyMeetingRecipienService;
|
||||||
import com.zcloud.service.comprehensive.TrafficSafetyMeetingService;
|
import com.zcloud.service.comprehensive.TrafficSafetyMeetingService;
|
||||||
|
import com.zcloud.service.system.UsersService;
|
||||||
import com.zcloud.util.*;
|
import com.zcloud.util.*;
|
||||||
|
import freemarker.template.SimpleDate;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
|
@ -14,9 +16,11 @@ import org.springframework.web.bind.annotation.RequestParam;
|
||||||
import org.springframework.web.bind.annotation.ResponseBody;
|
import org.springframework.web.bind.annotation.ResponseBody;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
|
||||||
@Controller
|
@Controller
|
||||||
@RequestMapping("/safetymeeting")
|
@RequestMapping("/safetymeeting")
|
||||||
public class TrafficSafetyMeetingController extends BaseController {
|
public class TrafficSafetyMeetingController extends BaseController {
|
||||||
|
@ -28,6 +32,9 @@ public class TrafficSafetyMeetingController extends BaseController {
|
||||||
@Autowired
|
@Autowired
|
||||||
private Smb smb;
|
private Smb smb;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private UsersService usersService;
|
||||||
|
|
||||||
@RequestMapping(value = "/add")
|
@RequestMapping(value = "/add")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public Object add(@RequestParam(value="FFILE",required=false) MultipartFile file,@RequestParam(value="VVIDEO",required=false) MultipartFile videoFile) throws Exception {
|
public Object add(@RequestParam(value="FFILE",required=false) MultipartFile file,@RequestParam(value="VVIDEO",required=false) MultipartFile videoFile) throws Exception {
|
||||||
|
@ -85,15 +92,43 @@ public class TrafficSafetyMeetingController extends BaseController {
|
||||||
Date now = new Date();
|
Date now = new Date();
|
||||||
Date meetingStart = DateUtil.fomatDate(dates[0].trim());
|
Date meetingStart = DateUtil.fomatDate(dates[0].trim());
|
||||||
Date meetingEnd = DateUtil.fomatDate(dates[1].trim());
|
Date meetingEnd = DateUtil.fomatDate(dates[1].trim());
|
||||||
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||||
|
Date toDay = sdf.parse(sdf.format(now));
|
||||||
|
Date startDate = sdf.parse(sdf.format(meetingStart));
|
||||||
|
Date endDate = sdf.parse(sdf.format(meetingEnd));
|
||||||
|
|
||||||
// 判断会议状态并更新MEETING_STATUS
|
// 如果当前时间还没到startDate
|
||||||
|
if (toDay.before(startDate)) {
|
||||||
|
pd.put("MEETING_STATUS", "0");
|
||||||
|
}
|
||||||
|
// 如果当前时间已经超过startDate且还没到endDate
|
||||||
|
else if ((toDay.after(startDate) || toDay.equals(startDate)) && (toDay.before(endDate) || toDay.equals(endDate))) {
|
||||||
|
pd.put("MEETING_STATUS", "1");
|
||||||
|
}
|
||||||
|
// 如果当前时间超过endDate
|
||||||
|
else if (toDay.after(endDate)) {
|
||||||
|
pd.put("MEETING_STATUS", "2");
|
||||||
|
}
|
||||||
|
else if(toDay.equals(startDate) || now.equals(endDate)) {
|
||||||
|
pd.put("MEETING_STATUS", "1");
|
||||||
|
}
|
||||||
|
|
||||||
|
/*// 判断会议状态并更新MEETING_STATUS
|
||||||
String status = meetingEnd.before(now) ? "2" : (meetingStart.after(now) ? "0" : "1");
|
String status = meetingEnd.before(now) ? "2" : (meetingStart.after(now) ? "0" : "1");
|
||||||
pd.put("MEETING_STATUS", status);
|
pd.put("MEETING_STATUS", status);*/
|
||||||
|
}
|
||||||
|
if(StringUtils.equals(pd.getString("allStatus"), "1")) {
|
||||||
|
PageData data = new PageData();
|
||||||
|
data.put("CORPINFO_ID", pd.getString("CORPINFO_ID"));
|
||||||
|
List<PageData> allUser = usersService.getAllUser(data);
|
||||||
|
String userIds = "";
|
||||||
|
for (PageData pageData : allUser) {
|
||||||
|
userIds = userIds + pageData.getString("USER_ID") + ",";
|
||||||
|
}
|
||||||
|
userIds = userIds.substring(0, userIds.length() - 1);
|
||||||
|
pd.put("PERSON_ID", userIds);
|
||||||
}
|
}
|
||||||
/*pd.put("MEETING_DATE_START", pd.getString("MEETING_DATE_START") + " 00:00:00");
|
|
||||||
pd.put("MEETING_DATE_END", pd.getString("MEETING_DATE_END") + " 23:59:59");*/
|
|
||||||
trafficSafetyMeetingService.save(pd);
|
trafficSafetyMeetingService.save(pd);
|
||||||
|
|
||||||
String[] personIds = pd.getString("PERSON_ID").split(",");
|
String[] personIds = pd.getString("PERSON_ID").split(",");
|
||||||
for (String personId : personIds) {
|
for (String personId : personIds) {
|
||||||
pd.put("CREATOR", Jurisdiction.getUSER_ID()); // 创建人id
|
pd.put("CREATOR", Jurisdiction.getUSER_ID()); // 创建人id
|
||||||
|
@ -130,21 +165,18 @@ public class TrafficSafetyMeetingController extends BaseController {
|
||||||
Date startDate = DateUtil.fomatDate(start);
|
Date startDate = DateUtil.fomatDate(start);
|
||||||
Date endDate = DateUtil.fomatDate(end);
|
Date endDate = DateUtil.fomatDate(end);
|
||||||
|
|
||||||
// 如果当前时间还没到startDate
|
// 如果当前时间还没到startDate // 未开始
|
||||||
if (date.before(startDate)) {
|
if (date.before(startDate)) {
|
||||||
item.put("MEETING_STATUS", "0");
|
item.put("MEETING_STATUS", "0");
|
||||||
}
|
}
|
||||||
// 如果当前时间已经超过startDate且还没到endDate
|
// 如果当前时间已经超过startDate且还没到endDate // 进行中
|
||||||
else if (date.after(startDate) && date.before(endDate)) {
|
else if ((date.after(startDate) || date.equals(startDate)) && (date.before(endDate) || date.equals(endDate))) {
|
||||||
item.put("MEETING_STATUS", "1");
|
item.put("MEETING_STATUS", "1");
|
||||||
}
|
}
|
||||||
// 如果当前时间超过endDate
|
// 如果当前时间超过endDate
|
||||||
else if (date.after(endDate)) {
|
else if (date.after(endDate)) { // 已过期
|
||||||
item.put("MEETING_STATUS", "2");
|
item.put("MEETING_STATUS", "2");
|
||||||
}
|
}
|
||||||
else if (date.equals(startDate) && date.equals(endDate)){
|
|
||||||
item.put("MEETING_STATUS", "1");
|
|
||||||
}
|
|
||||||
String meetingDate = start + "至" + end;
|
String meetingDate = start + "至" + end;
|
||||||
item.put("MEETING_DATE", meetingDate);
|
item.put("MEETING_DATE", meetingDate);
|
||||||
}
|
}
|
||||||
|
|
|
@ -131,15 +131,14 @@ public class TrafficSecurityManagementAgreementController extends BaseController
|
||||||
|
|
||||||
page.setPd(pd);
|
page.setPd(pd);
|
||||||
List<PageData> varList = managementAgreementService.listForManagementAgreementlist(page);
|
List<PageData> varList = managementAgreementService.listForManagementAgreementlist(page);
|
||||||
|
varList.stream().anyMatch(data -> {
|
||||||
/*varList.stream().anyMatch(data -> {
|
|
||||||
if (DateUtil.getDay().equals(data.getString("EXPIRYDATE")) || DateUtil.compareDate(data.getString("EXPIRYDATE"), DateUtil.getDay())) {
|
if (DateUtil.getDay().equals(data.getString("EXPIRYDATE")) || DateUtil.compareDate(data.getString("EXPIRYDATE"), DateUtil.getDay())) {
|
||||||
data.put("VALIDSTATUS", "1");
|
data.put("VALIDSTATUS", "1");
|
||||||
} else {
|
} else {
|
||||||
data.put("VALIDSTATUS", "0");
|
data.put("VALIDSTATUS", "0");
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
});*/
|
});
|
||||||
map.put("varList", varList);
|
map.put("varList", varList);
|
||||||
map.put("page", page);
|
map.put("page", page);
|
||||||
map.put("result", errInfo);
|
map.put("result", errInfo);
|
||||||
|
|
|
@ -86,6 +86,18 @@ public class TrafficSecurityNoticeController extends BaseController {
|
||||||
pd.put("VIDEO_NAME",pd.getString("CREATORNAME"));
|
pd.put("VIDEO_NAME",pd.getString("CREATORNAME"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(StringUtils.equals(pd.getString("allStatus"), "1")) {
|
||||||
|
PageData data = new PageData();
|
||||||
|
data.put("CORPINFO_ID", pd.getString("CORPINFO_ID"));
|
||||||
|
List<PageData> allUser = usersService.getAllUser(data);
|
||||||
|
System.out.println("allUser = " + allUser);
|
||||||
|
String userIds = "";
|
||||||
|
for (PageData pageData : allUser) {
|
||||||
|
userIds = userIds + pageData.getString("USER_ID") + ",";
|
||||||
|
}
|
||||||
|
userIds = userIds.substring(0, userIds.length() - 1);
|
||||||
|
pd.put("PERSON_ID", userIds);
|
||||||
|
}
|
||||||
pd.put("SIGNING", "0"); // 签收情况
|
pd.put("SIGNING", "0"); // 签收情况
|
||||||
pd.put("REPLY", "0"); // 回复情况
|
pd.put("REPLY", "0"); // 回复情况
|
||||||
securityNoticeService.save(pd);
|
securityNoticeService.save(pd);
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package com.zcloud.controller.depository;
|
package com.zcloud.controller.depository;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import com.zcloud.controller.base.BaseController;
|
import com.zcloud.controller.base.BaseController;
|
||||||
import com.zcloud.entity.Page;
|
import com.zcloud.entity.Page;
|
||||||
import com.zcloud.entity.PageData;
|
import com.zcloud.entity.PageData;
|
||||||
|
@ -8,8 +9,10 @@ import com.zcloud.service.depository.TextLibraryService;
|
||||||
import com.zcloud.util.Jurisdiction;
|
import com.zcloud.util.Jurisdiction;
|
||||||
import com.zcloud.util.Tools;
|
import com.zcloud.util.Tools;
|
||||||
import com.zcloud.util.Warden;
|
import com.zcloud.util.Warden;
|
||||||
|
import org.apache.commons.lang.ObjectUtils;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
|
import org.apache.shiro.util.CollectionUtils;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
@ -18,10 +21,7 @@ import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -109,32 +109,79 @@ public class TextLibraryController extends BaseController {
|
||||||
pd.put("CATEGORY_ID", corp_info.getString("CORP_TYPE4"));
|
pd.put("CATEGORY_ID", corp_info.getString("CORP_TYPE4"));
|
||||||
}
|
}
|
||||||
if (StringUtils.isEmpty(pd.getString("CORPINFO_ID")))
|
if (StringUtils.isEmpty(pd.getString("CORPINFO_ID")))
|
||||||
pd.put("CORPINFO_ID",Jurisdiction.getCORPINFO_ID());
|
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||||
|
|
||||||
if ("3".equals(pd.getString("ASSOCIATION"))) {
|
if ("3".equals(pd.getString("ASSOCIATION"))) {
|
||||||
pd.put("TYPE_ONE", "43ed4012090d4614bb35da60d06c8264");
|
pd.put("TYPE_ONE", "43ed4012090d4614bb35da60d06c8264");
|
||||||
pd.put("plan",pd.getString("CATEGORY_ID"));
|
pd.put("plan", pd.getString("CATEGORY_ID"));
|
||||||
pd.put("CATEGORY_ID","");
|
pd.put("CATEGORY_ID", "");
|
||||||
}
|
}
|
||||||
if ("2".equals(pd.getString("ASSOCIATION"))){
|
if ("2".equals(pd.getString("ASSOCIATION"))) {
|
||||||
pd.put("TYPE_ONE", "7158f688d0f34054a28a9275139298df");
|
pd.put("TYPE_ONE", "7158f688d0f34054a28a9275139298df");
|
||||||
}
|
}
|
||||||
if ("1".equals(pd.getString("ASSOCIATION"))){
|
if ("1".equals(pd.getString("ASSOCIATION"))) {
|
||||||
pd.put("TYPE_ONE", "691346658ed744a1bda2ed3a755f606c");
|
pd.put("TYPE_ONE", "691346658ed744a1bda2ed3a755f606c");
|
||||||
}
|
}
|
||||||
if ("0".equals(pd.getString("ASSOCIATION"))){
|
if ("0".equals(pd.getString("ASSOCIATION"))) {
|
||||||
pd.put("TYPE_ONE", "8051d985a2bc406a83ea9360b64182b2");
|
pd.put("TYPE_ONE", "8051d985a2bc406a83ea9360b64182b2");
|
||||||
}
|
}
|
||||||
|
|
||||||
pd.put("STATUS","1");
|
pd.put("STATUS", "1");
|
||||||
|
|
||||||
page.setPd(pd);
|
page.setPd(pd);
|
||||||
List<PageData> varList = textlibraryService.list(page);
|
List<PageData> varList = textlibraryService.list(page);
|
||||||
|
varList = varList.stream().distinct().collect(Collectors.toList());
|
||||||
|
|
||||||
|
// 行业集合
|
||||||
|
List<PageData> craftList = new ArrayList<>();
|
||||||
|
// 返回的行业集合
|
||||||
|
List<PageData> resultList = new ArrayList<>();
|
||||||
|
List<PageData> dataList = new ArrayList<>();
|
||||||
|
for (PageData data : varList) {
|
||||||
|
craftList = (List<PageData>) data.get("SPECIFICATION_TYPES");
|
||||||
|
}
|
||||||
|
if (!CollectionUtils.isEmpty(craftList)) {
|
||||||
|
for (PageData data : craftList) {
|
||||||
|
PageData parentData = findParentData(craftList, data);
|
||||||
|
if (!ObjectUtil.isEmpty(parentData)) {
|
||||||
|
dataList.add(parentData);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
resultList = craftList.stream()
|
||||||
|
.filter(data -> dataList.stream()
|
||||||
|
.noneMatch(craft -> StringUtils.equals(data.getString("CATEGORY_ID"), craft.getString("CATEGORY_ID"))))
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
PageData data = resultList.get(0);
|
||||||
|
if (!ObjectUtil.isEmpty(data)) {
|
||||||
|
findChildren(craftList, data, resultList);
|
||||||
|
}
|
||||||
|
for (PageData pageData : varList) {
|
||||||
|
pageData.put("SPECIFICATION_TYPES", resultList);
|
||||||
|
}
|
||||||
map.put("varList", varList);
|
map.put("varList", varList);
|
||||||
map.put("page", page);
|
map.put("page", page);
|
||||||
map.put("result", "success");
|
map.put("result", "success");
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
private PageData findParentData(List<PageData> craftList, PageData data) {
|
||||||
|
PageData data1 = null;
|
||||||
|
for (PageData craft : craftList) {
|
||||||
|
if (craft.getString("CATEGORY_ID").contains(data.getString("PARENT_ID"))) {
|
||||||
|
data1 = data;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return data1;
|
||||||
|
}
|
||||||
|
private List<PageData> findChildren(List<PageData> craftList, PageData data, List<PageData> resultList) {
|
||||||
|
for (PageData pageData : craftList) {
|
||||||
|
if (pageData.getString("PARENT_ID").equals(data.getString("CATEGORY_ID"))) {
|
||||||
|
resultList.add(pageData);
|
||||||
|
findChildren(craftList, pageData, resultList);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除
|
* 删除
|
||||||
|
@ -291,11 +338,11 @@ public class TextLibraryController extends BaseController {
|
||||||
|
|
||||||
@RequestMapping("getTextInfo")
|
@RequestMapping("getTextInfo")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public Object getTextInfo() throws Exception{
|
public Object getTextInfo() throws Exception {
|
||||||
Map<String, Object> response = new HashMap<>();
|
Map<String, Object> response = new HashMap<>();
|
||||||
try {
|
try {
|
||||||
PageData text_info = textlibraryService.getTextInfo(this.getPageData());
|
PageData text_info = textlibraryService.getTextInfo(this.getPageData());
|
||||||
response.put("info",text_info);
|
response.put("info", text_info);
|
||||||
response.put("code", "0");
|
response.put("code", "0");
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
@ -307,9 +354,9 @@ public class TextLibraryController extends BaseController {
|
||||||
}
|
}
|
||||||
|
|
||||||
@RequestMapping("exportWord")
|
@RequestMapping("exportWord")
|
||||||
public void exportWord(HttpServletResponse response) throws Exception{
|
public void exportWord(HttpServletResponse response) throws Exception {
|
||||||
try {
|
try {
|
||||||
textlibraryService.exportWord(this.getPageData(),response);
|
textlibraryService.exportWord(this.getPageData(), response);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
@ -317,7 +364,7 @@ public class TextLibraryController extends BaseController {
|
||||||
|
|
||||||
@RequestMapping("copyToOperate")
|
@RequestMapping("copyToOperate")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public Object copyToOperate() throws Exception{
|
public Object copyToOperate() throws Exception {
|
||||||
Map<String, Object> response = new HashMap<>();
|
Map<String, Object> response = new HashMap<>();
|
||||||
try {
|
try {
|
||||||
textlibraryService.copyToOperate(this.getPageData());
|
textlibraryService.copyToOperate(this.getPageData());
|
||||||
|
|
|
@ -604,8 +604,8 @@ public class FreighttTrailerController extends BaseController {
|
||||||
if(!StringUtils.isEmpty(pd.getString("TRAFFIC_TYPE")) && pd.getString("TRAFFIC_TYPE").equals("1")) {
|
if(!StringUtils.isEmpty(pd.getString("TRAFFIC_TYPE")) && pd.getString("TRAFFIC_TYPE").equals("1")) {
|
||||||
// 营运车辆
|
// 营运车辆
|
||||||
List<PageData> operatingList = operatingVehiclesService.operationVehicleList(pd.getString("CORPINFO_ID"));
|
List<PageData> operatingList = operatingVehiclesService.operationVehicleList(pd.getString("CORPINFO_ID"));
|
||||||
operatingList = operatingList.stream().parallel().filter(data -> "0".equals(data.getString("ISASSIGNED"))).collect(Collectors.toList())
|
/*operatingList = operatingList.stream().parallel().filter(data -> "0".equals(data.getString("ISASSIGNED"))).collect(Collectors.toList())
|
||||||
.stream().filter(data -> "0".equals(data.getString("ISSCRAP"))).collect(Collectors.toList());
|
.stream().filter(data -> "0".equals(data.getString("ISSCRAP"))).collect(Collectors.toList());*/
|
||||||
page.setPd(pd);
|
page.setPd(pd);
|
||||||
List<PageData> insAnnually = inspectAnnuallyService.annuallyList(page);
|
List<PageData> insAnnually = inspectAnnuallyService.annuallyList(page);
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package com.zcloud.controller.system;
|
package com.zcloud.controller.system;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import com.zcloud.controller.base.BaseController;
|
import com.zcloud.controller.base.BaseController;
|
||||||
import com.zcloud.entity.PageData;
|
import com.zcloud.entity.PageData;
|
||||||
import com.zcloud.entity.system.User;
|
import com.zcloud.entity.system.User;
|
||||||
|
@ -9,6 +10,7 @@ import com.zcloud.service.offduty.OffDutyService;
|
||||||
import com.zcloud.service.system.*;
|
import com.zcloud.service.system.*;
|
||||||
import com.zcloud.util.*;
|
import com.zcloud.util.*;
|
||||||
import net.sf.json.JSONObject;
|
import net.sf.json.JSONObject;
|
||||||
|
import org.apache.commons.lang.ObjectUtils;
|
||||||
import org.apache.shiro.SecurityUtils;
|
import org.apache.shiro.SecurityUtils;
|
||||||
import org.apache.shiro.authc.*;
|
import org.apache.shiro.authc.*;
|
||||||
import org.apache.shiro.crypto.hash.SimpleHash;
|
import org.apache.shiro.crypto.hash.SimpleHash;
|
||||||
|
@ -354,6 +356,9 @@ public class LoginController extends BaseController {
|
||||||
dpd.put("DEPARTMENT_ID", pd.getString("DEPARTMENT_ID"));
|
dpd.put("DEPARTMENT_ID", pd.getString("DEPARTMENT_ID"));
|
||||||
dpd = departmentService.findById(dpd);
|
dpd = departmentService.findById(dpd);
|
||||||
}
|
}
|
||||||
|
if(!ObjectUtil.isEmpty(dpd)) {
|
||||||
|
dpd.put("FOREIGNPERSONNEL", "0");
|
||||||
|
}
|
||||||
if (dpd!=null && "1".equals(dpd.getString("FOREIGNPERSONNEL"))) {
|
if (dpd!=null && "1".equals(dpd.getString("FOREIGNPERSONNEL"))) {
|
||||||
return ReturnMap.error("账号密码不正确");
|
return ReturnMap.error("账号密码不正确");
|
||||||
}
|
}
|
||||||
|
|
|
@ -3386,4 +3386,19 @@ public class UsersController extends BaseController {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@RequestMapping("/getAllUser")
|
||||||
|
@ResponseBody
|
||||||
|
public Object getAllUser() throws Exception {
|
||||||
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
|
String errInfo = "success";
|
||||||
|
PageData pd = new PageData();
|
||||||
|
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||||
|
List<PageData> userList = usersService.getAllUser(pd); //列出用户列表
|
||||||
|
map.put("varList", userList);
|
||||||
|
map.put("pd", pd);
|
||||||
|
map.put("result", errInfo);
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -299,4 +299,6 @@ public interface UsersMapper {
|
||||||
List<PageData> getPractitionerSelectList(PageData pd);
|
List<PageData> getPractitionerSelectList(PageData pd);
|
||||||
|
|
||||||
List<PageData> listUserByIds(String[] personIds);
|
List<PageData> listUserByIds(String[] personIds);
|
||||||
|
|
||||||
|
List<PageData> getAllUser(PageData pd);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package com.zcloud.service.depository.impl;
|
package com.zcloud.service.depository.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
import com.zcloud.entity.Page;
|
import com.zcloud.entity.Page;
|
||||||
import com.zcloud.entity.PageData;
|
import com.zcloud.entity.PageData;
|
||||||
import com.zcloud.mapper.datasource.corp.CorpInfoMapper;
|
import com.zcloud.mapper.datasource.corp.CorpInfoMapper;
|
||||||
|
@ -9,17 +10,16 @@ import com.zcloud.mapper.datasource.depository.TextInfoMapper;
|
||||||
import com.zcloud.mapper.datasource.depository.TextLibraryMapper;
|
import com.zcloud.mapper.datasource.depository.TextLibraryMapper;
|
||||||
import com.zcloud.service.depository.TextLibraryService;
|
import com.zcloud.service.depository.TextLibraryService;
|
||||||
import com.zcloud.util.*;
|
import com.zcloud.util.*;
|
||||||
|
import org.apache.commons.lang.ArrayUtils;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
|
import org.omg.CORBA.VM_ABSTRACT;
|
||||||
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.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.Date;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Optional;
|
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -92,6 +92,7 @@ public class TextLibraryServiceImpl implements TextLibraryService {
|
||||||
*/
|
*/
|
||||||
public List<PageData> list(Page page) throws Exception {
|
public List<PageData> list(Page page) throws Exception {
|
||||||
List<PageData> list = textlibraryMapper.datalistPage(page);
|
List<PageData> list = textlibraryMapper.datalistPage(page);
|
||||||
|
list = list.stream().parallel().distinct().collect(Collectors.toList());
|
||||||
for (PageData entity : list) {
|
for (PageData entity : list) {
|
||||||
List<PageData> _labels = libraryLabelsMapper.findBylibraryId(entity);
|
List<PageData> _labels = libraryLabelsMapper.findBylibraryId(entity);
|
||||||
// 安全操作规程
|
// 安全操作规程
|
||||||
|
|
|
@ -373,4 +373,6 @@ public interface UsersService {
|
||||||
List<PageData> getPractitionerSelectList(PageData pd) throws Exception;
|
List<PageData> getPractitionerSelectList(PageData pd) throws Exception;
|
||||||
|
|
||||||
List<PageData> listUserByIds(String[] personIds);
|
List<PageData> listUserByIds(String[] personIds);
|
||||||
|
|
||||||
|
List<PageData> getAllUser(PageData pd);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1363,4 +1363,9 @@ public class UsersServiceImpl implements UsersService {
|
||||||
public List<PageData> listUserByIds(String[] personIds) {
|
public List<PageData> listUserByIds(String[] personIds) {
|
||||||
return usersMapper.listUserByIds(personIds);
|
return usersMapper.listUserByIds(personIds);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<PageData> getAllUser(PageData pd) {
|
||||||
|
return usersMapper.getAllUser(pd);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -168,7 +168,8 @@
|
||||||
f.*,
|
f.*,
|
||||||
u.NAME as NAME,
|
u.NAME as NAME,
|
||||||
u.PHONE as USERNAME,
|
u.PHONE as USERNAME,
|
||||||
u.USERAVATARURL
|
u.USERAVATARPREFIX,
|
||||||
|
CONVERT (u.USERAVATARURL USING utf8) AS USERAVATARURL_CONVERT
|
||||||
from
|
from
|
||||||
<include refid="tableName"></include> f
|
<include refid="tableName"></include> f
|
||||||
left join sys_user u on f.PRACTITIONER = u.USER_ID
|
left join sys_user u on f.PRACTITIONER = u.USER_ID
|
||||||
|
|
|
@ -112,13 +112,26 @@
|
||||||
where
|
where
|
||||||
f.BUS_LIBRARY_LABELS_ID = #{BUS_LIBRARY_LABELS_ID}
|
f.BUS_LIBRARY_LABELS_ID = #{BUS_LIBRARY_LABELS_ID}
|
||||||
</select>
|
</select>
|
||||||
<select id="findBylibraryId" parameterType="pd" resultType="pd">
|
|
||||||
|
<!--<select id="findBylibraryId" parameterType="pd" resultType="pd">
|
||||||
select
|
select
|
||||||
<include refid="Field"></include>
|
<include refid="Field"></include>,
|
||||||
|
getDictFullName(f.CATEGORY_ID) as craftType
|
||||||
from
|
from
|
||||||
<include refid="tableName"></include> f
|
<include refid="tableName"></include> f
|
||||||
where
|
where
|
||||||
f.BUS_TEXT_LIBRARY_ID = #{BUS_TEXT_LIBRARY_ID}
|
f.BUS_TEXT_LIBRARY_ID = #{BUS_TEXT_LIBRARY_ID}
|
||||||
|
</select>-->
|
||||||
|
|
||||||
|
<select id="findBylibraryId" parameterType="pd" resultType="pd">
|
||||||
|
select
|
||||||
|
<include refid="Field"></include>,
|
||||||
|
d.PARENT_ID
|
||||||
|
from
|
||||||
|
<include refid="tableName"></include> f
|
||||||
|
LEFT JOIN sys_dictionaries as d on d.DICTIONARIES_ID = f.CATEGORY_ID
|
||||||
|
where
|
||||||
|
f.BUS_TEXT_LIBRARY_ID = #{BUS_TEXT_LIBRARY_ID}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<!-- 列表 -->
|
<!-- 列表 -->
|
||||||
|
|
|
@ -1967,4 +1967,39 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</foreach>
|
</foreach>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="getAllUser" resultType="com.zcloud.entity.PageData">
|
||||||
|
select u.USER_ID,
|
||||||
|
u.USERNAME,
|
||||||
|
u.PASSWORD,
|
||||||
|
u.LAST_LOGIN,
|
||||||
|
u.NAME,
|
||||||
|
u.SEX,
|
||||||
|
u.IP,
|
||||||
|
u.EMAIL,
|
||||||
|
u.NUMBER,
|
||||||
|
u.PHONE,
|
||||||
|
u.ISMAIN,
|
||||||
|
u.PUSH_CID,
|
||||||
|
r.ROLE_ID,
|
||||||
|
r.ROLE_NAME,
|
||||||
|
d.NAME as DEPARTMENT_NAME,
|
||||||
|
p.NAME AS POST_NAME,
|
||||||
|
c.PERSONNEL_TYPE,
|
||||||
|
sd.NAME AS PERSONNEL_TYPE_NAME -- 添加的字段,表示人员类型名称
|
||||||
|
from <include refid="tableName"></include> u
|
||||||
|
left join SYS_ROLE r on u.ROLE_ID = r.ROLE_ID
|
||||||
|
left join OA_DEPARTMENT d on d.DEPARTMENT_ID=u.DEPARTMENT_ID
|
||||||
|
left join SYS_POST p on p.POST_ID=u.POST_ID
|
||||||
|
left join SYS_USERINFO c on c.USER_ID=u.USER_ID
|
||||||
|
left join sys_dictionaries sd on sd.DICTIONARIES_ID = c.PERSONNEL_TYPE AND sd.PARENT_ID = '0b62f92b0b624aab8e89a77304a64d5e'
|
||||||
|
where
|
||||||
|
u.ISDELETE = 0 and
|
||||||
|
u.USERNAME != 'admin'
|
||||||
|
<if test="CORPINFO_ID != null and CORPINFO_ID != ''"><!-- 关键词检索 -->
|
||||||
|
AND
|
||||||
|
u.CORPINFO_ID = #{CORPINFO_ID}
|
||||||
|
</if>
|
||||||
|
order by d.LEVEL asc ,d.DEP_ORDER,d.DEPARTMENT_ID asc, u.SORT asc,u.USER_ID
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
Loading…
Reference in New Issue