|
|
@ -17,6 +17,8 @@ import com.glxp.api.common.util.ResultVOUtils;
|
|
|
|
import com.glxp.api.constant.*;
|
|
|
|
import com.glxp.api.constant.*;
|
|
|
|
import com.glxp.api.dao.basic.*;
|
|
|
|
import com.glxp.api.dao.basic.*;
|
|
|
|
import com.glxp.api.dao.inout.*;
|
|
|
|
import com.glxp.api.dao.inout.*;
|
|
|
|
|
|
|
|
import com.glxp.api.dao.inv.DeviceInspectTaskDetailMapper;
|
|
|
|
|
|
|
|
import com.glxp.api.dao.inv.DeviceInspectTaskMapper;
|
|
|
|
import com.glxp.api.dao.purchase.*;
|
|
|
|
import com.glxp.api.dao.purchase.*;
|
|
|
|
import com.glxp.api.dao.thrsys.ThrBusTypeOriginDao;
|
|
|
|
import com.glxp.api.dao.thrsys.ThrBusTypeOriginDao;
|
|
|
|
import com.glxp.api.dto.RelaySyncDto;
|
|
|
|
import com.glxp.api.dto.RelaySyncDto;
|
|
|
@ -1695,6 +1697,10 @@ public class HeartService {
|
|
|
|
case DOCUMENT_TYPE_DATA:
|
|
|
|
case DOCUMENT_TYPE_DATA:
|
|
|
|
this.insertDocumentTypeData(bean.getFileContent());
|
|
|
|
this.insertDocumentTypeData(bean.getFileContent());
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
case DEVICE_TASK:
|
|
|
|
|
|
|
|
this.insertDevTaskData(bean.getFileContent());
|
|
|
|
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
String taskId = bean.getTaskId();
|
|
|
|
String taskId = bean.getTaskId();
|
|
|
|
if (StrUtil.isNotBlank(taskId)) {
|
|
|
|
if (StrUtil.isNotBlank(taskId)) {
|
|
|
@ -1848,6 +1854,35 @@ public class HeartService {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
|
|
|
|
DeviceInspectTaskMapper deviceInspectTaskMapper;
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
|
|
|
|
DeviceInspectTaskDetailMapper deviceInspectTaskDetailMapper;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 插入设备任务更新数据
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
@Transactional(propagation = Propagation.NESTED)
|
|
|
|
|
|
|
|
public void insertDevTaskData(String content) {
|
|
|
|
|
|
|
|
cn.hutool.json.JSONObject jsonObject = JSONUtil.parseObj(content);
|
|
|
|
|
|
|
|
List<DeviceInspectTaskEntity> deviceInspectTaskEntities = JSONUtil.toList(jsonObject.getJSONArray(DeviceInspectTaskEntity.class.getSimpleName()), DeviceInspectTaskEntity.class);
|
|
|
|
|
|
|
|
List<DeviceInspectTaskDetailEntity> deviceInspectTaskDetailEntities = JSONUtil.toList(jsonObject.getJSONArray(DeviceInspectTaskDetailEntity.class.getSimpleName()), DeviceInspectTaskDetailEntity.class);
|
|
|
|
|
|
|
|
if (CollectionUtil.isNotEmpty(deviceInspectTaskEntities)) {
|
|
|
|
|
|
|
|
for (DeviceInspectTaskEntity deviceInspectTaskEntity : deviceInspectTaskEntities) {
|
|
|
|
|
|
|
|
deviceInspectTaskEntity.setUpdateTime(null);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
deviceInspectTaskMapper.replaceBatchs(deviceInspectTaskEntities);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (CollectionUtil.isNotEmpty(deviceInspectTaskDetailEntities)) {
|
|
|
|
|
|
|
|
deviceInspectTaskDetailMapper.replaceBatchs(deviceInspectTaskDetailEntities);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<String> syncFiles = JSONUtil.toList(jsonObject.getJSONArray("syncFiles"), String.class);
|
|
|
|
|
|
|
|
if (CollUtil.isNotEmpty(syncFiles)) {
|
|
|
|
|
|
|
|
fileService.download(syncFiles);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 从UDI自助平台拉取基础数据
|
|
|
|
* 从UDI自助平台拉取基础数据
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|