Browse Source

文档列表

5 years ago
parent
commit
c66c71fafc

+ 4 - 0
cloud-model/src/main/java/com/hssx/cloudmodel/constant/Constant.java

@@ -45,6 +45,10 @@ public class Constant {
     public static final String WECHAT_APPID = "wx42c0f9d19a4756a7";//appId
     public static final String WECHAT_APPID = "wx42c0f9d19a4756a7";//appId
     public static final String PLAN_TYPE = "保养类型";//保养类型
     public static final String PLAN_TYPE = "保养类型";//保养类型
     public static final String MAIN_TAIN_NOTICE = "该模具需要保养,请前往处理";//保养通知
     public static final String MAIN_TAIN_NOTICE = "该模具需要保养,请前往处理";//保养通知
+    public static final String MAINTAIN_NAME_FIRST = "动作";//保养类型名称0
+    public static final String MAINTAIN_NAME_SECOND = "易损件";//保养类型名称1
+    public static final String MAINTAIN_WAY_FIRST = "喷漆";//对应保养类型动作
+    public static final String MAINTAIN_WAY_SECOND = "检查";//对应保养类型动作
 //    public static void main(String[] args){
 //    public static void main(String[] args){
 //        System.out.println("222222");
 //        System.out.println("222222");
 //        String url = "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid="
 //        String url = "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid="

+ 6 - 0
cloud-model/src/main/java/com/hssx/cloudmodel/service/impl/MouldServiceImpl.java

@@ -56,6 +56,8 @@ public class MouldServiceImpl extends ServiceImpl<MouldMapper, Mould> implements
     ProjectUserMapper projectUserMapper;
     ProjectUserMapper projectUserMapper;
     @Resource
     @Resource
     NewsNoticeMapper newsNoticeMapper;
     NewsNoticeMapper newsNoticeMapper;
+    @Resource
+    NewsNoticeUserMapper newsNoticeUserMapper;
 
 
     @Override
     @Override
     public HttpRespMsg addAndUpdateMould(Mould mould, User user) {
     public HttpRespMsg addAndUpdateMould(Mould mould, User user) {
@@ -183,6 +185,7 @@ public class MouldServiceImpl extends ServiceImpl<MouldMapper, Mould> implements
                 }
                 }
                 List<User> users = userMapper.selectList(new QueryWrapper<User>().in("id", userIds));
                 List<User> users = userMapper.selectList(new QueryWrapper<User>().in("id", userIds));
                 for (User u : users) {
                 for (User u : users) {
+                    //添加通知的消息
                     NewsNotice newsNotice = new NewsNotice();
                     NewsNotice newsNotice = new NewsNotice();
                     newsNotice.setNoticeType(Constant.MAINTAIN_TYPE);
                     newsNotice.setNoticeType(Constant.MAINTAIN_TYPE);
                     newsNotice.setProjectId(project.getId());
                     newsNotice.setProjectId(project.getId());
@@ -191,6 +194,9 @@ public class MouldServiceImpl extends ServiceImpl<MouldMapper, Mould> implements
                     newsNotice.setContent(Constant.MAIN_TAIN_NOTICE);
                     newsNotice.setContent(Constant.MAIN_TAIN_NOTICE);
                     newsNoticeMapper.insert(newsNotice);
                     newsNoticeMapper.insert(newsNotice);
                     NewsNoticeUser newsNoticeUser = new NewsNoticeUser();
                     NewsNoticeUser newsNoticeUser = new NewsNoticeUser();
+                    newsNoticeUser.setNewsId(newsNotice.getId());
+                    newsNoticeUser.setUserId(u.getId());
+                    newsNoticeUserMapper.insert(newsNoticeUser);
                 }
                 }
             }
             }
         }
         }

+ 1 - 1
cloud-model/src/main/java/com/hssx/cloudmodel/util/CodeGenerator.java

@@ -204,7 +204,7 @@ public class CodeGenerator {
         //若想要生成的实体类继承某个Controller,则可打开下面注释。写上需要继承的Controller的位置即可
         //若想要生成的实体类继承某个Controller,则可打开下面注释。写上需要继承的Controller的位置即可
 //        strategy.setSuperControllerClass("com.baomidou.ant.common.BaseController");
 //        strategy.setSuperControllerClass("com.baomidou.ant.common.BaseController");
         //此处user是表名,多个英文逗号分割
         //此处user是表名,多个英文逗号分割
-        strategy.setInclude("tb_user");
+        strategy.setInclude("tb_mould_maintain");
 //        strategy.setExclude();//数据库表全生成
 //        strategy.setExclude();//数据库表全生成
 //        strategy.setInclude(scanner("user").split(","));//表名,多个英文逗号分割
 //        strategy.setInclude(scanner("user").split(","));//表名,多个英文逗号分割
         strategy.setControllerMappingHyphenStyle(true);
         strategy.setControllerMappingHyphenStyle(true);

+ 6 - 0
cloud-model/src/main/java/com/hssx/cloudmodel/util/MD5Util.java

@@ -1,8 +1,14 @@
 package com.hssx.cloudmodel.util;
 package com.hssx.cloudmodel.util;
 
 
+import org.apache.commons.lang3.StringUtils;
 import org.springframework.util.DigestUtils;
 import org.springframework.util.DigestUtils;
 
 
+import javax.servlet.ServletOutputStream;
+import java.io.*;
+import java.net.URLEncoder;
 import java.util.UUID;
 import java.util.UUID;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipOutputStream;
 
 
 /**
 /**
  * Author: 吴涛涛 cuiyi@itany.com
  * Author: 吴涛涛 cuiyi@itany.com