Commit a85fe42f authored by tangwei's avatar tangwei

增加点状态接口

parent fe1b58b5
...@@ -7,7 +7,14 @@ public class pointReturn { ...@@ -7,7 +7,14 @@ public class pointReturn {
public String taskNo; public String taskNo;
public long id; public long id;
public String coordinates; public String coordinates;
public String floor;
public String getFloor() {
return floor;
}
public void setFloor(String floor) {
this.floor = floor;
}
public String getCoordinates() { public String getCoordinates() {
return coordinates; return coordinates;
} }
......
package com.yeejoin.amos.bank.controller; package com.yeejoin.amos.bank.controller;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import com.yeejoin.amos.bank.service.InspectionService; import com.yeejoin.amos.bank.service.InspectionService;
import com.yeejoin.amos.feign.systemctl.model.DictionarieValueModel;
import com.yeejoin.amos.op.core.common.response.CommonResponse; import com.yeejoin.amos.op.core.common.response.CommonResponse;
import com.yeejoin.amos.op.core.util.CommonResponseUtil; import com.yeejoin.amos.op.core.util.CommonResponseUtil;
import com.yeejoin.amos.spc.business.controller.BaseController; import com.yeejoin.amos.spc.business.controller.BaseController;
import com.yeejoin.amos.spc.business.param.ReginParams; import com.yeejoin.amos.spc.business.param.ReginParams;
import com.yeejoin.amos.spc.business.remote.RemoteSecurityService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
...@@ -25,7 +29,8 @@ public class InspectionController extends BaseController{ ...@@ -25,7 +29,8 @@ public class InspectionController extends BaseController{
@Autowired @Autowired
private InspectionService inspectionService; private InspectionService inspectionService;
@Autowired
RemoteSecurityService remoteSecurityService;
@GetMapping(value = "/rightTopChart", produces = "application/json;charset=UTF-8") @GetMapping(value = "/rightTopChart", produces = "application/json;charset=UTF-8")
@ApiOperation(value = "查询主页右上角图片", notes = "查询主页右上角图片") @ApiOperation(value = "查询主页右上角图片", notes = "查询主页右上角图片")
public CommonResponse rightTopChartData(@ApiParam(value = "公司id", required = false)String companyId) { public CommonResponse rightTopChartData(@ApiParam(value = "公司id", required = false)String companyId) {
...@@ -58,4 +63,57 @@ public class InspectionController extends BaseController{ ...@@ -58,4 +63,57 @@ public class InspectionController extends BaseController{
return CommonResponseUtil.failure("查询异常"); return CommonResponseUtil.failure("查询异常");
} }
} }
@GetMapping(value = "/getporint", produces = "application/json;charset=UTF-8")
@ApiOperation(value = "点的状态", notes = "点的状态")
public CommonResponse getporint(@ApiParam(value = "公司id", required = false)String pointid) {
java.util.HashMap<String, Object> map=inspectionService.getporint(pointid);
List<DictionarieValueModel> listDictionaryByDictCode = remoteSecurityService.listDictionaryByDictCode("BANK_ORG");
String xian="";
String xianyang="";
StringBuffer sb = new StringBuffer();
for (DictionarieValueModel e : listDictionaryByDictCode) {
if("xian".equals(e.getDictDataKey())) {
xian=e.getDictDataValue();
}
if("xianyang".equals(e.getDictDataKey())) {
xianyang=e.getDictDataValue();
}
}
java.util.HashMap<String, Object> map1 =new java.util.HashMap<>();
if(map!=null){
int status= Integer.valueOf(map.get("status").toString());
String code= map.get("code").toString();
if(status==2){
map1.put("pointtype", true);
}else{
map1.put("pointtype",false );
}
if (code.indexOf(xian)!=-1){
map1.put("cstype","xian" );
}
if (code.indexOf(xianyang)!=-1){
map1.put("cstype","xianyang" );
}
}
return CommonResponseUtil.success(map1);
}
} }
...@@ -17,4 +17,5 @@ public interface InspectionService { ...@@ -17,4 +17,5 @@ public interface InspectionService {
Map<String, Object> queryRightTopChartlist(Integer pageIndex, Integer pageSize, String deptId,String deptName); Map<String, Object> queryRightTopChartlist(Integer pageIndex, Integer pageSize, String deptId,String deptName);
HashMap<String, Object> getporint(String pointid);
} }
...@@ -207,4 +207,10 @@ public class InspectionServiceImpl implements InspectionService { ...@@ -207,4 +207,10 @@ public class InspectionServiceImpl implements InspectionService {
return map2; return map2;
} }
@Override
public HashMap<String, Object> getporint(String pointid) {
HashMap<String, Object> listd = statisticsMapper.getporint(pointid);
return listd;
}
} }
...@@ -25,7 +25,7 @@ public interface StatisticsMapper { ...@@ -25,7 +25,7 @@ public interface StatisticsMapper {
Long countPatrolPlan(@Param("deptId") String deptId); Long countPatrolPlan(@Param("deptId") String deptId);
List<Map<String, Object>> listByTaskNo(List<Long> taskNos); List<Map<String, Object>> listByTaskNo(List<Long> taskNos);
HashMap<String, Object> getporint(@Param("pointid")String pointid);
HashMap<String, Object> queryRightTopChartDataByDepId(@Param("deptId")String deptId); HashMap<String, Object> queryRightTopChartDataByDepId(@Param("deptId")String deptId);
List<pointReturn> pointReturnlist(@Param("planTaskId")String planTaskId); List<pointReturn> pointReturnlist(@Param("planTaskId")String planTaskId);
......
...@@ -165,7 +165,7 @@ from r_risk_level LEFT JOIN (select COUNT(r_risk_source.id) num, r_risk_le ...@@ -165,7 +165,7 @@ from r_risk_level LEFT JOIN (select COUNT(r_risk_source.id) num, r_risk_le
<select id="getxuncount" parameterType="java.lang.String" resultType="java.util.HashMap"> <select id="getxuncount" parameterType="java.lang.String" resultType="java.util.HashMap">
select status ,count(id) num from p_point where p_point.org_code LIKE concat( #{code}, "%") GROUP BY status select status ,count(id) num from p_point where p_point.is_delete=0 and p_point.org_code LIKE concat( #{code}, "%") GROUP BY status
</select> </select>
......
...@@ -261,6 +261,7 @@ ...@@ -261,6 +261,7 @@
<result property="name" column="name"/> <result property="name" column="name"/>
<result property="id" column="id"/> <result property="id" column="id"/>
<result property="coordinates" column="coordinates"/> <result property="coordinates" column="coordinates"/>
<result property="floor" column="floor"/>
</resultMap> </resultMap>
...@@ -296,10 +297,11 @@ ...@@ -296,10 +297,11 @@
<select id="pointReturnlist" resultMap="pointReturn"> <select id="pointReturnlist" resultMap="pointReturn">
select select
p_plan_task_detail.status isFinish , p_plan_task_detail.status isFinish ,
p_point.`name`, p_point.`name`,
p_point.id, p_point.id,
p_point.floor,
p_point.coordinates, p_point.coordinates,
p_plan_task_detail.task_no taskNo p_plan_task_detail.task_no taskNo
from p_plan_task_detail LEFT JOIN p_point on p_plan_task_detail.point_id =p_point.id from p_plan_task_detail LEFT JOIN p_point on p_plan_task_detail.point_id =p_point.id
...@@ -309,6 +311,13 @@ ...@@ -309,6 +311,13 @@
</select> </select>
<select id="getporint" resultType="java.util.Map">
SELECT
p_point.org_code code,
p_point.status
from p_point where p_point.id=#{pointid}
</select>
</mapper> </mapper>
\ No newline at end of file
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