Commit 57b497a1 authored by zhangyingbin's avatar zhangyingbin

修改96333坐席逻辑

parent 4dd1d055
...@@ -19,12 +19,12 @@ public class TzsCitInfoDto extends BaseDto { ...@@ -19,12 +19,12 @@ public class TzsCitInfoDto extends BaseDto {
/** /**
* 用户名 * 用户名
*/ */
private String userName; private String ctiUserName;
@ApiModelProperty(value = "平台的userId") @ApiModelProperty(value = "平台的userId")
/** /**
* 平台的userId * 平台的userId
*/ */
private String userId; private String ctiUserId;
@ApiModelProperty(value = "登录坐席参数gid") @ApiModelProperty(value = "登录坐席参数gid")
/** /**
* 登录坐席参数gid * 登录坐席参数gid
...@@ -51,6 +51,13 @@ public class TzsCitInfoDto extends BaseDto { ...@@ -51,6 +51,13 @@ public class TzsCitInfoDto extends BaseDto {
*/ */
private String userRole; private String userRole;
/**
* 服务评分
*/
private String serviceSocre;
private Boolean isOnline;
} }
package com.yeejoin.amos.boot.module.tzs.api.entity; package com.yeejoin.amos.boot.module.tzs.api.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
...@@ -8,6 +10,8 @@ import lombok.EqualsAndHashCode; ...@@ -8,6 +10,8 @@ import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors; import lombok.experimental.Accessors;
import org.typroject.tyboot.core.rdbms.orm.entity.BaseEntity; import org.typroject.tyboot.core.rdbms.orm.entity.BaseEntity;
import java.io.Serializable;
/** /**
* *
* *
...@@ -15,7 +19,6 @@ import org.typroject.tyboot.core.rdbms.orm.entity.BaseEntity; ...@@ -15,7 +19,6 @@ import org.typroject.tyboot.core.rdbms.orm.entity.BaseEntity;
* @date 2022-12-19 * @date 2022-12-19
*/ */
@Data @Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true) @Accessors(chain = true)
@TableName("tzs_cit_info") @TableName("tzs_cit_info")
@ApiModel(value="TzsCitInfo对象", description="") @ApiModel(value="TzsCitInfo对象", description="")
...@@ -24,10 +27,10 @@ public class TzsCitInfo extends BaseEntity { ...@@ -24,10 +27,10 @@ public class TzsCitInfo extends BaseEntity {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "用户名") @ApiModelProperty(value = "用户名")
private String userName; private String ctiUserName;
@ApiModelProperty(value = "平台的userId") @ApiModelProperty(value = "平台的userId")
private String userId; private String ctiUserId;
@ApiModelProperty(value = "登录坐席参数gid") @ApiModelProperty(value = "登录坐席参数gid")
private String gid; private String gid;
......
...@@ -3,18 +3,7 @@ package com.yeejoin.amos.boot.module.tzs.api.service; ...@@ -3,18 +3,7 @@ package com.yeejoin.amos.boot.module.tzs.api.service;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledDto; import com.yeejoin.amos.boot.module.tzs.api.dto.*;
import com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledFormDto;
import com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledQueryDto;
import com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledRecordDto;
import com.yeejoin.amos.boot.module.tzs.api.dto.AlertHandlerDto;
import com.yeejoin.amos.boot.module.tzs.api.dto.AlertPaperInfoDto;
import com.yeejoin.amos.boot.module.tzs.api.dto.DutyPersonDto;
import com.yeejoin.amos.boot.module.tzs.api.dto.DutySeatDto;
import com.yeejoin.amos.boot.module.tzs.api.dto.WechatMyBusinessListDto;
import com.yeejoin.amos.boot.module.tzs.api.dto.WechatMyBussinessDto;
import com.yeejoin.amos.boot.module.tzs.api.dto.WechatMyTaskDto;
import com.yeejoin.amos.boot.module.tzs.api.dto.WechatMyTaskListDto;
import com.yeejoin.amos.boot.module.tzs.api.enums.DispatchPaperEnums; import com.yeejoin.amos.boot.module.tzs.api.enums.DispatchPaperEnums;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.typroject.tyboot.core.rdbms.annotation.Condition; import org.typroject.tyboot.core.rdbms.annotation.Condition;
...@@ -99,7 +88,7 @@ public interface IAlertCalledService { ...@@ -99,7 +88,7 @@ public interface IAlertCalledService {
* 获取坐席信息 * 获取坐席信息
* @return * @return
*/ */
List<DutySeatDto> getSeatInfos(); List<TzsCitInfoDto> getSeatInfos();
List<AlertPaperInfoDto> getEquipmentHistory(List<String> useRegionCode, String equipmentClassCode, Integer current, Integer pageNum, String equipmentCode); List<AlertPaperInfoDto> getEquipmentHistory(List<String> useRegionCode, String equipmentClassCode, Integer current, Integer pageNum, String equipmentCode);
......
...@@ -15,19 +15,7 @@ import com.yeejoin.amos.boot.biz.common.utils.RedisKey; ...@@ -15,19 +15,7 @@ import com.yeejoin.amos.boot.biz.common.utils.RedisKey;
import com.yeejoin.amos.boot.biz.common.utils.RedisUtils; import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
import com.yeejoin.amos.boot.module.common.api.excel.ExcelUtil; import com.yeejoin.amos.boot.module.common.api.excel.ExcelUtil;
import com.yeejoin.amos.boot.module.common.biz.service.impl.MaintenanceCompanyServiceImpl; import com.yeejoin.amos.boot.module.common.biz.service.impl.MaintenanceCompanyServiceImpl;
import com.yeejoin.amos.boot.module.tzs.api.dto.AlarmStatisticsDto; import com.yeejoin.amos.boot.module.tzs.api.dto.*;
import com.yeejoin.amos.boot.module.tzs.api.dto.AlertCallInfoDto;
import com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledDto;
import com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledObjsDto;
import com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledQueryDto;
import com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledRecordDto;
import com.yeejoin.amos.boot.module.tzs.api.dto.AlertPaperInfoDto;
import com.yeejoin.amos.boot.module.tzs.api.dto.DutySeatDto;
import com.yeejoin.amos.boot.module.tzs.api.dto.ESAlertCalledDto;
import com.yeejoin.amos.boot.module.tzs.api.dto.ESAlertCalledRequestDto;
import com.yeejoin.amos.boot.module.tzs.api.dto.ElevatorDto;
import com.yeejoin.amos.boot.module.tzs.api.dto.ExportDto;
import com.yeejoin.amos.boot.module.tzs.api.dto.SpecialEquipmentDto;
import com.yeejoin.amos.boot.module.tzs.api.entity.AlertCalled; import com.yeejoin.amos.boot.module.tzs.api.entity.AlertCalled;
import com.yeejoin.amos.boot.module.tzs.api.entity.DispatchPaper; import com.yeejoin.amos.boot.module.tzs.api.entity.DispatchPaper;
import com.yeejoin.amos.boot.module.tzs.api.entity.Elevator; import com.yeejoin.amos.boot.module.tzs.api.entity.Elevator;
...@@ -708,7 +696,7 @@ public class AlertCalledController extends BaseController { ...@@ -708,7 +696,7 @@ public class AlertCalledController extends BaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/getSeatInfos") @GetMapping(value = "/getSeatInfos")
@ApiOperation(httpMethod = "GET", value = "获取坐席情况", notes = "获取坐席情况") @ApiOperation(httpMethod = "GET", value = "获取坐席情况", notes = "获取坐席情况")
public ResponseModel<List<DutySeatDto>> getSeatInfos() { public ResponseModel<List<TzsCitInfoDto>> getSeatInfos() {
return ResponseHelper.buildResponse(iAlertCalledService.getSeatInfos()); return ResponseHelper.buildResponse(iAlertCalledService.getSeatInfos());
} }
......
...@@ -5,11 +5,15 @@ import java.util.HashMap; ...@@ -5,11 +5,15 @@ import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.yeejoin.amos.boot.module.tzs.api.entity.TzsCitInfo;
import com.yeejoin.amos.boot.module.tzs.biz.service.impl.TzsCitInfoServiceImpl;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import org.typroject.tyboot.core.foundation.enumeration.UserType; import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import org.typroject.tyboot.core.restful.doc.TycloudOperation; import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.restful.utils.ResponseHelper; import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel; import org.typroject.tyboot.core.restful.utils.ResponseModel;
...@@ -38,6 +42,9 @@ public class TzsAuthController extends BaseController { ...@@ -38,6 +42,9 @@ public class TzsAuthController extends BaseController {
@Autowired @Autowired
TzsAuthService tzsAuthService; TzsAuthService tzsAuthService;
@Autowired
TzsCitInfoServiceImpl citInfoService;
/** /**
* 判断用户是否是管理员 * 判断用户是否是管理员
* @return * @return
...@@ -48,8 +55,13 @@ public class TzsAuthController extends BaseController { ...@@ -48,8 +55,13 @@ public class TzsAuthController extends BaseController {
public ResponseModel<Boolean> isUserAdmin() { public ResponseModel<Boolean> isUserAdmin() {
Boolean flag = false; Boolean flag = false;
AgencyUserModel me = Privilege.agencyUserClient.getme().getResult(); AgencyUserModel me = Privilege.agencyUserClient.getme().getResult();
if(me.getUserName().equals("tzs_wjl")) { LambdaQueryWrapper<TzsCitInfo> wrapper = new LambdaQueryWrapper<>();
flag = true; wrapper.eq(TzsCitInfo::getCtiUserId,me.getUserId());
TzsCitInfo ctiInfo = citInfoService.getOne(wrapper);
if(!ValidationUtil.isEmpty(ctiInfo)){
if("班长".equals(ctiInfo.getUserRole())){
flag = true;
}
} }
return ResponseHelper.buildResponse(flag); return ResponseHelper.buildResponse(flag);
} }
......
...@@ -108,7 +108,7 @@ public class TzsCitInfoController extends BaseController { ...@@ -108,7 +108,7 @@ public class TzsCitInfoController extends BaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false) @TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@RequestMapping(value = "/list", method = RequestMethod.POST) @RequestMapping(value = "/list", method = RequestMethod.POST)
@ApiOperation(httpMethod = "POST", value = "列表分页查询", notes = "列表分页查询") @ApiOperation(httpMethod = "POST", value = "列表分页查询", notes = "列表分页查询")
public IPage<TzsCitInfo> listPage(String pageNum,String pageSize,@RequestBody TzsCitInfo tzsCitInfo){ public ResponseModel<IPage<TzsCitInfo>> listPage(String pageNum,String pageSize,@RequestBody TzsCitInfo tzsCitInfo){
tzsCitInfo.setRegionCode(this.getSelectedOrgInfo().getCompany().getRegionCode()); tzsCitInfo.setRegionCode(this.getSelectedOrgInfo().getCompany().getRegionCode());
Page<TzsCitInfo> pageBean; Page<TzsCitInfo> pageBean;
QueryWrapper<TzsCitInfo> tzsCitInfoQueryWrapper = new QueryWrapper<>(); QueryWrapper<TzsCitInfo> tzsCitInfoQueryWrapper = new QueryWrapper<>();
...@@ -144,7 +144,7 @@ public class TzsCitInfoController extends BaseController { ...@@ -144,7 +144,7 @@ public class TzsCitInfoController extends BaseController {
pageBean = new Page<>(Integer.parseInt(pageNum), Integer.parseInt(pageSize)); pageBean = new Page<>(Integer.parseInt(pageNum), Integer.parseInt(pageSize));
} }
page = iTzsCitInfoService.page(pageBean, tzsCitInfoQueryWrapper); page = iTzsCitInfoService.page(pageBean, tzsCitInfoQueryWrapper);
return page; return ResponseHelper.buildResponse(page);
} }
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false) @TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
......
...@@ -7,29 +7,14 @@ import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; ...@@ -7,29 +7,14 @@ import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.google.common.collect.Maps; import com.google.common.collect.Maps;
import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import com.yeejoin.amos.boot.biz.common.utils.DateUtils; import com.yeejoin.amos.boot.biz.common.utils.DateUtils;
import com.yeejoin.amos.boot.biz.common.utils.RedisKey; import com.yeejoin.amos.boot.biz.common.utils.RedisKey;
import com.yeejoin.amos.boot.biz.common.utils.RedisUtils; import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
import com.yeejoin.amos.boot.module.common.api.dto.AttachmentDto; import com.yeejoin.amos.boot.module.common.api.dto.AttachmentDto;
import com.yeejoin.amos.boot.module.common.api.service.ISourceFileService; import com.yeejoin.amos.boot.module.common.api.service.ISourceFileService;
import com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledDto; import com.yeejoin.amos.boot.module.tzs.api.dto.*;
import com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledFormDto; import com.yeejoin.amos.boot.module.tzs.api.entity.*;
import com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledObjsDto;
import com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledQueryDto;
import com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledRecordDto;
import com.yeejoin.amos.boot.module.tzs.api.dto.AlertHandlerDto;
import com.yeejoin.amos.boot.module.tzs.api.dto.AlertHandlerInfoDto;
import com.yeejoin.amos.boot.module.tzs.api.dto.AlertPaperInfoDto;
import com.yeejoin.amos.boot.module.tzs.api.dto.DutySeatDto;
import com.yeejoin.amos.boot.module.tzs.api.dto.FormValue;
import com.yeejoin.amos.boot.module.tzs.api.dto.WechatMyBusinessListDto;
import com.yeejoin.amos.boot.module.tzs.api.dto.WechatMyBussinessDto;
import com.yeejoin.amos.boot.module.tzs.api.entity.AlertCalled;
import com.yeejoin.amos.boot.module.tzs.api.entity.AlertFormValue;
import com.yeejoin.amos.boot.module.tzs.api.entity.DispatchPaper;
import com.yeejoin.amos.boot.module.tzs.api.entity.DispatchTask;
import com.yeejoin.amos.boot.module.tzs.api.entity.Elevator;
import com.yeejoin.amos.boot.module.tzs.api.entity.VoiceRecordFile;
import com.yeejoin.amos.boot.module.tzs.api.enums.AlertStageEnums; import com.yeejoin.amos.boot.module.tzs.api.enums.AlertStageEnums;
import com.yeejoin.amos.boot.module.tzs.api.enums.DispatchPaperEnums; import com.yeejoin.amos.boot.module.tzs.api.enums.DispatchPaperEnums;
import com.yeejoin.amos.boot.module.tzs.api.enums.TzsCommonParam; import com.yeejoin.amos.boot.module.tzs.api.enums.TzsCommonParam;
...@@ -42,6 +27,7 @@ import com.yeejoin.amos.feign.privilege.Privilege; ...@@ -42,6 +27,7 @@ import com.yeejoin.amos.feign.privilege.Privilege;
import com.yeejoin.amos.feign.privilege.model.AgencyUserModel; import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.Logger;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -112,6 +98,9 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall ...@@ -112,6 +98,9 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall
@Autowired @Autowired
TzsAuthService tzsAuthService; TzsAuthService tzsAuthService;
@Autowired
TzsCitInfoServiceImpl citInfoService;
@Value("${duty.seats.role.ids}") @Value("${duty.seats.role.ids}")
private String dutySeatsRoleIds; private String dutySeatsRoleIds;
...@@ -389,45 +378,59 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall ...@@ -389,45 +378,59 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall
} }
@Override @Override
public List<DutySeatDto> getSeatInfos() { public List<TzsCitInfoDto> getSeatInfos() {
// 获取人员信息 // 获取人员信息
// FeignClientResult<List<AgencyUserModel>> userListResult = Privilege.agencyUserClient.list(null,null); // FeignClientResult<List<AgencyUserModel>> userListResult = Privilege.agencyUserClient.list(null,null);
FeignClientResult<List<AgencyUserModel>> userListResult = Privilege.agencyUserClient.queryByRoleId(dutySeatsRoleIds,null); // FeignClientResult<List<AgencyUserModel>> userListResult = Privilege.agencyUserClient.queryByRoleId(dutySeatsRoleIds,null);
ReginParams reginParams = citInfoService.getReginParams();
List<AgencyUserModel> userList = userListResult.getResult(); String RegionCode = reginParams.getCompany().getRegionCode();
List<DutySeatDto> dutyList = new ArrayList<>(); LambdaQueryWrapper<TzsCitInfo> wrapper = new LambdaQueryWrapper<>();
userList.stream().forEach(u -> { wrapper.eq(TzsCitInfo::getRegionCode,RegionCode);
// 排除非系统中人员 List<TzsCitInfo> citInfoList = citInfoService.list(wrapper);
if(!u.getRealName().equals(u.getMobile())) { // 公众号创建 List<TzsCitInfoDto> citInfoDtoList = new ArrayList<>();
DutySeatDto temp = new DutySeatDto(); for(TzsCitInfo citInfo : citInfoList){
temp.setUserId(u.getUserId()); TzsCitInfoDto citInfoDto = new TzsCitInfoDto();
temp.setUserName(u.getRealName()); BeanUtils.copyProperties(citInfo, citInfoDto);
temp.setUserRole("管理员"); //服务评分写死100分
temp.setSeatCode("1001"); citInfoDto.setServiceSocre("100");
temp.setUserStatus("1"); //在线
// 获取当日警情处理件数 citInfoDto.setIsOnline(true);
Calendar c = Calendar.getInstance(); citInfoDtoList.add(citInfoDto);
c.set(Calendar.SECOND,0); }
c.set(Calendar.HOUR_OF_DAY,0); // List<AgencyUserModel> userList = userListResult.getResult();
c.set(Calendar.MINUTE,0); // List<DutySeatDto> dutyList = new ArrayList<>();
String beginDate = DateUtils.date2LongStr(c.getTime()); // userList.stream().forEach(u -> {
c.set(Calendar.SECOND,59); // // 排除非系统中人员
c.set(Calendar.HOUR_OF_DAY,23); // if(!u.getRealName().equals(u.getMobile())) { // 公众号创建
c.set(Calendar.MINUTE,59); // DutySeatDto temp = new DutySeatDto();
String endDate = DateUtils.date2LongStr(c.getTime()); // temp.setUserId(u.getUserId());
List<AlertCalled> dealAlert = this.list(new LambdaQueryWrapper<AlertCalled>().eq(AlertCalled::getIsDelete,false).eq(AlertCalled::getRecUserId,u.getUserId()) // temp.setUserName(u.getRealName());
.gt(AlertCalled::getCallTime,beginDate).lt(AlertCalled::getCallTime,endDate).eq(AlertCalled::getAlertStatus, true)); // temp.setUserRole("管理员");
int count = 0; // temp.setSeatCode("1001");
if(dealAlert != null && dealAlert.size() > 0) { // temp.setUserStatus("1");
count = dealAlert.size(); // // 获取当日警情处理件数
} // Calendar c = Calendar.getInstance();
temp.setTodayDeal(count); // c.set(Calendar.SECOND,0);
temp.setServiceSocre("95"); // c.set(Calendar.HOUR_OF_DAY,0);
dutyList.add(temp); // c.set(Calendar.MINUTE,0);
} // String beginDate = DateUtils.date2LongStr(c.getTime());
// c.set(Calendar.SECOND,59);
}); // c.set(Calendar.HOUR_OF_DAY,23);
return dutyList; // c.set(Calendar.MINUTE,59);
// String endDate = DateUtils.date2LongStr(c.getTime());
// List<AlertCalled> dealAlert = this.list(new LambdaQueryWrapper<AlertCalled>().eq(AlertCalled::getIsDelete,false).eq(AlertCalled::getRecUserId,u.getUserId())
// .gt(AlertCalled::getCallTime,beginDate).lt(AlertCalled::getCallTime,endDate).eq(AlertCalled::getAlertStatus, true));
// int count = 0;
// if(dealAlert != null && dealAlert.size() > 0) {
// count = dealAlert.size();
// }
// temp.setTodayDeal(count);
// temp.setServiceSocre("95");
// dutyList.add(temp);
// }
//
// });
return citInfoDtoList;
} }
private void dataInit(AlertHandlerInfoDto alertHandlerInfoDto, String process,String answerThePolice, String report, String notice, String arrive, String complete,String returnVisit) { private void dataInit(AlertHandlerInfoDto alertHandlerInfoDto, String process,String answerThePolice, String report, String notice, String arrive, String complete,String returnVisit) {
......
...@@ -2,11 +2,9 @@ package com.yeejoin.amos.boot.module.tzs.biz.service.impl; ...@@ -2,11 +2,9 @@ package com.yeejoin.amos.boot.module.tzs.biz.service.impl;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yeejoin.amos.boot.biz.common.bo.ReginParams; import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import com.yeejoin.amos.boot.biz.common.utils.RedisKey; import com.yeejoin.amos.boot.biz.common.utils.RedisKey;
import com.yeejoin.amos.boot.biz.common.utils.RedisUtils; import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
import com.yeejoin.amos.boot.module.tzs.api.dto.DutySeatDto;
import com.yeejoin.amos.boot.module.tzs.api.dto.TzsCitInfoDto; import com.yeejoin.amos.boot.module.tzs.api.dto.TzsCitInfoDto;
import com.yeejoin.amos.boot.module.tzs.api.entity.TzsCitInfo; import com.yeejoin.amos.boot.module.tzs.api.entity.TzsCitInfo;
import com.yeejoin.amos.boot.module.tzs.api.mapper.TzsCitInfoMapper; import com.yeejoin.amos.boot.module.tzs.api.mapper.TzsCitInfoMapper;
...@@ -71,10 +69,12 @@ public class TzsCitInfoServiceImpl extends BaseService<TzsCitInfoDto, TzsCitInfo ...@@ -71,10 +69,12 @@ public class TzsCitInfoServiceImpl extends BaseService<TzsCitInfoDto, TzsCitInfo
public String saveOrUpdateInfo(TzsCitInfo tzsCitInfo){ public String saveOrUpdateInfo(TzsCitInfo tzsCitInfo){
//校验 //校验
String massage = ""; String massage = "";
if(!ValidationUtil.isEmpty(tzsCitInfo.getUserId())) { if(ValidationUtil.isEmpty(tzsCitInfo.getSequenceNbr())) {
if (!ValidationUtil.isEmpty(this.list(new LambdaQueryWrapper<TzsCitInfo>().eq(TzsCitInfo::getUserId, tzsCitInfo.getUserId())))) { if (!ValidationUtil.isEmpty(tzsCitInfo.getCtiUserId())) {
massage = "该用户已有坐席账号,不可重复添加!"; if (!ValidationUtil.isEmpty(this.list(new LambdaQueryWrapper<TzsCitInfo>().eq(TzsCitInfo::getCtiUserId, tzsCitInfo.getCtiUserId())))) {
return massage; massage = "该用户已有坐席账号,不可重复添加!";
return massage;
}
} }
} }
if(!ValidationUtil.isEmpty(this.list(new LambdaQueryWrapper<TzsCitInfo>().eq(TzsCitInfo::getCode,tzsCitInfo.getCode())))){ if(!ValidationUtil.isEmpty(this.list(new LambdaQueryWrapper<TzsCitInfo>().eq(TzsCitInfo::getCode,tzsCitInfo.getCode())))){
...@@ -87,9 +87,9 @@ public class TzsCitInfoServiceImpl extends BaseService<TzsCitInfoDto, TzsCitInfo ...@@ -87,9 +87,9 @@ public class TzsCitInfoServiceImpl extends BaseService<TzsCitInfoDto, TzsCitInfo
} }
//保存数据 //保存数据
if(!ValidationUtil.isEmpty(tzsCitInfo.getUserId())) { if(!ValidationUtil.isEmpty(tzsCitInfo.getCtiUserId())) {
AgencyUserModel agencyUser = Privilege.agencyUserClient.queryByUserId(String.valueOf(tzsCitInfo.getUserId())).getResult(); AgencyUserModel agencyUser = Privilege.agencyUserClient.queryByUserId(String.valueOf(tzsCitInfo.getCtiUserId())).getResult();
tzsCitInfo.setUserName(agencyUser.getRealName()); tzsCitInfo.setCtiUserName(agencyUser.getRealName());
tzsCitInfo.setRegionCode(agencyUser.getCompanys().iterator().next().getCompanyCode()); tzsCitInfo.setRegionCode(agencyUser.getCompanys().iterator().next().getCompanyCode());
} }
this.saveOrUpdate(tzsCitInfo); this.saveOrUpdate(tzsCitInfo);
......
...@@ -377,7 +377,7 @@ class WeldServiceImpl extends BaseService<WeldDto, Weld, WeldMapper> implements ...@@ -377,7 +377,7 @@ class WeldServiceImpl extends BaseService<WeldDto, Weld, WeldMapper> implements
*/ */
public List<ProjectDto> getWeldListByLocation(Object obj){ public List<ProjectDto> getWeldListByLocation(Object obj){
JSONObject jsonObject = JSON.parseObject(String.valueOf(obj)); JSONObject jsonObject = JSON.parseObject(JSON.toJSONString(obj));
JSONObject left = jsonObject.getJSONObject("northeast"); JSONObject left = jsonObject.getJSONObject("northeast");
JSONObject right = jsonObject.getJSONObject("southwest"); JSONObject right = jsonObject.getJSONObject("southwest");
Double leftLongitude = left.getDouble("longitude"); Double leftLongitude = left.getDouble("longitude");
......
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