|
|
|
@ -121,23 +121,24 @@ public class EquUpkeepOrderServiceImpl implements IEquUpkeepOrderService {
|
|
|
|
|
// 生成工单-备件
|
|
|
|
|
List<EquOrderEquSpare> spareList = new ArrayList<>();
|
|
|
|
|
List<EquPlanEquSpare> equSpareList = equPlanEqu.getSpareList();
|
|
|
|
|
for (EquPlanEquSpare spare : equSpareList) {
|
|
|
|
|
EquOrderEquSpare spareTemp = new EquOrderEquSpare();
|
|
|
|
|
BeanUtils.copyProperties(spare,spareTemp);
|
|
|
|
|
spareTemp.setId(IdUtils.fastSimpleUUID());
|
|
|
|
|
spareTemp.setOrderCode(equOrder.getOrderCode());
|
|
|
|
|
spareTemp.setParentCode(equ.getId());
|
|
|
|
|
spareTemp.setFactoryCode(factory);
|
|
|
|
|
spareTemp.setCreateBy(SecurityContextHolder.getUserName());
|
|
|
|
|
spareTemp.setCreateTime(DateUtils.getNowDate());
|
|
|
|
|
spareTemp.setUpdateBy(SecurityContextHolder.getUserName());
|
|
|
|
|
spareTemp.setUpdateTime(DateUtils.getNowDate());
|
|
|
|
|
// 插入备件信息
|
|
|
|
|
equOrderEquSpareMapper.insertEquOrderEquSpare(spareTemp);
|
|
|
|
|
spareList.add(spareTemp);
|
|
|
|
|
if (equSpareList != null) {
|
|
|
|
|
for (EquPlanEquSpare spare : equSpareList) {
|
|
|
|
|
EquOrderEquSpare spareTemp = new EquOrderEquSpare();
|
|
|
|
|
BeanUtils.copyProperties(spare,spareTemp);
|
|
|
|
|
spareTemp.setId(IdUtils.fastSimpleUUID());
|
|
|
|
|
spareTemp.setOrderCode(equOrder.getOrderCode());
|
|
|
|
|
spareTemp.setParentCode(equ.getId());
|
|
|
|
|
spareTemp.setFactoryCode(factory);
|
|
|
|
|
spareTemp.setCreateBy(SecurityContextHolder.getUserName());
|
|
|
|
|
spareTemp.setCreateTime(DateUtils.getNowDate());
|
|
|
|
|
spareTemp.setUpdateBy(SecurityContextHolder.getUserName());
|
|
|
|
|
spareTemp.setUpdateTime(DateUtils.getNowDate());
|
|
|
|
|
// 插入备件信息
|
|
|
|
|
equOrderEquSpareMapper.insertEquOrderEquSpare(spareTemp);
|
|
|
|
|
spareList.add(spareTemp);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// 备件置入
|
|
|
|
|
System.out.println(spareList);
|
|
|
|
|
|
|
|
|
|
// 生成工单-设备-保养项
|
|
|
|
|
List<EquPlanDetail> detailList = equPlanEqu.getEquPlanDetailList();
|
|
|
|
|
|
|
|
|
|