Browse Source

刀具校验

oyq28 1 year ago
parent
commit
53760b2341

+ 1 - 1
imcs-admin-boot/imcs-business-biz/src/main/java/com/github/zuihou/business/operationManagementCenter/service/impl/ToolTaskServiceImpl.java

@@ -101,7 +101,7 @@ public class ToolTaskServiceImpl extends SuperCacheServiceImpl<ToolTaskMapper, T
             List<TaskNodeTool> taskNodeToolList = baseMapper.getTaskNodeToolList(vo.getId());
             vo.setTaskNodeToolList(taskNodeToolList);
             String result = taskNodeToolList.stream()
-                    .map(TaskNodeTool::getCentralToolType)
+                    .map(TaskNodeTool::getCentralToolTypeName)
                     .map(String::valueOf) // 如果 centralToolType 不是 String 类型,可以使用该行进行转换
                     .collect(Collectors.joining(","));
             vo.setNeedToolCategory(result);

+ 3 - 1
imcs-admin-boot/imcs-business-biz/src/main/resources/mapper_business/base/centralToolMagezine/ToolTaskMapper.xml

@@ -55,7 +55,9 @@
     </select>
 
     <select id="getTaskNodeToolList" resultType="com.github.zuihou.business.centralToolMagazine.entity.TaskNodeTool" parameterType="Long">
-        select * from imcs_t_task_node_tool where task_id=#{taskId}
+        select tool.*,dic.name as centralToolTypeName from imcs_t_task_node_tool tool
+        left join c_common_dictionary_item dic on dic.code=tool.central_Tool_Type and dic.dictionary_type='CUTTING_TOOL_CATEGORY'
+                 where task_id=#{taskId}
     </select>
 
 </mapper>

+ 5 - 0
imcs-admin-boot/imcs-business-biz/src/main/resources/mapper_business/base/productionReadyCenter/CuttingToolMapper.xml

@@ -17,6 +17,11 @@
         <result column="cutting_tool_install_picture" jdbcType="VARCHAR" property="cuttingToolInstallPicture"/>
         <result column="tool_management_id" jdbcType="BIGINT" property="toolManagementId"/>
         <result column="cutting_tool_category" jdbcType="BIGINT" property="cuttingToolCategory"/>
+        <result column="tool_life_span" jdbcType="BIGINT" property="toolLifeSpan"/>
+        <result column="tool_rated_usage_count" jdbcType="BIGINT" property="toolRatedUsageCount"/>
+        <result column="tool_used_count" jdbcType="BIGINT" property="toolUsedCount"/>
+
+
     </resultMap>
 
     <!-- 通用查询结果列 -->

+ 2 - 1
imcs-admin-boot/imcs-business-entity/src/main/java/com/github/zuihou/business/centralToolMagazine/entity/TaskNodeTool.java

@@ -87,5 +87,6 @@ public class TaskNodeTool extends Entity<Long> {
     @TableField("scan_result")
     private String scanResult;
 
-
+    @TableField(exist = false)
+    private String centralToolTypeName;
 }

+ 12 - 0
imcs-admin-boot/imcs-business-entity/src/main/java/com/github/zuihou/business/productionReadyCenter/entity/CuttingTool.java

@@ -169,6 +169,18 @@ public class CuttingTool extends Entity<Long> {
     @TableField(exist = false)
     private String deviceName;
 
+    @ApiModelProperty(value = "刀具寿命")
+    @TableField(value = "tool_life_span")
+    private String toolLifeSpan;
+
+    @ApiModelProperty(value = "刀具额定次数")
+    @TableField(value = "tool_rated_usage_count")
+    private String toolRatedUsageCount;
+
+    @ApiModelProperty(value = "刀具已使用次数")
+    @TableField(value = "tool_used_count")
+    private String toolUsedCount;
+
     @Builder
     public CuttingTool(Long id, Long createUser, LocalDateTime createTime, Long updateUser, LocalDateTime updateTime,Long deviceId, int cutterNo,
                     String cuttingToolName, RemoteData<String, String> cuttingToolType, String specifications, String status, String cuttingToolPicture,String cuttingToolInstallPicture) {