八项作业统计数,以及关联作业票列表显示

pull/4/head
chenxinying 2024-01-31 08:42:55 +08:00
parent e5d7efd3e1
commit 3d57c00c43
4 changed files with 39 additions and 1 deletions

View File

@ -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-

View File

@ -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;
} }

View File

@ -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;
}
} }

View File

@ -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>