Selaa lähdekoodia

调试履职任务生成

jiawuxian 2 vuotta sitten
vanhempi
commit
039d5728f0

+ 3 - 1
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/TaskCreatingServiceImplBase.java

@@ -44,7 +44,9 @@ public abstract class TaskCreatingServiceImplBase<M extends BaseMapper<T>, T> ex
 
     public Map<Long, Boolean> orgWorkTimeStatusMap(Date now, CycleCommonEnum cycle, List<Long> orgIds) {
         List<SysWorkTime> times = selectWorkTimeList(now, cycle, orgIds);
-        Map<Long, List<SysWorkTime>> map = times.stream().filter(t -> ObjectUtil.equal(t.getIsEnable(), 1)).collect(Collectors.groupingBy(t -> t.getOrgId()));
+        Map<Long, List<SysWorkTime>> map = times.stream()
+                .filter(t -> ObjectUtil.equal(t.getIsEnable(), 1L))
+                .collect(Collectors.groupingBy(t -> t.getOrgId()));
         Map<Long, Boolean> r = new HashMap<>();
         map.forEach((k, v) -> {
             r.put(k, CollectionUtil.isNotEmpty(v));

+ 3 - 0
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/resumption/service/impl/ResumptionServiceImpl.java

@@ -110,6 +110,9 @@ public class ResumptionServiceImpl extends ServiceImpl<ResumptionMapper, Resumpt
     @Override
     @Transactional(readOnly = false, rollbackFor = {Exception.class, RuntimeException.class}, propagation = Propagation.REQUIRES_NEW)
     public void newbuild(Long orgId, ResumptionType type, final Date dateTime, final Boolean isWork, AppPlan appPlan, List<Object> nfcList, List<AppRulePointTaskVo> pointList, List<Long> roleIds, DateTime planstartTime, DateTime planendTime) {
+        if(ObjectUtil.notEqual(isWork,true)){
+            return;
+        }
         Ymd ymd = Ymd.of(dateTime);
         //id使用uuid
         // final Resumption resumption = this.findOrCreate(id,()-> Resumption.newof(orgId,type,ymd,appPlan.getId(), id));