填写记录BUG、PDA查询逻辑

highway
wws 1 year ago
parent 6f8a167d96
commit 1597701d9a

@ -64,6 +64,16 @@ public class EquPlanEqu extends BaseEntity {
// 主计划code
private String planCode;
private String spareOnList;
public String getSpareOnList() {
return spareOnList;
}
public void setSpareOnList(String spareOnList) {
this.spareOnList = spareOnList;
}
// 备件
private List<EquPlanEquSpare> spareList;

@ -64,6 +64,8 @@ public class DevicePDAServiceImpl implements IDevicePDAService {
private EquSpareApplyMapper equSpareApplyMapper;
@Autowired
private EquFileMapper equFileMapper;
@Autowired
private EquOrderEquSpareMapper equOrderEquSpareMapper;
/**
@ -118,14 +120,12 @@ public class DevicePDAServiceImpl implements IDevicePDAService {
order.setWorkCenterName(equOrderMapper.selectCenterNameByCenterCode(order.getPlanWorkshop()));
EquOrderEqu equ = equOrderEquMapper.selectEquOrderEquListByParentCode(order.getOrderId());
List<EquOrderDetail> detailList = equOrderDetailMapper.selectEquOrderDetailByParentCode(equ.getId());
List<EquOrderDetail> detailList = equOrderDetailMapper.selectEquOrderDetailByOrderCode(order.getOrderCode());
for (EquOrderDetail detail : detailList) {
List<EquOrderStandard> standardList = equOrderStandardMapper.selectEquOrderStandardByParentCode(detail.getId());
detail.setStandardList(standardList);
}
equ.setDetailList(detailList);
order.setDetailList(detailList);
// 人员信息
List<String> users = equOrderPersonMapper.selectEquOrderPersonByOrderCode(order.getOrderCode());
@ -136,9 +136,14 @@ public class DevicePDAServiceImpl implements IDevicePDAService {
personList.add(personMapper.selectSysUserByUserId(Long.valueOf(id)));
}
// 备件
List<EquOrderEquSpare> spareList = equOrderEquSpareMapper.selectEquOrderEquSpareByOrderCode(order.getOrderCode());
if (spareList != null) {
order.setSpareList(spareList);
}
order.setPersonList(personList);
order.setEqu(equ);
return success(order);
}

@ -163,8 +163,7 @@ public class EquOrderServiceImpl implements IEquOrderService {
boolean hasError = false;
EquOrderEqu equ = equOrder.getEqu();
List<EquOrderDetail> detailList = equ.getDetailList();
List<EquOrderDetail> detailList = equOrder.getDetailList();
for (EquOrderDetail detail : detailList) {
List<EquOrderStandard> standardList = detail.getStandardList();
for (EquOrderStandard standard : standardList) {
@ -240,7 +239,7 @@ public class EquOrderServiceImpl implements IEquOrderService {
// 获取故障报修流水号
EquRepairOrder equRepairOrder = new EquRepairOrder();
String serialNum = String.format("%03d", equRepairOrderMapper.selectOrderCodeSerialNumber());
String equipmentCode = equOrder.getEqu().getEquipmentCode();
String equipmentCode = equOrder.getEquipmentCode();
//报修单号
equRepairOrder.setOrderCode("BX" + DateUtils.dateTimeNow(DateUtils.YYYYMMDD) + equipmentCode + serialNum);
//在主表中存入报修单号信息

Loading…
Cancel
Save