소스 검색

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

sunyadv 6 년 전
부모
커밋
54b2780f36

+ 45 - 15
cloud-model/src/main/java/com/hssx/cloudmodel/entity/Mould.java

@@ -14,7 +14,7 @@ import java.io.Serializable;
  * </p>
  *
  * @author 吴涛涛
- * @since 2019-08-05
+ * @since 2019-08-19
  */
 @TableName("tb_mould")
 public class Mould extends Model<Mould> {
@@ -106,19 +106,19 @@ public class Mould extends Model<Mould> {
     private String rfid;
 
     /**
-     * 使用寿命
+     * 使用寿命 单位:次
      */
     @TableField("setting_life")
     private Integer settingLife;
 
     /**
-     * 工厂位置
+     * 生产方公司位置
      */
     @TableField("area")
     private String area;
 
     /**
-     * 生产方公司名称
+     * 生产方名称
      */
     @TableField("produce_company_name")
     private String produceCompanyName;
@@ -152,17 +152,31 @@ public class Mould extends Model<Mould> {
      */
     @TableField("run_times")
     private Integer runTimes;
+
     /**
-     * 保养提醒 0-不需要保养,1-保养
+     * 保养提醒 0-不需要,1-需要
      */
     @TableField("is_maintain")
     private Integer isMaintain;
+
     /**
-     * 保养设定次数:"1,2,3"
+     * 保养设定次数:1,2,3
      */
     @TableField("maintain_count")
     private String maintainCount;
 
+    /**
+     * 穴数
+     */
+    @TableField("holes")
+    private String holes;
+
+    /**
+     * 更新前的id
+     */
+    @TableField("pre_update_id")
+    private Integer preUpdateId;
+
 
     public Integer getId() {
         return id;
@@ -292,6 +306,13 @@ public class Mould extends Model<Mould> {
         this.area = area;
     }
 
+    public String getProduceCompanyName() {
+        return produceCompanyName;
+    }
+
+    public void setProduceCompanyName(String produceCompanyName) {
+        this.produceCompanyName = produceCompanyName;
+    }
 
     public Integer getInitialModulus() {
         return initialModulus;
@@ -349,21 +370,25 @@ public class Mould extends Model<Mould> {
         this.maintainCount = maintainCount;
     }
 
-    @Override
-    protected Serializable pkVal() {
-        return this.id;
+    public String getHoles() {
+        return holes;
     }
 
-    public static long getSerialVersionUID() {
-        return serialVersionUID;
+    public void setHoles(String holes) {
+        this.holes = holes;
     }
 
-    public String getProduceCompanyName() {
-        return produceCompanyName;
+    public Integer getPreUpdateId() {
+        return preUpdateId;
     }
 
-    public void setProduceCompanyName(String produceCompanyName) {
-        this.produceCompanyName = produceCompanyName;
+    public void setPreUpdateId(Integer preUpdateId) {
+        this.preUpdateId = preUpdateId;
+    }
+
+    @Override
+    protected Serializable pkVal() {
+        return this.id;
     }
 
     @Override
@@ -385,11 +410,16 @@ public class Mould extends Model<Mould> {
         ", rfid=" + rfid +
         ", settingLife=" + settingLife +
         ", area=" + area +
+        ", produceCompanyName=" + produceCompanyName +
         ", initialModulus=" + initialModulus +
         ", equipmentId=" + equipmentId +
         ", belongProjectGrade=" + belongProjectGrade +
         ", produceCompanyId=" + produceCompanyId +
         ", runTimes=" + runTimes +
+        ", isMaintain=" + isMaintain +
+        ", maintainCount=" + maintainCount +
+        ", holes=" + holes +
+        ", preUpdateId=" + preUpdateId +
         "}";
     }
 }

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

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

+ 5 - 3
cloud-model/src/main/resources/mapper/MouldEquipmentMapper.xml

@@ -12,6 +12,7 @@
         <result column="belong_company_id" property="belongCompanyId" />
         <result column="equipment_no" property="equipmentNo" />
         <result column="is_use" property="isUse" />
+        <result column="agent" property="agent" />
         <result column="hill_number" property="hillNumber" />
     </resultMap>
     <resultMap id="BaseResultMapVO" type="com.hssx.cloudmodel.entity.vo.MouldEquipmentVO">
@@ -26,19 +27,20 @@
         <result column="is_use" property="isUse" />
         <result column="hill_number" property="hillNumber" />
         <result column="modelNo" property="modelNo" />
+        <result column="agent" property="agent" />
         <result column="modelName" property="modelName" />
     </resultMap>
 
     <!-- 通用查询结果列 -->
     <sql id="Base_Column_List">
-        id, equipment_name, start_time, end_time, use_life, belong_company_id, equipment_no, is_use, hill_number
+        id, equipment_name, start_time, end_time, use_life, belong_company_id, equipment_no, is_use, hill_number,agent
     </sql>
 
     <select id="getListByCompanyId" resultMap="BaseResultMapVO">
         select
           tbme.id id, tbme.equipment_name equipment_name, tbme.start_time start_time, tbme.end_time end_time,
           tbme.use_life use_life, tbme.belong_company_id belong_company_id, tbme.equipment_no equipment_no,
-          tbme.is_use, tbme.hill_number,tbc.company_name companyName
+          tbme.is_use, tbme.hill_number,tbc.company_name companyName,tbme.agent
         from
           tb_mould_equipment tbme
         left join
@@ -57,7 +59,7 @@
     </select>
     <select id="getList" resultMap="BaseResultMapVO">
         select
-          tbme.id id, tbme.equipment_name equipment_name, tbme.start_time start_time, tbme.end_time end_time,
+          tbme.id id, tbme.equipment_name equipment_name, tbme.start_time start_time, tbme.end_time end_time,tbme.agent
           tbme.use_life use_life, tbme.belong_company_id belong_company_id, tbme.equipment_no equipment_no,
           tbme.is_use, tbme.hill_number,tbc.company_name companyName,tbm.model_no modelNo,tbm.model_name modelName
         from

+ 11 - 8
cloud-model/src/main/resources/mapper/MouldMapper.xml

@@ -20,22 +20,23 @@
         <result column="rfid" property="rfid" />
         <result column="setting_life" property="settingLife" />
         <result column="area" property="area" />
+        <result column="produce_company_name" property="produceCompanyName" />
         <result column="initial_modulus" property="initialModulus" />
         <result column="equipment_id" property="equipmentId" />
         <result column="belong_project_grade" property="belongProjectGrade" />
         <result column="produce_company_id" property="produceCompanyId" />
-        <result column="produce_company_name" property="produceCompanyName" />
         <result column="run_times" property="runTimes" />
         <result column="is_maintain" property="isMaintain" />
         <result column="maintain_count" property="maintainCount" />
+        <result column="holes" property="holes" />
+        <result column="pre_update_id" property="preUpdateId" />
     </resultMap>
 
     <!-- 通用查询结果列 -->
     <sql id="Base_Column_List">
-        id, model_no, model_name, water_gap, tonnage, oc_cycle, daily_output, company_id, current_version_id, state, is_delete, creator_id, project_id, rfid, setting_life, area, factory_id, factory_name, initial_modulus, equipment_id, belong_project_grade, produce_company_id, run_times
+        id, model_no, model_name, water_gap, tonnage, oc_cycle, daily_output, company_id, current_version_id, state, is_delete, creator_id, project_id, rfid, setting_life, area, produce_company_name, initial_modulus, equipment_id, belong_project_grade, produce_company_id, run_times, is_maintain, maintain_count, holes, pre_update_id
     </sql>
 
-
     <resultMap id="BaseResultMapVO" type="com.hssx.cloudmodel.entity.vo.MouldVO">
         <id column="id" property="id"/>
         <result column="maintain_count" property="maintainCount" />
@@ -69,6 +70,8 @@
         <result column="ownerCompanyName" property="ownerCompanyName"/>
         <result column="companyName" property="companyName"/>
         <result column="is_maintain" property="isMaintain" />
+        <result column="holes" property="holes" />
+        <result column="pre_update_id" property="preUpdateId" />
     </resultMap>
 
     <update id="updateMouldByProjectId">
@@ -77,8 +80,8 @@
 
     <select id="selectListByCondition" resultMap="BaseResultMapVO">
         select
-        tbm.id id,tbm.model_no model_no, tbm.model_name model_name,tbm.initial_modulus initial_modulus,tbm.rfid rfid,tbm.creator_id creator_id,tbm.equipment_id equipment_id,tbm.is_maintain,
-        tbmp.end_time endTime,tbm.state state,tbp.project_name projectName,tbc.company_name companyName,tbco.company_name produceCompany,
+        tbm.id id,tbm.model_no model_no, tbm.model_name model_name,tbm.initial_modulus initial_modulus,tbm.rfid rfid,tbm.creator_id creator_id,tbm.equipment_id equipment_id,tbm.is_maintain,tbm.holes,
+        tbmp.end_time endTime,tbm.state state,tbp.project_name projectName,tbc.company_name companyName,tbco.company_name produceCompany,tbm.pre_update_id,
         tbp.manager mangerName,tbm.factory_name factory_name,tbm.area area,tbmp.hill_number hillNumber,tbm.oc_cycle oc_cycle,tbp.manager_id managerId,
         tbmp.equipment_no equipmentNo,tbm.setting_life setting_life,tbp.owner_company_name ownerCompanyName,tbm.run_times run_times
         from
@@ -116,7 +119,7 @@
     <select id="selectListByConditionByProject" resultMap="BaseResultMapVO">
         select
         tbm.id id,tbm.model_no model_no, tbm.model_name model_name,tbm.initial_modulus initial_modulus,tbm.rfid rfid,tbp.manager_id managerId,tbm.equipment_id equipment_id,is_maintain,
-        tbmp.end_time endTime,tbm.state state,tbp.project_name projectName,tbc.company_name companyName,
+        tbmp.end_time endTime,tbm.state state,tbp.project_name projectName,tbc.company_name companyName,tbm.holes,tbm.pre_update_id,
         tbp.manager mangerName,tbm.factory_name factory_name,tbm.area area,tbmp.hill_number hillNumber,tbm.oc_cycle oc_cycle,tbm.creator_id creator_id,
         tbmp.equipment_no equipmentNo,tbm.setting_life setting_life,tbp.owner_company_name ownerCompanyName,tbm.run_times run_times
         from
@@ -152,8 +155,8 @@
     select
         tbm.project_id project_id, tbm.setting_life setting_life, tbm.area area,tbm.equipment_id equipment_id,tbm.maintain_count maintain_count,is_maintain,
         tbm.id id,tbm.model_no model_no, tbm.model_name,tbm.initial_modulus initial_modulus,tbp.manager_id managerId,tbm.produce_company_id produce_company_id,
-        tbmp.end_time endTime,tbm.state state,tbp.project_name projectName,tbco.company_name produceCompany,tbm.creator_id creator_id,
-        tbp.manager mangerName,tbm.factory_name factory_name,tbm.area area,tbm.rfid rfid,tbm.oc_cycle oc_cycle,tbc.company_name companyName,
+        tbmp.end_time endTime,tbm.state state,tbp.project_name projectName,tbco.company_name produceCompany,tbm.creator_id creator_id,tbm.holes,
+        tbp.manager mangerName,tbm.factory_name factory_name,tbm.area area,tbm.rfid rfid,tbm.oc_cycle oc_cycle,tbc.company_name companyName,tbm.pre_update_id,
         tbmp.equipment_no equipmentNo,tbmp.hill_number hillNumber,tbm.setting_life setting_life,tbm.run_times run_times
         from
         tb_mould tbm

+ 39 - 30
ys_vue/src/views/base/allocation.vue

@@ -37,7 +37,7 @@
             <el-table-column prop="modelName" label="模具名称" sortable></el-table-column>
             <el-table-column prop="modelNo" label="模具编号" width="120" align="center" sortable></el-table-column>
             <el-table-column prop="companyName" label="公司名称" sortable></el-table-column>
-            <el-table-column label="代理商" width="120" sortable></el-table-column>
+            <el-table-column prop="agent" label="代理商" width="120" sortable></el-table-column>
             <el-table-column label="云模盒状态" align="center" width="120" sortable>
                 <template slot-scope="scope">
                     <span v-if="scope.row.isUse == 0">未启用</span>
@@ -134,31 +134,31 @@
                 class="demo-form-inline"
             >
                 <el-form-item label="云模盒编号" prop="equipmentNo">
-                <el-input v-model="newAllocation.equipmentNo" autocomplete="off" placeholder="请填写"></el-input>
+                    <el-input v-model="newAllocation.equipmentNo" autocomplete="off" placeholder="请填写"></el-input>
                 </el-form-item>
                 <el-form-item label="所属公司" prop="belongCompanyId">
-                <el-select
-                    v-model="newAllocation.belongCompanyId"
-                    filterable
-                    clearable
-                    placeholder="请选择"
-                    style="width: 202px"
-                >
-                    <el-option
-                    v-for="item in companies"
-                    :key="item.id"
-                    :label="item.companyName"
-                    :value="item.id"
-                    ></el-option>
-                </el-select>
+                    <el-select
+                        v-model="newAllocation.belongCompanyId"
+                        filterable
+                        clearable
+                        placeholder="请选择所属公司"
+                        style="width: 202px"
+                    >
+                        <el-option
+                        v-for="item in companies"
+                        :key="item.id"
+                        :label="item.companyName"
+                        :value="item.id"
+                        ></el-option>
+                    </el-select>
                 </el-form-item>
                 <el-form-item label="使用年限" prop="useLife">
-                <el-input
-                    v-model.number="newAllocation.useLife"
-                    type="age"
-                    autocomplete="off"
-                    placeholder="请填写"
-                ></el-input>
+                    <el-input
+                        v-model.number="newAllocation.useLife"
+                        type="age"
+                        autocomplete="off"
+                        placeholder="请填写使用年限"
+                    ></el-input>
                 </el-form-item>
                 <el-form-item label="代理商" prop="agent">
                     <el-input
@@ -176,7 +176,16 @@
 
         <!-- 启用弹窗 -->
         <el-dialog title="启用" :visible.sync="operateDialogVisible" width="100" center>
-            <span>确定启用设备吗</span>
+            <el-form
+                label-width="100px"
+                :rules="formRules"
+                :inline="true"
+                class="demo-form-inline"
+            >
+                <el-form-item label="某个参数">
+                    <el-input autocomplete="off" placeholder="填了也不会发生什么"></el-input>
+                </el-form-item>
+            </el-form>
             <span slot="footer" class="dialog-footer">
                 <el-button @click="operateDialogVisible = false">取消</el-button>
                 <el-button type="primary" @click="enable">启用</el-button>
@@ -326,10 +335,10 @@
                     this.http.post(
                         this.port.base.editMould,
                         {
-                        equipmentNo: this.newAllocation.equipmentNo,
-                        belongCompanyId: this.newAllocation.belongCompanyId,
-                        useLife: this.newAllocation.useLife
-                        //这里应该有代理商agent
+                            equipmentNo: this.newAllocation.equipmentNo,
+                            belongCompanyId: this.newAllocation.belongCompanyId,
+                            useLife: this.newAllocation.useLife,
+                            agent: this.newAllocation.agent
                         },
                         res => {
                             this.addLoading = false;
@@ -368,7 +377,7 @@
                     useLife: row.useLife,
                     equipmentNo: row.equipmentNo,
                     belongCompanyId: row.belongCompanyId,
-                    agent: ""//这里应该有代理商agent
+                    agent: row.agent
                 };
             },
 
@@ -382,8 +391,8 @@
                             equipmentNo: this.newAllocation.equipmentNo,
                             equipmentName: this.newAllocation.equipmentName,
                             belongCompanyId: this.newAllocation.belongCompanyId,
-                            useLife: this.newAllocation.useLife
-                            //这里应该有代理商agent
+                            useLife: this.newAllocation.useLife,
+                            agent: this.newAllocation.agent
                         },
                         res => {
                             this.editLoading = false;