修复仓位id与点位id不相同
This commit is contained in:
@@ -91,11 +91,16 @@ public class StructattrServiceImpl implements StructattrService {
|
|||||||
StructattrDto byCode = this.findByCode(struct_code);
|
StructattrDto byCode = this.findByCode(struct_code);
|
||||||
if (ObjectUtil.isNotEmpty(byCode)) throw new BadRequestException("编码已存在!");
|
if (ObjectUtil.isNotEmpty(byCode)) throw new BadRequestException("编码已存在!");
|
||||||
|
|
||||||
|
// 获取点位信息
|
||||||
|
WQLObject pointTab = WQLObject.getWQLObject("SCH_BASE_Point");
|
||||||
|
JSONObject jsonObject = pointTab.query("point_code = '" + struct_code + "'").uniqueResult(0);
|
||||||
|
if (ObjectUtil.isEmpty(jsonObject)) throw new BadRequestException("点位编码为[" + struct_code + "]不存在!");
|
||||||
|
|
||||||
Long currentUserId = SecurityUtils.getCurrentUserId();
|
Long currentUserId = SecurityUtils.getCurrentUserId();
|
||||||
String nickName = SecurityUtils.getNickName();
|
String nickName = SecurityUtils.getNickName();
|
||||||
String now = DateUtil.now();
|
String now = DateUtil.now();
|
||||||
|
|
||||||
dto.setStruct_id(IdUtil.getSnowflake(1, 1).nextId());
|
dto.setStruct_id(jsonObject.getLong("point_id"));
|
||||||
dto.setCreate_id(currentUserId);
|
dto.setCreate_id(currentUserId);
|
||||||
dto.setCreate_name(nickName);
|
dto.setCreate_name(nickName);
|
||||||
dto.setUpdate_optid(currentUserId);
|
dto.setUpdate_optid(currentUserId);
|
||||||
|
|||||||
Reference in New Issue
Block a user