瀏覽代碼

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

# Conflicts:
#	target/classes/main/resources/mapper/MouldEquipmentMapper.xml
#	target/classes/main/resources/mapper/MouldMapper.xml
5 年之前
父節點
當前提交
aee3608705

+ 0 - 54
cloud-model/src/main/java/com/hssx/cloudmodel/controller/AppVersionController.java

@@ -1,54 +0,0 @@
-package com.hssx.cloudmodel.controller;
-
-
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.hssx.cloudmodel.entity.AppVersion;
-import com.hssx.cloudmodel.entity.vo.CompanyVO;
-import com.hssx.cloudmodel.service.AppVersionService;
-import com.hssx.cloudmodel.util.HttpRespMsg;
-import io.swagger.annotations.ApiOperation;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Controller;
-import org.springframework.web.bind.annotation.RequestMapping;
-
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.ResponseBody;
-import org.springframework.web.bind.annotation.RestController;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-/**
- * <p>
- *  前端控制器
- * </p>
- *
- * @author 吴涛涛
- * @since 2019-09-05
- */
-@Controller
-public class AppVersionController {
-
-    @Autowired
-    private AppVersionService appVersionService;
-    @ApiOperation("比对版本")
-    @RequestMapping("/checkVersion")
-    @ResponseBody
-    public HttpRespMsg addAndUpdateRole(AppVersion appVersion) {
-        HttpRespMsg msg = new HttpRespMsg();
-        AppVersion platform = appVersionService.getOne(new QueryWrapper<AppVersion>().eq("platform", appVersion.getPlatform()));
-        if(platform == null){
-            msg.setError("数据不存在");
-        }else{
-            int i = appVersion.getVersion().compareTo(platform.getVersion());
-            if(i<0){
-                msg.data = platform;
-            }else{
-                msg.setError("版本过低");
-            }
-        }
-        return msg;
-    }
-
-}
-

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

@@ -122,12 +122,14 @@ public class MouldEquipmentServiceImpl extends ServiceImpl<MouldEquipmentMapper,
                     setPacketMessage = downProcessMsg(lowPowerLimitStr,hotAlarmLimitStr,isUseStr);                    mouldDownPacket.setPacketStr(setPacketMessage);
                     mouldDownPacket.setPacketStr(setPacketMessage);
                     mouldDownPacket.setIsUse(mouldEquipment.getIsUse());
+                    mouldDownPacket.setEquipmentNo(str);
                     mouldDownPacketMapper.updateById(mouldDownPacket);
                 }else{
                     MouldDownPacket mouldDownPacket = new MouldDownPacket();
                     setPacketMessage = downProcessMsg(lowPowerLimitStr,hotAlarmLimitStr,isUseStr);                    mouldDownPacket.setPacketStr(setPacketMessage);
                     mouldDownPacket.setPacketStr(setPacketMessage);
                     mouldDownPacket.setIsUse(mouldEquipment.getIsUse());
+                    mouldDownPacket.setEquipmentNo(str);
                     mouldDownPacketMapper.insert(mouldDownPacket);
                 }
             }

+ 20 - 20
cloud-model/src/main/resources/mapper/ProjectMapper.xml

@@ -39,7 +39,7 @@
                     select="queryCustomCompaniesId" column="id">
         </collection>
     </resultMap>
-<!-- 以上一对多的映射-->
+    <!-- 以上一对多的映射-->
     <resultMap id="getCustomCompany" type="com.hssx.cloudmodel.entity.CustomCompany">
         <result column="company_id" property="companyId" />
         <result column="company_name" property="companyName" />
@@ -201,20 +201,20 @@
         <result column="powerString" property="powerString" />
     </resultMap>
     <select id="selectUserPowerList1" resultMap="BaseResultMapPowerList">
-      SELECT
-      tbpu.user_id ,tbpu.project_id ,GROUP_CONCAT(tbpu.power_type) powerString,
+        SELECT
+        tbpu.user_id ,tbpu.project_id ,GROUP_CONCAT(tbpu.power_type) powerString,
         tbu.username ,tbc.company_name,
         tbp.project_name
-      FROM `tb_power` tbpu
-      left join
-      tb_project tbp
-      on tbp.id = tbpu.project_id
-      left join
-      tb_user tbu
-      on tbpu.user_id = tbu.id
-      left join
-      tb_company tbc
-      on tbc.id = tbu.company_id
+        FROM `tb_power` tbpu
+        left join
+        tb_project tbp
+        on tbp.id = tbpu.project_id
+        left join
+        tb_user tbu
+        on tbpu.user_id = tbu.id
+        left join
+        tb_company tbc
+        on tbc.id = tbu.company_id
         <where>
             <if test="user.projectId != null">
                 tbpu.project_id = #{user.projectId}
@@ -232,8 +232,8 @@
                 tbp.manager_id = #{user.id}
             </if>
         </where>
-      GROUP BY tbpu.user_id ,tbpu.project_id;
-      order by tbpu.user_id
+        GROUP BY tbpu.user_id ,tbpu.project_id;
+        order by tbpu.user_id
     </select>
 
     <resultMap id="BaseResultMapPower" type="com.hssx.cloudmodel.entity.vo.ProjectVO">
@@ -245,16 +245,16 @@
         <result column="company_name" property="companyName" />
         <result column="powerString" property="powerString" />
         <collection property="powers" javaType="java.util.List" ofType="com.hssx.cloudmodel.entity.Power"
-                    select="queryPowerByUserIdAndProject" column="{userId = user_id,projectId =
+                    select="queryPowerByUserIdAndProject" column="{userId = user_id,projectId = project_id}">
+        </collection>
+    </resultMap>
     <resultMap id="BasePower" type="com.hssx.cloudmodel.entity.Power">
         <result column="power_type" property="powerType" />
         <result column="user_id" property="userId" />
         <result column="project_id" property="projectId" />
     </resultMap>
 
-project_id}">
-        </collection>
-    </resultMap>    <select id="selectUserPowerList" resultMap="BaseResultMapPower">
+    <select id="selectUserPowerList" resultMap="BaseResultMapPower">
         SELECT
         tbpu.user_id user_id,tbpu.project_id project_id,tbu.username username,tbc.company_name,
         tbp.project_name
@@ -271,7 +271,7 @@ project_id}">
         ON tbc.id = tbu.company_id
         <where>
             <if test="user.projectId != null and user.projectId !=''">
-               AND tbpu.project_id = #{user.projectId}
+                AND tbpu.project_id = #{user.projectId}
             </if>
             <if test="user.cId != null and user.cId !=''">
                 AND tbu.company_id = #{user.cId}

+ 20 - 20
target/classes/main/resources/mapper/ProjectMapper.xml

@@ -39,7 +39,7 @@
                     select="queryCustomCompaniesId" column="id">
         </collection>
     </resultMap>
-<!-- 以上一对多的映射-->
+    <!-- 以上一对多的映射-->
     <resultMap id="getCustomCompany" type="com.hssx.cloudmodel.entity.CustomCompany">
         <result column="company_id" property="companyId" />
         <result column="company_name" property="companyName" />
@@ -201,20 +201,20 @@
         <result column="powerString" property="powerString" />
     </resultMap>
     <select id="selectUserPowerList1" resultMap="BaseResultMapPowerList">
-      SELECT
-      tbpu.user_id ,tbpu.project_id ,GROUP_CONCAT(tbpu.power_type) powerString,
+        SELECT
+        tbpu.user_id ,tbpu.project_id ,GROUP_CONCAT(tbpu.power_type) powerString,
         tbu.username ,tbc.company_name,
         tbp.project_name
-      FROM `tb_power` tbpu
-      left join
-      tb_project tbp
-      on tbp.id = tbpu.project_id
-      left join
-      tb_user tbu
-      on tbpu.user_id = tbu.id
-      left join
-      tb_company tbc
-      on tbc.id = tbu.company_id
+        FROM `tb_power` tbpu
+        left join
+        tb_project tbp
+        on tbp.id = tbpu.project_id
+        left join
+        tb_user tbu
+        on tbpu.user_id = tbu.id
+        left join
+        tb_company tbc
+        on tbc.id = tbu.company_id
         <where>
             <if test="user.projectId != null">
                 tbpu.project_id = #{user.projectId}
@@ -232,8 +232,8 @@
                 tbp.manager_id = #{user.id}
             </if>
         </where>
-      GROUP BY tbpu.user_id ,tbpu.project_id;
-      order by tbpu.user_id
+        GROUP BY tbpu.user_id ,tbpu.project_id;
+        order by tbpu.user_id
     </select>
 
     <resultMap id="BaseResultMapPower" type="com.hssx.cloudmodel.entity.vo.ProjectVO">
@@ -245,16 +245,16 @@
         <result column="company_name" property="companyName" />
         <result column="powerString" property="powerString" />
         <collection property="powers" javaType="java.util.List" ofType="com.hssx.cloudmodel.entity.Power"
-                    select="queryPowerByUserIdAndProject" column="{userId = user_id,projectId =
+                    select="queryPowerByUserIdAndProject" column="{userId = user_id,projectId = project_id}">
+        </collection>
+    </resultMap>
     <resultMap id="BasePower" type="com.hssx.cloudmodel.entity.Power">
         <result column="power_type" property="powerType" />
         <result column="user_id" property="userId" />
         <result column="project_id" property="projectId" />
     </resultMap>
 
-project_id}">
-        </collection>
-    </resultMap>    <select id="selectUserPowerList" resultMap="BaseResultMapPower">
+    <select id="selectUserPowerList" resultMap="BaseResultMapPower">
         SELECT
         tbpu.user_id user_id,tbpu.project_id project_id,tbu.username username,tbc.company_name,
         tbp.project_name
@@ -271,7 +271,7 @@ project_id}">
         ON tbc.id = tbu.company_id
         <where>
             <if test="user.projectId != null and user.projectId !=''">
-               AND tbpu.project_id = #{user.projectId}
+                AND tbpu.project_id = #{user.projectId}
             </if>
             <if test="user.cId != null and user.cId !=''">
                 AND tbu.company_id = #{user.cId}