|
|
@ -102,22 +102,12 @@ public class EquUpkeepOrderServiceImpl implements IEquUpkeepOrderService {
|
|
|
|
equOrder.setUpdateBy(SecurityContextHolder.getUserName());
|
|
|
|
equOrder.setUpdateBy(SecurityContextHolder.getUserName());
|
|
|
|
equOrder.setUpdateTime(DateUtils.getNowDate());
|
|
|
|
equOrder.setUpdateTime(DateUtils.getNowDate());
|
|
|
|
equOrder.setPlanType("maintenance");
|
|
|
|
equOrder.setPlanType("maintenance");
|
|
|
|
|
|
|
|
equOrder.setEquipmentCode(equPlan.getEquipmentItem().get(0).getEquipmentCode());
|
|
|
|
// 工单插入数据库
|
|
|
|
// 工单插入数据库
|
|
|
|
equOrderMapper.insertEquOrder(equOrder);
|
|
|
|
equOrderMapper.insertEquOrder(equOrder);
|
|
|
|
|
|
|
|
|
|
|
|
// 生成工单-设备
|
|
|
|
EquPlanEqu equPlanEqu = equPlan.getEquipmentItem().get(0);
|
|
|
|
EquOrderEqu equ = new EquOrderEqu();
|
|
|
|
|
|
|
|
List<EquPlanEqu> equPlanEquList = equPlan.getEquipmentItem();
|
|
|
|
|
|
|
|
EquPlanEqu equPlanEqu = equPlanEquList.get(0);
|
|
|
|
|
|
|
|
BeanUtils.copyProperties(equPlanEqu,equ);
|
|
|
|
|
|
|
|
equ.setId(IdUtils.fastSimpleUUID());
|
|
|
|
|
|
|
|
equ.setParentCode(equOrder.getOrderId());
|
|
|
|
|
|
|
|
equ.setOrderCode(equOrder.getOrderCode());
|
|
|
|
|
|
|
|
equ.setFactoryCode(factory);
|
|
|
|
|
|
|
|
equ.setAttr1("");
|
|
|
|
|
|
|
|
equ.setCreateBy(SecurityContextHolder.getUserName());
|
|
|
|
|
|
|
|
// 设备插入
|
|
|
|
|
|
|
|
equOrderEquMapper.insertEquOrderEqu(equ);
|
|
|
|
|
|
|
|
// 生成工单-备件
|
|
|
|
// 生成工单-备件
|
|
|
|
List<EquOrderEquSpare> spareList = new ArrayList<>();
|
|
|
|
List<EquOrderEquSpare> spareList = new ArrayList<>();
|
|
|
|
List<EquPlanEquSpare> equSpareList = equPlanEqu.getSpareList();
|
|
|
|
List<EquPlanEquSpare> equSpareList = equPlanEqu.getSpareList();
|
|
|
@ -127,7 +117,6 @@ public class EquUpkeepOrderServiceImpl implements IEquUpkeepOrderService {
|
|
|
|
BeanUtils.copyProperties(spare,spareTemp);
|
|
|
|
BeanUtils.copyProperties(spare,spareTemp);
|
|
|
|
spareTemp.setId(IdUtils.fastSimpleUUID());
|
|
|
|
spareTemp.setId(IdUtils.fastSimpleUUID());
|
|
|
|
spareTemp.setOrderCode(equOrder.getOrderCode());
|
|
|
|
spareTemp.setOrderCode(equOrder.getOrderCode());
|
|
|
|
spareTemp.setParentCode(equ.getId());
|
|
|
|
|
|
|
|
spareTemp.setFactoryCode(factory);
|
|
|
|
spareTemp.setFactoryCode(factory);
|
|
|
|
spareTemp.setCreateBy(SecurityContextHolder.getUserName());
|
|
|
|
spareTemp.setCreateBy(SecurityContextHolder.getUserName());
|
|
|
|
spareTemp.setCreateTime(DateUtils.getNowDate());
|
|
|
|
spareTemp.setCreateTime(DateUtils.getNowDate());
|
|
|
@ -149,7 +138,6 @@ public class EquUpkeepOrderServiceImpl implements IEquUpkeepOrderService {
|
|
|
|
BeanUtils.copyProperties(detail,equOrderDetail);
|
|
|
|
BeanUtils.copyProperties(detail,equOrderDetail);
|
|
|
|
equOrderDetail.setId(IdUtils.fastSimpleUUID());
|
|
|
|
equOrderDetail.setId(IdUtils.fastSimpleUUID());
|
|
|
|
equOrderDetail.setOrderCode(equOrder.getOrderCode());
|
|
|
|
equOrderDetail.setOrderCode(equOrder.getOrderCode());
|
|
|
|
equOrderDetail.setParentCode(equ.getId());
|
|
|
|
|
|
|
|
equOrderDetail.setFactoryCode(factory);
|
|
|
|
equOrderDetail.setFactoryCode(factory);
|
|
|
|
equOrderDetail.setStandardList(orderStandardList);
|
|
|
|
equOrderDetail.setStandardList(orderStandardList);
|
|
|
|
equOrderDetail.setCreateBy(SecurityContextHolder.getUserName());
|
|
|
|
equOrderDetail.setCreateBy(SecurityContextHolder.getUserName());
|
|
|
|