106 lines
2.4 KiB
Plaintext
106 lines
2.4 KiB
Plaintext
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<Map<String, String>> list=mapper.getTeamNum();
|
|
return AjaxResult.success(list);
|
|
} catch (Exception e) {
|
|
e.printStackTrace();
|
|
return AjaxResult.error();
|
|
}
|
|
}
|
|
|
|
/**
|
|
* 环水保
|
|
*
|
|
* @return 集合
|
|
*/
|
|
@Override
|
|
public AjaxResult getEiaNum() {
|
|
try {
|
|
List<Map<String, String>> list=mapper.getEiaNum();
|
|
return AjaxResult.success(list);
|
|
} catch (Exception e) {
|
|
e.printStackTrace();
|
|
return AjaxResult.error();
|
|
}
|
|
}
|
|
|
|
/**
|
|
* 环水保
|
|
*
|
|
* @param list 参数
|
|
* @return 集合
|
|
*/
|
|
@Override
|
|
public AjaxResult updateEiaNum(List<Map<String, String>> list) {
|
|
try {
|
|
if (list != null) {
|
|
for (Map<String, String> 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<TeamData> getTeamByOrg(TeamData cityName) {
|
|
return mapper.getTeamByOrg(cityName);
|
|
}
|
|
|
|
/**
|
|
* 获取人员
|
|
*
|
|
* @param cityName 地市
|
|
* @return 集合
|
|
*/
|
|
@Override
|
|
public List<PersonData> getPersonData(PersonData cityName) {
|
|
return mapper.getPersonData(cityName);
|
|
}
|
|
}
|