物资配置管理--增加SQL查询字段
This commit is contained in:
parent
99c76a7b7d
commit
8cd0754e0c
|
|
@ -102,7 +102,6 @@ public class MaTypeConfigController extends BaseController {
|
||||||
|
|
||||||
// 4.循环所有物资类型,重型数据集合保障只循环一次,减少性能损失
|
// 4.循环所有物资类型,重型数据集合保障只循环一次,减少性能损失
|
||||||
for (MaTypeConfigVo typeConfigVo1 : list) {
|
for (MaTypeConfigVo typeConfigVo1 : list) {
|
||||||
|
|
||||||
// 1.外层 先对比维修班组
|
// 1.外层 先对比维修班组
|
||||||
for (TypeRepair typeRepair : typeRepairList) {
|
for (TypeRepair typeRepair : typeRepairList) {
|
||||||
// 2.判断当前维修配置信息中的物资类型id是否等于当前物资类型配置信息中的物资类型id
|
// 2.判断当前维修配置信息中的物资类型id是否等于当前物资类型配置信息中的物资类型id
|
||||||
|
|
@ -149,65 +148,14 @@ public class MaTypeConfigController extends BaseController {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
// -------------------- NEW ----------------------------
|
||||||
|
|
||||||
// TODO: 先暂时取消后续过滤流程
|
// TODO: 先暂时取消后续过滤流程
|
||||||
if (true) {
|
if (true) {
|
||||||
return success(list);
|
return success(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
// -------------------- NEW ----------------------------
|
|
||||||
|
|
||||||
// 4.1 先循环维修配置信息
|
|
||||||
for (TypeRepair typeRepair : typeRepairList) {
|
|
||||||
// 4.循环维修配置信息,把维修员信息设置到物资类型配置信息中
|
|
||||||
for (MaTypeConfigVo maTypeConfigVo1 : list) {
|
|
||||||
// 5.判断当前维修配置信息中的物资类型id是否等于当前物资类型配置信息中的物资类型id
|
|
||||||
if (typeRepair.getTypeId().equals(maTypeConfigVo1.getTypeId())) {
|
|
||||||
// 6.如果相等,把维修员信息设置到物资类型配置信息中
|
|
||||||
maTypeConfigVo1.setRepairUserId(typeRepair.getUserId());
|
|
||||||
maTypeConfigVo1.setRepairUserName(typeRepair.getUserName());
|
|
||||||
}
|
|
||||||
// 判断当前maTypeConfigVo1对象是否有子节点,如果有再继续循环
|
|
||||||
if (maTypeConfigVo1.getChildren() != null) {
|
|
||||||
for (MaTypeConfigVo maTypeConfigVo2 : maTypeConfigVo1.getChildren()) {
|
|
||||||
// 5.判断当前维修配置信息中的物资类型id是否等于当前物资类型配置信息中的物资类型id
|
|
||||||
if (typeRepair.getTypeId().equals(maTypeConfigVo2.getTypeId())) {
|
|
||||||
// 6.如果相等,把维修员信息设置到物资类型配置信息中
|
|
||||||
maTypeConfigVo2.setRepairUserId(typeRepair.getUserId());
|
|
||||||
maTypeConfigVo2.setRepairUserName(typeRepair.getUserName());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 4.2 再循环库管配置信息
|
|
||||||
for (TypeKeeper typeKeeper : typeKeeperList) {
|
|
||||||
// 4.2循环库管配置信息,把库管员信息设置到物资类型配置信息中
|
|
||||||
for (MaTypeConfigVo maTypeConfigVo1 : list) {
|
|
||||||
// 5.判断当前库管配置信息中的物资类型id是否等于当前物资类型配置信息中的物资类型id
|
|
||||||
if (typeKeeper.getTypeId().equals(maTypeConfigVo1.getTypeId())) {
|
|
||||||
// 6.如果相等,把库管员信息设置到物资类型配置信息中
|
|
||||||
maTypeConfigVo1.setKeeperUserId(typeKeeper.getUserId());
|
|
||||||
maTypeConfigVo1.setKeeperUserName(typeKeeper.getUserName());
|
|
||||||
}
|
|
||||||
// 判断当前maTypeConfigVo1对象是否有子节点,如果有再继续循环
|
|
||||||
if (maTypeConfigVo1.getChildren() != null) {
|
|
||||||
for (MaTypeConfigVo maTypeConfigVo2 : maTypeConfigVo1.getChildren()) {
|
|
||||||
// 5.判断当前库管配置信息中的物资类型id是否等于当前物资类型配置信息中的物资类型id
|
|
||||||
if (typeKeeper.getTypeId().equals(maTypeConfigVo2.getTypeId())) {
|
|
||||||
// 6.如果相等,把库管员信息设置到物资类型配置信息中
|
|
||||||
maTypeConfigVo2.setKeeperUserId(typeKeeper.getUserId());
|
|
||||||
maTypeConfigVo2.setKeeperUserName(typeKeeper.getUserName());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// ------------------- 数据过滤开始 ---------------------
|
// ------------------- 数据过滤开始 ---------------------
|
||||||
if (maTypeConfigDto == null || maTypeConfigDto.getUserId() == null || maTypeConfigDto.getUserId() == 0L) {
|
if (maTypeConfigDto == null || maTypeConfigDto.getUserId() == null || maTypeConfigDto.getUserId() == 0L) {
|
||||||
|
|
|
||||||
|
|
@ -73,7 +73,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
|
||||||
<select id="selectTypeRepairListAndUserName" resultMap="TypeRepairResult">
|
<select id="selectTypeRepairListAndUserName" resultMap="TypeRepairResult">
|
||||||
select
|
select
|
||||||
m.type_id, su.nick_name as user_name, m.create_time
|
m.type_id, mtk.user_id, su.nick_name as user_name, m.create_time
|
||||||
from
|
from
|
||||||
ma_type_repair mtk
|
ma_type_repair mtk
|
||||||
left join
|
left join
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue