|
@@ -25,6 +25,8 @@ import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
+import java.math.BigDecimal;
|
|
|
+import java.math.RoundingMode;
|
|
|
import java.time.LocalDateTime;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
@@ -114,7 +116,7 @@ public class ProjectReportServiceImpl implements ProjectReportService {
|
|
|
throw exception(REPORT_IS_NOT_EXISTS);
|
|
|
}
|
|
|
//填报待审核或者已通过不允许修改
|
|
|
- if (ProjectReportStatusEnum.AUDIT.getValue().equals(projectReport.getReportStatus()) || (ProjectReportStatusEnum.PASS.getValue().equals(projectReport.getReportStatus()))) {
|
|
|
+ if (ProjectReportStatusEnum.AUDIT.getValue().equals(projectReport.getReportStatus())) {
|
|
|
throw exception(REPORT_IS_SUBMITTED);
|
|
|
}
|
|
|
String createWorker = projectReport.getCreateWorker();
|
|
@@ -156,7 +158,7 @@ public class ProjectReportServiceImpl implements ProjectReportService {
|
|
|
} else {
|
|
|
projectReport.setReportAuditorId("");
|
|
|
projectReport.setReportStatus(ProjectReportStatusEnum.PASS.getValue());
|
|
|
- projectReport.setPassProgress(projectReport.getReportProgress());
|
|
|
+ projectReport.setPassProgress(projectReport.getReportProgress().divide(new BigDecimal("100"), 2, RoundingMode.HALF_UP));
|
|
|
}
|
|
|
projectReport.setLatestModifyTime(null);
|
|
|
projectReport.setLatestModifyWorker(null);
|
|
@@ -226,4 +228,11 @@ public class ProjectReportServiceImpl implements ProjectReportService {
|
|
|
List<ProjectReport> checkedList = projectReportMapper.getListByIds(reportIds);
|
|
|
return ProjectReportConvert.INSTANCE.convertList01(checkedList);
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public Integer getCheckNum() {
|
|
|
+ ProjectReportPeriod currentReportPeriod = projectReportPeriodService.getCurrentReportPeriod();
|
|
|
+ List<ProjectReport> checkList = projectReportMapper.getCheckList(SecurityFrameworkUtils.getLoginUserId(), currentReportPeriod.getId());
|
|
|
+ return checkList.size();
|
|
|
+ }
|
|
|
}
|