| | |
| | | |
| | | // 查询厂家密度 |
| | | String supplierDensity = ""; |
| | | SampleProductDto sampleProductDto = list.get(0); |
| | | if (CollectionUtils.isNotEmpty(list)) { |
| | | SampleProductDto sampleProductDto = list.get(0); |
| | | |
| | | // 判断有没有绑定型号 |
| | | String modelValue = insSampleMapper.selectSupplierDensityModel(sampleProductDto.getSample(), |
| | | order.getProduction(), |
| | | sampleProductDto.getModel()); |
| | | if (StringUtils.isNotBlank(modelValue)) { |
| | | supplierDensity = modelValue; |
| | | } else { |
| | | supplierDensity = insSampleMapper.selectSupplierDensity(sampleProductDto.getSample(), |
| | | order.getProduction()); |
| | | // 判断有没有绑定型号 |
| | | String modelValue = insSampleMapper.selectSupplierDensityModel(sampleProductDto.getSample(), |
| | | order.getProduction(), |
| | | sampleProductDto.getModel()); |
| | | if (StringUtils.isNotBlank(modelValue)) { |
| | | supplierDensity = modelValue; |
| | | } else { |
| | | supplierDensity = insSampleMapper.selectSupplierDensity(sampleProductDto.getSample(), |
| | | order.getProduction()); |
| | | } |
| | | } |
| | | map.put("supplierDensity", supplierDensity); |
| | | return map; |
| | |
| | | |
| | | /** |
| | | * todo: type : 1: 获取检测人员信息 |
| | | type : 2: 获取当前部门(实验室人员) |
| | | type : 2: 获取当前登录用户部门下的所有用户 |
| | | * @param user |
| | | * @param type |
| | | * @return |
| | |
| | | port: 8001 |
| | | servlet: |
| | | # 应用的访问路径 |
| | | context-path: /lims |
| | | context-path: |
| | | tomcat: |
| | | # tomcat的URI编码 |
| | | uri-encoding: UTF-8 |
| | |
| | | # 国际化资源文件路径 |
| | | basename: i18n/messages |
| | | profiles: |
| | | active: ztzb |
| | | active: druid |
| | | # 全局时间处理 LocalDateTime时间序列号 |
| | | jackson: |
| | | date-format: yyyy-MM-dd HH:mm:ss |
| | |
| | | url: https://ztt-sso.asuncloud.net |
| | | clientId: 47ded514-f447-43b4-afdf-181c10e2222d |
| | | clientSecret: appSecret:ea93d26a68863da5d71a6e3355ec22df |
| | | callbackUrl: https://ztzb-lims.ztt.cn/logindemo |
| | | callbackUrl: https://ztzb-lims.ztt.cn/thirdpartylogin |
| | | |
| | | |
| | |
| | | * @return |
| | | */ |
| | | UserVo getUserNow(@Param("userId") int userId); |
| | | |
| | | /** |
| | | * 获取检测人员信息 |
| | | * @return |
| | | */ |
| | | List<User> selectQualityUserList(); |
| | | |
| | | /** |
| | | * 获取当前登录用户部门下的所有用户 |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | List<User> selectDepartmentLimsUserList(@Param("userId") Integer userId); |
| | | |
| | | |
| | | } |
| | | |
| | |
| | | import com.ruoyi.common.core.domain.entity.User; |
| | | import com.ruoyi.common.utils.QueryWrappers; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.system.domain.vo.UserVo; |
| | | import com.ruoyi.system.mapper.UserMapper; |
| | | import com.ruoyi.system.service.UserService; |
| | |
| | | |
| | | /** |
| | | * 根据条件获取用户列表 |
| | | * * todo: type : 1: 获取检测人员信息 |
| | | * type : 2: 获取当前登录用户部门下的所有用户 |
| | | * @param user |
| | | * @param type |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<User> selectUserCondition(User user, String type) { |
| | | if (StringUtils.isNotEmpty(type)) { |
| | | |
| | | switch (type) { |
| | | case "1": |
| | | return baseMapper.selectQualityUserList(); |
| | | case "2": |
| | | return baseMapper.selectDepartmentLimsUserList(SecurityUtils.getUserId().intValue()); |
| | | } |
| | | |
| | | } |
| | | |
| | | return baseMapper.selectUserCondition(QueryWrappers.queryWrappers(user), type); |
| | | } |
| | | |
| | |
| | | @Override |
| | | public int upUserDepardLimsId(String ids, String id) { |
| | | List<Integer> userIds = JSON.parseArray(ids, Integer.class); |
| | | return baseMapper.update(null, Wrappers.<User>lambdaUpdate().in(User::getId, userIds).set(User::getDepartLimsId, id).set(User::getUpdateTime, LocalDateTime.now()).set(User::getUpdateBy,SecurityUtils.getLoginUser().getUsername())); |
| | | return baseMapper.update(null, Wrappers.<User>lambdaUpdate().in(User::getId, userIds).set(User::getDepartLimsId, id).set(User::getUpdateTime, LocalDateTime.now()).set(User::getUpdateBy, SecurityUtils.getLoginUser().getUsername())); |
| | | } |
| | | |
| | | /** |
| | |
| | | company, |
| | | is_custom |
| | | from user |
| | | where del_flag = '0') a |
| | | where del_flag = '0' |
| | | and id != ) a |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | | ${ew.customSqlSegment} |
| | | </if> |
| | |
| | | left join custom c on u.company = c.id |
| | | where u.id = #{userId} |
| | | </select> |
| | | |
| | | <!-- 获取检测人员信息 --> |
| | | <select id="selectQualityUserList" resultType="com.ruoyi.common.core.domain.entity.User"> |
| | | select u1.id, |
| | | u1.account, |
| | | u1.name, |
| | | u1.age, |
| | | u1.email, |
| | | u1.phone, |
| | | u1.company, |
| | | u1.is_custom, |
| | | u1.signature_url, |
| | | u1.picture_url, |
| | | u1.name_en, |
| | | u1.depart_lims_id |
| | | from user u1 |
| | | left join sys_user_role sur on sur.user_id = u1.id |
| | | where sur.role_id not in (1, 15, 16, 17) |
| | | and u1.status = '0' |
| | | group by u1.id |
| | | </select> |
| | | |
| | | <!-- 获取当前登录用户部门下的所有用户 --> |
| | | <select id="selectDepartmentLimsUserList" resultType="com.ruoyi.common.core.domain.entity.User"> |
| | | select id, |
| | | account, |
| | | name, |
| | | name_en |
| | | from user u |
| | | where depart_lims_id = (select u2.depart_lims_id |
| | | from user u2 |
| | | where u2.id = #{userId}) |
| | | </select> |
| | | |
| | | </mapper> |