|
@@ -20,6 +20,7 @@ import cn.hutool.core.bean.BeanUtil;
|
|
|
import cn.hutool.core.collection.CollUtil;
|
|
|
import cn.hutool.core.collection.CollectionUtil;
|
|
|
import cn.hutool.core.util.DesensitizedUtil;
|
|
|
+import cn.hutool.core.util.NumberUtil;
|
|
|
import cn.hutool.core.util.RandomUtil;
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
import com.alibaba.csp.sentinel.util.StringUtil;
|
|
@@ -2885,7 +2886,6 @@ public class WmScorePackageServiceImpl extends ServiceImpl<WmScorePackageMapper,
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
public Boolean terminatePackageForPersonal(String packageId, UpmsType.TerminatePackageType terminatePackageType) {
|
|
|
Integer userId = SecurityUtils.getUser().getId();
|
|
|
- Integer deptId = SecurityUtils.getUser().getDeptId();
|
|
|
LocalDateTime now = LocalDateTime.now();
|
|
|
|
|
|
// 查询积分包
|
|
@@ -3021,6 +3021,12 @@ public class WmScorePackageServiceImpl extends ServiceImpl<WmScorePackageMapper,
|
|
|
if (!StrUtil.equalsAny(scorePackage.getTypeid(), "0", "1", "2")) {
|
|
|
throw new RuntimeException("请选择企业承接的大包");
|
|
|
}
|
|
|
+ if (ScorePackageStatusEnum.TERMINATED.val().equals(scorePackage.getScorePackageStatus())) {
|
|
|
+ throw new RuntimeException("积分包已终止");
|
|
|
+ }
|
|
|
+ if (scorePackage.getKfpjf() <= 0) {
|
|
|
+ throw new RuntimeException("积分包已全部分派");
|
|
|
+ }
|
|
|
|
|
|
log.info("当前积分包终止前数据:{}", scorePackage);
|
|
|
if (UpmsType.TerminatePackageType.ALL.equals(terminatePackageType)) {
|