Merge remote-tracking branch 'origin/dev' into dev

pull/4/head
fangjiakai 2024-02-27 10:30:28 +08:00
commit 5d8f3acda0
25 changed files with 372 additions and 58 deletions

View File

@ -8,6 +8,7 @@ import com.zcloud.entity.PageData;
import com.zcloud.entity.system.Dictionaries;
import com.zcloud.logs.LogAnno;
import com.zcloud.service.bus.HiddenUserService;
import com.zcloud.service.bus.NoticeCorpUtil;
import com.zcloud.service.check.ListManagerService;
import com.zcloud.service.check.RecordItemService;
import com.zcloud.service.corp.CorpInfoService;
@ -17,10 +18,7 @@ import com.zcloud.service.hidden.HiddenService;
import com.zcloud.service.inspection.SafetyEnvironmentalService;
import com.zcloud.service.sms.SMSLogService;
import com.zcloud.service.sms.SMSManagementService;
import com.zcloud.service.system.DepartmentService;
import com.zcloud.service.system.DictionariesService;
import com.zcloud.service.system.ImgFilesService;
import com.zcloud.service.system.UsersService;
import com.zcloud.service.system.*;
import com.zcloud.util.*;
import com.zcloud.util.message.MessageService;
import net.sf.json.JSONArray;
@ -35,6 +33,7 @@ import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.text.SimpleDateFormat;
import java.util.*;
@ -46,6 +45,10 @@ import java.util.*;
@RequestMapping("/hidden")
public class HiddenController extends BaseController {
@Autowired
private FHlogService FHLOG;//日志记录
@Autowired
private NoticeCorpUtil noticeUtil;
@Autowired
private HiddenService hiddenService;
@Autowired
@ -1974,6 +1977,7 @@ public class HiddenController extends BaseController {
pd.put("RECTIFICATIONTYPE","2");
if (list.size() == 0) {
inspection.put("INSPECTION_STATUS", "5"); // 指派完成
pd.put("STATE", "1"); //未整改
} else {
inspection.put("INSPECTION_STATUS", "4"); // 指派中
}
@ -2123,4 +2127,102 @@ public class HiddenController extends BaseController {
map.put("result", errInfo);
return map;
}
/**
*
*
* @param
* @throws Exception
*/
@RequestMapping(value = "/finalcheck")
@ResponseBody
public Object finalcheck() throws Exception {
// 获取IP
HttpServletRequest request = this.getRequest();
String ip = "";
if (request.getHeader("x-forwarded-for") == null) {
ip = request.getRemoteAddr();
} else {
ip = request.getHeader("x-forwarded-for");
}
Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
pd.put("ACCEPTSTEP", 7);
pd.put("x",false);
boolean success = false;
// List<PageData> list2 = hiddenService.listOtherNotAccept4pc(pd);
// success = (boolean) pd.get("x");
// if (success) {
// return null;
// }else {
// return null;
// }
pd.put("FINAL_CHECKOR", Jurisdiction.getUSER_ID());
hiddenService.finalcheck(pd);
// 是
if ("1".equals(pd.get("FINAL_CHECK").toString())) {
if (Tools.notEmpty(pd.getString("INSPECTION_ID"))) { //安全环保检查验收
pd.put("ACCEPTSTEP", 7);
List<PageData> list = hiddenService.listOtherNotAccept4pc(pd);
if (list.size() == 0) {
PageData inspection = new PageData();
inspection.put("INSPECTION_ID", pd.getString("INSPECTION_ID"));
inspection.put("OPERATOR", Jurisdiction.getUSER_ID());
inspection.put("OPERATTIME", DateUtil.date2Str(new Date()));
inspection.put("INSPECTION_STATUS", "8"); // 已验收
safetyenvironmentalService.editStatus(inspection);
}
}
} else {
// 否
PageData pd2 = new PageData();
pd2.put("FOREIGN_KEY", pd.get("HIDDEN_ID"));
pd2.put("TYPE", "4");
List<PageData> zgImgs = imgFilesService.listAll(pd2);
for (PageData pageData : zgImgs) {
imgFilesService.delete(pageData);
if (Tools.notEmpty(pageData.getString("FILEPATH"))) {
smb.deleteFile(pageData.getString("FILEPATH"));
}
}
PageData hidden = new PageData();
hidden.put("HIDDEN_ID", pd.get("HIDDEN_ID"));
hidden.put("STATE", "101"); //修改隐患表状态为验收打回
hiddenService.changeState(hidden);
PageData inspection = new PageData();
inspection.put("INSPECTION_ID", pd.getString("INSPECTION_ID"));
inspection.put("OPERATOR", Jurisdiction.getUSER_ID());
inspection.put("OPERATTIME", DateUtil.date2Str(new Date()));
inspection.put("INSPECTION_STATUS", "3"); // 安全环保检查打回到归档,隐患待指派
safetyenvironmentalService.editStatus(inspection);
inspection.put("SENDER_ID", Jurisdiction.getUSER_ID());
inspection.put("SENDER_NAME", Jurisdiction.getName());
noticeUtil.SE_Repulse(inspection);
// hiddenExamineService.deleteByHiddenId(pd); 如果验收打回删除隐患相关信息
FHLOG.save(Jurisdiction.getName(), "删除隐患ID:" + pd.getString("HIDDEN_ID") + "关于hiddenexamine表数据", ip);
// hidden.put("HIDDENEXAMINE_ID",this.get32UUID());
// hidden.put("EXAMINE",pd.get("CONTENT"));//打回意见
// hidden.put("CREATOR",Jurisdiction.getUSER_ID());
// hidden.put("CREATTIME",DateUtil.date2Str(new Date()));
// hidden.put("OPERATOR",Jurisdiction.getUSER_ID());
// hidden.put("OPERATTIME",DateUtil.date2Str(new Date()));
// hidden.put("TYPE",3);//验收打回
// hidden.put("STATE",-1);//验收打回变成初始状态-1
// hiddenExamineService.save(hidden);
}
map.put("check", pd);
map.put("result", errInfo);
return map;
}
}

View File

@ -534,20 +534,26 @@ public class AppKeyprojectCheckController extends BaseController {
return map;
}
/**
*
*
/**
* @param
* @throws Exception
*/
@RequestMapping(value = "/keyProjectCount")
@RequestMapping(value="/keyProjectCount")
@ResponseBody
public Object keyProjectCount() throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
public Object keyProjectCount() throws Exception{
Map<String,Object> map = new HashMap<String,Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
pd = keyprojectHiddenService.keyprojectcount(pd); //根据ID读取
String UserId = pd.getString("UserId");
if(!StringUtils.equals("1",UserId)){
String CORPINFO_ID = pd.getString("CORPINFO_ID");
if(!StringUtils.equals(CORPINFO_ID,"1e6dbbe16004402f8d2c0e52afd9a676")&&!StringUtils.equals(CORPINFO_ID,"3a854eefa7894e06aaa1a2611bca80f6")&&
!StringUtils.equals(CORPINFO_ID,"020578a4c1f04bc692ee25145c2efbe5")&&!StringUtils.equals(CORPINFO_ID,"90966974de3c4b83aca6f8fd6432d5c2")){
pd.put("DeptId",outsourcedService.getDeptId(UserId));
}
}
pd = keyprojectHiddenService.keyprojectcount(pd); //根据ID读取
map.put("pd", pd);
map.put("result", errInfo);
return map;

View File

@ -169,6 +169,7 @@ public class MapSettingController extends BaseController {
}
return returnMap;
}
/**
* @Description:
* @Author: dearLin
@ -189,4 +190,7 @@ public class MapSettingController extends BaseController {
}
return returnMap;
}
}

View File

@ -100,7 +100,7 @@ public class PositAlarmController extends BaseController {
public ReturnMap otherRegionList(Page page) throws Exception {
PageData pageData = this.getPageData();
ReturnMap returnMap = new ReturnMap();
JSONObject body = PLSUtil.getRyRegionList(Jurisdiction.getCORPINFO_ID(), pageData.getString("str"), Integer.parseInt(pageData.getString("currentPage")), Integer.parseInt(pageData.getString("showCount")),Integer.parseInt(pageData.getString("type")));
JSONObject body = PLSUtil.getRyRegionList(Jurisdiction.getCORPINFO_ID(), pageData.getString("str"), Integer.parseInt(pageData.getString("currentPage")), Integer.parseInt(pageData.getString("showCount")), Integer.parseInt(pageData.getString("type")));
if (body != null) {
returnMap.putAll(body);
page.setTotalResult(body.getIntValue("total"));
@ -165,6 +165,7 @@ public class PositAlarmController extends BaseController {
}
return returnMap;
}
/**
* @Description: /region/region/redrawTheArea
* @Author: dearLin
@ -185,6 +186,7 @@ public class PositAlarmController extends BaseController {
}
return returnMap;
}
/**
* @Description: /region/region/redrawTheArea
* @Author: dearLin
@ -418,6 +420,7 @@ public class PositAlarmController extends BaseController {
}
/* 聚集概览 */
/**
* @Description:
* @Author: dearLin
@ -437,6 +440,7 @@ public class PositAlarmController extends BaseController {
}
return returnMap;
}
/**
* @Description:
* @Author: dearLin
@ -474,4 +478,35 @@ public class PositAlarmController extends BaseController {
}
return returnMap;
}
//串岗告警参数
//允许进入人员
@RequestMapping(value = "/getPsnInfo")
@ResponseBody
public ReturnMap getPsnInfo() throws Exception {
PageData pageData = this.getPageData();
ReturnMap returnMap = new ReturnMap();
JSONObject body = PLSUtil.GeneralList("/deploy/psnmgt/getPsnInfo", pageData);
if (body != null) {
returnMap.putAll(body);
}
return returnMap;
}
// 允许进入部门
///deploy/dept/list
@RequestMapping(value = "/getDeptList")
@ResponseBody
public ReturnMap getDeptList() throws Exception {
PageData pageData = this.getPageData();
pageData.put("pageNum", 1);
pageData.put("pageSize", 9999);
ReturnMap returnMap = new ReturnMap();
JSONObject body = PLSUtil.GeneralList("/deploy/dept/list", pageData);
if (body != null) {
returnMap.putAll(body);
}
return returnMap;
}
}

View File

@ -4,9 +4,11 @@ import com.alibaba.fastjson.JSONObject;
import com.zcloud.controller.base.BaseController;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import com.zcloud.service.system.UsersService;
import com.zcloud.util.Jurisdiction;
import com.zcloud.util.PLSUtil;
import com.zcloud.util.ReturnMap;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
@ -22,6 +24,10 @@ import java.util.List;
@RequestMapping("/deploy/card")
public class UserCardController extends BaseController {
@Autowired
private UsersService usersService;
/**
* @Description:
* @Author: dearLin
@ -61,6 +67,8 @@ public class UserCardController extends BaseController {
JSONObject body = PLSUtil.GeneralPut("/deploy/card", pageData, Jurisdiction.getCORPINFO_ID());
if (body != null) {
returnMap.putAll(body);
if (!"200".equals(body.getString("code"))) return ReturnMap.error(body.getString("msg"));
usersService.editUserCardNoByPid(pageData);
}
return returnMap;
}
@ -117,6 +125,8 @@ public class UserCardController extends BaseController {
ReturnMap returnMap = new ReturnMap();
JSONObject body = PLSUtil.GeneralDelete("/deploy/card/", pageData.getString("DATA_IDS"), Jurisdiction.getCORPINFO_ID());
if (body != null) {
if (!"200".equals(body.getString("code"))) return ReturnMap.error(body.getString("msg"));
returnMap.putAll(body);
}
return returnMap;
@ -138,6 +148,11 @@ public class UserCardController extends BaseController {
if (body != null) {
if (!"200".equals(body.getString("code"))) return ReturnMap.error(body.getString("msg"));
returnMap.putAll(body);
// 人员表里给 对应卡号得人 得 卡移除掉
String[] dataIds = pageData.getString("DATA_IDS").split(",");
pageData.put("USER_IDS", dataIds);
pageData.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
usersService.removeCardNoUser(pageData);
}
return returnMap;
}

View File

@ -7,13 +7,11 @@ import com.zcloud.entity.PageData;
import com.zcloud.entity.system.Department;
import com.zcloud.logs.LogAnno;
import com.zcloud.service.check.ListManagerService;
import com.zcloud.service.corp.CorpInfoService;
import com.zcloud.service.system.DepartmentService;
import com.zcloud.service.system.SupervisionDepartmentService;
import com.zcloud.service.system.UsersService;
import com.zcloud.util.DateUtil;
import com.zcloud.util.Jurisdiction;
import com.zcloud.util.ObjectExcelView;
import com.zcloud.util.Tools;
import com.zcloud.util.*;
import net.sf.json.JSONArray;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
@ -37,6 +35,8 @@ public class DepartmentController extends BaseController {
@Autowired
private DepartmentService departmentService;
@Autowired
private CorpInfoService corpInfoService;
@Autowired
private UsersService usersService;
@Autowired
private ListManagerService listManagerService;
@ -56,6 +56,33 @@ public class DepartmentController extends BaseController {
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
String corpinfoId = Jurisdiction.getCORPINFO_ID();
PageData corpPage = new PageData();
corpPage.put("CORPINFO_ID", corpinfoId);
PageData corpInfo = corpInfoService.findById(corpPage);
// {"deptName":"0226-wx","enterpriseId":4,"staffId":"","deptPhone":"","deptAddress":"","remark":"","deptDuty":""}
corpPage.put("enterpriseName",corpInfo.getString("CORP_NAME"));
if (Tools.isEmpty(corpInfo.getString("enterpriseId"))) {
JSONObject body = PLSUtil.GeneralPost("/deploy/enterprise/addDepEnterprise", corpPage, corpinfoId);
if (body != null) {
if (!"200".equals(body.getString("code"))) {
return ReturnMap.error("人员定位系统中部门新增失败");
}
corpPage.put("enterpriseId", body.getString("data"));
corpInfo.put("enterpriseId", body.getString("data"));
corpInfoService.updateEnterpriseId(corpPage);
}
}
PageData dept = new PageData();
dept.put("deptName", pd.getString("NAME"));
dept.put("enterpriseId", corpInfo.get("enterpriseId"));
JSONObject body = PLSUtil.GeneralPost("/deploy/dept", dept, corpinfoId);
if (body != null) {
if (!"200".equals(body.getString("code"))) {
return ReturnMap.error("人员定位系统中部门新增失败");
}
pd.put("deptId", body.getString("data"));
}
pd.put("DEPARTMENT_ID", this.get32UUID()); //主键
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业
departmentService.save(pd);
@ -112,6 +139,15 @@ public class DepartmentController extends BaseController {
errInfo = "havelist";
map.put("msg", "该部门有清单,请先删除清单"); //返回结果
}else{
PageData dept = new PageData();
dept.put("DEPARTMENT_ID",DEPARTMENT_ID);
PageData byId = departmentService.findById(dept);
JSONObject body = PLSUtil.GeneralDelete("/deploy/dept/", byId.getString("deptId"),Jurisdiction.getCORPINFO_ID());
if (body != null) {
if (!"200".equals(body.getString("code"))) {
return ReturnMap.error(body.getString("msg"));
}
}
departmentService.delete(pd); //执行删除
}
map.put("result", errInfo); //返回结果
@ -131,6 +167,15 @@ public class DepartmentController extends BaseController {
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
PageData sfDeptID = new PageData();
sfDeptID.put("deptId", pd.get("deptId"));
sfDeptID.put("deptName", pd.get("NAME"));
JSONObject body = PLSUtil.GeneralPut("/deploy/dept", sfDeptID, Jurisdiction.getCORPINFO_ID());
if (body != null) {
if (!"200".equals(body.getString("code"))) {
return ReturnMap.error("人员定位系统中部门新增失败");
}
}
departmentService.edit(pd);
// 删除旧的监管单位
PageData pd2 = new PageData();

View File

@ -411,18 +411,18 @@ public class UsersController extends BaseController {
PageData pd = this.getPageData();
if (pd.get("USERAVATARURL") != null && !pd.getString("USERAVATARURL").equals("")) {
// if(pd.get("USERAVATARURL")!=null && !pd.getString("USERAVATARURL").equals("")){
// System.out.println("USERAVATARURL原长度"+pd.getString("USERAVATARURL").length());
String USERAVATARURL64 = ImageAnd64Binary.zipBase64(pd.getString("USERAVATARURL"));
// String USERAVATARURL64 = ImageAnd64Binary.zipBase64(pd.getString("USERAVATARURL"));
// System.out.println("USERAVATARURL压缩长度"+USERAVATARURL64.length());
try {
FaceUtil.compareFace(pd.getString("USERAVATARURL"), pd.getString("USERAVATARURL"));
} catch (Exception e) {
map.put("result", "fail");
map.put("msg", "人脸图像不符合要求 请重新上传!");
return map;
}
}
//// try{
//// FaceUtil.compareFace(pd.getString("USERAVATARURL"),pd.getString("USERAVATARURL"));
//// }catch (Exception e){
//// map.put("result", "Error");
//// map.put("msg", "人脸图像不符合要求 请重新上传!");
//// return map;
//// }
// }
if ("input".equals(pd.getString("LEARNERCATEGORYSTATUS"))) {
pd.put("DICTTYPE", "APPLICABLE_PERSONNEL");
@ -1400,7 +1400,7 @@ public class UsersController extends BaseController {
for (PageData lpd : listPd) {
number++;
for (int i = 0; i < 7; i++) {
if (i == 1 || i == 6) {
if (i == 1 || i == 5 || i == 6) {
continue;
}
if (Tools.isEmpty(lpd.get("var" + i))) {
@ -1418,10 +1418,13 @@ public class UsersController extends BaseController {
Pattern patternPhone = Pattern.compile(RegexPatterns.PHONE_REGEX);
Pattern patternRardNo = Pattern.compile(RegexPatterns.VERIFY_CARDNO_REGEX);
Matcher matcher = patternPhone.matcher(lpd.getString("var2"));
Matcher matcherRardNo = patternRardNo.matcher(lpd.getString("var5"));
if (!matcherRardNo.matches()) {
errorStr.append("第" + number + "行,");
errorStr.append("定位卡号" + CardNo + "格式不正确,请重新确认数据;\n");
Matcher matcherRardNo = patternRardNo.matcher(CardNo);
if (Tools.notEmpty(CardNo)) {
// 现在卡号可以为空 不为空得话进入正则
if (!matcherRardNo.matches()) {
errorStr.append("第" + number + "行,");
errorStr.append("定位卡号" + CardNo + "格式不正确(非负正整数),请重新确认数据;\n");
}
}
if (!matcher.matches()) {
errorStr.append("第" + number + "行,");

View File

@ -187,9 +187,6 @@ public class Node {
buffer.append("<br/>");
buffer.append("指派人:");
buffer.append(hiddeny.getString("YINNAME"));
buffer.append("<br/>(");
buffer.append(hiddeny.getString("CREATTIME"));
buffer.append(")");
}
this.text = buffer.toString();

View File

@ -73,5 +73,7 @@ public interface CorpInfoMapper {
PageData getInfo(PageData corpCondition);
PageData eightWorkBI(PageData pd);
void updateEnterpriseId(PageData corpPage);
}

View File

@ -259,4 +259,8 @@ public interface UsersMapper {
List<PageData> selectUserListByUserIds(PageData pd);
PageData getUserByCardNo(PageData pageData);
void removeCardNoUser(PageData pageData);
void editUserCardNoByPid(PageData pageData);
}

View File

@ -70,5 +70,7 @@ public interface CorpInfoService {
public PageData findByCode(PageData pd)throws Exception;
PageData eightWorkBI(PageData pd)throws Exception;
void updateEnterpriseId(PageData corpPage);
}

View File

@ -113,5 +113,10 @@ public class CorpInfoServiceImpl implements CorpInfoService {
return corpinfoMapper.eightWorkBI(pd);
}
@Override
public void updateEnterpriseId(PageData corpPage) {
corpinfoMapper.updateEnterpriseId(corpPage);
}
}

View File

@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSONObject;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import com.zcloud.mapper.datasource.inspection.SafetyEnvironmentalMapper;
import com.zcloud.mapper.datasource.system.UsersMapper;
import com.zcloud.service.bus.*;
import com.zcloud.service.hidden.HiddenService;
import com.zcloud.service.inspection.*;
@ -59,6 +60,8 @@ public class SafetyEnvironmentalServiceImpl implements SafetyEnvironmentalServic
private DepartmentService departmentService;
@Autowired
private SafetyEnvironmentalExplainService explainService;
@Resource
private UsersMapper usersMapper;
@Resource
private NoticeCorpUtil noticeCorpUtil;
@ -150,18 +153,23 @@ public class SafetyEnvironmentalServiceImpl implements SafetyEnvironmentalServic
hidden.put("HIDDENDESCR", json.getString("HIDDENDESCR")); //隐患描述
hidden.put("HIDDENPART", json.getString("HIDDENPART")); //隐患部位
hidden.put("HIDDENLEVEL", json.getString("HIDDENLEVEL")); //隐患级别
hidden.put("HIDDENTYPE_NAME", json.getString("HIDDENTYPENAME"));//隐患类型名称
hidden.put("HIDDENTYPE_NAME", StringUtils.isNotBlank(json.getString("HIDDENTYPENAME")) ? json.getString("HIDDENTYPENAME") : json.getString("HIDDENTYPE_NAME"));//隐患类型名称
hidden.put("LONGITUDE", json.getString("LONGITUDE")); //隐患位置经度
hidden.put("LATITUDE", json.getString("LATITUDE")); //隐患位置纬度
hidden.put("DISCOVERYTIME", json.getString("DISCOVERYTIME")); //隐患发现时间
hidden.put("HIDDENFINDDEPT", json.getString("HIDDENFINDDEPT")); //隐患发现部门(隐患责任人部门)
hidden.put("CREATOR", json.getString("CREATOR")); //发现人(隐患责任人)
PageData user = new PageData();
user.put("USER_ID",json.getString("CREATOR"));
user = usersMapper.findById(user);
if (user != null) {
hidden.put("HIDDENFINDDEPT", user.getString("DEPARTMENT_ID")); //隐患发现部门(隐患责任人部门)
}
hidden.put("SOURCE", json.getString("SOURCE")); //发现人(隐患责任人)
hidden.put("ISRELEVANT",json.getString("ISRELEVANT"));//是否相关方1是2否
hidden.put("STATE", "100"); //隐患状态 100-安全环保检查暂存的隐患流程完转0
hidden.put("CREATTIME", time); //发现时间
hidden.put("CORPINFO_ID", pd.getString("CORPINFO_ID"));
hidden.put("RECTIFICATIONTYPE", pd.getString("RECTIFICATIONTYPE"));
hidden.put("RECTIFICATIONTYPE", "2");
hidden.put("ISDELETE", "0"); //是否删除(0:有效 1删除)
hidden.put("POSITIONDESC",json.getString("POSITIONDESC"));
hiddenService.save(hidden);
@ -401,16 +409,23 @@ public class SafetyEnvironmentalServiceImpl implements SafetyEnvironmentalServic
hidden.put("HIDDENTYPE2", lists.get(1)); //隐患类型2
hidden.put("HIDDENTYPE3", lists.get(2)); //隐患类型3
}
hidden.put("HIDDENTYPE_NAME", json.getString("HIDDENTYPENAME"));//隐患类型名称
hidden.put("HIDDENTYPE_NAME", json.getString("HIDDENTYPE_NAME"));//隐患类型名称
hidden.put("LONGITUDE", json.getString("LONGITUDE")); //隐患位置经度
hidden.put("LATITUDE", json.getString("LATITUDE")); //隐患位置纬度
hidden.put("DISCOVERYTIME", json.getString("DISCOVERYTIME")); //隐患发现时间
hidden.put("HIDDENFINDDEPT", json.getString("HIDDENFINDDEPT")); //隐患发现部门(隐患责任人部门)
// hidden.put("HIDDENFINDDEPT", json.getString("HIDDENFINDDEPT")); //隐患发现部门(隐患责任人部门)
hidden.put("CREATOR", json.getString("CREATOR")); //发现人(隐患责任人)
PageData user = new PageData();
user.put("USER_ID",json.getString("CREATOR"));
user = usersMapper.findById(user);
if (user != null) {
hidden.put("HIDDENFINDDEPT", user.getString("DEPARTMENT_ID")); //隐患发现部门(隐患责任人部门)
}
hidden.put("SOURCE", json.getString("SOURCE")); //发现人(隐患责任人)
hidden.put("STATE", "100"); //隐患状态 100-安全环保检查暂存的隐患流程完转0
hidden.put("CREATTIME", time); //发现时间
hidden.put("CORPINFO_ID", pd.getString("CORPINFO_ID"));
hidden.put("RECTIFICATIONTYPE", "2");
hidden.put("ISDELETE", "0"); //是否删除(0:有效 1删除)
hidden.put("POSITIONDESC",json.getString("POSITIONDESC"));
hidden.put("ISRELEVANT",json.getString("ISRELEVANT"));

View File

@ -305,4 +305,7 @@ public interface UsersService {
*/
PageData getUserByCardNo(PageData pageData);
void removeCardNoUser(PageData pageData);
void editUserCardNoByPid(PageData pageData);
}

View File

@ -284,7 +284,15 @@ public class UsersServiceImpl implements UsersService {
return usersMapper.getUserByCardNo(pageData);
}
@Override
public void removeCardNoUser(PageData pageData) {
usersMapper.removeCardNoUser(pageData);
}
@Override
public void editUserCardNoByPid(PageData pageData) {
usersMapper.editUserCardNoByPid(pageData);
}
@Override
@ -358,6 +366,7 @@ public class UsersServiceImpl implements UsersService {
PageData response = PLSUtil.saveUser(pd);
if ("200".equals(response.getString("code"))) {
pd.put("PLS_ID", response.getString("data"));
if (Tools.isEmpty(pd.getString("CARDNO"))) pd.put("CARDNO",null);
usersMapper.saveUser(pd);
FHLOG.save(Jurisdiction.getUsername(), "新增用户:" + pd.getString("USERNAME"));
return ReturnMap.ok();

View File

@ -470,6 +470,7 @@ public class PLSUtil {
* @Return: void
*/
public static boolean hasCardNumber(PageData user) throws Exception {
if (Tools.isEmpty(user.getString("CARDNO"))) {return true;}
// 根据 定位卡号获取对应的人
String url = BAKEADDR.get(Jurisdiction.getCORPINFO_ID()) + "/deploy/card/peopleDisplay/" + user.getString("CARDNO");
PageData response = sendGetHttpRequest(url, null, getToken(Jurisdiction.getCORPINFO_ID()));

View File

@ -23,7 +23,7 @@ public class RegexPatterns {
* , 6
*/
public static final String VERIFY_CODE_REGEX = "^[a-zA-Z\\d]{6}$";
public static final String VERIFY_CARDNO_REGEX = "^[0-9]{5}$";
public static final String VERIFY_CARDNO_REGEX = "^[1-9][0-9]*$";
/**
* , 1518
*/

View File

@ -333,8 +333,16 @@
where
CORPINFO_ID = #{CORPINFO_ID}
</update>
<update id="updateEnterpriseId">
update
<include refid="tableName"></include>
set
enterpriseId = #{enterpriseId}
where
CORPINFO_ID = #{CORPINFO_ID}
</update>
<!-- 通过ID获取数据 -->
<!-- 通过ID获取数据 -->
<select id="findById" parameterType="pd" resultType="pd">
select
t.NAME as REGULARTYPE_NAME,

View File

@ -129,7 +129,7 @@
<include refid="tableName"></include> f
left join sys_user u on u.USER_ID = f.USER_ID
left join oa_department d on d.DEPARTMENT_ID = f.DEPARTMENT_ID
where 1=1
where 1=1 and f.USER_ID is not null and f.USER_ID !=''
<if test="HIDDEN_ID != null and HIDDEN_ID != ''"><!-- 关键词检索 -->
and
f.HIDDEN_ID=#{HIDDEN_ID}

View File

@ -461,7 +461,7 @@
left join sys_user re on re.USER_ID = f.RECTIFICATIONOR
left join sys_user ch on ch.USER_ID = f.CHECKOR
left join sys_user conUser on conUser.USER_ID = f.CONFIRM_USER
left join oa_department crd on crd.DEPARTMENT_ID = f.HIDDENFINDDEPT
left join oa_department crd on crd.DEPARTMENT_ID = cr.DEPARTMENT_ID
left join oa_department red on red.DEPARTMENT_ID = f.RECTIFICATIONDEPT
left join oa_department chd on chd.DEPARTMENT_ID = f.CHECKDEPT
left join bus_checkrecord bc on bc.CHECKRECORD_ID = f.CHECKRECORD_ID and bc.ISDELETE = 0
@ -2546,22 +2546,42 @@
update
<include refid="tableName"></include>
set
STATE = #{STATE},
CONFIRM_USER = #{CONFIRM_USER},
CONFIRM_TIME = #{CONFIRM_TIME},
RECTIFICATIONTYPE = #{RECTIFICATIONTYPE},
RECTIFICATIONDEADLINE = #{RECTIFICATIONDEADLINE},
ISCONFIRM = #{ISCONFIRM},
RECTIFICATIONDEPT = #{RECTIFICATIONDEPT},
RECTIFICATIONOR = #{RECTIFICATIONOR},
CHECKDEPT = #{CHECKDEPT},
CHECKOR = #{CHECKOR},
HIDDEN_ID = HIDDEN_ID
<if test="STATE != null and STATE != ''">
STATE = #{STATE},
</if>
<if test="CONFIRM_USER != null and CONFIRM_USER != ''">
CONFIRM_USER = #{CONFIRM_USER},
</if>
<if test="CONFIRM_TIME != null and CONFIRM_TIME != ''">
CONFIRM_TIME = #{CONFIRM_TIME},
</if>
<if test="RECTIFICATIONTYPE != null and RECTIFICATIONTYPE != ''">
RECTIFICATIONTYPE = #{RECTIFICATIONTYPE},
</if>
<if test="RECTIFICATIONDEADLINE != null and RECTIFICATIONDEADLINE != ''">
RECTIFICATIONDEADLINE = #{RECTIFICATIONDEADLINE},
</if>
<if test="ISCONFIRM != null and ISCONFIRM != ''">
ISCONFIRM = #{ISCONFIRM},
</if>
<if test="RECTIFICATIONDEPT != null and RECTIFICATIONDEPT != ''">
RECTIFICATIONDEPT = #{RECTIFICATIONDEPT},
</if>
<if test="RECTIFICATIONOR != null and RECTIFICATIONOR != ''">
RECTIFICATIONOR = #{RECTIFICATIONOR},
</if>
<if test="CHECKDEPT != null and CHECKDEPT != ''">
CHECKDEPT = #{CHECKDEPT},
</if>
<if test="CHECKOR != null and CHECKOR != ''">
CHECKOR = #{CHECKOR},
</if>
HIDDEN_ID = HIDDEN_ID
<if test="RECTIFICATIONTYPE != null and RECTIFICATIONTYPE != ''">
,RECTIFICATIONTYPE = #{RECTIFICATIONTYPE}
</if>
where
HIDDEN_ID = #{HIDDEN_ID}
HIDDEN_ID = #{HIDDEN_ID}
</update>
<!-- 验收 -->

View File

@ -769,6 +769,7 @@
LEFT JOIN sys_dictionaries d ON d.BIANMA = f.INSPECTION_TYPE
LEFT JOIN BUS_INSPECTION_SAFETYENVIRONMENTAL_SITUATION biss on biss.INSPECTION_ID = f.INSPECTION_ID
where f.ISDELETE = '0'
and h.ISDELETE = '0'
<!-- <if test="pd.supDeparIds != null and pd.supDeparIds != '' and pd.supDeparIds !='ALL' and pd.supDeparIds !='NOT'">-->
<!-- and (f.INSPECTED_DEPARTMENT_ID in (${pd.supDeparIds}) )-->
<!-- </if>-->

View File

@ -1533,6 +1533,7 @@
f.ISDELETE = '0'
AND f.SOURCE IN ( '4', '5', '1' )
AND ifnull(bo.OUTSOURCED_ID,boai.OUTSOURCED_ID) IS NOT NULL
AND (bo.ISDELETE = '0' or boai.ISDELETE = '0')
and f.ISPUNISH is null
and (
bo.PUNISH_THE_PERSON LIKE CONCAT( CONCAT( '%', #{loginUserId} ), '%' )
@ -1554,7 +1555,21 @@
AND f.STATE = '2'
AND f.CREATOR = #{loginUserId}
AND ifnull(bo.OUTSOURCED_ID,boai.OUTSOURCED_ID) IS NOT NULL
) t)CF_COUNT
AND (bo.ISDELETE = '0' or boai.ISDELETE = '0')
) t)CF_COUNT,
(SELECT
COUNT( DISTINCT t.OUTSOURCED_ID )
FROM
(
SELECT
b.OUTSOURCED_ID
FROM
BUS_OUTSOURCED b
WHERE
b.ISDELETE = '0'
AND ( b.STATE = '-1' OR b.STATE = '-2' )
AND b.CREATOR = #{loginUserId}
) t) GC_COUNT
from bus_aiwarning f
where f.ISDELETE = '0'
and f.STATUS = 0

View File

@ -184,7 +184,7 @@
left join sys_dictionaries o on o.DICTIONARIES_ID = f.OPERATIONITEM
left join bus_corp_info b on b.CORPINFO_ID = f.CORPINFO_ID
left join bus_units r on r.UNITS_ID = f.UNITS_ID
LEFT JOIN sys_user u on f.CREATOR = u.USERNAME
LEFT JOIN sys_user u on f.CREATOR = u.USERNAME and u.ISDELETE = '0'
LEFT JOIN bus_corp_info c on u.CORPINFO_ID = c.CORPINFO_ID
where f.ISDELETE = '0'
<if test="pd.KEYWORDS != null and pd.KEYWORDS != ''"><!-- 关键词检索 -->

View File

@ -35,6 +35,7 @@
STATE,
checkedIds,
FOREIGNPERSONNEL,
deptId,
DJBM
</sql>
@ -60,6 +61,7 @@
#{STATE},
#{checkedIds},
#{FOREIGNPERSONNEL},
#{deptId},
#{DJBM}
</sql>
@ -309,6 +311,7 @@
f.STATE,
f.checkedIds,
f.DJBM,
f.deptId,
s.name as leName,
f.DEP_ORDER
from OA_DEPARTMENT f

View File

@ -284,7 +284,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="LEARNERCATEGORY != null and LEARNERCATEGORY != ''">
,LEARNERCATEGORY = #{LEARNERCATEGORY}
</if>
<if test="USERAVATARURL != null and USERAVATARURL != ''">
<if test="USERAVATARURL != null">
,USERAVATARPREFIX = #{USERAVATARPREFIX}
,USERAVATARURL = #{USERAVATARURL}
</if>
@ -1280,6 +1280,25 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and
CORPINFO_ID = #{CORPINFO_ID}
</update>
<update id="removeCardNoUser">
update
<include refid="tableName"></include>
set
CARDNO = null
where
CORPINFO_ID = #{CORPINFO_ID} and
CARDNO in <foreach item="item" collection="USER_IDS" index="index" separator="," open="(" close=")">
#{item}
</foreach>
</update>
<update id="editUserCardNoByPid">
update
<include refid="tableName"></include>
set
CARDNO = #{cardNo}
where
PLS_ID = #{psnId}
</update>
<!-- 查询用户名称及部门名称 -->
<select id="findUserDept" parameterType="pd" resultType="pd" >