状态修改

This commit is contained in:
funny 2026-04-10 16:42:37 +08:00
parent aa40e6c935
commit 49641eaaa7
4 changed files with 9 additions and 9 deletions

View File

@ -51,9 +51,9 @@ public class QmsSupplierSqeMapVO {
private String positionName; private String positionName;
/** /**
* 状态1=启用2=禁用 * 启用状态true=启用false=禁用
*/ */
private Integer state; private Boolean enable;
/** /**
* 创建人 * 创建人

View File

@ -42,9 +42,9 @@ public class QmsSupplierSqeMap implements Serializable {
private Long userId; private Long userId;
/** /**
* 状态1=启用2=禁用 * 启用状态true=启用false=禁用
*/ */
private Integer state; private Boolean enable;
/** /**
* 创建人 * 创建人

View File

@ -55,7 +55,7 @@ public class QmsSupplierSqeMapServiceImpl extends ServiceImpl<QmsSupplierSqeMapM
.map(supplierId -> new QmsSupplierSqeMap() .map(supplierId -> new QmsSupplierSqeMap()
.setSupplierId(supplierId) .setSupplierId(supplierId)
.setUserId(userId) .setUserId(userId)
.setState(1) .setEnable(true)
.setCreateBy(operator) .setCreateBy(operator)
.setCreateTime(now) .setCreateTime(now)
.setUpdateBy(operator) .setUpdateBy(operator)
@ -84,7 +84,7 @@ public class QmsSupplierSqeMapServiceImpl extends ServiceImpl<QmsSupplierSqeMapM
.map(userId -> new QmsSupplierSqeMap() .map(userId -> new QmsSupplierSqeMap()
.setSupplierId(supplierId) .setSupplierId(supplierId)
.setUserId(userId) .setUserId(userId)
.setState(1) .setEnable(true)
.setCreateBy(operator) .setCreateBy(operator)
.setCreateTime(now) .setCreateTime(now)
.setUpdateBy(operator) .setUpdateBy(operator)
@ -104,7 +104,7 @@ public class QmsSupplierSqeMapServiceImpl extends ServiceImpl<QmsSupplierSqeMapM
} }
lambdaUpdate() lambdaUpdate()
.eq(QmsSupplierSqeMap::getId, id) .eq(QmsSupplierSqeMap::getId, id)
.set(QmsSupplierSqeMap::getState, enable ? 1 : 2) .set(QmsSupplierSqeMap::getEnable, enable)
.set(QmsSupplierSqeMap::getUpdateBy, UserUtil.getUserName()) .set(QmsSupplierSqeMap::getUpdateBy, UserUtil.getUserName())
.set(QmsSupplierSqeMap::getUpdateTime, LocalDateTime.now()) .set(QmsSupplierSqeMap::getUpdateTime, LocalDateTime.now())
.update(); .update();
@ -117,7 +117,7 @@ public class QmsSupplierSqeMapServiceImpl extends ServiceImpl<QmsSupplierSqeMapM
if (Objects.isNull(record)) { if (Objects.isNull(record)) {
throw new NflgException(STATE.BusinessError, "关联记录不存在"); throw new NflgException(STATE.BusinessError, "关联记录不存在");
} }
if (record.getState() != null && record.getState() == 1) { if (Boolean.TRUE.equals(record.getEnable())) {
throw new NflgException(STATE.BusinessError, "关联关系处于启用状态,不允许删除,请先禁用后再删除"); throw new NflgException(STATE.BusinessError, "关联关系处于启用状态,不允许删除,请先禁用后再删除");
} }
removeById(id); removeById(id);

View File

@ -13,7 +13,7 @@
u.user_name, u.user_name,
u.user_code, u.user_code,
p.name AS position_name, p.name AS position_name,
qssm.state, qssm.enable,
qssm.create_by, qssm.create_by,
qssm.create_time, qssm.create_time,
qssm.update_by, qssm.update_by,