Skip to content
Snippets Groups Projects
Commit 358c5f3c authored by zhaoting's avatar zhaoting
Browse files

feat: 群众呼声的详情接口改造

parent b7df013d
Branches
Tags 1.0.38.6
No related merge requests found
......@@ -2,6 +2,7 @@ package com.hncy.sjdz.base.controller;
import com.hncy.sjdz.base.models.vo.EventInformationVO;
import com.hncy.sjdz.base.service.CallInformationService;
import com.hncy.sjdz.base.service.SjdzInterfaceInfoService;
import com.hncy4cloud.hncy.common.core.util.R;
import com.hncy4cloud.hncy.common.mybatis.custom.CustomPage;
import com.hncy4cloud.hncy.common.security.annotation.Inner;
......@@ -26,6 +27,9 @@ public class TheMassesInformationController {
private final CallInformationService callInformationService;
private final SjdzInterfaceInfoService sjdzInterfaceInfoService;
/**
* 通过id查询网络理政来电信息-基本信息
* @param id id
......@@ -34,8 +38,9 @@ public class TheMassesInformationController {
@Operation(summary = "通过id查询群众来电信息" , description = "通过id查询群众来电信息" )
@GetMapping("/callInformation/{id}" )
@Inner(false)
public R getById(@PathVariable("id" ) Integer id) {
return R.ok(callInformationService.getById(id));
public R getById(@PathVariable("id" ) String id) {
/*return R.ok(callInformationService.getById(id));*/
return sjdzInterfaceInfoService.getCallInformationInfoById(id);
}
......
package com.hncy.sjdz.base.models.vo;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.hncy.sjdz.base.models.entity.CallInformation;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.time.LocalDateTime;
import java.util.HashMap;
import java.util.Map;
/**
* @author zhaoting
* date 2024/12/9 20:26
**/
@Data
public class CallInformationVO {
/**
* id
*/
@TableId(type = IdType.ASSIGN_ID)
@Schema(description="id")
private String id;
/**
* 来电(信)类型
*/
@Schema(description="来电(信)类型")
private String callType;
/**
* 标题
*/
@Schema(description="标题")
private String title;
/**
* 来信人名称
*/
@Schema(description="来信人名称")
private String senderName;
/**
* 来源
*/
@Schema(description="来源")
private String source;
/**
* 来电内容
*/
@Schema(description="来电内容")
private String callContent;
/**
* 办理单位
*/
@Schema(description="办理单位")
private String handlingUnit;
/**
* 办理状态
*/
@Schema(description="办理状态")
private String handlingStatus;
/**
* 所属区域
*/
@Schema(description="所属区域")
private String area;
/**
* 上报时间
*/
@Schema(description="上报时间")
private String reportTime;
/**
* 办理时间
*/
@Schema(description="办理时间")
private String processingTime;
/**
* 办理结果
*/
@Schema(description="办理结果")
private String processingContent;
@Schema(description="原始数据")
Map otherInfo=new HashMap();
}
......@@ -16,4 +16,6 @@ public interface SjdzInterfaceInfoService extends IService<SjdzInterfaceInfo> {
R getSjdzInfoData(InterfaceVO interfaceVO);
R getMzhsData(InterfaceVO interfaceVO);
R getCallInformationInfoById(String id);
}
\ No newline at end of file
......@@ -10,6 +10,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.pagehelper.util.StringUtil;
import com.hncy.sjdz.base.models.entity.SjdzInterfaceInfo;
import com.hncy.sjdz.base.mapper.SjdzInterfaceInfoMapper;
import com.hncy.sjdz.base.models.vo.CallInformationVO;
import com.hncy.sjdz.base.models.vo.InterfaceVO;
import com.hncy.sjdz.base.models.vo.RecordQZData;
import com.hncy.sjdz.base.service.SjdzInterfaceInfoService;
......@@ -209,4 +210,77 @@ public class SjdzInterfaceInfoServiceImpl extends ServiceImpl<SjdzInterfaceInfoM
}
return R.ok(map);
}
@Override
public R getCallInformationInfoById(String id) {
InterfaceVO interfaceVO = new InterfaceVO();
interfaceVO.setTypeCode("12345-tsgdlb");
Map<String,Object> datadd=new HashMap<>();
datadd.put("sczj",id);
interfaceVO.setData(datadd);
R sjdzInfoData = this.getSjdzInfoData(interfaceVO);
if(sjdzInfoData.isSuccess()){
Map data = (Map) sjdzInfoData.getData();
Map data1 = (Map)data.get("data");
Object records1 = data1.get("records");
JSONArray jsonArray = JSONUtil.parseArray(records1);
List<Map> records = jsonArray.toList(Map.class);
if(records!=null && records.size()>0){
Map map = records.get(0);
CallInformationVO callInformationVO = new CallInformationVO();
callInformationVO.setOtherInfo(map);
Object sczj = map.get("sczj");
if(sczj!=null){
callInformationVO.setId(sczj.toString());
}
Object bt = map.get("bt");
if(bt!=null){
callInformationVO.setTitle(bt.toString());
}
Object ldlx = map.get("ldlx");
if(ldlx!=null){
callInformationVO.setCallType(ldlx.toString());
}
Object lxrmc = map.get("lxrmc");
if(lxrmc!=null){
callInformationVO.setSenderName(lxrmc.toString());
}
Object ly = map.get("ly");
if(ly!=null){
callInformationVO.setSource(ly.toString());
}
Object ldxnr = map.get("ldxnr");
if(ldxnr!=null){
callInformationVO.setCallContent(ldxnr.toString());
}
Object bldw = map.get("bldw");
if(bldw!=null){
callInformationVO.setHandlingUnit(bldw.toString());
}
Object blzt = map.get("blzt");
if(blzt!=null){
callInformationVO.setHandlingStatus(blzt.toString());
}
Object ssqy = map.get("ssqy");
if(ssqy!=null){
callInformationVO.setArea(ssqy.toString());
}
Object ldxsj = map.get("ldxsj");
if(ldxsj!=null){
callInformationVO.setReportTime(ldxsj.toString());
}
if(map.get("hfsj")!=null){
callInformationVO.setProcessingTime(map.get("hfsj").toString());
}
if(map.get("hfnr")!=null){
callInformationVO.setProcessingContent(map.get("hfnr").toString());
}
return R.ok(callInformationVO);
}else {
return R.failed("获取数据失败");
}
}else {
return R.failed("获取数据失败");
}
}
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment