|
|
@ -119,6 +119,16 @@ public class DevicePDAServiceImpl implements IDevicePDAService {
|
|
|
|
List<EquOrderDetail> detailList = equOrderDetailMapper.selectEquOrderDetailByOrderCode(order.getOrderCode());
|
|
|
|
List<EquOrderDetail> detailList = equOrderDetailMapper.selectEquOrderDetailByOrderCode(order.getOrderCode());
|
|
|
|
for (EquOrderDetail detail : detailList) {
|
|
|
|
for (EquOrderDetail detail : detailList) {
|
|
|
|
List<EquOrderStandard> standardList = equOrderStandardMapper.selectEquOrderStandardByParentCode(detail.getId());
|
|
|
|
List<EquOrderStandard> standardList = equOrderStandardMapper.selectEquOrderStandardByParentCode(detail.getId());
|
|
|
|
|
|
|
|
for (EquOrderStandard standard : standardList) {
|
|
|
|
|
|
|
|
// 未达标图片
|
|
|
|
|
|
|
|
BaseFileData selectTemp = new BaseFileData();
|
|
|
|
|
|
|
|
selectTemp.setSourceId(standard.getId());
|
|
|
|
|
|
|
|
selectTemp.setImageType("3");
|
|
|
|
|
|
|
|
List<String> checkPictrueList = equFileMapper.selectUrlList(selectTemp);
|
|
|
|
|
|
|
|
if (checkPictrueList != null) {
|
|
|
|
|
|
|
|
standard.setCheckPictrueList(checkPictrueList);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
detail.setStandardList(standardList);
|
|
|
|
detail.setStandardList(standardList);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
order.setDetailList(detailList);
|
|
|
|
order.setDetailList(detailList);
|
|
|
@ -170,8 +180,7 @@ public class DevicePDAServiceImpl implements IDevicePDAService {
|
|
|
|
|
|
|
|
|
|
|
|
boolean hasError = false;
|
|
|
|
boolean hasError = false;
|
|
|
|
|
|
|
|
|
|
|
|
EquOrderEqu equ = equOrder.getEqu();
|
|
|
|
List<EquOrderDetail> detailList = equOrder.getDetailList();
|
|
|
|
List<EquOrderDetail> detailList = equ.getDetailList();
|
|
|
|
|
|
|
|
for (EquOrderDetail detail : detailList) {
|
|
|
|
for (EquOrderDetail detail : detailList) {
|
|
|
|
List<EquOrderStandard> standardList = detail.getStandardList();
|
|
|
|
List<EquOrderStandard> standardList = detail.getStandardList();
|
|
|
|
for (EquOrderStandard standard : standardList) {
|
|
|
|
for (EquOrderStandard standard : standardList) {
|
|
|
@ -200,18 +209,15 @@ public class DevicePDAServiceImpl implements IDevicePDAService {
|
|
|
|
int up = standard.getActualValue().compareTo(standard.getDetailUpLimit());
|
|
|
|
int up = standard.getActualValue().compareTo(standard.getDetailUpLimit());
|
|
|
|
int down = standard.getActualValue().compareTo(standard.getDetailDownLimit());
|
|
|
|
int down = standard.getActualValue().compareTo(standard.getDetailDownLimit());
|
|
|
|
standard.setDetailReach("1");
|
|
|
|
standard.setDetailReach("1");
|
|
|
|
standard.setErrorFlag("0");
|
|
|
|
|
|
|
|
if (!(up != 1 && down != -1)) {
|
|
|
|
if (!(up != 1 && down != -1)) {
|
|
|
|
hasError = true;
|
|
|
|
hasError = true;
|
|
|
|
standard.setErrorFlag("1");
|
|
|
|
|
|
|
|
standard.setDetailReach("0");
|
|
|
|
standard.setDetailReach("0");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}else {
|
|
|
|
}else {
|
|
|
|
// TODO 未达标
|
|
|
|
// 未达标
|
|
|
|
standard.setErrorFlag("0");
|
|
|
|
standard.setErrorFlag("0");
|
|
|
|
if (standard.getDetailReach().equals("0")) {
|
|
|
|
if (standard.getDetailReach().equals("0")) {
|
|
|
|
hasError = true;
|
|
|
|
hasError = true;
|
|
|
|
standard.setErrorFlag("1");
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -247,7 +253,7 @@ public class DevicePDAServiceImpl implements IDevicePDAService {
|
|
|
|
// 获取故障报修流水号
|
|
|
|
// 获取故障报修流水号
|
|
|
|
EquRepairOrder equRepairOrder = new EquRepairOrder();
|
|
|
|
EquRepairOrder equRepairOrder = new EquRepairOrder();
|
|
|
|
String serialNum = String.format("%03d", equRepairOrderMapper.selectOrderCodeSerialNumber());
|
|
|
|
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);
|
|
|
|
equRepairOrder.setOrderCode("BX"+DateUtils.dateTimeNow(DateUtils.YYYYMMDD) + equipmentCode + serialNum);
|
|
|
|
//在主表中存入报修单号信息
|
|
|
|
//在主表中存入报修单号信息
|
|
|
@ -285,7 +291,7 @@ public class DevicePDAServiceImpl implements IDevicePDAService {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (!hasError) {
|
|
|
|
if (!hasError) {
|
|
|
|
// TODO 删除报修单
|
|
|
|
// 删除报修单
|
|
|
|
if (equOrder.getRepairCode() != null) {
|
|
|
|
if (equOrder.getRepairCode() != null) {
|
|
|
|
if (!equOrder.getRepairCode().isEmpty()) {
|
|
|
|
if (!equOrder.getRepairCode().isEmpty()) {
|
|
|
|
equRepairOrderMapper.deleteEquRepairOrderByRepairCode(equOrder.getRepairCode());
|
|
|
|
equRepairOrderMapper.deleteEquRepairOrderByRepairCode(equOrder.getRepairCode());
|
|
|
@ -398,6 +404,7 @@ public class DevicePDAServiceImpl implements IDevicePDAService {
|
|
|
|
* @return
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
|
|
|
|
@DS("#header.poolName")
|
|
|
|
public AjaxResult startMaintenanceTask(PDADTO pdadto) {
|
|
|
|
public AjaxResult startMaintenanceTask(PDADTO pdadto) {
|
|
|
|
EquOrder order = equOrderMapper.selectEquOrderByOrderCode(pdadto.getOrderCode());
|
|
|
|
EquOrder order = equOrderMapper.selectEquOrderByOrderCode(pdadto.getOrderCode());
|
|
|
|
// 改为进行中
|
|
|
|
// 改为进行中
|
|
|
|