|
@@ -19,6 +19,7 @@ package com.qunzhixinxi.hnqz.admin.service.impl;
|
|
|
import cn.hutool.core.bean.BeanUtil;
|
|
|
import cn.hutool.core.collection.CollUtil;
|
|
|
import cn.hutool.core.collection.CollectionUtil;
|
|
|
+import cn.hutool.core.util.ArrayUtil;
|
|
|
import cn.hutool.core.util.DesensitizedUtil;
|
|
|
import cn.hutool.core.util.NumberUtil;
|
|
|
import cn.hutool.core.util.RandomUtil;
|
|
@@ -546,7 +547,7 @@ public class WmScorePackageServiceImpl extends ServiceImpl<WmScorePackageMapper,
|
|
|
// wmScorePackage.setDeptId(deptId);
|
|
|
// wmScorePackage.setTypeid("0,1,2");
|
|
|
// wmScorePackage.setSendPackageDeptId(wmScorePackage.getRelatedService());
|
|
|
- List<WmScorePackage> packageList = this.getScorePackagekfpjf(deptId, new String[]{"0", "1", "2"});
|
|
|
+ List<WmScorePackage> packageList = this.getScorePackagekfpjf(deptId, new String[]{"0", "1", "2"}, null);
|
|
|
|
|
|
for (WmScorePackage wmScorePackage1 : packageList) {
|
|
|
List<WmScoreTaskType> taskTypelist = wmScoreTaskTypeMapper.getScoreTaskTypeByScoreId(wmScorePackage1.getId());
|
|
@@ -3177,19 +3178,26 @@ public class WmScorePackageServiceImpl extends ServiceImpl<WmScorePackageMapper,
|
|
|
/**
|
|
|
* 获取指定企业下积分包的可分配积分值
|
|
|
*
|
|
|
- * @param deptId 企业id
|
|
|
- * @param typeIds 企业类型
|
|
|
+ * @param deptId 企业id
|
|
|
+ * @param typeIds 企业类型
|
|
|
+ * @param packageIds 积分包id
|
|
|
* @return 结果
|
|
|
*/
|
|
|
@Override
|
|
|
- public List<WmScorePackage> getScorePackagekfpjf(Integer deptId, String[] typeIds) {
|
|
|
+ public List<WmScorePackage> getScorePackagekfpjf(Integer deptId, String[] typeIds, String[] packageIds) {
|
|
|
// 查询企业下的积分包
|
|
|
- List<WmScorePackage> packages = this.list(Wrappers.<WmScorePackage>lambdaQuery()
|
|
|
- .eq(WmScorePackage::getDeptId, deptId)
|
|
|
+ LambdaQueryWrapper<WmScorePackage> queryWrapper = Wrappers.<WmScorePackage>lambdaQuery()
|
|
|
.in(WmScorePackage::getTypeid, typeIds)
|
|
|
.eq(WmScorePackage::getDelFlag, DelEnum.NOT_DEL.val())
|
|
|
.eq(WmScorePackage::getEnableFlag, EnableEnum.ENABLE.val())
|
|
|
- .eq(WmScorePackage::getOldPackage, "0"));
|
|
|
+ .eq(WmScorePackage::getOldPackage, "0");
|
|
|
+ if (deptId != null) {
|
|
|
+ queryWrapper.eq(WmScorePackage::getDeptId, deptId);
|
|
|
+ }
|
|
|
+ if (ArrayUtil.isNotEmpty(packageIds)) {
|
|
|
+ queryWrapper.in(WmScorePackage::getId, packageIds);
|
|
|
+ }
|
|
|
+ List<WmScorePackage> packages = this.list(queryWrapper);
|
|
|
|
|
|
if (CollUtil.isNotEmpty(packages)) {
|
|
|
// 查询积分包的子包
|