Commit a52291ba authored by chenzhao's avatar chenzhao

Merge branch 'developer' of http://39.98.45.134:8090/moa/amos-boot-biz into developer

# Conflicts: # amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/MonitorFanIndicatorImpl.java
parents 677f4b84 813fbbd3
package com.yeejoin.amos.boot.module.jxiop.api.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.yeejoin.amos.boot.biz.common.dto.BaseDto;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 设计信息
*
* @author system_generator
* @date 2023-07-14
*/
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value="DesignInformationDto", description="设计信息")
public class DesignInformationDto extends BaseDto {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "典型设计图信息")
private String typicalDiagram;
@ApiModelProperty(value = "组件排布图")
private String componentLayout;
@ApiModelProperty(value = "组件支架图")
private String componentBracket;
@ApiModelProperty(value = "组串接线图")
private String connectionLine;
@ApiModelProperty(value = "一次接线图")
private String onceLine;
@ApiModelProperty(value = "组件")
private String assembly;
@ApiModelProperty(value = "逆变器")
private String inverter;
@ApiModelProperty(value = "电表箱")
private String electricityMeter;
@ApiModelProperty(value = "支架")
private String support;
@ApiModelProperty(value = " 防滑雪措施")
private String antiSkiing;
@ApiModelProperty(value = " 防滑雪措施备注")
private String antiSkiingNotes;
@ApiModelProperty(value = " 抽检")
private String spotCheck;
@ApiModelProperty(value = " 抽检意见")
private String spotCheckOpinion;
@ApiModelProperty(value = "是否定制")
private String isokCustomized;
@ApiModelProperty(value = "是否加固")
private String windResistant;
@ApiModelProperty(value = "试点方案")
private String pilotProgram;
@ApiModelProperty(value = " s试点物料")
private String pilotMaterials;
@ApiModelProperty(value = "方位角")
private String azimuth;
@ApiModelProperty(value = "倾角")
private String dipAngle;
@ApiModelProperty(value = " 应用场景")
private String applicationScenario;
@ApiModelProperty(value = "应用场景数量")
private Integer applicationScenarioNum;
@ApiModelProperty(value = "支架方案")
private String supportScheme;
@ApiModelProperty(value = "支架方案数量")
private Integer supportSchemeNum;
@ApiModelProperty(value = "特殊方案")
private String specialPlan;
@ApiModelProperty(value = "特殊方案数量")
private Integer specialPlanNum;
@ApiModelProperty(value = "勘察表id")
private Long surveyInformationId;
}
package com.yeejoin.amos.boot.module.jxiop.api.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.yeejoin.amos.boot.biz.common.dto.BaseDto;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
*
*
* @author system_generator
* @date 2023-07-15
*/
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value="PowerStationDto", description="")
public class PowerStationDto extends BaseDto {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "电站编号")
private String powerStationCode;
@ApiModelProperty(value = "业主姓名")
private String ownersName;
@ApiModelProperty(value = "项目地址")
private String projectAddress;
@ApiModelProperty(value = "服务代理商")
private String serviceAgent;
@ApiModelProperty(value = "电站类型")
private String powerStationType;
@ApiModelProperty(value = "流程状态")
private String processStatus;
@ApiModelProperty(value = "设计审核状态")
private String designStatus;
@ApiModelProperty(value = "商务审核状态")
private String businessStatus;
@ApiModelProperty(value = "技术审核状态")
private String technologyStatus;
@ApiModelProperty(value = "流程id")
private String workflowId;
@ApiModelProperty(value = "农户id")
private String peasantHouseholdId;
}
package com.yeejoin.amos.boot.module.jxiop.api.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.util.Date;
/**
* 设计信息
*
* @author system_generator
* @date 2023-07-14
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("hygf_design_information")
public class DesignInformation extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
* 典型设计图信息
*/
@TableField("typical_diagram")
private String typicalDiagram;
/**
* 组件排布图
*/
@TableField("component_layout")
private String componentLayout;
/**
* 组件支架图
*/
@TableField("component_bracket")
private String componentBracket;
/**
* 组串接线图
*/
@TableField("connection_line")
private String connectionLine;
/**
* 一次接线图
*/
@TableField("once_line")
private String onceLine;
/**
* 组件
*/
@TableField("assembly")
private String assembly;
/**
* 逆变器
*/
@TableField("inverter")
private String inverter;
/**
* 电表箱
*/
@TableField("electricity_meter")
private String electricityMeter;
/**
* 支架
*/
@TableField("support")
private String support;
/**
* 防滑雪措施
*/
@TableField("anti_skiing")
private String antiSkiing;
/**
* 防滑雪措施备注
*/
@TableField("anti_skiing_notes")
private String antiSkiingNotes;
/**
* 抽检
*/
@TableField("spot_check")
private String spotCheck;
/**
* 抽检意见
*/
@TableField("spot_check_opinion")
private String spotCheckOpinion;
/**
* 是否定制
*/
@TableField("isok_customized")
private String isokCustomized;
/**
* 是否加固
*/
@TableField("wind_resistant")
private String windResistant;
/**
* 试点方案
*/
@TableField("pilot_program")
private String pilotProgram;
/**
* s试点物料
*/
@TableField("pilot_materials")
private String pilotMaterials;
/**
* 方位角
*/
@TableField("azimuth")
private String azimuth;
/**
* 倾角
*/
@TableField("dip_angle")
private String dipAngle;
/**
* 应用场景
*/
@TableField("application_scenario")
private String applicationScenario;
/**
* 应用场景数量
*/
@TableField("application_scenario_num")
private Integer applicationScenarioNum;
/**
* 支架方案
*/
@TableField("support_scheme")
private String supportScheme;
/**
* 支架方案数量
*/
@TableField("support_scheme_num")
private Integer supportSchemeNum;
/**
* 特殊方案
*/
@TableField("special_plan")
private String specialPlan;
/**
* 特殊方案数量
*/
@TableField("special_plan_num")
private Integer specialPlanNum;
/**
* 勘察表id
*/
@TableField("survey_information_id")
private Long surveyInformationId;
}
package com.yeejoin.amos.boot.module.jxiop.api.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.util.Date;
/**
*
*
* @author system_generator
* @date 2023-07-15
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("hygf_power_station")
public class PowerStation extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
* 电站编号
*/
@TableField("power_station_code")
private String powerStationCode;
/**
* 业主姓名
*/
@TableField("owners_name")
private String ownersName;
/**
* 项目地址
*/
@TableField("project_address")
private String projectAddress;
/**
* 服务代理商
*/
@TableField("service_agent")
private String serviceAgent;
/**
* 电站类型
*/
@TableField("power_station_type")
private String powerStationType;
/**
* 流程状态
*/
@TableField("process_status")
private String processStatus;
/**
* 设计审核状态
*/
@TableField("design_status")
private String designStatus;
/**
* 商务审核状态
*/
@TableField("business_status")
private String businessStatus;
/**
* 技术审核状态
*/
@TableField("technology_status")
private String technologyStatus;
/**
* 流程id
*/
@TableField("workflow_id")
private String workflowId;
/**
* 农户id
*/
@TableField("peasant_household_id")
private String peasantHouseholdId;
}
package com.yeejoin.amos.boot.module.jxiop.api.mapper;
import com.yeejoin.amos.boot.module.jxiop.api.entity.DesignInformation;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* 设计信息 Mapper 接口
*
* @author system_generator
* @date 2023-07-14
*/
public interface DesignInformationMapper extends BaseMapper<DesignInformation> {
}
package com.yeejoin.amos.boot.module.jxiop.api.mapper;
import com.yeejoin.amos.boot.module.jxiop.api.entity.PowerStation;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* Mapper 接口
*
* @author system_generator
* @date 2023-07-15
*/
public interface PowerStationMapper extends BaseMapper<PowerStation> {
}
package com.yeejoin.amos.boot.module.jxiop.api.service;
/**
* 设计信息接口类
*
* @author system_generator
* @date 2023-07-14
*/
public interface IDesignInformationService {
}
package com.yeejoin.amos.boot.module.jxiop.api.service;
/**
* 接口类
*
* @author system_generator
* @date 2023-07-15
*/
public interface IPowerStationService {
}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.amos.boot.module.jxiop.api.mapper.DesignInformationMapper">
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.amos.boot.module.jxiop.api.mapper.PowerStationMapper">
</mapper>
package com.yeejoin.amos.boot.module.jxiop.biz.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.RestController;
import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import java.util.List;
import com.yeejoin.amos.boot.module.jxiop.biz.service.impl.DesignInformationServiceImpl;
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
import org.springframework.beans.factory.annotation.Autowired;
import javax.servlet.http.HttpServletRequest;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.jxiop.api.dto.DesignInformationDto;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
/**
* 设计信息
*
* @author system_generator
* @date 2023-07-14
*/
@RestController
@Api(tags = "设计信息Api")
@RequestMapping(value = "/design-information")
public class DesignInformationController extends BaseController {
@Autowired
DesignInformationServiceImpl designInformationServiceImpl;
/**
* 新增设计信息
*
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@PostMapping(value = "/save")
@ApiOperation(httpMethod = "POST", value = "新增设计信息", notes = "新增设计信息")
public ResponseModel<DesignInformationDto> save(@RequestBody DesignInformationDto model) {
model = designInformationServiceImpl.createWithModel(model);
return ResponseHelper.buildResponse(model);
}
/**
* 根据sequenceNbr更新
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@PutMapping(value = "/{sequenceNbr}")
@ApiOperation(httpMethod = "PUT", value = "根据sequenceNbr更新设计信息", notes = "根据sequenceNbr更新设计信息")
public ResponseModel<DesignInformationDto> updateBySequenceNbrDesignInformation(@RequestBody DesignInformationDto model,@PathVariable(value = "sequenceNbr") Long sequenceNbr) {
model.setSequenceNbr(sequenceNbr);
return ResponseHelper.buildResponse(designInformationServiceImpl.updateWithModel(model));
}
/**
* 根据sequenceNbr删除
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@DeleteMapping(value = "/{sequenceNbr}")
@ApiOperation(httpMethod = "DELETE", value = "根据sequenceNbr删除设计信息", notes = "根据sequenceNbr删除设计信息")
public ResponseModel<Boolean> deleteBySequenceNbr(HttpServletRequest request, @PathVariable(value = "sequenceNbr") Long sequenceNbr){
return ResponseHelper.buildResponse(designInformationServiceImpl.removeById(sequenceNbr));
}
/**
* 根据sequenceNbr查询
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/{sequenceNbr}")
@ApiOperation(httpMethod = "GET",value = "根据sequenceNbr查询单个设计信息", notes = "根据sequenceNbr查询单个设计信息")
public ResponseModel<DesignInformationDto> selectOne(@PathVariable Long sequenceNbr) {
return ResponseHelper.buildResponse(designInformationServiceImpl.queryBySeq(sequenceNbr));
}
/**
* 列表分页查询
*
* @param current 当前页
* @param current 每页大小
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/page")
@ApiOperation(httpMethod = "GET",value = "设计信息分页查询", notes = "设计信息分页查询")
public ResponseModel<Page<DesignInformationDto>> queryForPage(@RequestParam(value = "current") int current,@RequestParam
(value = "size") int size) {
Page<DesignInformationDto> page = new Page<DesignInformationDto>();
page.setCurrent(current);
page.setSize(size);
return ResponseHelper.buildResponse(designInformationServiceImpl.queryForDesignInformationPage(page));
}
/**
* 列表全部数据查询
*
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET",value = "设计信息列表全部数据查询", notes = "设计信息列表全部数据查询")
@GetMapping(value = "/list")
public ResponseModel<List<DesignInformationDto>> selectForList() {
return ResponseHelper.buildResponse(designInformationServiceImpl.queryForDesignInformationList());
}
}
...@@ -67,29 +67,36 @@ public class PeasantHouseholdController extends BaseController { ...@@ -67,29 +67,36 @@ public class PeasantHouseholdController extends BaseController {
surveyInformationServiceImpl.createWithModel(surveyInformationDto); surveyInformationServiceImpl.createWithModel(surveyInformationDto);
JSONArray regionName = getRegionName(); JSONArray regionName = getRegionName();
List<RegionModel> list = JSONArray.parseArray(regionName.toJSONString(), RegionModel.class); List<RegionModel> list = JSONArray.parseArray(regionName.toJSONString(), RegionModel.class);
if(StringUtils.isEmpty(model.getProjectAddressName())){ // 处理项目地址
// 处理地址 String area = "";
String area = ""; for (Integer reg : model.getProjectAddress())
for (Integer reg : model.getProjectAddress()) for (RegionModel re : list) {
if (re.getRegionCode().equals(Integer.valueOf(reg))) {
area = area + re.getRegionName() + "/";
}
}
model.setProjectAddressName(area.substring(0, area.length() - 2));
if ("1".equals(model.getIsPermanent())) {
model.setPermanentAddress(model.getProjectAddress());
model.setPermanentAddressDetail(model.getProjectAddressDetail());
model.setPermanentAddressName(area.substring(0, area.length() - 2));
}else {
// 处理常住地址
String permanent = "";
for (Integer reg : model.getPermanentAddress())
for (RegionModel re : list) { for (RegionModel re : list) {
if (re.getRegionCode().equals(Integer.valueOf(reg))) { if (re.getRegionCode().equals(Integer.valueOf(reg))) {
area = area + re.getRegionName() + "/"; permanent = permanent + re.getRegionName() + "/";
} }
} }
model.setProjectAddressName(area.substring(0, area.length() - 2)+"/"+model.getProjectAddressDetail()); model.setPermanentAddressName(permanent.substring(0, permanent.length() - 2));
} }
if ("1".equals(model.getIsPermanent())) {
model.setPermanentAddress(model.getProjectAddress());
model.setPermanentAddressDetail(model.getProjectAddressDetail());
}
model.setSurveyInformationId(surveyInformationDto.getSequenceNbr()); model.setSurveyInformationId(surveyInformationDto.getSequenceNbr());
model.setSurveyOrNot(0); model.setSurveyOrNot(0);
model.setReview(0); model.setReview(0);
if(StringUtils.isEmpty(model.getDeveloperCode())){ model.setDeveloperCode(userInfo.getCompanys().get(0).getOrgCode());
model.setDeveloperCode(userInfo.getAgencyCode());
}
model.setDeveloperName(userInfo.getOrgNamesWithoutRole()); model.setDeveloperName(userInfo.getOrgNamesWithoutRole());
if(StringUtils.isEmpty(model.getDeveloper())){ if(StringUtils.isEmpty(model.getDeveloper())){
model.setDeveloper(userInfo.getRealName()); model.setDeveloper(userInfo.getRealName());
...@@ -192,7 +199,8 @@ public class PeasantHouseholdController extends BaseController { ...@@ -192,7 +199,8 @@ public class PeasantHouseholdController extends BaseController {
page.setCurrent(current); page.setCurrent(current);
page.setSize(size); page.setSize(size);
AgencyUserModel userInfo = getUserInfo(); AgencyUserModel userInfo = getUserInfo();
return ResponseHelper.buildResponse(peasantHouseholdServiceImpl.queryForPeasantHouseholdPage(page,userInfo.getAgencyCode(),ownersName)); String orgCode = userInfo.getCompanys().get(0).getOrgCode();
return ResponseHelper.buildResponse(peasantHouseholdServiceImpl.queryForPeasantHouseholdPage(page,orgCode,ownersName));
} }
/** /**
......
package com.yeejoin.amos.boot.module.jxiop.biz.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.RestController;
import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import java.util.List;
import com.yeejoin.amos.boot.module.jxiop.biz.service.impl.PowerStationServiceImpl;
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
import org.springframework.beans.factory.annotation.Autowired;
import javax.servlet.http.HttpServletRequest;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.jxiop.api.dto.PowerStationDto;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
/**
*
*
* @author system_generator
* @date 2023-07-15
*/
@RestController
@Api(tags = "Api")
@RequestMapping(value = "/power-station")
public class PowerStationController extends BaseController {
@Autowired
PowerStationServiceImpl powerStationServiceImpl;
/**
* 新增
*
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@PostMapping(value = "/save")
@ApiOperation(httpMethod = "POST", value = "新增", notes = "新增")
public ResponseModel<PowerStationDto> save(@RequestBody PowerStationDto model) {
model = powerStationServiceImpl.createWithModel(model);
return ResponseHelper.buildResponse(model);
}
/**
* 根据sequenceNbr更新
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@PutMapping(value = "/{sequenceNbr}")
@ApiOperation(httpMethod = "PUT", value = "根据sequenceNbr更新", notes = "根据sequenceNbr更新")
public ResponseModel<PowerStationDto> updateBySequenceNbrPowerStation(@RequestBody PowerStationDto model,@PathVariable(value = "sequenceNbr") Long sequenceNbr) {
model.setSequenceNbr(sequenceNbr);
return ResponseHelper.buildResponse(powerStationServiceImpl.updateWithModel(model));
}
/**
* 根据sequenceNbr删除
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@DeleteMapping(value = "/{sequenceNbr}")
@ApiOperation(httpMethod = "DELETE", value = "根据sequenceNbr删除", notes = "根据sequenceNbr删除")
public ResponseModel<Boolean> deleteBySequenceNbr(HttpServletRequest request, @PathVariable(value = "sequenceNbr") Long sequenceNbr){
return ResponseHelper.buildResponse(powerStationServiceImpl.removeById(sequenceNbr));
}
/**
* 根据sequenceNbr查询
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/{sequenceNbr}")
@ApiOperation(httpMethod = "GET",value = "根据sequenceNbr查询单个", notes = "根据sequenceNbr查询单个")
public ResponseModel<PowerStationDto> selectOne(@PathVariable Long sequenceNbr) {
return ResponseHelper.buildResponse(powerStationServiceImpl.queryBySeq(sequenceNbr));
}
/**
* 列表分页查询
*
* @param current 当前页
* @param current 每页大小
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/page")
@ApiOperation(httpMethod = "GET",value = "分页查询", notes = "分页查询")
public ResponseModel<Page<PowerStationDto>> queryForPage(@RequestParam(value = "current") int current,@RequestParam
(value = "size") int size) {
Page<PowerStationDto> page = new Page<PowerStationDto>();
page.setCurrent(current);
page.setSize(size);
return ResponseHelper.buildResponse(powerStationServiceImpl.queryForPowerStationPage(page));
}
/**
* 列表全部数据查询
*
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET",value = "列表全部数据查询", notes = "列表全部数据查询")
@GetMapping(value = "/list")
public ResponseModel<List<PowerStationDto>> selectForList() {
return ResponseHelper.buildResponse(powerStationServiceImpl.queryForPowerStationList());
}
}
package com.yeejoin.amos.boot.module.hygf.biz.controller; package com.yeejoin.amos.boot.module.hygf.biz.controller;
import com.yeejoin.amos.boot.module.hygf.api.dto.SurveyInfoAllDto; import com.yeejoin.amos.boot.module.hygf.api.dto.SurveyInfoAllDto;
import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
...@@ -138,8 +139,8 @@ public class SurveyInformationController extends BaseController { ...@@ -138,8 +139,8 @@ public class SurveyInformationController extends BaseController {
@ApiOperation(httpMethod = "GET",value = "勘察信息编辑", notes = "勘察信息编辑") @ApiOperation(httpMethod = "GET",value = "勘察信息编辑", notes = "勘察信息编辑")
@GetMapping(value = "/surveyQuery") @GetMapping(value = "/surveyQuery")
public ResponseModel<SurveyInfoAllDto> surveyQuery(@RequestParam String surveyInformationId) { public ResponseModel<SurveyInfoAllDto> surveyQuery(@RequestParam String surveyInformationId) {
AgencyUserModel userInfo = getUserInfo();
SurveyInfoAllDto returnDto = surveyInformationServiceImpl.querySurveyInfo(surveyInformationId); SurveyInfoAllDto returnDto = surveyInformationServiceImpl.querySurveyInfo(surveyInformationId,userInfo);
return ResponseHelper.buildResponse(returnDto); return ResponseHelper.buildResponse(returnDto);
} }
} }
package com.yeejoin.amos.boot.module.jxiop.biz.service.impl;
import com.yeejoin.amos.boot.module.jxiop.api.entity.DesignInformation;
import com.yeejoin.amos.boot.module.jxiop.api.mapper.DesignInformationMapper;
import com.yeejoin.amos.boot.module.jxiop.api.service.IDesignInformationService;
import com.yeejoin.amos.boot.module.jxiop.api.dto.DesignInformationDto;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import java.util.List;
/**
* 设计信息服务实现类
*
* @author system_generator
* @date 2023-07-14
*/
@Service
public class DesignInformationServiceImpl extends BaseService<DesignInformationDto,DesignInformation,DesignInformationMapper> implements IDesignInformationService {
/**
* 分页查询
*/
public Page<DesignInformationDto> queryForDesignInformationPage(Page<DesignInformationDto> page) {
return this.queryForPage(page, null, false);
}
/**
* 列表查询 示例
*/
public List<DesignInformationDto> queryForDesignInformationList() {
return this.queryForList("" , false);
}
}
\ No newline at end of file
...@@ -71,7 +71,7 @@ public class PeasantHouseholdServiceImpl extends BaseService<PeasantHouseholdDto ...@@ -71,7 +71,7 @@ public class PeasantHouseholdServiceImpl extends BaseService<PeasantHouseholdDto
* 分页查询 * 分页查询
*/ */
public Page<PeasantHouseholdDto> queryForPeasantHouseholdPage(Page<PeasantHouseholdDto> page,String developerCode,@Condition(Operator.like) String ownersName) { public Page<PeasantHouseholdDto> queryForPeasantHouseholdPage(Page<PeasantHouseholdDto> page,String developerCode,@Condition(Operator.like) String ownersName) {
Page<PeasantHouseholdDto> peasantHouseholdDtoPage = this.queryForPage(page, null, false,developerCode,ownersName); Page<PeasantHouseholdDto> peasantHouseholdDtoPage = this.queryForPage(page, "rec_date", false,developerCode,ownersName);
List<PeasantHouseholdDto> records = peasantHouseholdDtoPage.getRecords(); List<PeasantHouseholdDto> records = peasantHouseholdDtoPage.getRecords();
List<PeasantHouseholdDto> newRecords = records.stream().map(item -> { List<PeasantHouseholdDto> newRecords = records.stream().map(item -> {
if (item.getSurveyOrNot() == 0) { if (item.getSurveyOrNot() == 0) {
......
package com.yeejoin.amos.boot.module.jxiop.biz.service.impl;
import com.yeejoin.amos.boot.module.jxiop.api.entity.PowerStation;
import com.yeejoin.amos.boot.module.jxiop.api.mapper.PowerStationMapper;
import com.yeejoin.amos.boot.module.jxiop.api.service.IPowerStationService;
import com.yeejoin.amos.boot.module.jxiop.api.dto.PowerStationDto;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import java.util.List;
/**
* 服务实现类
*
* @author system_generator
* @date 2023-07-15
*/
@Service
public class PowerStationServiceImpl extends BaseService<PowerStationDto,PowerStation,PowerStationMapper> implements IPowerStationService {
/**
* 分页查询
*/
public Page<PowerStationDto> queryForPowerStationPage(Page<PowerStationDto> page) {
return this.queryForPage(page, null, false);
}
/**
* 列表查询 示例
*/
public List<PowerStationDto> queryForPowerStationList() {
return this.queryForList("" , false);
}
}
\ No newline at end of file
...@@ -11,6 +11,7 @@ import com.yeejoin.amos.boot.module.hygf.api.mapper.SurveyInformationMapper; ...@@ -11,6 +11,7 @@ import com.yeejoin.amos.boot.module.hygf.api.mapper.SurveyInformationMapper;
import com.yeejoin.amos.boot.module.hygf.api.service.ISurveyInformationService; import com.yeejoin.amos.boot.module.hygf.api.service.ISurveyInformationService;
import com.yeejoin.amos.boot.module.hygf.api.util.BeanDtoUtils; import com.yeejoin.amos.boot.module.hygf.api.util.BeanDtoUtils;
import com.yeejoin.amos.component.feign.model.FeignClientResult; import com.yeejoin.amos.component.feign.model.FeignClientResult;
import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
import com.yeejoin.amos.feign.systemctl.Systemctl; import com.yeejoin.amos.feign.systemctl.Systemctl;
import com.yeejoin.amos.feign.systemctl.model.RegionModel; import com.yeejoin.amos.feign.systemctl.model.RegionModel;
import org.apache.commons.beanutils.ConvertUtils; import org.apache.commons.beanutils.ConvertUtils;
...@@ -24,6 +25,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; ...@@ -24,6 +25,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.Collection; import java.util.Collection;
import java.util.Date;
import java.util.List; import java.util.List;
/** /**
...@@ -157,7 +159,7 @@ public class SurveyInformationServiceImpl extends BaseService<SurveyInformationD ...@@ -157,7 +159,7 @@ public class SurveyInformationServiceImpl extends BaseService<SurveyInformationD
return surveyInfoAllDto; return surveyInfoAllDto;
} }
public SurveyInfoAllDto querySurveyInfo(String surveyInformationId) { public SurveyInfoAllDto querySurveyInfo(String surveyInformationId,AgencyUserModel userInfo) {
SurveyInfoAllDto surveyInfoAllDto = new SurveyInfoAllDto(); SurveyInfoAllDto surveyInfoAllDto = new SurveyInfoAllDto();
...@@ -170,6 +172,11 @@ public class SurveyInformationServiceImpl extends BaseService<SurveyInformationD ...@@ -170,6 +172,11 @@ public class SurveyInformationServiceImpl extends BaseService<SurveyInformationD
peasantHouseholdQueryWrapper.eq("survey_information_id", surveyInformationId); peasantHouseholdQueryWrapper.eq("survey_information_id", surveyInformationId);
PeasantHousehold peasantHousehold = peasantHouseholdServiceImpl.getBaseMapper().selectOne(peasantHouseholdQueryWrapper); PeasantHousehold peasantHousehold = peasantHouseholdServiceImpl.getBaseMapper().selectOne(peasantHouseholdQueryWrapper);
BeanUtils.copyProperties(peasantHousehold, surveyInfoAllDto.getSurveyInformation()); BeanUtils.copyProperties(peasantHousehold, surveyInfoAllDto.getSurveyInformation());
surveyInfoAllDto.getSurveyInformation().setDeveloperName(userInfo.getCompanys().get(0).getCompanyName());
surveyInfoAllDto.getSurveyInformation().setDeveloperCode(userInfo.getCompanys().get(0).getOrgCode());
surveyInfoAllDto.getSurveyInformation().setSalesmanId(userInfo.getUserId());
surveyInfoAllDto.getSurveyInformation().setSalesman(userInfo.getRealName());
surveyInfoAllDto.getSurveyInformation().setCreator(userInfo.getRealName());
if (!StringUtils.isEmpty(peasantHousehold.getProjectAddressName())) { if (!StringUtils.isEmpty(peasantHousehold.getProjectAddressName())) {
surveyInfoAllDto.getSurveyInformation().setProjectAddressText(Arrays.asList(peasantHousehold.getProjectAddressName().split("/"))); surveyInfoAllDto.getSurveyInformation().setProjectAddressText(Arrays.asList(peasantHousehold.getProjectAddressName().split("/")));
} }
...@@ -181,8 +188,9 @@ public class SurveyInformationServiceImpl extends BaseService<SurveyInformationD ...@@ -181,8 +188,9 @@ public class SurveyInformationServiceImpl extends BaseService<SurveyInformationD
surveyInfoAllDto.getSurveyInformation().setPermanentAddress(peasantHousehold.getProjectAddress()); surveyInfoAllDto.getSurveyInformation().setPermanentAddress(peasantHousehold.getProjectAddress());
surveyInfoAllDto.getSurveyInformation().setIsPermanent("1"); surveyInfoAllDto.getSurveyInformation().setIsPermanent("1");
} }
surveyInfoAllDto.getSurveyInformation().setSequenceNbr(surveyInformation.getSequenceNbr());
surveyInfoAllDto.getSurveyInformation().setSequenceNbr(surveyInformation.getSequenceNbr());
surveyInfoAllDto.getSurveyInformation().setCreatorTime(new Date());
QueryWrapper<SurveyDetails> surveyDetailsQueryWrapper = new QueryWrapper<>(); QueryWrapper<SurveyDetails> surveyDetailsQueryWrapper = new QueryWrapper<>();
surveyDetailsQueryWrapper.eq("survey_information_id", surveyInformationId); surveyDetailsQueryWrapper.eq("survey_information_id", surveyInformationId);
SurveyDetails surveyDetails = surveyDetailsService.getBaseMapper().selectOne(surveyDetailsQueryWrapper); SurveyDetails surveyDetails = surveyDetailsService.getBaseMapper().selectOne(surveyDetailsQueryWrapper);
...@@ -206,7 +214,10 @@ public class SurveyInformationServiceImpl extends BaseService<SurveyInformationD ...@@ -206,7 +214,10 @@ public class SurveyInformationServiceImpl extends BaseService<SurveyInformationD
commercialQueryWrapper.eq("survey_information_id", surveyInformationId); commercialQueryWrapper.eq("survey_information_id", surveyInformationId);
Commercial commercial = commercialService.getBaseMapper().selectOne(commercialQueryWrapper); Commercial commercial = commercialService.getBaseMapper().selectOne(commercialQueryWrapper);
if(information == null){ if(information == null){
surveyInfoAllDto.setCommercial(new CommercialDto()); CommercialDto commercialDto = new CommercialDto();
commercialDto.setType("zrr");
commercialDto.setLegalType("zjdnhw");
surveyInfoAllDto.setCommercial(commercialDto);
}else { }else {
surveyInfoAllDto.setCommercial(BeanDtoUtils.convert(commercial, CommercialDto.class)); surveyInfoAllDto.setCommercial(BeanDtoUtils.convert(commercial, CommercialDto.class));
if(commercial !=null && !StringUtils.isEmpty(commercial.getProjectAddressName())){ if(commercial !=null && !StringUtils.isEmpty(commercial.getProjectAddressName())){
......
...@@ -39,4 +39,7 @@ public class MapRegionDto extends BaseDto { ...@@ -39,4 +39,7 @@ public class MapRegionDto extends BaseDto {
@ApiModelProperty(value = "片区中心点") @ApiModelProperty(value = "片区中心点")
private CameraInfo cameraInfo; private CameraInfo cameraInfo;
@ApiModelProperty(value = "片区code")
private String areaCode;
} }
...@@ -27,6 +27,9 @@ public class StationInfoDto { ...@@ -27,6 +27,9 @@ public class StationInfoDto {
@ApiModelProperty(value ="场站id") @ApiModelProperty(value ="场站id")
private Long stationId; private Long stationId;
@ApiModelProperty(value ="平台id")
private String platformStationId;
@ApiModelProperty(value = "场站名称") @ApiModelProperty(value = "场站名称")
private String stationName; private String stationName;
......
...@@ -13,6 +13,9 @@ public class StationRecordInfo { ...@@ -13,6 +13,9 @@ public class StationRecordInfo {
@ApiModelProperty(value = "场站id") @ApiModelProperty(value = "场站id")
private Long stationId; private Long stationId;
@ApiModelProperty(value = "平台id")
private String platformStationId;
@ApiModelProperty(value = "场站名称") @ApiModelProperty(value = "场站名称")
private String stationName; private String stationName;
......
...@@ -17,7 +17,7 @@ import java.util.Date; ...@@ -17,7 +17,7 @@ import java.util.Date;
@Data @Data
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
@Accessors(chain = true) @Accessors(chain = true)
@TableName("indicator") @TableName("map_indicator")
public class Indicator extends BaseEntity { public class Indicator extends BaseEntity {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
......
...@@ -54,4 +54,10 @@ public class MapRegion extends BaseEntity { ...@@ -54,4 +54,10 @@ public class MapRegion extends BaseEntity {
*/ */
@TableField(value = "cameraInfo", typeHandler = FastjsonTypeHandler.class) @TableField(value = "cameraInfo", typeHandler = FastjsonTypeHandler.class)
private CameraInfo cameraInfo; private CameraInfo cameraInfo;
/**
* 片区文字显示的省份
*/
@TableField("area_code")
private String areaCode;
} }
...@@ -17,7 +17,7 @@ import java.util.Date; ...@@ -17,7 +17,7 @@ import java.util.Date;
*/ */
@Data @Data
@Accessors(chain = true) @Accessors(chain = true)
@TableName(value = "monitor_fan_indicator" ,autoResultMap = true) @TableName(value = "monitor_fan_indicator_copy3" ,autoResultMap = true)
public class MonitorFanIndicator extends BaseEntity { public class MonitorFanIndicator extends BaseEntity {
......
...@@ -37,4 +37,8 @@ public interface MonitorFanIndicatorMapper extends BaseMapper<MonitorFanIndicato ...@@ -37,4 +37,8 @@ public interface MonitorFanIndicatorMapper extends BaseMapper<MonitorFanIndicato
List<Map<String, String>> getFanConfigPower(@Param("gatewayId") String gatewayId); List<Map<String, String>> getFanConfigPower(@Param("gatewayId") String gatewayId);
List<Map<String, String>> getBoosterStationInfo(@Param("gatewayId") String gatewayId); List<Map<String, String>> getBoosterStationInfo(@Param("gatewayId") String gatewayId);
List<Map<String, String>> getMajorBoosterStationInfo(@Param("gatewayId") String gatewayId,
@Param("sortType") String sortType,
@Param("size") Integer size);
} }
...@@ -94,9 +94,9 @@ ...@@ -94,9 +94,9 @@
`sequence_nbr` as id, `sequence_nbr` as id,
`gateway_id` as gatewayId, `gateway_id` as gatewayId,
`booster_name` as text, `booster_name` as text,
booster_name as value, booster_name as boosterName,
<!-- `booster_code` as value,--> `booster_code` as boosterCode,
`sort` as sort `sort` as value
from booster_station_info from booster_station_info
<where> <where>
<if test="gatewayId != null and gatewayId != ''"> <if test="gatewayId != null and gatewayId != ''">
...@@ -111,4 +111,22 @@ ...@@ -111,4 +111,22 @@
</where> </where>
ORDER BY sort ASC ORDER BY sort ASC
</select> </select>
<select id="getMajorBoosterStationInfo" resultType="java.util.Map">
select
`sequence_nbr` as id,
`gateway_id` as gatewayId,
`booster_name` as text,
booster_name as boosterName,
`booster_code` as boosterCode,
`sort` as value
from booster_station_info
<where>
<if test="gatewayId != null and gatewayId != ''">
AND gateway_id = #{gatewayId}
</if>
</where>
ORDER BY major_sort ${sortType}
limit #{size}
</select>
</mapper> </mapper>
...@@ -108,6 +108,7 @@ ...@@ -108,6 +108,7 @@
<select id="getStationList" resultType="com.yeejoin.amos.boot.module.jxiop.api.dto.StationRecordInfo"> <select id="getStationList" resultType="com.yeejoin.amos.boot.module.jxiop.api.dto.StationRecordInfo">
select select
station_basic.sequence_nbr stationId, station_basic.sequence_nbr stationId,
station_basic.platform_station_id platformStationId,
station_basic.station_name stationName , station_basic.station_name stationName ,
station_basic.station_type stationType, station_basic.station_type stationType,
station_basic.station_flag stationFlag, station_basic.station_flag stationFlag,
......
...@@ -172,7 +172,7 @@ public class StationBasicController extends BaseController { ...@@ -172,7 +172,7 @@ public class StationBasicController extends BaseController {
* *
* @return * @return
*/ */
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false)
@ApiOperation(httpMethod = "GET", value = "场站地图数据", notes = "场站地图数据") @ApiOperation(httpMethod = "GET", value = "场站地图数据", notes = "场站地图数据")
@GetMapping(value = "/listforMap") @GetMapping(value = "/listforMap")
public ResponseModel<List<StationInfoDto>> getStationList(@RequestParam(value = "areaCode", required = false) String areaCode,@RequestParam(value = "type", required = false,defaultValue = "qj") String type) { public ResponseModel<List<StationInfoDto>> getStationList(@RequestParam(value = "areaCode", required = false) String areaCode,@RequestParam(value = "type", required = false,defaultValue = "qj") String type) {
......
...@@ -311,6 +311,7 @@ public class StationBasicServiceImpl extends BaseService<StationBasicDto, Statio ...@@ -311,6 +311,7 @@ public class StationBasicServiceImpl extends BaseService<StationBasicDto, Statio
list.forEach(stationRecordInfo -> { list.forEach(stationRecordInfo -> {
StationInfoDto stationInfoDto = new StationInfoDto(); StationInfoDto stationInfoDto = new StationInfoDto();
stationInfoDto.setStationId(stationRecordInfo.getStationId()); stationInfoDto.setStationId(stationRecordInfo.getStationId());
stationInfoDto.setPlatformStationId(stationRecordInfo.getPlatformStationId());
stationInfoDto.setStationName(stationRecordInfo.getStationName()); stationInfoDto.setStationName(stationRecordInfo.getStationName());
stationInfoDto.setType(stationRecordInfo.getStationType()); stationInfoDto.setType(stationRecordInfo.getStationType());
//url 暂时写死 //url 暂时写死
......
...@@ -20,6 +20,7 @@ import io.swagger.annotations.ApiOperation; ...@@ -20,6 +20,7 @@ import io.swagger.annotations.ApiOperation;
import org.elasticsearch.index.Index; import org.elasticsearch.index.Index;
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.scheduling.annotation.Scheduled;
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.RequestParam; import org.springframework.web.bind.annotation.RequestParam;
...@@ -332,7 +333,7 @@ public class MonitorFanIdxController extends BaseController { ...@@ -332,7 +333,7 @@ public class MonitorFanIdxController extends BaseController {
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
@ApiOperation(value = "获取升压站信息 通过排序等") @ApiOperation(value = "获取升压站信息 通过排序等")
@GetMapping("/getBoosterStationInfo") @GetMapping("/getBoosterStationInfo")
public ResponseModel<List<Map<String, String>>> getBoosterStationInfo(@RequestParam(value = "stationId", required = false) String stationId) { public ResponseModel<List<Map<String, String>>> getBoosterStationInfo(@RequestParam(value = "stationId", required = false) String stationId) {
...@@ -362,6 +363,33 @@ public class MonitorFanIdxController extends BaseController { ...@@ -362,6 +363,33 @@ public class MonitorFanIdxController extends BaseController {
return ResponseHelper.buildResponse(resultsData); return ResponseHelper.buildResponse(resultsData);
} }
// @Scheduled(cron = "0/10 * * * * ? ")
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
@ApiOperation(value = "模拟量列表消息")
@GetMapping("/getAnalogQuantityInfo")
public ResponseModel getAnalogQuantityInfo() {
LambdaQueryWrapper<StationBasic> wrapper = new LambdaQueryWrapper<>();
List<StationBasic> stationBasics = stationBasicMapper.selectList(wrapper);
for (StationBasic stationBasic : stationBasics) {
String gatewayId = stationBasic.getBoosterGatewayId();
monitorFanIndicator.getAnalogQuantityInfo(gatewayId, stationBasic.getSequenceNbr().toString());
}
return CommonResponseUtil.success();
}
// @Scheduled(cron = "0/10 * * * * ? ")
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
@ApiOperation(value = "升压站主屏消息接口")
@GetMapping("/getMajorAnalogQuantityByPage")
public ResponseModel getMajorAnalogQuantityByPage() {
LambdaQueryWrapper<StationBasic> wrapper = new LambdaQueryWrapper<>();
List<StationBasic> stationBasics = stationBasicMapper.selectList(wrapper);
for (StationBasic stationBasic : stationBasics) {
String gatewayId = stationBasic.getBoosterGatewayId();
monitorFanIndicator.getMajorAnalogQuantityByPage(gatewayId, stationBasic.getSequenceNbr().toString());
}
return CommonResponseUtil.success();
}
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY) @TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
@ApiOperation(value = "故障记录API") @ApiOperation(value = "故障记录API")
......
...@@ -26,6 +26,7 @@ public class IndicatorsDto { ...@@ -26,6 +26,7 @@ public class IndicatorsDto {
private String distinct; private String distinct;
private String time; private String time;
private String displayName; private String displayName;
private String title;
public String getTime() { public String getTime() {
......
package com.yeejoin.amos.boot.module.tzs.api.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
/**
* 96333坐席信息
*/
@Data
@Accessors(chain = true)
@ApiModel(value = "CtiUserDto", description = "坐席信息")
public class CtiUserDto {
@ApiModelProperty(value = "坐席对应主叫号码")
private String callerNo;
}
...@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.tzs.api.service; ...@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.tzs.api.service;
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.yeejoin.amos.boot.module.tzs.api.dto.CtiUserDto;
import java.util.Map; import java.util.Map;
...@@ -48,5 +49,5 @@ public interface ICtiService { ...@@ -48,5 +49,5 @@ public interface ICtiService {
/** /**
* 根据坐席配置获取主叫号码 * 根据坐席配置获取主叫号码
*/ */
String getCallPhone(); CtiUserDto getCallPhone(String userId);
} }
...@@ -2,10 +2,13 @@ package com.yeejoin.amos.boot.module.tzs.biz.controller; ...@@ -2,10 +2,13 @@ package com.yeejoin.amos.boot.module.tzs.biz.controller;
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import com.yeejoin.amos.boot.biz.common.controller.BaseController; import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.boot.module.common.biz.utils.CommonResponseUtil; import com.yeejoin.amos.boot.module.common.biz.utils.CommonResponseUtil;
import com.yeejoin.amos.boot.module.tzs.api.dto.CtiDto; import com.yeejoin.amos.boot.module.tzs.api.dto.CtiDto;
import com.yeejoin.amos.boot.module.tzs.api.dto.CtiUserDto;
import com.yeejoin.amos.boot.module.tzs.api.service.ICtiService; import com.yeejoin.amos.boot.module.tzs.api.service.ICtiService;
import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -110,8 +113,9 @@ public class CtiController extends BaseController { ...@@ -110,8 +113,9 @@ public class CtiController extends BaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/callPhone") @GetMapping(value = "/callPhone")
@ApiOperation(httpMethod = "GET", value = "获取坐席技能组对应主叫号码信息", notes = "获取坐席技能组对应主叫号码信息") @ApiOperation(httpMethod = "GET", value = "获取坐席技能组对应主叫号码信息", notes = "获取坐席技能组对应主叫号码信息")
public ResponseModel<String> getCallPhone() { public ResponseModel<CtiUserDto> getCallPhone() {
String callPhone = ctiService.getCallPhone(); ReginParams reginParams = getSelectedOrgInfo();
return ResponseHelper.buildResponse(callPhone); AgencyUserModel loginUserModel = reginParams.getUserModel();
return ResponseHelper.buildResponse(ctiService.getCallPhone(loginUserModel.getUserId()));
} }
} }
...@@ -9,6 +9,7 @@ import com.yeejoin.amos.boot.biz.common.enums.DictTypeEnum; ...@@ -9,6 +9,7 @@ import com.yeejoin.amos.boot.biz.common.enums.DictTypeEnum;
import com.yeejoin.amos.boot.biz.common.service.impl.DataDictionaryServiceImpl; import com.yeejoin.amos.boot.biz.common.service.impl.DataDictionaryServiceImpl;
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.CtiUserDto;
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.service.ICtiService; import com.yeejoin.amos.boot.module.tzs.api.service.ICtiService;
import com.yeejoin.amos.boot.module.tzs.biz.utils.HttpUtils; import com.yeejoin.amos.boot.module.tzs.biz.utils.HttpUtils;
...@@ -236,16 +237,19 @@ public class CtiServiceImpl implements ICtiService { ...@@ -236,16 +237,19 @@ public class CtiServiceImpl implements ICtiService {
} }
@Override @Override
public String getCallPhone() { public CtiUserDto getCallPhone(String userId) {
AgencyUserModel me = Privilege.agencyUserClient.getme().getResult(); CtiUserDto ctiUserDto = new CtiUserDto();
if (ValidationUtil.isEmpty(userId)) {
return ctiUserDto;
}
LambdaQueryWrapper<TzsCitInfo> wrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<TzsCitInfo> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(TzsCitInfo::getCtiUserId,me.getUserId()); wrapper.eq(TzsCitInfo::getCtiUserId, userId);
TzsCitInfo ctiInfo = ctiInfoService.getOne(wrapper); TzsCitInfo ctiInfo = ctiInfoService.getOne(wrapper);
if (!ValidationUtil.isEmpty(ctiInfo)) { if (!ValidationUtil.isEmpty(ctiInfo)) {
String groupCode = ctiInfo.getGid().split(",")[0]; String groupCode = ctiInfo.getGid().split(",")[0];
DataDictionary dataDictionary = dictionaryService.getByCode(groupCode, DictTypeEnum.坐席技能组.getType()); DataDictionary dataDictionary = dictionaryService.getByCode(groupCode, DictTypeEnum.坐席技能组.getType());
return dataDictionary.getName(); ctiUserDto.setCallerNo(dataDictionary.getName());
} }
return ""; return ctiUserDto;
} }
} }
\ No newline at end of file
...@@ -218,9 +218,13 @@ public class DispatchTaskServiceImpl extends BaseService<DispatchTaskDto,Dispatc ...@@ -218,9 +218,13 @@ public class DispatchTaskServiceImpl extends BaseService<DispatchTaskDto,Dispatc
String trappedFloorNum = dynamicParms.get("trapped_floor_num") == null ? "" : dynamicParms.get("trapped_floor_num"); String trappedFloorNum = dynamicParms.get("trapped_floor_num") == null ? "" : dynamicParms.get("trapped_floor_num");
String isLight = dynamicParms.get("is_light") == null ? "" : dynamicParms.get("is_light"); String isLight = dynamicParms.get("is_light") == null ? "" : dynamicParms.get("is_light");
String trappedTime = dynamicParms.get("trapped_time") == null ? "" : dynamicParms.get("trapped_time"); String trappedTime = dynamicParms.get("trapped_time") == null ? "" : dynamicParms.get("trapped_time");
content = content.replace("$trapped_num",trappedNum).replace("$trapped_floor_num",trappedFloorNum); String injuredNum = dynamicParms.get("injured_num") == null ? "" : dynamicParms.get("injured_num");
content = content.replace("$emergency_call",emergencyCall).replace("$contact_phone",contactPhone); String dieNum = dynamicParms.get("die_num") == null ? "" : dynamicParms.get("die_num");
content = content.replace("$is_light",isLight).replace("$trapped_time",trappedTime); String hasInjury = Integer.parseInt(injuredNum) + Integer.parseInt(dieNum) > 0 ? "有" : "无";
content = content.replace("$trapped_num",trappedNum).replace("$trapped_floor_num", trappedFloorNum);
content = content.replace("$emergency_call",emergencyCall).replace("$contact_phone", contactPhone);
content = content.replace("$is_light", isLight).replace("$trapped_time", trappedTime);
content = content.replace("$hasInjury", hasInjury);
break; break;
case "GZWX" : // 故障维修 case "GZWX" : // 故障维修
dispatchTaskDto.setIsSaveTask(false); dispatchTaskDto.setIsSaveTask(false);
......
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