示例#1
0
 @Override
 public List<AssemblyVO> getAssembliesAtAppEnvByStatus(
     int appId, AppEnvEnum appEnvEnum, IntegrationStatusEnum integrationStatus) {
   List<AssemblyDO> dos = new ArrayList<>();
   switch (appEnvEnum) {
     case DEV:
       dos = assemblyDOMapper.selectAssembliesInDev(appId, integrationStatus.getDescription());
       break;
     case TEST:
       dos = assemblyDOMapper.selectAssembliesInTest(appId, integrationStatus.getDescription());
       break;
     case PRE:
       dos = assemblyDOMapper.selectAssembliesInPre(appId, integrationStatus.getDescription());
       break;
     case PRD:
       dos =
           assemblyDOMapper.selectAssembliesInPrd(
               appId, IntegrationStatusEnum.TOPUBLISH.getDescription());
       break;
   }
   List<AssemblyVO> vos = new ArrayList<AssemblyVO>();
   for (AssemblyDO dO : dos) {
     AssemblyVO vo = BaseConvertor.convert(dO, AssemblyVO.class);
     loadAssemblyUsers(vo);
     vo.setGmtPlanToPublish(DateUtil.formatDateOnly(dO.getGmtPlanToPublish()));
     switch (appEnvEnum) {
       case DEV:
         if (dO.getCodeReviewer() == null) {
           vo.setCodeReviewer("");
         }
         if (dO.getSelfTester() == null) {
           vo.setSelfTester("");
         }
         vo.setGmtCodeReview(DateUtil.formatDateTime(dO.getGmtCodeReview()));
         vo.setGmtSelfTest(DateUtil.formatDateTime(dO.getGmtSelfTest()));
         break;
       case TEST:
         if (dO.getTestEnvTester() == null) {
           vo.setTestEnvTester("");
         }
         if (dO.getPublishAssessor() == null) {
           vo.setPublishAssessor("");
         }
         vo.setGmtTestVerify(DateUtil.formatDateTime(dO.getGmtTestVerify()));
         vo.setGmtRiskSubmit(DateUtil.formatDateTime(dO.getGmtRiskSubmit()));
         vo.setGmtPublishAssessment(DateUtil.formatDateTime(dO.getGmtPublishAssessment()));
         break;
       case PRE:
         if (dO.getPreEnvTester() == null) {
           vo.setPreEnvTester("");
         }
         vo.setGmtPreVerify(DateUtil.formatDateTime(dO.getGmtPreVerify()));
         break;
       default:
         break;
     }
     vos.add(vo);
   }
   return vos;
 }
示例#2
0
 private List<AssemblyVO> convertPublishedAssemblyDOs2VOs(List<AssemblyDO> dos) {
   List<AssemblyVO> vos = new ArrayList<>();
   for (AssemblyDO dO : dos) {
     AssemblyVO vo = BaseConvertor.convert(dO, AssemblyVO.class);
     vo.setGmtPlanToPublish(DateUtil.formatDateOnly(dO.getGmtPlanToPublish()));
     vo.setGmtActualPublish(DateUtil.formatDateTime(dO.getGmtActualPublish()));
     vo.setGmtCodeReview(DateUtil.formatDateTime(dO.getGmtCodeReview()));
     vo.setGmtSelfTest(DateUtil.formatDateTime(dO.getGmtSelfTest()));
     vo.setGmtTestVerify(DateUtil.formatDateTime(dO.getGmtTestVerify()));
     vo.setGmtRiskSubmit(DateUtil.formatDateTime(dO.getGmtRiskSubmit()));
     vo.setGmtPublishAssessment(DateUtil.formatDateTime(dO.getGmtPublishAssessment()));
     vo.setGmtPreVerify(DateUtil.formatDateTime(dO.getGmtPreVerify()));
     loadAssemblyUsers(vo);
     vos.add(vo);
   }
   return vos;
 }