Browse Source

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

# Conflicts:
#	cloud-socket/src/com/js/kbt/socket/UserHandler.java
5 năm trước cách đây
mục cha
commit
450292883c

+ 6 - 2
cloud-model/src/main/java/com/hssx/cloudmodel/controller/MouldController.java

@@ -2,6 +2,7 @@ package com.hssx.cloudmodel.controller;
 
 
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.hssx.cloudmodel.entity.InjectionMolding;
 import com.hssx.cloudmodel.entity.Mould;
 import com.hssx.cloudmodel.entity.User;
 import com.hssx.cloudmodel.entity.vo.MouldVO;
@@ -45,18 +46,21 @@ public class MouldController {
      * 修改参数:id 模具id, settingLife 使用年限, initialModulus 初始模次 equipmentId 设备id,
      * produceCompanyId 生产方公司id,ocCycle 每模平均周期,rfid rfid码,maintainCount 保养设定次数:"1,2,3"
      *
+     * materialType 材料牌号,color 颜色,size 模具尺寸,tonnage 吨位,mallWeight 成品重量(单位:G),headWeight 料头重量(单位:G)
+     * maxShotWeight 最大射胶量(单位:G),minShotWeight 最小射胶量(单位:G),cycle 成型周期,commonModelTemperature 公模(动模)模温
+     * motherModelTemperature 母模(定模)模温
      * 模具更新时多传的参数  preUpdateId 要被更新的模具的id dynamicId
      * @return
      */
     @ApiOperation("添加/修改模具")
     @RequestMapping("/addOrUpdate")
     @ResponseBody
-    public HttpRespMsg addOrUpdate(Mould mould, String token, @RequestParam(required = false) Integer dynamicId) {
+    public HttpRespMsg addOrUpdate(Mould mould, InjectionMolding injectionMolding, String token, @RequestParam(required = false) Integer dynamicId) {
         HttpRespMsg msg = new HttpRespMsg();
         QueryWrapper<User> qw = new QueryWrapper<>();
         qw.eq("head_imgurl",token);
         User user = userService.getOne(qw);
-        msg = mouldService.addAndUpdateMould(mould,user,dynamicId);
+        msg = mouldService.addAndUpdateMould(mould,user,dynamicId,injectionMolding);
         return msg;
     }
 

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

@@ -74,7 +74,7 @@ public class MouldEquipmentController {
      * 云平台下行配置数据包接口
      * lowPowerLimit 低电量报警限值:(1 字节,十六进制)如:1e=31
      * hotAlarmLimit 热报警限值:(1 字节,十六进制)如:50=80
-     * isUse:0-停止,1-启动
+     * isUse:0-停止,1-启动,2-启用中,3-停用中
      * equipmentNo 设备编号(可能是多个或者一个)多个以“,”隔开传  如:"123456"(单个),"123456,456878,123589"(多个)
      */
     @ApiOperation("启用设备")

+ 4 - 0
cloud-model/src/main/java/com/hssx/cloudmodel/controller/VnoticeUserController.java

@@ -1,6 +1,9 @@
 package com.hssx.cloudmodel.controller;
 
 
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import com.hssx.cloudmodel.entity.VnoticeUser;
 import com.hssx.cloudmodel.service.VnoticeUserService;
 import com.hssx.cloudmodel.util.HttpRespMsg;
 import com.hssx.cloudmodel.util.PageUtil;
@@ -54,3 +57,4 @@ public class VnoticeUserController {
     }
 }
 
+

+ 242 - 0
cloud-model/src/main/java/com/hssx/cloudmodel/entity/InjectionMolding.java

@@ -0,0 +1,242 @@
+package com.hssx.cloudmodel.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableField;
+import java.io.Serializable;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author 吴涛涛
+ * @since 2019-10-28
+ */
+public class InjectionMolding extends Model<InjectionMolding> {
+
+    private static final long serialVersionUID=1L;
+
+    /**
+     * 模具注塑工艺信息表主键
+     */
+    @TableId(value = "injection_id", type = IdType.AUTO)
+    private Integer injectionId;
+
+    /**
+     * 材料牌号
+     */
+    @TableField("material_type")
+    private String materialType;
+
+    /**
+     * 颜色
+     */
+    @TableField("color")
+    private String color;
+
+    /**
+     * 模具尺寸
+     */
+    @TableField("size")
+    private String size;
+
+    /**
+     * 吨位
+     */
+    @TableField("tonnage")
+    private String tonnage;
+
+    /**
+     * 成品重量(单位:G)
+     */
+    @TableField("all_weight")
+    private Double allWeight;
+
+    /**
+     * 料头重量(单位:G)
+     */
+    @TableField("head_weight")
+    private Double headWeight;
+
+    /**
+     * 最大射胶量(单位:G)
+     */
+    @TableField("min_shot_weight")
+    private Integer minShotWeight;
+
+    /**
+     * 最小射胶量(单位:G)
+     */
+    @TableField("max_shot_weight")
+    private Integer maxShotWeight;
+
+    /**
+     * 成型周期
+     */
+    @TableField("cycle")
+    private Integer cycle;
+
+    /**
+     * 公模(动模)模温
+     */
+    @TableField("common_model_temperature")
+    private String commonModelTemperature;
+
+    /**
+     * 母模(定模)模温
+     */
+    @TableField("mother_model_temperature")
+    private String motherModelTemperature;
+
+    /**
+     * 模具id
+     */
+    @TableField("mould_id")
+    private Integer mouldId;
+
+    /**
+     * 设备编号
+     */
+    @TableField("equipment_no")
+    private String equipmentNo;
+
+
+    public Integer getInjectionId() {
+        return injectionId;
+    }
+
+    public void setInjectionId(Integer injectionId) {
+        this.injectionId = injectionId;
+    }
+
+    public String getMaterialType() {
+        return materialType;
+    }
+
+    public void setMaterialType(String materialType) {
+        this.materialType = materialType;
+    }
+
+    public String getColor() {
+        return color;
+    }
+
+    public void setColor(String color) {
+        this.color = color;
+    }
+
+    public String getSize() {
+        return size;
+    }
+
+    public void setSize(String size) {
+        this.size = size;
+    }
+
+    public String getTonnage() {
+        return tonnage;
+    }
+
+    public void setTonnage(String tonnage) {
+        this.tonnage = tonnage;
+    }
+
+    public Double getAllWeight() {
+        return allWeight;
+    }
+
+    public void setAllWeight(Double allWeight) {
+        this.allWeight = allWeight;
+    }
+
+    public Double getHeadWeight() {
+        return headWeight;
+    }
+
+    public void setHeadWeight(Double headWeight) {
+        this.headWeight = headWeight;
+    }
+
+    public Integer getMinShotWeight() {
+        return minShotWeight;
+    }
+
+    public void setMinShotWeight(Integer minShotWeight) {
+        this.minShotWeight = minShotWeight;
+    }
+
+    public Integer getMaxShotWeight() {
+        return maxShotWeight;
+    }
+
+    public void setMaxShotWeight(Integer maxShotWeight) {
+        this.maxShotWeight = maxShotWeight;
+    }
+
+    public Integer getCycle() {
+        return cycle;
+    }
+
+    public void setCycle(Integer cycle) {
+        this.cycle = cycle;
+    }
+
+    public String getCommonModelTemperature() {
+        return commonModelTemperature;
+    }
+
+    public void setCommonModelTemperature(String commonModelTemperature) {
+        this.commonModelTemperature = commonModelTemperature;
+    }
+
+    public String getMotherModelTemperature() {
+        return motherModelTemperature;
+    }
+
+    public void setMotherModelTemperature(String motherModelTemperature) {
+        this.motherModelTemperature = motherModelTemperature;
+    }
+
+    public Integer getMouldId() {
+        return mouldId;
+    }
+
+    public void setMouldId(Integer mouldId) {
+        this.mouldId = mouldId;
+    }
+
+    public String getEquipmentNo() {
+        return equipmentNo;
+    }
+
+    public void setEquipmentNo(String equipmentNo) {
+        this.equipmentNo = equipmentNo;
+    }
+
+    @Override
+    protected Serializable pkVal() {
+        return this.injectionId;
+    }
+
+    @Override
+    public String toString() {
+        return "InjectionMolding{" +
+        "injectionId=" + injectionId +
+        ", materialType=" + materialType +
+        ", color=" + color +
+        ", size=" + size +
+        ", tonnage=" + tonnage +
+        ", allWeight=" + allWeight +
+        ", headWeight=" + headWeight +
+        ", minShotWeight=" + minShotWeight +
+        ", maxShotWeight=" + maxShotWeight +
+        ", cycle=" + cycle +
+        ", commonModelTemperature=" + commonModelTemperature +
+        ", motherModelTemperature=" + motherModelTemperature +
+        ", mouldId=" + mouldId +
+        ", equipmentNo=" + equipmentNo +
+        "}";
+    }
+}

+ 16 - 0
cloud-model/src/main/java/com/hssx/cloudmodel/mapper/InjectionMoldingMapper.java

@@ -0,0 +1,16 @@
+package com.hssx.cloudmodel.mapper;
+
+import com.hssx.cloudmodel.entity.InjectionMolding;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author 吴涛涛
+ * @since 2019-10-28
+ */
+public interface InjectionMoldingMapper extends BaseMapper<InjectionMolding> {
+
+}

+ 16 - 0
cloud-model/src/main/java/com/hssx/cloudmodel/service/InjectionMoldingService.java

@@ -0,0 +1,16 @@
+package com.hssx.cloudmodel.service;
+
+import com.hssx.cloudmodel.entity.InjectionMolding;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author 吴涛涛
+ * @since 2019-10-28
+ */
+public interface InjectionMoldingService extends IService<InjectionMolding> {
+
+}

+ 2 - 1
cloud-model/src/main/java/com/hssx/cloudmodel/service/MouldService.java

@@ -1,5 +1,6 @@
 package com.hssx.cloudmodel.service;
 
+import com.hssx.cloudmodel.entity.InjectionMolding;
 import com.hssx.cloudmodel.entity.Mould;
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.hssx.cloudmodel.entity.User;
@@ -17,7 +18,7 @@ import com.hssx.cloudmodel.util.HttpRespMsg;
  */
 public interface MouldService extends IService<Mould> {
 
-    HttpRespMsg addAndUpdateMould(Mould mould, User user,Integer dynamicId);
+    HttpRespMsg addAndUpdateMould(Mould mould, User user,Integer dynamicId,InjectionMolding injectionMolding);
 
     HttpRespMsg getMoildDetail(MouldVO mould);
 

+ 20 - 0
cloud-model/src/main/java/com/hssx/cloudmodel/service/impl/InjectionMoldingServiceImpl.java

@@ -0,0 +1,20 @@
+package com.hssx.cloudmodel.service.impl;
+
+import com.hssx.cloudmodel.entity.InjectionMolding;
+import com.hssx.cloudmodel.mapper.InjectionMoldingMapper;
+import com.hssx.cloudmodel.service.InjectionMoldingService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author 吴涛涛
+ * @since 2019-10-28
+ */
+@Service
+public class InjectionMoldingServiceImpl extends ServiceImpl<InjectionMoldingMapper, InjectionMolding> implements InjectionMoldingService {
+
+}

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

@@ -62,7 +62,7 @@ public class MouldServiceImpl extends ServiceImpl<MouldMapper, Mould> implements
     MouldFileMapper mouldFileMapper;
 
     @Override
-    public HttpRespMsg addAndUpdateMould(Mould mould, User user, Integer dynamicId) {
+    public HttpRespMsg addAndUpdateMould(Mould mould, User user, Integer dynamicId,InjectionMolding injectionMolding) {
         HttpRespMsg msg = new HttpRespMsg();
         if (mould.getId() != null) {
             //修改

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

@@ -50,7 +50,6 @@ public class VnoticeUserServiceImpl extends ServiceImpl<VnoticeUserMapper, Vnoti
         if (user != null) {
             Map<String, Object> map = new HashMap<>();
             //加载全部
-            System.out.println(page.getPageNum()+" "+page.getPageSize());
             PageHelper.startPage(page.getPageNum(), page.getPageSize());
             list = vnoticeUserMapper.selectList(new QueryWrapper<VnoticeUser>().eq("user_id", user.getId()).eq("notice_type", Constant.APPROVEL_TYPE).orderByDesc("id").last(""));
             long count = list.stream().filter(x -> x.getIsRead() == 0).count();
@@ -58,6 +57,7 @@ public class VnoticeUserServiceImpl extends ServiceImpl<VnoticeUserMapper, Vnoti
             map.put("approvelList", pageInfo);
             map.put("isNotReadCount", count);
             mapList.add(map);
+            PageHelper.startPage(page.getPageNum(), page.getPageSize());
             List<VnoticeUser> list1 = vnoticeUserMapper.selectList(new QueryWrapper<VnoticeUser>().eq("user_id", user.getId()).eq("notice_type",Constant.MAINTAIN_TYPE).orderByDesc("id"));
             count = list.stream().filter(x -> x.getIsRead() == 0).count();
             PageInfo<VnoticeUser> pageInfo1 = new PageInfo<VnoticeUser>(list1);
@@ -65,6 +65,7 @@ public class VnoticeUserServiceImpl extends ServiceImpl<VnoticeUserMapper, Vnoti
             map1.put("matainList", pageInfo1);
             map1.put("isNotReadCount", count);
             mapList.add(map1);
+            PageHelper.startPage(page.getPageNum(), page.getPageSize());
             List<VnoticeUser> list2 = vnoticeUserMapper.selectList(new QueryWrapper<VnoticeUser>().eq("user_id", user.getId()).eq("notice_type",Constant.EMERGENCY_TYPE).orderByDesc("id"));
             count = list.stream().filter(x -> x.getIsRead() == 0).count();
             PageInfo<VnoticeUser> pageInfo2 = new PageInfo<VnoticeUser>(list2);

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

@@ -204,12 +204,12 @@ public class CodeGenerator {
         //若想要生成的实体类继承某个Controller,则可打开下面注释。写上需要继承的Controller的位置即可
 //        strategy.setSuperControllerClass("com.baomidou.ant.common.BaseController");
         //此处user是表名,多个英文逗号分割
-        strategy.setInclude("tb_mould_equipment");
+        strategy.setInclude("injection_molding");
 //        strategy.setExclude();//数据库表全生成
 //        strategy.setInclude(scanner("user").split(","));//表名,多个英文逗号分割
         strategy.setControllerMappingHyphenStyle(true);
         //数据库表前缀,不配置这行的话,生成的类会带有T如:TUser,配置后即可将前缀去掉
-        strategy.setTablePrefix("tb_");
+//        strategy.setTablePrefix("tb_");
         mpg.setStrategy(strategy);
 //        mpg.setTemplateEngine(new FreemarkerTemplateEngine());
         mpg.execute();

+ 28 - 0
cloud-model/src/main/resources/mapper/InjectionMoldingMapper.xml

@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.hssx.cloudmodel.mapper.InjectionMoldingMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.hssx.cloudmodel.entity.InjectionMolding">
+        <id column="injection_id" property="injectionId" />
+        <result column="material_type" property="materialType" />
+        <result column="color" property="color" />
+        <result column="size" property="size" />
+        <result column="tonnage" property="tonnage" />
+        <result column="all_weight" property="allWeight" />
+        <result column="head_weight" property="headWeight" />
+        <result column="min_shot_weight" property="minShotWeight" />
+        <result column="max_shot_weight" property="maxShotWeight" />
+        <result column="cycle" property="cycle" />
+        <result column="common_model_temperature" property="commonModelTemperature" />
+        <result column="mother_model_temperature" property="motherModelTemperature" />
+        <result column="mould_id" property="mouldId" />
+        <result column="equipment_no" property="equipmentNo" />
+    </resultMap>
+
+    <!-- 通用查询结果列 -->
+    <sql id="Base_Column_List">
+        injection_id, material_type, color, size, tonnage, all_weight, head_weight, min_shot_weight, max_shot_weight, cycle, common_model_temperature, mother_model_temperature, mould_id, equipment_no
+    </sql>
+
+</mapper>