Browse Source

submit:对接E管证督学提醒

yangdamao 2 years ago
parent
commit
e73229af66

+ 1 - 0
zhongzheng-admin/src/main/resources/application-dev.yml

@@ -138,6 +138,7 @@ oldStudySys:
     shareCanclePath: http://192.168.1.210:8086/witsystem/dataapi/ordercance
     shareCanclePath: http://192.168.1.210:8086/witsystem/dataapi/ordercance
     searchGradeCount: http://gdxypx.xy.com/System/BussinessApi/OfficialGradeCount
     searchGradeCount: http://gdxypx.xy.com/System/BussinessApi/OfficialGradeCount
     pushGradeCount: http://gdxypx.xy.com/System/BussinessApi/OfficialGradeCountAuto
     pushGradeCount: http://gdxypx.xy.com/System/BussinessApi/OfficialGradeCountAuto
+    educationalInspector: http://192.168.1.210/EduSystem/BusinessApi/NewYxtUserPrompt
 
 
 officialPush:
 officialPush:
     infoPath: http://jypt-dev.gdcic.net/organjxjy/ShangBaoMingdan
     infoPath: http://jypt-dev.gdcic.net/organjxjy/ShangBaoMingdan

+ 1 - 0
zhongzheng-admin/src/main/resources/application-pre.yml

@@ -138,6 +138,7 @@ oldStudySys:
     shareCanclePath: http://test.jqbao.net/witsystem/dataapi/ordercance
     shareCanclePath: http://test.jqbao.net/witsystem/dataapi/ordercance
     searchGradeCount: http://test.jqbao.net/System/BussinessApi/OfficialGradeCount
     searchGradeCount: http://test.jqbao.net/System/BussinessApi/OfficialGradeCount
     pushGradeCount: http://test.jqbao.net/System/BussinessApi/OfficialGradeCountAuto
     pushGradeCount: http://test.jqbao.net/System/BussinessApi/OfficialGradeCountAuto
+    educationalInspector: http://192.168.1.210/EduSystem/BusinessApi/NewYxtUserPrompt
 
 
 officialPush:
 officialPush:
     infoPath: http://jypt-dev.gdcic.net/organjxjy/ShangBaoMingdan
     infoPath: http://jypt-dev.gdcic.net/organjxjy/ShangBaoMingdan

+ 1 - 0
zhongzheng-admin/src/main/resources/application-prod.yml

@@ -138,6 +138,7 @@ oldStudySys:
     shareCanclePath: https://www.xyyxt.net/witsystem/dataapi/ordercance
     shareCanclePath: https://www.xyyxt.net/witsystem/dataapi/ordercance
     searchGradeCount: https://www.xyyxt.net/System/BussinessApi/OfficialGradeCount
     searchGradeCount: https://www.xyyxt.net/System/BussinessApi/OfficialGradeCount
     pushGradeCount: https://www.xyyxt.net/System/BussinessApi/OfficialGradeCountAuto
     pushGradeCount: https://www.xyyxt.net/System/BussinessApi/OfficialGradeCountAuto
+    educationalInspector: https://zs.gdzzkj.net/EduSystem/BusinessApi/NewYxtUserPrompt
 
 
 officialPush:
 officialPush:
     infoPath: http://jypt.gdcic.net/organjxjy/ShangBaoMingdan
     infoPath: http://jypt.gdcic.net/organjxjy/ShangBaoMingdan

+ 1 - 0
zhongzheng-api/src/main/resources/application-dev.yml

@@ -139,6 +139,7 @@ oldStudySys:
     shareCanclePath: http://192.168.1.210:8086/witsystem/dataapi/ordercance
     shareCanclePath: http://192.168.1.210:8086/witsystem/dataapi/ordercance
     searchGradeCount: http://gdxypx.xy.com/System/BussinessApi/OfficialGradeCount
     searchGradeCount: http://gdxypx.xy.com/System/BussinessApi/OfficialGradeCount
     pushGradeCount: http://gdxypx.xy.com/System/BussinessApi/OfficialGradeCountAuto
     pushGradeCount: http://gdxypx.xy.com/System/BussinessApi/OfficialGradeCountAuto
+    educationalInspector: http://192.168.1.210/EduSystem/BusinessApi/NewYxtUserPrompt
 
 
 officialPush:
 officialPush:
     infoPath: http://jypt-dev.gdcic.net/organjxjy/ShangBaoMingdan
     infoPath: http://jypt-dev.gdcic.net/organjxjy/ShangBaoMingdan

+ 1 - 0
zhongzheng-api/src/main/resources/application-pre.yml

@@ -138,6 +138,7 @@ oldStudySys:
     shareCanclePath: http://test.jqbao.net/witsystem/dataapi/ordercance
     shareCanclePath: http://test.jqbao.net/witsystem/dataapi/ordercance
     searchGradeCount: http://test.jqbao.net/System/BussinessApi/OfficialGradeCount
     searchGradeCount: http://test.jqbao.net/System/BussinessApi/OfficialGradeCount
     pushGradeCount: http://test.jqbao.net/System/BussinessApi/OfficialGradeCountAuto
     pushGradeCount: http://test.jqbao.net/System/BussinessApi/OfficialGradeCountAuto
+    educationalInspector: http://192.168.1.210/EduSystem/BusinessApi/NewYxtUserPrompt
 
 
 officialPush:
 officialPush:
     infoPath: http://jypt-dev.gdcic.net/organjxjy/ShangBaoMingdan
     infoPath: http://jypt-dev.gdcic.net/organjxjy/ShangBaoMingdan

+ 1 - 0
zhongzheng-api/src/main/resources/application-prod.yml

@@ -150,6 +150,7 @@ oldStudySys:
     shareCanclePath: https://www.xyyxt.net/witsystem/dataapi/ordercance
     shareCanclePath: https://www.xyyxt.net/witsystem/dataapi/ordercance
     searchGradeCount: https://www.xyyxt.net/System/BussinessApi/OfficialGradeCount
     searchGradeCount: https://www.xyyxt.net/System/BussinessApi/OfficialGradeCount
     pushGradeCount: https://www.xyyxt.net/System/BussinessApi/OfficialGradeCountAuto
     pushGradeCount: https://www.xyyxt.net/System/BussinessApi/OfficialGradeCountAuto
+    educationalInspector: https://zs.gdzzkj.net/EduSystem/BusinessApi/NewYxtUserPrompt
 
 
 officialPush:
 officialPush:
     infoPath: http://jypt.gdcic.net/organjxjy/ShangBaoMingdan
     infoPath: http://jypt.gdcic.net/organjxjy/ShangBaoMingdan

+ 37 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/base/service/impl/UserProfileServiceImpl.java

@@ -43,6 +43,7 @@ import com.zhongzheng.modules.user.vo.UserVo;
 import freemarker.template.Configuration;
 import freemarker.template.Configuration;
 import freemarker.template.Template;
 import freemarker.template.Template;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.commons.lang3.StringUtils;
+import org.apache.commons.lang3.time.DateFormatUtils;
 import org.apache.http.entity.ContentType;
 import org.apache.http.entity.ContentType;
 import org.apache.poi.xwpf.usermodel.BreakType;
 import org.apache.poi.xwpf.usermodel.BreakType;
 import org.apache.poi.xwpf.usermodel.ParagraphAlignment;
 import org.apache.poi.xwpf.usermodel.ParagraphAlignment;
@@ -560,6 +561,7 @@ public class UserProfileServiceImpl extends ServiceImpl<UserProfileMapper, UserP
         Long gradeId = baseMapper.selectGrade(userProfileVo.getUserId(), userProfileVo.getGoodsId());
         Long gradeId = baseMapper.selectGrade(userProfileVo.getUserId(), userProfileVo.getGoodsId());
         if (bo.getStatus().equals(1)) {
         if (bo.getStatus().equals(1)) {
             InformRemindVo informRemindVo = informRemindService.queryByName("七大员新考承诺书审核通过通知");
             InformRemindVo informRemindVo = informRemindService.queryByName("七大员新考承诺书审核通过通知");
+            String content = "";
             //站内信有无启用,启用发送
             //站内信有无启用,启用发送
             if (informRemindVo.getWayStatus().equals(1)) {
             if (informRemindVo.getWayStatus().equals(1)) {
                 InformUserAddBo informUserAddBo = new InformUserAddBo();
                 InformUserAddBo informUserAddBo = new InformUserAddBo();
@@ -576,6 +578,7 @@ public class UserProfileServiceImpl extends ServiceImpl<UserProfileMapper, UserP
                 informUserAddBo.setGradeId(gradeId);
                 informUserAddBo.setGradeId(gradeId);
                 GoodsVo goodsVo1 = iGoodsService.queryById(userProfileVo.getGoodsId());
                 GoodsVo goodsVo1 = iGoodsService.queryById(userProfileVo.getGoodsId());
                 informUserAddBo.setText("尊敬的用户:您上传" + goodsVo1.getGoodsName() + "课程的承诺书审核成功");
                 informUserAddBo.setText("尊敬的用户:您上传" + goodsVo1.getGoodsName() + "课程的承诺书审核成功");
+                content = "尊敬的用户:您上传" + goodsVo1.getGoodsName() + "课程的承诺书审核成功";
                 iInformUserService.insertByAddBo(informUserAddBo);
                 iInformUserService.insertByAddBo(informUserAddBo);
             }
             }
             //短信有无启用,启用发送
             //短信有无启用,启用发送
@@ -593,15 +596,23 @@ public class UserProfileServiceImpl extends ServiceImpl<UserProfileMapper, UserP
                 informUserAddBo.setOrderGoodsId(bo.getOrderGoodsId());
                 informUserAddBo.setOrderGoodsId(bo.getOrderGoodsId());
                 GoodsVo goodsVo1 = iGoodsService.queryById(userProfileVo.getGoodsId());
                 GoodsVo goodsVo1 = iGoodsService.queryById(userProfileVo.getGoodsId());
                 informUserAddBo.setText("尊敬的用户:您上传" + goodsVo1.getGoodsName() + "课程的承诺书审核成功");
                 informUserAddBo.setText("尊敬的用户:您上传" + goodsVo1.getGoodsName() + "课程的承诺书审核成功");
+                content = "尊敬的用户:您上传" + goodsVo1.getGoodsName() + "课程的承诺书审核成功";
                 iInformUserService.insertByAddBo(informUserAddBo);
                 iInformUserService.insertByAddBo(informUserAddBo);
                 UserVo userVo = iUserService.queryById(userProfileVo.getUserId());
                 UserVo userVo = iUserService.queryById(userProfileVo.getUserId());
                 Map<String, Object> param = new HashMap<>();
                 Map<String, Object> param = new HashMap<>();
                 param.put("goods", goodsVo1.getGoodsName());
                 param.put("goods", goodsVo1.getGoodsName());
                 IAliSmsService.sendInformSms(userVo.getTelphone(), JSON.toJSONString(param), commitmentCode);
                 IAliSmsService.sendInformSms(userVo.getTelphone(), JSON.toJSONString(param), commitmentCode);
             }
             }
+            //E管证督学通知
+            if (informRemindVo.getNoteStatus().equals(1) || informRemindVo.getWayStatus().equals(1) || informRemindVo.getGzhTpStatus().equals(1)){
+                iGoodsService.informOldSys(userProfileVo.getUserId(),userProfileVo.getGoodsId(),null,
+                        null,7,content, Arrays.asList("七大员新考承诺书审核", DateUtils.getDate() ,"通过",content));
+            }
+
         } else {
         } else {
             InformRemindVo informRemindTwoVo = informRemindService.queryByName("七大员新考承诺书审核不通过通知");
             InformRemindVo informRemindTwoVo = informRemindService.queryByName("七大员新考承诺书审核不通过通知");
             //站内信有无启用,启用发送
             //站内信有无启用,启用发送
+            String content = "";
             if (informRemindTwoVo.getWayStatus().equals(1)) {
             if (informRemindTwoVo.getWayStatus().equals(1)) {
                 InformUserAddBo informUserAddBo = new InformUserAddBo();
                 InformUserAddBo informUserAddBo = new InformUserAddBo();
                 informUserAddBo.setUserId(userProfileVo.getUserId());
                 informUserAddBo.setUserId(userProfileVo.getUserId());
@@ -617,6 +628,7 @@ public class UserProfileServiceImpl extends ServiceImpl<UserProfileMapper, UserP
                 informUserAddBo.setGradeId(gradeId);
                 informUserAddBo.setGradeId(gradeId);
                 GoodsVo goodsVo1 = iGoodsService.queryById(userProfileVo.getGoodsId());
                 GoodsVo goodsVo1 = iGoodsService.queryById(userProfileVo.getGoodsId());
                 informUserAddBo.setText("尊敬的用户:您上传" + goodsVo1.getGoodsName() + "课程的承诺书审核不通过,请重新完善吧");
                 informUserAddBo.setText("尊敬的用户:您上传" + goodsVo1.getGoodsName() + "课程的承诺书审核不通过,请重新完善吧");
+                content = "尊敬的用户:您上传" + goodsVo1.getGoodsName() + "课程的承诺书审核不通过,请重新完善吧";
                 iInformUserService.insertByAddBo(informUserAddBo);
                 iInformUserService.insertByAddBo(informUserAddBo);
             }
             }
             //短信有无启用,启用发送
             //短信有无启用,启用发送
@@ -634,12 +646,19 @@ public class UserProfileServiceImpl extends ServiceImpl<UserProfileMapper, UserP
                 informUserAddBo.setOrderGoodsId(bo.getOrderGoodsId());
                 informUserAddBo.setOrderGoodsId(bo.getOrderGoodsId());
                 GoodsVo goodsVo1 = iGoodsService.queryById(userProfileVo.getGoodsId());
                 GoodsVo goodsVo1 = iGoodsService.queryById(userProfileVo.getGoodsId());
                 informUserAddBo.setText("尊敬的用户:您上传" + goodsVo1.getGoodsName() + "课程的承诺书审核不通过,请重新完善吧");
                 informUserAddBo.setText("尊敬的用户:您上传" + goodsVo1.getGoodsName() + "课程的承诺书审核不通过,请重新完善吧");
+                content = "尊敬的用户:您上传" + goodsVo1.getGoodsName() + "课程的承诺书审核不通过,请重新完善吧";
                 iInformUserService.insertByAddBo(informUserAddBo);
                 iInformUserService.insertByAddBo(informUserAddBo);
                 UserVo userVo = iUserService.queryById(userProfileVo.getUserId());
                 UserVo userVo = iUserService.queryById(userProfileVo.getUserId());
                 Map<String, Object> param = new HashMap<>();
                 Map<String, Object> param = new HashMap<>();
                 param.put("goods", goodsVo1.getGoodsName());
                 param.put("goods", goodsVo1.getGoodsName());
                 IAliSmsService.sendInformSms(userVo.getTelphone(), JSON.toJSONString(param), commitmentFailsCode);
                 IAliSmsService.sendInformSms(userVo.getTelphone(), JSON.toJSONString(param), commitmentFailsCode);
             }
             }
+
+            //E管证督学通知
+            if (informRemindTwoVo.getNoteStatus().equals(1) || informRemindTwoVo.getWayStatus().equals(1) || informRemindTwoVo.getGzhTpStatus().equals(1)){
+                iGoodsService.informOldSys(userProfileVo.getUserId(),userProfileVo.getGoodsId(),null,
+                        null,7,content, Arrays.asList("七大员新考承诺书审核", DateUtils.getDate() ,"不通过",content));
+            }
         }
         }
     }
     }
 
 
@@ -649,6 +668,7 @@ public class UserProfileServiceImpl extends ServiceImpl<UserProfileMapper, UserP
         Long gradeId = baseMapper.selectGrade(userProfileVo.getUserId(), userProfileVo.getGoodsId());
         Long gradeId = baseMapper.selectGrade(userProfileVo.getUserId(), userProfileVo.getGoodsId());
         if (bo.getStatus().equals(1)) {
         if (bo.getStatus().equals(1)) {
             InformRemindVo informRemindVo = informRemindService.queryByName("资料审核通过通知");
             InformRemindVo informRemindVo = informRemindService.queryByName("资料审核通过通知");
+            String content = "";
             //站内信有无启用,启用发送
             //站内信有无启用,启用发送
             if (informRemindVo.getWayStatus().equals(1)) {
             if (informRemindVo.getWayStatus().equals(1)) {
                 InformUserAddBo informUserAddBo = new InformUserAddBo();
                 InformUserAddBo informUserAddBo = new InformUserAddBo();
@@ -664,6 +684,7 @@ public class UserProfileServiceImpl extends ServiceImpl<UserProfileMapper, UserP
                 informUserAddBo.setGradeId(gradeId);
                 informUserAddBo.setGradeId(gradeId);
                 GoodsVo goodsVo1 = iGoodsService.queryById(userProfileVo.getGoodsId());
                 GoodsVo goodsVo1 = iGoodsService.queryById(userProfileVo.getGoodsId());
                 informUserAddBo.setText("尊敬的用户:您填写的" + goodsVo1.getGoodsName() + "课程报名信息审核成功,请尽快去学习吧");
                 informUserAddBo.setText("尊敬的用户:您填写的" + goodsVo1.getGoodsName() + "课程报名信息审核成功,请尽快去学习吧");
+                content = "尊敬的用户:您填写的" + goodsVo1.getGoodsName() + "课程报名信息审核成功,请尽快去学习吧";
                 iInformUserService.insertByAddBo(informUserAddBo);
                 iInformUserService.insertByAddBo(informUserAddBo);
             }
             }
             //短信有无启用,启用发送
             //短信有无启用,启用发送
@@ -680,14 +701,22 @@ public class UserProfileServiceImpl extends ServiceImpl<UserProfileMapper, UserP
                 informUserAddBo.setGoodsId(userProfileVo.getGoodsId());
                 informUserAddBo.setGoodsId(userProfileVo.getGoodsId());
                 GoodsVo goodsVo1 = iGoodsService.queryById(userProfileVo.getGoodsId());
                 GoodsVo goodsVo1 = iGoodsService.queryById(userProfileVo.getGoodsId());
                 informUserAddBo.setText("尊敬的用户:您购买的" + goodsVo1.getGoodsName() + "已经开通,请尽快去学习吧。");
                 informUserAddBo.setText("尊敬的用户:您购买的" + goodsVo1.getGoodsName() + "已经开通,请尽快去学习吧。");
+                content = "尊敬的用户:您填写的" + goodsVo1.getGoodsName() + "课程报名信息审核成功,请尽快去学习吧";
                 iInformUserService.insertByAddBo(informUserAddBo);
                 iInformUserService.insertByAddBo(informUserAddBo);
                 UserVo userVo = iUserService.queryById(userProfileVo.getUserId());
                 UserVo userVo = iUserService.queryById(userProfileVo.getUserId());
                 Map<String, Object> param = new HashMap<>();
                 Map<String, Object> param = new HashMap<>();
                 param.put("goods", goodsVo1.getGoodsName());
                 param.put("goods", goodsVo1.getGoodsName());
                 IAliSmsService.sendInformSms(userVo.getTelphone(), JSON.toJSONString(param), materialReviewCode);
                 IAliSmsService.sendInformSms(userVo.getTelphone(), JSON.toJSONString(param), materialReviewCode);
             }
             }
+            //E管证督学通知
+            if (informRemindVo.getWayStatus().equals(1) || informRemindVo.getNoteStatus().equals(1) || informRemindVo.getGzhTpStatus().equals(1)){
+                iGoodsService.informOldSys(userProfileVo.getUserId(),userProfileVo.getGoodsId(),userProfileVo.getOrderGoodsId(),
+                        gradeId,7,content,
+                        Arrays.asList("报名资料审核", DateFormatUtils.format(new Date(), "yyyy/MM/dd"),"通过",content));
+            }
         } else {
         } else {
             InformRemindVo informRemindTwoVo = informRemindService.queryByName("资料审核不通过通知");
             InformRemindVo informRemindTwoVo = informRemindService.queryByName("资料审核不通过通知");
+            String content = "";
             //站内信有无启用,启用发送
             //站内信有无启用,启用发送
             if (informRemindTwoVo.getWayStatus().equals(1)) {
             if (informRemindTwoVo.getWayStatus().equals(1)) {
                 InformUserAddBo informUserAddBo = new InformUserAddBo();
                 InformUserAddBo informUserAddBo = new InformUserAddBo();
@@ -703,6 +732,7 @@ public class UserProfileServiceImpl extends ServiceImpl<UserProfileMapper, UserP
                 informUserAddBo.setGradeId(gradeId);
                 informUserAddBo.setGradeId(gradeId);
                 GoodsVo goodsVo1 = iGoodsService.queryById(userProfileVo.getGoodsId());
                 GoodsVo goodsVo1 = iGoodsService.queryById(userProfileVo.getGoodsId());
                 informUserAddBo.setText("尊敬的用户:您填写的" + goodsVo1.getGoodsName() + "课程报名信息审核不通过,请重新完善吧");
                 informUserAddBo.setText("尊敬的用户:您填写的" + goodsVo1.getGoodsName() + "课程报名信息审核不通过,请重新完善吧");
+                content = "尊敬的用户:您填写的" + goodsVo1.getGoodsName() + "课程报名信息审核不通过,请重新完善吧";
                 iInformUserService.insertByAddBo(informUserAddBo);
                 iInformUserService.insertByAddBo(informUserAddBo);
             }
             }
             //短信有无启用,启用发送
             //短信有无启用,启用发送
@@ -719,12 +749,19 @@ public class UserProfileServiceImpl extends ServiceImpl<UserProfileMapper, UserP
                 informUserAddBo.setGoodsId(userProfileVo.getGoodsId());
                 informUserAddBo.setGoodsId(userProfileVo.getGoodsId());
                 GoodsVo goodsVo1 = iGoodsService.queryById(userProfileVo.getGoodsId());
                 GoodsVo goodsVo1 = iGoodsService.queryById(userProfileVo.getGoodsId());
                 informUserAddBo.setText("尊敬的用户:您填写的" + goodsVo1.getGoodsName() + "课程报名信息审核不通过,请重新完善吧");
                 informUserAddBo.setText("尊敬的用户:您填写的" + goodsVo1.getGoodsName() + "课程报名信息审核不通过,请重新完善吧");
+                content = "尊敬的用户:您填写的" + goodsVo1.getGoodsName() + "课程报名信息审核不通过,请重新完善吧";
                 iInformUserService.insertByAddBo(informUserAddBo);
                 iInformUserService.insertByAddBo(informUserAddBo);
                 UserVo userVo = iUserService.queryById(userProfileVo.getUserId());
                 UserVo userVo = iUserService.queryById(userProfileVo.getUserId());
                 Map<String, Object> param = new HashMap<>();
                 Map<String, Object> param = new HashMap<>();
                 param.put("goods", goodsVo1.getGoodsName());
                 param.put("goods", goodsVo1.getGoodsName());
                 IAliSmsService.sendInformSms(userVo.getTelphone(), JSON.toJSONString(param), NotificationOfFailureCode);
                 IAliSmsService.sendInformSms(userVo.getTelphone(), JSON.toJSONString(param), NotificationOfFailureCode);
             }
             }
+            //E管证督学通知
+            if (informRemindTwoVo.getWayStatus().equals(1) || informRemindTwoVo.getNoteStatus().equals(1) || informRemindTwoVo.getGzhTpStatus().equals(1)){
+                iGoodsService.informOldSys(userProfileVo.getUserId(),userProfileVo.getGoodsId(),userProfileVo.getOrderGoodsId(),
+                        gradeId,7,content,
+                        Arrays.asList("报名资料审核", DateFormatUtils.format(new Date(), "yyyy/MM/dd"),"不通过",content));
+            }
         }
         }
     }
     }
 
 

+ 37 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/goods/bo/GoodsEGZInformBo.java

@@ -0,0 +1,37 @@
+package com.zhongzheng.modules.goods.bo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * @author yangdamao
+ * @date 2023年01月04日 10:37
+ */
+@Data
+public class GoodsEGZInformBo implements Serializable {
+
+    @ApiModelProperty("身份证")
+    private String idNum;
+
+    @ApiModelProperty("通知类型")
+    private Integer tipsType;
+
+    @ApiModelProperty("站内信内容")
+    private String tipsContent;
+
+    @ApiModelProperty("服务号内容")
+    private String dataJson;
+
+    @ApiModelProperty("手机号码")
+    private String mobile;
+
+    @ApiModelProperty("小程序appId")
+    private String weAppId;
+
+    @ApiModelProperty("跳转路径")
+    private String toWeAppPagePath;
+
+}

+ 4 - 1
zhongzheng-system/src/main/java/com/zhongzheng/modules/goods/service/IGoodsService.java

@@ -103,7 +103,10 @@ public interface IGoodsService extends IService<Goods> {
 
 
     String getGoodsStudyUrl(GoodsStudyUrlBo bo);
     String getGoodsStudyUrl(GoodsStudyUrlBo bo);
 
 
-    boolean goodsBatchCopyTenant(GoodsBatchCopyTenantBo bo);
+	boolean goodsBatchCopyTenant(GoodsBatchCopyTenantBo bo);
+
+	//督学通知e管证
+    boolean informOldSys(Long userId,Long goodsId,Long orderGoodsId, Long gradeId,Integer type,String content,List<String> dataJson);
 
 
 	boolean goodsBatchCopyIncrementTenant(GoodsBatchCopyTenantBo bo);
 	boolean goodsBatchCopyIncrementTenant(GoodsBatchCopyTenantBo bo);
 
 

+ 90 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/goods/service/impl/GoodsServiceImpl.java

@@ -6,6 +6,7 @@ import cn.hutool.core.lang.Validator;
 import cn.hutool.core.util.ObjectUtil;
 import cn.hutool.core.util.ObjectUtil;
 import cn.hutool.core.util.StrUtil;
 import cn.hutool.core.util.StrUtil;
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
 import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
 import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
@@ -16,6 +17,8 @@ import com.zhongzheng.common.core.redis.RedisCache;
 import com.zhongzheng.common.exception.CustomException;
 import com.zhongzheng.common.exception.CustomException;
 import com.zhongzheng.common.utils.DateUtils;
 import com.zhongzheng.common.utils.DateUtils;
 import com.zhongzheng.common.utils.ServletUtils;
 import com.zhongzheng.common.utils.ServletUtils;
+import com.zhongzheng.common.utils.ToolsUtils;
+import com.zhongzheng.common.utils.http.HttpUtils;
 import com.zhongzheng.modules.bank.domain.*;
 import com.zhongzheng.modules.bank.domain.*;
 import com.zhongzheng.modules.bank.mapper.QuestionMapper;
 import com.zhongzheng.modules.bank.mapper.QuestionMapper;
 import com.zhongzheng.modules.bank.service.*;
 import com.zhongzheng.modules.bank.service.*;
@@ -67,6 +70,7 @@ import com.zhongzheng.modules.user.vo.SubjectStudyRecordVo;
 import com.zhongzheng.modules.user.vo.UserVo;
 import com.zhongzheng.modules.user.vo.UserVo;
 import net.polyv.common.v1.util.StringUtils;
 import net.polyv.common.v1.util.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
@@ -74,6 +78,7 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.github.pagehelper.Page;
 import com.github.pagehelper.Page;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.transaction.annotation.Transactional;
 
 
+import java.io.IOException;
 import java.math.BigDecimal;
 import java.math.BigDecimal;
 import java.util.*;
 import java.util.*;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.TimeUnit;
@@ -238,6 +243,9 @@ public class GoodsServiceImpl extends ServiceImpl<GoodsMapper, Goods> implements
     @Autowired
     @Autowired
     private ISysGoodsCopyRecordService iGoodsCopyRecordService;
     private ISysGoodsCopyRecordService iGoodsCopyRecordService;
 
 
+    @Value("${oldStudySys.educationalInspector}")
+    private String INFORM_PATH;
+
     @Override
     @Override
     public GoodsVo queryById(Long goodsId) {
     public GoodsVo queryById(Long goodsId) {
         Goods db = this.baseMapper.selectById(goodsId);
         Goods db = this.baseMapper.selectById(goodsId);
@@ -1056,6 +1064,86 @@ public class GoodsServiceImpl extends ServiceImpl<GoodsMapper, Goods> implements
         return voList;
         return voList;
     }
     }
 
 
+    /**
+     * 督学通知e管证
+     * @author change
+     * @date 2023/1/4 10:24
+     * @param userId
+     * @param goodsId
+     * @param type
+     * @param content
+     * @param dataJson
+     * @return boolean
+     */
+    @Override
+    public boolean informOldSys(Long userId, Long goodsId,Long orderGoodsId,Long gradeId, Integer type, String content, List<String> dataJson) {
+        User user = iUserService.getById(userId);
+        if (ObjectUtils.isNull(user)){
+            log.error("informOldSys:督学通知E管证失败(用户信息获取失败)userId:"+userId);
+            return false;
+        }
+        Goods goods = null;
+        if (ObjectUtils.isNotNull(goodsId)){
+            goods = getById(goodsId);
+        }
+        GoodsEGZInformBo bo = new GoodsEGZInformBo();
+        bo.setIdNum(user.getIdCard());
+        bo.setMobile(user.getTelphone());
+        bo.setTipsType(type);
+        bo.setTipsContent(content);
+        bo.setDataJson(JSONArray.toJSONString(dataJson));
+        if (ObjectUtils.isNotNull(orderGoodsId) && ObjectUtils.isNotNull(gradeId)){
+            //获取小程序appID
+            String tenantId = ServletUtils.getRequest().getHeader("TenantId");
+            SysConfig sysConfig = iSysConfigService.getOne(new LambdaQueryWrapper<SysConfig>()
+                    .eq(SysConfig::getConfigKey, "wx.small.appid")
+                    .eq(SysConfig::getTenantId,Long.valueOf(tenantId)));
+            if (ObjectUtils.isNull(sysConfig)) {
+                log.error("informOldSys:督学通知E管证失败(小程序appID获取失败)tenantId:"+tenantId);
+                return false;
+            }
+            bo.setWeAppId(sysConfig.getConfigValue());
+            //跳转路径
+            //课程
+            List<Long> courseIds = iGoodsCourseService.getCourseIdsByGoodsAndTenant(goodsId,Long.valueOf(tenantId));
+            Long courseId = 0L;
+            if (CollectionUtils.isNotEmpty(courseIds) && courseIds.size() == 1) {
+                courseId = courseIds.get(0);
+            }
+            if (goods.getGoodsType() == 2) {
+                //题库
+                bo.setToWeAppPagePath("/pages/questionBank/index");
+            } else if (goods.getGoodsType() == 6) {
+                //直播
+                bo.setToWeAppPagePath(String.format("/pages3/live/detail?orderGoodsId=%s&goodsId=%s&gradeId=0&courseId=%s",
+                        orderGoodsId, goodsId, courseId));
+            } else {
+                //视频
+                bo.setToWeAppPagePath(String.format("/pages3/polyv/detail?id=%s&goodsId=%s&orderGoodsId=%s&gradeId=%s",
+                        courseId, goodsId, orderGoodsId, gradeId));
+            }
+        }
+        Map<String, String> params = new HashMap<>();
+        Long nowTime = DateUtils.getNowTime();
+        String sign = ToolsUtils.EncoderByMd5(nowTime.toString()+"pubilc2022");
+        params.put("stamp", nowTime.toString());
+        params.put("sign", sign);
+        params.put("jsonstr", JSONArray.toJSONString(Arrays.asList(bo)));
+        String respone = "";
+        try {
+            respone = HttpUtils.postFormBody(INFORM_PATH, params);
+            if (!respone.contains("\"Status\":true")) {
+                log.error("E管证督学通知接口请求错误"+respone);
+                return false;
+            }
+        } catch (IOException e) {
+            log.error("E管证督学通知接口请求错误"+respone);
+            return false;
+        }
+
+        return true;
+    }
+
     @Override
     @Override
     public String getGoodsStudyUrl(GoodsStudyUrlBo bo) {
     public String getGoodsStudyUrl(GoodsStudyUrlBo bo) {
         String url = "";
         String url = "";
@@ -2296,6 +2384,8 @@ public class GoodsServiceImpl extends ServiceImpl<GoodsMapper, Goods> implements
         return true;
         return true;
     }
     }
 
 
+
+
     @Override
     @Override
     @Transactional(rollbackFor = Exception.class)
     @Transactional(rollbackFor = Exception.class)
     public boolean goodsBatchCopyDisposeTenant() {
     public boolean goodsBatchCopyDisposeTenant() {

+ 12 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/grade/service/impl/ClassGradeServiceImpl.java

@@ -335,6 +335,8 @@ public class ClassGradeServiceImpl extends ServiceImpl<ClassGradeMapper, ClassGr
             List<Long> userIds = baseMapper.queryUser(classGradeVo.getGradeId());
             List<Long> userIds = baseMapper.queryUser(classGradeVo.getGradeId());
             if (businessId > 0) {
             if (businessId > 0) {
                 for (Long userId : userIds) {
                 for (Long userId : userIds) {
+                    String content = "";
+                    String goodsName = "";
                     if (informRemindVo.getWayStatus().equals(1)) {
                     if (informRemindVo.getWayStatus().equals(1)) {
                         InformUserAddBo informUserAddBo = new InformUserAddBo();
                         InformUserAddBo informUserAddBo = new InformUserAddBo();
                         informUserAddBo.setUserId(userId);
                         informUserAddBo.setUserId(userId);
@@ -348,6 +350,8 @@ public class ClassGradeServiceImpl extends ServiceImpl<ClassGradeMapper, ClassGr
                         informUserAddBo.setGoodsId(classGradeVo.getGoodsList().get(0).getGoodsId());
                         informUserAddBo.setGoodsId(classGradeVo.getGoodsList().get(0).getGoodsId());
                         GoodsVo goodsVo1 = iGoodsService.queryById(classGradeVo.getGoodsList().get(0).getGoodsId());
                         GoodsVo goodsVo1 = iGoodsService.queryById(classGradeVo.getGoodsList().get(0).getGoodsId());
                         informUserAddBo.setText("尊敬的用户:您购买的" + goodsVo1.getGoodsName() + "课程已开班,班级有效期为" + startTime + "至" + endTime + ",请及时完成学习,如过期未完成学习,则需要重新购买学习,马上点击“立即学习”进行学习。");
                         informUserAddBo.setText("尊敬的用户:您购买的" + goodsVo1.getGoodsName() + "课程已开班,班级有效期为" + startTime + "至" + endTime + ",请及时完成学习,如过期未完成学习,则需要重新购买学习,马上点击“立即学习”进行学习。");
+                        content = "尊敬的用户:您购买的" + goodsVo1.getGoodsName() + "课程已开班,班级有效期为" + startTime + "至" + endTime + ",请及时完成学习,如过期未完成学习。";
+                        goodsName = goodsVo1.getGoodsName();
                         iInformUserService.insertByAddBo(informUserAddBo);
                         iInformUserService.insertByAddBo(informUserAddBo);
                     }
                     }
                     if (informRemindVo.getNoteStatus().equals(1)) {
                     if (informRemindVo.getNoteStatus().equals(1)) {
@@ -363,6 +367,8 @@ public class ClassGradeServiceImpl extends ServiceImpl<ClassGradeMapper, ClassGr
                         informUserAddBo.setGoodsId(classGradeVo.getGoodsList().get(0).getGoodsId());
                         informUserAddBo.setGoodsId(classGradeVo.getGoodsList().get(0).getGoodsId());
                         GoodsVo goodsVo1 = iGoodsService.queryById(classGradeVo.getGoodsList().get(0).getGoodsId());
                         GoodsVo goodsVo1 = iGoodsService.queryById(classGradeVo.getGoodsList().get(0).getGoodsId());
                         informUserAddBo.setText("尊敬的用户:您购买的" + goodsVo1.getGoodsName() + "课程已开班,班级有效期为" + startTime + "至" + endTime + ",请及时完成学习,如过期未完成学习,则需要重新购买学习,马上点击“立即学习”进行学习。");
                         informUserAddBo.setText("尊敬的用户:您购买的" + goodsVo1.getGoodsName() + "课程已开班,班级有效期为" + startTime + "至" + endTime + ",请及时完成学习,如过期未完成学习,则需要重新购买学习,马上点击“立即学习”进行学习。");
+                        content = "尊敬的用户:您购买的" + goodsVo1.getGoodsName() + "课程已开班,班级有效期为" + startTime + "至" + endTime + ",请及时完成学习,如过期未完成学习。";
+                        goodsName = goodsVo1.getGoodsName();
                         iInformUserService.insertByAddBo(informUserAddBo);
                         iInformUserService.insertByAddBo(informUserAddBo);
                         UserVo userVo = iUserService.queryById(userId);
                         UserVo userVo = iUserService.queryById(userId);
                         Map<String, Object> param = new HashMap<>();
                         Map<String, Object> param = new HashMap<>();
@@ -370,6 +376,12 @@ public class ClassGradeServiceImpl extends ServiceImpl<ClassGradeMapper, ClassGr
                         param.put("time", startTime + "至" + endTime);
                         param.put("time", startTime + "至" + endTime);
                         IAliSmsService.sendInformSms(userVo.getTelphone(), JSON.toJSONString(param), classRemind);
                         IAliSmsService.sendInformSms(userVo.getTelphone(), JSON.toJSONString(param), classRemind);
                     }
                     }
+
+                    //E管证督学通知
+                    if (informRemindVo.getNoteStatus().equals(1) || informRemindVo.getWayStatus().equals(1) || informRemindVo.getGzhTpStatus().equals(1)){
+                        iGoodsService.informOldSys(userId,classGradeVo.getGoodsList().get(0).getGoodsId(),classGradeVo.getOrderGoodsId(),
+                                classGradeVo.getGradeId(),18,content, Arrays.asList(goodsName, startTime ,endTime,content));
+                    }
                 }
                 }
             }
             }
         }
         }

+ 35 - 2
zhongzheng-system/src/main/java/com/zhongzheng/modules/grade/service/impl/UserPeriodServiceImpl.java

@@ -55,6 +55,7 @@ import com.zhongzheng.modules.user.service.IUserService;
 import com.zhongzheng.modules.user.service.IUserStudyRecordPhotoService;
 import com.zhongzheng.modules.user.service.IUserStudyRecordPhotoService;
 import com.zhongzheng.modules.user.vo.UserVo;
 import com.zhongzheng.modules.user.vo.UserVo;
 import com.zhongzheng.modules.wx.service.IWxLoginService;
 import com.zhongzheng.modules.wx.service.IWxLoginService;
+import org.apache.commons.lang3.time.DateFormatUtils;
 import org.slf4j.Logger;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -852,6 +853,7 @@ public class UserPeriodServiceImpl extends ServiceImpl<UserPeriodMapper, UserPer
         GoodsVo goodsVo1 = iGoodsService.queryById(bo.getGoodsId());
         GoodsVo goodsVo1 = iGoodsService.queryById(bo.getGoodsId());
         if (bo.getStatus().equals(1)) {
         if (bo.getStatus().equals(1)) {
             InformRemindVo informRemindVo = informRemindService.queryByName("二建继教学时初审通过");
             InformRemindVo informRemindVo = informRemindService.queryByName("二建继教学时初审通过");
+            String content = "";
             if (!CollectionUtils.isEmpty(informRemindVo.getInformRemindBusiness()) && !CollectionUtils.isEmpty(informRemindVo.getInformRemindBusiness().stream().filter(informRemindBusinessVo -> informRemindBusinessVo.getBusinessId().equals(goodsVo1.getBusinessId())).collect(Collectors.toList()))) {
             if (!CollectionUtils.isEmpty(informRemindVo.getInformRemindBusiness()) && !CollectionUtils.isEmpty(informRemindVo.getInformRemindBusiness().stream().filter(informRemindBusinessVo -> informRemindBusinessVo.getBusinessId().equals(goodsVo1.getBusinessId())).collect(Collectors.toList()))) {
                 if (informRemindVo.getWayStatus().equals(1)) {
                 if (informRemindVo.getWayStatus().equals(1)) {
                     InformUserAddBo informUserAddBo = new InformUserAddBo();
                     InformUserAddBo informUserAddBo = new InformUserAddBo();
@@ -866,6 +868,7 @@ public class UserPeriodServiceImpl extends ServiceImpl<UserPeriodMapper, UserPer
                     informUserAddBo.setRemind("学时机构审核通过提醒");
                     informUserAddBo.setRemind("学时机构审核通过提醒");
                     informUserAddBo.setGoodsId(bo.getGoodsId());
                     informUserAddBo.setGoodsId(bo.getGoodsId());
                     informUserAddBo.setText("尊敬的用户:你已完成本课程的所有学时学习,经机构审核通过,需注册中心复审后即可获得继续教育学时,审核时间约15个工作日。");
                     informUserAddBo.setText("尊敬的用户:你已完成本课程的所有学时学习,经机构审核通过,需注册中心复审后即可获得继续教育学时,审核时间约15个工作日。");
+                    content = "尊敬的用户:你已完成本课程的所有学时学习,经机构审核通过,需注册中心复审后即可获得继续教育学时,审核时间约15个工作日。";
                     iInformUserService.insertByAddBo(informUserAddBo);
                     iInformUserService.insertByAddBo(informUserAddBo);
                 }
                 }
                 if (informRemindVo.getNoteStatus().equals(1)) {
                 if (informRemindVo.getNoteStatus().equals(1)) {
@@ -881,16 +884,23 @@ public class UserPeriodServiceImpl extends ServiceImpl<UserPeriodMapper, UserPer
                     informUserAddBo.setRemind("学时机构审核通过提醒");
                     informUserAddBo.setRemind("学时机构审核通过提醒");
                     informUserAddBo.setGoodsId(bo.getGoodsId());
                     informUserAddBo.setGoodsId(bo.getGoodsId());
                     informUserAddBo.setText("尊敬的用户:你已完成本课程的所有学时学习,经机构审核通过,需注册中心复审后即可获得继续教育学时,审核时间约15个工作日。");
                     informUserAddBo.setText("尊敬的用户:你已完成本课程的所有学时学习,经机构审核通过,需注册中心复审后即可获得继续教育学时,审核时间约15个工作日。");
+                    content = "尊敬的用户:你已完成本课程的所有学时学习,经机构审核通过,需注册中心复审后即可获得继续教育学时,审核时间约15个工作日。";
                     iInformUserService.insertByAddBo(informUserAddBo);
                     iInformUserService.insertByAddBo(informUserAddBo);
                     UserVo userVo = iUserService.queryById(bo.getUserId());
                     UserVo userVo = iUserService.queryById(bo.getUserId());
                     Map<String, Object> param = new HashMap<>();
                     Map<String, Object> param = new HashMap<>();
                     IAliSmsService.sendInformSms(userVo.getTelphone(), JSON.toJSONString(param), schoolHoursCode);
                     IAliSmsService.sendInformSms(userVo.getTelphone(), JSON.toJSONString(param), schoolHoursCode);
                 }
                 }
+
+                //E管证督学通知
+                if (informRemindVo.getNoteStatus().equals(1) || informRemindVo.getWayStatus().equals(1) || informRemindVo.getGzhTpStatus().equals(1)){
+                    iGoodsService.informOldSys(bo.getUserId(),bo.getGoodsId(),bo.getOrderGoodsId(),
+                            bo.getGradeId(),7,content, Arrays.asList("二建继教学时初审", DateFormatUtils.format(new Date(), "yyyy/MM/dd"),"初审通过" ,content));
+                }
             }
             }
         } else {
         } else {
             InformRemindVo informRemindTwoVo = informRemindService.queryByName("二建继教学时初审不通过");
             InformRemindVo informRemindTwoVo = informRemindService.queryByName("二建继教学时初审不通过");
             if (!CollectionUtils.isEmpty(informRemindTwoVo.getInformRemindBusiness()) && !CollectionUtils.isEmpty(informRemindTwoVo.getInformRemindBusiness().stream().filter(informRemindBusinessVo -> informRemindBusinessVo.getBusinessId().equals(goodsVo1.getBusinessId())).collect(Collectors.toList()))) {
             if (!CollectionUtils.isEmpty(informRemindTwoVo.getInformRemindBusiness()) && !CollectionUtils.isEmpty(informRemindTwoVo.getInformRemindBusiness().stream().filter(informRemindBusinessVo -> informRemindBusinessVo.getBusinessId().equals(goodsVo1.getBusinessId())).collect(Collectors.toList()))) {
-
+                String content = "";
                 if (informRemindTwoVo.getWayStatus().equals(1)) {
                 if (informRemindTwoVo.getWayStatus().equals(1)) {
                     InformUserAddBo informUserAddBo = new InformUserAddBo();
                     InformUserAddBo informUserAddBo = new InformUserAddBo();
                     informUserAddBo.setUserId(bo.getUserId());
                     informUserAddBo.setUserId(bo.getUserId());
@@ -904,6 +914,7 @@ public class UserPeriodServiceImpl extends ServiceImpl<UserPeriodMapper, UserPer
                     informUserAddBo.setOrderGoodsId(bo.getOrderGoodsId());
                     informUserAddBo.setOrderGoodsId(bo.getOrderGoodsId());
                     informUserAddBo.setGoodsId(bo.getGoodsId());
                     informUserAddBo.setGoodsId(bo.getGoodsId());
                     informUserAddBo.setText("尊敬的用户:您购买的" + goodsVo1.getGoodsName() + "课程学时机构审核不通过,为了不影响您的学习进度,请点击立即重学进行重学。");
                     informUserAddBo.setText("尊敬的用户:您购买的" + goodsVo1.getGoodsName() + "课程学时机构审核不通过,为了不影响您的学习进度,请点击立即重学进行重学。");
+                    content = "尊敬的用户:您购买的" + goodsVo1.getGoodsName() + "课程学时机构审核不通过,为了不影响您的学习进度,请点击立即重学进行重学。";
                     iInformUserService.insertByAddBo(informUserAddBo);
                     iInformUserService.insertByAddBo(informUserAddBo);
                 }
                 }
                 if (informRemindTwoVo.getNoteStatus().equals(1)) {
                 if (informRemindTwoVo.getNoteStatus().equals(1)) {
@@ -919,12 +930,19 @@ public class UserPeriodServiceImpl extends ServiceImpl<UserPeriodMapper, UserPer
                     informUserAddBo.setOrderGoodsId(bo.getOrderGoodsId());
                     informUserAddBo.setOrderGoodsId(bo.getOrderGoodsId());
                     informUserAddBo.setGoodsId(bo.getGoodsId());
                     informUserAddBo.setGoodsId(bo.getGoodsId());
                     informUserAddBo.setText("尊敬的用户:您购买的" + goodsVo1.getGoodsName() + "课程学时机构审核不通过,为了不影响您的学习进度,请点击立即重学进行重学。");
                     informUserAddBo.setText("尊敬的用户:您购买的" + goodsVo1.getGoodsName() + "课程学时机构审核不通过,为了不影响您的学习进度,请点击立即重学进行重学。");
+                    content = "尊敬的用户:您购买的" + goodsVo1.getGoodsName() + "课程学时机构审核不通过,为了不影响您的学习进度,请点击立即重学进行重学。";
                     iInformUserService.insertByAddBo(informUserAddBo);
                     iInformUserService.insertByAddBo(informUserAddBo);
                     UserVo userVo = iUserService.queryById(bo.getUserId());
                     UserVo userVo = iUserService.queryById(bo.getUserId());
                     Map<String, Object> param = new HashMap<>();
                     Map<String, Object> param = new HashMap<>();
                     param.put("goods", goodsVo1.getGoodsName());
                     param.put("goods", goodsVo1.getGoodsName());
                     IAliSmsService.sendInformSms(userVo.getTelphone(), JSON.toJSONString(param), auditFailedCode);
                     IAliSmsService.sendInformSms(userVo.getTelphone(), JSON.toJSONString(param), auditFailedCode);
                 }
                 }
+
+                //E管证督学通知
+                if (informRemindTwoVo.getNoteStatus().equals(1) || informRemindTwoVo.getWayStatus().equals(1) || informRemindTwoVo.getGzhTpStatus().equals(1)){
+                    iGoodsService.informOldSys(bo.getUserId(),bo.getGoodsId(),bo.getOrderGoodsId(),
+                            bo.getGradeId(),7,content, Arrays.asList("二建继教学时初审", DateFormatUtils.format(new Date(), "yyyy/MM/dd"),"初审不通过" ,content));
+                }
             }
             }
         }
         }
     }
     }
@@ -1007,11 +1025,18 @@ public class UserPeriodServiceImpl extends ServiceImpl<UserPeriodMapper, UserPer
                         iWxLoginService.sendQdyTpMsg(userVo.getOpenId(),paramMap);
                         iWxLoginService.sendQdyTpMsg(userVo.getOpenId(),paramMap);
                     }
                     }
                 }
                 }
+
+                //E管证督学通知
+                if (informRemindVo.getNoteStatus().equals(1) || informRemindVo.getWayStatus().equals(1) || informRemindVo.getGzhTpStatus().equals(1)){
+                    String content ="尊敬的用户:你已完成本课程的所有学时机构审核通过。";
+                    iGoodsService.informOldSys(bo.getUserId(),bo.getGoodsId(),bo.getOrderGoodsId(),
+                            bo.getGradeId(),7,content, Arrays.asList("七大员新考学时初审", DateFormatUtils.format(new Date(), "yyyy/MM/dd"),"初审通过" ,content));
+                }
             }
             }
         } else {
         } else {
             InformRemindVo informRemindTwoVo = informRemindService.queryByName("七大员新考学时初审不通过");
             InformRemindVo informRemindTwoVo = informRemindService.queryByName("七大员新考学时初审不通过");
             if (!CollectionUtils.isEmpty(informRemindTwoVo.getInformRemindBusiness()) && !CollectionUtils.isEmpty(informRemindTwoVo.getInformRemindBusiness().stream().filter(informRemindBusinessVo -> informRemindBusinessVo.getBusinessId().equals(goodsVo1.getBusinessId())).collect(Collectors.toList()))) {
             if (!CollectionUtils.isEmpty(informRemindTwoVo.getInformRemindBusiness()) && !CollectionUtils.isEmpty(informRemindTwoVo.getInformRemindBusiness().stream().filter(informRemindBusinessVo -> informRemindBusinessVo.getBusinessId().equals(goodsVo1.getBusinessId())).collect(Collectors.toList()))) {
-
+                String content = "";
                 if (informRemindTwoVo.getWayStatus().equals(1)) {
                 if (informRemindTwoVo.getWayStatus().equals(1)) {
                     InformUserAddBo informUserAddBo = new InformUserAddBo();
                     InformUserAddBo informUserAddBo = new InformUserAddBo();
                     informUserAddBo.setUserId(bo.getUserId());
                     informUserAddBo.setUserId(bo.getUserId());
@@ -1025,6 +1050,7 @@ public class UserPeriodServiceImpl extends ServiceImpl<UserPeriodMapper, UserPer
                     informUserAddBo.setGoodsId(bo.getGoodsId());
                     informUserAddBo.setGoodsId(bo.getGoodsId());
                     informUserAddBo.setOrderGoodsId(gradeUser.getOrderGoodsId());
                     informUserAddBo.setOrderGoodsId(gradeUser.getOrderGoodsId());
                     informUserAddBo.setText("尊敬的用户:您购买的" + goodsVo1.getGoodsName() + "课程学时审核不通过,为了不影响您的学习进度,请点击立即重学进行重学。");
                     informUserAddBo.setText("尊敬的用户:您购买的" + goodsVo1.getGoodsName() + "课程学时审核不通过,为了不影响您的学习进度,请点击立即重学进行重学。");
+                    content = "尊敬的用户:您购买的" + goodsVo1.getGoodsName() + "课程学时审核不通过,为了不影响您的学习进度,请点击立即重学进行重学。";
                     iInformUserService.insertByAddBo(informUserAddBo);
                     iInformUserService.insertByAddBo(informUserAddBo);
                 }
                 }
                 if (informRemindTwoVo.getNoteStatus().equals(1)) {
                 if (informRemindTwoVo.getNoteStatus().equals(1)) {
@@ -1040,6 +1066,7 @@ public class UserPeriodServiceImpl extends ServiceImpl<UserPeriodMapper, UserPer
                     informUserAddBo.setGoodsId(bo.getGoodsId());
                     informUserAddBo.setGoodsId(bo.getGoodsId());
                     informUserAddBo.setOrderGoodsId(gradeUser.getOrderGoodsId());
                     informUserAddBo.setOrderGoodsId(gradeUser.getOrderGoodsId());
                     informUserAddBo.setText("尊敬的用户:您购买的" + goodsVo1.getGoodsName() + "课程学时审核不通过,为了不影响您的学习进度,请点击立即重学进行重学。");
                     informUserAddBo.setText("尊敬的用户:您购买的" + goodsVo1.getGoodsName() + "课程学时审核不通过,为了不影响您的学习进度,请点击立即重学进行重学。");
+                    content = "尊敬的用户:您购买的" + goodsVo1.getGoodsName() + "课程学时审核不通过,为了不影响您的学习进度,请点击立即重学进行重学。";
                     iInformUserService.insertByAddBo(informUserAddBo);
                     iInformUserService.insertByAddBo(informUserAddBo);
                     UserVo userVo = iUserService.queryById(bo.getUserId());
                     UserVo userVo = iUserService.queryById(bo.getUserId());
                     Map<String, Object> param = new HashMap<>();
                     Map<String, Object> param = new HashMap<>();
@@ -1060,6 +1087,7 @@ public class UserPeriodServiceImpl extends ServiceImpl<UserPeriodMapper, UserPer
                     informUserAddBo.setRemind("学时机构审核通过提醒");
                     informUserAddBo.setRemind("学时机构审核通过提醒");
                     informUserAddBo.setGoodsId(bo.getGoodsId());
                     informUserAddBo.setGoodsId(bo.getGoodsId());
                     informUserAddBo.setText("尊敬的用户:您购买的" + goodsVo1.getGoodsName() + "课程学时审核不通过,为了不影响您的学习进度,请点击立即重学进行重学。");
                     informUserAddBo.setText("尊敬的用户:您购买的" + goodsVo1.getGoodsName() + "课程学时审核不通过,为了不影响您的学习进度,请点击立即重学进行重学。");
+                    content = "尊敬的用户:您购买的" + goodsVo1.getGoodsName() + "课程学时审核不通过,为了不影响您的学习进度,请点击立即重学进行重学。";
                     Long informId = iInformUserService.insertByAddBo(informUserAddBo);
                     Long informId = iInformUserService.insertByAddBo(informUserAddBo);
                     UserVo userVo = iUserService.queryById(bo.getUserId());
                     UserVo userVo = iUserService.queryById(bo.getUserId());
                     if(Validator.isNotEmpty(userVo.getOpenId())){
                     if(Validator.isNotEmpty(userVo.getOpenId())){
@@ -1073,6 +1101,11 @@ public class UserPeriodServiceImpl extends ServiceImpl<UserPeriodMapper, UserPer
                         iWxLoginService.sendQdyTpMsg(userVo.getOpenId(),paramMap);
                         iWxLoginService.sendQdyTpMsg(userVo.getOpenId(),paramMap);
                     }
                     }
                 }
                 }
+                //E管证督学通知
+                if (informRemindTwoVo.getNoteStatus().equals(1) || informRemindTwoVo.getWayStatus().equals(1) || informRemindTwoVo.getGzhTpStatus().equals(1)){
+                    iGoodsService.informOldSys(bo.getUserId(),bo.getGoodsId(),bo.getOrderGoodsId(),
+                            bo.getGradeId(),7,content, Arrays.asList("七大员新考学时初审", DateFormatUtils.format(new Date(), "yyyy/MM/dd"),"初审不通过" ,content));
+                }
             }
             }
         }
         }
     }
     }

+ 3 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/order/vo/OrderGoodsVo.java

@@ -323,4 +323,7 @@ public class OrderGoodsVo {
 	private BigDecimal classHours;
 	private BigDecimal classHours;
 	@ApiModelProperty("课程数量")
 	@ApiModelProperty("课程数量")
 	private Long courseNum;
 	private Long courseNum;
+
+	@ApiModelProperty("内容")
+	private String context;
 }
 }

+ 180 - 6
zhongzheng-system/src/main/java/com/zhongzheng/modules/schedule/service/impl/ScheduleServiceImpl.java

@@ -91,6 +91,7 @@ import com.zhongzheng.modules.mock.service.IMockMajorSubjectTimeService;
 import com.zhongzheng.modules.mock.vo.MockApplyVo;
 import com.zhongzheng.modules.mock.vo.MockApplyVo;
 import com.zhongzheng.modules.order.bo.OrderQueryBo;
 import com.zhongzheng.modules.order.bo.OrderQueryBo;
 import com.zhongzheng.modules.order.domain.Order;
 import com.zhongzheng.modules.order.domain.Order;
+import com.zhongzheng.modules.order.domain.OrderGoods;
 import com.zhongzheng.modules.order.mapper.OrderGoodsMapper;
 import com.zhongzheng.modules.order.mapper.OrderGoodsMapper;
 import com.zhongzheng.modules.order.mapper.OrderMapper;
 import com.zhongzheng.modules.order.mapper.OrderMapper;
 import com.zhongzheng.modules.order.service.IOrderBusinessService;
 import com.zhongzheng.modules.order.service.IOrderBusinessService;
@@ -126,6 +127,7 @@ import net.polyv.common.v1.util.StringUtils;
 import net.polyv.live.v1.entity.channel.playback.LiveChannelVideoListResponse;
 import net.polyv.live.v1.entity.channel.playback.LiveChannelVideoListResponse;
 import net.polyv.live.v1.entity.channel.playback.LiveListChannelSessionInfoResponse;
 import net.polyv.live.v1.entity.channel.playback.LiveListChannelSessionInfoResponse;
 import net.polyv.live.v1.entity.channel.playback.LiveListChannelVideoLibraryResponse;
 import net.polyv.live.v1.entity.channel.playback.LiveListChannelVideoLibraryResponse;
+import org.apache.commons.lang3.time.DateFormatUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
@@ -355,6 +357,8 @@ public class ScheduleServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVide
         //查找购买后没发送消息的商品,发送购买消息
         //查找购买后没发送消息的商品,发送购买消息
         List<OrderGoodsVo> orderGoodsVo = iOrderGoodsService.selectOrderGoods();
         List<OrderGoodsVo> orderGoodsVo = iOrderGoodsService.selectOrderGoods();
         InformRemindVo informRemindTwoVo = informRemindService.queryByName("商品购买成功需填写资料");
         InformRemindVo informRemindTwoVo = informRemindService.queryByName("商品购买成功需填写资料");
+        //需求通知E管证的订单集合
+        List<OrderGoodsVo> voList = new ArrayList<>();
         if (!CollectionUtils.isEmpty(orderGoodsVo)) {
         if (!CollectionUtils.isEmpty(orderGoodsVo)) {
             for (OrderGoodsVo goodsVo : orderGoodsVo) {
             for (OrderGoodsVo goodsVo : orderGoodsVo) {
                 ProfileTpVo profileTpVo = iProfileTpService.queryByGoodsId(goodsVo.getGoodsId());
                 ProfileTpVo profileTpVo = iProfileTpService.queryByGoodsId(goodsVo.getGoodsId());
@@ -373,6 +377,9 @@ public class ScheduleServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVide
                     informUserAddBo.setOrderGoodsId(goodsVo.getOrderGoodsId());
                     informUserAddBo.setOrderGoodsId(goodsVo.getOrderGoodsId());
                     GoodsVo goodsVo1 = iGoodsService.queryById(goodsVo.getGoodsId());
                     GoodsVo goodsVo1 = iGoodsService.queryById(goodsVo.getGoodsId());
                     informUserAddBo.setText("尊敬的用户:您购买的" + goodsVo1.getGoodsName() + "已经开通,请尽快去学习吧。");
                     informUserAddBo.setText("尊敬的用户:您购买的" + goodsVo1.getGoodsName() + "已经开通,请尽快去学习吧。");
+                    goodsVo.setContext("尊敬的用户:您购买的" + goodsVo1.getGoodsName() + "已经开通,请尽快去学习吧。");
+                    goodsVo.setGoodsName(goodsVo1.getGoodsName());
+                    voList.add(goodsVo);
                     iInformUserService.insertByAddBo(informUserAddBo);
                     iInformUserService.insertByAddBo(informUserAddBo);
                 }
                 }
                 if (informRemindTwoVo.getWayStatus() == 1 && profileTpVo != null) {
                 if (informRemindTwoVo.getWayStatus() == 1 && profileTpVo != null) {
@@ -390,6 +397,9 @@ public class ScheduleServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVide
                     informUserAddBo.setOrderGoodsId(goodsVo.getOrderGoodsId());
                     informUserAddBo.setOrderGoodsId(goodsVo.getOrderGoodsId());
                     GoodsVo goodsVo1 = iGoodsService.queryById(goodsVo.getGoodsId());
                     GoodsVo goodsVo1 = iGoodsService.queryById(goodsVo.getGoodsId());
                     informUserAddBo.setText("尊敬的用户:已为您开通了" + goodsVo1.getGoodsName() + "课程,本课程需完善信息方可学习,请尽快去完善资料吧。");
                     informUserAddBo.setText("尊敬的用户:已为您开通了" + goodsVo1.getGoodsName() + "课程,本课程需完善信息方可学习,请尽快去完善资料吧。");
+                    goodsVo.setContext("尊敬的用户:已为您开通了" + goodsVo1.getGoodsName() + "课程,本课程需完善信息方可学习,请尽快去完善资料吧。");
+                    goodsVo.setGoodsName(goodsVo1.getGoodsName());
+                    voList.add(goodsVo);
                     iInformUserService.insertByAddBo(informUserAddBo);
                     iInformUserService.insertByAddBo(informUserAddBo);
                 }
                 }
             }
             }
@@ -421,7 +431,11 @@ public class ScheduleServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVide
                     if (Validator.isNotEmpty(rb)) {
                     if (Validator.isNotEmpty(rb)) {
                         iInformUserService.insertByAddBo(informUserAddBo);
                         iInformUserService.insertByAddBo(informUserAddBo);
                     }
                     }
-
+                    if (voList.stream().allMatch(x -> !x.getGoodsId().equals(goodsVo.getGoodsId()))){
+                        goodsVo.setContext("尊敬的用户:您购买的" + goodsVo1.getGoodsName() + "已经开通,请尽快去学习吧。");
+                        goodsVo.setGoodsName(goodsVo1.getGoodsName());
+                        voList.add(goodsVo);
+                    }
                 }
                 }
                 if (informRemindTwoVo.getNoteStatus() == 1 && profileTpVo != null) {
                 if (informRemindTwoVo.getNoteStatus() == 1 && profileTpVo != null) {
                     InformUserAddBo informUserAddBo = new InformUserAddBo();
                     InformUserAddBo informUserAddBo = new InformUserAddBo();
@@ -446,9 +460,24 @@ public class ScheduleServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVide
                     if (Validator.isNotEmpty(rb)) {
                     if (Validator.isNotEmpty(rb)) {
                         iInformUserService.insertByAddBo(informUserAddBo);
                         iInformUserService.insertByAddBo(informUserAddBo);
                     }
                     }
+                    if (voList.stream().allMatch(x -> !x.getGoodsId().equals(goodsVo.getGoodsId()))){
+                        goodsVo.setContext("尊敬的用户:已为您开通了" + goodsVo1.getGoodsName() + "课程,本课程需完善信息方可学习,请尽快去完善资料吧。");
+                        goodsVo.setGoodsName(goodsVo1.getGoodsName());
+                        voList.add(goodsVo);
+                    }
                 }
                 }
             }
             }
         }
         }
+        if (!CollectionUtils.isEmpty(voList)){
+            //通知E管证
+            voList.forEach(item -> {
+                iGoodsService.informOldSys(item.getUserId(),item.getGoodsId(),item.getOrderGoodsId(),
+                        item.getGradeId(),2,item.getContext(),
+                        Arrays.asList(item.getGoodsName(),"已开通", DateFormatUtils.format(new Date(), "yyyy/MM/dd"),item.getContext()));
+            });
+
+        }
+
         //同步用户购买商品的考试次数和前培次数
         //同步用户购买商品的考试次数和前培次数
         //    sendGoods();
         //    sendGoods();
         return "请求成功";
         return "请求成功";
@@ -504,7 +533,8 @@ public class ScheduleServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVide
             Date dateEnd = new Date(timeEndId);
             Date dateEnd = new Date(timeEndId);
             res = simpleDateFormat.format(date);
             res = simpleDateFormat.format(date);
             resEnd = simpleDateFormat.format(dateEnd);
             resEnd = simpleDateFormat.format(dateEnd);
-
+            String context = "";
+            String goodsName = "";
             if (informTwentyRemindVo.getWayStatus().equals(1)) {
             if (informTwentyRemindVo.getWayStatus().equals(1)) {
                 InformUserAddBo informUserAddBo = new InformUserAddBo();
                 InformUserAddBo informUserAddBo = new InformUserAddBo();
                 informUserAddBo.setUserId(classTwentyGradeUserVo.getUserId());
                 informUserAddBo.setUserId(classTwentyGradeUserVo.getUserId());
@@ -520,6 +550,8 @@ public class ScheduleServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVide
                 GoodsVo goodsVo1 = iGoodsService.queryById(classTwentyGradeUserVo.getGoodsId());
                 GoodsVo goodsVo1 = iGoodsService.queryById(classTwentyGradeUserVo.getGoodsId());
                 informUserAddBo.setText("尊敬的用户:您购买的课程班级有效期还剩20天,未在" + resEnd + "前完成全部学时,可能会影响审核进度,最终导致学时无效,请尽快完成学习");
                 informUserAddBo.setText("尊敬的用户:您购买的课程班级有效期还剩20天,未在" + resEnd + "前完成全部学时,可能会影响审核进度,最终导致学时无效,请尽快完成学习");
                 iInformUserService.insertByAddBo(informUserAddBo);
                 iInformUserService.insertByAddBo(informUserAddBo);
+                context ="尊敬的用户:您购买的课程班级有效期还剩20天,未在" + resEnd + "前完成全部学时,可能会影响审核进度,最终导致学时无效,请尽快完成学习";
+                goodsName = goodsVo1.getGoodsName();
             }
             }
             if (informTwentyRemindVo.getNoteStatus().equals(1)) {
             if (informTwentyRemindVo.getNoteStatus().equals(1)) {
                 InformUserAddBo informUserAddBo = new InformUserAddBo();
                 InformUserAddBo informUserAddBo = new InformUserAddBo();
@@ -535,6 +567,8 @@ public class ScheduleServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVide
                 informUserAddBo.setGradeId(classTwentyGradeUserVo.getGradeId());
                 informUserAddBo.setGradeId(classTwentyGradeUserVo.getGradeId());
                 GoodsVo goodsVo1 = iGoodsService.queryById(classTwentyGradeUserVo.getGoodsId());
                 GoodsVo goodsVo1 = iGoodsService.queryById(classTwentyGradeUserVo.getGoodsId());
                 informUserAddBo.setText("尊敬的用户:您购买的" + goodsVo1.getGoodsName() + "课程班级有效期还剩20天,未在" + resEnd + "前完成全部学时,可能会影响审核进度,最终导致学时无效,请尽快完成学习");
                 informUserAddBo.setText("尊敬的用户:您购买的" + goodsVo1.getGoodsName() + "课程班级有效期还剩20天,未在" + resEnd + "前完成全部学时,可能会影响审核进度,最终导致学时无效,请尽快完成学习");
+                context = "尊敬的用户:您购买的" + goodsVo1.getGoodsName() + "课程班级有效期还剩20天,未在" + resEnd + "前完成全部学时,可能会影响审核进度,最终导致学时无效,请尽快完成学习";
+                goodsName = goodsVo1.getGoodsName();
                 UserVo userVo = iUserService.queryById(classTwentyGradeUserVo.getUserId());
                 UserVo userVo = iUserService.queryById(classTwentyGradeUserVo.getUserId());
                 Map<String, Object> param = new HashMap<>();
                 Map<String, Object> param = new HashMap<>();
                 param.put("goods", goodsVo1.getGoodsName());
                 param.put("goods", goodsVo1.getGoodsName());
@@ -544,6 +578,11 @@ public class ScheduleServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVide
                     iInformUserService.insertByAddBo(informUserAddBo);
                     iInformUserService.insertByAddBo(informUserAddBo);
                 }
                 }
             }
             }
+            //E管证督学通知
+            if (informTwentyRemindVo.getNoteStatus().equals(1) || informTwentyRemindVo.getGzhTpStatus().equals(1) || informTwentyRemindVo.getWayStatus().equals(1)){
+                iGoodsService.informOldSys(classTwentyGradeUserVo.getUserId(),classTwentyGradeUserVo.getGoodsId(),classTwentyGradeUserVo.getOrderGoodsId(),
+                        classTwentyGradeUserVo.getGradeId(),9,context, Arrays.asList(goodsName, resEnd,context));
+            }
         }
         }
 
 
         for (ClassGradeUserGoodsVo classTenGradeUserVo : classTenGradeUserVos) {
         for (ClassGradeUserGoodsVo classTenGradeUserVo : classTenGradeUserVos) {
@@ -556,7 +595,8 @@ public class ScheduleServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVide
             Date dateEnd = new Date(timeEndId);
             Date dateEnd = new Date(timeEndId);
             res = simpleDateFormat.format(date);
             res = simpleDateFormat.format(date);
             resEnd = simpleDateFormat.format(dateEnd);
             resEnd = simpleDateFormat.format(dateEnd);
-
+            String context = "";
+            String goodsName = "";
             if (informTenRemindVo.getWayStatus().equals(1)) {
             if (informTenRemindVo.getWayStatus().equals(1)) {
                 InformUserAddBo informUserAddBo = new InformUserAddBo();
                 InformUserAddBo informUserAddBo = new InformUserAddBo();
                 informUserAddBo.setUserId(classTenGradeUserVo.getUserId());
                 informUserAddBo.setUserId(classTenGradeUserVo.getUserId());
@@ -572,6 +612,8 @@ public class ScheduleServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVide
                 GoodsVo goodsVo1 = iGoodsService.queryById(classTenGradeUserVo.getGoodsId());
                 GoodsVo goodsVo1 = iGoodsService.queryById(classTenGradeUserVo.getGoodsId());
                 informUserAddBo.setText("尊敬的用户:您购买的课程班级有效期还剩10天,未在" + resEnd + "前完成全部学时,可能会影响审核进度,最终导致学时无效,请尽快完成学习");
                 informUserAddBo.setText("尊敬的用户:您购买的课程班级有效期还剩10天,未在" + resEnd + "前完成全部学时,可能会影响审核进度,最终导致学时无效,请尽快完成学习");
                 iInformUserService.insertByAddBo(informUserAddBo);
                 iInformUserService.insertByAddBo(informUserAddBo);
+                context = "尊敬的用户:您购买的课程班级有效期还剩10天,未在" + resEnd + "前完成全部学时,可能会影响审核进度,最终导致学时无效,请尽快完成学习";
+                goodsName = goodsVo1.getGoodsName();
             }
             }
             if (informTenRemindVo.getNoteStatus().equals(1)) {
             if (informTenRemindVo.getNoteStatus().equals(1)) {
                 InformUserAddBo informUserAddBo = new InformUserAddBo();
                 InformUserAddBo informUserAddBo = new InformUserAddBo();
@@ -587,7 +629,8 @@ public class ScheduleServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVide
                 informUserAddBo.setGradeId(classTenGradeUserVo.getGradeId());
                 informUserAddBo.setGradeId(classTenGradeUserVo.getGradeId());
                 GoodsVo goodsVo1 = iGoodsService.queryById(classTenGradeUserVo.getGoodsId());
                 GoodsVo goodsVo1 = iGoodsService.queryById(classTenGradeUserVo.getGoodsId());
                 informUserAddBo.setText("尊敬的用户:您购买的" + goodsVo1.getGoodsName() + "课程班级有效期还剩10天,未在" + resEnd + "前完成全部学时,可能会影响审核进度,最终导致学时无效,请尽快完成学习");
                 informUserAddBo.setText("尊敬的用户:您购买的" + goodsVo1.getGoodsName() + "课程班级有效期还剩10天,未在" + resEnd + "前完成全部学时,可能会影响审核进度,最终导致学时无效,请尽快完成学习");
-
+                context = "尊敬的用户:您购买的" + goodsVo1.getGoodsName() + "课程班级有效期还剩10天,未在" + resEnd + "前完成全部学时,可能会影响审核进度,最终导致学时无效,请尽快完成学习";
+                goodsName = goodsVo1.getGoodsName();
                 UserVo userVo = iUserService.queryById(classTenGradeUserVo.getUserId());
                 UserVo userVo = iUserService.queryById(classTenGradeUserVo.getUserId());
                 Map<String, Object> param = new HashMap<>();
                 Map<String, Object> param = new HashMap<>();
                 param.put("goods", goodsVo1.getGoodsName());
                 param.put("goods", goodsVo1.getGoodsName());
@@ -596,6 +639,12 @@ public class ScheduleServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVide
                 if (Validator.isNotEmpty(IAliSmsService.sendInformSms(userVo.getTelphone(), JSON.toJSONString(param), remainingDaysValidityCode))) {
                 if (Validator.isNotEmpty(IAliSmsService.sendInformSms(userVo.getTelphone(), JSON.toJSONString(param), remainingDaysValidityCode))) {
                     iInformUserService.insertByAddBo(informUserAddBo);
                     iInformUserService.insertByAddBo(informUserAddBo);
                 }
                 }
+
+            }
+            //E管证督学通知
+            if (informTwentyRemindVo.getNoteStatus().equals(1) || informTwentyRemindVo.getGzhTpStatus().equals(1) || informTwentyRemindVo.getWayStatus().equals(1)){
+                iGoodsService.informOldSys(classTenGradeUserVo.getUserId(),classTenGradeUserVo.getGoodsId(),classTenGradeUserVo.getOrderGoodsId(),
+                        classTenGradeUserVo.getGradeId(),9,context, Arrays.asList(goodsName, resEnd,context));
             }
             }
         }
         }
 
 
@@ -609,7 +658,8 @@ public class ScheduleServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVide
             Date dateEnd = new Date(timeEndId);
             Date dateEnd = new Date(timeEndId);
             res = simpleDateFormat.format(date);
             res = simpleDateFormat.format(date);
             resEnd = simpleDateFormat.format(dateEnd);
             resEnd = simpleDateFormat.format(dateEnd);
-
+            String context = "";
+            String goodsName = "";
             if (informTenRemindVo.getWayStatus().equals(1)) {
             if (informTenRemindVo.getWayStatus().equals(1)) {
                 InformUserAddBo informUserAddBo = new InformUserAddBo();
                 InformUserAddBo informUserAddBo = new InformUserAddBo();
                 informUserAddBo.setUserId(classFiveGradeUserVo.getUserId());
                 informUserAddBo.setUserId(classFiveGradeUserVo.getUserId());
@@ -625,6 +675,8 @@ public class ScheduleServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVide
                 GoodsVo goodsVo1 = iGoodsService.queryById(classFiveGradeUserVo.getGoodsId());
                 GoodsVo goodsVo1 = iGoodsService.queryById(classFiveGradeUserVo.getGoodsId());
                 informUserAddBo.setText("尊敬的用户:您购买的课程班级有效期还剩5天,未在" + resEnd + "前完成全部学时,可能会影响审核进度,最终导致学时无效,请尽快完成学习");
                 informUserAddBo.setText("尊敬的用户:您购买的课程班级有效期还剩5天,未在" + resEnd + "前完成全部学时,可能会影响审核进度,最终导致学时无效,请尽快完成学习");
                 iInformUserService.insertByAddBo(informUserAddBo);
                 iInformUserService.insertByAddBo(informUserAddBo);
+                context = "尊敬的用户:您购买的课程班级有效期还剩5天,未在" + resEnd + "前完成全部学时,可能会影响审核进度,最终导致学时无效,请尽快完成学习";
+                goodsName = goodsVo1.getGoodsName();
             }
             }
             if (informTenRemindVo.getNoteStatus().equals(1)) {
             if (informTenRemindVo.getNoteStatus().equals(1)) {
                 InformUserAddBo informUserAddBo = new InformUserAddBo();
                 InformUserAddBo informUserAddBo = new InformUserAddBo();
@@ -640,6 +692,8 @@ public class ScheduleServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVide
                 informUserAddBo.setGradeId(classFiveGradeUserVo.getGradeId());
                 informUserAddBo.setGradeId(classFiveGradeUserVo.getGradeId());
                 GoodsVo goodsVo1 = iGoodsService.queryById(classFiveGradeUserVo.getGoodsId());
                 GoodsVo goodsVo1 = iGoodsService.queryById(classFiveGradeUserVo.getGoodsId());
                 informUserAddBo.setText("尊敬的用户:您购买的" + goodsVo1.getGoodsName() + "课程班级有效期还剩5天,未在" + resEnd + "前完成全部学时,可能会影响审核进度,最终导致学时无效,请尽快完成学习");
                 informUserAddBo.setText("尊敬的用户:您购买的" + goodsVo1.getGoodsName() + "课程班级有效期还剩5天,未在" + resEnd + "前完成全部学时,可能会影响审核进度,最终导致学时无效,请尽快完成学习");
+                context = "尊敬的用户:您购买的" + goodsVo1.getGoodsName() + "课程班级有效期还剩5天,未在" + resEnd + "前完成全部学时,可能会影响审核进度,最终导致学时无效,请尽快完成学习";
+                goodsName = goodsVo1.getGoodsName();
                 UserVo userVo = iUserService.queryById(classFiveGradeUserVo.getUserId());
                 UserVo userVo = iUserService.queryById(classFiveGradeUserVo.getUserId());
                 Map<String, Object> param = new HashMap<>();
                 Map<String, Object> param = new HashMap<>();
                 param.put("goods", goodsVo1.getGoodsName());
                 param.put("goods", goodsVo1.getGoodsName());
@@ -649,6 +703,12 @@ public class ScheduleServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVide
                     iInformUserService.insertByAddBo(informUserAddBo);
                     iInformUserService.insertByAddBo(informUserAddBo);
                 }
                 }
             }
             }
+
+            //E管证督学通知
+            if (informTwentyRemindVo.getNoteStatus().equals(1) || informTwentyRemindVo.getGzhTpStatus().equals(1) || informTwentyRemindVo.getWayStatus().equals(1)){
+                iGoodsService.informOldSys(classFiveGradeUserVo.getUserId(),classFiveGradeUserVo.getGoodsId(),classFiveGradeUserVo.getOrderGoodsId(),
+                        classFiveGradeUserVo.getGradeId(),9,context, Arrays.asList(goodsName, resEnd,context));
+            }
         }
         }
 
 
     }
     }
@@ -667,6 +727,7 @@ public class ScheduleServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVide
             res = simpleDateFormat.format(date);
             res = simpleDateFormat.format(date);
             String startTime = subscribeVo.getApplySiteStartTime();
             String startTime = subscribeVo.getApplySiteStartTime();
             String endTime = subscribeVo.getApplySiteEndTime();
             String endTime = subscribeVo.getApplySiteEndTime();
+            String content = "";
             if (informRemindVo.getWayStatus().equals(1)) {
             if (informRemindVo.getWayStatus().equals(1)) {
                 InformUserAddBo informUserAddBo = new InformUserAddBo();
                 InformUserAddBo informUserAddBo = new InformUserAddBo();
                 informUserAddBo.setUserId(subscribeVo.getUserId());
                 informUserAddBo.setUserId(subscribeVo.getUserId());
@@ -682,6 +743,8 @@ public class ScheduleServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVide
                 GoodsVo goodsVo1 = iGoodsService.queryById(subscribeVo.getGoodsId());
                 GoodsVo goodsVo1 = iGoodsService.queryById(subscribeVo.getGoodsId());
                 informUserAddBo.setText("尊敬的用户:您预约的施工现场专业人员" + goodsVo1.getGoodsName() + "考试将在" + res + "(" + startTime + "-" + endTime + ")进行," +
                 informUserAddBo.setText("尊敬的用户:您预约的施工现场专业人员" + goodsVo1.getGoodsName() + "考试将在" + res + "(" + startTime + "-" + endTime + ")进行," +
                         "考试地点:" + subscribeVo.getApplySiteAddress() + seatTxt);
                         "考试地点:" + subscribeVo.getApplySiteAddress() + seatTxt);
+                content = "尊敬的用户:您预约的施工现场专业人员" + goodsVo1.getGoodsName() + "考试将在" + res + "(" + startTime + "-" + endTime + ")进行," +
+                        "考试地点:" + subscribeVo.getApplySiteAddress() + seatTxt;
                 iInformUserService.insertByAddBo(informUserAddBo);
                 iInformUserService.insertByAddBo(informUserAddBo);
             }
             }
             if (informRemindVo.getNoteStatus().equals(1)) {
             if (informRemindVo.getNoteStatus().equals(1)) {
@@ -699,6 +762,8 @@ public class ScheduleServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVide
                 GoodsVo goodsVo1 = iGoodsService.queryById(subscribeVo.getGoodsId());
                 GoodsVo goodsVo1 = iGoodsService.queryById(subscribeVo.getGoodsId());
                 informUserAddBo.setText("尊敬的用户:您预约的施工现场专业人员" + goodsVo1.getGoodsName() + "考试将在" + res + "(" + startTime + "-" + endTime + ")进行," +
                 informUserAddBo.setText("尊敬的用户:您预约的施工现场专业人员" + goodsVo1.getGoodsName() + "考试将在" + res + "(" + startTime + "-" + endTime + ")进行," +
                         "考试地点:" + subscribeVo.getApplySiteAddress() + seatTxt);
                         "考试地点:" + subscribeVo.getApplySiteAddress() + seatTxt);
+                content = "尊敬的用户:您预约的施工现场专业人员" + goodsVo1.getGoodsName() + "考试将在" + res + "(" + startTime + "-" + endTime + ")进行," +
+                        "考试地点:" + subscribeVo.getApplySiteAddress() + seatTxt;
                 UserVo userVo = iUserService.queryById(subscribeVo.getUserId());
                 UserVo userVo = iUserService.queryById(subscribeVo.getUserId());
                 Map<String, Object> param = new HashMap<>();
                 Map<String, Object> param = new HashMap<>();
                 param.put("goods", goodsVo1.getGoodsName());
                 param.put("goods", goodsVo1.getGoodsName());
@@ -723,6 +788,8 @@ public class ScheduleServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVide
                 GoodsVo goodsVo1 = iGoodsService.queryById(subscribeVo.getGoodsId());
                 GoodsVo goodsVo1 = iGoodsService.queryById(subscribeVo.getGoodsId());
                 informUserAddBo.setText("尊敬的用户:您预约的施工现场专业人员" + goodsVo1.getGoodsName() + "考试将在" + res + "(" + startTime + "-" + endTime + ")进行," +
                 informUserAddBo.setText("尊敬的用户:您预约的施工现场专业人员" + goodsVo1.getGoodsName() + "考试将在" + res + "(" + startTime + "-" + endTime + ")进行," +
                         "考试地点:" + subscribeVo.getApplySiteAddress() + seatTxt);
                         "考试地点:" + subscribeVo.getApplySiteAddress() + seatTxt);
+                content = "尊敬的用户:您预约的施工现场专业人员" + goodsVo1.getGoodsName() + "考试将在" + res + "(" + startTime + "-" + endTime + ")进行," +
+                        "考试地点:" + subscribeVo.getApplySiteAddress() + seatTxt;
                 UserVo userVo = iUserService.queryById(subscribeVo.getUserId());
                 UserVo userVo = iUserService.queryById(subscribeVo.getUserId());
                 Map<String, Object> param = new HashMap<>();
                 Map<String, Object> param = new HashMap<>();
                 param.put("goods", goodsVo1.getGoodsName());
                 param.put("goods", goodsVo1.getGoodsName());
@@ -740,6 +807,13 @@ public class ScheduleServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVide
                     iWxLoginService.sendQdyExamTpMsg(userVo.getOpenId(),paramMap);
                     iWxLoginService.sendQdyExamTpMsg(userVo.getOpenId(),paramMap);
                 }
                 }
             }
             }
+
+            //E管证督学通知
+            if (informRemindVo.getNoteStatus().equals(1) || informRemindVo.getWayStatus().equals(1) || informRemindVo.getGzhTpStatus().equals(1)){
+                OrderGoods orderGoods = iOrderGoodsService.getById(subscribeVo.getOrderGoodsId());
+                iGoodsService.informOldSys(subscribeVo.getUserId(),subscribeVo.getGoodsId(),null,
+                        null,6,content, Arrays.asList(subscribeVo.getApplyName(), startTime ,subscribeVo.getApplySiteAddress()));
+            }
         }
         }
     }
     }
 
 
@@ -817,6 +891,16 @@ public class ScheduleServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVide
                        iWxLoginService.sendSignatureTpMsg(userVo.getOpenId(),paramMap);
                        iWxLoginService.sendSignatureTpMsg(userVo.getOpenId(),paramMap);
                    }
                    }
                }
                }
+               //E管证督学通知
+               if (informRemindVo.getNoteStatus().equals(1) || informRemindVo.getWayStatus().equals(1) || informRemindVo.getGzhTpStatus().equals(1)){
+                   String content = "尊敬的用户:您参加的"+subscribeVo.getApplyName()+"考试即将开始,您还没有在线上签署疫情防控承诺书。立即打开小程序签署承诺书!";
+                   OrderGoods orderGoods = iOrderGoodsService.getById(subscribeVo.getOrderGoodsId());
+                   User user = iUserService.getById(subscribeVo.getUserId());
+                   Goods goods = iGoodsService.getById(subscribeVo.getGoodsId());
+                   iGoodsService.informOldSys(subscribeVo.getUserId(),subscribeVo.getGoodsId(),subscribeVo.getOrderGoodsId(),
+                           orderGoods.getGradeId(),3,content, Arrays.asList(user.getRealname(), goods.getGoodsName() ,"未签署疫情防控承诺书",content));
+               }
+
                LambdaUpdateWrapper<UserSubscribe> objectLambdaUpdateWrapper = Wrappers.lambdaUpdate();
                LambdaUpdateWrapper<UserSubscribe> objectLambdaUpdateWrapper = Wrappers.lambdaUpdate();
                objectLambdaUpdateWrapper.eq(UserSubscribe::getSubscribeId, subscribeVo.getSubscribeId());
                objectLambdaUpdateWrapper.eq(UserSubscribe::getSubscribeId, subscribeVo.getSubscribeId());
                objectLambdaUpdateWrapper.set(UserSubscribe::getSignaturePushTime,DateUtils.getNowTime());
                objectLambdaUpdateWrapper.set(UserSubscribe::getSignaturePushTime,DateUtils.getNowTime());
@@ -1663,6 +1747,7 @@ public class ScheduleServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVide
             Long timeId = examUserApplyVo.getApplyEndTime() * 1000;
             Long timeId = examUserApplyVo.getApplyEndTime() * 1000;
             Date date = new Date(timeId);
             Date date = new Date(timeId);
             res = simpleDateFormat.format(date);
             res = simpleDateFormat.format(date);
+            String content = "";
             if (informRemindVo.getWayStatus().equals(1)) {
             if (informRemindVo.getWayStatus().equals(1)) {
                 InformUserAddBo informUserAddBo = new InformUserAddBo();
                 InformUserAddBo informUserAddBo = new InformUserAddBo();
                 informUserAddBo.setUserId(examUserApplyVo.getUserId());
                 informUserAddBo.setUserId(examUserApplyVo.getUserId());
@@ -1677,6 +1762,7 @@ public class ScheduleServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVide
                 informUserAddBo.setGradeId(examUserApplyVo.getGradeId());
                 informUserAddBo.setGradeId(examUserApplyVo.getGradeId());
                 informUserAddBo.setOrderGoodsId(examUserApplyVo.getOrderGoodsId());
                 informUserAddBo.setOrderGoodsId(examUserApplyVo.getOrderGoodsId());
                 informUserAddBo.setText("尊敬的用户:七大员新考考试预约已经开始,预约截至时间" + res + ",请马上点击进行预约考试。");
                 informUserAddBo.setText("尊敬的用户:七大员新考考试预约已经开始,预约截至时间" + res + ",请马上点击进行预约考试。");
+                content = "尊敬的用户:七大员新考考试预约已经开始,预约截至时间" + res + ",请马上点击进行预约考试。";
                 iInformUserService.insertByAddBo(informUserAddBo);
                 iInformUserService.insertByAddBo(informUserAddBo);
             }
             }
             if (informRemindVo.getNoteStatus().equals(1)) {
             if (informRemindVo.getNoteStatus().equals(1)) {
@@ -1700,6 +1786,7 @@ public class ScheduleServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVide
                 if (Validator.isNotEmpty(IAliSmsService.sendInformSms(userVo.getTelphone(), JSON.toJSONString(param), bookingReminder))) {
                 if (Validator.isNotEmpty(IAliSmsService.sendInformSms(userVo.getTelphone(), JSON.toJSONString(param), bookingReminder))) {
                     iInformUserService.insertByAddBo(informUserAddBo);
                     iInformUserService.insertByAddBo(informUserAddBo);
                 }
                 }
+                content = "尊敬的用户:七大员新考考试预约已经开始,预约截至时间" + res + ",请马上点击进行预约考试。";
             }
             }
             if (informRemindVo.getGzhTpStatus().equals(1)) {
             if (informRemindVo.getGzhTpStatus().equals(1)) {
                 InformUserAddBo informUserAddBo = new InformUserAddBo();
                 InformUserAddBo informUserAddBo = new InformUserAddBo();
@@ -1717,7 +1804,7 @@ public class ScheduleServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVide
                 informUserAddBo.setText("尊敬的用户:七大员新考考试预约已经开始,预约截至时间" + res + ",请马上点击进行预约考试。");
                 informUserAddBo.setText("尊敬的用户:七大员新考考试预约已经开始,预约截至时间" + res + ",请马上点击进行预约考试。");
                 UserVo userVo = iUserService.queryById(examUserApplyVo.getUserId());
                 UserVo userVo = iUserService.queryById(examUserApplyVo.getUserId());
                 iInformUserService.insertByAddBo(informUserAddBo);
                 iInformUserService.insertByAddBo(informUserAddBo);
-
+                content = "尊敬的用户:七大员新考考试预约已经开始,预约截至时间" + res + ",请马上点击进行预约考试。";
                 if(Validator.isNotEmpty(userVo.getOpenId())){
                 if(Validator.isNotEmpty(userVo.getOpenId())){
                     String startTime = DateUtils.timestampToDate(examUserApplyVo.getApplyStartTime() );
                     String startTime = DateUtils.timestampToDate(examUserApplyVo.getApplyStartTime() );
                     String endTime = DateUtils.timestampToDate(examUserApplyVo.getApplyEndTime() );
                     String endTime = DateUtils.timestampToDate(examUserApplyVo.getApplyEndTime() );
@@ -1732,6 +1819,11 @@ public class ScheduleServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVide
                     iWxLoginService.sendQdySubTpMsg(userVo.getOpenId(),paramMap);
                     iWxLoginService.sendQdySubTpMsg(userVo.getOpenId(),paramMap);
                 }
                 }
             }
             }
+            //E管证督学通知
+            if (informRemindVo.getNoteStatus().equals(1) || informRemindVo.getWayStatus().equals(1) || informRemindVo.getGzhTpStatus().equals(1)){
+                iGoodsService.informOldSys(examUserApplyVo.getUserId(),examUserApplyVo.getGoodsId(),examUserApplyVo.getOrderGoodsId(),
+                        examUserApplyVo.getGradeId(),5,content, Arrays.asList("七大员新考", "七大员新考考试预约已经开始",res   ,content));
+            }
         }
         }
     }
     }
 
 
@@ -1777,6 +1869,7 @@ public class ScheduleServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVide
             List<OrderGoodsVo> orderGoodsVoList = iOrderGoodsService.selectBuyUserList(mockApplyVo.getMockMajorSubjectId());
             List<OrderGoodsVo> orderGoodsVoList = iOrderGoodsService.selectBuyUserList(mockApplyVo.getMockMajorSubjectId());
             orderGoodsVoList.forEach(orderGoodsVo -> {
             orderGoodsVoList.forEach(orderGoodsVo -> {
             InformRemindVo informRemindVo = informRemindService.queryByName("一二建考前模考报名提醒");
             InformRemindVo informRemindVo = informRemindService.queryByName("一二建考前模考报名提醒");
+            String content = "";
             if (informRemindVo.getWayStatus().equals(1)) {
             if (informRemindVo.getWayStatus().equals(1)) {
                 InformUserAddBo informUserAddBo = new InformUserAddBo();
                 InformUserAddBo informUserAddBo = new InformUserAddBo();
                 informUserAddBo.setUserId(orderGoodsVo.getUserId());
                 informUserAddBo.setUserId(orderGoodsVo.getUserId());
@@ -1788,6 +1881,7 @@ public class ScheduleServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVide
                 informUserAddBo.setSystemStatus(1);
                 informUserAddBo.setSystemStatus(1);
                 informUserAddBo.setRemind("模考预约提醒");
                 informUserAddBo.setRemind("模考预约提醒");
                 informUserAddBo.setText("尊敬的用户:【" + mockApplyVo.getBusinessName() + mockApplyVo.getProjectName() + "】考前模拟考试将开始报名参加模拟考试。请登录【祥粤云小程序】或【web.xyyxt.net】进行报名。");
                 informUserAddBo.setText("尊敬的用户:【" + mockApplyVo.getBusinessName() + mockApplyVo.getProjectName() + "】考前模拟考试将开始报名参加模拟考试。请登录【祥粤云小程序】或【web.xyyxt.net】进行报名。");
+                content = "尊敬的用户:【" + mockApplyVo.getBusinessName() + mockApplyVo.getProjectName() + "】考前模拟考试将开始报名参加模拟考试。";
                 iInformUserService.insertByAddBo(informUserAddBo);
                 iInformUserService.insertByAddBo(informUserAddBo);
             }
             }
             if (informRemindVo.getNoteStatus().equals(1)) {
             if (informRemindVo.getNoteStatus().equals(1)) {
@@ -1801,6 +1895,7 @@ public class ScheduleServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVide
                 informUserAddBo.setSystemStatus(3);
                 informUserAddBo.setSystemStatus(3);
                 informUserAddBo.setRemind("模考预约提醒");
                 informUserAddBo.setRemind("模考预约提醒");
                 informUserAddBo.setText("尊敬的用户:【" + mockApplyVo.getBusinessName() + mockApplyVo.getProjectName() + "】考前模拟考试将开始报名参加模拟考试。请登录【祥粤云小程序】或【web.xyyxt.net】进行报名。");
                 informUserAddBo.setText("尊敬的用户:【" + mockApplyVo.getBusinessName() + mockApplyVo.getProjectName() + "】考前模拟考试将开始报名参加模拟考试。请登录【祥粤云小程序】或【web.xyyxt.net】进行报名。");
+                content = "尊敬的用户:【" + mockApplyVo.getBusinessName() + mockApplyVo.getProjectName() + "】考前模拟考试将开始报名参加模拟考试。";
                 UserVo userVo = iUserService.queryById(orderGoodsVo.getUserId());
                 UserVo userVo = iUserService.queryById(orderGoodsVo.getUserId());
                 Map<String, Object> param = new HashMap<>();
                 Map<String, Object> param = new HashMap<>();
                 param.put("businessName", mockApplyVo.getBusinessName() + mockApplyVo.getProjectName());
                 param.put("businessName", mockApplyVo.getBusinessName() + mockApplyVo.getProjectName());
@@ -1808,6 +1903,11 @@ public class ScheduleServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVide
                     iInformUserService.insertByAddBo(informUserAddBo);
                     iInformUserService.insertByAddBo(informUserAddBo);
                 }
                 }
             }
             }
+                //E管证督学通知
+                if (informRemindVo.getNoteStatus().equals(1) || informRemindVo.getWayStatus().equals(1) || informRemindVo.getGzhTpStatus().equals(1)){
+                    iGoodsService.informOldSys(orderGoodsVo.getUserId(),orderGoodsVo.getGoodsId(),null,
+                            null,5,content, Arrays.asList("一二建考前模考", content ,"","一二建考前模考报名提醒"));
+                }
             });
             });
         });
         });
         mockApplyVos.forEach(mockApplyVo -> {
         mockApplyVos.forEach(mockApplyVo -> {
@@ -1855,6 +1955,7 @@ public class ScheduleServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVide
                 bo1.setSubscribeId(subscribeVo.getSubscribeId());
                 bo1.setSubscribeId(subscribeVo.getSubscribeId());
                 bo1.setHasMockRemind(1);
                 bo1.setHasMockRemind(1);
                 iUserMockSubscribeService.updateByEditBo(bo1);
                 iUserMockSubscribeService.updateByEditBo(bo1);
+                String content = "";
                 if (subscribeVo.getMockRemind() == 1) {
                 if (subscribeVo.getMockRemind() == 1) {
                     if (informRemindVo.getWayStatus().equals(1)) {
                     if (informRemindVo.getWayStatus().equals(1)) {
                         InformUserAddBo informUserAddBo = new InformUserAddBo();
                         InformUserAddBo informUserAddBo = new InformUserAddBo();
@@ -1867,6 +1968,7 @@ public class ScheduleServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVide
                         informUserAddBo.setSystemStatus(1);
                         informUserAddBo.setSystemStatus(1);
                         informUserAddBo.setRemind("模考提醒");
                         informUserAddBo.setRemind("模考提醒");
                         informUserAddBo.setText("祥粤云学堂提醒:您学习【" + courseSubject.getSubjectName() + "】科目中的【" + mockApply.getApplyName() + "模考】已将于60分钟后开始考试,请及时在【祥粤云小程序】或【web.xyyxt.net】进行考试。");
                         informUserAddBo.setText("祥粤云学堂提醒:您学习【" + courseSubject.getSubjectName() + "】科目中的【" + mockApply.getApplyName() + "模考】已将于60分钟后开始考试,请及时在【祥粤云小程序】或【web.xyyxt.net】进行考试。");
+                        content = "祥粤云学堂提醒:您学习【" + courseSubject.getSubjectName() + "】科目中的【" + mockApply.getApplyName() + "模考】已将于60分钟后开始考试。";
                         iInformUserService.insertByAddBo(informUserAddBo);
                         iInformUserService.insertByAddBo(informUserAddBo);
                     }
                     }
                 }
                 }
@@ -1881,6 +1983,7 @@ public class ScheduleServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVide
                     informUserAddBo.setSystemStatus(3);
                     informUserAddBo.setSystemStatus(3);
                     informUserAddBo.setRemind("模考提醒");
                     informUserAddBo.setRemind("模考提醒");
                     informUserAddBo.setText("祥粤云学堂提醒:您学习【" + courseSubject.getSubjectName() + "】科目中的【" + mockApply.getApplyName() + "模考】已将于60分钟后开始考试,请及时在【祥粤云小程序】或【web.xyyxt.net】进行考试。");
                     informUserAddBo.setText("祥粤云学堂提醒:您学习【" + courseSubject.getSubjectName() + "】科目中的【" + mockApply.getApplyName() + "模考】已将于60分钟后开始考试,请及时在【祥粤云小程序】或【web.xyyxt.net】进行考试。");
+                    content = "祥粤云学堂提醒:您学习【" + courseSubject.getSubjectName() + "】科目中的【" + mockApply.getApplyName() + "模考】已将于60分钟后开始考试。";
                     UserVo userVo = iUserService.queryById(subscribeVo.getUserId());
                     UserVo userVo = iUserService.queryById(subscribeVo.getUserId());
                     Map<String, Object> param = new HashMap<>();
                     Map<String, Object> param = new HashMap<>();
                     param.put("subjectName", courseSubject.getSubjectName());
                     param.put("subjectName", courseSubject.getSubjectName());
@@ -1889,6 +1992,12 @@ public class ScheduleServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVide
                         iInformUserService.insertByAddBo(informUserAddBo);
                         iInformUserService.insertByAddBo(informUserAddBo);
                     }
                     }
                 }
                 }
+
+                //E管证督学通知
+                if (informRemindVo.getNoteStatus().equals(1) || informRemindVo.getWayStatus().equals(1) || informRemindVo.getGzhTpStatus().equals(1)){
+                    iGoodsService.informOldSys(subscribeVo.getUserId(),null,null,
+                            null,6,content, Arrays.asList(mockApply.getApplyName(), DateUtils.timestampToDate(mockApply.getApplyStartTime()) ,""));
+                }
             }
             }
         }
         }
     }
     }
@@ -1899,6 +2008,7 @@ public class ScheduleServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVide
         userMockSubscribeVoList.removeIf(userMockSubscribeVo -> System.currentTimeMillis()/1000 + 3600 <= userMockSubscribeVo.getLiveStartTime());
         userMockSubscribeVoList.removeIf(userMockSubscribeVo -> System.currentTimeMillis()/1000 + 3600 <= userMockSubscribeVo.getLiveStartTime());
         for (UserMockSubscribeVo userMockSubscribeVo : userMockSubscribeVoList) {
         for (UserMockSubscribeVo userMockSubscribeVo : userMockSubscribeVoList) {
             InformRemindVo informRemindVo = informRemindService.queryByName("一二建考前直播前一小时提醒");
             InformRemindVo informRemindVo = informRemindService.queryByName("一二建考前直播前一小时提醒");
+            String content = "";
             if (userMockSubscribeVo.getLiveSubscribe() == 1) {
             if (userMockSubscribeVo.getLiveSubscribe() == 1) {
                 if (informRemindVo.getWayStatus().equals(1)) {
                 if (informRemindVo.getWayStatus().equals(1)) {
                     InformUserAddBo informUserAddBo = new InformUserAddBo();
                     InformUserAddBo informUserAddBo = new InformUserAddBo();
@@ -1911,6 +2021,7 @@ public class ScheduleServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVide
                     informUserAddBo.setSystemStatus(1);
                     informUserAddBo.setSystemStatus(1);
                     informUserAddBo.setRemind("直播开课提醒");
                     informUserAddBo.setRemind("直播开课提醒");
                     informUserAddBo.setText("祥粤云学堂提醒:您学习【" + userMockSubscribeVo.getSubjectName() + "】科目中的【" + userMockSubscribeVo.getName() + "直播】已将于60分钟后开始直播,请及时在【祥粤云小程序】或【web.xyyxt.net】进行观看。");
                     informUserAddBo.setText("祥粤云学堂提醒:您学习【" + userMockSubscribeVo.getSubjectName() + "】科目中的【" + userMockSubscribeVo.getName() + "直播】已将于60分钟后开始直播,请及时在【祥粤云小程序】或【web.xyyxt.net】进行观看。");
+                    content = "祥粤云学堂提醒:您学习【" + userMockSubscribeVo.getSubjectName() + "】科目中的【" + userMockSubscribeVo.getName() + "直播】已将于60分钟后开始直播。";
                     iInformUserService.insertByAddBo(informUserAddBo);
                     iInformUserService.insertByAddBo(informUserAddBo);
                 }
                 }
             }
             }
@@ -1925,6 +2036,7 @@ public class ScheduleServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVide
                 informUserAddBo.setSystemStatus(3);
                 informUserAddBo.setSystemStatus(3);
                 informUserAddBo.setRemind("直播开课提醒");
                 informUserAddBo.setRemind("直播开课提醒");
                 informUserAddBo.setText("祥粤云学堂提醒:您学习【" + userMockSubscribeVo.getSubjectName() + "】科目中的【" + userMockSubscribeVo.getName() + "直播】已将于60分钟后开始直播,请及时在【祥粤云小程序】或【web.xyyxt.net】进行观看。");
                 informUserAddBo.setText("祥粤云学堂提醒:您学习【" + userMockSubscribeVo.getSubjectName() + "】科目中的【" + userMockSubscribeVo.getName() + "直播】已将于60分钟后开始直播,请及时在【祥粤云小程序】或【web.xyyxt.net】进行观看。");
+                content = "祥粤云学堂提醒:您学习【" + userMockSubscribeVo.getSubjectName() + "】科目中的【" + userMockSubscribeVo.getName() + "直播】已将于60分钟后开始直播。";
                 UserVo userVo = iUserService.queryById(userMockSubscribeVo.getUserId());
                 UserVo userVo = iUserService.queryById(userMockSubscribeVo.getUserId());
                 Map<String, Object> param = new HashMap<>();
                 Map<String, Object> param = new HashMap<>();
                 param.put("subjectName", userMockSubscribeVo.getSubjectName());
                 param.put("subjectName", userMockSubscribeVo.getSubjectName());
@@ -1934,6 +2046,12 @@ public class ScheduleServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVide
                     iInformUserService.insertByAddBo(informUserAddBo);
                     iInformUserService.insertByAddBo(informUserAddBo);
                 }
                 }
             }
             }
+
+            //E管证督学通知
+            if (informRemindVo.getNoteStatus().equals(1) || informRemindVo.getWayStatus().equals(1) || informRemindVo.getGzhTpStatus().equals(1)){
+                iGoodsService.informOldSys(userMockSubscribeVo.getUserId(),null,null,
+                        null,5,content, Arrays.asList(userMockSubscribeVo.getName() + "直播", DateUtils.timestampToDate(userMockSubscribeVo.getLiveStartTime()) ,"","一二建考前直播前一小时提醒"));
+            }
             UserMockSubscribeEditBo bo1 = new UserMockSubscribeEditBo();
             UserMockSubscribeEditBo bo1 = new UserMockSubscribeEditBo();
             bo1.setSubscribeId(userMockSubscribeVo.getSubscribeId());
             bo1.setSubscribeId(userMockSubscribeVo.getSubscribeId());
             bo1.setHasLiveSubscribe(1);
             bo1.setHasLiveSubscribe(1);
@@ -2022,6 +2140,14 @@ public class ScheduleServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVide
                         iWxLoginService.sendSmallTpMsg(userVo.getOpenId(),paramMap);
                         iWxLoginService.sendSmallTpMsg(userVo.getOpenId(),paramMap);
                     }
                     }
                 }
                 }
+
+                //E管证督学通知
+                if (informRemindVo.getNoteStatus().equals(1) || informRemindVo.getWayStatus().equals(1) || informRemindVo.getGzhTpStatus().equals(1)){
+                    User user = iUserService.getById(goodsVo.getUserId());
+                    String content = "您开通《"+goods.getGoodsName()+"》课程已有2天,但未开始学习,请尽快去学习吧。";
+                    iGoodsService.informOldSys(goodsVo.getUserId(),goodsVo.getGoodsId(),goodsVo.getOrderGoodsId(),
+                            goodsVo.getGradeId(),3,content, Arrays.asList(user.getRealname(), goodsVo.getGoodsName() ,"未开始学习",content));
+                }
             }
             }
         }
         }
     }
     }
@@ -2106,6 +2232,14 @@ public class ScheduleServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVide
                         iWxLoginService.sendSmallTpMsg(userVo.getOpenId(),paramMap);
                         iWxLoginService.sendSmallTpMsg(userVo.getOpenId(),paramMap);
                     }
                     }
                 }
                 }
+
+                //E管证督学通知
+                if (informRemindVo.getNoteStatus().equals(1) || informRemindVo.getWayStatus().equals(1) || informRemindVo.getGzhTpStatus().equals(1)){
+                    User user = iUserService.getById(goodsVo.getUserId());
+                    String content = "您开通《"+goods.getGoodsName()+"》课程已有5天,但未开始学习,请尽快去学习吧。";
+                    iGoodsService.informOldSys(goodsVo.getUserId(),goodsVo.getGoodsId(),goodsVo.getOrderGoodsId(),
+                            goodsVo.getGradeId(),3,content, Arrays.asList(user.getRealname(), goodsVo.getGoodsName() ,"未开始学习",content));
+                }
             }
             }
         }
         }
     }
     }
@@ -2190,6 +2324,14 @@ public class ScheduleServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVide
                         iWxLoginService.sendSmallTpMsg(userVo.getOpenId(),paramMap);
                         iWxLoginService.sendSmallTpMsg(userVo.getOpenId(),paramMap);
                     }
                     }
                 }
                 }
+
+                //E管证督学通知
+                if (informRemindVo.getNoteStatus().equals(1) || informRemindVo.getWayStatus().equals(1) || informRemindVo.getGzhTpStatus().equals(1)){
+                    User user = iUserService.getById(goodsVo.getUserId());
+                    String content = "您开通《"+goods.getGoodsName()+"》课程已有15天,但未开始学习,请尽快去学习吧。";
+                    iGoodsService.informOldSys(goodsVo.getUserId(),goodsVo.getGoodsId(),goodsVo.getOrderGoodsId(),
+                            goodsVo.getGradeId(),3,content, Arrays.asList(user.getRealname(), goodsVo.getGoodsName() ,"未开始学习",content));
+                }
             }
             }
         }
         }
     }
     }
@@ -2274,6 +2416,14 @@ public class ScheduleServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVide
                         iWxLoginService.sendSmallTpMsg(userVo.getOpenId(),paramMap);
                         iWxLoginService.sendSmallTpMsg(userVo.getOpenId(),paramMap);
                     }
                     }
                 }
                 }
+
+                //E管证督学通知
+                if (informRemindVo.getNoteStatus().equals(1) || informRemindVo.getWayStatus().equals(1) || informRemindVo.getGzhTpStatus().equals(1)){
+                    User user = iUserService.getById(goodsVo.getUserId());
+                    String content = "您开通《"+goods.getGoodsName()+"》课程已有30天,但未开始学习,请尽快去学习吧。";
+                    iGoodsService.informOldSys(goodsVo.getUserId(),goodsVo.getGoodsId(),goodsVo.getOrderGoodsId(),
+                            goodsVo.getGradeId(),3,content, Arrays.asList(user.getRealname(), goodsVo.getGoodsName() ,"未开始学习",content));
+                }
             }
             }
         }
         }
     }
     }
@@ -2358,6 +2508,14 @@ public class ScheduleServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVide
                         iWxLoginService.sendSmallTpMsg(userVo.getOpenId(),paramMap);
                         iWxLoginService.sendSmallTpMsg(userVo.getOpenId(),paramMap);
                     }
                     }
                 }
                 }
+
+                //E管证督学通知
+                if (informRemindVo.getNoteStatus().equals(1) || informRemindVo.getWayStatus().equals(1) || informRemindVo.getGzhTpStatus().equals(1)){
+                    User user = iUserService.getById(goodsVo.getUserId());
+                    String content = "您开通《"+goods.getGoodsName()+"》课程已有55天,但未开始学习,请尽快去学习吧。";
+                    iGoodsService.informOldSys(goodsVo.getUserId(),goodsVo.getGoodsId(),goodsVo.getOrderGoodsId(),
+                            goodsVo.getGradeId(),3,content, Arrays.asList(user.getRealname(), goodsVo.getGoodsName() ,"未开始学习",content));
+                }
             }
             }
         }
         }
     }
     }
@@ -2718,6 +2876,14 @@ public class ScheduleServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVide
                         iWxLoginService.sendSmallTpMsg(userVo.getOpenId(),paramMap);
                         iWxLoginService.sendSmallTpMsg(userVo.getOpenId(),paramMap);
                     }
                     }
                 }
                 }
+
+                //E管证督学通知
+                if (informRemindVo.getNoteStatus().equals(1) || informRemindVo.getWayStatus().equals(1) || informRemindVo.getGzhTpStatus().equals(1)){
+                    User user = iUserService.getById(goodsVo.getUserId());
+                    String content = "您已超过3天没有学习《"+goods.getGoodsName()+"》课程,为了您的学习效果,请尽快去学习吧。";
+                    iGoodsService.informOldSys(goodsVo.getUserId(),goodsVo.getGoodsId(),goodsVo.getOrderGoodsId(),
+                            goodsVo.getGradeId(),3,content, Arrays.asList(user.getRealname(), goodsVo.getGoodsName() ,"3天没有学习",content));
+                }
             }
             }
         }
         }
     }
     }
@@ -2800,6 +2966,14 @@ public class ScheduleServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVide
                         iWxLoginService.sendSmallTpMsg(userVo.getOpenId(),paramMap);
                         iWxLoginService.sendSmallTpMsg(userVo.getOpenId(),paramMap);
                     }
                     }
                 }
                 }
+
+                //E管证督学通知
+                if (informRemindVo.getNoteStatus().equals(1) || informRemindVo.getWayStatus().equals(1) || informRemindVo.getGzhTpStatus().equals(1)){
+                    User user = iUserService.getById(goodsVo.getUserId());
+                    String content = "您已超过5天没有学习《"+goods.getGoodsName()+"》课程,为了您的学习效果,请尽快去学习吧。";
+                    iGoodsService.informOldSys(goodsVo.getUserId(),goodsVo.getGoodsId(),goodsVo.getOrderGoodsId(),
+                            goodsVo.getGradeId(),3,content, Arrays.asList(user.getRealname(), goodsVo.getGoodsName() ,"5天没有学习",content));
+                }
             }
             }
         }
         }
     }
     }

+ 44 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/user/service/impl/UserSubscribeServiceImpl.java

@@ -345,6 +345,7 @@ public class UserSubscribeServiceImpl extends ServiceImpl<UserSubscribeMapper, U
         //查找商品是否在此短信业务层次
         //查找商品是否在此短信业务层次
         Long count = baseMapper.sendExamSucceed(bo.getGoodsId());
         Long count = baseMapper.sendExamSucceed(bo.getGoodsId());
         if (count > 0) {
         if (count > 0) {
+            String content = "";
             if (informRemindVo.getWayStatus().equals(1)) {
             if (informRemindVo.getWayStatus().equals(1)) {
                 InformUserAddBo informUserAddBo = new InformUserAddBo();
                 InformUserAddBo informUserAddBo = new InformUserAddBo();
                 informUserAddBo.setUserId(bo.getUserId());
                 informUserAddBo.setUserId(bo.getUserId());
@@ -358,6 +359,7 @@ public class UserSubscribeServiceImpl extends ServiceImpl<UserSubscribeMapper, U
                 informUserAddBo.setGoodsId(bo.getGoodsId());
                 informUserAddBo.setGoodsId(bo.getGoodsId());
                 GoodsVo goodsVo1 = iGoodsService.queryById(bo.getGoodsId());
                 GoodsVo goodsVo1 = iGoodsService.queryById(bo.getGoodsId());
                 informUserAddBo.setText("尊敬的用户:已成功预约施工现场专业人员" + goodsVo1.getGoodsName() + "考试");
                 informUserAddBo.setText("尊敬的用户:已成功预约施工现场专业人员" + goodsVo1.getGoodsName() + "考试");
+                content = "尊敬的用户:已成功预约施工现场专业人员" + goodsVo1.getGoodsName() + "考试";
                 iInformUserService.insertByAddBo(informUserAddBo);
                 iInformUserService.insertByAddBo(informUserAddBo);
             }
             }
             if (informRemindVo.getNoteStatus().equals(1)) {
             if (informRemindVo.getNoteStatus().equals(1)) {
@@ -373,6 +375,7 @@ public class UserSubscribeServiceImpl extends ServiceImpl<UserSubscribeMapper, U
                 informUserAddBo.setGoodsId(bo.getGoodsId());
                 informUserAddBo.setGoodsId(bo.getGoodsId());
                 GoodsVo goodsVo1 = iGoodsService.queryById(bo.getGoodsId());
                 GoodsVo goodsVo1 = iGoodsService.queryById(bo.getGoodsId());
                 informUserAddBo.setText("尊敬的用户:已成功预约施工现场专业人员" + goodsVo1.getGoodsName() + "考试");
                 informUserAddBo.setText("尊敬的用户:已成功预约施工现场专业人员" + goodsVo1.getGoodsName() + "考试");
+                content = "尊敬的用户:已成功预约施工现场专业人员" + goodsVo1.getGoodsName() + "考试";
                 iInformUserService.insertByAddBo(informUserAddBo);
                 iInformUserService.insertByAddBo(informUserAddBo);
                 UserVo userVo = iUserService.queryById(bo.getUserId());
                 UserVo userVo = iUserService.queryById(bo.getUserId());
                 Map<String, Object> param = new HashMap<>();
                 Map<String, Object> param = new HashMap<>();
@@ -392,6 +395,7 @@ public class UserSubscribeServiceImpl extends ServiceImpl<UserSubscribeMapper, U
                 informUserAddBo.setGoodsId(bo.getGoodsId());
                 informUserAddBo.setGoodsId(bo.getGoodsId());
                 GoodsVo goodsVo1 = iGoodsService.queryById(bo.getGoodsId());
                 GoodsVo goodsVo1 = iGoodsService.queryById(bo.getGoodsId());
                 informUserAddBo.setText("尊敬的用户:已成功预约施工现场专业人员" + goodsVo1.getGoodsName() + "考试");
                 informUserAddBo.setText("尊敬的用户:已成功预约施工现场专业人员" + goodsVo1.getGoodsName() + "考试");
+                content = "尊敬的用户:已成功预约施工现场专业人员" + goodsVo1.getGoodsName() + "考试";
                 iInformUserService.insertByAddBo(informUserAddBo);
                 iInformUserService.insertByAddBo(informUserAddBo);
                 UserVo userVo = iUserService.queryById(bo.getUserId());
                 UserVo userVo = iUserService.queryById(bo.getUserId());
                 if(Validator.isNotEmpty(userVo.getOpenId())){
                 if(Validator.isNotEmpty(userVo.getOpenId())){
@@ -405,6 +409,13 @@ public class UserSubscribeServiceImpl extends ServiceImpl<UserSubscribeMapper, U
                     iWxLoginService.sendQdySubStatusTpMsg(userVo.getOpenId(),paramMap);
                     iWxLoginService.sendQdySubStatusTpMsg(userVo.getOpenId(),paramMap);
                 }
                 }
             }
             }
+
+            //E管证督学通知
+            if (informRemindVo.getNoteStatus().equals(1) || informRemindVo.getWayStatus().equals(1) || informRemindVo.getGzhTpStatus().equals(1)){
+                ExamApplyVo examApplyVo = examApplyMapper.selectByApply(bo.getApplyId());
+                iGoodsService.informOldSys(bo.getUserId(),bo.getGoodsId(),null,
+                        null,17,content, Arrays.asList(DateUtils.getDate(), examApplyVo.getApplyName(),"已成功" ,content,"您已成功预约施工现场专业人员考试"));
+            }
         }
         }
 
 
     }
     }
@@ -603,6 +614,7 @@ public class UserSubscribeServiceImpl extends ServiceImpl<UserSubscribeMapper, U
                     businessId += baseMapper.queryBusinessId(subscribe, informRemindBusiness.getBusinessId());
                     businessId += baseMapper.queryBusinessId(subscribe, informRemindBusiness.getBusinessId());
                 }
                 }
                 if (businessId > 0) {
                 if (businessId > 0) {
+                    String content = "";
                     if (informRemindVo.getWayStatus().equals(1)) {
                     if (informRemindVo.getWayStatus().equals(1)) {
                         InformUserAddBo informUserAddBo = new InformUserAddBo();
                         InformUserAddBo informUserAddBo = new InformUserAddBo();
                         informUserAddBo.setUserId(userSubscribeVo.getUserId());
                         informUserAddBo.setUserId(userSubscribeVo.getUserId());
@@ -616,6 +628,7 @@ public class UserSubscribeServiceImpl extends ServiceImpl<UserSubscribeMapper, U
                         informUserAddBo.setGoodsId(userSubscribeVo.getGoodsId());
                         informUserAddBo.setGoodsId(userSubscribeVo.getGoodsId());
                         GoodsVo goodsVo1 = iGoodsService.queryById(userSubscribeVo.getGoodsId());
                         GoodsVo goodsVo1 = iGoodsService.queryById(userSubscribeVo.getGoodsId());
                         informUserAddBo.setText("尊敬的用户:已取消预约施工现场专业人员" + goodsVo1.getGoodsName() + "考试。");
                         informUserAddBo.setText("尊敬的用户:已取消预约施工现场专业人员" + goodsVo1.getGoodsName() + "考试。");
+                        content = "尊敬的用户:已取消预约施工现场专业人员" + goodsVo1.getGoodsName() + "考试。";
                         iInformUserService.insertByAddBo(informUserAddBo);
                         iInformUserService.insertByAddBo(informUserAddBo);
                     }
                     }
                     if (informRemindVo.getNoteStatus().equals(1)) {
                     if (informRemindVo.getNoteStatus().equals(1)) {
@@ -631,6 +644,7 @@ public class UserSubscribeServiceImpl extends ServiceImpl<UserSubscribeMapper, U
                         informUserAddBo.setGoodsId(userSubscribeVo.getGoodsId());
                         informUserAddBo.setGoodsId(userSubscribeVo.getGoodsId());
                         GoodsVo goodsVo1 = iGoodsService.queryById(userSubscribeVo.getGoodsId());
                         GoodsVo goodsVo1 = iGoodsService.queryById(userSubscribeVo.getGoodsId());
                         informUserAddBo.setText("尊敬的用户:已取消预约施工现场专业人员" + goodsVo1.getGoodsName() + "考试。");
                         informUserAddBo.setText("尊敬的用户:已取消预约施工现场专业人员" + goodsVo1.getGoodsName() + "考试。");
+                        content = "尊敬的用户:已取消预约施工现场专业人员" + goodsVo1.getGoodsName() + "考试。";
                         iInformUserService.insertByAddBo(informUserAddBo);
                         iInformUserService.insertByAddBo(informUserAddBo);
                         UserVo userVo = iUserService.queryById(userSubscribeVo.getUserId());
                         UserVo userVo = iUserService.queryById(userSubscribeVo.getUserId());
                         Map<String, Object> param = new HashMap<>();
                         Map<String, Object> param = new HashMap<>();
@@ -650,6 +664,7 @@ public class UserSubscribeServiceImpl extends ServiceImpl<UserSubscribeMapper, U
                         informUserAddBo.setGoodsId(userSubscribeVo.getGoodsId());
                         informUserAddBo.setGoodsId(userSubscribeVo.getGoodsId());
                         GoodsVo goodsVo1 = iGoodsService.queryById(userSubscribeVo.getGoodsId());
                         GoodsVo goodsVo1 = iGoodsService.queryById(userSubscribeVo.getGoodsId());
                         informUserAddBo.setText("尊敬的用户:已取消预约施工现场专业人员" + goodsVo1.getGoodsName() + "考试。");
                         informUserAddBo.setText("尊敬的用户:已取消预约施工现场专业人员" + goodsVo1.getGoodsName() + "考试。");
+                        content = "尊敬的用户:已取消预约施工现场专业人员" + goodsVo1.getGoodsName() + "考试。";
                         iInformUserService.insertByAddBo(informUserAddBo);
                         iInformUserService.insertByAddBo(informUserAddBo);
                         UserVo userVo = iUserService.queryById(userSubscribeVo.getUserId());
                         UserVo userVo = iUserService.queryById(userSubscribeVo.getUserId());
                         ExamApplyVo examApplyVo = examApplyMapper.selectByApply(userSubscribeVo.getApplyId());
                         ExamApplyVo examApplyVo = examApplyMapper.selectByApply(userSubscribeVo.getApplyId());
@@ -664,6 +679,13 @@ public class UserSubscribeServiceImpl extends ServiceImpl<UserSubscribeMapper, U
                             iWxLoginService.sendQdySubStatusTpMsg(userVo.getOpenId(),paramMap);
                             iWxLoginService.sendQdySubStatusTpMsg(userVo.getOpenId(),paramMap);
                         }
                         }
                     }
                     }
+
+                    //E管证督学通知
+                    if (informRemindVo.getNoteStatus().equals(1) || informRemindVo.getWayStatus().equals(1) || informRemindVo.getGzhTpStatus().equals(1)){
+                        ExamApplyVo examApplyVo = examApplyMapper.selectByApply(userSubscribeVo.getApplyId());
+                        iGoodsService.informOldSys(userSubscribeVo.getUserId(),userSubscribeVo.getGoodsId(),null,
+                                null,17,content, Arrays.asList(DateUtils.timestampToDate(userSubscribeVo.getApplySiteExamTime()), examApplyVo.getApplyName(),"已取消" ,content,"您预约的施工现场专业人员考试已取消"));
+                    }
                 }
                 }
             }
             }
         }
         }
@@ -1600,6 +1622,7 @@ public class UserSubscribeServiceImpl extends ServiceImpl<UserSubscribeMapper, U
             }
             }
             if (businessId > 0 &&Validator.isNotEmpty(userSubscribeVo.getResult())) {
             if (businessId > 0 &&Validator.isNotEmpty(userSubscribeVo.getResult())) {
                 if (userSubscribeVo.getResult().equals(1)) {
                 if (userSubscribeVo.getResult().equals(1)) {
+                    String content ="";
                     if (informRemindVoPass.getWayStatus().equals(1)) {
                     if (informRemindVoPass.getWayStatus().equals(1)) {
                         InformUserAddBo informUserAddBo = new InformUserAddBo();
                         InformUserAddBo informUserAddBo = new InformUserAddBo();
                         informUserAddBo.setUserId(userSubscribeVo.getUserId());
                         informUserAddBo.setUserId(userSubscribeVo.getUserId());
@@ -1614,6 +1637,7 @@ public class UserSubscribeServiceImpl extends ServiceImpl<UserSubscribeMapper, U
                         informUserAddBo.setGoodsId(userSubscribeVo.getGoodsId());
                         informUserAddBo.setGoodsId(userSubscribeVo.getGoodsId());
                         GoodsVo goodsVo1 = iGoodsService.queryById(userSubscribeVo.getGoodsId());
                         GoodsVo goodsVo1 = iGoodsService.queryById(userSubscribeVo.getGoodsId());
                         informUserAddBo.setText("尊敬的用户:您已通过施工现场专业人员"+goodsVo1.getGoodsName()+"岗位考核,分数:" + bo.getPerformance() + ",证书编号:"+bo.getCertificateCode());
                         informUserAddBo.setText("尊敬的用户:您已通过施工现场专业人员"+goodsVo1.getGoodsName()+"岗位考核,分数:" + bo.getPerformance() + ",证书编号:"+bo.getCertificateCode());
+                        content = "尊敬的用户:您已通过施工现场专业人员"+goodsVo1.getGoodsName()+"岗位考核,分数:" + bo.getPerformance() + ",证书编号:"+bo.getCertificateCode();
                         iInformUserService.insertByAddBo(informUserAddBo);
                         iInformUserService.insertByAddBo(informUserAddBo);
                     }
                     }
                     if (informRemindVoPass.getNoteStatus().equals(1)) {
                     if (informRemindVoPass.getNoteStatus().equals(1)) {
@@ -1630,6 +1654,7 @@ public class UserSubscribeServiceImpl extends ServiceImpl<UserSubscribeMapper, U
                         informUserAddBo.setGoodsId(userSubscribeVo.getGoodsId());
                         informUserAddBo.setGoodsId(userSubscribeVo.getGoodsId());
                         GoodsVo goodsVo1 = iGoodsService.queryById(userSubscribeVo.getGoodsId());
                         GoodsVo goodsVo1 = iGoodsService.queryById(userSubscribeVo.getGoodsId());
                         informUserAddBo.setText("尊敬的用户:您已通过施工现场专业人员"+goodsVo1.getGoodsName()+"岗位考核,分数:" + bo.getPerformance() + ",证书编号:"+bo.getCertificateCode());
                         informUserAddBo.setText("尊敬的用户:您已通过施工现场专业人员"+goodsVo1.getGoodsName()+"岗位考核,分数:" + bo.getPerformance() + ",证书编号:"+bo.getCertificateCode());
+                        content = "尊敬的用户:您已通过施工现场专业人员"+goodsVo1.getGoodsName()+"岗位考核,分数:" + bo.getPerformance() + ",证书编号:"+bo.getCertificateCode();
                         iInformUserService.insertByAddBo(informUserAddBo);
                         iInformUserService.insertByAddBo(informUserAddBo);
                         UserVo userVo = iUserService.queryById(userSubscribeVo.getUserId());
                         UserVo userVo = iUserService.queryById(userSubscribeVo.getUserId());
                         Map<String, Object> param = new HashMap<>();
                         Map<String, Object> param = new HashMap<>();
@@ -1652,6 +1677,7 @@ public class UserSubscribeServiceImpl extends ServiceImpl<UserSubscribeMapper, U
                         informUserAddBo.setGoodsId(userSubscribeVo.getGoodsId());
                         informUserAddBo.setGoodsId(userSubscribeVo.getGoodsId());
                         GoodsVo goodsVo1 = iGoodsService.queryById(userSubscribeVo.getGoodsId());
                         GoodsVo goodsVo1 = iGoodsService.queryById(userSubscribeVo.getGoodsId());
                         informUserAddBo.setText("尊敬的用户:您已通过施工现场专业人员"+goodsVo1.getGoodsName()+"岗位考核,分数:" + bo.getPerformance() + ",证书编号:"+bo.getCertificateCode());
                         informUserAddBo.setText("尊敬的用户:您已通过施工现场专业人员"+goodsVo1.getGoodsName()+"岗位考核,分数:" + bo.getPerformance() + ",证书编号:"+bo.getCertificateCode());
+                        content = "尊敬的用户:您已通过施工现场专业人员"+goodsVo1.getGoodsName()+"岗位考核,分数:" + bo.getPerformance() + ",证书编号:"+bo.getCertificateCode();
                         iInformUserService.insertByAddBo(informUserAddBo);
                         iInformUserService.insertByAddBo(informUserAddBo);
                         UserVo userVo = iUserService.queryById(userSubscribeVo.getUserId());
                         UserVo userVo = iUserService.queryById(userSubscribeVo.getUserId());
                         if(Validator.isNotEmpty(userVo.getOpenId())){
                         if(Validator.isNotEmpty(userVo.getOpenId())){
@@ -1664,8 +1690,16 @@ public class UserSubscribeServiceImpl extends ServiceImpl<UserSubscribeMapper, U
                             iWxLoginService.sendQdyExamStatusTpMsg(userVo.getOpenId(),paramMap);
                             iWxLoginService.sendQdyExamStatusTpMsg(userVo.getOpenId(),paramMap);
                         }
                         }
                     }
                     }
+
+                    //E管证督学通知
+                    if (informRemindVoPass.getNoteStatus().equals(1) || informRemindVoPass.getWayStatus().equals(1) || informRemindVoPass.getGzhTpStatus().equals(1)){
+                        GoodsVo goodsVo1 = iGoodsService.queryById(userSubscribeVo.getGoodsId());
+                        iGoodsService.informOldSys(userSubscribeVo.getUserId(),userSubscribeVo.getGoodsId(),null,
+                                null,4,content, Arrays.asList(goodsVo1.getGoodsName(), bo.getPerformance().toString()));
+                    }
                 }
                 }
                 if (userSubscribeVo.getResult().equals(0)) {
                 if (userSubscribeVo.getResult().equals(0)) {
+                    String content = "";
                     if (informRemindVo.getWayStatus().equals(1)) {
                     if (informRemindVo.getWayStatus().equals(1)) {
                         InformUserAddBo informUserAddBo = new InformUserAddBo();
                         InformUserAddBo informUserAddBo = new InformUserAddBo();
                         informUserAddBo.setUserId(userSubscribeVo.getUserId());
                         informUserAddBo.setUserId(userSubscribeVo.getUserId());
@@ -1680,6 +1714,7 @@ public class UserSubscribeServiceImpl extends ServiceImpl<UserSubscribeMapper, U
                         informUserAddBo.setGoodsId(userSubscribeVo.getGoodsId());
                         informUserAddBo.setGoodsId(userSubscribeVo.getGoodsId());
                         GoodsVo goodsVo1 = iGoodsService.queryById(userSubscribeVo.getGoodsId());
                         GoodsVo goodsVo1 = iGoodsService.queryById(userSubscribeVo.getGoodsId());
                         informUserAddBo.setText("尊敬的用户:您缺席或未通过施工现场专业人员"+goodsVo1.getGoodsName()+"岗位考核,分数:" + bo.getPerformance() + ",请马上重新预约考试.");
                         informUserAddBo.setText("尊敬的用户:您缺席或未通过施工现场专业人员"+goodsVo1.getGoodsName()+"岗位考核,分数:" + bo.getPerformance() + ",请马上重新预约考试.");
+                        content = "尊敬的用户:您缺席或未通过施工现场专业人员"+goodsVo1.getGoodsName()+"岗位考核,分数:" + bo.getPerformance() + ",请马上重新预约考试.";
                         iInformUserService.insertByAddBo(informUserAddBo);
                         iInformUserService.insertByAddBo(informUserAddBo);
                     }
                     }
                     if (informRemindVo.getNoteStatus().equals(1)) {
                     if (informRemindVo.getNoteStatus().equals(1)) {
@@ -1696,6 +1731,7 @@ public class UserSubscribeServiceImpl extends ServiceImpl<UserSubscribeMapper, U
                         informUserAddBo.setGoodsId(userSubscribeVo.getGoodsId());
                         informUserAddBo.setGoodsId(userSubscribeVo.getGoodsId());
                         GoodsVo goodsVo1 = iGoodsService.queryById(userSubscribeVo.getGoodsId());
                         GoodsVo goodsVo1 = iGoodsService.queryById(userSubscribeVo.getGoodsId());
                         informUserAddBo.setText("尊敬的用户:您缺席或未通过施工现场专业人员"+goodsVo1.getGoodsName()+"岗位考核,分数:" + bo.getPerformance() + ",请马上重新预约考试.");
                         informUserAddBo.setText("尊敬的用户:您缺席或未通过施工现场专业人员"+goodsVo1.getGoodsName()+"岗位考核,分数:" + bo.getPerformance() + ",请马上重新预约考试.");
+                        content = "尊敬的用户:您缺席或未通过施工现场专业人员"+goodsVo1.getGoodsName()+"岗位考核,分数:" + bo.getPerformance() + ",请马上重新预约考试.";
                         iInformUserService.insertByAddBo(informUserAddBo);
                         iInformUserService.insertByAddBo(informUserAddBo);
                         UserVo userVo = iUserService.queryById(userSubscribeVo.getUserId());
                         UserVo userVo = iUserService.queryById(userSubscribeVo.getUserId());
                         Map<String, Object> param = new HashMap<>();
                         Map<String, Object> param = new HashMap<>();
@@ -1717,6 +1753,7 @@ public class UserSubscribeServiceImpl extends ServiceImpl<UserSubscribeMapper, U
                         informUserAddBo.setGoodsId(userSubscribeVo.getGoodsId());
                         informUserAddBo.setGoodsId(userSubscribeVo.getGoodsId());
                         GoodsVo goodsVo1 = iGoodsService.queryById(userSubscribeVo.getGoodsId());
                         GoodsVo goodsVo1 = iGoodsService.queryById(userSubscribeVo.getGoodsId());
                         informUserAddBo.setText("尊敬的用户:您缺席或未通过施工现场专业人员"+goodsVo1.getGoodsName()+"岗位考核,分数:" + bo.getPerformance() + ",请马上重新预约考试.");
                         informUserAddBo.setText("尊敬的用户:您缺席或未通过施工现场专业人员"+goodsVo1.getGoodsName()+"岗位考核,分数:" + bo.getPerformance() + ",请马上重新预约考试.");
+                        content = "尊敬的用户:您缺席或未通过施工现场专业人员"+goodsVo1.getGoodsName()+"岗位考核,分数:" + bo.getPerformance() + ",请马上重新预约考试.";
                         iInformUserService.insertByAddBo(informUserAddBo);
                         iInformUserService.insertByAddBo(informUserAddBo);
                         UserVo userVo = iUserService.queryById(userSubscribeVo.getUserId());
                         UserVo userVo = iUserService.queryById(userSubscribeVo.getUserId());
                         if(Validator.isNotEmpty(userVo.getOpenId())){
                         if(Validator.isNotEmpty(userVo.getOpenId())){
@@ -1729,6 +1766,13 @@ public class UserSubscribeServiceImpl extends ServiceImpl<UserSubscribeMapper, U
                             iWxLoginService.sendQdyExamStatusTpMsg(userVo.getOpenId(),paramMap);
                             iWxLoginService.sendQdyExamStatusTpMsg(userVo.getOpenId(),paramMap);
                         }
                         }
                     }
                     }
+
+                    //E管证督学通知
+                    if (informRemindVoPass.getNoteStatus().equals(1) || informRemindVoPass.getWayStatus().equals(1) || informRemindVoPass.getGzhTpStatus().equals(1)){
+                        GoodsVo goodsVo1 = iGoodsService.queryById(userSubscribeVo.getGoodsId());
+                        iGoodsService.informOldSys(userSubscribeVo.getUserId(),userSubscribeVo.getGoodsId(),null,
+                                null,4,content, Arrays.asList(goodsVo1.getGoodsName(), bo.getPerformance().toString()));
+                    }
                 }
                 }
             }
             }
         }
         }

+ 3 - 0
zhongzheng-system/src/main/resources/mapper/modules/grade/ClassGradeUserMapper.xml

@@ -1109,6 +1109,7 @@
     <select id="sendClassGradeUser"  resultMap="ClassGradeUserGoodsVoResult">
     <select id="sendClassGradeUser"  resultMap="ClassGradeUserGoodsVoResult">
         SELECT
         SELECT
         cgu.user_id,
         cgu.user_id,
+        cgu.order_goods_id,
         cg.class_start_time,
         cg.class_start_time,
         cg.class_end_time,
         cg.class_end_time,
         cgg.goods_id,
         cgg.goods_id,
@@ -1134,6 +1135,7 @@
 
 
         SELECT
         SELECT
         cgu.user_id,
         cgu.user_id,
+        cgu.order_goods_id,
         cg.class_start_time,
         cg.class_start_time,
         cg.class_end_time,
         cg.class_end_time,
         cgg.goods_id,
         cgg.goods_id,
@@ -1155,6 +1157,7 @@
 
 
         SELECT
         SELECT
         cgu.user_id,
         cgu.user_id,
+        cgu.order_goods_id,
         cg.class_start_time,
         cg.class_start_time,
         cg.class_end_time,
         cg.class_end_time,
         cgg.goods_id,
         cgg.goods_id,