|
|
@@ -0,0 +1,64 @@
|
|
|
+package platform.modules.government.service;
|
|
|
+
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.stereotype.Service;
|
|
|
+import org.springframework.transaction.annotation.Transactional;
|
|
|
+import platform.common.Constant;
|
|
|
+import platform.common.base.service.BaseService;
|
|
|
+import platform.modules.company.dao.StockLandDao;
|
|
|
+import platform.modules.company.entity.StockLand;
|
|
|
+import platform.modules.government.entity.*;
|
|
|
+
|
|
|
+import java.util.*;
|
|
|
+
|
|
|
+/**
|
|
|
+ * 用地统计service
|
|
|
+ */
|
|
|
+@Service
|
|
|
+@Transactional
|
|
|
+public class LandStatisticsService {
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private StockLandDao stockLandDao;
|
|
|
+
|
|
|
+ public Object getApproveStatusStatistics(String streetId) {
|
|
|
+
|
|
|
+ List<StockLand> stockLandList = stockLandDao.findListByStreetId(streetId, null);
|
|
|
+
|
|
|
+ //创建待处理,处理中,已处理
|
|
|
+ List<Map> pending = new ArrayList<>(), processing = new ArrayList<>(), processed = new ArrayList<>();
|
|
|
+ //创建待处理具体
|
|
|
+ Integer pendingCompany = 0, pendingStreet = 0;
|
|
|
+ //创建处理中具体
|
|
|
+ //Integer pendingCompany = 0, pendingStreet = 0;
|
|
|
+ //创建已处理具体
|
|
|
+ Integer processedPassed = 0, processedReject = 0, processedNotPass = 0;
|
|
|
+
|
|
|
+ for (StockLand stockLand : stockLandList) {
|
|
|
+
|
|
|
+ if(Objects.equals(Constant.UserType.STREET,stockLand.getApplyUserType())){
|
|
|
+ pendingStreet++;
|
|
|
+ }else if(Objects.equals(Constant.UserType.COMPANY,stockLand.getApplyUserType())){
|
|
|
+ pendingCompany++;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ //装配待处理具体
|
|
|
+ Map<String,Object> temp = new HashMap<>();
|
|
|
+ temp.put("name", "企业申请");
|
|
|
+ temp.put("value", pendingCompany);
|
|
|
+ pending.add(temp);
|
|
|
+ temp = new HashMap<>();
|
|
|
+ temp.put("name", "街道代理");
|
|
|
+ temp.put("value", pendingStreet);
|
|
|
+ pending.add(temp);
|
|
|
+
|
|
|
+ //最后装配一起返回
|
|
|
+ Map<String, List> map = new HashMap<>();
|
|
|
+ map.put("pending", pending);
|
|
|
+ map.put("processing", processing);
|
|
|
+ map.put("processed", processed);
|
|
|
+ return map;
|
|
|
+ }
|
|
|
+
|
|
|
+}
|