|
|
@ -1,7 +1,13 @@
|
|
|
|
package com.op.device.service.impl;
|
|
|
|
package com.op.device.service.impl;
|
|
|
|
|
|
|
|
|
|
|
|
import com.baomidou.dynamic.datasource.annotation.DS;
|
|
|
|
import com.baomidou.dynamic.datasource.annotation.DS;
|
|
|
|
|
|
|
|
import com.op.common.core.context.SecurityContextHolder;
|
|
|
|
|
|
|
|
import com.op.common.core.domain.BaseFileData;
|
|
|
|
|
|
|
|
import com.op.common.core.utils.DateUtils;
|
|
|
|
|
|
|
|
import com.op.common.core.utils.StringUtils;
|
|
|
|
|
|
|
|
import com.op.common.core.utils.uuid.IdUtils;
|
|
|
|
import com.op.common.core.web.domain.AjaxResult;
|
|
|
|
import com.op.common.core.web.domain.AjaxResult;
|
|
|
|
|
|
|
|
import com.op.common.security.utils.SecurityUtils;
|
|
|
|
import com.op.device.domain.EquOrder;
|
|
|
|
import com.op.device.domain.EquOrder;
|
|
|
|
import com.op.device.domain.EquOrderDetail;
|
|
|
|
import com.op.device.domain.EquOrderDetail;
|
|
|
|
import com.op.device.domain.EquOrderEqu;
|
|
|
|
import com.op.device.domain.EquOrderEqu;
|
|
|
@ -121,12 +127,51 @@ public class DevicePDAServiceImpl implements IDevicePDAService {
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* TODO 填写巡检记录工单
|
|
|
|
* TODO 填写巡检记录工单
|
|
|
|
|
|
|
|
*
|
|
|
|
* @param equOrder
|
|
|
|
* @param equOrder
|
|
|
|
* @return
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
@DS("#header.poolName")
|
|
|
|
@DS("#header.poolName")
|
|
|
|
public AjaxResult updateInspectionRecord(EquOrder equOrder) {
|
|
|
|
public AjaxResult updateInspectionRecord(EquOrder equOrder) {
|
|
|
|
|
|
|
|
// 改变工单状态-已完成
|
|
|
|
|
|
|
|
equOrder.setOrderStatus("1");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
EquOrderEqu equ = equOrder.getEqu();
|
|
|
|
|
|
|
|
List<EquOrderDetail> detailList = equ.getDetailList();
|
|
|
|
|
|
|
|
for (EquOrderDetail detail : detailList) {
|
|
|
|
|
|
|
|
List<EquOrderStandard> standardList = detail.getStandardList();
|
|
|
|
|
|
|
|
for (EquOrderStandard standard : standardList) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//上传附件
|
|
|
|
|
|
|
|
if (StringUtils.isNotEmpty(standard.getPicturePath())) {
|
|
|
|
|
|
|
|
String[] ids = standard.getPicturePath().split(",");
|
|
|
|
|
|
|
|
List<BaseFileData> files = new ArrayList<>();
|
|
|
|
|
|
|
|
BaseFileData file = null;
|
|
|
|
|
|
|
|
for (String id : ids) {
|
|
|
|
|
|
|
|
file = new BaseFileData();
|
|
|
|
|
|
|
|
file.setFileId(IdUtils.fastSimpleUUID());
|
|
|
|
|
|
|
|
file.setFileName(id.split("&fileName=")[1]);
|
|
|
|
|
|
|
|
file.setFileAddress(id);
|
|
|
|
|
|
|
|
file.setSourceId(standard.getId());
|
|
|
|
|
|
|
|
file.setCreateBy(SecurityUtils.getUsername());
|
|
|
|
|
|
|
|
file.setCreateTime(new Date());
|
|
|
|
|
|
|
|
files.add(file);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
equOrderStandardMapper.insertBaseFileBatch(files);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 更新标准
|
|
|
|
|
|
|
|
standard.setUpdateTime(DateUtils.getNowDate());
|
|
|
|
|
|
|
|
equOrderStandardMapper.updateEquOrderStandard(standard);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 更新工单信息
|
|
|
|
|
|
|
|
equOrder.setUpdateTime(DateUtils.getNowDate());
|
|
|
|
|
|
|
|
equOrderMapper.updateEquOrder(equOrder);
|
|
|
|
|
|
|
|
|
|
|
|
return success(equOrder);
|
|
|
|
return success(equOrder);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|