diff --git a/src/main/java/com/zcloud/controller/keyProjects/app/AppAIWarningController.java b/src/main/java/com/zcloud/controller/keyProjects/app/AppAIWarningController.java index 312b47ee..d17877f0 100644 --- a/src/main/java/com/zcloud/controller/keyProjects/app/AppAIWarningController.java +++ b/src/main/java/com/zcloud/controller/keyProjects/app/AppAIWarningController.java @@ -118,6 +118,7 @@ public class AppAIWarningController extends BaseController { hidden.put("HIDDEN_ID",HIDDEN_ID); //主键 pd.put("HIDDEN_ID",hidden.getString("HIDDEN_ID")); hidden.put("FOREIGN_ID", pd.getString("OUTSOURCED_ID")); //外键ID + hidden.put("CORPINFO_ID", pd.getString("CORPINFO_ID")); //隐患发现人的公司 hidden.put("HIDDENDESCR", json.getString("HIDDENDESCR")); //隐患描述 hidden.put("HIDDENPART", json.getString("HIDDENPART")); //隐患部位 hidden.put("HIDDENLEVEL", json.getString("HIDDENLEVEL")); //隐患级别 diff --git a/src/main/java/com/zcloud/controller/keyProjects/app/AppKeyprojectCheckController.java b/src/main/java/com/zcloud/controller/keyProjects/app/AppKeyprojectCheckController.java index aedca068..9b5ce3a1 100644 --- a/src/main/java/com/zcloud/controller/keyProjects/app/AppKeyprojectCheckController.java +++ b/src/main/java/com/zcloud/controller/keyProjects/app/AppKeyprojectCheckController.java @@ -64,7 +64,7 @@ public class AppKeyprojectCheckController extends BaseController { pd.put("CREATTIME", DateUtil.date2Str(new Date())); //添加时间 pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间 pd.put("ISDELETE", 0); //是否删除 - pd.put("SOURCE", 1); //企业ID + pd.put("SOURCE", 2); //企业2 keyprojectcheckService.save(pd); String currentTime = DateUtil.date2Str(new Date()); @@ -85,8 +85,9 @@ public class AppKeyprojectCheckController extends BaseController { time = DateUtil.calculateDateSecond(time, 1); } } - + Boolean boo = false; // 增加开关控制 if (Tools.notEmpty(pd.getString("HIDDENJSON"))) { + boo = true; List hiddenList = new ArrayList(); List list = (List) JSON.parse(pd.getString("HIDDENJSON")); String time = currentTime; @@ -142,6 +143,32 @@ public class AppKeyprojectCheckController extends BaseController { records = SendSmsUtil.getRecords(person.getString("PHONENUM"),tpContent); jsonArray.add(records); SendSmsUtil.sendSms("121451",jsonArray,null); + //发送罚款待处理 上文开关控制这里发送不 + if(boo){ + List jsonList = (List) JSON.parse(pd.getString("HIDDENJSON")); + String PUNISHTHEPERSON = keyprojectHiddenService.getPUNISHTHEPERSON(pd); + if (!Tools.isEmpty(PUNISHTHEPERSON)) { + PageData selectPageData = new PageData(); + String[] split = PUNISHTHEPERSON.split(","); + selectPageData.put("ids", split); + List list = keyprojectHiddenService.getPhone(selectPageData); + for (JSONObject json : jsonList) { + for(String phone:list) { + JSONArray jsonBrray = new JSONArray(); + //接受返回结果 + JSONObject recordsB = new JSONObject(); + //定义替换参数 + JSONObject tpContentB = new JSONObject(); + tpContentB.put("HIDDENDESCR",json.getString("HIDDENDESCR")); //隐患描述 + if(StringUtils.isNotBlank(phone)){ + recordsB = SendSmsUtil.getRecords(phone,tpContentB); + jsonBrray.add(recordsB); + SendSmsUtil.sendSms("121487",jsonBrray,null); + } + } + } + } + } } }catch (Exception e){ e.printStackTrace(); diff --git a/src/main/java/com/zcloud/controller/system/UsersController.java b/src/main/java/com/zcloud/controller/system/UsersController.java index b7de469d..8beec699 100644 --- a/src/main/java/com/zcloud/controller/system/UsersController.java +++ b/src/main/java/com/zcloud/controller/system/UsersController.java @@ -517,6 +517,7 @@ public class UsersController extends BaseController { String errInfo = "success"; PageData pd = new PageData(); pd = this.getPageData(); + // if(pd.get("USERAVATARURL")!=null && !pd.getString("USERAVATARURL").equals("")){ // System.out.println("USERAVATARURL原长度:"+pd.getString("USERAVATARURL").length()); // String USERAVATARURL64 = ImageAnd64Binary.zipBase64(pd.getString("USERAVATARURL")); @@ -562,6 +563,12 @@ public class UsersController extends BaseController { if ("true".equals(pd.getString("ISSTUDENT"))) { pd.put("IS_ONLINELEARNING", '1'); } + // todo + // 定位卡号 规则 如果俩个人使用同一一个卡号,最后一个人会是这个卡号。保证一个卡号一个人用。(11.28) + // 不同的公司,它定位卡的配置方案是不一样的,就你像九公司,九公司的卡是随机的。就他不是卡跟着人走,他就一天一变。 目前暂定这样 + if (Tools.notEmpty(pd.getString("CARDNO"))) { + usersService.resetCardNo(pd); + } usersService.editUser(pd); //执行修改 if ("true".equals(pd.getString("ISSTUDENT"))) { pd.put("IS_ONLINELEARNING", "1"); @@ -909,6 +916,14 @@ public class UsersController extends BaseController { if ("true".equals(pd.getString("ISSTUDENT"))) { pd.put("IS_ONLINELEARNING", '1'); } + // todo + // 定位卡号 规则 如果俩个人使用同一一个卡号,最后一个人会是这个卡号。保证一个卡号一个人用。(11.28) + // 不同的公司,它定位卡的配置方案是不一样的,就你像九公司,九公司的卡是随机的。就他不是卡跟着人走,他就一天一变。 目前暂定这样 + if (Tools.notEmpty(pd.getString("CARDNO"))) { + usersService.resetCardNo(pd); + }else { + pd.put("CARDNO",null); + } usersService.saveUser(pd); //执行保存 if ("true".equals(pd.getString("ISSTUDENT"))) { diff --git a/src/main/java/com/zcloud/mapper/datasource/keyProjects/KeyprojectHiddenMapper.java b/src/main/java/com/zcloud/mapper/datasource/keyProjects/KeyprojectHiddenMapper.java index 9fa7b3bd..0fbcecc3 100644 --- a/src/main/java/com/zcloud/mapper/datasource/keyProjects/KeyprojectHiddenMapper.java +++ b/src/main/java/com/zcloud/mapper/datasource/keyProjects/KeyprojectHiddenMapper.java @@ -158,5 +158,14 @@ public interface KeyprojectHiddenMapper { */ List getpunishlistPage(Page page); + /** + * 获取当前隐患的处罚人 + * @param pd + * @return + */ + String getPUNISHTHEPERSON(PageData pd); + + + List getPhone(PageData pd); } diff --git a/src/main/java/com/zcloud/mapper/datasource/system/UsersMapper.java b/src/main/java/com/zcloud/mapper/datasource/system/UsersMapper.java index f70f8a0b..9bb0ea2a 100644 --- a/src/main/java/com/zcloud/mapper/datasource/system/UsersMapper.java +++ b/src/main/java/com/zcloud/mapper/datasource/system/UsersMapper.java @@ -297,4 +297,6 @@ public interface UsersMapper { PageData findByCorpInfoId(PageData pd); List selectUserListByUserIds(PageData pd); + + void resetCardNo(PageData pd); } diff --git a/src/main/java/com/zcloud/service/keyProjects/KeyprojectHiddenService.java b/src/main/java/com/zcloud/service/keyProjects/KeyprojectHiddenService.java index 954c4e8f..16db8958 100644 --- a/src/main/java/com/zcloud/service/keyProjects/KeyprojectHiddenService.java +++ b/src/main/java/com/zcloud/service/keyProjects/KeyprojectHiddenService.java @@ -180,5 +180,14 @@ public interface KeyprojectHiddenService { public PageData keyprojectcount(PageData pd)throws Exception; List getpunishlist(Page page); + + /** + * 获取当前隐患的处罚人 + * @param pd + * @return + */ + String getPUNISHTHEPERSON(PageData pd); + + List getPhone(PageData pd); } diff --git a/src/main/java/com/zcloud/service/keyProjects/impl/KeyprojectHiddenServiceImpl.java b/src/main/java/com/zcloud/service/keyProjects/impl/KeyprojectHiddenServiceImpl.java index 9a47f11f..99fc74dc 100644 --- a/src/main/java/com/zcloud/service/keyProjects/impl/KeyprojectHiddenServiceImpl.java +++ b/src/main/java/com/zcloud/service/keyProjects/impl/KeyprojectHiddenServiceImpl.java @@ -253,5 +253,15 @@ public class KeyprojectHiddenServiceImpl implements KeyprojectHiddenService { public List getpunishlist(Page page) { return hiddenMapper.getpunishlistPage(page); } + + @Override + public String getPUNISHTHEPERSON(PageData pd) { + return hiddenMapper.getPUNISHTHEPERSON(pd); + } + + @Override + public List getPhone(PageData pd) { + return hiddenMapper.getPhone(pd); + } } diff --git a/src/main/java/com/zcloud/service/system/UsersService.java b/src/main/java/com/zcloud/service/system/UsersService.java index 73ec1326..8e06dcc0 100644 --- a/src/main/java/com/zcloud/service/system/UsersService.java +++ b/src/main/java/com/zcloud/service/system/UsersService.java @@ -348,4 +348,6 @@ public interface UsersService { List selectUserListByUserIds(PageData selectPageData); + + void resetCardNo(PageData pd); } diff --git a/src/main/java/com/zcloud/service/system/impl/UsersServiceImpl.java b/src/main/java/com/zcloud/service/system/impl/UsersServiceImpl.java index b03199a7..ffc72327 100644 --- a/src/main/java/com/zcloud/service/system/impl/UsersServiceImpl.java +++ b/src/main/java/com/zcloud/service/system/impl/UsersServiceImpl.java @@ -463,4 +463,9 @@ public class UsersServiceImpl implements UsersService { public List selectUserListByUserIds(PageData pd) { return usersMapper.selectUserListByUserIds(pd); } + + @Override + public void resetCardNo(PageData pd) { + usersMapper.resetCardNo(pd); + } } diff --git a/src/main/resources/application-local.properties b/src/main/resources/application-local.properties index 5bb49ecc..13026235 100644 --- a/src/main/resources/application-local.properties +++ b/src/main/resources/application-local.properties @@ -61,8 +61,9 @@ spring.main.banner-mode=off # #qa-regulatory-gwj.api.url=http://192.168.0.79:8008 -preventionxgf.api.url=http://192.168.0.31:8992/qa-prevention-xgf/ -qa-regulatory-gwj.api.url=http://192.168.0.31:8992/qa-regulatory-gwj/ +preventionxgf.api.url=http://192.168.0.79:8088/ +qa-regulatory-gwj.api.url=http://192.168.0.79:8092/ + #????? smb.host=39.103.224.166 smb.port=22 diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index ba2e4031..a93edfdf 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -10,3 +10,4 @@ spring.profiles.active=dev + diff --git a/src/main/resources/mybatis/datasource/keyProjects/KeyprojectHiddenMapper.xml b/src/main/resources/mybatis/datasource/keyProjects/KeyprojectHiddenMapper.xml index 06680df2..5030e522 100644 --- a/src/main/resources/mybatis/datasource/keyProjects/KeyprojectHiddenMapper.xml +++ b/src/main/resources/mybatis/datasource/keyProjects/KeyprojectHiddenMapper.xml @@ -358,7 +358,7 @@ where f.ISDELETE = '0' - and bo.OUTSOURCED_ID = #{pd.OUTSOURCED_ID} + and (bo.OUTSOURCED_ID = #{pd.OUTSOURCED_ID} or f.FOREIGN_ID = #{pd.OUTSOURCED_ID}) and f.STATE = 1 @@ -1606,4 +1606,21 @@ h.ISPUNISH ASC, p.HANDLED DESC + + + + diff --git a/src/main/resources/mybatis/datasource/keyProjects/KeyprojectPunishMapper.xml b/src/main/resources/mybatis/datasource/keyProjects/KeyprojectPunishMapper.xml index 31345755..86f09deb 100644 --- a/src/main/resources/mybatis/datasource/keyProjects/KeyprojectPunishMapper.xml +++ b/src/main/resources/mybatis/datasource/keyProjects/KeyprojectPunishMapper.xml @@ -168,11 +168,12 @@ u.UNITS_NAME, p.NAME AS PERSON_NAME from - f + BUS_KEYPROJECTPUNISH f + LEFT JOIN `qa-gwj-prevention`.bus_keyprojectcheck k ON f.KEYPROJECTCHECK_ID = k.KEYPROJECTCHECK_ID left join `qa-gwj-prevention`.vi_user_all cr on cr.USER_ID = f.CREATOR left join `qa-gwj-regulatory`.sys_user cre on cre.USER_ID = f.CREATOR left join `qa-gwj-regulatory`.BUS_UNITS u on u.UNITS_ID = f.UNITS_ID - left join `qa-gwj-regulatory`.BUS_OUTSOURCED o on o.UNITS_ID = u.UNITS_ID + left join `qa-gwj-regulatory`.BUS_OUTSOURCED o on o.OUTSOURCED_ID = k.OUTSOURCED_ID left join `qa-gwj-regulatory`.BUS_PERSONNELMANAGEMENT p on p.PERSONNELMANAGEMENT_ID = f.PERSONNELMANAGEMENT_ID where f.ISDELETE = '0' @@ -184,7 +185,7 @@ ) - and o.OUTSOURCED_ID = #{pd.OUTSOURCED_ID} + and k.OUTSOURCED_ID = #{pd.OUTSOURCED_ID} and f.HANDLED = 0 diff --git a/src/main/resources/mybatis/datasource/system/UsersMapper.xml b/src/main/resources/mybatis/datasource/system/UsersMapper.xml index 4c5ef89c..629f5fff 100644 --- a/src/main/resources/mybatis/datasource/system/UsersMapper.xml +++ b/src/main/resources/mybatis/datasource/system/UsersMapper.xml @@ -90,6 +90,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" WORKPERIOD, JCR, CORPINFO_ID, + CARDNO, ISDELETE @@ -129,6 +130,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" f.WORKPERIOD, f.JCR, f.CORPINFO_ID, + f.CARDNO, f.ISDELETE @@ -165,6 +167,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{WORKPERIOD}, #{JCR}, #{CORPINFO_ID}, + #{CARDNO}, #{ISDELETE} @@ -381,6 +384,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" IS_HAZARDCONFIRMER = #{IS_HAZARDCONFIRMER}, IS_ONLINELEARNING = #{IS_ONLINELEARNING}, PHONE = #{PHONE} + + ,CARDNO = #{CARDNO} + ,DURATION = #{DURATION} @@ -1193,6 +1199,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" where USER_ID = #{USER_ID} + + update sys_user set CARDNO = null where CARDNO = #{CARDNO} +