Commit 85479673 authored by 赵啸非's avatar 赵啸非

添加部分

parent 4e087d64
Pipeline #2776 failed with stages
......@@ -91,6 +91,7 @@ public class DeviceCallbackController {
deviceEntity.setSiteCode(req.getSiteCode());
deviceEntity.setSiteName(req.getSiteName());
deviceEntity.setProductCode(req.getProductCode());
deviceEntity.setProductName("填单机");
deviceEntity.setIp(req.getIp());
deviceEntity.setPort(req.getPort());
deviceEntity.setLeadingOfficial(req.getLeadingOfficial());
......@@ -120,6 +121,7 @@ public class DeviceCallbackController {
deviceEntity.setSiteName(req.getSiteName());
deviceEntity.setProductCode(req.getProductCode());
deviceEntity.setProductName("填单机");
deviceEntity.setIp(req.getIp());
deviceEntity.setPort(req.getPort());
deviceEntity.setDeviceRemark(req.getDeviceRemark());
......
......@@ -95,6 +95,7 @@ public class SyncSiteDeviceTaskImpl implements ITaskExcuteService {
if (oldDeviceMap.containsKey(item.getDeviceCode())) {
item.setId(oldDeviceMap.get(item.getDeviceCode()).getId());
item.setDeviceId(item.getId());
item.setProductName("填单机");
item.setUpdateTime(new Date());
return item;
}
......@@ -106,6 +107,7 @@ public class SyncSiteDeviceTaskImpl implements ITaskExcuteService {
if (!oldDeviceMap.containsKey(item.getDeviceCode())) {
item.setDeviceId(item.getId());
item.setCreateUserId(1L);
item.setProductName("填单机");
item.setCreateUserName("系统管理员");
item.setCreateTime(new Date());
return item;
......
......@@ -160,7 +160,7 @@ public class DeviceController extends BaseCRUDJsonBodyMappingController<DeviceSe
@Override
protected int saveAfter(DeviceEntity entity, Map<String, Object> model, Context context) throws AppException {
if (ObjectUtils.isEmpty(entity.getUpdateTime())) {
/* if (ObjectUtils.isEmpty(entity.getUpdateTime())) {
String token = getToken();
DeviceReq deviceReq = new DeviceReq();
deviceReq.setReceiveMethod(DeviceMethodEnum.ADD.getValue());
......@@ -171,7 +171,7 @@ public class DeviceController extends BaseCRUDJsonBodyMappingController<DeviceSe
deviceReq.setPort(entity.getPort());
deviceReq.setSiteId(1L);
deviceReq.setSiteCode("511500000000-0001");
deviceReq.setSiteName("宜宾市民中心");
//deviceReq.setSiteName("宜宾市民中心");
deviceReq.setLeadingOfficial(entity.getLeadingOfficial());
deviceReq.setLeadingOfficialTelephone(entity.getLeadingOfficialTelephone());
deviceReq.setSource(1);
......@@ -196,7 +196,7 @@ public class DeviceController extends BaseCRUDJsonBodyMappingController<DeviceSe
deviceReq.setDeviceStatus(entity.getDeviceStatus());
Rest<String> rest = deviceFeign.deviceCall(deviceReq, token);
log.info("更新结果:{}", JSON.toJSONString(rest));
}
}*/
return super.saveAfter(entity, model, context);
}
......@@ -204,7 +204,7 @@ public class DeviceController extends BaseCRUDJsonBodyMappingController<DeviceSe
@Override
protected void deleteBefore(Long[] ids, Context context) throws AppException {
super.deleteBefore(ids, context);
String token = getToken();
/* String token = getToken();
DeviceQuery deviceQuery = new DeviceQuery();
deviceQuery.setIdList(Arrays.asList(ids));
List<DeviceEntity> deviceEntities = this.service.find(deviceQuery, context);
......@@ -214,7 +214,7 @@ public class DeviceController extends BaseCRUDJsonBodyMappingController<DeviceSe
deviceReq.setDeviceCode(entity.getDeviceCode());
Rest<String> rest = deviceFeign.deviceCall(deviceReq, token);
log.info("删除结果:{}", JSON.toJSONString(rest));
}
}*/
}
private String getToken() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment