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