fix: 修复设备修改重复code的BUG以及工序的添加
This commit is contained in:
@@ -148,6 +148,7 @@ public class ProduceWorkorderServiceImpl implements ProduceWorkorderService {
|
||||
String currentUserId = SecurityUtils.getCurrentUserId();
|
||||
String nickName = SecurityUtils.getCurrentNickName();
|
||||
dto.setWorkorder_id(IdUtil.getSnowflake(1, 1).nextIdStr());
|
||||
dto.setCurrent_produce_person_id(currentUserId);
|
||||
dto.setCreate_id(currentUserId);
|
||||
dto.setCreate_name(nickName);
|
||||
dto.setUpdate_id(currentUserId);
|
||||
|
||||
@@ -100,7 +100,7 @@ public class DeviceServiceImpl implements DeviceService {
|
||||
String where = "is_delete = '0' and device_code = '" + dto.getDevice_code() + "'";
|
||||
|
||||
JSONObject jsonObject = wo.query(where).uniqueResult(0);
|
||||
if (ObjectUtil.isNotEmpty(jsonObject)) {
|
||||
if (ObjectUtil.isNotEmpty(jsonObject) && !dto.getDevice_code().equals(jsonObject.getString("device_code"))) {
|
||||
throw new BadRequestException("编码已存在!");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user