Commit 1c4285c5 authored by limei's avatar limei

新增厂站消防数据更新接口

parent f119683d
...@@ -32,4 +32,9 @@ public interface IdxFeignService { ...@@ -32,4 +32,9 @@ public interface IdxFeignService {
*/ */
@RequestMapping(value = "/v1/subject-tree", method = RequestMethod.GET) @RequestMapping(value = "/v1/subject-tree", method = RequestMethod.GET)
ResponseModel<List<JSONObject>> subjectTree(@RequestParam("projectId") String projectId); ResponseModel<List<JSONObject>> subjectTree(@RequestParam("projectId") String projectId);
@RequestMapping(value = "/report/getTasks/v1", method = RequestMethod.GET)
ResponseModel<JSONObject> getInfo(@RequestParam("pageNumber") int pageNumber,@RequestParam("pageSize") int pageSize);
} }
...@@ -5,10 +5,15 @@ import com.baomidou.mybatisplus.extension.service.IService; ...@@ -5,10 +5,15 @@ import com.baomidou.mybatisplus.extension.service.IService;
import com.yeejoin.amos.boot.module.tdc.api.entity.CheckReport; import com.yeejoin.amos.boot.module.tdc.api.entity.CheckReport;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.Map;
/** /**
* @author DELL * @author DELL
*/ */
@Service @Service
public interface CheckReportService extends IService<CheckReport> { public interface CheckReportService extends IService<CheckReport> {
IPage<CheckReport> selectAll(int current, int size, String amosOrgCode); IPage<CheckReport> selectAll(int current, int size, String amosOrgCode);
Map getInfo(int pageNumber,int pageSize);
} }
...@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.tdc.biz.controller; ...@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.tdc.biz.controller;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yeejoin.amos.boot.module.tdc.api.entity.CheckReport; import com.yeejoin.amos.boot.module.tdc.api.entity.CheckReport;
import com.yeejoin.amos.boot.module.tdc.api.service.CheckReportService; import com.yeejoin.amos.boot.module.tdc.api.service.CheckReportService;
import com.yeejoin.amos.boot.module.tdc.biz.service.impl.CheckReportImpl;
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;
...@@ -14,6 +15,8 @@ import org.typroject.tyboot.core.restful.doc.TycloudOperation; ...@@ -14,6 +15,8 @@ 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;
import java.util.Map;
/** /**
* 校验报告 * 校验报告
* @author DELL * @author DELL
...@@ -37,4 +40,17 @@ public class CheckReportController { ...@@ -37,4 +40,17 @@ public class CheckReportController {
return ResponseHelper.buildResponse(checkReportService.selectAll(current,size,amosOrgCode)); return ResponseHelper.buildResponse(checkReportService.selectAll(current,size,amosOrgCode));
} }
/**
*
* return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false)
@GetMapping(value = "getInfo")
@ApiOperation(httpMethod = "GET",value = "厂站消防数据更新", notes = "厂站消防数据更新")
public ResponseModel<Map> getInfo(int pageNumber, int pageSize) {
return ResponseHelper.buildResponse(checkReportService.getInfo(pageNumber,pageSize));
}
} }
package com.yeejoin.amos.boot.module.tdc.biz.service.impl; package com.yeejoin.amos.boot.module.tdc.biz.service.impl;
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.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.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yeejoin.amos.boot.module.tdc.api.entity.CheckModel;
import com.yeejoin.amos.boot.module.tdc.api.entity.CheckReport; import com.yeejoin.amos.boot.module.tdc.api.entity.CheckReport;
import com.yeejoin.amos.boot.module.tdc.api.feign.IdxFeignService;
import com.yeejoin.amos.boot.module.tdc.api.mapper.CheckReportMapper; import com.yeejoin.amos.boot.module.tdc.api.mapper.CheckReportMapper;
import com.yeejoin.amos.boot.module.tdc.api.service.CheckReportService; import com.yeejoin.amos.boot.module.tdc.api.service.CheckReportService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil; import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import java.util.List; import java.util.HashMap;
import java.util.Map;
/** /**
* @author DELL * @author DELL
...@@ -20,6 +23,9 @@ import java.util.List; ...@@ -20,6 +23,9 @@ import java.util.List;
@Service @Service
public class CheckReportImpl extends ServiceImpl<CheckReportMapper, CheckReport> implements CheckReportService { public class CheckReportImpl extends ServiceImpl<CheckReportMapper, CheckReport> implements CheckReportService {
@Autowired
IdxFeignService idxFeignService;
@Override @Override
public IPage<CheckReport> selectAll(int current,int size,String amosOrgCode) { public IPage<CheckReport> selectAll(int current,int size,String amosOrgCode) {
Page<CheckReport> page = new Page<>(current,size); Page<CheckReport> page = new Page<>(current,size);
...@@ -31,6 +37,17 @@ public class CheckReportImpl extends ServiceImpl<CheckReportMapper, CheckReport> ...@@ -31,6 +37,17 @@ public class CheckReportImpl extends ServiceImpl<CheckReportMapper, CheckReport>
wrapper.likeRight(CheckReport::getAmosOrgCode, amosOrgCode); wrapper.likeRight(CheckReport::getAmosOrgCode, amosOrgCode);
return this.page(page,wrapper); return this.page(page,wrapper);
} }
}
@Override
public Map getInfo(int pageNumber,int pageSize){
Map map = new HashMap<>();
JSONObject object = idxFeignService.getInfo(pageNumber,pageSize).getResult();
map.put("current",object.getString("pageNumber"));
map.put("records",object.getJSONArray("taskListModel"));
map.put("total",object.getString("total"));
return map;
} }
} }
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