修改花名册增加人员时userid为空

dev_xd
lj7788@126.com 2025-06-20 14:21:36 +08:00
parent a0630e0036
commit efca395775
3 changed files with 9 additions and 6 deletions

View File

@ -37,11 +37,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap> </resultMap>
<sql id="selectProProjectInfoSubdeptsVo"> <sql id="selectProProjectInfoSubdeptsVo">
select ps.id, ps.com_id, sd.dept_name as com_name, ps.project_id, pi.project_name, ps.sub_dept_type, sdd.dict_label as sub_dept_type_name, ps.sub_dept_name, ps.sub_dept_code, ps.sub_dept_leader_id, ps.sub_dept_leader_name, ps.sub_dept_leader_code, ps.sub_dept_leader_phone, ps.business_license_path, ps.sub_dept_infos, ps.contract_infos, ps.use_dates, ps.start_work_dates, ps.end_work_dates, ps.use_status, ps.approve_status, ps.qr_code, ps.is_del, ps.create_by, ps.create_time, ps.update_by, ps.update_time, ps.remark, ps.source select ps.id, pi.com_id, sd.dept_name as com_name, ps.project_id, pi.project_name, ps.sub_dept_type, sdd.dict_label as sub_dept_type_name, ps.sub_dept_name, ps.sub_dept_code, ps.sub_dept_leader_id, ps.sub_dept_leader_name, ps.sub_dept_leader_code, ps.sub_dept_leader_phone, ps.business_license_path, ps.sub_dept_infos, ps.contract_infos, ps.use_dates, ps.start_work_dates, ps.end_work_dates, ps.use_status, ps.approve_status, ps.qr_code, ps.is_del, ps.create_by, ps.create_time, ps.update_by, ps.update_time, ps.remark, ps.source
from pro_project_info_subdepts ps from pro_project_info_subdepts ps
left join pro_project_info pi on pi.id = ps.project_id left join pro_project_info pi on pi.id = ps.project_id
left join sys_dept sd on sd.dept_id = ps.com_id left join sys_dept sd on sd.dept_id = pi.com_id
left join sys_dict_data sdd on sdd.dict_value = ps.sub_dept_type and sdd.dict_type = 'sub_dept_type' left join sys_dict_data sdd on sdd.dict_value = ps.sub_dept_type and sdd.dict_type = 'sub_dept_type'
</sql> </sql>
<select id="selectProProjectInfoSubdeptsList" parameterType="ProProjectInfoSubdepts" resultMap="ProProjectInfoSubdeptsResult"> <select id="selectProProjectInfoSubdeptsList" parameterType="ProProjectInfoSubdepts" resultMap="ProProjectInfoSubdeptsResult">

View File

@ -5,6 +5,7 @@ import cn.hutool.core.util.NumberUtil;
import com.alibaba.fastjson2.JSONArray; import com.alibaba.fastjson2.JSONArray;
import com.alibaba.fastjson2.JSONObject; import com.alibaba.fastjson2.JSONObject;
import com.yanzhu.common.core.constant.SecurityConstants; import com.yanzhu.common.core.constant.SecurityConstants;
import com.yanzhu.common.core.domain.R;
import com.yanzhu.common.core.enums.*; import com.yanzhu.common.core.enums.*;
import com.yanzhu.common.core.exception.ServiceException; import com.yanzhu.common.core.exception.ServiceException;
import com.yanzhu.common.core.text.Convert; import com.yanzhu.common.core.text.Convert;
@ -234,7 +235,8 @@ public class ProProjectInfoSubdeptsUsersServiceImpl implements IProProjectInfoSu
} }
sysUser.setActiveProjectId(proProjectInfoSubdeptsUsers.getProjectId()); sysUser.setActiveProjectId(proProjectInfoSubdeptsUsers.getProjectId());
Long userId= remoteUserService.registerUserInfo(sysUser, SecurityConstants.INNER).getData(); R<Long> tmp=remoteUserService.registerUserInfo(sysUser, SecurityConstants.INNER);
Long userId= tmp.getData();
proProjectInfoSubdeptsUsers.setUserId(userId); proProjectInfoSubdeptsUsers.setUserId(userId);
int res = proProjectInfoSubdeptsUsersMapper.insertProProjectInfoSubdeptsUsers(proProjectInfoSubdeptsUsers); int res = proProjectInfoSubdeptsUsersMapper.insertProProjectInfoSubdeptsUsers(proProjectInfoSubdeptsUsers);
uniService.syncUniUser(proProjectInfoSubdeptsUsers,true); uniService.syncUniUser(proProjectInfoSubdeptsUsers,true);

View File

@ -444,9 +444,10 @@ function handleExport() {
) )
} }
function makeSelectData(users, type) { function makeSelectData(users, type) {
console.log("--->",users,type)
let objs = {} let objs = {}
users.forEach((it) => { users.forEach((it) => {
let deptName = it.subDeptName let deptName = it.subDeptName||it.projectName
if (!objs[deptName]) { if (!objs[deptName]) {
objs[deptName] = [] objs[deptName] = []
} }