feat: 设备管理DO实体类主键改用雪花算法

main
zhongwenkai 2 days ago
parent 4dc5861d77
commit c84b8974d6

@ -1,6 +1,7 @@
package cn.iocoder.yudao.module.common.dal.dataobject.moldrepair; package cn.iocoder.yudao.module.common.dal.dataobject.moldrepair;
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.KeySequence; import com.baomidou.mybatisplus.annotation.KeySequence;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
@ -26,7 +27,7 @@ public class MoldRepairDO extends BaseDO {
/** /**
* ID * ID
*/ */
@TableId @TableId(type = IdType.ASSIGN_ID)
private Long id; private Long id;
/** /**
* *

@ -1,6 +1,7 @@
package cn.iocoder.yudao.module.common.dal.dataobject.moldrepair; package cn.iocoder.yudao.module.common.dal.dataobject.moldrepair;
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.KeySequence; import com.baomidou.mybatisplus.annotation.KeySequence;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
@ -24,7 +25,7 @@ public class MoldRepairLineDO extends BaseDO {
/** /**
* ID * ID
*/ */
@TableId @TableId(type = IdType.ASSIGN_ID)
private Long id; private Long id;
/** /**
* ID * ID

@ -43,10 +43,10 @@ public class DeviceLedgerPageReqVO extends PageParam {
private Long deviceType; private Long deviceType;
@Schema(description = "设备产线", example = "1") @Schema(description = "设备产线", example = "1")
private Integer deviceLine; private Long deviceLine;
@Schema(description = "设备产线集合") @Schema(description = "设备产线集合")
private List<Integer> deviceLineIds; private List<Long> deviceLineIds;
@Schema(description = "供应商") @Schema(description = "供应商")
private String supplier; private String supplier;

@ -45,7 +45,7 @@ public class DeviceLedgerRespVO extends BaseDO {
private String deviceType; private String deviceType;
@Schema(description = "设备产线") @Schema(description = "设备产线")
private Integer deviceLine; private Long deviceLine;
@Schema(description = "顶级分类 id") @Schema(description = "顶级分类 id")
private Long topCategoryId; private Long topCategoryId;

@ -42,7 +42,7 @@ public class DeviceLedgerSaveReqVO {
private String deviceType; private String deviceType;
@Schema(description = "设备产线", example = "1") @Schema(description = "设备产线", example = "1")
private Integer deviceLine; private Long deviceLine;
@Schema(description = "供应商") @Schema(description = "供应商")
private String supplier; private String supplier;

@ -22,7 +22,7 @@ public class MoldOperateSaveReqVO {
private Integer operateType; private Integer operateType;
@Schema(description = "关联模具id", example = "23041") @Schema(description = "关联模具id", example = "23041")
private Integer moldId; private Long moldId;
@Schema(description = "关联设备id", example = "5057") @Schema(description = "关联设备id", example = "5057")
private Long deviceId; private Long deviceId;

@ -31,7 +31,7 @@ public class CriticalComponentDO extends BaseDO {
* *
* ID * ID
*/ */
@TableId @TableId(type = IdType.ASSIGN_ID)
private Long id; private Long id;
/** /**

@ -25,7 +25,7 @@ public class DeviceCriticalComponentDO extends BaseDO {
/** /**
* ID * ID
*/ */
@TableId @TableId(type = IdType.ASSIGN_ID)
private Long id; private Long id;
/** /**
* *

@ -1,6 +1,7 @@
package cn.iocoder.yudao.module.mes.dal.dataobject.deviceledger; package cn.iocoder.yudao.module.mes.dal.dataobject.deviceledger;
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.KeySequence; import com.baomidou.mybatisplus.annotation.KeySequence;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
@ -21,7 +22,7 @@ import lombok.ToString;
@AllArgsConstructor @AllArgsConstructor
public class DeviceLedgerComponentRelDO extends BaseDO { public class DeviceLedgerComponentRelDO extends BaseDO {
@TableId @TableId(type = IdType.ASSIGN_ID)
private Long id; private Long id;
private Long deviceLedgerId; private Long deviceLedgerId;

@ -34,7 +34,7 @@ public class DeviceLedgerDO extends BaseDO {
/** /**
* id * id
*/ */
@TableId @TableId(type = IdType.ASSIGN_ID)
private Long id; private Long id;
/** /**
@ -72,7 +72,7 @@ public class DeviceLedgerDO extends BaseDO {
/** /**
* 线 * 线
*/ */
private Integer deviceLine; private Long deviceLine;
/** /**
* id * id

@ -1,6 +1,7 @@
package cn.iocoder.yudao.module.mes.dal.dataobject.deviceledger; package cn.iocoder.yudao.module.mes.dal.dataobject.deviceledger;
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.KeySequence; import com.baomidou.mybatisplus.annotation.KeySequence;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
@ -21,7 +22,7 @@ import lombok.ToString;
@AllArgsConstructor @AllArgsConstructor
public class DeviceLedgerSpareRelDO extends BaseDO { public class DeviceLedgerSpareRelDO extends BaseDO {
@TableId @TableId(type = IdType.ASSIGN_ID)
private Long id; private Long id;
private Long deviceLedgerId; private Long deviceLedgerId;

@ -25,7 +25,7 @@ public class DeviceLineDO extends BaseDO {
/** /**
* id * id
*/ */
@TableId @TableId(type = IdType.ASSIGN_ID)
private Long id; private Long id;
/** /**
* *

@ -26,7 +26,7 @@ public class DeviceTypeDO extends BaseDO {
/** /**
* id * id
*/ */
@TableId @TableId(type = IdType.ASSIGN_ID)
private Long id; private Long id;
/** /**
* *

@ -29,7 +29,7 @@ public class DvCheckDO extends BaseDO {
/** /**
* ID * ID
*/ */
@TableId @TableId(type = IdType.ASSIGN_ID)
private Long id; private Long id;
/** /**
* *

@ -25,7 +25,7 @@ public class DvCheckDeviceDO extends BaseDO {
/** /**
* ID * ID
*/ */
@TableId @TableId(type = IdType.ASSIGN_ID)
private Long id; private Long id;
/** /**
* ID * ID

@ -25,7 +25,7 @@ public class DvCheckSubjectDO extends BaseDO {
/** /**
* ID * ID
*/ */
@TableId @TableId(type = IdType.ASSIGN_ID)
private Long id; private Long id;
/** /**
* ID * ID

@ -34,7 +34,7 @@ public class DvRepairDO extends BaseDO {
/** /**
* ID * ID
*/ */
@TableId @TableId(type = IdType.ASSIGN_ID)
private Long id; private Long id;
/** /**
* *

@ -25,7 +25,7 @@ public class DvRepairLineDO extends BaseDO {
/** /**
* ID * ID
*/ */
@TableId @TableId(type = IdType.ASSIGN_ID)
private Long id; private Long id;
/** /**
* ID * ID

@ -25,7 +25,7 @@ public class DvSubjectDO extends BaseDO {
/** /**
* ID * ID
*/ */
@TableId @TableId(type = IdType.ASSIGN_ID)
private Long id; private Long id;
/** /**
* *

@ -1,6 +1,7 @@
package cn.iocoder.yudao.module.mes.dal.dataobject.machine; package cn.iocoder.yudao.module.mes.dal.dataobject.machine;
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.KeySequence; import com.baomidou.mybatisplus.annotation.KeySequence;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
@ -28,7 +29,7 @@ public class MachineComponentDO extends BaseDO {
/** /**
* id * id
*/ */
@TableId @TableId(type = IdType.ASSIGN_ID)
private Long id; private Long id;
//@ExcelProperty("编码") //@ExcelProperty("编码")

@ -26,7 +26,7 @@ public class MoldPlanMaintenanceDO extends BaseDO {
/** /**
* id * id
*/ */
@TableId @TableId(type = IdType.ASSIGN_ID)
private Long id; private Long id;
/** /**
* *

@ -25,7 +25,7 @@ public class MoldRepairTemsDO extends BaseDO {
/** /**
* ID * ID
*/ */
@TableId @TableId(type = IdType.ASSIGN_ID)
private Long id; private Long id;
/** /**
* *

@ -25,7 +25,7 @@ public class MoldSubjectDO extends BaseDO {
/** /**
* ID * ID
*/ */
@TableId @TableId(type = IdType.ASSIGN_ID)
private Long id; private Long id;
/** /**
* *

@ -33,7 +33,7 @@ public class MoldTaskManagementDO extends BaseDO {
/** /**
* id * id
*/ */
@TableId @TableId(type = IdType.ASSIGN_ID)
private Long id; private Long id;
/** /**
* *

@ -1,6 +1,7 @@
package cn.iocoder.yudao.module.mes.dal.dataobject.planlinechange; package cn.iocoder.yudao.module.mes.dal.dataobject.planlinechange;
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.KeySequence; import com.baomidou.mybatisplus.annotation.KeySequence;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
@ -24,7 +25,7 @@ public class PlanLineChangeRecordDO extends BaseDO {
/** /**
* *
*/ */
@TableId @TableId(type = IdType.ASSIGN_ID)
private Long id; private Long id;
/** /**
* *

@ -25,7 +25,7 @@ public class PlanMaintenanceDO extends BaseDO {
/** /**
* id * id
*/ */
@TableId @TableId(type = IdType.ASSIGN_ID)
private Long id; private Long id;
/** /**
* *

@ -26,7 +26,7 @@ public class PlanRecordDO extends BaseDO {
/** /**
* ID * ID
*/ */
@TableId @TableId(type = IdType.ASSIGN_ID)
private Long id; private Long id;
/** /**
* ID * ID

@ -1,6 +1,7 @@
package cn.iocoder.yudao.module.mes.dal.dataobject.planroute; package cn.iocoder.yudao.module.mes.dal.dataobject.planroute;
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.KeySequence; import com.baomidou.mybatisplus.annotation.KeySequence;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
@ -22,7 +23,7 @@ public class PlanProcessRouteItemDO extends BaseDO {
/** /**
* *
*/ */
@TableId @TableId(type = IdType.ASSIGN_ID)
private Long id; private Long id;
/** /**
* *

@ -25,7 +25,7 @@ public class RepairTemsDO extends BaseDO {
/** /**
* ID * ID
*/ */
@TableId @TableId(type = IdType.ASSIGN_ID)
private Long id; private Long id;
/** /**
* *

@ -25,7 +25,7 @@ public class SubjectMoldPlanDO extends BaseDO {
/** /**
* id * id
*/ */
@TableId @TableId(type = IdType.ASSIGN_ID)
private Long id; private Long id;
/** /**
* ID * ID

@ -25,7 +25,7 @@ public class SubjectPlanDO extends BaseDO {
/** /**
* id * id
*/ */
@TableId @TableId(type = IdType.ASSIGN_ID)
private Long id; private Long id;
/** /**
* ID * ID

@ -33,7 +33,7 @@ public class TaskManagementDO extends BaseDO {
/** /**
* id * id
*/ */
@TableId @TableId(type = IdType.ASSIGN_ID)
private Long id; private Long id;
/** /**
* *

@ -32,7 +32,7 @@ public class TicketManagementDO extends BaseDO {
/** /**
* id * id
*/ */
@TableId @TableId(type = IdType.ASSIGN_ID)
private Long id; private Long id;
/** /**
* ID * ID

@ -26,7 +26,7 @@ public class TicketResultsDO extends BaseDO {
/** /**
* id * id
*/ */
@TableId @TableId(type = IdType.ASSIGN_ID)
private Long id; private Long id;
/** /**
* *

@ -1,6 +1,7 @@
package cn.iocoder.yudao.module.mes.dal.dataobject.workreportplan; package cn.iocoder.yudao.module.mes.dal.dataobject.workreportplan;
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.KeySequence; import com.baomidou.mybatisplus.annotation.KeySequence;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
@ -26,7 +27,7 @@ public class WorkReportPlanDO extends BaseDO {
/** /**
* id * id
*/ */
@TableId @TableId(type = IdType.ASSIGN_ID)
private Long id; private Long id;
/** /**
* id * id

@ -516,8 +516,8 @@ public class DeviceLedgerServiceImpl implements DeviceLedgerService {
return true; return true;
} }
if (pageReqVO.getDeviceLine() != null) { if (pageReqVO.getDeviceLine() != null) {
Set<Integer> deviceLineIds = new LinkedHashSet<>(); Set<Long> deviceLineIds = new LinkedHashSet<>();
collectDeviceLineIds(Long.valueOf(pageReqVO.getDeviceLine()), deviceLineIds); collectDeviceLineIds(pageReqVO.getDeviceLine(), deviceLineIds);
if (deviceLineIds.isEmpty()) { if (deviceLineIds.isEmpty()) {
return false; return false;
} }
@ -546,7 +546,7 @@ public class DeviceLedgerServiceImpl implements DeviceLedgerService {
return true; return true;
} }
private void collectDeviceLineIds(Long deviceLineId, Set<Integer> results) { private void collectDeviceLineIds(Long deviceLineId, Set<Long> results) {
if (deviceLineId == null) { if (deviceLineId == null) {
return; return;
} }
@ -554,7 +554,7 @@ public class DeviceLedgerServiceImpl implements DeviceLedgerService {
if (deviceLine == null) { if (deviceLine == null) {
return; return;
} }
results.add(deviceLineId.intValue()); results.add(deviceLineId);
List<DeviceLineDO> children = deviceLineService.getChildrenDeviceLines(deviceLineId); List<DeviceLineDO> children = deviceLineService.getChildrenDeviceLines(deviceLineId);
if (CollUtil.isEmpty(children)) { if (CollUtil.isEmpty(children)) {
return; return;

Loading…
Cancel
Save