Pārlūkot izejas kodu

fix:优化中央刀库自动化上刀

wang.sq@aliyun.com 4 mēneši atpakaļ
vecāks
revīzija
d0d1320d1d

+ 0 - 7
imcs-admin-boot/imcs-business-biz/src/main/java/com/github/zuihou/business/cutterdata/dao/CutterTestDataMapper.java

@@ -4,14 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.Wrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.core.toolkit.Constants;
 import com.github.zuihou.base.mapper.SuperMapper;
-import com.github.zuihou.business.classSchedule.entity.AuthUser;
-import com.github.zuihou.business.cutterdata.dto.CutterTestDataDto;
 import com.github.zuihou.business.cutterdata.entity.CutterTestDataEntity;
-import com.github.zuihou.business.edgeLibrary.entity.StockInfo;
-import com.github.zuihou.business.productionReadyCenter.entity.BBom;
-import com.github.zuihou.database.mybatis.auth.DataScope;
-import com.github.zuihou.database.mybatis.conditions.query.LbqWrapper;
-import com.github.zuihou.tenant.entity.Brand;
 import org.apache.ibatis.annotations.Param;
 import org.springframework.stereotype.Repository;
 

+ 46 - 2
imcs-admin-boot/imcs-business-biz/src/main/java/com/github/zuihou/business/cutterdata/service/impl/CutterTestDataServiceImpl.java

@@ -173,7 +173,11 @@ public class CutterTestDataServiceImpl extends SuperServiceImpl<CutterTestDataMa
 
                                 build.setCutterOri(StringUtil.isEmpty(jsonObject.getString("Value"))? build.getCutterOri() : jsonObject.getString("Value"));
 
-                            } else if ("TIME".equals(jsonObject.getString("Name"))) {
+                            } else if ("TIME1".equals(jsonObject.getString("Name"))) {
+
+                                build.setCutterTime1(StringUtil.isEmpty(jsonObject.getString("Value"))? build.getCutterTime1() : jsonObject.getString("Value"));
+
+                            } else if ("TIME2".equals(jsonObject.getString("Name"))) {
 
                                 build.setCutterTime2(StringUtil.isEmpty(jsonObject.getString("Value"))? build.getCutterTime2() : jsonObject.getString("Value"));
 
@@ -185,6 +189,46 @@ public class CutterTestDataServiceImpl extends SuperServiceImpl<CutterTestDataMa
 
                                 build.setCutterPlcBit(StringUtil.isEmpty(jsonObject.getString("Value"))? build.getCutterPlcBit() : jsonObject.getString("Value"));
 
+                            } else if ("T-ANGLE".equals(jsonObject.getString("Name"))){
+
+                                build.setTangle(StringUtil.isEmpty(jsonObject.getString("Value"))? build.getTangle() : jsonObject.getString("Value"));
+
+                            }else if ("P-ANGLE".equals(jsonObject.getString("Name"))){
+
+                                build.setPangle(StringUtil.isEmpty(jsonObject.getString("Value"))? build.getPangle() : jsonObject.getString("Value"));
+
+                            }else if ("CUTLENGTH".equals(jsonObject.getString("Name"))){
+
+                                build.setCutlength(StringUtil.isEmpty(jsonObject.getString("Value"))? build.getCutlength() : jsonObject.getString("Value"));
+
+                            }else if ("CUTWIDTH".equals(jsonObject.getString("Name"))){
+
+                                build.setCutwidth(StringUtil.isEmpty(jsonObject.getString("Value"))? build.getCutwidth() : jsonObject.getString("Value"));
+
+                            }else if ("CUTWIDTH".equals(jsonObject.getString("Name"))){
+
+                                build.setCutwidth(StringUtil.isEmpty(jsonObject.getString("Value"))? build.getCutwidth() : jsonObject.getString("Value"));
+
+                            }else if ("LCUTS".equals(jsonObject.getString("Name"))){
+
+                                build.setLcuts(StringUtil.isEmpty(jsonObject.getString("Value"))? build.getLcuts() : jsonObject.getString("Value"));
+
+                            }else if ("RCUTS".equals(jsonObject.getString("Name"))){
+
+                                build.setRcuts(StringUtil.isEmpty(jsonObject.getString("Value"))? build.getRcuts() : jsonObject.getString("Value"));
+
+                            }else if ("LU".equals(jsonObject.getString("Name"))){
+
+                                build.setLu(StringUtil.isEmpty(jsonObject.getString("Value"))? build.getLu() : jsonObject.getString("Value"));
+
+                            }else if ("RN".equals(jsonObject.getString("Name"))){
+
+                                build.setRn(StringUtil.isEmpty(jsonObject.getString("Value"))? build.getRn() : jsonObject.getString("Value"));
+
+                            }else if ("PITCH".equals(jsonObject.getString("Name"))){
+
+                                build.setPitch(StringUtil.isEmpty(jsonObject.getString("Value"))? build.getPitch() : jsonObject.getString("Value"));
+
                             }else if ("TYPE01".equals(jsonObject.getString("Name"))) {
                                 String string = jsonObject.getString("Value");
                                 build.setCutterTyp(Objects.isNull(string)|| string.equals("") ? build.getCutterTyp():string);
@@ -324,7 +368,7 @@ public class CutterTestDataServiceImpl extends SuperServiceImpl<CutterTestDataMa
             cutterTestDataEntity.setStatus(4);
             //新增或修改刀具数据
             this.update(cutterTestDataEntity, queryWrapper2);
-            return true;
+            return false;
         }
 
     }

+ 4 - 2
imcs-admin-boot/imcs-business-biz/src/main/resources/mapper_business/base/cuttercategories/CutterCategoriesGroupMapper.xml

@@ -16,15 +16,17 @@
 
     <!-- 通用查询结果列 -->
     <sql id="Base_Column_List">
-        id,parts_no,procedure_no,program_name,cutter_t,cutter_name,cutter_specification,cutter_sort
+        id,create_time,create_user,update_time,update_user,device_id,categories_id,group_name
     </sql>
 
     <select id="pageList" parameterType="String" resultMap="BaseResultMap">
         select
-        <include refid="Base_Column_List"/>
+            *
         from (
             SELECT
             m.group_name,
+            m.device_id,
+            m.categories_id,
             s1.code,s1.name,
             s2.*
             FROM

+ 4 - 17
imcs-admin-boot/imcs-business-controller/src/main/java/com/github/zuihou/business/controller/cutterdata/CutterTestDataController.java

@@ -1,27 +1,19 @@
 package com.github.zuihou.business.controller.cutterdata;
 
-import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.github.zuihou.base.R;
 import com.github.zuihou.base.controller.SuperController;
 import com.github.zuihou.base.request.PageParams;
 import com.github.zuihou.business.classSchedule.entity.AuthUser;
-import com.github.zuihou.business.cutterdata.dto.CutterTestDataDto;
 import com.github.zuihou.business.cutterdata.entity.CutterTestDataEntity;
 import com.github.zuihou.business.cutterdata.service.CutterTestDataService;
-import com.github.zuihou.business.productionReadyCenter.entity.AAutoNodeLog;
 import com.github.zuihou.business.productionReadyCenter.entity.CuttingTool;
-import com.github.zuihou.business.productionReadyCenter.service.CuttingToolService;
-import com.github.zuihou.common.util.DateUtil;
 import com.github.zuihou.database.mybatis.conditions.query.LbqWrapper;
 import com.github.zuihou.database.mybatis.conditions.query.QueryWrap;
-import com.github.zuihou.exception.BizException;
 import com.github.zuihou.log.annotation.SysLog;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
-import org.checkerframework.checker.units.qual.A;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.PostMapping;
@@ -29,8 +21,6 @@ import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
-import java.util.List;
-
 /**
  * @Project: imcs-admin-boot
  * @Package: com.github.zuihou.business.controller.cutterdata
@@ -45,13 +35,12 @@ import java.util.List;
 @RequestMapping("/cutterTestData")
 @Api(value = "cutterTestData", tags = "对刀仪数据")
 @SysLog(enabled = true)
-public class CutterTestDataController  extends SuperController<CutterTestDataService,Long, CutterTestDataEntity,CutterTestDataEntity,CutterTestDataEntity,CutterTestDataEntity> {
+public class CutterTestDataController extends SuperController<CutterTestDataService, Long, CutterTestDataEntity, CutterTestDataEntity, CutterTestDataEntity, CutterTestDataEntity> {
 
     @Autowired
     private CutterTestDataService cutterTestDataService;
 
 
-
     @ApiOperation(value = "获取机外对刀仪数据", notes = "获取机外对刀仪数据")
     @PostMapping("/getCutterPage")
     public R<IPage<CutterTestDataEntity>> getCutterPage(@RequestBody @Validated PageParams<CutterTestDataEntity> params) {
@@ -64,9 +53,9 @@ public class CutterTestDataController  extends SuperController<CutterTestDataSer
 
         wrapper.like(CutterTestDataEntity::getCutterT, params.getModel().getCutterT())
                 .like(CutterTestDataEntity::getCutterTyp, params.getModel().getCutterTyp())
-                .like(CutterTestDataEntity::getStatus,  params.getModel().getStatus())
-                .like(CutterTestDataEntity::getCutterP,  params.getModel().getCutterP())
-                .like(CutterTestDataEntity::getCutterPIp,  params.getModel().getCutterPIp())
+                .like(CutterTestDataEntity::getStatus, params.getModel().getStatus())
+                .like(CutterTestDataEntity::getCutterP, params.getModel().getCutterP())
+                .like(CutterTestDataEntity::getCutterPIp, params.getModel().getCutterPIp())
                 .orderByDesc(CutterTestDataEntity::getUpdateTime);
         //查询弹框异常
         IPage<CutterTestDataEntity> cutterTestDataDtoIPage = cutterTestDataService.pageList(page, wrapper);
@@ -82,6 +71,4 @@ public class CutterTestDataController  extends SuperController<CutterTestDataSer
     }
 
 
-
-
 }

+ 34 - 0
imcs-admin-boot/imcs-business-entity/src/main/java/com/github/zuihou/business/cuttercategories/entity/CutterCategoriesGroup.java

@@ -55,4 +55,38 @@ public class CutterCategoriesGroup extends Entity<Long> implements Serializable
     @Excel(name = "分组名")
     private String groupName;
 
+    @ApiModelProperty(value = "设备编码")
+    @Excel(name = "设备编码")
+    @TableField(exist = false)
+    private String code;
+
+    @ApiModelProperty(value = "设备名称")
+    @Excel(name = "设备名称")
+    @TableField(exist = false)
+    private String name;
+
+    @ApiModelProperty(value = "零件编号")
+    @Excel(name = "零件编号")
+    @TableField(exist = false)
+    private String partsNo;
+
+    @ApiModelProperty(value = "工序号")
+    @Excel(name = "工序号")
+    @TableField(exist = false)
+    private String procedureNo;
+
+    @ApiModelProperty(value = "刀具编号")
+    @Excel(name = "刀具编号")
+    @TableField(exist = false)
+    private String cutterT;
+
+    @ApiModelProperty(value = "刀具名称")
+    @Excel(name = "刀具名")
+    @TableField(exist = false)
+    private String cutterName;
+
+    @ApiModelProperty(value = "使用排序")
+    @Excel(name = "使用排序")
+    @TableField(exist = false)
+    private String cutterSort;
 }

+ 3 - 0
imcs-admin-boot/imcs-business-entity/src/main/java/com/github/zuihou/business/cutterdata/dto/CutterTestDataDto.java

@@ -74,6 +74,9 @@ public class CutterTestDataDto implements Serializable {
     @ApiModelProperty(value = "内冷开")
     private  String cutterPlcBit;
 
+    @ApiModelProperty(value = "螺距")
+    private  String pitch;
+
     @ApiModelProperty(value = "数据状态,0机外对刀仪字段解析失败,1字段合格性检测不通过,2未推送机床,3已推送机床,4推送失败,5历史数据")
     private Integer status;
 

+ 6 - 2
imcs-admin-boot/imcs-business-entity/src/main/java/com/github/zuihou/business/cutterdata/entity/CutterTestDataEntity.java

@@ -10,8 +10,6 @@ import lombok.*;
 import lombok.experimental.Accessors;
 import org.hibernate.validator.constraints.Length;
 
-import java.time.LocalDateTime;
-
 import static com.baomidou.mybatisplus.annotation.SqlCondition.LIKE;
 
 @Data
@@ -154,6 +152,12 @@ public class CutterTestDataEntity extends Entity<Long> {
     @Excel(name = "准确定义刀具的刀颈半径")
     private  String rn = "0";
 
+    @ApiModelProperty(value = "螺距")
+    @Length(max = 128, message = "名称长度不能超过128")
+    @TableField(value = "pitch", condition = LIKE)
+    @Excel(name = "螺距")
+    private  String pitch = "0";
+
     @ApiModelProperty(value = "最大的切入角度")
     @Length(max = 128, message = "名称长度不能超过128")
     @TableField(value = "angle", condition = LIKE)