Compare commits

...

3 Commits

Author SHA1 Message Date
furongxin
0af1800e20 fix(bpm): 修复流程任务页面用户和部门条件的逻辑错误
- 将判断用户 ID 的逻辑优先于部门 ID
- 当用户 ID 存在时,只返回该用户 ID
- 当用户 ID 不存在但部门 ID 存在时,按部门获取用户列表
2025-01-07 14:41:40 +08:00
furongxin
d8440645b8 fix(bpm): 修复采购类型为 3 的数据未显示问题
- 在 BpmOAProcureMapper.xml 文件中,修改了 procure_type 的查询条件
-增加了对类型为 3 的采购数据的查询,确保这类数据能够正确显示
2025-01-06 20:06:31 +08:00
furongxin
10f044147c fix(dept): 修复部门类型查询和处理相关问题
-修复公司名称处理中的空指针异常
- 增加对总部公司的查询条件
- 为工厂信息中的部门设置正确的类型
2025-01-06 19:00:20 +08:00
5 changed files with 9 additions and 3 deletions

View File

@ -103,7 +103,7 @@ public class BpmProcessCcController {
.collect(Collectors.joining("")));
// 设置公司名称
data.setCompanyName(data.getCompanyDeptId().stream()
.map(item -> deptMap.get(item).getName())
.map(item -> deptMap.get(item) != null ? deptMap.get(item).getName() : "")
.collect(Collectors.joining("")));
});
return success(respVOPageResult);

View File

@ -233,7 +233,9 @@ public class BpmTaskServiceImpl implements BpmTaskService {
// 判断搜索条件是否选择用户
List<Long> userIds = null;
if (pageVO.getDeptId() != null) {
if (pageVO.getUserId() != null) {
userIds = Collections.singletonList(pageVO.getUserId());
}else if (pageVO.getDeptId() != null) {
List<AdminUserRespDTO> users = adminUserApi.getUserByDeptIdAll(pageVO.getDeptId()).getCheckedData();
userIds = users.stream().map(AdminUserRespDTO::getId).collect(Collectors.toList());

View File

@ -30,7 +30,7 @@
AND a.pay_flag = 0
AND a.deleted = 0
<if test="type != null">
AND a.procure_type = #{type}
AND (a.procure_type = #{type} or a.procure_type = 3)
</if>
</select>
</mapper>

View File

@ -334,6 +334,8 @@ public class DeptServiceImpl implements DeptService {
return deptMapper.selectList(new LambdaQueryWrapperX<DeptDO>()
.eq(DeptDO::getType, DeptTypeEnum.COMPANY.getValue())
.or()
.eq(DeptDO::getType, DeptTypeEnum.HEAD_COMPANY.getValue())
.eq(DeptDO::getVirtuallyStatus, 0)
.eq(DeptDO::getStatus, CommonStatusEnum.ENABLE.getStatus()));
}

View File

@ -2,6 +2,7 @@ package cn.iocoder.yudao.module.smartfactory.service.factoryinfo;
import cn.hutool.core.collection.CollectionUtil;
import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum;
import cn.iocoder.yudao.framework.common.enums.DeptTypeEnum;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
import cn.iocoder.yudao.framework.ip.core.Area;
@ -71,6 +72,7 @@ public class FactoryInfoServiceImpl implements FactoryInfoService {
deptRespDTO.setParentId(169L); //这里设置上级部门为 生产部
deptRespDTO.setLeaderUserId(createReqVO.getLeaderUserId());
deptRespDTO.setStatus(CommonStatusEnum.ENABLE.getStatus());
deptRespDTO.setType(DeptTypeEnum.PRODUCTION_DEPT.getValue());
deptRespDTO.setVirtuallyStatus(0);
deptApi.createDept(deptRespDTO);
}