|
|
@ -15,6 +15,7 @@ import com.glxp.api.res.inv.InnerOrderPrintResponse;
|
|
|
|
import com.glxp.api.service.collect.RelCodeBatchService;
|
|
|
|
import com.glxp.api.service.collect.RelCodeBatchService;
|
|
|
|
import com.glxp.api.service.collect.RelCodeDetailService;
|
|
|
|
import com.glxp.api.service.collect.RelCodeDetailService;
|
|
|
|
import com.glxp.api.service.dev.*;
|
|
|
|
import com.glxp.api.service.dev.*;
|
|
|
|
|
|
|
|
import com.glxp.api.service.inout.impl.IoCodeService;
|
|
|
|
import org.junit.Test;
|
|
|
|
import org.junit.Test;
|
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
|
import cn.hutool.core.collection.CollUtil;
|
|
|
|
import cn.hutool.core.collection.CollUtil;
|
|
|
@ -287,7 +288,7 @@ public class HeartService {
|
|
|
|
// if (needExec())
|
|
|
|
// if (needExec())
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case DEVICE_INFO_DATA:
|
|
|
|
case DEVICE_INFO_DATA:
|
|
|
|
if (needExec(info.getDeviceInfo(),info.getDeviceCheck(),info.getDeviceRepairApply(),info.getDeviceUpkeep())) {
|
|
|
|
if (needExec(info.getDeviceInfo(), info.getDeviceCheck(), info.getDeviceRepairApply(), info.getDeviceUpkeep())) {
|
|
|
|
uploadData(exportType, taskId, x -> x.getDeviceInfoData(info, taskId, now, syncTime));
|
|
|
|
uploadData(exportType, taskId, x -> x.getDeviceInfoData(info, taskId, now, syncTime));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
break;
|
|
|
@ -1120,7 +1121,6 @@ public class HeartService {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
@Resource
|
|
|
|
DeviceInspectTaskService deviceInspectTaskService;
|
|
|
|
DeviceInspectTaskService deviceInspectTaskService;
|
|
|
|
@Resource
|
|
|
|
@Resource
|
|
|
@ -1184,6 +1184,7 @@ public class HeartService {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return dataResponse;
|
|
|
|
return dataResponse;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* @param info
|
|
|
|
* @param info
|
|
|
|
* @param taskId
|
|
|
|
* @param taskId
|
|
|
@ -1203,7 +1204,7 @@ public class HeartService {
|
|
|
|
if (needExec(info.getDrugDataTask())) {
|
|
|
|
if (needExec(info.getDrugDataTask())) {
|
|
|
|
Map<String, Object> map = basicExportStatusTimeInfo(now, BasicExportStatusTimeEnum.DRUG_DATA_TASK);
|
|
|
|
Map<String, Object> map = basicExportStatusTimeInfo(now, BasicExportStatusTimeEnum.DRUG_DATA_TASK);
|
|
|
|
List<RelCodeBatch> relCodeBatches = relCodeBatchService.list(Wrappers.lambdaQuery(RelCodeBatch.class)
|
|
|
|
List<RelCodeBatch> relCodeBatches = relCodeBatchService.list(Wrappers.lambdaQuery(RelCodeBatch.class)
|
|
|
|
.in(RelCodeBatch::getUploadFlagUp,0,2)
|
|
|
|
.in(RelCodeBatch::getUploadFlagUp, 0, 2)
|
|
|
|
);
|
|
|
|
);
|
|
|
|
if (CollectionUtil.isNotEmpty(relCodeBatches)) {
|
|
|
|
if (CollectionUtil.isNotEmpty(relCodeBatches)) {
|
|
|
|
dataResponse = new SpsSyncDrugDataTaskResponse();
|
|
|
|
dataResponse = new SpsSyncDrugDataTaskResponse();
|
|
|
@ -1212,7 +1213,7 @@ public class HeartService {
|
|
|
|
//增加明细数据
|
|
|
|
//增加明细数据
|
|
|
|
List<Integer> batchIds = relCodeBatches.stream().map(RelCodeBatch::getId).collect(Collectors.toList());
|
|
|
|
List<Integer> batchIds = relCodeBatches.stream().map(RelCodeBatch::getId).collect(Collectors.toList());
|
|
|
|
List<RelCodeDetail> list = relCodeDetailService.list(Wrappers.lambdaQuery(RelCodeDetail.class)
|
|
|
|
List<RelCodeDetail> list = relCodeDetailService.list(Wrappers.lambdaQuery(RelCodeDetail.class)
|
|
|
|
.in(RelCodeDetail::getBatchIdFk,batchIds));
|
|
|
|
.in(RelCodeDetail::getBatchIdFk, batchIds));
|
|
|
|
dataResponse.setRelCodeDetails(list);
|
|
|
|
dataResponse.setRelCodeDetails(list);
|
|
|
|
|
|
|
|
|
|
|
|
remark.append("药品关联信息任务:").append(relCodeBatches.size()).append("条\n");
|
|
|
|
remark.append("药品关联信息任务:").append(relCodeBatches.size()).append("条\n");
|
|
|
@ -1240,7 +1241,7 @@ public class HeartService {
|
|
|
|
|
|
|
|
|
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
|
public void uploadData(BasicExportTypeEnum exportType, String taskId, Function<HeartService, Object> dataMethod) {
|
|
|
|
public void uploadData(BasicExportTypeEnum exportType, String taskId, Function<HeartService, Object> dataMethod) {
|
|
|
|
Date startTime = new Date();
|
|
|
|
Date startTime = new Date();
|
|
|
|
Integer status = StatusEnum.SUCCESS.getCode();
|
|
|
|
Integer status = StatusEnum.SUCCESS.getCode();
|
|
|
|
Object data = dataMethod.apply(this);
|
|
|
|
Object data = dataMethod.apply(this);
|
|
|
|
if (data == null) {
|
|
|
|
if (data == null) {
|
|
|
@ -1521,7 +1522,7 @@ public class HeartService {
|
|
|
|
orderService.insertOrder(orderEntity);
|
|
|
|
orderService.insertOrder(orderEntity);
|
|
|
|
insetOrderDb(syncDataResponse, orderEntity);
|
|
|
|
insetOrderDb(syncDataResponse, orderEntity);
|
|
|
|
orderEntity = orderService.findByBillNo(orderEntity.getBillNo());
|
|
|
|
orderEntity = orderService.findByBillNo(orderEntity.getBillNo());
|
|
|
|
if (orderEntity.getStatus() == ConstantStatus.ORDER_STATUS_CHECK_REW){
|
|
|
|
if (orderEntity.getStatus() == ConstantStatus.ORDER_STATUS_CHECK_REW) {
|
|
|
|
addInoutService.dealProcess(orderEntity);
|
|
|
|
addInoutService.dealProcess(orderEntity);
|
|
|
|
} else if (orderEntity.getStatus() != ConstantStatus.ORDER_STATUS_TEMP_SAVE && orderEntity.getStatus() == ConstantStatus.ORDER_STATUS_CHECK_REW) {
|
|
|
|
} else if (orderEntity.getStatus() != ConstantStatus.ORDER_STATUS_TEMP_SAVE && orderEntity.getStatus() == ConstantStatus.ORDER_STATUS_CHECK_REW) {
|
|
|
|
addInoutService.dealProcess(orderEntity);
|
|
|
|
addInoutService.dealProcess(orderEntity);
|
|
|
@ -1766,7 +1767,8 @@ public class HeartService {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
Date startTime = new Date();
|
|
|
|
Date startTime = new Date();
|
|
|
|
|
|
|
|
|
|
|
|
String data = spGetHttp.pullData(exportType);;
|
|
|
|
String data = spGetHttp.pullData(exportType);
|
|
|
|
|
|
|
|
;
|
|
|
|
cn.hutool.json.JSONObject obj = JSONUtil.parseObj(data);
|
|
|
|
cn.hutool.json.JSONObject obj = JSONUtil.parseObj(data);
|
|
|
|
Integer code = obj.getInt("code");
|
|
|
|
Integer code = obj.getInt("code");
|
|
|
|
if (!code.equals(20000)) {
|
|
|
|
if (!code.equals(20000)) {
|
|
|
@ -1797,7 +1799,7 @@ public class HeartService {
|
|
|
|
case DEVICE_CHECK_DATA:
|
|
|
|
case DEVICE_CHECK_DATA:
|
|
|
|
this.insertDeviceCheckData(bean.getFileContent());
|
|
|
|
this.insertDeviceCheckData(bean.getFileContent());
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
//insertDeviceRepairData
|
|
|
|
//insertDeviceRepairData
|
|
|
|
case DEVICE_REPAIR_DATA:
|
|
|
|
case DEVICE_REPAIR_DATA:
|
|
|
|
this.insertDeviceRepairData(bean.getFileContent());
|
|
|
|
this.insertDeviceRepairData(bean.getFileContent());
|
|
|
|
break;
|
|
|
|
break;
|
|
|
@ -2002,9 +2004,10 @@ public class HeartService {
|
|
|
|
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
@Resource
|
|
|
|
DeviceInfoMapper deviceInfoMapper;
|
|
|
|
DeviceInfoMapper deviceInfoMapper;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 批量插入设备基础数据
|
|
|
|
* 批量插入设备基础数据
|
|
|
|
* insertDeviceInfoData
|
|
|
|
* insertDeviceInfoData
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@Transactional(propagation = Propagation.NESTED)
|
|
|
|
@Transactional(propagation = Propagation.NESTED)
|
|
|
|
public void insertDeviceInfoData(String content) {
|
|
|
|
public void insertDeviceInfoData(String content) {
|
|
|
@ -2015,7 +2018,7 @@ public class HeartService {
|
|
|
|
deviceInfoEntity.setUpdateTime(null);
|
|
|
|
deviceInfoEntity.setUpdateTime(null);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
boolean b = deviceInfoMapper.replaceBatchs(deviceInfoEntities);
|
|
|
|
boolean b = deviceInfoMapper.replaceBatchs(deviceInfoEntities);
|
|
|
|
if (b == false){
|
|
|
|
if (b == false) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
List<String> syncFiles = JSONUtil.toList(jsonObject.getJSONArray("syncFiles"), String.class);
|
|
|
|
List<String> syncFiles = JSONUtil.toList(jsonObject.getJSONArray("syncFiles"), String.class);
|
|
|
@ -2042,7 +2045,7 @@ public class HeartService {
|
|
|
|
DeviceCheckItemDictMapper deviceCheckItemDictMapper;
|
|
|
|
DeviceCheckItemDictMapper deviceCheckItemDictMapper;
|
|
|
|
|
|
|
|
|
|
|
|
@Transactional(propagation = Propagation.NESTED)
|
|
|
|
@Transactional(propagation = Propagation.NESTED)
|
|
|
|
public void insertDeviceCheckData(String content){
|
|
|
|
public void insertDeviceCheckData(String content) {
|
|
|
|
cn.hutool.json.JSONObject jsonObject = JSONUtil.parseObj(content);
|
|
|
|
cn.hutool.json.JSONObject jsonObject = JSONUtil.parseObj(content);
|
|
|
|
List<DeviceCheckEntity> deviceCheckEntities = JSONUtil.toList(jsonObject.getJSONArray(DeviceCheckEntity.class.getSimpleName()), DeviceCheckEntity.class);
|
|
|
|
List<DeviceCheckEntity> deviceCheckEntities = JSONUtil.toList(jsonObject.getJSONArray(DeviceCheckEntity.class.getSimpleName()), DeviceCheckEntity.class);
|
|
|
|
List<DeviceCheckDetailEntity> deviceCheckDetailEntities = JSONUtil.toList(jsonObject.getJSONArray(DeviceCheckDetailEntity.class.getSimpleName()), DeviceCheckDetailEntity.class);
|
|
|
|
List<DeviceCheckDetailEntity> deviceCheckDetailEntities = JSONUtil.toList(jsonObject.getJSONArray(DeviceCheckDetailEntity.class.getSimpleName()), DeviceCheckDetailEntity.class);
|
|
|
@ -2090,10 +2093,11 @@ public class HeartService {
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 批量 插入 || 更新 报修管理
|
|
|
|
* 批量 插入 || 更新 报修管理
|
|
|
|
|
|
|
|
*
|
|
|
|
* @param content
|
|
|
|
* @param content
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@Transactional(propagation = Propagation.NESTED)
|
|
|
|
@Transactional(propagation = Propagation.NESTED)
|
|
|
|
public void insertDeviceRepairData(String content){
|
|
|
|
public void insertDeviceRepairData(String content) {
|
|
|
|
cn.hutool.json.JSONObject jsonObject = JSONUtil.parseObj(content);
|
|
|
|
cn.hutool.json.JSONObject jsonObject = JSONUtil.parseObj(content);
|
|
|
|
List<DeviceRepairApplyEntity> deviceRepairApplyEntities = JSONUtil.toList(jsonObject.getJSONArray(DeviceRepairApplyEntity.class.getSimpleName()), DeviceRepairApplyEntity.class);
|
|
|
|
List<DeviceRepairApplyEntity> deviceRepairApplyEntities = JSONUtil.toList(jsonObject.getJSONArray(DeviceRepairApplyEntity.class.getSimpleName()), DeviceRepairApplyEntity.class);
|
|
|
|
List<DeviceRepairApplyDetailEntity> deviceRepairApplyDetailEntities = JSONUtil.toList(jsonObject.getJSONArray(DeviceRepairApplyDetailEntity.class.getSimpleName()), DeviceRepairApplyDetailEntity.class);
|
|
|
|
List<DeviceRepairApplyDetailEntity> deviceRepairApplyDetailEntities = JSONUtil.toList(jsonObject.getJSONArray(DeviceRepairApplyDetailEntity.class.getSimpleName()), DeviceRepairApplyDetailEntity.class);
|
|
|
@ -2140,10 +2144,11 @@ public class HeartService {
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 批量 插入 || 更新 报修管理
|
|
|
|
* 批量 插入 || 更新 报修管理
|
|
|
|
|
|
|
|
*
|
|
|
|
* @param content
|
|
|
|
* @param content
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@Transactional(propagation = Propagation.NESTED)
|
|
|
|
@Transactional(propagation = Propagation.NESTED)
|
|
|
|
public void insertDeviceUpkeepData(String content){
|
|
|
|
public void insertDeviceUpkeepData(String content) {
|
|
|
|
cn.hutool.json.JSONObject jsonObject = JSONUtil.parseObj(content);
|
|
|
|
cn.hutool.json.JSONObject jsonObject = JSONUtil.parseObj(content);
|
|
|
|
List<DeviceUpkeepEntity> deviceUpkeepEntities = JSONUtil.toList(jsonObject.getJSONArray(DeviceUpkeepEntity.class.getSimpleName()), DeviceUpkeepEntity.class);
|
|
|
|
List<DeviceUpkeepEntity> deviceUpkeepEntities = JSONUtil.toList(jsonObject.getJSONArray(DeviceUpkeepEntity.class.getSimpleName()), DeviceUpkeepEntity.class);
|
|
|
|
List<DeviceUpkeepDetailEntity> deviceUpkeepDetailEntities = JSONUtil.toList(jsonObject.getJSONArray(DeviceUpkeepDetailEntity.class.getSimpleName()), DeviceUpkeepDetailEntity.class);
|
|
|
|
List<DeviceUpkeepDetailEntity> deviceUpkeepDetailEntities = JSONUtil.toList(jsonObject.getJSONArray(DeviceUpkeepDetailEntity.class.getSimpleName()), DeviceUpkeepDetailEntity.class);
|
|
|
@ -2180,8 +2185,9 @@ public class HeartService {
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@Resource
|
|
|
|
@Resource
|
|
|
|
ThrManufacturerMapper thrManufacturerMapper;
|
|
|
|
ThrManufacturerMapper thrManufacturerMapper;
|
|
|
|
|
|
|
|
|
|
|
|
@Transactional(propagation = Propagation.NESTED)
|
|
|
|
@Transactional(propagation = Propagation.NESTED)
|
|
|
|
public void insertProBusinessData(String content){
|
|
|
|
public void insertProBusinessData(String content) {
|
|
|
|
cn.hutool.json.JSONObject jsonObject = JSONUtil.parseObj(content);
|
|
|
|
cn.hutool.json.JSONObject jsonObject = JSONUtil.parseObj(content);
|
|
|
|
List<ThrManufacturerEntity> thrManufacturerEntities = JSONUtil.toList(jsonObject.getJSONArray(ThrManufacturerEntity.class.getSimpleName()), ThrManufacturerEntity.class);
|
|
|
|
List<ThrManufacturerEntity> thrManufacturerEntities = JSONUtil.toList(jsonObject.getJSONArray(ThrManufacturerEntity.class.getSimpleName()), ThrManufacturerEntity.class);
|
|
|
|
if (CollectionUtil.isNotEmpty(thrManufacturerEntities)) {
|
|
|
|
if (CollectionUtil.isNotEmpty(thrManufacturerEntities)) {
|
|
|
@ -2206,7 +2212,7 @@ public class HeartService {
|
|
|
|
RelCodeBatchMapper relCodeBatchMapper;
|
|
|
|
RelCodeBatchMapper relCodeBatchMapper;
|
|
|
|
|
|
|
|
|
|
|
|
@Transactional(propagation = Propagation.NESTED)
|
|
|
|
@Transactional(propagation = Propagation.NESTED)
|
|
|
|
public void insertDrugData(String content){
|
|
|
|
public void insertDrugData(String content) {
|
|
|
|
cn.hutool.json.JSONObject jsonObject = JSONUtil.parseObj(content);
|
|
|
|
cn.hutool.json.JSONObject jsonObject = JSONUtil.parseObj(content);
|
|
|
|
SpsSyncDrugDataTaskResponse spsSyncDrugDataTaskResponse = JSONUtil.toBean(String.valueOf(jsonObject.get(SpsSyncDrugDataTaskResponse.class.getSimpleName())), SpsSyncDrugDataTaskResponse.class);
|
|
|
|
SpsSyncDrugDataTaskResponse spsSyncDrugDataTaskResponse = JSONUtil.toBean(String.valueOf(jsonObject.get(SpsSyncDrugDataTaskResponse.class.getSimpleName())), SpsSyncDrugDataTaskResponse.class);
|
|
|
|
|
|
|
|
|
|
|
@ -2346,20 +2352,36 @@ public class HeartService {
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
|
|
|
|
IoCodeService codeService;
|
|
|
|
|
|
|
|
|
|
|
|
public void insetOrderDb(SpsSyncOrderResponse syncDataResponse, IoOrderEntity orderEntity) {
|
|
|
|
public void insetOrderDb(SpsSyncOrderResponse syncDataResponse, IoOrderEntity orderEntity) {
|
|
|
|
//更新码详情
|
|
|
|
//更新码详情
|
|
|
|
|
|
|
|
// if (CollUtil.isNotEmpty(syncDataResponse.getOrderDetailCodeEntities())) {
|
|
|
|
|
|
|
|
// List<IoCodeEntity> warehouseEntityList = syncDataResponse.getCodeEntities();
|
|
|
|
|
|
|
|
// for (IoCodeEntity warehouseEntity : warehouseEntityList) {
|
|
|
|
|
|
|
|
// if (warehouseEntity.getOrderId().equals(orderEntity.getBillNo())) {
|
|
|
|
|
|
|
|
// IoCodeTempEntity codeTempEntity = new IoCodeTempEntity();
|
|
|
|
|
|
|
|
// BeanUtils.copyProperties(warehouseEntity, codeTempEntity);
|
|
|
|
|
|
|
|
// codeTempEntity.setId(null);
|
|
|
|
|
|
|
|
// codeTempService.insert(codeTempEntity);
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
if (CollUtil.isNotEmpty(syncDataResponse.getOrderDetailCodeEntities())) {
|
|
|
|
if (CollUtil.isNotEmpty(syncDataResponse.getOrderDetailCodeEntities())) {
|
|
|
|
List<IoCodeEntity> warehouseEntityList = syncDataResponse.getCodeEntities();
|
|
|
|
List<IoCodeEntity> warehouseEntityList = syncDataResponse.getCodeEntities();
|
|
|
|
for (IoCodeEntity warehouseEntity : warehouseEntityList) {
|
|
|
|
for (IoCodeEntity warehouseEntity : warehouseEntityList) {
|
|
|
|
if (warehouseEntity.getOrderId().equals(orderEntity.getBillNo())) {
|
|
|
|
if (warehouseEntity.getOrderId().equals(orderEntity.getBillNo())) {
|
|
|
|
IoCodeTempEntity codeTempEntity = new IoCodeTempEntity();
|
|
|
|
IoCodeEntity codeTempEntity = new IoCodeEntity();
|
|
|
|
BeanUtils.copyProperties(warehouseEntity, codeTempEntity);
|
|
|
|
BeanUtils.copyProperties(warehouseEntity, codeTempEntity);
|
|
|
|
codeTempEntity.setId(null);
|
|
|
|
codeTempEntity.setId(null);
|
|
|
|
codeTempService.insert(codeTempEntity);
|
|
|
|
codeService.insert(codeTempEntity);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//更新业务详情
|
|
|
|
//更新业务详情
|
|
|
|
if (CollUtil.isNotEmpty(syncDataResponse.getOrderDetailBizEntities())) {
|
|
|
|
if (CollUtil.isNotEmpty(syncDataResponse.getOrderDetailBizEntities())) {
|
|
|
|
List<IoOrderDetailBizEntity> orderDetailBizEntities = syncDataResponse.getOrderDetailBizEntities();
|
|
|
|
List<IoOrderDetailBizEntity> orderDetailBizEntities = syncDataResponse.getOrderDetailBizEntities();
|
|
|
@ -2683,7 +2705,7 @@ public class HeartService {
|
|
|
|
@Resource
|
|
|
|
@Resource
|
|
|
|
DeviceRepairService deviceRepairService;
|
|
|
|
DeviceRepairService deviceRepairService;
|
|
|
|
|
|
|
|
|
|
|
|
public SpsSyncDeviceDataResponse getDeviceInfoData(SyncDataSetEntity info, String taskId, Date now, Date syncTime){
|
|
|
|
public SpsSyncDeviceDataResponse getDeviceInfoData(SyncDataSetEntity info, String taskId, Date now, Date syncTime) {
|
|
|
|
SpsSyncDeviceDataResponse dataResponse = null;
|
|
|
|
SpsSyncDeviceDataResponse dataResponse = null;
|
|
|
|
Map<String, Object> syncTimeMap = new WeakHashMap<>(3);
|
|
|
|
Map<String, Object> syncTimeMap = new WeakHashMap<>(3);
|
|
|
|
syncTimeMap.put("isNew", true);
|
|
|
|
syncTimeMap.put("isNew", true);
|
|
|
@ -2809,10 +2831,10 @@ public class HeartService {
|
|
|
|
// List<Map<String, String>> list = new ArrayList<>(spsSyncSysSettingResponse.getSystemPDFTemplateEntities().size() * 2);
|
|
|
|
// List<Map<String, String>> list = new ArrayList<>(spsSyncSysSettingResponse.getSystemPDFTemplateEntities().size() * 2);
|
|
|
|
dataResponse.getDeviceRepairApplyDetailEntities().forEach(deviceRepairApplyDetailEntity -> {
|
|
|
|
dataResponse.getDeviceRepairApplyDetailEntities().forEach(deviceRepairApplyDetailEntity -> {
|
|
|
|
list.add(deviceRepairApplyDetailEntity.getLivePath());
|
|
|
|
list.add(deviceRepairApplyDetailEntity.getLivePath());
|
|
|
|
if (deviceRepairApplyDetailEntity.getDiagnosisLivePath() != null){
|
|
|
|
if (deviceRepairApplyDetailEntity.getDiagnosisLivePath() != null) {
|
|
|
|
list.add(deviceRepairApplyDetailEntity.getDiagnosisLivePath());
|
|
|
|
list.add(deviceRepairApplyDetailEntity.getDiagnosisLivePath());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
log.error("当前数据接受到的报修单明细list{}",list);
|
|
|
|
log.error("当前数据接受到的报修单明细list{}", list);
|
|
|
|
// BaseResponse<String> response = spGetHttp.postTemplateFile(list);
|
|
|
|
// BaseResponse<String> response = spGetHttp.postTemplateFile(list);
|
|
|
|
// if (response.getCode() == 20000) {
|
|
|
|
// if (response.getCode() == 20000) {
|
|
|
|
// log.error("图片列表上传成功");
|
|
|
|
// log.error("图片列表上传成功");
|
|
|
@ -2841,14 +2863,14 @@ public class HeartService {
|
|
|
|
remark.append("维修单数据:").append(deviceRepairEntities.size()).append("条\n");
|
|
|
|
remark.append("维修单数据:").append(deviceRepairEntities.size()).append("条\n");
|
|
|
|
dataResponse.getDeviceRepairEntities().forEach(deviceRepair -> {
|
|
|
|
dataResponse.getDeviceRepairEntities().forEach(deviceRepair -> {
|
|
|
|
list.add(deviceRepair.getLivePath());
|
|
|
|
list.add(deviceRepair.getLivePath());
|
|
|
|
if (deviceRepair.getDiagnosisLivePath() != null){
|
|
|
|
if (deviceRepair.getDiagnosisLivePath() != null) {
|
|
|
|
list.add(deviceRepair.getDiagnosisLivePath());
|
|
|
|
list.add(deviceRepair.getDiagnosisLivePath());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (deviceRepair.getServiceLivePath() != null){
|
|
|
|
if (deviceRepair.getServiceLivePath() != null) {
|
|
|
|
list.add(deviceRepair.getServiceLivePath());
|
|
|
|
list.add(deviceRepair.getServiceLivePath());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
log.error("当前数据接受到的维修单list{}",list);
|
|
|
|
log.error("当前数据接受到的维修单list{}", list);
|
|
|
|
BaseResponse<String> response = spGetHttp.postTemplateFile(list);
|
|
|
|
BaseResponse<String> response = spGetHttp.postTemplateFile(list);
|
|
|
|
if (response.getCode() == 20000) {
|
|
|
|
if (response.getCode() == 20000) {
|
|
|
|
log.error("图片列表上传成功");
|
|
|
|
log.error("图片列表上传成功");
|
|
|
@ -2866,7 +2888,7 @@ public class HeartService {
|
|
|
|
//确认开启同步保养单
|
|
|
|
//确认开启同步保养单
|
|
|
|
if (needExec(info.getDeviceUpkeep())) {
|
|
|
|
if (needExec(info.getDeviceUpkeep())) {
|
|
|
|
Map<String, Object> map = basicExportStatusTimeInfo(now, BasicExportStatusTimeEnum.DEV_UPKEEP_DATA);
|
|
|
|
Map<String, Object> map = basicExportStatusTimeInfo(now, BasicExportStatusTimeEnum.DEV_UPKEEP_DATA);
|
|
|
|
List<DeviceUpkeepEntity> deviceUpkeepEntities = deviceUpkeepService.list(Wrappers.lambdaQuery(DeviceUpkeepEntity.class)
|
|
|
|
List<DeviceUpkeepEntity> deviceUpkeepEntities = deviceUpkeepService.list(Wrappers.lambdaQuery(DeviceUpkeepEntity.class)
|
|
|
|
.le(!ge && (boolean) map.get("isNew"), DeviceUpkeepEntity::getUpdateTime, now)
|
|
|
|
.le(!ge && (boolean) map.get("isNew"), DeviceUpkeepEntity::getUpdateTime, now)
|
|
|
|
.between(ge, DeviceUpkeepEntity::getUpdateTime, syncTime, now)
|
|
|
|
.between(ge, DeviceUpkeepEntity::getUpdateTime, syncTime, now)
|
|
|
|
.between(!ge && !(boolean) map.get("isNew"), DeviceUpkeepEntity::getUpdateTime
|
|
|
|
.between(!ge && !(boolean) map.get("isNew"), DeviceUpkeepEntity::getUpdateTime
|
|
|
@ -2937,13 +2959,11 @@ public class HeartService {
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
log.error("这是设备管理数据{}",dataResponse);
|
|
|
|
log.error("这是设备管理数据{}", dataResponse);
|
|
|
|
return dataResponse;
|
|
|
|
return dataResponse;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// public SpsSyncDeviceDataResponse getDeviceCheckData(SyncDataSetEntity info, String taskId, Date now, Date syncTime){
|
|
|
|
// public SpsSyncDeviceDataResponse getDeviceCheckData(SyncDataSetEntity info, String taskId, Date now, Date syncTime){
|
|
|
|
// SpsSyncDeviceDataResponse dataResponse = null;
|
|
|
|
// SpsSyncDeviceDataResponse dataResponse = null;
|
|
|
|
// Map<String, Object> syncTimeMap = new WeakHashMap<>(3);
|
|
|
|
// Map<String, Object> syncTimeMap = new WeakHashMap<>(3);
|
|
|
@ -3109,8 +3129,9 @@ public class HeartService {
|
|
|
|
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
@Resource
|
|
|
|
ThrManufacturerService thrManufacturerService;
|
|
|
|
ThrManufacturerService thrManufacturerService;
|
|
|
|
|
|
|
|
|
|
|
|
//生产企业
|
|
|
|
//生产企业
|
|
|
|
public SpsSyncProBusinessDataResponse getProBusinessData(SyncDataSetEntity info, String taskId, Date now, Date syncTime){
|
|
|
|
public SpsSyncProBusinessDataResponse getProBusinessData(SyncDataSetEntity info, String taskId, Date now, Date syncTime) {
|
|
|
|
SpsSyncProBusinessDataResponse dataResponse = null;
|
|
|
|
SpsSyncProBusinessDataResponse dataResponse = null;
|
|
|
|
Map<String, Object> syncTimeMap = new WeakHashMap<>(3);
|
|
|
|
Map<String, Object> syncTimeMap = new WeakHashMap<>(3);
|
|
|
|
syncTimeMap.put("isNew", true);
|
|
|
|
syncTimeMap.put("isNew", true);
|
|
|
@ -3140,7 +3161,7 @@ public class HeartService {
|
|
|
|
dataResponse.setType(BasicExportTypeEnum.PRODUCE_BUSINESS_DATA.getRemark());
|
|
|
|
dataResponse.setType(BasicExportTypeEnum.PRODUCE_BUSINESS_DATA.getRemark());
|
|
|
|
dataResponse.setSyncRemark(remark.toString());
|
|
|
|
dataResponse.setSyncRemark(remark.toString());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
log.error("自主平台服务数据{}",dataResponse);
|
|
|
|
log.error("自主平台服务数据{}", dataResponse);
|
|
|
|
return dataResponse;
|
|
|
|
return dataResponse;
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|