修复仓位id与点位id不相同

This commit is contained in:
2022-12-19 11:06:36 +08:00
parent 1b42b03a40
commit e9abf08ab4
2 changed files with 16 additions and 11 deletions

View File

@@ -91,11 +91,16 @@ public class StructattrServiceImpl implements StructattrService {
StructattrDto byCode = this.findByCode(struct_code);
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();
String nickName = SecurityUtils.getNickName();
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_name(nickName);
dto.setUpdate_optid(currentUserId);

View File

@@ -1,10 +1,10 @@
[交易说明]
交易名: 生产管理之产线管理下工序参数设置
所属模块:
功能简述:
版权所有:
表引用:
版本经历:
所属模块:
功能简述:
版权所有:
表引用:
版本经历:
[数据库]
--指定数据库为空采用默认值默认为db.properties中列出的第一个库
@@ -25,22 +25,22 @@
[临时表]
--这边列出来的临时表就会在运行期动态创建
[临时变量]
--所有中间过程变量均可在此处定义
[业务过程]
##########################################
# 1、输入输出检查 #
##########################################
##########################################
# 2、主过程前处理 #
##########################################
##########################################
# 3、业务主过程 #
##########################################