Commit 7c8a475e by chentian

Merge remote-tracking branch 'origin/master'

parents 40b13cde 74a36f8f
......@@ -17,4 +17,8 @@ public interface QyphMapper {
int queryQyphTaskResultCount(@Param("taskId") String taskId);
List<SpatiotemporalBackTrackResult> queryQyphTaskResults(@Param("taskId") String taskId);
int queryQyphTaskResultCount(SpatiotemporalBackTrackResult param);
List<SpatiotemporalBackTrackResult> queryQyphTaskResultPage(SpatiotemporalBackTrackResult param);
}
package com.founder.interservice.sksjzc.qyph.controller;
import com.alibaba.fastjson.JSONObject;
import com.founder.interservice.VO.ResultMap;
import com.founder.interservice.sksjzc.qyph.service.QyphService;
import com.founder.interservice.spatiotemporalBackTrack.model.SBTResultDetail;
import com.founder.interservice.spatiotemporalBackTrack.model.SpatiotemporalBackTrack;
import com.founder.interservice.spatiotemporalBackTrack.model.SpatiotemporalBackTrackResult;
import com.founder.interservice.spatiotemporalBackTrack.service.SpatiotemporalBackTrackService;
import com.founder.interservice.util.EasyUIPage;
import com.founder.interservice.util.XdhSpUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.text.SimpleDateFormat;
import java.util.*;
@CrossOrigin
@Controller
......@@ -27,6 +25,8 @@ public class QyphController {
@Autowired
private QyphService qyphService;
@Autowired
private SpatiotemporalBackTrackService spatiotemporalBackTrackService;
@RequestMapping("/getQyphTaskList")
@ResponseBody
......@@ -70,18 +70,86 @@ public class QyphController {
@RequestMapping("/getQyphTaskResult")
@ResponseBody
public Map<String,Object> getQyphTaskResult(String taskId){
Map<String,Object> result =new HashMap<>();
public EasyUIPage getQyphTaskResult(String taskId,EasyUIPage page,Integer rows){
page.setPagePara(rows);
SpatiotemporalBackTrackResult param =new SpatiotemporalBackTrackResult();
param.setTaskId(taskId);
try {
List<SpatiotemporalBackTrackResult> list = qyphService.getQyphTaskResult(taskId);
result.put("state","success");
result.put("data",list);
page = qyphService.getQyphTaskResultPage(page,param);
} catch (Exception e) {
e.printStackTrace();
result.put("state","error");
result.put("data",new ArrayList<>());
}
return result;
return page;
}
@RequestMapping("/toQyphTaskResultPage")
public ModelAndView toQyphTaskResultPage(String taskId, String sfzh, String fsrjh){
ModelAndView mav = new ModelAndView();
mav.setViewName("qyph/qyphResult");
SpatiotemporalBackTrack sbt = spatiotemporalBackTrackService.findByTaskId(taskId);
//初始化相关字段
String taskName = "";
String taskCaseId = "";
Date rksj = null;
String qyName = "";
String qybj = "";
String qyArea = "";
Date startTime = null;
Date endTime =null;
//当获取的对象不为空时,获取相应的值
if (null != sbt) {
taskName = sbt.getTaskName();
rksj = sbt.getRksj();
taskCaseId = sbt.getTaskCaseId();
qyName = sbt.getQyName();
qybj = sbt.getQybj();
qyArea = sbt.getQyArea();
startTime = sbt.getStartTime();
endTime = sbt.getEndTime();
}
//入库时间
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
if (null != rksj) {
mav.addObject("rksj",formatter.format(rksj));
} else {
mav.addObject("rksj","");
}
mav.addObject("taskId",taskId);
mav.addObject("taskName",taskName);
mav.addObject("sfzh",sfzh);//当前用户身份正好(用采合一、人员档案用)
mav.addObject("fsrjh",fsrjh);
mav.addObject("taskCaseId",taskCaseId);
mav.addObject("qyName",qyName);
mav.addObject("qybj",qybj);
mav.addObject("qyArea",qyArea);
mav.addObject("startTime",startTime);
mav.addObject("endTime",endTime);
//获取智能推荐人员数量
SBTResultDetail entity=new SBTResultDetail();
entity.setTaskId(taskId);
entity.setIsCount("true");
ResultMap resultMap=spatiotemporalBackTrackService.tjry(entity);
mav.addObject("tjryCount",resultMap.getCount());
//获取智能推荐号码数量
entity=new SBTResultDetail();
entity.setTaskId(taskId);
entity.setIsCount("true");
resultMap=spatiotemporalBackTrackService.tjhm(entity);
mav.addObject("tjhmCount",resultMap.getCount());
return mav;
}
@RequestMapping("/getQyphTaskInfo/{taskId}")
@ResponseBody
public SpatiotemporalBackTrack getQyphTaskInfo(@PathVariable("taskId") String taskId){
SpatiotemporalBackTrack task =new SpatiotemporalBackTrack();
try {
task=spatiotemporalBackTrackService.findByTaskId(taskId);
} catch (Exception e) {
e.printStackTrace();
}
return task;
}
}
......@@ -31,4 +31,5 @@ public interface QyphService {
public List<SpatiotemporalBackTrackResult> getQyphTaskResult(String taskId);
EasyUIPage getQyphTaskResultPage(EasyUIPage page, SpatiotemporalBackTrackResult param);
}
......@@ -130,4 +130,20 @@ public class QyphServiceImpl implements QyphService {
}
return list;
}
@Override
public EasyUIPage getQyphTaskResultPage(EasyUIPage page, SpatiotemporalBackTrackResult param) {
Map<String,Object> map = new HashMap<>();
map.put("startNum", page.getBegin());
map.put("endNum", page.getEnd());
map.put("entity", param);
int total = qyphMapper.queryQyphTaskResultCount(param);
List<SpatiotemporalBackTrackResult> list = new ArrayList<>();
if(total>0){
list=qyphMapper.queryQyphTaskResultPage(param);
}
page.setRows(list);
return page;
}
}
......@@ -30,6 +30,8 @@ public class SBTResultDetail extends PageBean {
private String csrqEnd;
private String ryzpStr;
private String type;
private Integer count;
private String sfCheck;
private int startNum;
private int endNum;
......
......@@ -290,6 +290,7 @@
t.OBJECT_TYPE as objectType,
t.OBJECT_TYPE_NAME as objectTypeName,
t.OBJECT_VALUE as objectValue,
t.COUNT as count,
td.TASK_RESULT_ID as taskResultId,
td.BIRTHDAY as birthday,
td.NAME as name,
......@@ -392,6 +393,7 @@
t.OBJECT_TYPE as objectType,
t.OBJECT_TYPE_NAME as objectTypeName,
t.OBJECT_VALUE as objectValue,
t.COUNT as count,
td.TASK_RESULT_ID as taskResultId,
td.BIRTHDAY as birthday,
td.NAME as name,
......@@ -539,6 +541,7 @@
t.OBJECT_TYPE as objectType,
t.OBJECT_TYPE_NAME as objectTypeName,
t.OBJECT_VALUE as objectValue,
t.COUNT as count,
td.TASK_RESULT_ID as taskResultId,
td.BIRTHDAY as birthday,
td.NAME as name,
......
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