diff --git a/src/main/java/com/zcloud/controller/app/AppHiddenController.java b/src/main/java/com/zcloud/controller/app/AppHiddenController.java index 920660ad..c653f501 100644 --- a/src/main/java/com/zcloud/controller/app/AppHiddenController.java +++ b/src/main/java/com/zcloud/controller/app/AppHiddenController.java @@ -1,25 +1,25 @@ package com.zcloud.controller.app; -import java.text.SimpleDateFormat; -import java.util.ArrayList; -import java.util.Calendar; -import java.util.Date; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Random; -import java.io.File; - -import com.zcloud.controller.bus.HiddenController; +import cn.hutool.crypto.digest.DigestUtil; +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; +import com.aliyuncs.dysmsapi.model.v20170525.SendSmsResponse; +import com.zcloud.controller.base.BaseController; +import com.zcloud.entity.Page; +import com.zcloud.entity.PageData; import com.zcloud.service.bus.*; import com.zcloud.service.hiddenApi.HiddenApiService; import com.zcloud.service.hiddenApi.HiddenCheckApiService; import com.zcloud.service.hiddenApi.HiddenExamineApiService; import com.zcloud.service.inspection.SafetyEnvironmentalService; +import com.zcloud.service.system.DepartmentService; import com.zcloud.service.system.FHlogService; +import com.zcloud.service.system.UsersService; import com.zcloud.util.*; import com.zcloud.util.event.DeviceHiddenEvent; import com.zcloud.util.message.MessageService; +import net.sf.json.JSONArray; +import org.apache.commons.io.FileUtils; import org.apache.commons.lang.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.ApplicationContext; @@ -29,27 +29,12 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.multipart.MultipartFile; -import org.springframework.web.servlet.ModelAndView; -import org.apache.commons.io.FileUtils; -import org.apache.fop.fo.flow.PageNumberCitation; -import org.apache.fop.render.afp.modca.PageDescriptor; -import org.apache.shiro.authz.annotation.RequiresPermissions; - -import com.alibaba.fastjson.JSON; -import com.alibaba.fastjson.JSONObject; -import com.aliyuncs.dysmsapi.model.v20170525.SendSmsResponse; -import com.zcloud.controller.base.BaseController; -import com.zcloud.entity.Page; - -import net.sf.json.JSONArray; - -import com.zcloud.entity.PageData; -import com.zcloud.service.system.DepartmentService; -import com.zcloud.service.system.UsersService; import javax.annotation.Resource; import javax.servlet.http.HttpServletRequest; -import javax.tools.Tool; +import java.io.File; +import java.text.SimpleDateFormat; +import java.util.*; /** * 说明:隐患 作者:luoxiaobao 时间:2021-01-04 官网:www.zcloudchina.com @@ -567,6 +552,7 @@ public class AppHiddenController extends BaseController { } File tempFile = new File(file.getOriginalFilename()); FileUtils.copyInputStreamToFile(file.getInputStream(), tempFile); + String md5 = DigestUtil.md5Hex(tempFile); if (!FileUpload.isImage(tempFile)) { tempFile.delete(); map.put("result", "failed"); @@ -584,8 +570,10 @@ public class AppHiddenController extends BaseController { Smb.sshSftp(file, fileName, Const.FILEPATHFILE + ffile); PageData pd = new PageData(); pd.put("IMGFILES_ID", this.get32UUID()); + pd.put("MD5", md5); pd.put("FILEPATH", Const.FILEPATHFILE + ffile + "/" + fileName); pd.put("TYPE", TYPE); + pd.put("FOREIGN_KEY", FOREIGN_KEY); imgFilesService.save(pd); diff --git a/src/main/java/com/zcloud/controller/app/AppImgFilesController.java b/src/main/java/com/zcloud/controller/app/AppImgFilesController.java index 526cc82c..1e313417 100644 --- a/src/main/java/com/zcloud/controller/app/AppImgFilesController.java +++ b/src/main/java/com/zcloud/controller/app/AppImgFilesController.java @@ -1,13 +1,13 @@ package com.zcloud.controller.app; -import java.io.File; -import java.util.ArrayList; -import java.util.Date; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - +import cn.hutool.crypto.digest.DigestUtil; +import com.zcloud.controller.base.BaseController; +import com.zcloud.entity.Page; +import com.zcloud.entity.PageData; +import com.zcloud.service.bus.ImgFilesService; import com.zcloud.util.*; +import org.apache.commons.io.FileUtils; +import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.transaction.annotation.Transactional; @@ -16,13 +16,12 @@ import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.multipart.MultipartFile; import org.springframework.web.servlet.ModelAndView; -import org.apache.commons.io.FileUtils; -import org.apache.shiro.authz.annotation.RequiresPermissions; -import com.zcloud.controller.base.BaseController; -import com.zcloud.entity.Page; -import com.zcloud.entity.PageData; -import com.zcloud.service.bus.ImgFilesService; +import java.io.File; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; /** * 说明:图片管理 @@ -65,6 +64,7 @@ public class AppImgFilesController extends BaseController { MultipartFile file = files[i]; // 保存文件 File tempFile = new File(file.getOriginalFilename()); + String md5 = DigestUtil.md5Hex(tempFile); FileUtils.copyInputStreamToFile(file.getInputStream(), tempFile); if(!FileUpload.isImage(tempFile) && !TYPE.equals("2") && !TYPE.equals("102")) {//四色图改为json文件,不用判断类型 tempFile.delete(); @@ -98,6 +98,7 @@ public class AppImgFilesController extends BaseController { pd.put("IMGFILES_ID", this.get32UUID()); pd.put("FILEPATH", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName); pd.put("TYPE", TYPE); + pd.put("MD5", md5); pd.put("FOREIGN_KEY", FOREIGN_KEY); imgfilesService.save(pd); } diff --git a/src/main/java/com/zcloud/controller/bus/VideoController.java b/src/main/java/com/zcloud/controller/bus/VideoController.java index e8f232ca..bf64d81e 100644 --- a/src/main/java/com/zcloud/controller/bus/VideoController.java +++ b/src/main/java/com/zcloud/controller/bus/VideoController.java @@ -1,11 +1,10 @@ package com.zcloud.controller.bus; -import java.util.ArrayList; -import java.util.Date; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - +import com.zcloud.controller.base.BaseController; +import com.zcloud.entity.Page; +import com.zcloud.entity.PageData; +import com.zcloud.service.bus.VideoService; +import com.zcloud.util.*; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; @@ -16,18 +15,7 @@ import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.multipart.MultipartFile; import org.springframework.web.servlet.ModelAndView; -import com.zcloud.controller.base.BaseController; -import com.zcloud.entity.Page; -import com.zcloud.entity.PageData; -import com.zcloud.service.bus.VideoService; -import com.zcloud.util.Const; -import com.zcloud.util.DateUtil; -import com.zcloud.util.FileUpload; -import com.zcloud.util.Jurisdiction; -import com.zcloud.util.ObjectExcelView; -import com.zcloud.util.PathUtil; -import com.zcloud.util.Smb; -import com.zcloud.util.Tools; +import java.util.*; /** * 说明:视频管理 @@ -155,7 +143,7 @@ public class VideoController extends BaseController { @RequiresPermissions("video:edit") @ResponseBody public Object goEdit() throws Exception{ - Map map = new HashMap(); + Map map = new HashMap<>(); String errInfo = "success"; PageData pd = new PageData(); pd = this.getPageData(); diff --git a/src/main/java/com/zcloud/controller/inspection/SafetyEnvironmentalController.java b/src/main/java/com/zcloud/controller/inspection/SafetyEnvironmentalController.java index 952c989c..043b1215 100644 --- a/src/main/java/com/zcloud/controller/inspection/SafetyEnvironmentalController.java +++ b/src/main/java/com/zcloud/controller/inspection/SafetyEnvironmentalController.java @@ -3,11 +3,8 @@ package com.zcloud.controller.inspection; import com.zcloud.controller.base.BaseController; import com.zcloud.entity.Page; import com.zcloud.entity.PageData; -import com.zcloud.entity.hotWorkApplication.Color; import com.zcloud.entity.hotWorkApplication.Node; import com.zcloud.entity.hotWorkApplication.Overseer; -import com.zcloud.entity.system.Department; -import com.zcloud.entity.system.User; import com.zcloud.service.bus.HiddenCheckService; import com.zcloud.service.bus.HiddenService; import com.zcloud.service.bus.NoticeCorpService; @@ -21,8 +18,6 @@ import com.zcloud.service.system.UsersService; import com.zcloud.util.*; import org.apache.commons.lang.StringUtils; import org.apache.shiro.authz.annotation.RequiresPermissions; -import org.apache.shiro.session.Session; -import org.apache.xmlgraphics.xmp.schemas.pdf.PDFAAdapter; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Controller; @@ -34,7 +29,6 @@ import org.springframework.web.servlet.ModelAndView; import javax.annotation.Resource; import javax.servlet.http.HttpServletResponse; import java.util.*; -import java.util.stream.Collectors; /** * 说明:安全环保检查 @@ -211,11 +205,11 @@ public class SafetyEnvironmentalController extends BaseController { @RequiresPermissions("safetyenvironmental:list") @ResponseBody public Object list(Page page) throws Exception { - Map map = new HashMap(); + Map map = new HashMap<>(); String errInfo = "success"; PageData pd = this.getPageData(); String KEYWORDS = pd.getString("KEYWORDS"); //关键词检索条件 - if (Tools.notEmpty(KEYWORDS)) pd.put("KEYWORDS", KEYWORDS.trim()); + pd.put("KEYWORDS", Tools.notEmpty(KEYWORDS) ? KEYWORDS.trim() : ""); pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业ID // PageData userInfo = new PageData(); // userInfo.put("USER_ID",pd.getString("INSPECTION_ORIGINATOR_ID")); diff --git a/src/main/java/com/zcloud/controller/inspection/SafetyEnvironmentalExplainController.java b/src/main/java/com/zcloud/controller/inspection/SafetyEnvironmentalExplainController.java index 3acc2464..1cd904e2 100644 --- a/src/main/java/com/zcloud/controller/inspection/SafetyEnvironmentalExplainController.java +++ b/src/main/java/com/zcloud/controller/inspection/SafetyEnvironmentalExplainController.java @@ -8,7 +8,6 @@ import com.zcloud.service.bus.NoticeCorpUtil; import com.zcloud.service.inspection.SafetyEnvironmentalExplainService; import com.zcloud.service.system.DepartmentService; import com.zcloud.util.*; -import org.apache.commons.lang.ObjectUtils; import org.apache.commons.lang.StringUtils; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.beans.factory.annotation.Autowired; diff --git a/src/main/java/com/zcloud/controller/system/LoginController.java b/src/main/java/com/zcloud/controller/system/LoginController.java index 5c93c4f0..8a6540c0 100644 --- a/src/main/java/com/zcloud/controller/system/LoginController.java +++ b/src/main/java/com/zcloud/controller/system/LoginController.java @@ -1,50 +1,26 @@ package com.zcloud.controller.system; -import java.util.*; - -import javax.servlet.http.HttpServletRequest; - +import com.zcloud.controller.base.BaseController; +import com.zcloud.entity.PageData; +import com.zcloud.entity.system.User; +import com.zcloud.service.bus.CorpInfoService; +import com.zcloud.service.bus.OffDutyService; import com.zcloud.service.system.*; import com.zcloud.util.*; -import org.apache.http.HttpEntity; -import org.apache.http.client.entity.UrlEncodedFormEntity; -import org.apache.http.client.methods.CloseableHttpResponse; -import org.apache.http.client.methods.HttpPost; -import org.apache.http.entity.ContentType; -import org.apache.http.entity.StringEntity; -import org.apache.http.impl.client.CloseableHttpClient; -import org.apache.http.impl.client.HttpClients; -import org.apache.http.message.BasicNameValuePair; -import org.apache.http.protocol.HTTP; -import org.apache.http.util.EntityUtils; +import net.sf.json.JSONObject; import org.apache.shiro.SecurityUtils; -import org.apache.shiro.authc.AuthenticationException; -import org.apache.shiro.authc.DisabledAccountException; -import org.apache.shiro.authc.ExcessiveAttemptsException; -import org.apache.shiro.authc.IncorrectCredentialsException; -import org.apache.shiro.authc.LockedAccountException; -import org.apache.shiro.authc.UnknownAccountException; -import org.apache.shiro.authc.UsernamePasswordToken; +import org.apache.shiro.authc.*; import org.apache.shiro.crypto.hash.SimpleHash; import org.apache.shiro.session.Session; import org.apache.shiro.subject.Subject; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.ResponseBody; -import com.alibaba.fastjson.JSON; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.zcloud.controller.base.BaseController; -import com.zcloud.entity.PageData; -import com.zcloud.entity.system.Role; -import com.zcloud.entity.system.User; -import com.zcloud.service.bus.CorpInfoService; -import com.zcloud.service.bus.OffDutyService; - -import net.sf.json.JSONObject; +import javax.servlet.http.HttpServletRequest; +import java.util.*; /** * 说明:登录处理类 @@ -177,6 +153,7 @@ public class LoginController extends BaseController { } catch (AuthenticationException ae) { errInfo = "usererror"; } + Integer port = SpringUtil.getApplicationContext().getEnvironment().getProperty("server.port", Integer.class); if (subject.isAuthenticated()) { //验证是否登录成功 removeSession(USERNAME); @@ -201,7 +178,8 @@ public class LoginController extends BaseController { if (backEndPath.get("result").toString().equals("success")) { backEndPath.put("baseImgPath",map.get("baseImgPath").toString()); backEndPath.put("USER_IDENTITY",map.get("USER_IDENTITY").toString()); - backEndPath.put("BACKENDADDR", map.get("BACKENDADDR").toString()); + + backEndPath.put("BACKENDADDR", "http://" + ip + ":" + port + "/"); System.out.println("登录返回参数:" + backEndPath); return backEndPath; } else { @@ -212,6 +190,7 @@ public class LoginController extends BaseController { return map; } } + map.put("BACKENDADDR", "http://" + ip + ":" + port + "/"); if ("99".equals(pd.getString("STATUS"))) { errInfo = "userlock"; map.put("result", "fail"); diff --git a/src/main/java/com/zcloud/controller/xgf/XgfCorpController.java b/src/main/java/com/zcloud/controller/xgf/XgfCorpController.java index e152ae2d..8624a6bf 100644 --- a/src/main/java/com/zcloud/controller/xgf/XgfCorpController.java +++ b/src/main/java/com/zcloud/controller/xgf/XgfCorpController.java @@ -1,30 +1,25 @@ package com.zcloud.controller.xgf; -import java.util.*; -import java.util.stream.Collectors; - import com.alibaba.fastjson.JSONObject; +import com.zcloud.controller.base.BaseController; import com.zcloud.entity.Page; -import com.zcloud.service.bus.CorpInfoService; +import com.zcloud.entity.PageData; import com.zcloud.service.system.DepartmentService; +import com.zcloud.util.DateUtil; +import com.zcloud.util.HttpClientService; +import com.zcloud.util.Jurisdiction; import com.zcloud.util.ObjectExcelView; -import net.sf.json.JSONArray; -import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.client.RestTemplate; - -import com.zcloud.controller.base.BaseController; -import com.zcloud.entity.PageData; -import com.zcloud.util.DateUtil; -import com.zcloud.util.HttpClientService; -import com.zcloud.util.Jurisdiction; import org.springframework.web.servlet.ModelAndView; import javax.annotation.Resource; +import java.util.*; +import java.util.stream.Collectors; @RestController @RequestMapping("/xgf/corp") @@ -62,7 +57,7 @@ public class XgfCorpController extends BaseController { } } Map result = HttpClientService.doPost(url + "/api/corpinfo/JiTuanTeShulist", pd); - // created by liu jun (为了不在相关方连表查询,只能在这里这么写,兼容老数据) + // created by liu jun (为了不在相关方连表查询,只能在这里这么写,兼容老数据) List list = (List )result.get("varList"); for (HashMap x : list) { if (x.get("MAIN_DEPARTMENT") != null && x.get("MAIN_DEPARTMENT").toString().contains("]")) { diff --git a/src/main/java/com/zcloud/service/accident/AccidentRecordsService.java b/src/main/java/com/zcloud/service/accident/AccidentRecordsService.java index 2d003b70..26a52c65 100644 --- a/src/main/java/com/zcloud/service/accident/AccidentRecordsService.java +++ b/src/main/java/com/zcloud/service/accident/AccidentRecordsService.java @@ -2,6 +2,7 @@ package com.zcloud.service.accident; import com.zcloud.entity.Page; import com.zcloud.entity.PageData; +import com.zcloud.entity.accident.AccidentRecords; import org.springframework.web.multipart.MultipartFile; import java.util.List; @@ -28,16 +29,16 @@ public interface AccidentRecordsService { /** * 新增 * - * @param pageData 要保存的实体 + * @param accidentRecords 要保存的实体 */ - void save(PageData pageData); + void save(AccidentRecords accidentRecords); /** * 修改 * - * @param bean 要修改的实体 + * @param accidentRecords 要修改的实体 */ - void update(PageData pageData); + void update(AccidentRecords accidentRecords); /** * 删除 diff --git a/src/main/java/com/zcloud/service/inspection/SafetyEnvironmentalService.java b/src/main/java/com/zcloud/service/inspection/SafetyEnvironmentalService.java index 5e8e1921..d5b1921b 100644 --- a/src/main/java/com/zcloud/service/inspection/SafetyEnvironmentalService.java +++ b/src/main/java/com/zcloud/service/inspection/SafetyEnvironmentalService.java @@ -11,158 +11,193 @@ import java.util.List; * 时间:2022-06-08 * 官网:www.zcloudchina.com */ -public interface SafetyEnvironmentalService{ - List getHiddenCountByDepat (PageData pd) throws Exception; - List getHiddenCountByUser (PageData pd) throws Exception; - /**新增 - * @param pd - * @throws Exception - */ - public List save(PageData pd)throws Exception; +public interface SafetyEnvironmentalService { + List getHiddenCountByDepat(PageData pd) throws Exception; - /**删除 - * @param pd - * @throws Exception - */ - public void delete(PageData pd)throws Exception; + List getHiddenCountByUser(PageData pd) throws Exception; - /**修改 - * @param pd - * @throws Exception - */ - public List edit(PageData pd)throws Exception; + /** + * 新增 + * + * @param pd + * @throws Exception + */ + public List save(PageData pd) throws Exception; - /**修改 - * @param pd - * @throws Exception - */ - public void edieditsttust(PageData pd)throws Exception; //执行考评方法时,将检查状态改成已归档,因为bug6535提出,要是隐患考评完毕,状态应该是8已归档 + /** + * 删除 + * + * @param pd + * @throws Exception + */ + public void delete(PageData pd) throws Exception; - /**列表 - * @param page - * @throws Exception - */ - public List list(Page page)throws Exception; + /** + * 修改 + * + * @param pd + * @throws Exception + */ + public List edit(PageData pd) throws Exception; - /**列表(全部) - * @param pd - * @throws Exception - */ - public List listAll(PageData pd)throws Exception; + /** + * 修改 + * + * @param pd + * @throws Exception + */ + public void edieditsttust(PageData pd) throws Exception; //执行考评方法时,将检查状态改成已归档,因为bug6535提出,要是隐患考评完毕,状态应该是8已归档 - /**列表(全部) - * @param pd - * @throws Exception - */ - public List findByyin(PageData pd)throws Exception; - /**通过id获取数据 - * @param pd - * @throws Exception - */ - public PageData findById(PageData pd)throws Exception; + /** + * 列表 + * + * @param page 分页数据和条件 + * @throws Exception 可能存在的异常 + */ + List list(Page page) throws Exception; - /**批量删除 - * @param pd - * @throws Exception - */ - public void deleteAll(PageData pd)throws Exception; + /** + * 列表(全部) + * + * @param pd + * @throws Exception + */ + public List listAll(PageData pd) throws Exception; - /**列表(根据所选ID获取数据) - * @param pd - * @throws Exception - */ - List findByIds(PageData pd)throws Exception; + /** + * 列表(全部) + * + * @param pd + * @throws Exception + */ + public List findByyin(PageData pd) throws Exception; - /** - * 更新检查进度状态 - * @param pd - */ - void editStatus(PageData pd)throws Exception; + /** + * 通过id获取数据 + * + * @param pd + * @throws Exception + */ + public PageData findById(PageData pd) throws Exception; - PageData findShowById(PageData pd)throws Exception; + /** + * 批量删除 + * + * @param pd + * @throws Exception + */ + public void deleteAll(PageData pd) throws Exception; - /** - * 获取检查所有相关信息 - * @param pd - * @return - */ - PageData findFormById(PageData pd)throws Exception; + /** + * 列表(根据所选ID获取数据) + * + * @param pd + * @throws Exception + */ + List findByIds(PageData pd) throws Exception; - /** - * 申辩不成立时归档 - * @param pd - * @throws Exception - */ - void explain(PageData pd)throws Exception; + /** + * 更新检查进度状态 + * + * @param pd + */ + void editStatus(PageData pd) throws Exception; - /** - * 分公司安全环保检查考核分数统计 - * @param pd - * @return - * @throws Exception - */ - PageData statisticsBranch(PageData pd)throws Exception; + PageData findShowById(PageData pd) throws Exception; - /** - * 列表(股份公司安全环保检查考核分数统计) - * @param pd - * @return - * @throws Exception - */ - List statisticsJointStock(PageData pd) throws Exception; + /** + * 获取检查所有相关信息 + * + * @param pd + * @return + */ + PageData findFormById(PageData pd) throws Exception; - /** - * 被检查人签字/申辩数 - * @param pd - * @return - * @throws Exception - */ - PageData checkedCount (PageData pd)throws Exception; + /** + * 申辩不成立时归档 + * + * @param pd + * @throws Exception + */ + void explain(PageData pd) throws Exception; - /** - * 打回数 - * @param pd - * @return - * @throws Exception - */ - PageData repulseCount (PageData pd)throws Exception; + /** + * 分公司安全环保检查考核分数统计 + * + * @param pd + * @return + * @throws Exception + */ + PageData statisticsBranch(PageData pd) throws Exception; - /** - * 指派+验收数 - * @param pd - * @return - * @throws Exception - */ - PageData repulseAndCheckCountCount (PageData pd)throws Exception; + /** + * 列表(股份公司安全环保检查考核分数统计) + * + * @param pd + * @return + * @throws Exception + */ + List statisticsJointStock(PageData pd) throws Exception; - List pleadList(Page page) throws Exception; + /** + * 被检查人签字/申辩数 + * + * @param pd + * @return + * @throws Exception + */ + PageData checkedCount(PageData pd) throws Exception; - List checkList(Page page) ; + /** + * 打回数 + * + * @param pd + * @return + * @throws Exception + */ + PageData repulseCount(PageData pd) throws Exception; - /** - * description: 公司层级工具类 - * - * @param data - * @return - * @throws Exception - */ - PageData departmentUtil(PageData data) throws Exception; - /** - * 获取所有的安全环保信息 - * @param pd - * @return - * @throws Exception - */ - List statisticsBranchGroupDept(PageData pd) throws Exception; + /** + * 指派+验收数 + * + * @param pd + * @return + * @throws Exception + */ + PageData repulseAndCheckCountCount(PageData pd) throws Exception; - String getHiddenTotal(Page page); - /** - * 指派+验收数 验收数据错误,原来可以查询已经验收数据 - * @param pd - * @return - * @throws Exception - */ - PageData repulseAndCheckCountCountV2 (PageData pd)throws Exception; + List pleadList(Page page) throws Exception; + + List checkList(Page page); + + /** + * description: 公司层级工具类 + * + * @param data + * @return + * @throws Exception + */ + PageData departmentUtil(PageData data) throws Exception; + + /** + * 获取所有的安全环保信息 + * + * @param pd + * @return + * @throws Exception + */ + List statisticsBranchGroupDept(PageData pd) throws Exception; + + String getHiddenTotal(Page page); + + /** + * 指派+验收数 验收数据错误,原来可以查询已经验收数据 + * + * @param pd + * @return + * @throws Exception + */ + PageData repulseAndCheckCountCountV2(PageData pd) throws Exception; } diff --git a/src/main/java/com/zcloud/service/inspection/impl/SafetyEnvironmentalServiceImpl.java b/src/main/java/com/zcloud/service/inspection/impl/SafetyEnvironmentalServiceImpl.java index 45f4983f..42891d7b 100644 --- a/src/main/java/com/zcloud/service/inspection/impl/SafetyEnvironmentalServiceImpl.java +++ b/src/main/java/com/zcloud/service/inspection/impl/SafetyEnvironmentalServiceImpl.java @@ -466,9 +466,11 @@ public class SafetyEnvironmentalServiceImpl implements SafetyEnvironmentalServic return hiddenList; } - /**列表 - * @param page - * @throws Exception + /** + * 列表 + * + * @param page 分页数据和条件 + * @throws Exception 可能存在的异常 */ public List list(Page page)throws Exception{ return safetyenvironmentalMapper.datalistPage(page); diff --git a/src/main/java/com/zcloud/service/mkmj/impl/MkmjAreaServiceImpl.java b/src/main/java/com/zcloud/service/mkmj/impl/MkmjAreaServiceImpl.java index 9e88e3da..98315e39 100644 --- a/src/main/java/com/zcloud/service/mkmj/impl/MkmjAreaServiceImpl.java +++ b/src/main/java/com/zcloud/service/mkmj/impl/MkmjAreaServiceImpl.java @@ -4,7 +4,6 @@ import com.zcloud.entity.Page; import com.zcloud.entity.PageData; import com.zcloud.mapper.datasource.mkmj.MkmjAreaGateMapper; import com.zcloud.mapper.datasource.mkmj.MkmjAreaMapper; -import com.zcloud.service.map.util.ReturnMap; import com.zcloud.service.mkmj.MkmjAreaService; import com.zcloud.util.UuidUtil; import org.springframework.beans.factory.annotation.Autowired; @@ -60,7 +59,7 @@ public class MkmjAreaServiceImpl implements MkmjAreaService { * @throws Exception */ public Object delete(PageData pd)throws Exception{ - Map map = new HashMap(); + Map map = new HashMap<>(); String errInfo = "success"; //校验区域下是否还存在区域 存在则不让删除 List childList = mkmjAreaMapper.findByChild(pd); diff --git a/src/main/resources/application-dev.properties b/src/main/resources/application-dev.properties index 1c079768..86a5d55e 100644 --- a/src/main/resources/application-dev.properties +++ b/src/main/resources/application-dev.properties @@ -2,10 +2,16 @@ datasource.no1.driver-class-name: com.mysql.cj.jdbc.Driver datasource.no1.url=jdbc:mysql://39.101.130.96:33068/qa-gwj-prevention?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=utf-8 datasource.no1.username=dev datasource.no1.password=Zykj@dev123456 +#datasource.no1.url=jdbc:mysql://127.0.0.1:3306/qa-gwj-prevention?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=utf-8 +#datasource.no1.username=root +#datasource.no1.password=123456 datasource.no2.driver-class-name: com.mysql.cj.jdbc.Driver datasource.no2.url=jdbc:mysql://39.101.130.96:33068/qa-gwj-regulatory?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=utf-8 datasource.no2.username=dev datasource.no2.password=Zykj@dev123456 +#datasource.no2.url=jdbc:mysql://127.0.0.1:3306/qa-gwj-regulatory?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=utf-8 +#datasource.no2.username=root +#datasource.no2.password=123456 #druid??? @@ -71,7 +77,7 @@ smb.basePath=/mnt/wwag/file/ #Mq\u914D\u7F6E rocketmq.consumer.group2=edu-admin-edit rocketmq.consumer.group1=edu-admin-add -rocketmq.name-server=172.24.151.22:9876 +rocketmq.name-server=127.0.0.1:9876 rocketmq.producer.group=libmiddle rocketmq.producer.send-message-timeout=3000 rocketmq.producer.compress-message-body-threshold=4096 diff --git a/src/main/resources/mybatis/datasource/bus/HiddenMapper.xml b/src/main/resources/mybatis/datasource/bus/HiddenMapper.xml index 9f333adc..02529d78 100644 --- a/src/main/resources/mybatis/datasource/bus/HiddenMapper.xml +++ b/src/main/resources/mybatis/datasource/bus/HiddenMapper.xml @@ -1237,7 +1237,8 @@ ) --> - and (select count(1) from BUS_HIDDENCHECK bh where bh.USER_ID=#{SELFUSERID} and bh.HIDDEN_ID=f.HIDDEN_ID )>0 + and (select count(1) from BUS_HIDDENCHECK bh where bh.USER_ID=#{SELFUSERID} + and bh.HIDDEN_ID=f.HIDDEN_ID )>0 and f.CORPINFO_ID =#{CORPINFO_ID} diff --git a/src/main/resources/mybatis/datasource/bus/ImgFilesMapper.xml b/src/main/resources/mybatis/datasource/bus/ImgFilesMapper.xml index ebbab79a..6c95241b 100644 --- a/src/main/resources/mybatis/datasource/bus/ImgFilesMapper.xml +++ b/src/main/resources/mybatis/datasource/bus/ImgFilesMapper.xml @@ -27,7 +27,8 @@ TYPE, FOREIGN_KEY, FILE_NAME, - IMGFILES_ID + IMGFILES_ID, + MD5 @@ -36,7 +37,8 @@ #{TYPE}, #{FOREIGN_KEY}, #{FILE_NAME}, - #{IMGFILES_ID} + #{IMGFILES_ID}, + #{MD5} diff --git a/src/main/resources/mybatis/datasource/inspection/SafetyEnvironmentalExplainMapper.xml b/src/main/resources/mybatis/datasource/inspection/SafetyEnvironmentalExplainMapper.xml index bced954d..6cbce4e8 100644 --- a/src/main/resources/mybatis/datasource/inspection/SafetyEnvironmentalExplainMapper.xml +++ b/src/main/resources/mybatis/datasource/inspection/SafetyEnvironmentalExplainMapper.xml @@ -191,7 +191,7 @@ and se.CORPINFO_ID = #{pd.CORPINFO_ID} GROUP BY se.INSPECTION_ID - ORDER BY se.CREATTIME DESC + ORDER BY se.INSPECTION_TIME_START DESC diff --git a/src/main/resources/mybatis/datasource/inspection/SafetyEnvironmentalInspectorMapper.xml b/src/main/resources/mybatis/datasource/inspection/SafetyEnvironmentalInspectorMapper.xml index 9b542435..0635afd4 100644 --- a/src/main/resources/mybatis/datasource/inspection/SafetyEnvironmentalInspectorMapper.xml +++ b/src/main/resources/mybatis/datasource/inspection/SafetyEnvironmentalInspectorMapper.xml @@ -137,7 +137,7 @@ from f - LEFT JOIN BUS_INSPECTION_SAFETYENVIRONMENTAL se ON se.INSPECTION_ID = f.INSPECTION_ID + INNER JOIN BUS_INSPECTION_SAFETYENVIRONMENTAL se ON se.INSPECTION_ID = f.INSPECTION_ID LEFT JOIN VI_USER_ALL iou ON iou.USER_ID = se.INSPECTION_ORIGINATOR_ID LEFT JOIN VI_DEPARTMENT_ALL iod ON iod.DEPARTMENT_ID = iou.DEPARTMENT_ID LEFT JOIN OA_DEPARTMENT isd ON isd.DEPARTMENT_ID = se.INSPECTED_DEPARTMENT_ID diff --git a/src/main/resources/mybatis/datasource/inspection/SafetyEnvironmentalMapper.xml b/src/main/resources/mybatis/datasource/inspection/SafetyEnvironmentalMapper.xml index cd64e9bb..44226ae4 100644 --- a/src/main/resources/mybatis/datasource/inspection/SafetyEnvironmentalMapper.xml +++ b/src/main/resources/mybatis/datasource/inspection/SafetyEnvironmentalMapper.xml @@ -240,9 +240,9 @@ IFNULL(GROUP_CONCAT(REPLACE(siu.USER_ID,'/',',')),'') AS INSPECTION_USER_ID, IFNULL(GROUP_CONCAT( DISTINCT siu.NAME),'') AS INSPECTION_USER_NAME, CASE WHEN IFNULL(f.INSPECTION_TYPE_OTHER, '') = '' THEN d.NAME ELSE f.INSPECTION_TYPE_OTHER END INSPECTION_TYPE_NAME, - + from - f + f LEFT JOIN bus_hidden h on h.FOREIGN_ID = f.INSPECTION_ID and h.isdelete ='0' LEFT JOIN vi_user_all iou ON iou.USER_ID = f.INSPECTION_ORIGINATOR_ID LEFT JOIN OA_DEPARTMENT ild ON ild.DEPARTMENT_ID = f.INSPECTION_LEADDEPARTMENT_ID @@ -339,6 +339,16 @@ OR iod.NAME LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%') ) + + + and REPLACE(siu.NAME,'/',',') LIKE CONCAT(CONCAT('%', #{pd.INSPECTION_USER_NAME}),'%') + + + and REPLACE(siu.PHONE,'/',',') LIKE CONCAT(CONCAT('%', #{pd.INSPECTION_USER_PHONE}),'%') + + + and biss.SITUATION like CONCAT('%', #{pd.INSPECTION_CASE}, '%') + GROUP BY f.INSPECTION_ID ORDER BY f.CREATTIME DESC @@ -711,7 +721,7 @@ ) GROUP BY f.INSPECTION_ID - ORDER BY f.CREATTIME DESC + ORDER BY f.INSPECTION_TIME_END DESC