状态修改

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;
/**
* 状态1=启用2=禁用
* 启用状态true=启用false=禁用
*/
private Integer state;
private Boolean enable;
/**
* 创建人

View File

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

View File

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