工单生成BUG解决

highway
wws 12 months ago
parent e8f155136d
commit 6965200126

@ -187,6 +187,28 @@ public class EquUpkeepServiceImpl implements IEquUpkeepService {
EquPlanDetail detail = new EquPlanDetail(); EquPlanDetail detail = new EquPlanDetail();
BeanUtils.copyProperties(checkItem,detail); BeanUtils.copyProperties(checkItem,detail);
if (!detail.getItemCode().isEmpty()) {
itemTempName.append(detail.getItemName()).append(",");
// 获取检查项详情list
List<EquCheckItemDetail> equCheckItemDetailList = equCheckItemDetailMapper.selectCheckItemDetailByItemCode(detail.getItemCode());
if (equCheckItemList.size() > 0) {
List<EquPlanStandard> standardList = new ArrayList<>();
for (EquCheckItemDetail standardTemp : equCheckItemDetailList) {
EquPlanStandard standard = new EquPlanStandard();
BeanUtils.copyProperties(standardTemp,standard);
standard.setShowFlag(true);
standardList.add(standard);
}
detail.setEquPlanStandardList(standardList);
}
}
detailList.add(detail);
}
if (data.getItemLoop() == 0) {
EquPlanDetail detail = new EquPlanDetail();
BeanUtils.copyProperties(checkItem,detail);
if (!detail.getItemCode().isEmpty()) { if (!detail.getItemCode().isEmpty()) {
itemTempName.append(detail.getItemName()).append(","); itemTempName.append(detail.getItemName()).append(",");
// 获取检查项详情list // 获取检查项详情list

@ -113,13 +113,14 @@
<if test="itemTools != null">#{itemTools},</if> <if test="itemTools != null">#{itemTools},</if>
</trim> </trim>
</insert> </insert>
<insert id="insertEquOrderDetails"> <insert id="insertEquOrderDetails">
insert into equ_order_detail insert into equ_order_detail
( (
id, order_code, id, order_code,
item_code, item_name, item_method, item_code, item_name, item_method,
item_type, item_type_name, factory_code, del_flag, item_type, item_type_name, factory_code, del_flag,
create_by, create_time,item_tools create_by, create_time
) )
VALUES VALUES
<foreach collection="list" index="index" item="item" separator=","> <foreach collection="list" index="index" item="item" separator=",">
@ -127,7 +128,7 @@
#{item.id},#{item.parentCode}, #{item.id},#{item.parentCode},
#{item.itemCode},#{item.itemName},#{item.itemMethod}, #{item.itemCode},#{item.itemName},#{item.itemMethod},
#{item.itemType},#{item.itemTypeName},#{item.factoryCode},#{item.delFlag}, #{item.itemType},#{item.itemTypeName},#{item.factoryCode},#{item.delFlag},
#{item.createBy},#{item.createTime},#{itemTools} #{item.createBy},#{item.createTime}
) )
</foreach> </foreach>

Loading…
Cancel
Save