ソースを参照

模型增加字段

yejian 2 年 前
コミット
e5457b5bfd

+ 6 - 5
imcs-admin-boot/imcs-common/src/main/java/com/github/zuihou/common/constant/DictionaryType.java

@@ -143,16 +143,17 @@ public class DictionaryType {
      */
     public static final String CUTTING_TOOL_TYPE = "CUTTING_TOOL_TYPE";
 
+    /**
+     * CNC数控系统
+     */
+    public static final String MODEL_CNC_SYSTEM = "MODEL_CNC_SYSTEM";
+
 
     public static final String[] ALL = new String[]{
             EDUCATION, NATION, POSITION_STATUS, AREA_LEVEL,RESOURCES_TYPE,RESOURCES_CATEGORY,MODEL_CATEGORY,MODEL_NODE_TYPE,MODEL_NET_MODE,MODEL_JOIN_AGREEMENT,
-            DATA_TYPE,COMPANY,OPERATOR,ISSUE_INSTRUCTIONS,PRESCRIPTION,INTERFACE_MODULE_TYPE,METERIAL_CATEGORY,METERIAL_BRAND,FREQUENCY,MONITOR_WAY, IGEN_PROJECT_STATUS,INTERFACE_TYPE,CUTTING_TOOL_TYPE
+            DATA_TYPE,COMPANY,OPERATOR,ISSUE_INSTRUCTIONS,PRESCRIPTION,INTERFACE_MODULE_TYPE,METERIAL_CATEGORY,METERIAL_BRAND,FREQUENCY,MONITOR_WAY, IGEN_PROJECT_STATUS,INTERFACE_TYPE,CUTTING_TOOL_TYPE,MODEL_CNC_SYSTEM
     };
 
     private DictionaryType() {
     }
-
-    public static final String OCCUPY_RESOURCE = "occupyResources";
-
-
 }

+ 5 - 0
imcs-admin-boot/imcs-tenant-biz/src/main/java/com/github/zuihou/tenant/service/impl/ModuleServiceImpl.java

@@ -162,11 +162,13 @@ public class ModuleServiceImpl extends SuperCacheServiceImpl<ModuleMapper, Modul
         Map<String, String> netModeMap = dictMap.get(DictionaryType.MODEL_NET_MODE);
         Map<String, String> nodeTypeMap = dictMap.get(DictionaryType.MODEL_NODE_TYPE);
         Map<String, String> categoryMap = dictMap.get(DictionaryType.MODEL_CATEGORY);
+        Map<String, String> cncSystemMap = dictMap.get(DictionaryType.MODEL_CNC_SYSTEM);
 
         String joinAgreementKey = bean.getJoinAgreement()==null?"":bean.getJoinAgreement().getKey();
         String netModeKey = bean.getNetMode()==null?"":bean.getNetMode().getKey();
         String nodeTypeKey = bean.getNodeType()==null?"":bean.getNodeType().getKey();
         String categoryKey = bean.getCategory()==null?"":bean.getCategory().getKey();
+        String cncSystemKey = bean.getCncSystem()==null?"":bean.getCncSystem().getKey();
 
         if(joinAgreementMap != null){
             module.setJoinAgreement(new RemoteData<>(joinAgreementKey,joinAgreementMap.getOrDefault(joinAgreementKey, StrPool.EMPTY)));
@@ -180,6 +182,9 @@ public class ModuleServiceImpl extends SuperCacheServiceImpl<ModuleMapper, Modul
         if(categoryMap != null){
             module.setCategory(new RemoteData<>(categoryKey, categoryMap.getOrDefault(categoryKey, StrPool.EMPTY)));
         }
+        if(cncSystemMap != null){
+            module.setCncSystem(new RemoteData<>(cncSystemKey, cncSystemMap.getOrDefault(cncSystemKey, StrPool.EMPTY)));
+        }
 
         return module;
     }

+ 5 - 1
imcs-admin-boot/imcs-tenant-biz/src/main/resources/mapper_tenant/base/defaults/ModuleMapper.xml

@@ -19,12 +19,16 @@
         <result column="remark" jdbcType="VARCHAR" property="remark"/>
         <result column="model" jdbcType="VARCHAR" property="model"/>
         <result column="secret" jdbcType="VARCHAR" property="secret"/>
+        <result column="cnc_flag" jdbcType="VARCHAR" property="cncFlag"/>
+        <result column="cnc_file_path" jdbcType="VARCHAR" property="cncFilePath"/>
+        <result column="cnc_system" jdbcType="VARCHAR" property="cncSystem"/>
     </resultMap>
 
     <!-- 通用查询结果列 -->
     <sql id="Base_Column_List">
         id,create_time,create_user,update_time,update_user,
-        name, no, join_agreement, net_mode, node_type, category, status, remark, model, secret,brandDesc,specificationDesc
+        name, no, join_agreement, net_mode, node_type, category, status, remark, model, secret,brandDesc,specificationDesc,
+        cnc_flag,cnc_file_path,cnc_system
     </sql>
 
     <!-- 分页 -->

+ 21 - 0
imcs-admin-boot/imcs-tenant-entity/src/main/java/com/github/zuihou/tenant/dto/ModulePageDTO.java

@@ -123,4 +123,25 @@ public class ModulePageDTO implements Serializable {
     @Length(max = 128, message = "密钥长度不能超过128")
     private String secret;
 
+    /**
+     * 是否CNC(1-是0-否)
+     */
+    @ApiModelProperty(value = "是否CNC(1-是0-否)")
+    @Length(max = 4, message = "是否CNC(1-是0-否)长度不能超过4")
+    private String cncFlag;
+
+    /**
+     * 机床程序路径
+     */
+    @ApiModelProperty(value = "机床程序路径")
+    @Length(max = 254, message = "机床程序路径长度不能超过254")
+    private String cncFilePath;
+
+    /**
+     * cnc数控系统
+     */
+    @ApiModelProperty(value = "cnc数控系统")
+    @Length(max = 64, message = "cnc数控系统64")
+    private RemoteData<String, String> cncSystem;
+
 }

+ 20 - 0
imcs-admin-boot/imcs-tenant-entity/src/main/java/com/github/zuihou/tenant/dto/ModuleSaveDTO.java

@@ -123,4 +123,24 @@ public class ModuleSaveDTO implements Serializable {
     @Length(max = 128, message = "密钥长度不能超过128")
     private String secret;
 
+    /**
+     * 是否CNC(1-是0-否)
+     */
+    @ApiModelProperty(value = "是否CNC(1-是0-否)")
+    @Length(max = 4, message = "是否CNC(1-是0-否)长度不能超过4")
+    private String cncFlag;
+
+    /**
+     * 机床程序路径
+     */
+    @ApiModelProperty(value = "机床程序路径")
+    @Length(max = 254, message = "机床程序路径长度不能超过254")
+    private String cncFilePath;
+
+    /**
+     * cnc数控系统
+     */
+    @ApiModelProperty(value = "cnc数控系统")
+    @Length(max = 64, message = "cnc数控系统64")
+    private RemoteData<String, String> cncSystem;
 }

+ 21 - 0
imcs-admin-boot/imcs-tenant-entity/src/main/java/com/github/zuihou/tenant/dto/ModuleUpdateDTO.java

@@ -125,4 +125,25 @@ public class ModuleUpdateDTO implements Serializable {
     @ApiModelProperty(value = "密钥")
     @Length(max = 128, message = "密钥长度不能超过128")
     private String secret;
+
+    /**
+     * 是否CNC(1-是0-否)
+     */
+    @ApiModelProperty(value = "是否CNC(1-是0-否)")
+    @Length(max = 4, message = "是否CNC(1-是0-否)长度不能超过4")
+    private String cncFlag;
+
+    /**
+     * 机床程序路径
+     */
+    @ApiModelProperty(value = "机床程序路径")
+    @Length(max = 254, message = "机床程序路径长度不能超过254")
+    private String cncFilePath;
+
+    /**
+     * cnc数控系统
+     */
+    @ApiModelProperty(value = "cnc数控系统")
+    @Length(max = 64, message = "cnc数控系统64")
+    private RemoteData<String, String> cncSystem;
 }

+ 33 - 1
imcs-admin-boot/imcs-tenant-entity/src/main/java/com/github/zuihou/tenant/entity/Module.java

@@ -179,11 +179,37 @@ public class Module extends Entity<Long> {
     @TableField(exist = false)
     private String specificationDesc;
 
+    /**
+     * 是否CNC(1-是0-否)
+     */
+    @ApiModelProperty(value = "是否CNC(1-是0-否)")
+    @TableField(value = "cnc_flag", condition = LIKE)
+    @Length(max = 4, message = "是否CNC(1-是0-否)长度不能超过4")
+    private String cncFlag;
+
+    /**
+     * 机床程序路径
+     */
+    @ApiModelProperty(value = "机床程序路径")
+    @TableField(value = "cnc_file_path", condition = LIKE)
+    @Length(max = 254, message = "机床程序路径长度不能超过254")
+    private String cncFilePath;
+
+    /**
+     * cnc数控系统
+     */
+    @ApiModelProperty(value = "cnc数控系统")
+    @TableField(value = "cnc_system", condition = LIKE)
+    @InjectionField(api = DICTIONARY_ITEM_CLASS, method = DICTIONARY_ITEM_METHOD, dictType = DictionaryType.MODEL_CNC_SYSTEM)
+    @Length(max = 64, message = "cnc数控系统64")
+    private RemoteData<String, String> cncSystem;
+
 
     @Builder
     public Module(Long id, LocalDateTime createTime, Long createUser, LocalDateTime updateTime, Long updateUser, 
                     String name, String no, RemoteData<String, String> joinAgreement, RemoteData<String, String> netMode, RemoteData<String, String> nodeType,
-                  RemoteData<String, String> category, String status, String remark, String specificationId, String model, String brandId, String secret) {
+                  RemoteData<String, String> category, String status, String remark, String specificationId, String model, String brandId, String secret,
+                  String cncFlag, String cncFilePath, RemoteData<String, String> cncSystem) {
         this.id = id;
         this.createTime = createTime;
         this.createUser = createUser;
@@ -201,6 +227,12 @@ public class Module extends Entity<Long> {
         this.model = model;
         this.brandId = brandId;
         this.secret = secret;
+        this.model = model;
+        this.brandId = brandId;
+        this.secret = secret;
+        this.cncFlag = cncFlag;
+        this.cncFilePath = cncFilePath;
+        this.cncSystem = cncSystem;
     }
 
 }