Commit 33f4665e by 涂亚平

准备周六在家加班......

1 parent dbbb4ef4
...@@ -97,9 +97,9 @@ public class TeamDictController { ...@@ -97,9 +97,9 @@ public class TeamDictController {
} }
@PostMapping("provinceStationTeam") @PostMapping("provinceStationTeam")
@ApiOperation("省-工作站-团队 ") @ApiOperation("省-工作站-团队 userId")
public ResponseVO provinceStationTeam(){ public ResponseVO provinceStationTeam(@RequestBody ProvinceStationTeamDTO provinceStationTeamDTO){
return ResponseData.generateCreatedResponse(0,teamDictService.provinceStationTeam()); return ResponseData.generateCreatedResponse(0,teamDictService.provinceStationTeam(provinceStationTeamDTO));
} }
@PostMapping("memberManagement") @PostMapping("memberManagement")
......
...@@ -21,4 +21,6 @@ public class AloneRequirementsDTO { ...@@ -21,4 +21,6 @@ public class AloneRequirementsDTO {
private String positionName; private String positionName;
private Long userId;
} }
package com.laowu.dto.team;
import lombok.Data;
@Data
public class ProvinceStationTeamDTO {
private Long userId;
}
...@@ -65,5 +65,9 @@ public class PositionRequireItemDO extends BaseModel { ...@@ -65,5 +65,9 @@ public class PositionRequireItemDO extends BaseModel {
*/ */
private String infoOrigin; private String infoOrigin;
/**
* 源id
*/
private Long originId;
} }
...@@ -41,7 +41,7 @@ public interface TeamDictService extends IService<TeamDictDO> { ...@@ -41,7 +41,7 @@ public interface TeamDictService extends IService<TeamDictDO> {
TotalTeamsVO leaderMemberCounts(TeamDictDO teamDictDO); TotalTeamsVO leaderMemberCounts(TeamDictDO teamDictDO);
List<ProvinceStationTeamVO> provinceStationTeam(); List<ProvinceStationTeamVO> provinceStationTeam(ProvinceStationTeamDTO provinceStationTeamDTO);
IPage<MemberManagementVO> memberManagement(MemberManagementDTO memberManagementDTO); IPage<MemberManagementVO> memberManagement(MemberManagementDTO memberManagementDTO);
......
...@@ -91,13 +91,13 @@ public class AdministerServiceImpl extends ServiceImpl<AdministerMapper, Adminis ...@@ -91,13 +91,13 @@ public class AdministerServiceImpl extends ServiceImpl<AdministerMapper, Adminis
}); });
} }
administerPermissionVO.setPermissions(treeList); administerPermissionVO.setPermissions(treeList);
//查询角色 // //查询角色
RoleAdministerMappingDO roleAdministerMappingDO = roleAdministerMappingMapper.selectOne(new QueryWrapper<RoleAdministerMappingDO>() // RoleAdministerMappingDO roleAdministerMappingDO = roleAdministerMappingMapper.selectOne(new QueryWrapper<RoleAdministerMappingDO>()
.lambda() // .lambda()
.eq(RoleAdministerMappingDO::getAdministerId, administerDO.getId())); // .eq(RoleAdministerMappingDO::getAdministerId, administerDO.getId()));
if (null != roleAdministerMappingDO) { // if (null != roleAdministerMappingDO) {
administerPermissionVO.setRole(roleAdministerMappingDO.getRoleId()); // administerPermissionVO.setRole(roleAdministerMappingDO.getRoleId());
} // }
//是不是管理员 //是不是管理员
int count = roleAdministerMappingMapper.selectCount(new QueryWrapper<RoleAdministerMappingDO>() int count = roleAdministerMappingMapper.selectCount(new QueryWrapper<RoleAdministerMappingDO>()
......
...@@ -69,7 +69,6 @@ public class CompanyDictServiceImpl extends ServiceImpl<CompanyDictMapper, Compa ...@@ -69,7 +69,6 @@ public class CompanyDictServiceImpl extends ServiceImpl<CompanyDictMapper, Compa
companyVO.setCompanyPhotoDOS(companyPhotoDOS); companyVO.setCompanyPhotoDOS(companyPhotoDOS);
//标签 //标签
List<CompanyLabelDO> companyLabelDOS = companyLabelMapper.selectList(new QueryWrapper<CompanyLabelDO>() List<CompanyLabelDO> companyLabelDOS = companyLabelMapper.selectList(new QueryWrapper<CompanyLabelDO>()
.lambda() .lambda()
...@@ -127,9 +126,9 @@ public class CompanyDictServiceImpl extends ServiceImpl<CompanyDictMapper, Compa ...@@ -127,9 +126,9 @@ public class CompanyDictServiceImpl extends ServiceImpl<CompanyDictMapper, Compa
CompanyDictDO companyDictDO = new CompanyDictDO(); CompanyDictDO companyDictDO = new CompanyDictDO();
BeanUtils.copyProperties(addCompanyDTO, companyDictDO); BeanUtils.copyProperties(addCompanyDTO, companyDictDO);
if (null != addCompanyDTO.getStationId()){ if (null != addCompanyDTO.getStationId()) {
WorkstationDictDO workstationDictDO = workstationDictMapper.selectById(addCompanyDTO.getStationId()); WorkstationDictDO workstationDictDO = workstationDictMapper.selectById(addCompanyDTO.getStationId());
if (null != workstationDictDO){ if (null != workstationDictDO) {
companyDictDO.setCompanyOrigin(workstationDictDO.getWorkstationName()); companyDictDO.setCompanyOrigin(workstationDictDO.getWorkstationName());
} }
} }
...@@ -147,7 +146,7 @@ public class CompanyDictServiceImpl extends ServiceImpl<CompanyDictMapper, Compa ...@@ -147,7 +146,7 @@ public class CompanyDictServiceImpl extends ServiceImpl<CompanyDictMapper, Compa
} }
Long stationId = addCompanyDTO.getStationId(); Long stationId = addCompanyDTO.getStationId();
if (null != stationId){ if (null != stationId) {
CompanyRelateWorkDO companyRelateWorkDO = new CompanyRelateWorkDO(); CompanyRelateWorkDO companyRelateWorkDO = new CompanyRelateWorkDO();
companyRelateWorkDO.setCompanyId(companyDictDO.getId()); companyRelateWorkDO.setCompanyId(companyDictDO.getId());
companyRelateWorkDO.setStationId(stationId); companyRelateWorkDO.setStationId(stationId);
...@@ -205,25 +204,25 @@ public class CompanyDictServiceImpl extends ServiceImpl<CompanyDictMapper, Compa ...@@ -205,25 +204,25 @@ public class CompanyDictServiceImpl extends ServiceImpl<CompanyDictMapper, Compa
stringBuffer.append("企业标签、"); stringBuffer.append("企业标签、");
} }
if (!companyDictDO.getCompanyName().equals(addCompanyDTO.getCompanyName())) { if (null != companyDictDO.getCompanyName() && !companyDictDO.getCompanyName().equals(addCompanyDTO.getCompanyName())) {
stringBuffer.append("企业名称、"); stringBuffer.append("企业名称、");
} }
if (!companyDictDO.getProvince().equals(addCompanyDTO.getProvince())) { if (null != companyDictDO.getProvince() && !companyDictDO.getProvince().equals(addCompanyDTO.getProvince())) {
stringBuffer.append("省、"); stringBuffer.append("省、");
} }
if (!companyDictDO.getCity().equals(addCompanyDTO.getCity())) { if (null != companyDictDO.getCity() && !companyDictDO.getCity().equals(addCompanyDTO.getCity())) {
stringBuffer.append("市、"); stringBuffer.append("市、");
} }
if (!companyDictDO.getCounty().equals(addCompanyDTO.getCounty())) { if (null != companyDictDO.getCounty() && !companyDictDO.getCounty().equals(addCompanyDTO.getCounty())) {
stringBuffer.append("县、"); stringBuffer.append("县、");
} }
if (!companyDictDO.getPositionId().equals(addCompanyDTO.getPositionId())) { if (null != companyDictDO.getPositionId() && !companyDictDO.getPositionId().equals(addCompanyDTO.getPositionId())) {
stringBuffer.append("经营范围、"); stringBuffer.append("经营范围、");
} }
if (!companyDictDO.getCompanyCode().equals(addCompanyDTO.getCompanyCode())) { if (null != companyDictDO.getCompanyCode() && !companyDictDO.getCompanyCode().equals(addCompanyDTO.getCompanyCode())) {
stringBuffer.append("企业代码、"); stringBuffer.append("企业代码、");
} }
if (!companyDictDO.getCompanyDesc().equals(addCompanyDTO.getCompanyDesc())) { if (null != companyDictDO.getCompanyDesc() && !companyDictDO.getCompanyDesc().equals(addCompanyDTO.getCompanyDesc())) {
stringBuffer.append("企业简介、"); stringBuffer.append("企业简介、");
} }
...@@ -247,7 +246,7 @@ public class CompanyDictServiceImpl extends ServiceImpl<CompanyDictMapper, Compa ...@@ -247,7 +246,7 @@ public class CompanyDictServiceImpl extends ServiceImpl<CompanyDictMapper, Compa
CompanyDictDO companyDictDO1 = this.baseMapper.selectById(companyDictDO.getId()); CompanyDictDO companyDictDO1 = this.baseMapper.selectById(companyDictDO.getId());
BeanUtils.copyProperties(companyDictDO1, companyVO); BeanUtils.copyProperties(companyDictDO1, companyVO);
if (null != companyDictDO1.getPositionId()){ if (null != companyDictDO1.getPositionId()) {
PositionDictDO positionDictDO = positionDictMapper.selectById(companyDictDO1.getPositionId()); PositionDictDO positionDictDO = positionDictMapper.selectById(companyDictDO1.getPositionId());
companyVO.setPositionType(positionDictDO.getPositionType()); companyVO.setPositionType(positionDictDO.getPositionType());
} }
......
...@@ -224,45 +224,43 @@ public class MemberDictServiceImpl extends ServiceImpl<MemberDictMapper, MemberD ...@@ -224,45 +224,43 @@ public class MemberDictServiceImpl extends ServiceImpl<MemberDictMapper, MemberD
memberUpdateHistoryDO.setModule(updateMemberDTO.getModule()); memberUpdateHistoryDO.setModule(updateMemberDTO.getModule());
memberUpdateHistoryDO.setMemberId(memberDictDO.getId()); memberUpdateHistoryDO.setMemberId(memberDictDO.getId());
if (null != updateMemberDTO.getUserName() && !updateMemberDTO.getUserName().equals(memberDictDO1.getUserName())) {
if (!updateMemberDTO.getUserName().equals(memberDictDO1.getUserName())) {
stringBuffer.append("姓名、"); stringBuffer.append("姓名、");
} }
if (!updateMemberDTO.getTelephone().equals(memberDictDO1.getProvince())) { if (null != updateMemberDTO.getTelephone() && !updateMemberDTO.getTelephone().equals(memberDictDO1.getProvince())) {
stringBuffer.append("手机号码、"); stringBuffer.append("手机号码、");
} }
if (!updateMemberDTO.getProvince().equals(memberDictDO1.getProvince())) { if (null != updateMemberDTO.getProvince() && !updateMemberDTO.getProvince().equals(memberDictDO1.getProvince())) {
stringBuffer.append("省、"); stringBuffer.append("省、");
} }
if (!updateMemberDTO.getCity().equals(memberDictDO1.getCity())) { if (null != updateMemberDTO.getCity() && !updateMemberDTO.getCity().equals(memberDictDO1.getCity())) {
stringBuffer.append("市、"); stringBuffer.append("市、");
} }
if (!updateMemberDTO.getCounty().equals(memberDictDO1.getCounty())) { if (null != updateMemberDTO.getCounty() && !updateMemberDTO.getCounty().equals(memberDictDO1.getCounty())) {
stringBuffer.append("县、"); stringBuffer.append("县、");
} }
if (!updateMemberDTO.getAddress().equals(memberDictDO1.getAddress())) { if (null != updateMemberDTO.getAddress() && !updateMemberDTO.getAddress().equals(memberDictDO1.getAddress())) {
stringBuffer.append("具体地址、"); stringBuffer.append("具体地址、");
} }
if (!updateMemberDTO.getEducation().equals(memberDictDO1.getEducation())) { if (null != updateMemberDTO.getEducation() && !updateMemberDTO.getEducation().equals(memberDictDO1.getEducation())) {
stringBuffer.append("学历、"); stringBuffer.append("学历、");
} }
if (!updateMemberDTO.getEducationType().equals(memberDictDO1.getEducationType())) { if (null != updateMemberDTO.getEducationType() && !updateMemberDTO.getEducationType().equals(memberDictDO1.getEducationType())) {
stringBuffer.append("学历类型、"); stringBuffer.append("学历类型、");
} }
if (!updateMemberDTO.getCollegeId().equals(memberDictDO1.getCollegeId())) { if (null != updateMemberDTO.getCollegeId() && !updateMemberDTO.getCollegeId().equals(memberDictDO1.getCollegeId())) {
stringBuffer.append("院校、"); stringBuffer.append("院校、");
} }
if (!updateMemberDTO.getIsPoor().equals(memberDictDO1.getIsPoor())) { if (null != updateMemberDTO.getIsPoor() && !updateMemberDTO.getIsPoor().equals(memberDictDO1.getIsPoor())) {
stringBuffer.append("是否为脱贫劳动力、"); stringBuffer.append("是否为脱贫劳动力、");
} }
if (!updateMemberDTO.getIsMigration().equals(memberDictDO1.getIsMigration())) { if (null != updateMemberDTO.getIsMigration() && !updateMemberDTO.getIsMigration().equals(memberDictDO1.getIsMigration())) {
stringBuffer.append("是否易迁户、"); stringBuffer.append("是否易迁户、");
} }
if (!updateMemberDTO.getIsParty().equals(memberDictDO1.getIsParty())) { if (null != updateMemberDTO.getIsParty() && !updateMemberDTO.getIsParty().equals(memberDictDO1.getIsParty())) {
stringBuffer.append("是否党员、"); stringBuffer.append("是否党员、");
} }
if (!updateMemberDTO.getJobStatus().equals(memberDictDO1.getJobStatus())) { if (null != updateMemberDTO.getJobStatus() && !updateMemberDTO.getJobStatus().equals(memberDictDO1.getJobStatus())) {
stringBuffer.append("就业状态、"); stringBuffer.append("就业状态、");
} }
String opr = stringBuffer.substring(0, stringBuffer.length() - 1) + "”"; String opr = stringBuffer.substring(0, stringBuffer.length() - 1) + "”";
......
...@@ -47,11 +47,8 @@ public class PositionAloneInfoServiceImpl extends ServiceImpl<PositionAloneInfoM ...@@ -47,11 +47,8 @@ public class PositionAloneInfoServiceImpl extends ServiceImpl<PositionAloneInfoM
private PositionDictMapper positionDictMapper; private PositionDictMapper positionDictMapper;
public IPage<AloneRequirementsVO> aloneRequirements(AloneRequirementsDTO aloneRequirementsDTO) { public IPage<AloneRequirementsVO> aloneRequirements(AloneRequirementsDTO aloneRequirementsDTO) {
Page pager = new Page(aloneRequirementsDTO.getPageNum(), aloneRequirementsDTO.getPageSize()); Page pager = new Page(aloneRequirementsDTO.getPageNum(), aloneRequirementsDTO.getPageSize());
IPage<AloneRequirementsVO> aloneRequirementsVOIPage = this.baseMapper.aloneRequirements(pager, aloneRequirementsDTO.getPositionStatus(), aloneRequirementsDTO.getPositionName(), aloneRequirementsDTO.getPositionId(), aloneRequirementsDTO.getProvince(), aloneRequirementsDTO.getCity(), aloneRequirementsDTO.getCounty()); IPage<AloneRequirementsVO> aloneRequirementsVOIPage = this.baseMapper.aloneRequirements(pager, aloneRequirementsDTO.getPositionStatus(), aloneRequirementsDTO.getPositionName(), aloneRequirementsDTO.getPositionId(), aloneRequirementsDTO.getProvince(), aloneRequirementsDTO.getCity(), aloneRequirementsDTO.getCounty());
return aloneRequirementsVOIPage; return aloneRequirementsVOIPage;
} }
...@@ -114,47 +111,47 @@ public class PositionAloneInfoServiceImpl extends ServiceImpl<PositionAloneInfoM ...@@ -114,47 +111,47 @@ public class PositionAloneInfoServiceImpl extends ServiceImpl<PositionAloneInfoM
stringBuffer.append("变更了“"); stringBuffer.append("变更了“");
//id itemName itemStatus companyId jobId infoOrigin province city county //id itemName itemStatus companyId jobId infoOrigin province city county
if (!positionAloneInfoDO1.getPositionName().equals(addAloneDTO.getPositionName())){ if (null != positionAloneInfoDO1.getPositionName() && !positionAloneInfoDO1.getPositionName().equals(addAloneDTO.getPositionName())){
stringBuffer.append("职位名称、"); stringBuffer.append("职位名称、");
} }
if (!positionAloneInfoDO1.getCompanyId().equals(addAloneDTO.getCompanyId())){ if (null != positionAloneInfoDO1.getCompanyId() && !positionAloneInfoDO1.getCompanyId().equals(addAloneDTO.getCompanyId())){
stringBuffer.append("企业名称、"); stringBuffer.append("企业名称、");
} }
if (!positionAloneInfoDO1.getPositionStatus().equals(addAloneDTO.getPositionStatus())){ if (null != positionAloneInfoDO1.getPositionStatus() && !positionAloneInfoDO1.getPositionStatus().equals(addAloneDTO.getPositionStatus())){
stringBuffer.append("招聘状态、"); stringBuffer.append("招聘状态、");
} }
if (!positionAloneInfoDO1.getRequireCounts().equals(addAloneDTO.getRequireCounts())){ if (null != positionAloneInfoDO1.getRequireCounts() && !positionAloneInfoDO1.getRequireCounts().equals(addAloneDTO.getRequireCounts())){
stringBuffer.append("预招人数、"); stringBuffer.append("预招人数、");
} }
if (!positionAloneInfoDO1.getRecruitType().equals(addAloneDTO.getRecruitType())){ if (null != positionAloneInfoDO1.getRecruitType() && !positionAloneInfoDO1.getRecruitType().equals(addAloneDTO.getRecruitType())){
stringBuffer.append("招聘类型、"); stringBuffer.append("招聘类型、");
} }
if (!positionAloneInfoDO1.getPositionDesc().equals(addAloneDTO.getPositionDesc())){ if (null != positionAloneInfoDO1.getPositionDesc() && !positionAloneInfoDO1.getPositionDesc().equals(addAloneDTO.getPositionDesc())){
stringBuffer.append("职位描述、"); stringBuffer.append("职位描述、");
} }
if (!positionAloneInfoDO1.getPositionRequire().equals(addAloneDTO.getPositionRequire())){ if (null != positionAloneInfoDO1.getPositionRequire() && !positionAloneInfoDO1.getPositionRequire().equals(addAloneDTO.getPositionRequire())){
stringBuffer.append("职位要求、"); stringBuffer.append("职位要求、");
} }
if (!positionAloneInfoDO1.getInfoOrigin().equals(addAloneDTO.getInfoOrigin())){ if (null != positionAloneInfoDO1.getInfoOrigin() && !positionAloneInfoDO1.getInfoOrigin().equals(addAloneDTO.getInfoOrigin())){
stringBuffer.append("关联信息、"); stringBuffer.append("关联信息、");
} }
if (!positionAloneInfoDO1.getStartSalary().equals(addAloneDTO.getStartSalary())){ if (null != positionAloneInfoDO1.getStartSalary() && !positionAloneInfoDO1.getStartSalary().equals(addAloneDTO.getStartSalary())){
stringBuffer.append("起薪、"); stringBuffer.append("起薪、");
} }
if (!positionAloneInfoDO1.getEndSalary().equals(addAloneDTO.getEndSalary())){ if (null != positionAloneInfoDO1.getEndSalary() && !positionAloneInfoDO1.getEndSalary().equals(addAloneDTO.getEndSalary())){
stringBuffer.append("止薪、"); stringBuffer.append("止薪、");
} }
if (!positionAloneInfoDO1.getProvince().equals(addAloneDTO.getProvince())||!positionAloneInfoDO1.getCity().equals(addAloneDTO.getCity())||!positionAloneInfoDO1.getCounty().equals(addAloneDTO.getCounty())){ if (null != positionAloneInfoDO1.getProvince() && !positionAloneInfoDO1.getProvince().equals(addAloneDTO.getProvince())||!positionAloneInfoDO1.getCity().equals(addAloneDTO.getCity())||!positionAloneInfoDO1.getCounty().equals(addAloneDTO.getCounty())){
stringBuffer.append("就业地区"); stringBuffer.append("就业地区");
} }
......
...@@ -106,23 +106,23 @@ public class PositionRequireItemServiceImpl extends ServiceImpl<PositionRequireI ...@@ -106,23 +106,23 @@ public class PositionRequireItemServiceImpl extends ServiceImpl<PositionRequireI
stringBuffer.append("变更了“"); stringBuffer.append("变更了“");
//id itemName itemStatus companyId jobId infoOrigin province city county //id itemName itemStatus companyId jobId infoOrigin province city county
if (!positionRequireItemDO1.getItemName().equals(addRequirementsDTO.getItemName())){ if (null != positionRequireItemDO1.getItemName() && !positionRequireItemDO1.getItemName().equals(addRequirementsDTO.getItemName())){
stringBuffer.append("项目名称、"); stringBuffer.append("项目名称、");
} }
if (!positionRequireItemDO1.getCompanyId().equals(addRequirementsDTO.getCompanyId())){ if (null != positionRequireItemDO1.getCompanyId() && !positionRequireItemDO1.getCompanyId().equals(addRequirementsDTO.getCompanyId())){
stringBuffer.append("企业名称、"); stringBuffer.append("企业名称、");
} }
if (!positionRequireItemDO1.getItemStatus().equals(addRequirementsDTO.getItemStatus())){ if (null != positionRequireItemDO1.getItemStatus() && !positionRequireItemDO1.getItemStatus().equals(addRequirementsDTO.getItemStatus())){
stringBuffer.append("招聘状态、"); stringBuffer.append("招聘状态、");
} }
if (!positionRequireItemDO1.getInfoOrigin().equals(addRequirementsDTO.getInfoOrigin())){ if (null != positionRequireItemDO1.getInfoOrigin() && !positionRequireItemDO1.getInfoOrigin().equals(addRequirementsDTO.getInfoOrigin())){
stringBuffer.append("关联信息、"); stringBuffer.append("关联信息、");
} }
if (!positionRequireItemDO1.getProvince().equals(addRequirementsDTO.getProvince())||!positionRequireItemDO1.getCity().equals(addRequirementsDTO.getCity())||!positionRequireItemDO1.getCounty().equals(addRequirementsDTO.getCounty())){ if (null != positionRequireItemDO1.getProvince() && !positionRequireItemDO1.getProvince().equals(addRequirementsDTO.getProvince())||!positionRequireItemDO1.getCity().equals(addRequirementsDTO.getCity())||!positionRequireItemDO1.getCounty().equals(addRequirementsDTO.getCounty())){
stringBuffer.append("就业地区"); stringBuffer.append("就业地区");
} }
......
...@@ -42,6 +42,9 @@ public class TeamDictServiceImpl extends ServiceImpl<TeamDictMapper, TeamDictDO> ...@@ -42,6 +42,9 @@ public class TeamDictServiceImpl extends ServiceImpl<TeamDictMapper, TeamDictDO>
@Autowired @Autowired
private MemberJobInfoMapper memberJobInfoMapper; private MemberJobInfoMapper memberJobInfoMapper;
@Autowired
private RoleAdministerMappingMapper roleAdministerMappingMapper;
public IPage<TeamsVO> teams(TeamsDTO teamsDTO) { public IPage<TeamsVO> teams(TeamsDTO teamsDTO) {
Page pager = new Page(teamsDTO.getPageNum(), teamsDTO.getPageSize()); Page pager = new Page(teamsDTO.getPageNum(), teamsDTO.getPageSize());
return this.baseMapper.teams(pager, teamsDTO.getStationId(), teamsDTO.getTeamName()); return this.baseMapper.teams(pager, teamsDTO.getStationId(), teamsDTO.getTeamName());
...@@ -84,6 +87,19 @@ public class TeamDictServiceImpl extends ServiceImpl<TeamDictMapper, TeamDictDO> ...@@ -84,6 +87,19 @@ public class TeamDictServiceImpl extends ServiceImpl<TeamDictMapper, TeamDictDO>
} }
this.baseMapper.insert(teamDictDO); this.baseMapper.insert(teamDictDO);
if (null != teamDictDO.getMemberId()) {
int cnt = memberTeamMappingMapper.selectCount(new QueryWrapper<MemberTeamMappingDO>()
.lambda()
.eq(MemberTeamMappingDO::getMemberId, teamDictDO.getMemberId())
.eq(MemberTeamMappingDO::getTeamId, teamDictDO.getId()));
if (cnt == 0) {
MemberTeamMappingDO memberTeamMappingDO = new MemberTeamMappingDO();
memberTeamMappingDO.setTeamId(teamDictDO.getId());
memberTeamMappingDO.setMemberId(teamDictDO.getMemberId());
memberTeamMappingMapper.insert(memberTeamMappingDO);
}
}
return ConstantUtils.ADD_SUCCESS; return ConstantUtils.ADD_SUCCESS;
} }
...@@ -114,7 +130,6 @@ public class TeamDictServiceImpl extends ServiceImpl<TeamDictMapper, TeamDictDO> ...@@ -114,7 +130,6 @@ public class TeamDictServiceImpl extends ServiceImpl<TeamDictMapper, TeamDictDO>
} }
} }
return ConstantUtils.SUCCESS_UPDATE; return ConstantUtils.SUCCESS_UPDATE;
} }
...@@ -200,12 +215,19 @@ public class TeamDictServiceImpl extends ServiceImpl<TeamDictMapper, TeamDictDO> ...@@ -200,12 +215,19 @@ public class TeamDictServiceImpl extends ServiceImpl<TeamDictMapper, TeamDictDO>
return totalTeamsVO; return totalTeamsVO;
} }
public List<ProvinceStationTeamVO> provinceStationTeam() { public List<ProvinceStationTeamVO> provinceStationTeam(ProvinceStationTeamDTO provinceStationTeamDTO) {
//判断该角色是管理员还是站长
int count = roleAdministerMappingMapper.selectCount(new QueryWrapper<RoleAdministerMappingDO>()
.lambda()
.eq(RoleAdministerMappingDO::getAdministerId,provinceStationTeamDTO.getUserId())
.eq(RoleAdministerMappingDO::getRoleId,1));
List<ProvinceStationTeamVO> provinceStationTeamVOS = new ArrayList<>(); List<ProvinceStationTeamVO> provinceStationTeamVOS = new ArrayList<>();
List<String> provinces = workstationDictMapper.provinces();
if (count>0){
//先查出所有省 //先查出所有省
List<String> provinces = workstationDictMapper.provinces();
for (String province : provinces) { for (String province : provinces) {
...@@ -231,6 +253,33 @@ public class TeamDictServiceImpl extends ServiceImpl<TeamDictMapper, TeamDictDO> ...@@ -231,6 +253,33 @@ public class TeamDictServiceImpl extends ServiceImpl<TeamDictMapper, TeamDictDO>
provinceStationTeamVO.setProvince(province); provinceStationTeamVO.setProvince(province);
provinceStationTeamVOS.add(provinceStationTeamVO); provinceStationTeamVOS.add(provinceStationTeamVO);
} }
}else {
//站长
for (String province : provinces) {
ProvinceStationTeamVO provinceStationTeamVO = new ProvinceStationTeamVO();
List<WorkstationDictDO> workstationDictDOS = workstationDictMapper.administerProvinceStations(province,provinceStationTeamDTO.getUserId());
List<WorkstationDictVO> workstationDictVOS = new ArrayList<>();
for (WorkstationDictDO workstationDictDO : workstationDictDOS) {
WorkstationDictVO workstationDictVO = new WorkstationDictVO();
BeanUtils.copyProperties(workstationDictDO, workstationDictVO);
List<TeamDictDO> teamDictDOS = this.baseMapper.selectList(new QueryWrapper<TeamDictDO>()
.lambda()
.eq(TeamDictDO::getStationId, workstationDictDO.getId()));
workstationDictVO.setTeamDictDOS(teamDictDOS);
workstationDictVOS.add(workstationDictVO);
provinceStationTeamVO.setWorkstationDictVOS(workstationDictVOS);
}
provinceStationTeamVO.setProvince(province);
provinceStationTeamVOS.add(provinceStationTeamVO);
}
}
return provinceStationTeamVOS; return provinceStationTeamVOS;
} }
......
...@@ -11,6 +11,7 @@ import com.laowu.mapper.PositionItemJobMappingMapper; ...@@ -11,6 +11,7 @@ import com.laowu.mapper.PositionItemJobMappingMapper;
import com.laowu.mapper.PositionRequireItemMapper; import com.laowu.mapper.PositionRequireItemMapper;
import com.laowu.mapper.WorkstationRequireMappingMapper; import com.laowu.mapper.WorkstationRequireMappingMapper;
import com.laowu.model.LibJobSortDO; import com.laowu.model.LibJobSortDO;
import com.laowu.model.PositionItemInfoDO;
import com.laowu.model.PositionRequireItemDO; import com.laowu.model.PositionRequireItemDO;
import com.laowu.model.WorkstationRequireMappingDO; import com.laowu.model.WorkstationRequireMappingDO;
import com.laowu.service.WorkstationRequireMappingService; import com.laowu.service.WorkstationRequireMappingService;
...@@ -90,9 +91,19 @@ public class WorkstationRequireMappingServiceImpl extends ServiceImpl<Workstatio ...@@ -90,9 +91,19 @@ public class WorkstationRequireMappingServiceImpl extends ServiceImpl<Workstatio
PositionRequireItemDO positionRequireItemDO = positionRequireItemMapper.selectById(requireId); PositionRequireItemDO positionRequireItemDO = positionRequireItemMapper.selectById(requireId);
PositionRequireItemDO positionRequireItemDO1 = new PositionRequireItemDO(); PositionRequireItemDO positionRequireItemDO1 = new PositionRequireItemDO();
BeanUtils.copyProperties(positionRequireItemDO1,positionRequireItemDO); BeanUtils.copyProperties(positionRequireItemDO,positionRequireItemDO1);
positionRequireItemDO1.setOriginId(positionRequireItemDO.getId());
positionRequireItemMapper.insert(positionRequireItemDO1); positionRequireItemMapper.insert(positionRequireItemDO1);
List<PositionItemInfoDO> positionItemInfoDOS = positionItemInfoMapper.selectList(new QueryWrapper<PositionItemInfoDO>()
.lambda()
.eq(PositionItemInfoDO::getPositionRequireId,requireId));
for (PositionItemInfoDO positionItemInfoDO : positionItemInfoDOS){
PositionItemInfoDO positionItemInfoDO1 = new PositionItemInfoDO();
BeanUtils.copyProperties(positionItemInfoDO,positionItemInfoDO1);
positionItemInfoDO1.setPositionRequireId(positionRequireItemDO1.getId());
positionItemInfoMapper.insert(positionItemInfoDO1);
}
WorkstationRequireMappingDO workstationRequireMappingDO = new WorkstationRequireMappingDO(); WorkstationRequireMappingDO workstationRequireMappingDO = new WorkstationRequireMappingDO();
workstationRequireMappingDO.setRequireId(positionRequireItemDO1.getId()); workstationRequireMappingDO.setRequireId(positionRequireItemDO1.getId());
......
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
AND t2.delete_date IS NULL AND t2.delete_date IS NULL
AND t3.delete_date IS NULL AND t3.delete_date IS NULL
AND t4.delete_date IS NULL AND t4.delete_date IS NULL
AND t4.id IS NOT NULL
<if test="id !=null and id !=''"> <if test="id !=null and id !=''">
and t.administer_id = #{id} and t.administer_id = #{id}
</if> </if>
......
...@@ -57,6 +57,7 @@ ...@@ -57,6 +57,7 @@
AND t2.delete_date IS NULL AND t2.delete_date IS NULL
and t3.delete_date IS NULL and t3.delete_date IS NULL
and t4.delete_date IS NULL and t4.delete_date IS NULL
and t.origin_id is null
<if test="positionStatus!= null and positionStatus!=''"> <if test="positionStatus!= null and positionStatus!=''">
AND t.position_status = #{positionStatus} AND t.position_status = #{positionStatus}
</if> </if>
......
...@@ -41,6 +41,7 @@ ...@@ -41,6 +41,7 @@
t.delete_date IS NULL t.delete_date IS NULL
AND t2.delete_date IS NULL AND t2.delete_date IS NULL
and t3.delete_date is null and t3.delete_date is null
and t.origin_id is null
<if test="itemName != null and itemName != ''"> <if test="itemName != null and itemName != ''">
and t.item_name like concat('%', #{itemName}, '%') and t.item_name like concat('%', #{itemName}, '%')
</if> </if>
......
...@@ -156,7 +156,9 @@ ...@@ -156,7 +156,9 @@
AND t1.delete_date IS NULL AND t1.delete_date IS NULL
AND t2.delete_date IS NULL AND t2.delete_date IS NULL
AND t3.delete_date IS NULL AND t3.delete_date IS NULL
AND t4.delete_date IS NULL UNION AND t4.delete_date IS NULL
and t4.id is not null
UNION
SELECT SELECT
t1.id, t1.id,
t4.company_name t4.company_name
...@@ -171,6 +173,7 @@ ...@@ -171,6 +173,7 @@
AND t2.delete_date IS NULL AND t2.delete_date IS NULL
AND t3.delete_date IS NULL AND t3.delete_date IS NULL
AND t4.delete_date IS NULL AND t4.delete_date IS NULL
and t4.id is not null
) t5 ) t5
) t7 ON t1.id = t7.id ) t7 ON t1.id = t7.id
LEFT JOIN ( LEFT JOIN (
...@@ -193,7 +196,7 @@ ...@@ -193,7 +196,7 @@
AND t3.delete_date IS NULL UNION AND t3.delete_date IS NULL UNION
SELECT SELECT
t1.id, t1.id,
t4.require_counts sum(t4.require_counts) as require_counts
FROM FROM
workstation_dict t1 workstation_dict t1
LEFT JOIN workstation_require_mapping t2 ON t1.id = t2.station_id LEFT JOIN workstation_require_mapping t2 ON t1.id = t2.station_id
...@@ -205,6 +208,7 @@ ...@@ -205,6 +208,7 @@
AND t2.delete_date IS NULL AND t2.delete_date IS NULL
AND t3.delete_date IS NULL AND t3.delete_date IS NULL
AND t4.delete_date IS NULL AND t4.delete_date IS NULL
group by t1.id
) t5 ) t5
) t8 ON t1.id = t8.id ) t8 ON t1.id = t8.id
WHERE WHERE
......
...@@ -42,6 +42,7 @@ ...@@ -42,6 +42,7 @@
AND t2.delete_date IS NULL AND t2.delete_date IS NULL
and t3.delete_date is null and t3.delete_date is null
and t4.delete_date is null and t4.delete_date is null
and t.origin_id is null
<if test="itemName != null and itemName != ''"> <if test="itemName != null and itemName != ''">
and t.item_name like concat('%', #{itemName}, '%') and t.item_name like concat('%', #{itemName}, '%')
</if> </if>
...@@ -63,6 +64,9 @@ ...@@ -63,6 +64,9 @@
<if test="stationId != null and stationId != ''"> <if test="stationId != null and stationId != ''">
and t4.station_id = #{stationId} and t4.station_id = #{stationId}
</if> </if>
<if test="stationId == null ">
and t.origin_id is null
</if>
</select> </select>
<select id="requiresStations" parameterType="long" resultType="long"> <select id="requiresStations" parameterType="long" resultType="long">
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!