|
|
@@ -54,6 +54,12 @@ public class AppCockpitServiceImpl implements AppCockpitService {
|
|
|
@Qualifier(ThreadPoolConfig.SOC_EXECUTOR)
|
|
|
private ThreadPoolTaskExecutor threadPoolTaskExecutor;
|
|
|
|
|
|
+ /**
|
|
|
+ * 履职排名
|
|
|
+ *
|
|
|
+ * @param dto
|
|
|
+ * @return
|
|
|
+ */
|
|
|
@Override
|
|
|
public List<AppTaskRankingVo> taskRanking(AppTaskRankingDto dto) {
|
|
|
DateRange range = DateUtils.getStartAndEnd(dto.getMonth(), CycleCommonEnum.MONTHLY);
|
|
|
@@ -102,18 +108,23 @@ public class AppCockpitServiceImpl implements AppCockpitService {
|
|
|
return r;
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 基础信息
|
|
|
+ *
|
|
|
+ * @return
|
|
|
+ */
|
|
|
@Override
|
|
|
public AppBaseInfoVo baseInfo() {
|
|
|
SysOrg org = remoteOrgService.selectOrgById(SecurityUtils.getLoginUser().getOrgId(), SecurityConstants.INNER);
|
|
|
if (ObjectUtil.isNull(org)) {
|
|
|
- throw new ServiceException("登录机构不存在");
|
|
|
+ throw new ServiceException("登录机构不存在");
|
|
|
}
|
|
|
|
|
|
AppBaseInfoVo vo = new AppBaseInfoVo();
|
|
|
- AppOrgBaseInfoDto baseInfoDto=appCockpitMapper.selectOrgBaseInfo(org.getPath());
|
|
|
+ AppOrgBaseInfoDto baseInfoDto = appCockpitMapper.selectOrgBaseInfo(org.getPath());
|
|
|
vo.setSecurityFacilities(new AppBaseInfoSecurityFacilitiesVo());
|
|
|
- vo.getSecurityFacilities().setGa382015(baseInfoDto.getBankingGA382015()+baseInfoDto.getOffATMGA382015());
|
|
|
- vo.getSecurityFacilities().setGa382021(baseInfoDto.getBankingGA382021()+baseInfoDto.getOffATMGA382021());
|
|
|
+ vo.getSecurityFacilities().setGa382015(baseInfoDto.getBankingGA382015() + baseInfoDto.getOffATMGA382015());
|
|
|
+ vo.getSecurityFacilities().setGa382021(baseInfoDto.getBankingGA382021() + baseInfoDto.getOffATMGA382021());
|
|
|
vo.getSecurityFacilities().setGa38Unreached(baseInfoDto.getUnreachedCount());
|
|
|
|
|
|
vo.setBanking2021(new AppGa38RateVo());
|
|
|
@@ -133,23 +144,23 @@ public class AppCockpitServiceImpl implements AppCockpitService {
|
|
|
vo.getOfflineATM2015().setRate(computeRate(baseInfoDto.getOffATMCount(), baseInfoDto.getOffATMGA382015()));
|
|
|
|
|
|
vo.setBusinessStoreInfo(new HashMap<>());
|
|
|
- vo.getBusinessStoreInfo().put("一类库",baseInfoDto.getBusinessLibraryOne());
|
|
|
- vo.getBusinessStoreInfo().put("二类库",baseInfoDto.getBusinessLibraryTwo());
|
|
|
- vo.getBusinessStoreInfo().put("三类库",baseInfoDto.getBusinessLibraryThree());
|
|
|
- vo.getBusinessStoreInfo().put("四类库",baseInfoDto.getBusinessLibraryFour());
|
|
|
+ vo.getBusinessStoreInfo().put("一类库", baseInfoDto.getBusinessLibraryOne());
|
|
|
+ vo.getBusinessStoreInfo().put("二类库", baseInfoDto.getBusinessLibraryTwo());
|
|
|
+ vo.getBusinessStoreInfo().put("三类库", baseInfoDto.getBusinessLibraryThree());
|
|
|
+ vo.getBusinessStoreInfo().put("四类库", baseInfoDto.getBusinessLibraryFour());
|
|
|
|
|
|
vo.setSecurityPeopleInfo(new HashMap<>());
|
|
|
vo.getSecurityPeopleInfo().put("已配备", baseInfoDto.getOrgWithSecurityCount());
|
|
|
- vo.getSecurityPeopleInfo().put("未配备",baseInfoDto.getBankingCount()-baseInfoDto.getOrgWithSecurityCount());
|
|
|
+ vo.getSecurityPeopleInfo().put("未配备", baseInfoDto.getBankingCount() - baseInfoDto.getOrgWithSecurityCount());
|
|
|
|
|
|
vo.setOnlineATMPropertyRight(new HashMap<>());
|
|
|
- vo.getOnlineATMPropertyRight().put("穿墙式设备",baseInfoDto.getOffATMWallDeviceCount());
|
|
|
- vo.getOnlineATMPropertyRight().put("大堂式设备",baseInfoDto.getOffATMObbyDeviceCount());
|
|
|
+ vo.getOnlineATMPropertyRight().put("穿墙式设备", baseInfoDto.getOffATMWallDeviceCount());
|
|
|
+ vo.getOnlineATMPropertyRight().put("大堂式设备", baseInfoDto.getOffATMObbyDeviceCount());
|
|
|
|
|
|
vo.setOfflineATMPropertyRight(new HashMap<>());
|
|
|
- vo.getOfflineATMPropertyRight().put("穿墙式设备",baseInfoDto.getOffATMWallDeviceCount());
|
|
|
- vo.getOfflineATMPropertyRight().put("大堂式设备",baseInfoDto.getOffATMObbyDeviceCount());
|
|
|
- return vo;
|
|
|
+ vo.getOfflineATMPropertyRight().put("穿墙式设备", baseInfoDto.getOffATMWallDeviceCount());
|
|
|
+ vo.getOfflineATMPropertyRight().put("大堂式设备", baseInfoDto.getOffATMObbyDeviceCount());
|
|
|
+ return vo;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -235,21 +246,41 @@ public class AppCockpitServiceImpl implements AppCockpitService {
|
|
|
return vo;
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public AppSyntheticResumptionVo syntheticResumption(Date month) {
|
|
|
+ return new AppSyntheticResumptionVo();
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public AppSyntheticQuestionVo syntheticQuestion(Date month) {
|
|
|
+ return new AppSyntheticQuestionVo();
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public AppSyntheticSafetycheckVo syntheticSafetyCheck(Date month) {
|
|
|
+ return new AppSyntheticSafetycheckVo();
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public AppSyntheticOtherVo syntheticOther(Date month) {
|
|
|
+ return new AppSyntheticOtherVo();
|
|
|
+ }
|
|
|
+
|
|
|
private AppOverviewItemVo computeOverviewItem(AppOverviewTaskInfoDto dto) {
|
|
|
|
|
|
AppOverviewItemVo vo = new AppOverviewItemVo();
|
|
|
- if(ObjectUtil.isNull(dto)){
|
|
|
+ if (ObjectUtil.isNull(dto)) {
|
|
|
vo.setShouldComplete(0);
|
|
|
vo.setCurrentCompletedCount(0);
|
|
|
vo.setCurrentCompletedRate(0F);
|
|
|
vo.setCompare(0F);
|
|
|
-
|
|
|
- return vo;
|
|
|
+
|
|
|
+ return vo;
|
|
|
}
|
|
|
vo.setCurrentCompletedCount(dto.getCompleted());
|
|
|
vo.setShouldComplete(dto.getTotal());
|
|
|
- vo.setCurrentCompletedRate(computeRate(dto.getTotal(),dto.getCompleted()));
|
|
|
- float prevRate =computeRate(dto.getPrevTotal(),dto.getPrevCompleted());
|
|
|
+ vo.setCurrentCompletedRate(computeRate(dto.getTotal(), dto.getCompleted()));
|
|
|
+ float prevRate = computeRate(dto.getPrevTotal(), dto.getPrevCompleted());
|
|
|
vo.setPrevCompletedRate(prevRate);
|
|
|
vo.setCompare(vo.getCurrentCompletedRate() - prevRate);
|
|
|
|
|
|
@@ -266,7 +297,7 @@ public class AppCockpitServiceImpl implements AppCockpitService {
|
|
|
*/
|
|
|
private AppOverviewItemVo computeGa38(int total, int completed, int currentCompleted, int prevCompleted) {
|
|
|
AppOverviewItemVo vo = new AppOverviewItemVo();
|
|
|
- vo.setCurrentCompletedRate(computeRate(total,completed));
|
|
|
+ vo.setCurrentCompletedRate(computeRate(total, completed));
|
|
|
vo.setCompare(((float) currentCompleted) - prevCompleted);
|
|
|
vo.setCurrentCompletedCount(currentCompleted);
|
|
|
return vo;
|
|
|
@@ -274,15 +305,16 @@ public class AppCockpitServiceImpl implements AppCockpitService {
|
|
|
|
|
|
/**
|
|
|
* 计算比例
|
|
|
+ *
|
|
|
* @param total
|
|
|
* @param divisor
|
|
|
* @return
|
|
|
*/
|
|
|
- private float computeRate(Integer total,Integer divisor){
|
|
|
+ private float computeRate(Integer total, Integer divisor) {
|
|
|
if (ObjectUtil.equal(total, 0) || ObjectUtil.isNull(total)) {
|
|
|
return 1F;
|
|
|
} else if (ObjectUtil.equal(divisor, 0) || ObjectUtil.isNull(divisor)) {
|
|
|
- return 0F;
|
|
|
+ return 0F;
|
|
|
} else {
|
|
|
return (divisor.floatValue() / total.floatValue());
|
|
|
}
|