forked from integrated_whb/integrated_whb
八项作业统计数,以及关联作业票列表显示
parent
e5d7efd3e1
commit
3d57c00c43
|
@ -34,6 +34,24 @@ public class AppEightWorkController extends BaseController {
|
||||||
@Autowired
|
@Autowired
|
||||||
private UsersService usersService;
|
private UsersService usersService;
|
||||||
|
|
||||||
|
/**八项作业列表
|
||||||
|
* @param page
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
@RequestMapping(value="/list")
|
||||||
|
@ResponseBody
|
||||||
|
@LogAnno(menuType= "手机",menuServer= "八项作业",instructionsOperate = "八项作业",instructionsType = "列表")
|
||||||
|
public Object list(Page page) throws Exception{
|
||||||
|
Map<String,Object> map = new HashMap<String,Object>();
|
||||||
|
String errInfo = "success";
|
||||||
|
PageData pd = new PageData();
|
||||||
|
pd = this.getPageData();
|
||||||
|
List<PageData> varList = eightWorkService.list(pd); //列出confinedspace列表
|
||||||
|
map.put("varList", varList);
|
||||||
|
map.put("result", errInfo);
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* description:
|
* description:
|
||||||
* accidentType-风险点
|
* accidentType-风险点
|
||||||
|
|
|
@ -15,4 +15,6 @@ public interface EightWorkService {
|
||||||
PageData checkWork(PageData pd);
|
PageData checkWork(PageData pd);
|
||||||
|
|
||||||
ReturnMap getEightWorks()throws Exception;
|
ReturnMap getEightWorks()throws Exception;
|
||||||
|
|
||||||
|
List<PageData> list(PageData pd)throws Exception;
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,6 +14,7 @@ import com.zcloud.mapper.datasource.eightwork.EightWorkMapper;
|
||||||
import java.time.YearMonth;
|
import java.time.YearMonth;
|
||||||
import java.time.format.DateTimeFormatter;
|
import java.time.format.DateTimeFormatter;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author fangjiakai
|
* @author fangjiakai
|
||||||
|
@ -61,6 +62,7 @@ public class EightWorkServiceImpl implements EightWorkService {
|
||||||
PageData corp = new PageData();
|
PageData corp = new PageData();
|
||||||
corp.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
corp.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||||
List<PageData> eightworks = eightworkMapper.getEightWorks(corp);
|
List<PageData> eightworks = eightworkMapper.getEightWorks(corp);
|
||||||
|
|
||||||
if(eightworks != null && eightworks.size() > 0){
|
if(eightworks != null && eightworks.size() > 0){
|
||||||
eightworks.stream().forEach(e -> {
|
eightworks.stream().forEach(e -> {
|
||||||
staMap.get("total").add(e);
|
staMap.get("total").add(e);
|
||||||
|
@ -93,4 +95,17 @@ public class EightWorkServiceImpl implements EightWorkService {
|
||||||
return returnMap;
|
return returnMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**列表
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<PageData> list(PageData pd)throws Exception{
|
||||||
|
List<PageData> eightworks = eightworkMapper.getEightWorks(pd);
|
||||||
|
List<PageData> returnList = eightworks.stream().filter(item -> {
|
||||||
|
return !item.getString("NEXT_STEP_ID").equals("99") && item.getString("STATUS").equals("1");
|
||||||
|
}).collect(Collectors.toList());
|
||||||
|
return returnList;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,7 +47,10 @@
|
||||||
where sign.SIGN_TIME is null and sign.SIGN_USER_ID = #{USER_ID} and work.STEP_ID != '-1') HOTWORK_COUNT,
|
where sign.SIGN_TIME is null and sign.SIGN_USER_ID = #{USER_ID} and work.STEP_ID != '-1') HOTWORK_COUNT,
|
||||||
(select count(1) COUNT from bus_confinedspace_sign sign
|
(select count(1) COUNT from bus_confinedspace_sign sign
|
||||||
left join bus_confinedspace work on work.CONFINEDSPACE_ID = sign.CONFINEDSPACE_ID
|
left join bus_confinedspace work on work.CONFINEDSPACE_ID = sign.CONFINEDSPACE_ID
|
||||||
where sign.SIGN_TIME is null and sign.SIGN_USER_ID = #{USER_ID} and work.STEP_ID != '-1') CONFINEDSPACE_COUNT
|
where sign.SIGN_TIME is null and sign.SIGN_USER_ID = #{USER_ID} and work.STEP_ID != '-1') CONFINEDSPACE_COUNT,
|
||||||
|
(select count(1) COUNT from bus_highwork_sign sign
|
||||||
|
left join bus_highwork work on work.HIGHWORK_ID = sign.HIGHWORK_ID
|
||||||
|
where sign.SIGN_TIME is null and sign.SIGN_USER_ID = #{USER_ID} and work.STEP_ID != '-1') HIGHWORK_COUNT
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
Loading…
Reference in New Issue