Commit dd4a552c authored by helinlin's avatar helinlin

Merge remote-tracking branch 'origin/developer' into developer

parents 530283ec c5bf7cd2
......@@ -664,23 +664,26 @@ public class MaintenanceCompanyServiceImpl
* @return
*/
public MaintenanceCompany getMaintenanceCompany(String amosUserId) {
MaintenanceCompany maintenanceCompany;
DynamicFormInstance dyFormInstance = dynamicFormInstanceService.getOne(
new LambdaQueryWrapper<DynamicFormInstance>().eq(DynamicFormInstance::getFieldCode, "amosAccount")
.eq(DynamicFormInstance::getFieldValue, amosUserId));
if (ValidationUtil.isEmpty(dyFormInstance)) {
throw new BadRequest("维保账号不存在或未关联系统账号.");
}
MaintenanceCompany person = this.getOne(new LambdaQueryWrapper<MaintenanceCompany>()
.eq(MaintenanceCompany::getInstanceId, dyFormInstance.getInstanceId()));
if (ValidationUtil.isEmpty(person)) {
throw new BadRequest("维保账号不存在或未关联系统账号.");
}
maintenanceCompany = this.getOne(new LambdaQueryWrapper<MaintenanceCompany>()
.eq(MaintenanceCompany::getSequenceNbr, person.getParentId()));
LambdaQueryWrapper<MaintenanceCompany> wrapper = new LambdaQueryWrapper<MaintenanceCompany>();
wrapper.eq(MaintenanceCompany::getIsDelete, false);
wrapper.eq(MaintenanceCompany::getAmosId, amosUserId);
MaintenanceCompany maintenanceCompany = this.baseMapper.selectOne(wrapper);
// DynamicFormInstance dyFormInstance = dynamicFormInstanceService.getOne(
// new LambdaQueryWrapper<DynamicFormInstance>().eq(DynamicFormInstance::getFieldCode, "amosAccount")
// .eq(DynamicFormInstance::getFieldValue, amosUserId));
if (ValidationUtil.isEmpty(maintenanceCompany)) {
throw new BadRequest("维保账号不存在或未关联系统账号.");
}
// MaintenanceCompany person = this.getOne(new LambdaQueryWrapper<MaintenanceCompany>()
// .eq(MaintenanceCompany::getInstanceId, dyFormInstance.getInstanceId()));
// if (ValidationUtil.isEmpty(person)) {
// throw new BadRequest("维保账号不存在或未关联系统账号.");
// }
// maintenanceCompany = this.getOne(new LambdaQueryWrapper<MaintenanceCompany>()
// .eq(MaintenanceCompany::getSequenceNbr, person.getParentId()));
// if (ValidationUtil.isEmpty(maintenanceCompany)) {
// throw new BadRequest("维保账号不存在或未关联系统账号.");
// }
return maintenanceCompany;
}
......
......@@ -7,7 +7,9 @@ import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.boot.biz.common.utils.RedisKey;
import com.yeejoin.amos.boot.module.jcs.api.dto.FusionDto;
import com.yeejoin.amos.boot.module.jcs.api.dto.VoiceRecordFileDto;
import com.yeejoin.amos.boot.module.jcs.api.entity.AlertCalled;
import com.yeejoin.amos.boot.module.jcs.api.entity.VoiceRecordFile;
import com.yeejoin.amos.boot.module.jcs.api.service.IAlertCalledService;
import com.yeejoin.amos.boot.module.jcs.biz.service.impl.AlertCalledServiceImpl;
import com.yeejoin.amos.boot.module.jcs.biz.service.impl.FusionServiceImpl;
import com.yeejoin.amos.boot.module.jcs.biz.service.impl.VoiceRecordFileServiceImpl;
......@@ -23,7 +25,9 @@ import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
/**
......@@ -42,7 +46,8 @@ public class FusionController extends BaseController {
@Autowired
VoiceRecordFileServiceImpl voiceRecordFileService;
@Autowired
IAlertCalledService iAlertCalledService;
/**
* 查询用户详情
*
......@@ -63,29 +68,35 @@ public class FusionController extends BaseController {
*
* */
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "POST",value = "800M40M录音文件", notes = "800M40M录音文件")
@PostMapping (value = "/getCarList")
public ResponseModel<JSONObject> getCarList(
@RequestParam(value = "curPage", required = false) Integer curPage,
@RequestParam(value = "pageRows", required = false) Integer pageRows,
@RequestParam(value = "beginTime", required = false) String beginTime,
@RequestParam(value = "endTime", required = false) String endTime,
@RequestParam(value = "beginLongTime", required = false) String beginLongTime,
@RequestParam(value = "endLongTime", required = false) String endLongTime,
@RequestParam(value = "number", required = false) String number,
@RequestParam(value = "callType", required = false) Integer callType
@ApiOperation(httpMethod = "get",value = "800M40M录音文件", notes = "800M40M录音文件")
@GetMapping (value = "/getCarList/{id}")
public ResponseModel<JSONObject> getCarList( @PathVariable Long id
) {
JSONObject carList = fusionService.selectAudioVideoRecords( curPage,
pageRows,
beginTime,
endTime,
beginLongTime,
endLongTime,
number,
callType);
//获取警情
AlertCalled alertCalled=iAlertCalledService.getAlertCalledById(id);
SimpleDateFormat formatter= new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String beginTime=null;
String endTime=null;
//获取警情上报时间
beginTime=formatter.format(alertCalled.getCallTime());
if(alertCalled.getAlertStatus()){
endTime=formatter.format(alertCalled.getUpdateTime());
}else{
endTime=formatter.format(new Date());
}
JSONObject carList = fusionService.selectAudioVideoRecords( 1,
1000,
beginTime,
endTime,
null,
null,
null,
9);
return ResponseHelper.buildResponse(carList);
}
......
......@@ -139,7 +139,7 @@ public class FusionServiceImpl implements IFusionService {
JSONObject jsonObject = null;
try {
jsonObject = RestTemplateUtil.getRestInstance().postForObject(String.format("%s/selectAudioVideoRecords", voiceURL), requestEntity, JSONObject.class);
jsonObject = RestTemplateUtil.getRestInstance().postForObject(String.format("%s/selectCallRecordByConditions", voiceURL), requestEntity, JSONObject.class);
} catch (RestClientException e) {
e.printStackTrace();
throw new BadRequest("访问融合终端失败");
......
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