|
@@ -6,6 +6,7 @@ import cn.hutool.core.util.ObjectUtil;
|
|
import cn.hutool.core.util.StrUtil;
|
|
import cn.hutool.core.util.StrUtil;
|
|
import com.zhongzheng.common.exception.CustomException;
|
|
import com.zhongzheng.common.exception.CustomException;
|
|
import com.zhongzheng.common.utils.DateUtils;
|
|
import com.zhongzheng.common.utils.DateUtils;
|
|
|
|
+import com.zhongzheng.common.utils.ServletUtils;
|
|
import com.zhongzheng.common.utils.poi.EasyPoiUtil;
|
|
import com.zhongzheng.common.utils.poi.EasyPoiUtil;
|
|
import com.zhongzheng.modules.bs.staff.bo.*;
|
|
import com.zhongzheng.modules.bs.staff.bo.*;
|
|
import com.zhongzheng.modules.bs.staff.domain.*;
|
|
import com.zhongzheng.modules.bs.staff.domain.*;
|
|
@@ -34,7 +35,11 @@ import com.github.pagehelper.Page;
|
|
import com.zhongzheng.modules.bs.staff.mapper.StaffMapper;
|
|
import com.zhongzheng.modules.bs.staff.mapper.StaffMapper;
|
|
import com.zhongzheng.modules.bs.staff.vo.StaffVo;
|
|
import com.zhongzheng.modules.bs.staff.vo.StaffVo;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
+import org.springframework.web.context.request.RequestAttributes;
|
|
|
|
+import org.springframework.web.context.request.RequestContextHolder;
|
|
|
|
+import org.springframework.web.context.request.ServletRequestAttributes;
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
|
|
+import org.springframework.web.servlet.mvc.condition.RequestConditionHolder;
|
|
|
|
|
|
import java.util.*;
|
|
import java.util.*;
|
|
import java.util.stream.Collectors;
|
|
import java.util.stream.Collectors;
|
|
@@ -247,6 +252,7 @@ public class StaffServiceImpl extends ServiceImpl<StaffMapper, Staff> implements
|
|
if (ObjectUtil.isEmpty(staffIds)) {
|
|
if (ObjectUtil.isEmpty(staffIds)) {
|
|
throw new CustomException("请先勾勾选数据");
|
|
throw new CustomException("请先勾勾选数据");
|
|
}
|
|
}
|
|
|
|
+
|
|
for (Long id : staffIds) {
|
|
for (Long id : staffIds) {
|
|
Staff staff = this.baseMapper.selectById(id);
|
|
Staff staff = this.baseMapper.selectById(id);
|
|
staff.setStatus(0);
|
|
staff.setStatus(0);
|
|
@@ -327,6 +333,7 @@ public class StaffServiceImpl extends ServiceImpl<StaffMapper, Staff> implements
|
|
@Override
|
|
@Override
|
|
public List<StaffVo> getMatchGoods(StaffQueryBo bo) {
|
|
public List<StaffVo> getMatchGoods(StaffQueryBo bo) {
|
|
bo.setStatus(1);
|
|
bo.setStatus(1);
|
|
|
|
+ bo.setCompanyId(Long.valueOf(ServletUtils.getRequest().getHeader("companyId")));
|
|
List<StaffVo> staffVos = this.queryList(bo);
|
|
List<StaffVo> staffVos = this.queryList(bo);
|
|
if (ObjectUtil.isNotEmpty(bo.getConfigId())) {
|
|
if (ObjectUtil.isNotEmpty(bo.getConfigId())) {
|
|
GoodsQueryBo goodsQueryBo = new GoodsQueryBo();
|
|
GoodsQueryBo goodsQueryBo = new GoodsQueryBo();
|
|
@@ -340,9 +347,11 @@ public class StaffServiceImpl extends ServiceImpl<StaffMapper, Staff> implements
|
|
CompanyOrderBusinessConfigGoodsVo companyGoodsVo = bsGoodsPackageList.get(0);
|
|
CompanyOrderBusinessConfigGoodsVo companyGoodsVo = bsGoodsPackageList.get(0);
|
|
if (!staffVos.isEmpty()) {
|
|
if (!staffVos.isEmpty()) {
|
|
staffVos.forEach(item -> {
|
|
staffVos.forEach(item -> {
|
|
- List<StaffEduBg> staffEduBgs = iStaffEduBgService.list(new LambdaQueryWrapper<StaffEduBg>().eq(StaffEduBg::getStaffId, item.getStaffId()).eq(StaffEduBg::getStatus, 1));
|
|
|
|
- item.setDegree(staffEduBgs.stream().map(StaffEduBg::getDegree).collect(Collectors.toList()).toString().replace("[","").replace("]",""));
|
|
|
|
- item.setCourseSubjectList(companyGoodsVo.getCourseSubjectList());
|
|
|
|
|
|
+ List<StaffEduBg> staffEduBgs = iStaffEduBgService.list(new LambdaQueryWrapper<StaffEduBg>().eq(StaffEduBg::getStaffId, item.getStaffId()).eq(StaffEduBg::getStatus, 1).orderByDesc(StaffEduBg::getDegree).last("limit 1"));
|
|
|
|
+ if(!staffEduBgs.isEmpty()){
|
|
|
|
+ item.setDegree(staffEduBgs.stream().map(StaffEduBg::getDegree).collect(Collectors.toList()).toString().replace("[","").replace("]",""));
|
|
|
|
+ item.setCourseSubjectList(companyGoodsVo.getCourseSubjectList());
|
|
|
|
+ }
|
|
});
|
|
});
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -611,17 +620,21 @@ public class StaffServiceImpl extends ServiceImpl<StaffMapper, Staff> implements
|
|
courseSubject.setGoodsName(goodsVo.getGoodsName());
|
|
courseSubject.setGoodsName(goodsVo.getGoodsName());
|
|
courseSubject.setStandPrice(goodsVo.getStandPrice());
|
|
courseSubject.setStandPrice(goodsVo.getStandPrice());
|
|
courseSubject.setGoodsTypeName(this.getGoodType(goodsVo.getGoodsType()));
|
|
courseSubject.setGoodsTypeName(this.getGoodType(goodsVo.getGoodsType()));
|
|
- if (goodsVo.getSubjectNames().contains(item.getSubjectName())) {
|
|
|
|
- if (item.getYear().equals(goodsVo.getYear())) {
|
|
|
|
|
|
+ if (Validator.isNotEmpty(goodsVo.getSubjectNames())){
|
|
|
|
+ if (goodsVo.getSubjectNames().contains(item.getSubjectName())) {
|
|
courseSubject.setSubjectName(item.getSubjectName());
|
|
courseSubject.setSubjectName(item.getSubjectName());
|
|
- courseSubject.setYear(Long.valueOf(item.getYear()));
|
|
|
|
courseSubjects.add(courseSubject);
|
|
courseSubjects.add(courseSubject);
|
|
item.setCourseSubjectList(courseSubjects);
|
|
item.setCourseSubjectList(courseSubjects);
|
|
|
|
+ if (Validator.isNotEmpty(item.getYear())){
|
|
|
|
+ if (item.getYear().equals(goodsVo.getYear())) {
|
|
|
|
+ courseSubject.setYear(Long.valueOf(item.getYear()));
|
|
|
|
+ courseSubjects.add(courseSubject);
|
|
|
|
+ item.setCourseSubjectList(courseSubjects);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}else {
|
|
}else {
|
|
item.setCourseSubjectList(null);
|
|
item.setCourseSubjectList(null);
|
|
}
|
|
}
|
|
- }else {
|
|
|
|
- item.setCourseSubjectList(null);
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|