diff --git a/src/main/java/com/zcloud/config/CORSFilter.java b/src/main/java/com/zcloud/config/CORSFilter.java index 62fc6011..43978ee5 100644 --- a/src/main/java/com/zcloud/config/CORSFilter.java +++ b/src/main/java/com/zcloud/config/CORSFilter.java @@ -38,21 +38,25 @@ public class CORSFilter implements Filter { // (referer.trim().startsWith("http://192.168.192.201:8992/"))|| // (referer.trim().startsWith("http://192.168.192.201:8993/"))|| // (referer.trim().startsWith("https://skqhdg.porthebei.com:9005/"))){ - response.setContentType("textml;charset=UTF-8"); - response.setHeader("Access-Control-Allow-Origin", request.getHeader("Origin")); - response.setHeader("Access-Control-Allow-Methods", "POST, GET, OPTIONS, DELETE"); - response.setHeader("Access-Control-Max-Age", "0"); - response.setHeader("Access-Control-Allow-Headers","Origin, No-Cache, X-Requested-With, If-Modified-Since, Pragma, Last-Modified, Cache-Control, Expires, Content-Type, X-E4M-With,userId,token"); - response.setHeader("Access-Control-Allow-Credentials", "true"); // 是否支持cookie跨域         - response.setHeader("XDomainRequestAllowed", "1"); - response.setHeader("x-frame-options","SAMEORIGIN"); // **** - response.setHeader("X-Content-Type-Options","nosniff"); - response.setHeader("Content-Security-Policy","default-src 'none'; script-src 'self'; connect-src 'self'; img-src 'self'; style-src 'self';"); - // 一公司烯体哦那个系统漏洞修复 - response.setHeader("X-XSS-Protection", "1; mode=block"); - response.setHeader("X-Permitted-Cross-Domain-Policies", "none"); - response.setHeader("Strict-Transport-Security", "max-age=31536000; includeSubDomains; preload"); - response.setHeader("Referrer-Policy", "strict-origin-when-cross-origin"); + response.setContentType("textml;charset=UTF-8"); + response.setHeader("Access-Control-Allow-Origin", request.getHeader("Origin")); + response.setHeader("Access-Control-Allow-Methods", "POST, GET, OPTIONS, DELETE"); + response.setHeader("Access-Control-Max-Age", "0"); + response.setHeader("Access-Control-Allow-Headers","Origin, No-Cache, X-Requested-With, If-Modified-Since, Pragma, Last-Modified, Cache-Control, Expires, Content-Type, X-E4M-With,userId,token"); + response.setHeader("Access-Control-Allow-Credentials", "true"); // 是否支持cookie跨域         + response.setHeader("XDomainRequestAllowed", "1"); + response.setHeader("x-frame-options","SAMEORIGIN"); // **** + response.setHeader("X-Content-Type-Options","nosniff"); + response.setHeader("Content-Security-Policy","default-src 'none'; script-src 'self'; connect-src 'self'; img-src 'self'; style-src 'self';"); + // 系统漏洞修复 + response.setHeader("X-XSS-Protection", "1; mode=block"); + response.setHeader("X-Permitted-Cross-Domain-Policies", "none"); + response.setHeader("Strict-Transport-Security", "max-age=31536000; includeSubDomains; preload"); + response.setHeader("Referrer-Policy", "strict-origin-when-cross-origin"); + response.setHeader("X-Download-Options", "noopen"); + response.setHeader("X-Content-TYpe-OPtions", "nosniff"); + response.setHeader("Content-Security-Policy", "default-src 'self'"); + filterChain.doFilter(servletRequest, servletResponse); // } } diff --git a/src/main/java/com/zcloud/controller/bus/HotWorkApplicationController.java b/src/main/java/com/zcloud/controller/bus/HotWorkApplicationController.java index 5eeda735..1a663510 100644 --- a/src/main/java/com/zcloud/controller/bus/HotWorkApplicationController.java +++ b/src/main/java/com/zcloud/controller/bus/HotWorkApplicationController.java @@ -153,7 +153,7 @@ public class HotWorkApplicationController extends BaseController { return map; } - /**去修改页面获取数据 + /**去修改页面获取数据 * @param * @throws Exception */ @@ -573,7 +573,7 @@ public class HotWorkApplicationController extends BaseController { return map; } - /**批量删除 + /**批量删除 * @param * @throws Exception */ @@ -597,7 +597,7 @@ public class HotWorkApplicationController extends BaseController { return map; } - /**导出到excel + /**导出到excel * @param * @throws Exception */ @@ -1344,4 +1344,26 @@ public class HotWorkApplicationController extends BaseController { map.put("result", errInfo); return map; } + + /**强制结束动火 + * @param + * @throws Exception + */ + @RequestMapping(value="/forcedEnd") +// @RequiresPermissions("hotwork:del") + @ResponseBody + public Object forcedEnd() throws Exception{ + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + String userid = Jurisdiction.getUSER_ID(); + if(!Tools.isEmpty(pd.getString("HOTWORKAPPLICATION_ID"))){ + hotworkapplicationService.forcedEndHotwork(pd.getString("HOTWORKAPPLICATION_ID"), + userid, pd.getString("STATE")); + } + + map.put("result", errInfo); //返回结果 + return map; + } } diff --git a/src/main/java/com/zcloud/mapper/datasource/highriskwork/HotWorkApplicationMapper.java b/src/main/java/com/zcloud/mapper/datasource/highriskwork/HotWorkApplicationMapper.java index eaa1c75b..f8cafbd7 100644 --- a/src/main/java/com/zcloud/mapper/datasource/highriskwork/HotWorkApplicationMapper.java +++ b/src/main/java/com/zcloud/mapper/datasource/highriskwork/HotWorkApplicationMapper.java @@ -79,7 +79,7 @@ public interface HotWorkApplicationMapper{ Integer getJobNumber(PageData pd); - List hotworkdatalistPage(Page page); + List hotworkdatalistPage(Page page); void cleanUpJobNumber(PageData pd); @@ -90,8 +90,10 @@ public interface HotWorkApplicationMapper{ * @return * @throws Exception */ - void updateState4ids(PageData pageData); + void updateState4ids(PageData pageData); PageData getCountByMyApprovalForDelayedHotWork(PageData pageData); + + void forcedEndHotwork (PageData pageData); } diff --git a/src/main/java/com/zcloud/service/highriskwork/HotWorkApplicationService.java b/src/main/java/com/zcloud/service/highriskwork/HotWorkApplicationService.java index 872f7d61..7d70dcd9 100644 --- a/src/main/java/com/zcloud/service/highriskwork/HotWorkApplicationService.java +++ b/src/main/java/com/zcloud/service/highriskwork/HotWorkApplicationService.java @@ -112,6 +112,8 @@ public interface HotWorkApplicationService{ public void updateState4ids(PageData pageData); PageData getCountByMyApprovalForDelayedHotWork(String user_id) throws Exception; + + void forcedEndHotwork (String HOTWORKAPPLICATION_ID,String user_id ,String state) throws Exception; } diff --git a/src/main/java/com/zcloud/service/highriskwork/impl/HotWorkApplicationServiceImpl.java b/src/main/java/com/zcloud/service/highriskwork/impl/HotWorkApplicationServiceImpl.java index 439a4590..2b3d00b8 100644 --- a/src/main/java/com/zcloud/service/highriskwork/impl/HotWorkApplicationServiceImpl.java +++ b/src/main/java/com/zcloud/service/highriskwork/impl/HotWorkApplicationServiceImpl.java @@ -259,5 +259,23 @@ public class HotWorkApplicationServiceImpl implements HotWorkApplicationService{ public List archivelist(Page page)throws Exception{ return hotworkapplicationMapper.filedatalistPage(page); } + + /** + * 方法名称:强制结束动火 + * 方法描述:轻质结束正在进行中的动火或者已经过去的动火信息 + * 创建人:guoyuepeng + * 时间:2024/9/3 14:48 + * @param HOTWORKAPPLICATION_ID 动火ID + * @return void + */ + public void forcedEndHotwork(String HOTWORKAPPLICATION_ID ,String userid,String state) throws Exception{ + PageData pd = new PageData(); + pd.put("OPERATOR", userid); + pd.put("OPERATTIME", DateUtil.date2Str(new Date())); + pd.put("HOTWORKAPPLICATION_ID", HOTWORKAPPLICATION_ID); + pd.put("STATE", "11"); + pd.put("FORCED_END_STATE", state); + hotworkapplicationMapper.forcedEndHotwork(pd); + } } diff --git a/src/main/java/com/zcloud/service/highriskwork/impl/HotWorkApplicationUserServiceImpl.java b/src/main/java/com/zcloud/service/highriskwork/impl/HotWorkApplicationUserServiceImpl.java index 0a931c53..00f0ecad 100644 --- a/src/main/java/com/zcloud/service/highriskwork/impl/HotWorkApplicationUserServiceImpl.java +++ b/src/main/java/com/zcloud/service/highriskwork/impl/HotWorkApplicationUserServiceImpl.java @@ -277,6 +277,9 @@ public class HotWorkApplicationUserServiceImpl implements HotWorkApplicationUser && 0 > Integer.parseInt(hotVal.get("STATE").toString())){ hotVal.put("examineUserName", hotVal.get("OPERATORNAME")); } + if("1".equals(hotVal.getString("IS_FORCED_END"))){ //如果是强制回档 + hotVal.put("examineUserName", hotVal.get("OPERATORNAME")); + } } PageData pd = new PageData(); pd.put("hotIds",hotIds); diff --git a/src/main/java/com/zcloud/util/Const.java b/src/main/java/com/zcloud/util/Const.java index b7f82567..145ae510 100644 --- a/src/main/java/com/zcloud/util/Const.java +++ b/src/main/java/com/zcloud/util/Const.java @@ -24,7 +24,7 @@ public class Const { public static final String SYSNAME = "sysName"; //系统名称 public static final String SHOWCOUNT = "showCount"; //每页条数 - public static final String basePath = "/mnt/qask/file/"; + public static final String basePath = "/mnt/vdc1/qask/file/"; public static final String FILEPATHFILE = "/uploadFiles/file/"; //文件上传路径 public static final String FILEPATHHEADPHONE = "/uploadFiles/headPhone/"; //用户头像 public static final String BIFILEPATHFILE = "/uploadFiles/Bfile/"; //文件上传路径 @@ -46,9 +46,9 @@ public class Const { public static final String IS_MAIN = "IS_MAIN"; //是否主账号 public static final String ISSUPERVISE = "ISSUPERVISE"; //是否监管部门 public static final String DEFAULT_PASSWORD = "Aa@123456789"; //系统默认密码 - public static final String FILEURL = "/mnt/qask/file/"; //文件服务器地址 + public static final String FILEURL = "/mnt/vdc1/qask/file/"; //文件服务器地址 public static final String HTTPFILEURL = "https://skqhdg.porthebei.com:9004/file/"; //文件服务器地址 -// public static final String HTTPFILEURL = "https://qgqy.qhdsafety.com/file/"; + // public static final String HTTPFILEURL = "https://qgqy.qhdsafety.com/file/"; public final static String APPID = "wx9199de454d31b016"; public final static String SECRET = "183cdcac380e1f98f00c793491e27d88"; public static final String XCX_MCH_ID = "1607757714"; diff --git a/src/main/resources/mybatis/datasource/highriskwork/HotWorkApplicationMapper.xml b/src/main/resources/mybatis/datasource/highriskwork/HotWorkApplicationMapper.xml index 7758c8da..537e8d7e 100644 --- a/src/main/resources/mybatis/datasource/highriskwork/HotWorkApplicationMapper.xml +++ b/src/main/resources/mybatis/datasource/highriskwork/HotWorkApplicationMapper.xml @@ -36,6 +36,7 @@ f.IS_SAFETY_DIRECTOR, f.IS_GAS_TESTING, f.SPARE, + f.IS_FORCED_END, f.HOTWORKAPPLICATION_ID @@ -63,6 +64,7 @@ IS_SAFETY_DIRECTOR, IS_GAS_TESTING, SPARE, + IS_FORCED_END, HOTWORKAPPLICATION_ID @@ -90,6 +92,7 @@ #{IS_SAFETY_DIRECTOR}, #{IS_GAS_TESTING}, #{SPARE}, + #{IS_FORCED_END}, #{HOTWORKAPPLICATION_ID} @@ -143,10 +146,10 @@ - update - - set - STATE = #{STATE} + update + + set + STATE = #{STATE} where HOTWORKAPPLICATION_ID = #{HOTWORKAPPLICATION_ID} @@ -191,6 +194,7 @@ f.IS_SAFETY_DIRECTOR, f.IS_GAS_TESTING, f.SPARE, + f.IS_FORCED_END, f.HOTWORKAPPLICATION_ID, u.NAME CREATORNAME, d.NAME DEPARTMENTNAME, @@ -215,15 +219,15 @@ ) - and f.CORPINFO_ID = #{pd.CORPINFO_ID} - - - and (f.CREATOR = #{pd.CREATOR}) - - + and f.CORPINFO_ID = #{pd.CORPINFO_ID} + + + and (f.CREATOR = #{pd.CREATOR}) + + and (HOT_WORK_LEVEL_INDEX = #{pd.HOT_WORK_LEVEL_INDEX}) - - + + @@ -409,9 +413,9 @@ from f - where 1=1 + where 1=1 - and STATE in + and STATE in #{item} @@ -430,7 +434,7 @@ #{item} - + @@ -485,8 +489,8 @@ @@ -500,20 +504,20 @@ LEFT JOIN bus_hotworkapplicationuser fu ON fu.FOREIGN_KEY = f.HOTWORKAPPLICATION_ID WHERE fu.user_id = #{USER_ID} - AND fu.STATE = '24' - and f.STATE in ('1','2','3','4','5','6' + AND fu.STATE = '24' + and f.STATE in ('1','2','3','4','5','6' ,'7','8','9') @@ -530,20 +534,20 @@ insert into - bus_hotworkapplicationnumber + bus_hotworkapplicationnumber ( - JOB_NUMBER + JOB_NUMBER ) values ( - #{JOB_NUMBER} - ) + #{JOB_NUMBER} + ) @@ -598,8 +602,23 @@ + + + + + update + + set + STATE = #{STATE}, + OPERATOR = #{OPERATOR}, + OPERATTIME = #{OPERATTIME}, + FORCED_END_STATE = #{state}, + IS_FORCED_END ='1' + where + HOTWORKAPPLICATION_ID = #{HOTWORKAPPLICATION_ID} +