|
@@ -46,7 +46,6 @@ import com.qunzhixinxi.hnqz.common.core.constant.CommonConstants;
|
|
|
import com.qunzhixinxi.hnqz.common.core.exception.BizException;
|
|
|
import com.qunzhixinxi.hnqz.common.security.service.HnqzUser;
|
|
|
import com.qunzhixinxi.hnqz.common.security.util.SecurityUtils;
|
|
|
-import com.sun.org.apache.bcel.internal.generic.NEW;
|
|
|
import lombok.AllArgsConstructor;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.data.redis.core.RedisTemplate;
|
|
@@ -116,7 +115,19 @@ public class SysImplementPlanManager {
|
|
|
LocalDateTime now = LocalDateTime.now();
|
|
|
SysImplementPlan plan = BeanUtil.copyProperties(resource, SysImplementPlan.class);
|
|
|
UpmsType.ImplementPlanType planType = resource.getPlanType();
|
|
|
- plan.setPlanState(UpmsType.ImplementPlanType.QRT.equals(planType) ? UpmsState.ImplementPlanState.PASSED : UpmsState.ImplementPlanState.INIT);
|
|
|
+
|
|
|
+ UpmsState.ImplementPlanState state;
|
|
|
+ if (UpmsType.ImplementPlanType.QRT.equals(planType)){
|
|
|
+ state = UpmsState.ImplementPlanState.PASSED;
|
|
|
+ plan.setCheckResult(true);
|
|
|
+ plan.setCheckMessage("通过(审批流程,季度计划自动通过,不需要上级审批)");
|
|
|
+ plan.setCheckTime(now);
|
|
|
+ plan.setChecker(username);
|
|
|
+ } else{
|
|
|
+ state = UpmsState.ImplementPlanState.INIT;
|
|
|
+ }
|
|
|
+
|
|
|
+ plan.setPlanState(state);
|
|
|
plan.setConsignorId(operator.getDeptId());
|
|
|
plan.setCreateBy(username);
|
|
|
plan.setUpdateBy(username);
|
|
@@ -804,7 +815,6 @@ public class SysImplementPlanManager {
|
|
|
UpmsType.ImplementPlanType pt = "年度".equals(item.getPlanType()) ? UpmsType.ImplementPlanType.ANN : UpmsType.ImplementPlanType.QRT;
|
|
|
plan.setPlanType(pt);
|
|
|
plan.setParentId(0);
|
|
|
- plan.setPlanState(UpmsState.ImplementPlanState.INIT);
|
|
|
Long score = Long.valueOf(item.getPlanScore());
|
|
|
plan.setAvailScore(score);
|
|
|
plan.setPlanScore(score);
|
|
@@ -817,16 +827,24 @@ public class SysImplementPlanManager {
|
|
|
LocalDate issue;
|
|
|
LocalDate expiry;
|
|
|
|
|
|
+ UpmsState.ImplementPlanState state;
|
|
|
if (UpmsType.ImplementPlanType.ANN.equals(pt)) {
|
|
|
issue = LocalDate.of(Integer.parseInt(item.getYear()), 1, 1);
|
|
|
expiry = issue.plusYears(1).minusDays(1);
|
|
|
+ state = UpmsState.ImplementPlanState.INIT;
|
|
|
} else {
|
|
|
int qtr = Integer.parseInt(item.getQuarter());
|
|
|
int month = qtr * 3 - 2;
|
|
|
issue = LocalDate.of(Integer.parseInt(item.getYear()), month, 1);
|
|
|
expiry = issue.plusMonths(3).minusDays(1);
|
|
|
+ state = UpmsState.ImplementPlanState.PASSED;
|
|
|
+ plan.setCheckResult(true);
|
|
|
+ plan.setCheckMessage("通过(审批流程,季度计划自动通过,不需要上级审批)");
|
|
|
+ plan.setCheckTime(now);
|
|
|
+ plan.setChecker(username);
|
|
|
}
|
|
|
|
|
|
+ plan.setPlanState(state);
|
|
|
plan.setPlanIssue(issue);
|
|
|
plan.setPlanExpiry(expiry);
|
|
|
|