ソースを参照

Merge branch 'master' of http://47.100.37.243:10080/ZHOU/yunsu

# Conflicts:
#	cloud-model/src/main/java/com/hssx/cloudmodel/service/impl/MouldFileServiceImpl.java
5 年 前
コミット
2eaf2a812d

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

@@ -64,68 +64,4 @@ public class Constant {
     public static final String TEMPERATURE_CONTENT = "温度过高";//告警类2 温度过高
     public static final String MAIN_TAIN_TYPE = "保养计划";//告警类2 温度过高
     public static final String MAIN_TAIN_CONTENT = "模具运行次数已达";//保养内容
-//    public static void main(String[] args){
-//        System.out.println("222222");
-//        String url = "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid="
-//                + "wx42c0f9d19a4756a7" + "&secret=" + "473ee2fab33e6d8a885800403d777581";
-//        String resp;
-//        String resp1;
-//        try {
-//            resp1 = HttpKit.get(url, true);
-//            resp1 = StringEscapeUtils.unescapeJava(resp1);
-//            System.out.println("222222");
-//            JSONObject json = (JSONObject) JSON.parse(resp1);
-//            System.out.println("json"+json);
-//            // 获取值赋值给全局变量
-//            if (!json.containsKey("errcode")) {
-//                System.out.println("222222");
-//                String newAccessToken = json.getString("access_token");
-//                String url1 = "https://api.weixin.qq.com/cgi-bin/message/template/send?access_token="
-//                        + newAccessToken;
-//                WechatTemplateMessage wechat = new WechatTemplateMessage();
-//                wechat.setTemplate_id("VcU9E2f3Nn4uR6S1z57VBaLeBAhEO4vfivo3Tug_BKE");
-//                wechat.setTouser("o9g4t1rTLsDu62HrreOoMWPT4ldA");
-//                wechat.setAppid("wx42c0f9d19a4756a7");
-//                Map<String, Map<String, String>> data = new HashMap<>();
-//                Map<String, String> first = new HashMap<>();
-//                Map<String, String> value1 = new HashMap<>();
-//                Map<String, String> value2 = new HashMap<>();
-//                Map<String, String> value3 = new HashMap<>();
-//                Map<String, String> value4 = new HashMap<>();
-//                Map<String, String> remark = new HashMap<>();
-//                // 推送信息主体
-//                first.put("value", "你好,你有新的保养通知");//firstData推送标题
-//                data.put("first", first);
-//                value1.put("value", "1111");
-//                SimpleDateFormat sdf = new SimpleDateFormat("yyyy.MM.dd");
-//                data.put("keyword1", value1);
-//                value2.put("value", "南京");
-//                data.put("keyword2", value2);
-//                value3.put("value", sdf.format(new Date()));
-//                data.put("keyword3", value3);
-//                value4.put("value", "给水泵内燃力");
-//                data.put("keyword4", value4);
-//                remark.put("value", "给水泵内燃力不足");
-//                data.put("remark", remark);
-//                wechat.setData(data);
-//                String jsonString = JSONObject.toJSONString(wechat);
-//                System.out.println("jsonString"+jsonString);
-//                resp = HttpKit.post(url1, jsonString);
-//                System.out.println("222222");
-//                System.out.println("resp0"+resp);
-//                resp = StringEscapeUtils.unescapeJava(resp);
-//                System.out.println("resp"+resp);
-//                json = (JSONObject) JSON.parse(resp);
-//                System.out.println("json"+json);
-//            }
-//        } catch (NoSuchAlgorithmException e) {
-//            e.printStackTrace();
-//        } catch (NoSuchProviderException e) {
-//            e.printStackTrace();
-//        } catch (IOException e) {
-//            e.printStackTrace();
-//        } catch (KeyManagementException e) {
-//            e.printStackTrace();
-//        }
-//    }
 }

+ 1 - 1
cloud-model/src/main/java/com/hssx/cloudmodel/controller/CompanyController.java

@@ -47,7 +47,7 @@ public class CompanyController {
     @ApiOperation("添加/修改公司")
     @RequestMapping("/add")
     @ResponseBody
-    public HttpRespMsg addAndUpdateRole(CompanyVO companyVO, HttpServletRequest request, Integer flag,
+    public HttpRespMsg addAndUpdateCompany(CompanyVO companyVO, HttpServletRequest request, Integer flag,
                                         HttpServletResponse response,@RequestParam(required = false) String companyIds) {
         HttpRespMsg msg = new HttpRespMsg();
         msg = companyService.addAndUpdateRole(companyVO, flag,companyIds);

+ 12 - 13
cloud-model/src/main/java/com/hssx/cloudmodel/service/impl/CompanyServiceImpl.java

@@ -54,7 +54,6 @@ public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company> impl
     CustomCompanyMapper customCompanyMapper;
 
 
-
     @Override
     public HttpRespMsg addAndUpdateRole(CompanyVO companyVO, Integer flag, String companyIds) {
         HttpRespMsg msg = new HttpRespMsg();
@@ -117,7 +116,7 @@ public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company> impl
                 List<Integer> cousIds = list.stream().map(AssetCustomCompany::getCustomId).collect(Collectors.toList());
                 cousIds.add(-1);
                 List<Integer> noMouldCompanyIds = new ArrayList<>();
-                noMouldCompanyIds = mouldMapper.selectList(new QueryWrapper<Mould>().in("produce_company_id", cousIds).eq("company_id",company.getId())).stream().map(Mould::getProduceCompanyId).collect(Collectors.toList());
+                noMouldCompanyIds = mouldMapper.selectList(new QueryWrapper<Mould>().in("produce_company_id", cousIds).eq("company_id", company.getId())).stream().map(Mould::getProduceCompanyId).collect(Collectors.toList());
                 noMouldCompanyIds.add(-1);
                 List<Integer> ides = new ArrayList<>();
                 if (companyIds != null && !"".equals(companyIds)) {
@@ -159,7 +158,7 @@ public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company> impl
                 List<Integer> cousIds = list.stream().map(AssetCustomCompany::getAssertId).collect(Collectors.toList());
                 cousIds.add(-1);
                 List<Integer> noMouldCompanyIds = new ArrayList<>();
-                noMouldCompanyIds = mouldMapper.selectList(new QueryWrapper<Mould>().eq("produce_company_id", company.getId()).in("company_id",cousIds)).stream().map(Mould::getCompanyId).collect(Collectors.toList());
+                noMouldCompanyIds = mouldMapper.selectList(new QueryWrapper<Mould>().eq("produce_company_id", company.getId()).in("company_id", cousIds)).stream().map(Mould::getCompanyId).collect(Collectors.toList());
                 noMouldCompanyIds.add(-1);
                 List<Integer> ides = new ArrayList<>();
                 if (companyIds != null && !"".equals(companyIds)) {
@@ -205,7 +204,7 @@ public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company> impl
     public List<Company> getIdAndNamelist(User user) {
         QueryWrapper<Company> qw = new QueryWrapper<>();
         qw.select("id", "company_name", "company_type");
-        List <Integer> ides = new ArrayList<>();
+        List<Integer> ides = new ArrayList<>();
         if (Constant.SYS_ID == user.getParentId()) {
             //此时是admin创建用户,返回可选的生产方公司,查询出当前admin的信息并获取他的公司id
             User admin = userMapper.selectOne(new QueryWrapper<User>().eq("id", user.getId()));
@@ -331,7 +330,7 @@ public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company> impl
         List<Integer> ides = new ArrayList<>();
         ides.add(-1);
         if (null == currentUser) {
-            msg.setError("当前用户不存在或者不存在");
+            msg.setError("用户不存在或者未登录");
             return msg;
         } else {
             Company company = companyMapper.selectById(companyVO.getId());
@@ -361,7 +360,7 @@ public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company> impl
         HttpRespMsg msg = new HttpRespMsg();
         User currentUser = userMapper.selectOne(new QueryWrapper<User>().eq("head_imgurl", userVO.getToken()));
         if (null == currentUser) {
-            msg.setError("当前用户不存在或者不存在");
+            msg.setError("用户不存在或者未登录");
             return msg;
         } else {
             Integer ownerCompany = projectMapper.selectById(userVO.getProjectId()).getOwnerCompany();
@@ -383,7 +382,7 @@ public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company> impl
         User currentUser = userMapper.selectOne(new QueryWrapper<User>().eq("head_imgurl", userVO.getToken()));
         List<Company> companies = new ArrayList<>();
         if (null == currentUser) {
-            msg.setError("当前用户不存在或者不存在");
+            msg.setError("用户不存在或者未登录");
             return msg;
         } else {
             if (Constant.SYS_PARENT_ID == currentUser.getParentId()) {
@@ -392,13 +391,13 @@ public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company> impl
                 if (currentUser.getSubordinateType() == 0) {
                     List<Integer> customCompanyIds = assetCustomCompanyMapper.selectList(new QueryWrapper<AssetCustomCompany>().eq("assert_id", currentUser.getCompanyId())).stream().map(AssetCustomCompany::getCustomId).collect(Collectors.toList());
                     customCompanyIds.add(currentUser.getCompanyId());
-                    companies = companyMapper.selectList(new QueryWrapper<Company>().in("id",customCompanyIds));
-                }else if(currentUser.getSubordinateType() == 1){
+                    companies = companyMapper.selectList(new QueryWrapper<Company>().in("id", customCompanyIds));
+                } else if (currentUser.getSubordinateType() == 1) {
                     List<Integer> assetCompanyIds = assetCustomCompanyMapper.selectList(new QueryWrapper<AssetCustomCompany>().eq("custom_id", currentUser.getCompanyId())).stream().map(AssetCustomCompany::getAssertId).collect(Collectors.toList());
                     assetCompanyIds.add(currentUser.getCompanyId());
-                    companies = companyMapper.selectList(new QueryWrapper<Company>().in("id",assetCompanyIds));
+                    companies = companyMapper.selectList(new QueryWrapper<Company>().in("id", assetCompanyIds));
                 }
-            }else{
+            } else {
                 List<Integer> projectIds = new ArrayList<>();
                 QueryWrapper<Project> qwPro = new QueryWrapper<>();
                 qwPro.eq("manager_id", currentUser.getId());
@@ -419,8 +418,8 @@ public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company> impl
                 String keyName = null;
                 List<ProjectVO> projects = projectMapper.getProjectListByUidInProjectIds(keyName, projectIds);
                 List<Integer> ids = projects.stream().map(Project::getOwnerCompany).collect(Collectors.toList());
-                    ids.add(-1);
-                    companies = companyMapper.selectList(new QueryWrapper<Company>().in("id",ids));
+                ids.add(-1);
+                companies = companyMapper.selectList(new QueryWrapper<Company>().in("id", ids));
             }
             msg.data = companies;
         }

+ 1 - 1
cloud-model/src/main/java/com/hssx/cloudmodel/service/impl/InvitationRecordServiceImpl.java

@@ -76,7 +76,7 @@ public class InvitationRecordServiceImpl extends ServiceImpl<InvitationRecordMap
             }
         }else{
             if(null == user){
-                msg.setError("当前角色涉及权限问题,请重新登录");
+                msg.setError("用户不存在或者未登录");
                 return msg;
             }else{
                 InvitationRecord record = invitationRecordMapper.selectOne(new QueryWrapper<InvitationRecord>()

+ 4 - 3
cloud-model/src/main/java/com/hssx/cloudmodel/service/impl/MouldEquipmentServiceImpl.java

@@ -113,7 +113,7 @@ public class MouldEquipmentServiceImpl extends ServiceImpl<MouldEquipmentMapper,
             newMouldEquipment.setEndTime(now.plusYears(newMouldEquipment.getUseLife()));
             mouldEquipmentMapper.updateById(newMouldEquipment);
         } else {
-            msg.setError("对不起,您不是管理员,不具备启用设备的权限");
+            msg.setError("对不起,您不是超级管理员,不具备启用设备的权限");
             return msg;
         }
         return msg;
@@ -129,7 +129,7 @@ public class MouldEquipmentServiceImpl extends ServiceImpl<MouldEquipmentMapper,
                 PageInfo<MouldEquipmentVO> pageInfo = new PageInfo<>(mouldEquipments);
                 msg.data = pageInfo;
             } else {
-                msg.setError("对不起!您不含有查看该列表的权利。");
+                msg.setError("对不起,您不含有查看该列表的权利");
             }
         }
         return msg;
@@ -332,7 +332,8 @@ public class MouldEquipmentServiceImpl extends ServiceImpl<MouldEquipmentMapper,
                             //云模编号
                             for (MouldEquipment p : mouldEquipments) {
                                 if (value.equals(p.getEquipmentNo())) {
-                                    msg.setError("第" + j + "行的云模盒编号:" + value + "已被占用,请修改后重新上传");
+//                                    msg.setError("第" + j + "行的云模盒编号:" + value + "已被占用,请修改后重新上传");
+                                    msg.setError("云模盒编号已被占用,请修改后重新上传");
                                     return msg;
                                 }
                             }

+ 2 - 2
cloud-model/src/main/java/com/hssx/cloudmodel/service/impl/MouldFileServiceImpl.java

@@ -264,7 +264,7 @@ public class MouldFileServiceImpl extends ServiceImpl<MouldFileMapper, MouldFile
                 }
             }
         } else {
-            msg.setError("当前用户不存在或者未登录");
+            msg.setError("用户不存在或者未登录");
         }
         return msg;
     }
@@ -409,7 +409,7 @@ public class MouldFileServiceImpl extends ServiceImpl<MouldFileMapper, MouldFile
                     mouldOperationDynamicsMapper.insert(dynamics);
                 }
             } else {
-                msg.setError("只有生产方和资产方才能审核, subordinteType = " + user.getSubordinateType() + ", 无效!");
+                msg.setError("只有生产方和资产方审批人才能审核");
             }
         }
         return msg;

+ 0 - 15
cloud-model/src/main/java/com/hssx/cloudmodel/service/impl/MouldMaintainServiceImpl.java

@@ -36,22 +36,7 @@ public class MouldMaintainServiceImpl extends ServiceImpl<MouldMaintainMapper, M
     @Resource
     MouldMaintainMapper mouldMaintainMapper;
     @Resource
-    CompanyMapper companyMapper;
-    @Resource
-    CustomCompanyMapper customCompanyMapper;
-    @Resource
     MouldMapper mouldMapper;
-    @Resource
-    ProjectApproveMapper projectApproveMapper;
-    @Resource
-    ProjectMapper projectMapper;
-    @Resource
-    ProjectUserMapper projectUserMapper;
-    @Resource
-    NewsNoticeMapper newsNoticeMapper;
-    @Resource
-    NewsNoticeUserMapper newsNoticeUserMapper;
-
     @Override
     public HttpRespMsg addMaintain(MultipartFile file, String path, MouldMaintain mouldMaintain, String token) {
         HttpRespMsg msg = new HttpRespMsg();

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

@@ -196,11 +196,11 @@ public class MouldServiceImpl extends ServiceImpl<MouldMapper, Mould> implements
                 moulds = mouldMapper.selectListByConditionByProject(userVO, set);
             }
         } else {
-            msg.setError("用户不存在或者未登录");
+            msg.setError("用户不存在或者未登录");
         }
         List<Integer> mIds = moulds.stream().map(MouldVO::getId).collect(Collectors.toList());
         if (!mIds.contains(mouldVO.getId())) {
-            msg.setError("你没有查看模具的权限!");
+            msg.setError("你没有该权限!");
             return msg;
         } else {
             MouldVO mould = mouldMapper.getDetailById(mouldVO);
@@ -478,7 +478,7 @@ public class MouldServiceImpl extends ServiceImpl<MouldMapper, Mould> implements
             moulds = mouldMapper.selectList(new QueryWrapper<Mould>().in("project_id", set).eq("is_maintain", 1));
             msg.data = moulds;
         } else {
-            msg.setError("用户不存在或者未登录");
+            msg.setError("用户不存在或者未登录");
         }
         return msg;
     }
@@ -526,7 +526,7 @@ public class MouldServiceImpl extends ServiceImpl<MouldMapper, Mould> implements
             moulds = mouldMapper.selectList(new QueryWrapper<Mould>().in("project_id", set).eq("state", 3));
             msg.data = moulds;
         } else {
-            msg.setError("用户不存在或者未登录");
+            msg.setError("用户不存在或者未登录");
         }
         return msg;
     }

+ 5 - 4
cloud-model/src/main/java/com/hssx/cloudmodel/service/impl/PartServiceImpl.java

@@ -71,7 +71,6 @@ public class PartServiceImpl extends ServiceImpl<PartMapper, Part> implements Pa
             XSSFWorkbook wookbook = new XSSFWorkbook(f);
             XSSFSheet sheet = wookbook.getSheetAt(0);
             int s = sheet.getLastRowNum();
-            System.out.println("s==========>" + s);
             // 遍历当前sheet中的所有行,第一行是数据对应的字段,不是数据,
             // 故从第二行开始遍历拿数据(如果有标题的话,则从第三行开始拿数据)
             for (int j = 1; j < sheet.getLastRowNum() + 1; j++) {
@@ -94,7 +93,8 @@ public class PartServiceImpl extends ServiceImpl<PartMapper, Part> implements Pa
                         //零件编号
                         for (Part p : parts) {
                             if (value.equals(p.getPartNo())) {
-                                msg.setError("第" + j + "行的零件编号:" + value + "已被占用,请修改后重新上传");
+//                                msg.setError("第" + j + "行的零件编号:" + value + "已被占用,请修改后重新上传");
+                                msg.setError("零件编号已被占用,请修改后重新上传");
                                 return msg;
                             }
                         }
@@ -105,7 +105,8 @@ public class PartServiceImpl extends ServiceImpl<PartMapper, Part> implements Pa
                     } else if (y == 2) {
                         //零件寿命
                         if(Integer.parseInt(value)>=100000000){
-                            msg.setError("第" + j + "行的零件寿命:" + value + "数字过长,请修改后重试");
+//                            msg.setError("第" + j + "行的零件寿命:" + value + "数字过长,请修改后重试");
+                            msg.setError("零件寿命数字过长,请修改后重试");
                             return msg;
                         }
                         part.setPartLife(Integer.parseInt(value));
@@ -152,7 +153,7 @@ public class PartServiceImpl extends ServiceImpl<PartMapper, Part> implements Pa
                 }
                 partMapper.updateById(part);
             } else {
-                msg.setError("当前模具编号已存在,请重新输入其他模具编号");
+                msg.setError("当前设备编号已存在,请重新输入其他模具编号");
             }
         } else {
             //添加

+ 1 - 3
cloud-model/src/main/java/com/hssx/cloudmodel/service/impl/PowerServiceImpl.java

@@ -88,8 +88,6 @@ public class PowerServiceImpl extends ServiceImpl<PowerMapper, Power> implements
         User user = userMapper.selectOne(new QueryWrapper<User>().eq("head_imgurl", token));
         if (user != null) {
             Project pro = projectMapper.selectById(userVO.getProjectId());
-            log.info("project=======>"+pro);
-            log.info("user====>"+user);
             if (pro.getManagerId().equals(user.getId())) {
                 //资产方管理员或者担任项目经理的人才可修改人员权限
                 if (null != userVO.getPowers()) {
@@ -107,7 +105,7 @@ public class PowerServiceImpl extends ServiceImpl<PowerMapper, Power> implements
                     }
                 }
             } else {
-                msg.setError("对不起您没有该权限!");
+                msg.setError("您没有该权限!");
             }
         } else {
             msg.setError("用户不存或没登录!");

+ 1 - 1
cloud-model/src/main/java/com/hssx/cloudmodel/service/impl/ProjectApproveServiceImpl.java

@@ -44,7 +44,7 @@ public class ProjectApproveServiceImpl extends ServiceImpl<ProjectApproveMapper,
                 projectApprove.setSubordinateType(examiner.getSubordinateType());
                 projectApproveMapper.insert(projectApprove);
             }else{
-                msg.setError("对不起,您没有操作功能的权限");
+                msg.setError("您没有该权限!");
             }
         }else{
             msg.setError("用户未登录或不存在");

+ 9 - 9
cloud-model/src/main/java/com/hssx/cloudmodel/service/impl/ProjectServiceImpl.java

@@ -255,7 +255,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
                 }
             }
         } else {
-            msg.setError("当前角色涉及权限问题,请重新登录");
+            msg.setError("用户不存在或者未登录");
         }
         return msg;
     }
@@ -278,7 +278,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
                 }
             }
         } else {
-            msg.setError("用户id不能为null和空");
+            msg.setError("添加项目参与人失败,人员id不存在");
         }
         return msg;
     }
@@ -328,7 +328,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
             PageInfo<ProjectVO> pageInfos = new PageInfo<>(projects);
             msg.data = pageInfos;
         } else {
-            msg.setError("当前用户不存,或涉及到权限问题,请重新登录");
+            msg.setError("用户不存在或者未登录");
         }
 //        QueryWrapper<Project> qw = new QueryWrapper<>();
 //        qw.select("project_name", "creator", "charger", "indate");
@@ -398,11 +398,11 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
                 projects = projectMapper.getProjectListByUidInProjectIds(keyName, projectIds);
             }
         } else {
-            msg.setError("当前用户不存,或涉及到权限问题,请重新登录");
+            msg.setError("用户不存在或者未登录");
         }
         List<Integer> pIds = projects.stream().map(Project::getId).collect(Collectors.toList());
         if(!pIds.contains(project.getId())){
-            msg.setError("您没有查看项目的权限");
+            msg.setError("您没有该权限!");
             return msg;
         }
         ProjectVO vo = projectMapper.getProjectById(project.getId());
@@ -621,7 +621,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
             PageInfo<MouldVO> pageInfo = new PageInfo<>(moulds);
             msg.data = pageInfo;
         } else {
-            msg.setError("用户不存在或者未登录");
+            msg.setError("用户不存在或者未登录");
         }
         return msg;
     }
@@ -665,7 +665,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
             }
             msg.data = projects;
         } else {
-            msg.setError("当前用户未登录,或者用户不存在");
+            msg.setError("用户不存在或者未登录");
         }
         return msg;
     }
@@ -676,7 +676,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
         User user = userMapper.selectOne(new QueryWrapper<User>().eq("head_imgurl", userVO.getToken()));
         List<Project> list = new ArrayList<>();
         if (user == null) {
-            msg.setError("当前用户未登录,或者用户不存在");
+            msg.setError("用户不存在或者未登录");
             return msg;
         } else {
             if (Constant.SYS_ID == user.getParentId()) {
@@ -750,7 +750,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
             }
             msg.data = moulds;
         } else {
-            msg.setError("用户不存在或者未登录");
+            msg.setError("用户不存在或者未登录");
         }
         return msg;
     }

+ 3 - 3
cloud-model/src/main/java/com/hssx/cloudmodel/service/impl/UserServiceImpl.java

@@ -230,7 +230,7 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
 //                        }
                     }
             } else {
-                msg.setError("当前用户未登录,或者用户不存在");
+                msg.setError("用户不存在或者未登录");
             }
         }
         PageInfo<UserVO> pageInfos = new PageInfo<>(users);
@@ -297,7 +297,7 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
                 count = userMapper.selectCount(qw);
                 if (count > 0) {
                     User existingUser = userMapper.selectOne(qw);
-                    msg.setError("当前账号已存在");
+                    msg.setError("账号已存在");
                     return msg;
                 } else {
                     //创建账号默认密码"000000"
@@ -364,7 +364,7 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
 //                    uids.add(-1);
 //                    Integer countUser = userMapper.selectCount(new QueryWrapper<User>().in("parent_id", uids));
                     if (usersIds.contains(existingUser.getId())) {
-                        msg.setError("账号已存在,请勿重新创建");
+                        msg.setError("账号已存在");
                         return msg;
                     } else {
                         //此时用户已经有了,则建立一条合作公司的关系

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

@@ -92,7 +92,7 @@ public class CodeGenerator {
 
         // 数据源配置
         DataSourceConfig dsc = new DataSourceConfig();
-        dsc.setUrl("jdbc:mysql://118.190.47.230:3306/cloud_model?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8");
+        dsc.setUrl("jdbc:mysql://118.190.47.230:3306/new_cloud_model?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8");
 //        dsc.setSchemaName("public");
         dsc.setDriverName("com.mysql.cj.jdbc.Driver");
         dsc.setUsername("root");
@@ -204,7 +204,7 @@ public class CodeGenerator {
         //若想要生成的实体类继承某个Controller,则可打开下面注释。写上需要继承的Controller的位置即可
 //        strategy.setSuperControllerClass("com.baomidou.ant.common.BaseController");
         //此处user是表名,多个英文逗号分割
-        strategy.setInclude("tb_news_notice");
+        strategy.setInclude("app_version");
 //        strategy.setExclude();//数据库表全生成
 //        strategy.setInclude(scanner("user").split(","));//表名,多个英文逗号分割
         strategy.setControllerMappingHyphenStyle(true);

+ 76 - 0
cloud-model/src/main/java/com/hssx/cloudmodel/util/I18nUtil.java

@@ -0,0 +1,76 @@
+package com.hssx.cloudmodel.util;
+
+/**
+ * Author: 吴涛涛 cuiyi@itany.com
+ * Date : 2019 - 09 - 05 16:56
+ * Description:<描述>
+ * Version: 1.0
+ */
+public class I18nUtil {
+    //由于前端可以转换,所以直接交给前端配置转换就可以了,此util暂时作废
+//    public static String getEnus(String zhcn, Integer language) {
+//        if (0 == language) {
+//            if ("用户不存在或者未登录".equals(zhcn)) {
+//                return "User does not exist or is not logged in";
+//            } else if ("数据不可为空".equals(zhcn)) {
+//                return "Data cannot be empty";
+//            } else if ("公司已存在,请勿重复添加".equals(zhcn)) {
+//                return "The company already exists, please do not add it repeatedly";
+//            } else if ("当前公司所关联的生产方公司中已被用用到项目,不可执行修改操作。".equals(zhcn)) {
+//                return "The current production company associated with the company has been used in the project, and the modification operation cannot be performed.";
+//            } else if ("当前公司所关联的资产方公司已被用用到项目,不可执行修改操作。".equals(zhcn)) {
+//                return "The current asset company associated with the company has been used in the project and no modification operations can be performed.";
+//            } else if ("该公司已被应用到用户中,暂不提供删除操作".equals(zhcn)) {
+//                return "The company has been applied to users, and no deletion is provided at this time.";
+//            } else if ("当前设备编号已存在,请重新输入其他模具编号".equals(zhcn)) {
+//                return "The current device number already exists. Please re-enter other mold numbers";
+//            } else if ("该设备没有所属公司,请添加所属公司后再启用".equals(zhcn)) {
+//                return "This device does not have a company, please add your company and then enable it.";
+//            } else if ("对不起,您不是超级管理员,不具备启用设备的权限".equals(zhcn)) {
+//                return "Sorry, you are not a super administrator and do not have permission to enable the device.";
+//            } else if ("对不起,您不含有查看该列表的权利".equals(zhcn)) {
+//                return "Sorry, you do not have the right to view this list.";
+//            } else if ("云模盒编号已被占用,请修改后重新上传".equals(zhcn)) {
+//                return "The cloud model box number is already occupied. Please re-upload after modification.";
+//            } else if ("只有生产方和资产方审批人才能审核".equals(zhcn)) {
+//                return "Only producer and asset approvers can review";
+//            } else if ("暂无文件".equals(zhcn)) {
+//                return "No file";
+//            } else if ("您没有该权限!".equals(zhcn)) {
+//                return "Data cannot be empty";
+//            } else if ("数据不可为空".equals(zhcn)) {
+//                return "Data cannot be empty";
+//            } else if ("数据不可为空".equals(zhcn)) {
+//                return "Data cannot be empty";
+//            } else if ("数据不可为空".equals(zhcn)) {
+//                return "Data cannot be empty";
+//            } else if ("数据不可为空".equals(zhcn)) {
+//                return "Data cannot be empty";
+//            } else if ("数据不可为空".equals(zhcn)) {
+//                return "Data cannot be empty";
+//            } else if ("数据不可为空".equals(zhcn)) {
+//                return "Data cannot be empty";
+//            } else if ("数据不可为空".equals(zhcn)) {
+//                return "Data cannot be empty";
+//            } else if ("数据不可为空".equals(zhcn)) {
+//                return "Data cannot be empty";
+//            } else if ("数据不可为空".equals(zhcn)) {
+//                return "Data cannot be empty";
+//            } else if ("数据不可为空".equals(zhcn)) {
+//                return "Data cannot be empty";
+//            } else if ("数据不可为空".equals(zhcn)) {
+//                return "Data cannot be empty";
+//            } else if ("数据不可为空".equals(zhcn)) {
+//                return "Data cannot be empty";
+//            } else if ("数据不可为空".equals(zhcn)) {
+//                return "Data cannot be empty";
+//            } else if ("数据不可为空".equals(zhcn)) {
+//                return "Data cannot be empty";
+//            }
+//
+//        }else{
+//            return zhcn;
+//        }
+//        return null;
+//    }
+}

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

@@ -1,5 +1,6 @@
 package com.hssx.cloudmodel.util;
 
+import com.hssx.cloudmodel.entity.User;
 import net.lingala.zip4j.core.ZipFile;
 import net.lingala.zip4j.exception.ZipException;
 import net.lingala.zip4j.model.ZipParameters;
@@ -32,7 +33,17 @@ public class MD5Util {
     }
 
     public static void main(String[] args) throws ParseException {
-        zip4jDemo();
+        String a = "1.0.1";
+        String b = "1.0.2";
+        int i = b.compareTo(a);
+        int i1 = a.compareTo(b);
+        System.out.println(i+":"+i1);
+        List<User>users = new ArrayList<>();
+        for (User user : users) {
+            System.out.println("用户账号===》"+user.getAccount());
+        }
+        System.out.println("结束了++++++++++++++");
+//        zip4jDemo();
 
 //        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
 ////        LocalDateTime parse = LocalDateTime.parse("2019-07-31T16:00:00.000Z", formatter);