|
@@ -18,6 +18,7 @@ import com.qmth.sop.business.service.SysUserService;
|
|
|
import com.qmth.sop.business.service.TBUserArchivesSupplierService;
|
|
|
import com.qmth.sop.common.enums.CrmStatusEnum;
|
|
|
import com.qmth.sop.common.enums.DeviceStatusEnum;
|
|
|
+import com.qmth.sop.common.enums.InOutTypeEnum;
|
|
|
import com.qmth.sop.common.util.ServletUtil;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
@@ -65,33 +66,17 @@ public class ServiceAnalyseServiceImpl extends ServiceImpl<ServiceAnalyseMapper,
|
|
|
finish[0] = finish[0] + 1;
|
|
|
}
|
|
|
});
|
|
|
-// list.stream().collect(Collectors.groupingBy(map1 -> map1.get("crm_no")))
|
|
|
-// .forEach((k, v) -> {
|
|
|
-// v.stream().filter(map3->map3.get("type")!=null).collect(Collectors.groupingBy(map2 -> map2.get("type"))).forEach((k1, v1) -> {
|
|
|
-// if (ProductTypeEnum.OFFICE.toString().equals(k1)) {
|
|
|
-// if (v1.stream().anyMatch(map3 -> "FINISH".equals(map3.get("status"))) && v1.stream().noneMatch(map3 -> "FINISH".equals(map3.get("START")))) {
|
|
|
-// finish[0] = finish[0] + 1;
|
|
|
-// }
|
|
|
-// } else if (ProductTypeEnum.CLOUD_MARK.toString().equals(k1)) {
|
|
|
-// if (v1.stream().filter(map3 -> map3.get("sop_no") != null).count() == v1.stream().filter(map3 -> "FINISH".equals(map3.get("status"))).count()) {
|
|
|
-// finish[1] = finish[1] + 1;
|
|
|
-// }
|
|
|
-// }
|
|
|
-//
|
|
|
-// });
|
|
|
-//
|
|
|
-// });
|
|
|
-
|
|
|
- map.put("projectProgress", (finish[0])*100 / crmNum);
|
|
|
+
|
|
|
+ map.put("projectProgress", (finish[0]) * 100 / crmNum);
|
|
|
map.put("equipmentOutboundTotal", this.baseMapper.equipmentOutboundTotal(serviceUnitId));
|
|
|
- Integer outboundTotal = this.baseMapper.equipmentOutboundTotal(null);
|
|
|
+ Integer outboundTotal = sysDeviceService.count(new LambdaQueryWrapper<SysDevice>().eq(SysDevice::getBound, InOutTypeEnum.OUT));
|
|
|
int totalDevices = sysDeviceService.count(new LambdaQueryWrapper<SysDevice>().eq(SysDevice::getStatus, DeviceStatusEnum.NORMAL));
|
|
|
- map.put("equipmentOccupancyRate", totalDevices == 0 ? 0 : outboundTotal* 100 / totalDevices);
|
|
|
+ map.put("equipmentOccupancyRate", totalDevices == 0 ? 0 : outboundTotal * 100 / totalDevices);
|
|
|
map.put("servicePersonnelTotal", this.baseMapper.servicePersonnelTotal(serviceUnitId));
|
|
|
//认证有效的人员总数
|
|
|
Integer personnelTotal = this.baseMapper.servicePersonnelTotal(null);
|
|
|
int totalUserArchives = tbUserArchivesSupplierService.countAuthentication();
|
|
|
- map.put("sitePersonnelOccupancyRate", totalUserArchives == 0 ? 0 : personnelTotal* 100 / totalUserArchives);
|
|
|
+ map.put("sitePersonnelOccupancyRate", totalUserArchives == 0 ? 0 : personnelTotal * 100 / totalUserArchives);
|
|
|
return map;
|
|
|
}
|
|
|
|
|
@@ -115,7 +100,7 @@ public class ServiceAnalyseServiceImpl extends ServiceImpl<ServiceAnalyseMapper,
|
|
|
|
|
|
@Override
|
|
|
public List<Map<String, Object>> supplierRole(Long serviceUnitId, Long supplierId) {
|
|
|
- return this.baseMapper.supplierRole(serviceUnitId,supplierId);
|
|
|
+ return this.baseMapper.supplierRole(serviceUnitId, supplierId);
|
|
|
}
|
|
|
|
|
|
@Override
|