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

main
zhongwenkai 1 day ago
parent 4dc5861d77
commit c84b8974d6

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Loading…
Cancel
Save