package com.sercurityControl.proteam.newScreen.service; import com.securityControl.common.core.web.domain.AjaxResult; import com.sercurityControl.proteam.domain.PersonData; import com.sercurityControl.proteam.domain.TeamData; import com.sercurityControl.proteam.newScreen.mapper.TeamNewMapper; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.List; import java.util.Map; /** * @author bonus * @data 2022/12/8 9:47 * @description 班组 */ @Slf4j @Service public class TeamNewServiceImpl implements TeamNewService { @Autowired private TeamNewMapper mapper; /** * 班组统计 * * @return 集合 */ @Override public AjaxResult getTeamNum() { try { List> list=mapper.getTeamNum(); return AjaxResult.success(list); } catch (Exception e) { e.printStackTrace(); return AjaxResult.error(); } } /** * 环水保 * * @return 集合 */ @Override public AjaxResult getEiaNum() { try { List> list=mapper.getEiaNum(); return AjaxResult.success(list); } catch (Exception e) { e.printStackTrace(); return AjaxResult.error(); } } /** * 环水保 * * @param list 参数 * @return 集合 */ @Override public AjaxResult updateEiaNum(List> list) { try { if (list != null) { for (Map map : list) { mapper.updateEiaNum(map); } return AjaxResult.success(); } else { return AjaxResult.error(); } } catch (Exception e) { e.printStackTrace(); return AjaxResult.error(); } } /** * 获取班组 * * @param cityName 地市 * @return 集合 */ @Override public List getTeamByOrg(TeamData cityName) { return mapper.getTeamByOrg(cityName); } /** * 获取人员 * * @param cityName 地市 * @return 集合 */ @Override public List getPersonData(PersonData cityName) { return mapper.getPersonData(cityName); } }