计划调整

This commit is contained in:
pengjie 2024-09-12 19:37:16 +08:00
parent 8879cd1472
commit 593e1feaa9
3 changed files with 8 additions and 8 deletions

View File

@ -374,7 +374,7 @@ public class ProgressPanoramaNodePlanController {
Map<String, Object> stateMap = new HashMap();
stateMap.put("total", list.size());
stateMap.put("unStart", list.stream().filter(l -> l.getStatus() == 0).count());
stateMap.put("inProgress", list.stream().filter(l -> l.getStatus() == 1 && DateUtil.parseDate(l.getFinishDate()).compareTo(new Date()) >= 0).count());
stateMap.put("inProgress", list.stream().filter(l -> l.getStatus() == 1).count());
stateMap.put("delay", list.stream().filter(l -> l.getStatus() == 2).count());
stateMap.put("delayCompletion", list.stream().filter(l -> l.getStatus() == 3).count());
stateMap.put("completion", list.stream().filter(l -> l.getStatus() == 4).count());

View File

@ -150,7 +150,10 @@
LEFT JOIN system_cities d ON a.city_code = d.cityid
LEFT JOIN system_areas e ON a.area_code = e.areaid
Left JOIN company f ON b.parent_id = f.company_id
WHERE a.nature = #{param.nature}
WHERE 1 = 1
<if test="param.nature != null and param.nature != ''">
and a.nature = #{param.nature}
</if>
<if test="param.headquartersSn != null and param.headquartersSn != ''">
and b.headquarters_sn = #{param.headquartersSn}
</if>

View File

@ -37,9 +37,7 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.ReflectionUtils;
import javax.jnlp.IntegrationService;
import java.lang.reflect.Field;
import java.nio.charset.StandardCharsets;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.stream.Collectors;
@ -418,7 +416,6 @@ public class ProgressPanoramaNodePlanServiceImpl extends ServiceImpl<ProgressPan
wrapper.eq(ProgressPanoramaNodePlan::getApprovalStatue, 0);
this.update(wrapper);
updateProjectState(progressPanoramaNodePlan.getProjectSn(), 1);
sendPlan(progressPanoramaNodePlan.getProjectSn());
return true;
}
@ -442,7 +439,7 @@ public class ProgressPanoramaNodePlanServiceImpl extends ServiceImpl<ProgressPan
LambdaUpdateWrapper<ProgressPanoramaNodePlan> wrapper = Wrappers.<ProgressPanoramaNodePlan>lambdaUpdate();
wrapper.set(ProgressPanoramaNodePlan::getApprovalStatue, 0);
wrapper.ne(ProgressPanoramaNodePlan::getApprovalStatue, 0);
wrapper.eq(ProgressPanoramaNodePlan::getStatus, 1);
wrapper.eq(ProgressPanoramaNodePlan::getStatus, 0);
wrapper.eq(ProgressPanoramaNodePlan::getProjectSn, projectSn);
updateProjectState(projectSn, 0);
this.update(wrapper);
@ -464,9 +461,9 @@ public class ProgressPanoramaNodePlanServiceImpl extends ServiceImpl<ProgressPan
planDraft = progressPanoramaNodePlanDraftService.getOne(Wrappers.<ProgressPanoramaNodePlanDraft>lambdaQuery()
.eq(ProgressPanoramaNodePlanDraft::getId, nodePlan.getId()));
DictionaryItem planType1 = dictionaryItemService.getDict("plan_type", progressPanoramaNodePlan.getType(), null);
nodePlan.setTypeName(planType1.getName());
nodePlan.setTypeName(planType1 == null ? "" : planType1.getName());
DictionaryItem planType = dictionaryItemService.getDict("plan_type", planDraft.getType(), null);
planDraft.setTypeName(planType.getName());
planDraft.setTypeName(planType == null ? "" : planType.getName());
if (planDraft.getUpdateFlag() != null && planDraft.getUpdateFlag() == 1) {
BeanUtils.copyProperties(nodePlan, planDraft);
} else {