代码提交
This commit is contained in:
parent
be529de737
commit
962a79e63d
|
|
@ -14,6 +14,8 @@ public class TeamGroupBean {
|
|||
private String id;
|
||||
// 所属分包商
|
||||
private String subContractor;
|
||||
// 所属事业部
|
||||
private String department;
|
||||
// 所属项目
|
||||
private String project;
|
||||
private String projectId;
|
||||
|
|
@ -32,6 +34,8 @@ public class TeamGroupBean {
|
|||
// 班组人数
|
||||
private String teamPersonNum;
|
||||
private String keyWord;
|
||||
private String startDate;
|
||||
private String endDate;
|
||||
// 信息评审表
|
||||
private String infoFileUrl;
|
||||
private String applyMan;
|
||||
|
|
@ -39,6 +43,9 @@ public class TeamGroupBean {
|
|||
private String level;
|
||||
private String tableSource;
|
||||
private Integer auditStatus;
|
||||
private String auditStatusName;
|
||||
private Integer personNum;
|
||||
private Integer auditType;
|
||||
|
||||
//班组长信息
|
||||
private String name;
|
||||
|
|
|
|||
|
|
@ -11,8 +11,6 @@ import com.bonus.gs.sub.evaluate.manager.utils.AjaxRes;
|
|||
import com.bonus.gs.sub.evaluate.manager.utils.GlobalConst;
|
||||
import com.bonus.gs.sub.evaluate.manager.utils.UserUtil;
|
||||
import io.swagger.annotations.Api;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
|
@ -319,8 +317,10 @@ public class OrganizationalController extends BaseController<EvaluateBean> {
|
|||
}
|
||||
return ar;
|
||||
}
|
||||
|
||||
/**
|
||||
* 班组注册
|
||||
*
|
||||
* @param bean
|
||||
* @return
|
||||
*/
|
||||
|
|
@ -340,7 +340,62 @@ public class OrganizationalController extends BaseController<EvaluateBean> {
|
|||
return ar;
|
||||
}
|
||||
|
||||
@PostMapping("uploadFaceImg")
|
||||
/**
|
||||
* 班组注册-编辑查看
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "getRegisterTeamGroup", method = RequestMethod.GET)
|
||||
@ResponseBody
|
||||
public AjaxRes getRegisterTeamGroup(TeamGroupBean bean) {
|
||||
AjaxRes ar = getAjaxRes();
|
||||
TeamGroupBean teamGroupBean = service.getRegisterTeamGroup(bean);
|
||||
ar.setSucceed(teamGroupBean);
|
||||
return ar;
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新班组注册 (删除可以复用)
|
||||
*
|
||||
* @param bean
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "updateRegisterTeamGroup", method = RequestMethod.POST)
|
||||
@ResponseBody
|
||||
public AjaxRes updateRegisterTeamGroup(@RequestBody TeamGroupBean bean) {
|
||||
AjaxRes ar = getAjaxRes();
|
||||
if (!UserUtil.isPhone(bean.getPhone())) {
|
||||
ar.setFailMsg("班长手机号格式错误");
|
||||
return ar;
|
||||
}
|
||||
if (!UserUtil.isIdCard(bean.getIdCard())) {
|
||||
ar.setFailMsg("班长身份证号格式错误");
|
||||
return ar;
|
||||
}
|
||||
ar = service.updateRegisterTeamGroup(bean);
|
||||
return ar;
|
||||
}
|
||||
|
||||
/**
|
||||
* 撤回班组注册
|
||||
*
|
||||
* @param bean
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "revokeRegisterTeamGroup", method = RequestMethod.POST)
|
||||
@ResponseBody
|
||||
public AjaxRes revokeRegisterTeamGroup(@RequestBody TeamGroupBean bean) {
|
||||
AjaxRes ar = getAjaxRes();
|
||||
Integer i = service.revokeRegisterTeamGroup(bean);
|
||||
if (i > 0) {
|
||||
ar.success("撤回成功");
|
||||
} else {
|
||||
ar.error("撤回失败");
|
||||
}
|
||||
return ar;
|
||||
}
|
||||
|
||||
@PostMapping("/uploadFaceImg")
|
||||
@ResponseBody
|
||||
public AjaxRes uploadFaceImg(@RequestParam(value = "file", required = false) MultipartFile file) {
|
||||
AjaxRes ar = new AjaxRes();
|
||||
try {
|
||||
|
|
@ -360,14 +415,17 @@ public class OrganizationalController extends BaseController<EvaluateBean> {
|
|||
String fileName = System.currentTimeMillis() + "_" + file.getOriginalFilename();
|
||||
File targetFile = new File(uploadDir, fileName);
|
||||
file.transferTo(targetFile);
|
||||
ar.setSucceed(fileName);
|
||||
String pathName = targetFile.getAbsolutePath();
|
||||
ar.setSucceed(pathName);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
ar.setFailMsg(GlobalConst.DATA_FAIL);
|
||||
}
|
||||
return ar;
|
||||
}
|
||||
@PostMapping("uploadInfo")
|
||||
|
||||
@PostMapping("/uploadInfo")
|
||||
@ResponseBody
|
||||
public AjaxRes uploadInfo(@RequestParam(value = "file", required = false) MultipartFile file) {
|
||||
AjaxRes ar = new AjaxRes();
|
||||
try {
|
||||
|
|
@ -375,7 +433,7 @@ public class OrganizationalController extends BaseController<EvaluateBean> {
|
|||
// 验证文件类型
|
||||
String originalFileName = file.getOriginalFilename();
|
||||
String fileExtension = originalFileName != null ? originalFileName.split("\\.")[1] : "";
|
||||
if (!"doc".equalsIgnoreCase(fileExtension) && !"docx".equalsIgnoreCase(fileExtension)&& !"png".equalsIgnoreCase(fileExtension)&& !"jpg".equalsIgnoreCase(fileExtension)&& !"pdf".equalsIgnoreCase(fileExtension)) {
|
||||
if (!"doc".equalsIgnoreCase(fileExtension) && !"docx".equalsIgnoreCase(fileExtension) && !"png".equalsIgnoreCase(fileExtension) && !"jpg".equalsIgnoreCase(fileExtension) && !"pdf".equalsIgnoreCase(fileExtension)) {
|
||||
ar.setFailMsg("文件类型错误,请上传jpg、png、doc、docx、pdf格式的文件");
|
||||
return ar;
|
||||
}
|
||||
|
|
@ -387,7 +445,8 @@ public class OrganizationalController extends BaseController<EvaluateBean> {
|
|||
String fileName = System.currentTimeMillis() + "_" + file.getOriginalFilename();
|
||||
File targetFile = new File(uploadDir, fileName);
|
||||
file.transferTo(targetFile);
|
||||
ar.setSucceed(fileName);
|
||||
String pathName = targetFile.getAbsolutePath();
|
||||
ar.setSucceed(pathName);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
ar.setFailMsg(GlobalConst.DATA_FAIL);
|
||||
|
|
|
|||
|
|
@ -403,11 +403,11 @@ public class OutsourcerEvaluateController extends BaseController<EvaluateSubBean
|
|||
String deptId = UserUtil.getLoginUser().getDeptId();
|
||||
o.setDeptId(deptId);
|
||||
// 查询该部门是否都已评分
|
||||
Integer num = outsourcerEvaluateDao.selectScore(o);
|
||||
if (num > 0) {
|
||||
ar.setFailMsg("部门评价未完成,请先评价");
|
||||
return ar;
|
||||
}
|
||||
// Integer num = outsourcerEvaluateDao.selectScore(o);
|
||||
// if (num > 0) {
|
||||
// ar.setFailMsg("部门评价未完成,请先评价");
|
||||
// return ar;
|
||||
// }
|
||||
List<String> stringList = outsourcerEvaluateDao.getExaminePersonByDeptAndRoleName("7", "汇总审批人");
|
||||
if (StringUtils.isBlank(o.getEvaluateId())) {
|
||||
ar.setFailMsg("评价ID不能为空");
|
||||
|
|
|
|||
|
|
@ -44,6 +44,12 @@ public class TeamGroupController extends BaseController<TeamGroupBean> {
|
|||
@Value("${upload.dir}")
|
||||
private String uploadDir;
|
||||
|
||||
/**
|
||||
* 获取班组列表
|
||||
*
|
||||
* @param teamGroupBean
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("list")
|
||||
public AjaxRes getList(TeamGroupBean teamGroupBean) {
|
||||
AjaxRes ar = new AjaxRes();
|
||||
|
|
@ -55,6 +61,13 @@ public class TeamGroupController extends BaseController<TeamGroupBean> {
|
|||
}
|
||||
return ar;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取班组注册列表
|
||||
*
|
||||
* @param teamGroupBean
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("registerList")
|
||||
public AjaxRes getRegisterList(TeamGroupBean teamGroupBean) {
|
||||
AjaxRes ar = new AjaxRes();
|
||||
|
|
@ -66,6 +79,23 @@ public class TeamGroupController extends BaseController<TeamGroupBean> {
|
|||
}
|
||||
return ar;
|
||||
}
|
||||
/**
|
||||
* 各事业部审核人、专责、汇总审批
|
||||
*
|
||||
* @param teamGroupBean
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("auditRegisterList")
|
||||
public AjaxRes auditRegisterList(TeamGroupBean teamGroupBean) {
|
||||
AjaxRes ar = new AjaxRes();
|
||||
try {
|
||||
List<TeamGroupBean> teamGroupList = teamGroupService.auditRegisterList(teamGroupBean);
|
||||
ar.setListSucceed(teamGroupList);
|
||||
} catch (Exception e) {
|
||||
ar.setFailMsg(GlobalConst.DATA_FAIL);
|
||||
}
|
||||
return ar;
|
||||
}
|
||||
|
||||
@PostMapping("delTeamGroup")
|
||||
public AjaxRes delTeamGroup(@RequestBody TeamGroupBean teamGroupBean) {
|
||||
|
|
@ -83,6 +113,12 @@ public class TeamGroupController extends BaseController<TeamGroupBean> {
|
|||
return ar;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改班组信息
|
||||
*
|
||||
* @param teamGroupBean
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("updaTeteamGroup")
|
||||
public AjaxRes updaTeteamGroup(@RequestBody TeamGroupBean teamGroupBean) {
|
||||
AjaxRes ar = new AjaxRes();
|
||||
|
|
@ -171,7 +207,8 @@ public class TeamGroupController extends BaseController<TeamGroupBean> {
|
|||
String fileName = System.currentTimeMillis() + "_" + file.getOriginalFilename();
|
||||
File targetFile = new File(uploadDir, fileName);
|
||||
file.transferTo(targetFile);
|
||||
bean.setFaceUrl(fileName);
|
||||
String pathName = targetFile.getAbsolutePath();
|
||||
bean.setFaceUrl(pathName);
|
||||
return teamGroupService.addTeamGroupPerson(bean);
|
||||
} catch (Exception e) {
|
||||
ar.setFailMsg(GlobalConst.DATA_FAIL);
|
||||
|
|
|
|||
|
|
@ -180,6 +180,7 @@ public interface OrganizationalDao{
|
|||
|
||||
Integer insetTeamPerson(OrganizationalBean bean);
|
||||
Integer insetTeamPersonLeader(TeamGroupBean bean);
|
||||
Integer delTeamPersonLeader(TeamGroupBean bean);
|
||||
Integer insetTeamPersonOthers(teamGroupPersonBean bean);
|
||||
|
||||
List<OrganizationalBean> getWorkType(OrganizationalBean bean);
|
||||
|
|
@ -193,4 +194,16 @@ public interface OrganizationalDao{
|
|||
Integer getpParentId(OrganizationalBean bean);
|
||||
|
||||
int addTeamGroup(TeamGroupBean bean);
|
||||
|
||||
int updateTeamGroup(TeamGroupBean bean);
|
||||
|
||||
Integer updateTeamGroupType(OrganizationalBean bean);
|
||||
|
||||
Integer delTeamPersonOthers(TeamGroupBean bean);
|
||||
|
||||
int getUserById(OrganizationalBean o);
|
||||
|
||||
TeamGroupBean getRegisterTeamGroup(TeamGroupBean bean);
|
||||
|
||||
List<teamGroupPersonBean> getTeamPersons(TeamGroupBean teamGroupBean);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -161,4 +161,6 @@ public interface OutsourcerEvaluateDao {
|
|||
Integer selectScore(EvaluateDataBean o);
|
||||
|
||||
Integer getExaminePerson(ExamineBean o);
|
||||
|
||||
List<String> getAuditPersonByDeptAndRoleName(String applyMan );
|
||||
}
|
||||
|
|
|
|||
|
|
@ -60,4 +60,8 @@ public interface TeamGroupDao {
|
|||
Integer delTeamGroupTypePerson(TeamGroupBean teamGroupBean);
|
||||
|
||||
List<TeamGroupBean> getRegisterList(TeamGroupBean teamGroupBean);
|
||||
|
||||
TeamGroupBean getTeamLeader(TeamGroupBean groupBean);
|
||||
|
||||
String getDepartmentName(String applyMan);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -83,4 +83,9 @@ public interface OrganizationalService{
|
|||
List<OrganizationalBean> getProjectSelect(OrganizationalBean bean);
|
||||
|
||||
AjaxRes registerTeamGroup(TeamGroupBean bean);
|
||||
AjaxRes updateRegisterTeamGroup(TeamGroupBean bean);
|
||||
|
||||
Integer revokeRegisterTeamGroup(TeamGroupBean bean);
|
||||
|
||||
TeamGroupBean getRegisterTeamGroup(TeamGroupBean bean);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,7 +10,9 @@ import com.bonus.gs.sub.evaluate.evaluate.dao.ProjectDao;
|
|||
import com.bonus.gs.sub.evaluate.manager.utils.AjaxRes;
|
||||
import com.bonus.gs.sub.evaluate.manager.utils.CipherHelper;
|
||||
import com.bonus.gs.sub.evaluate.manager.utils.StringHelper;
|
||||
import com.bonus.gs.sub.evaluate.manager.utils.UserUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.catalina.security.SecurityUtil;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
|
@ -381,7 +383,7 @@ public class OrganizationalServiceImpl implements OrganizationalService {
|
|||
if (num > 0) {
|
||||
// 新增班组类型
|
||||
mapper.insetTeamGroupType(bean);
|
||||
// 新增班组类型
|
||||
// 新增班组组长
|
||||
mapper.insetTeamPerson(bean);
|
||||
ar.setSucceed("新增成功");
|
||||
return ar;
|
||||
|
|
@ -424,11 +426,13 @@ public class OrganizationalServiceImpl implements OrganizationalService {
|
|||
return ar;
|
||||
}
|
||||
}
|
||||
|
||||
int num;
|
||||
bean.setApplyMan(String.valueOf(UserUtil.getLoginUser().getId()));
|
||||
num = mapper.addTeamGroup(bean);
|
||||
if (num > 0) {
|
||||
// 新增班组类型
|
||||
o.setId(bean.getSubContractor());
|
||||
o.setId(bean.getId());
|
||||
o.setTeamType(bean.getTeamType());
|
||||
mapper.insetTeamGroupType(o);
|
||||
// 新增班组组长
|
||||
|
|
@ -450,6 +454,75 @@ public class OrganizationalServiceImpl implements OrganizationalService {
|
|||
return ar;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxRes updateRegisterTeamGroup(TeamGroupBean bean) {
|
||||
AjaxRes ar = new AjaxRes();
|
||||
try {
|
||||
OrganizationalBean o = new OrganizationalBean();
|
||||
if (StringUtils.isNotBlank(bean.getIdCard()) || StringUtils.isNotBlank(bean.getPhone())) {
|
||||
o.setIdCard(bean.getIdCard());
|
||||
o.setUserPhone(bean.getPhone());
|
||||
if (mapper.getUserById(o) > 0) {
|
||||
ar.setFailMsg("该班长已在其他班组中");
|
||||
return ar;
|
||||
}
|
||||
}
|
||||
for (teamGroupPersonBean teamPersonBean : bean.getTeamPersons()) {
|
||||
if (StringUtils.isNotBlank(teamPersonBean.getIdCard()) || StringUtils.isNotBlank(teamPersonBean.getPhone())) {
|
||||
o.setIdCard(teamPersonBean.getIdCard());
|
||||
o.setUserPhone(teamPersonBean.getPhone());
|
||||
if (mapper.getUserById(o) > 0) {
|
||||
ar.setFailMsg("组员" + teamPersonBean.getName() + "已在其他班组中");
|
||||
return ar;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int num;
|
||||
bean.setApplyMan(String.valueOf(UserUtil.getLoginUser().getId()));
|
||||
num = mapper.updateTeamGroup(bean);
|
||||
if (num > 0) {
|
||||
// 更新班组类型
|
||||
o.setId(bean.getId());
|
||||
o.setTeamType(bean.getTeamType());
|
||||
mapper.updateTeamGroupType(o);
|
||||
// 更新班组组长(先删后增)
|
||||
mapper.delTeamPersonLeader(bean);
|
||||
bean.setIsTeamLeader("0");
|
||||
mapper.insetTeamPersonLeader(bean);
|
||||
// 新增班组成员(先删后增)
|
||||
mapper.delTeamPersonOthers(bean);
|
||||
bean.getTeamPersons().forEach(teamPersonBean -> {
|
||||
teamPersonBean.setId(bean.getId());
|
||||
teamPersonBean.setIsTeamLeader("1");
|
||||
mapper.insetTeamPersonOthers(teamPersonBean);
|
||||
});
|
||||
ar.setSucceed("修改成功");
|
||||
return ar;
|
||||
}
|
||||
ar.setFailMsg("修改失败,请联系管理员");
|
||||
return ar;
|
||||
} catch (Exception e) {
|
||||
logger.error(e.toString(), e);
|
||||
ar.setFailMsg("修改失败,请联系管理员");
|
||||
}
|
||||
return ar;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer revokeRegisterTeamGroup(TeamGroupBean bean) {
|
||||
// 传id 和 auditStatus(0)
|
||||
return mapper.updateTeamGroup(bean);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TeamGroupBean getRegisterTeamGroup(TeamGroupBean bean) {
|
||||
TeamGroupBean teamGroupBean = mapper.getRegisterTeamGroup(bean);
|
||||
// 获取班长和组员信息
|
||||
teamGroupBean.setTeamPersons(mapper.getTeamPersons(teamGroupBean));
|
||||
return teamGroupBean;
|
||||
}
|
||||
|
||||
public static List<OrganizationalBean> buildTree(List<OrganizationalBean> nodes) {
|
||||
// 根节点是没有父节点的节点
|
||||
List<OrganizationalBean> rootNodes = nodes.stream()
|
||||
|
|
|
|||
|
|
@ -31,4 +31,6 @@ public interface TeamGroupService {
|
|||
List<TeamGroupBean> getTeamGroupPersons(TeamGroupBean teamGroupBean);
|
||||
|
||||
List<TeamGroupBean> getRegisterList(TeamGroupBean teamGroupBean);
|
||||
|
||||
List<TeamGroupBean> auditRegisterList(TeamGroupBean teamGroupBean);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ package com.bonus.gs.sub.evaluate.evaluate.service;
|
|||
import com.bonus.gs.sub.evaluate.evaluate.beans.OrganizationalBean;
|
||||
import com.bonus.gs.sub.evaluate.evaluate.beans.TeamGroupBean;
|
||||
import com.bonus.gs.sub.evaluate.evaluate.dao.OrganizationalDao;
|
||||
import com.bonus.gs.sub.evaluate.evaluate.dao.OutsourcerEvaluateDao;
|
||||
import com.bonus.gs.sub.evaluate.evaluate.dao.TeamGroupDao;
|
||||
import com.bonus.gs.sub.evaluate.manager.utils.AesCbcUtils;
|
||||
import com.bonus.gs.sub.evaluate.manager.utils.AjaxRes;
|
||||
|
|
@ -31,6 +32,8 @@ public class TeamGroupServiceImpl implements TeamGroupService {
|
|||
private TeamGroupDao teamGroupDao;
|
||||
@Autowired
|
||||
private OrganizationalDao mapper;
|
||||
@Autowired
|
||||
private OutsourcerEvaluateDao dao;
|
||||
|
||||
@Override
|
||||
public List<TeamGroupBean> getTeamGroupList(TeamGroupBean teamGroupBean) {
|
||||
|
|
@ -249,12 +252,52 @@ public class TeamGroupServiceImpl implements TeamGroupService {
|
|||
@Override
|
||||
public List<TeamGroupBean> getRegisterList(TeamGroupBean teamGroupBean) {
|
||||
List<TeamGroupBean> registerList = teamGroupDao.getRegisterList(teamGroupBean);
|
||||
// for (TeamGroupBean groupBean : registerList) {
|
||||
//
|
||||
// }
|
||||
for (TeamGroupBean groupBean : registerList) {
|
||||
TeamGroupBean teamLeader = teamGroupDao.getTeamLeader(groupBean);
|
||||
groupBean.setTeamLeader(teamLeader.getName());
|
||||
groupBean.setPhone(teamLeader.getPhone());
|
||||
groupBean.setIdCard(teamLeader.getIdCard());
|
||||
groupBean.setPersonNum(teamLeader.getPersonNum());
|
||||
}
|
||||
return registerList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<TeamGroupBean> auditRegisterList(TeamGroupBean teamGroupBean) {
|
||||
List<TeamGroupBean> list = new ArrayList<>();
|
||||
List<TeamGroupBean> registerList = teamGroupDao.getRegisterList(teamGroupBean);
|
||||
if (teamGroupBean.getAuditType() == 1) {
|
||||
// 各事业部审核人
|
||||
for (TeamGroupBean groupBean : registerList) {
|
||||
// 获取申请人的部门审核人
|
||||
List<String> stringList = dao.getAuditPersonByDeptAndRoleName(groupBean.getApplyMan());
|
||||
if (stringList != null && !stringList.isEmpty() && stringList.contains(UserUtil.getLoginUser().getId())) {
|
||||
list.add(groupBean);
|
||||
}
|
||||
}
|
||||
return getTeamLeaderInfo(list);
|
||||
}
|
||||
return getTeamLeaderInfo(registerList);
|
||||
}
|
||||
|
||||
private List<TeamGroupBean> getTeamLeaderInfo(List<TeamGroupBean> list) {
|
||||
for (TeamGroupBean groupBean : list) {
|
||||
TeamGroupBean teamLeader = teamGroupDao.getTeamLeader(groupBean);
|
||||
String departmentName = teamGroupDao.getDepartmentName(teamLeader.getApplyMan());
|
||||
// 所属事业部
|
||||
groupBean.setDepartment(departmentName);
|
||||
// 班长姓名
|
||||
groupBean.setTeamLeader(teamLeader.getName());
|
||||
// 班长手机号
|
||||
groupBean.setPhone(teamLeader.getPhone());
|
||||
// 班长身份证号
|
||||
groupBean.setIdCard(teamLeader.getIdCard());
|
||||
// 注册骨干人员数量
|
||||
groupBean.setPersonNum(teamLeader.getPersonNum());
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
// 处理单行数据
|
||||
private Map<String, String> processRow(String teamId, Row row, Map<String, Boolean> existIdCards, Map<String, Boolean> existPhones) {
|
||||
Map<String, String> rowData = new HashMap<>();
|
||||
|
|
|
|||
|
|
@ -94,6 +94,30 @@
|
|||
set name=#{name}
|
||||
where id = #{id}
|
||||
</update>
|
||||
<update id="updateTeamGroup" useGeneratedKeys="true" keyProperty="id">
|
||||
UPDATE pm_org_info
|
||||
<set>
|
||||
<if test="teamGroupName != null and teamGroupName != ''">name = #{teamGroupName},</if>
|
||||
<if test="level != null">level = #{level},</if>
|
||||
<if test="name != null and name != ''">user_name = #{name},</if>
|
||||
<if test="idCard != null and idCard != ''">id_card = #{idCard},</if>
|
||||
<if test="sex != null">sex = #{sex},</if>
|
||||
<if test="phone != null and phone != ''">user_phone = #{phone},</if>
|
||||
<if test="tableSource != null">table_source = #{tableSource},</if>
|
||||
<if test="subContractor != null and subContractor != ''">p_parent_id = #{subContractor},</if>
|
||||
<if test="auditStatus != null">audit_status = #{auditStatus},</if>
|
||||
<if test="infoFileUrl != null">info_file_url = #{infoFileUrl},</if>
|
||||
<if test="applyMan != null">apply_man = #{applyMan},</if>
|
||||
create_time = sysdate()
|
||||
</set>
|
||||
WHERE id = #{id}
|
||||
</update>
|
||||
<update id="updateTeamGroupType">
|
||||
update team_group_type
|
||||
set team_type = #{teamType}
|
||||
where team_group_id = #{id}
|
||||
</update>
|
||||
|
||||
|
||||
<delete id="deleteUserOut">
|
||||
delete
|
||||
|
|
@ -105,7 +129,12 @@
|
|||
from pt_team_exit
|
||||
where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="delTeamPersonOthers">
|
||||
delete from team_person where id = #{id} and is_team_leader = 1
|
||||
</delete>
|
||||
<delete id="delTeamPersonLeader">
|
||||
delete from team_person WHERE team_id = #{id} and is_team_leader = 0
|
||||
</delete>
|
||||
|
||||
<select id="getDeptSelected" resultType="com.bonus.gs.sub.evaluate.evaluate.beans.OrganizationalBean">
|
||||
select DISTINCT dp.NAME,
|
||||
|
|
@ -279,6 +308,9 @@
|
|||
<if test="tableSource != null">table_source,</if>
|
||||
<if test="subContractor != null and subContractor != ''">p_parent_id,</if>
|
||||
<if test="auditStatus != null">audit_status,</if>
|
||||
<if test="infoFileUrl != null">info_file_url,</if>
|
||||
<if test="applyMan != null">apply_man,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
status,
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
|
|
@ -291,6 +323,9 @@
|
|||
<if test="tableSource != null">#{tableSource},</if>
|
||||
<if test="subContractor != null and subContractor != ''">#{subContractor},</if>
|
||||
<if test="auditStatus != null">#{auditStatus},</if>
|
||||
<if test="infoFileUrl != null">#{infoFileUrl},</if>
|
||||
<if test="applyMan != null">#{applyMan},</if>
|
||||
sysdate(),
|
||||
0
|
||||
</trim>
|
||||
</insert>
|
||||
|
|
@ -408,4 +443,32 @@
|
|||
WHERE
|
||||
id = #{id})
|
||||
</select>
|
||||
<select id="getUserById" resultType="java.lang.Integer">
|
||||
SELECT COUNT(1)
|
||||
FROM team_person
|
||||
WHERE (id_card = #{idCard} OR phone = #{userPhone})
|
||||
AND team_id != #{id}
|
||||
</select>
|
||||
<select id="getRegisterTeamGroup" resultType="com.bonus.gs.sub.evaluate.evaluate.beans.TeamGroupBean">
|
||||
select poi.id,
|
||||
poi.name teamGroupName,
|
||||
poi.p_parent_id subContractor,
|
||||
poi.info_file_url infoFileUrl,
|
||||
tgt.team_type teamType
|
||||
from pm_org_info poi
|
||||
left join team_group_type tgt on tgt.team_group_id = poi.id
|
||||
where poi.id = #{id}
|
||||
</select>
|
||||
<select id="getTeamPersons" resultType="com.bonus.gs.sub.evaluate.evaluate.beans.teamGroupPersonBean">
|
||||
select id,
|
||||
name,
|
||||
id_card idCard,
|
||||
phone,
|
||||
sex,
|
||||
work_type workType,
|
||||
face_url faceUrl,
|
||||
is_team_leader isTeamLeader
|
||||
from team_person
|
||||
where team_id = #{id}
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -316,7 +316,10 @@
|
|||
config_id as templateId,
|
||||
level,
|
||||
child_num as childNum,
|
||||
if(level = '2',concat(target_name,'(',target_score,')'),target_name) as indexName,
|
||||
CASE
|
||||
WHEN level = '2' AND parent_id != '415' THEN CONCAT(target_name, '(', target_score, ')')
|
||||
ELSE target_name
|
||||
END AS indexName,
|
||||
target_score as standardScore,
|
||||
count_type as countType,
|
||||
ifnull(parent_id,'0') as parentId,
|
||||
|
|
@ -859,6 +862,22 @@
|
|||
AND evaluate_node = #{evaluateNode}
|
||||
</if>
|
||||
</select>
|
||||
<select id="getAuditPersonByDeptAndRoleName" resultType="java.lang.String">
|
||||
SELECT
|
||||
userId
|
||||
FROM
|
||||
sys_role_user
|
||||
WHERE
|
||||
userId IN (
|
||||
SELECT
|
||||
id
|
||||
FROM
|
||||
sys_user
|
||||
WHERE
|
||||
org_id = ( SELECT DISTINCT poi.parent_id FROM sys_role_user sru LEFT JOIN pm_org_info poi ON poi.user_id = sru.userId WHERE poi.user_id = #{applyMan})
|
||||
)
|
||||
AND roleId = ( SELECT id FROM sys_role WHERE `name` = '审批人' )
|
||||
</select>
|
||||
|
||||
<update id="updateEvaluateRecordByEvaluateId">
|
||||
update pj_evaluate_record set task_status = #{taskStatus} where evaluate_id = #{evaluateId}
|
||||
|
|
|
|||
|
|
@ -193,13 +193,67 @@
|
|||
</select>
|
||||
<select id="getRegisterList" resultType="com.bonus.gs.sub.evaluate.evaluate.beans.TeamGroupBean">
|
||||
SELECT
|
||||
poi.id,
|
||||
poi.name teamGroupName,
|
||||
poi.apply_man applyMan,
|
||||
poi.create_time createTime
|
||||
poi.create_time createTime,
|
||||
poi.info_file_url infoFileUrl,
|
||||
poi.audit_status auditStatus,
|
||||
CASE
|
||||
WHEN poi.audit_status = 0 THEN '草稿'
|
||||
WHEN poi.audit_status = 1 THEN '待事业部审核'
|
||||
WHEN poi.audit_status = 2 THEN '待专责审核'
|
||||
WHEN poi.audit_status = 3 THEN '待汇总审核'
|
||||
WHEN poi.audit_status = 4 THEN '已通过'
|
||||
WHEN poi.audit_status = 5 THEN '已驳回'
|
||||
END AS auditStatusName
|
||||
FROM
|
||||
pm_org_info poi
|
||||
WHERE
|
||||
poi.audit_status IS NOT NULL
|
||||
AND poi.LEVEL = 5
|
||||
<if test="keyWord != null and keyWord != ''">
|
||||
and poi.name like concat('%',#{keyWord},'%')
|
||||
</if>
|
||||
<if test="status == 0">
|
||||
and poi.audit_status = 0
|
||||
</if>
|
||||
<if test="status != null">
|
||||
and poi.audit_status = #{status}
|
||||
</if>
|
||||
<if test="startDate!=null and startDate!='' and endDate!=null and endDate!=''">
|
||||
AND DATE_FORMAT(poi.create_time, '%Y-%m-%d') BETWEEN #{startDate} AND #{endDate}
|
||||
</if>
|
||||
</select>
|
||||
<select id="getTeamLeader" resultType="com.bonus.gs.sub.evaluate.evaluate.beans.TeamGroupBean">
|
||||
SELECT
|
||||
tp.name AS name,
|
||||
tp.phone AS phone,
|
||||
tp.id_card AS idCard,
|
||||
team_stats.personNum
|
||||
FROM
|
||||
pm_org_info poi
|
||||
INNER JOIN team_person tp ON poi.id = tp.team_id
|
||||
INNER JOIN (
|
||||
SELECT
|
||||
team_id,
|
||||
COUNT(*) AS personNum
|
||||
FROM
|
||||
team_person
|
||||
GROUP BY
|
||||
team_id
|
||||
) AS team_stats ON poi.id = team_stats.team_id
|
||||
WHERE
|
||||
tp.is_team_leader = 0
|
||||
and poi.id = #{id}
|
||||
</select>
|
||||
<select id="getDepartmentName" resultType="java.lang.String">
|
||||
SELECT DISTINCT
|
||||
poi2.name
|
||||
FROM
|
||||
pm_org_info poi
|
||||
left join pm_org_info poi2 on poi.parent_id = poi2.id
|
||||
WHERE
|
||||
poi.user_id = #{applyMan}
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -201,17 +201,19 @@ layui.use(["table", "form", "upload", "tree"], function () {
|
|||
|
||||
formDataWithFile.append("teamGroupName", field.teamGroupName);
|
||||
formDataWithFile.append("subContractor", field.subContractor);
|
||||
formDataWithFile.append("infoFileUrl", file); // 信息评审表
|
||||
formDataWithFile.append("infoFileUrl", file); // 信息评审表url
|
||||
formDataWithFile.append("teamType", field.teamType);
|
||||
formDataWithFile.append("name", field.name);
|
||||
formDataWithFile.append("phone", field.phone);
|
||||
formDataWithFile.append("idCard", field.idCard);
|
||||
formDataWithFile.append("workType", field.workType);
|
||||
formDataWithFile.append("sex", field.sex);
|
||||
formDataWithFile.append("faceUrl", file); // 人脸照片
|
||||
formDataWithFile.append("faceUrl", file); // 人脸照片url
|
||||
formDataWithFile.append("level", 5); // 固定值
|
||||
formDataWithFile.append("tableSource", "pm_dept");
|
||||
formDataWithFile.append("isTeamLeader", 0); // 固定值
|
||||
formDataWithFile.append("auditStatus", 1);
|
||||
formDataWithFile.append("teamPersons", groupMemberList);
|
||||
|
||||
$.ajax({
|
||||
url: ctxPath + "/organizational/registerTeamGroup",
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@
|
|||
}
|
||||
}
|
||||
const isAllNull = keyList.every(item => {
|
||||
return (item !== '' && item * 1 >= 0)
|
||||
return (item !== '')
|
||||
})
|
||||
tableListNew.push({
|
||||
...item,
|
||||
|
|
|
|||
|
|
@ -44,10 +44,11 @@
|
|||
<select id="status" class="layui-select" name="status">
|
||||
<option value="">请选择审核状态</option>
|
||||
<option value="0">草稿</option>
|
||||
<option value="1">待审核</option>
|
||||
<option value="2">审核中</option>
|
||||
<option value="3">已通过</option>
|
||||
<option value="4">已驳回</option>
|
||||
<option value="1">待事业部审核</option>
|
||||
<option value="2">待专责审核</option>
|
||||
<option value="3">待汇总审核</option>
|
||||
<option value="4">已通过</option>
|
||||
<option value="5">已驳回</option>
|
||||
</select>
|
||||
|
||||
<div class="layui-inline" id="timeRange">
|
||||
|
|
|
|||
Loading…
Reference in New Issue