Commit 432d4b9233ecb6c2836e754e8744a1dae1b500f0
1 parent
e58f1dbf
Exists in
master
开发:项目进展、项目分析表统计信息
Showing
9 changed files
with
341 additions
and
422 deletions
Show diff stats
backend/chkpower/src/main/java/com/hotent/chkpower/controller/WProjectLibraryInventoryController.java
... | ... | @@ -134,7 +134,7 @@ public class WProjectLibraryInventoryController extends BaseController<WProjectL |
134 | 134 | for (WProjectLibraryInventory projectLibraryInventory : list) { |
135 | 135 | HashMap<String, Object> mapSon = new HashMap<>(); |
136 | 136 | mapSon.put("projectNo", projectLibraryInventory.getFProjectNo()); |
137 | - mapSon.put("projectCompany", projectLibraryInventory.getfOrgName()); | |
137 | + mapSon.put("projectCompany", projectLibraryInventory.getFOrgName()); | |
138 | 138 | mapSon.put("warehouseEntryDate", ObjectUtils.isNotEmpty(projectLibraryInventory.getFWarehouseEntryDate()) ? projectLibraryInventory.getFWarehouseEntryDate().format(dateTimeFormatter) : ""); |
139 | 139 | mapSon.put("projectName", projectLibraryInventory.getFProjectName()); |
140 | 140 | mapSon.put("projectCategory", projectLibraryInventory.getFProjectCategory()); |
... | ... | @@ -200,5 +200,21 @@ public class WProjectLibraryInventoryController extends BaseController<WProjectL |
200 | 200 | return CommonResult.<Object>ok().value(baseService.statistics(startDate,endDate)); |
201 | 201 | } |
202 | 202 | |
203 | + @GetMapping(value = "/areaDataAnalysis") | |
204 | + @ApiOperation(value = "区域数据分析", httpMethod = "GET", notes = "区域数据分析") | |
205 | + public CommonResult<Object> areaDataAnalysis(@ApiParam(name = "startDate", value = "开始日期", required = true) @RequestParam(required = true) String startDate | |
206 | + , @ApiParam(name = "endDate", value = "结束日期", required = true) @RequestParam(required = true) String endDate | |
207 | + , @ApiParam(name = "type", value = "类型", required = true) @RequestParam(required = true) String type | |
208 | + , @ApiParam(name = "area", value = "区域", required = true) @RequestParam(required = true) String area) throws Exception { | |
209 | + return CommonResult.<Object>ok().value(baseService.areaDataAnalysis(startDate, endDate, type, area)); | |
210 | + } | |
211 | + | |
212 | + @GetMapping(value = "/areaData") | |
213 | + @ApiOperation(value = "区域数据", httpMethod = "GET", notes = "区域数据") | |
214 | + public CommonResult<Object> areaData(@ApiParam(name = "startDate", value = "开始日期", required = true) @RequestParam(required = true) String startDate | |
215 | + , @ApiParam(name = "endDate", value = "结束日期", required = true) @RequestParam(required = true) String endDate | |
216 | + ) throws Exception { | |
217 | + return CommonResult.<Object>ok().value(baseService.areaData(startDate, endDate)); | |
218 | + } | |
203 | 219 | |
204 | 220 | } | ... | ... |
backend/chkpower/src/main/java/com/hotent/chkpower/dao/WProjectLibraryInventoryDao.java
... | ... | @@ -78,4 +78,11 @@ public interface WProjectLibraryInventoryDao extends BaseMapper<WProjectLibraryI |
78 | 78 | * @return |
79 | 79 | */ |
80 | 80 | List<HashMap<String, Object>> businessModelStatistics(@Param("startDate")String startDate, @Param("endDate")String endDate, @Param("list")ArrayList<String> orgIdList, @Param("swmsList")List<String> swmsList); |
81 | + | |
82 | + List<HashMap<String, Object>> areaDataAnalysis(@Param("startDate")String startDate, @Param("endDate")String endDate,@Param("type") String type,@Param("rq")List<String> rq,@Param("orgIdList")List<String> orgIdList,@Param("area")String area); | |
83 | + | |
84 | + List<String> getRq(@Param("startDate")String startDate, @Param("endDate")String endDate,@Param("type") String type); | |
85 | + | |
86 | + List<HashMap<String, Object>> areaData(@Param("startDate")String startDate, @Param("endDate")String endDate, @Param("orgIdList")ArrayList<String> orgIdList,@Param("areaList") ArrayList<String> areaList); | |
87 | + | |
81 | 88 | } | ... | ... |
backend/chkpower/src/main/java/com/hotent/chkpower/manager/WProjectLibraryInventoryManager.java
... | ... | @@ -4,6 +4,7 @@ import com.hotent.base.manager.BaseManager; |
4 | 4 | import com.hotent.chkpower.model.WProjectLibraryInventory; |
5 | 5 | |
6 | 6 | import java.util.HashMap; |
7 | +import java.util.List; | |
7 | 8 | |
8 | 9 | /** |
9 | 10 | * 项目库清单 服务类 |
... | ... | @@ -30,4 +31,8 @@ public interface WProjectLibraryInventoryManager extends BaseManager<WProjectLib |
30 | 31 | void createOrUpdate(WProjectLibraryInventory wProjectLibraryInventory); |
31 | 32 | |
32 | 33 | HashMap<String,Object> statistics(String startDate, String endDate); |
34 | + | |
35 | + HashMap<String,Object> areaDataAnalysis(String startDate, String endDate,String type,String area); | |
36 | + | |
37 | + List<HashMap<String,Object>> areaData(String startDate, String endDate); | |
33 | 38 | } | ... | ... |
backend/chkpower/src/main/java/com/hotent/chkpower/manager/impl/WProjectLibraryInventoryManagerImpl.java
1 | 1 | package com.hotent.chkpower.manager.impl; |
2 | 2 | |
3 | -import com.baomidou.mybatisplus.core.toolkit.Wrappers; | |
4 | 3 | import com.hotent.base.manager.impl.BaseManagerImpl; |
5 | 4 | import com.hotent.chkpower.dao.WProjectLibraryInventoryDao; |
6 | 5 | import com.hotent.chkpower.manager.WProjectLibraryInventoryManager; |
7 | 6 | import com.hotent.chkpower.model.WProjectLibraryInventory; |
8 | 7 | import com.hotent.runtime.script.ScriptImpl; |
9 | -import org.redisson.transaction.operation.map.MapPutIfAbsentOperation; | |
10 | 8 | import org.springframework.stereotype.Service; |
11 | 9 | import org.springframework.transaction.annotation.Transactional; |
12 | 10 | |
13 | 11 | import javax.annotation.Resource; |
14 | 12 | import java.util.ArrayList; |
15 | -import java.util.Dictionary; | |
16 | 13 | import java.util.HashMap; |
14 | +import java.util.LinkedHashMap; | |
17 | 15 | import java.util.List; |
18 | 16 | |
19 | 17 | |
... | ... | @@ -29,6 +27,8 @@ public class WProjectLibraryInventoryManagerImpl extends BaseManagerImpl<WProjec |
29 | 27 | |
30 | 28 | @Resource |
31 | 29 | private ScriptImpl script; |
30 | + | |
31 | + | |
32 | 32 | @Override |
33 | 33 | public WProjectLibraryInventory getDetail(String id) { |
34 | 34 | WProjectLibraryInventory wProjectLibraryInventory = this.get(id); |
... | ... | @@ -73,4 +73,49 @@ public class WProjectLibraryInventoryManagerImpl extends BaseManagerImpl<WProjec |
73 | 73 | map.put("SWMSZB", swmszbMap); |
74 | 74 | return map; |
75 | 75 | } |
76 | + | |
77 | + @Override | |
78 | + public HashMap<String, Object> areaDataAnalysis(String startDate, String endDate, String type, String area) { | |
79 | + startDate += " 00:00:00"; | |
80 | + endDate += " 23:59:59"; | |
81 | + //获取当前用户所属组织及下属组织id集合 | |
82 | + ArrayList<String> orgIdList = script.getDataPermission("loginUserAllSubOrgs"); | |
83 | + HashMap<String, Object> map = new LinkedHashMap<>(); | |
84 | + List<String> rq = baseMapper.getRq(startDate, endDate, type); | |
85 | + List<HashMap<String, Object>> resultList = baseMapper.areaDataAnalysis(startDate, endDate, type, rq, orgIdList, area); | |
86 | + ArrayList<String> type1 = new ArrayList<>(); | |
87 | + ArrayList<String> type2 = new ArrayList<>(); | |
88 | + ArrayList<String> type3 = new ArrayList<>(); | |
89 | + for (int i = 0; i < rq.size(); i++) { | |
90 | + type1.add(String.valueOf(resultList.get(i).get("type1"))); | |
91 | + type2.add(String.valueOf(resultList.get(i).get("type2"))); | |
92 | + type3.add(String.valueOf(resultList.get(i).get("type3"))); | |
93 | + } | |
94 | + ArrayList<String> rqformat = new ArrayList<>(); | |
95 | + for (String day : rq) { | |
96 | + rqformat.add(day.replace("-", "")); | |
97 | + } | |
98 | + map.put("rq", rqformat); | |
99 | + map.put("type1", type1); | |
100 | + map.put("type2", type2); | |
101 | + map.put("type3", type3); | |
102 | + return map; | |
103 | + } | |
104 | + | |
105 | + @Override | |
106 | + public List<HashMap<String,Object>> areaData(String startDate, String endDate) { | |
107 | + startDate += " 00:00:00"; | |
108 | + endDate += " 23:59:59"; | |
109 | + //获取当前用户所属组织及下属组织id集合 | |
110 | + ArrayList<String> orgIdList = script.getDataPermission("loginUserAllSubOrgs"); | |
111 | + ArrayList<String> areaList = new ArrayList<>(); | |
112 | + areaList.add("华南"); | |
113 | + areaList.add("华北"); | |
114 | + areaList.add("华中"); | |
115 | + areaList.add("华西"); | |
116 | + areaList.add("南京"); | |
117 | + areaList.add("华东"); | |
118 | + List<HashMap<String,Object>> list = baseMapper.areaData(startDate,endDate,orgIdList,areaList); | |
119 | + return list; | |
120 | + } | |
76 | 121 | } | ... | ... |
backend/chkpower/src/main/java/com/hotent/chkpower/manager/impl/WProjectOperationRecordManagerImpl.java
... | ... | @@ -76,6 +76,9 @@ public class WProjectOperationRecordManagerImpl extends BaseManagerImpl<WProject |
76 | 76 | wProjectLibraryInventory.setFProjectState("已入库"); |
77 | 77 | } else if (EventTypeEnum.xiangmujinzhan.getCode().equals(eventTypeEnum.getCode())) { |
78 | 78 | wProjectLibraryInventory.setFProjectDebriefing(wProjectLibraryInventory.getFProjectDebriefing() + "\n" + wProjectOperationRecord.getFProgressStatus()); |
79 | + if (ObjectUtils.isEmpty(wProjectOperationRecord.getfFile())) { | |
80 | + throw new RuntimeException("请上传附件"); | |
81 | + } | |
79 | 82 | } else if (EventTypeEnum.chuku.getCode().equals(eventTypeEnum.getCode())) { |
80 | 83 | wProjectLibraryInventory.setFProjectState("已出库"); |
81 | 84 | } | ... | ... |
backend/chkpower/src/main/java/com/hotent/chkpower/model/WProjectLibraryInventory.java
... | ... | @@ -7,6 +7,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; |
7 | 7 | import com.hotent.base.entity.BaseModel; |
8 | 8 | import io.swagger.annotations.ApiModel; |
9 | 9 | import io.swagger.annotations.ApiModelProperty; |
10 | +import lombok.Data; | |
10 | 11 | |
11 | 12 | import java.io.Serializable; |
12 | 13 | import java.time.LocalDateTime; |
... | ... | @@ -19,6 +20,7 @@ import java.util.ArrayList; |
19 | 20 | * @company 广州宏天软件股份有限公司 |
20 | 21 | * @since 2024-07-12 |
21 | 22 | */ |
23 | +@Data | |
22 | 24 | @ApiModel(value = "WProjectLibraryInventory对象", description = "项目库清单") |
23 | 25 | public class WProjectLibraryInventory extends BaseModel<WProjectLibraryInventory> { |
24 | 26 | |
... | ... | @@ -228,21 +230,51 @@ public class WProjectLibraryInventory extends BaseModel<WProjectLibraryInventory |
228 | 230 | @JsonProperty("fOrgId") |
229 | 231 | private String fOrgId; |
230 | 232 | |
231 | - public String getCreateTime() { | |
232 | - return createTime; | |
233 | - } | |
233 | + @ApiModelProperty(value = "公司类型") | |
234 | + @TableField("F_org_type") | |
235 | + @JsonProperty("fOrgType") | |
236 | + private String fOrgType; | |
234 | 237 | |
235 | - public void setCreateTime(String createTime) { | |
236 | - this.createTime = createTime; | |
237 | - } | |
238 | + @ApiModelProperty(value = "项目所属区域") | |
239 | + @TableField("F_project_area") | |
240 | + @JsonProperty("fProjectArea") | |
241 | + private String fProjectArea; | |
238 | 242 | |
239 | - public String getUpdateTime() { | |
240 | - return updateTime; | |
241 | - } | |
243 | + @ApiModelProperty(value = "是否为本月重点推进项目") | |
244 | + @TableField("F_this_month_key_promoted") | |
245 | + @JsonProperty("fThisMonthKeyPromoted") | |
246 | + private String fThisMonthKeyPromoted; | |
247 | + | |
248 | + @ApiModelProperty(value = "项目所在地省") | |
249 | + @TableField("F_project_province") | |
250 | + @JsonProperty("fProjectProvince") | |
251 | + private String fProjectProvince; | |
252 | + | |
253 | + @ApiModelProperty(value = "项目所在地市") | |
254 | + @TableField("F_project_city") | |
255 | + @JsonProperty("fProjectCity") | |
256 | + private String fProjectCity; | |
257 | + | |
258 | + @ApiModelProperty(value = "项目所在地区") | |
259 | + @TableField("F_project_district") | |
260 | + @JsonProperty("fProjectDistrict") | |
261 | + private String fProjectDistrict; | |
262 | + | |
263 | + @ApiModelProperty(value = "客户类型") | |
264 | + @TableField("F_customer_type") | |
265 | + @JsonProperty("fCustomerType") | |
266 | + private String fCustomerType; | |
267 | + | |
268 | + @ApiModelProperty(value = "推进月份") | |
269 | + @TableField("F_promoted_month") | |
270 | + @JsonProperty("fPromotedMonth") | |
271 | + private String fPromotedMonth; | |
272 | + | |
273 | + @ApiModelProperty(value = "偏差分析附件") | |
274 | + @TableField("F_deviation_analysis_file") | |
275 | + @JsonProperty("fDeviationAnalysisFile") | |
276 | + private String fDeviationAnalysisFile; | |
242 | 277 | |
243 | - public void setUpdateTime(String updateTime) { | |
244 | - this.updateTime = updateTime; | |
245 | - } | |
246 | 278 | |
247 | 279 | @TableField(exist = false) |
248 | 280 | private String createTime;//查询条件:创建时间 |
... | ... | @@ -253,402 +285,6 @@ public class WProjectLibraryInventory extends BaseModel<WProjectLibraryInventory |
253 | 285 | @TableField(exist = false) |
254 | 286 | private ArrayList<String> idList;//导出的数据id集合 |
255 | 287 | |
256 | - public ArrayList<String> getIdList() { | |
257 | - return idList; | |
258 | - } | |
259 | - | |
260 | - public void setIdList(ArrayList<String> idList) { | |
261 | - this.idList = idList; | |
262 | - } | |
263 | - | |
264 | - public String getExportType() { | |
265 | - return exportType; | |
266 | - } | |
267 | - | |
268 | - public void setExportType(String exportType) { | |
269 | - this.exportType = exportType; | |
270 | - } | |
271 | - | |
272 | - public String getId() { | |
273 | - return id; | |
274 | - } | |
275 | - | |
276 | - public void setId(String id) { | |
277 | - this.id = id; | |
278 | - } | |
279 | - | |
280 | - public String getRefId() { | |
281 | - return refId; | |
282 | - } | |
283 | - | |
284 | - public void setRefId(String refId) { | |
285 | - this.refId = refId; | |
286 | - } | |
287 | - | |
288 | - | |
289 | - | |
290 | - public LocalDateTime getFWarehouseEntryDate() { | |
291 | - return fWarehouseEntryDate; | |
292 | - } | |
293 | - | |
294 | - public void setFWarehouseEntryDate(LocalDateTime fWarehouseEntryDate) { | |
295 | - this.fWarehouseEntryDate = fWarehouseEntryDate; | |
296 | - } | |
297 | - | |
298 | - public String getFProjectName() { | |
299 | - return fProjectName; | |
300 | - } | |
301 | - | |
302 | - public void setFProjectName(String fProjectName) { | |
303 | - this.fProjectName = fProjectName; | |
304 | - } | |
305 | - | |
306 | - public String getFProjectCategory() { | |
307 | - return fProjectCategory; | |
308 | - } | |
309 | - | |
310 | - public void setFProjectCategory(String fProjectCategory) { | |
311 | - this.fProjectCategory = fProjectCategory; | |
312 | - } | |
313 | - | |
314 | - public String getFBusinessScenarios() { | |
315 | - return fBusinessScenarios; | |
316 | - } | |
317 | - | |
318 | - public void setFBusinessScenarios(String fBusinessScenarios) { | |
319 | - this.fBusinessScenarios = fBusinessScenarios; | |
320 | - } | |
321 | - | |
322 | - public String getFSmartHeating() { | |
323 | - return fSmartHeating; | |
324 | - } | |
325 | - | |
326 | - public void setFSmartHeating(String fSmartHeating) { | |
327 | - this.fSmartHeating = fSmartHeating; | |
328 | - } | |
329 | - | |
330 | - public String getFEnergyEfficiency() { | |
331 | - return fEnergyEfficiency; | |
332 | - } | |
333 | - | |
334 | - public void setFEnergyEfficiency(String fEnergyEfficiency) { | |
335 | - this.fEnergyEfficiency = fEnergyEfficiency; | |
336 | - } | |
337 | - | |
338 | - public String getFPhotovoltaic() { | |
339 | - return fPhotovoltaic; | |
340 | - } | |
341 | - | |
342 | - public void setFPhotovoltaic(String fPhotovoltaic) { | |
343 | - this.fPhotovoltaic = fPhotovoltaic; | |
344 | - } | |
345 | - | |
346 | - public String getFEnergyStorage() { | |
347 | - return fEnergyStorage; | |
348 | - } | |
349 | - | |
350 | - public void setFEnergyStorage(String fEnergyStorage) { | |
351 | - this.fEnergyStorage = fEnergyStorage; | |
352 | - } | |
353 | - | |
354 | - public String getFProjectNature() { | |
355 | - return fProjectNature; | |
356 | - } | |
357 | - | |
358 | - public void setFProjectNature(String fProjectNature) { | |
359 | - this.fProjectNature = fProjectNature; | |
360 | - } | |
361 | - | |
362 | - public String getFBusinessModel() { | |
363 | - return fBusinessModel; | |
364 | - } | |
365 | - | |
366 | - public void setFBusinessModel(String fBusinessModel) { | |
367 | - this.fBusinessModel = fBusinessModel; | |
368 | - } | |
369 | - | |
370 | - public String getFInvestmentScale() { | |
371 | - return fInvestmentScale; | |
372 | - } | |
373 | - | |
374 | - public void setFInvestmentScale(String fInvestmentScale) { | |
375 | - this.fInvestmentScale = fInvestmentScale; | |
376 | - } | |
377 | - | |
378 | - public String getFProjectRating() { | |
379 | - return fProjectRating; | |
380 | - } | |
381 | - | |
382 | - public void setFProjectRating(String fProjectRating) { | |
383 | - this.fProjectRating = fProjectRating; | |
384 | - } | |
385 | - | |
386 | - public String getFStaticPaybackPeriod() { | |
387 | - return fStaticPaybackPeriod; | |
388 | - } | |
389 | - | |
390 | - public void setFStaticPaybackPeriod(String fStaticPaybackPeriod) { | |
391 | - this.fStaticPaybackPeriod = fStaticPaybackPeriod; | |
392 | - } | |
393 | - | |
394 | - public String getFCalculateIrr() { | |
395 | - return fCalculateIrr; | |
396 | - } | |
397 | - | |
398 | - public void setFCalculateIrr(String fCalculateIrr) { | |
399 | - this.fCalculateIrr = fCalculateIrr; | |
400 | - } | |
401 | - | |
402 | - public String getFAnnualIncomeForecast() { | |
403 | - return fAnnualIncomeForecast; | |
404 | - } | |
405 | - | |
406 | - public void setFAnnualIncomeForecast(String fAnnualIncomeForecast) { | |
407 | - this.fAnnualIncomeForecast = fAnnualIncomeForecast; | |
408 | - } | |
409 | - | |
410 | - public String getFAnnualNetProfitForecast() { | |
411 | - return fAnnualNetProfitForecast; | |
412 | - } | |
413 | - | |
414 | - public void setFAnnualNetProfitForecast(String fAnnualNetProfitForecast) { | |
415 | - this.fAnnualNetProfitForecast = fAnnualNetProfitForecast; | |
416 | - } | |
417 | - | |
418 | - public String getFTeamLeader() { | |
419 | - return fTeamLeader; | |
420 | - } | |
421 | - | |
422 | - public void setFTeamLeader(String fTeamLeader) { | |
423 | - this.fTeamLeader = fTeamLeader; | |
424 | - } | |
425 | - | |
426 | - public String getFTeamLeaderId() { | |
427 | - return fTeamLeaderId; | |
428 | - } | |
429 | - | |
430 | - public void setFTeamLeaderId(String fTeamLeaderId) { | |
431 | - this.fTeamLeaderId = fTeamLeaderId; | |
432 | - } | |
433 | - | |
434 | - public String getFTeamCollaborationPer() { | |
435 | - return fTeamCollaborationPer; | |
436 | - } | |
437 | - | |
438 | - public void setFTeamCollaborationPer(String fTeamCollaborationPer) { | |
439 | - this.fTeamCollaborationPer = fTeamCollaborationPer; | |
440 | - } | |
441 | - | |
442 | - public String getFTeamCollaborationPerId() { | |
443 | - return fTeamCollaborationPerId; | |
444 | - } | |
445 | - | |
446 | - public void setFTeamCollaborationPerId(String fTeamCollaborationPerId) { | |
447 | - this.fTeamCollaborationPerId = fTeamCollaborationPerId; | |
448 | - } | |
449 | - | |
450 | - public LocalDateTime getFExpectedSigningDate() { | |
451 | - return fExpectedSigningDate; | |
452 | - } | |
453 | - | |
454 | - public void setFExpectedSigningDate(LocalDateTime fExpectedSigningDate) { | |
455 | - this.fExpectedSigningDate = fExpectedSigningDate; | |
456 | - } | |
457 | - | |
458 | - public LocalDateTime getFExpectedScheduledDate() { | |
459 | - return fExpectedScheduledDate; | |
460 | - } | |
461 | - | |
462 | - public void setFExpectedScheduledDate(LocalDateTime fExpectedScheduledDate) { | |
463 | - this.fExpectedScheduledDate = fExpectedScheduledDate; | |
464 | - } | |
465 | - | |
466 | - public String getFStrategicValue() { | |
467 | - return fStrategicValue; | |
468 | - } | |
469 | - | |
470 | - public void setFStrategicValue(String fStrategicValue) { | |
471 | - this.fStrategicValue = fStrategicValue; | |
472 | - } | |
473 | - | |
474 | - public String getFProjectSource() { | |
475 | - return fProjectSource; | |
476 | - } | |
477 | - | |
478 | - public void setFProjectSource(String fProjectSource) { | |
479 | - this.fProjectSource = fProjectSource; | |
480 | - } | |
481 | - | |
482 | - public String getFCustomerContact() { | |
483 | - return fCustomerContact; | |
484 | - } | |
485 | - | |
486 | - public void setFCustomerContact(String fCustomerContact) { | |
487 | - this.fCustomerContact = fCustomerContact; | |
488 | - } | |
489 | - | |
490 | - public String getFProjectOverview() { | |
491 | - return fProjectOverview; | |
492 | - } | |
493 | - | |
494 | - public void setFProjectOverview(String fProjectOverview) { | |
495 | - this.fProjectOverview = fProjectOverview; | |
496 | - } | |
497 | - | |
498 | - public String getFProjectDebriefing() { | |
499 | - return fProjectDebriefing; | |
500 | - } | |
501 | - | |
502 | - public void setFProjectDebriefing(String fProjectDebriefing) { | |
503 | - this.fProjectDebriefing = fProjectDebriefing; | |
504 | - } | |
505 | - | |
506 | - public String getFDeviationAnalysis() { | |
507 | - return fDeviationAnalysis; | |
508 | - } | |
509 | - | |
510 | - public void setFDeviationAnalysis(String fDeviationAnalysis) { | |
511 | - this.fDeviationAnalysis = fDeviationAnalysis; | |
512 | - } | |
513 | - | |
514 | - public String getFProjectState() { | |
515 | - return fProjectState; | |
516 | - } | |
517 | - | |
518 | - public void setFProjectState(String fProjectState) { | |
519 | - this.fProjectState = fProjectState; | |
520 | - } | |
521 | - | |
522 | - public String getFCreateBy() { | |
523 | - return fCreateBy; | |
524 | - } | |
525 | - | |
526 | - public String getfOrgName() { | |
527 | - return fOrgName; | |
528 | - } | |
529 | - | |
530 | - @Override | |
531 | - public String toString() { | |
532 | - return "WProjectLibraryInventory{" + | |
533 | - "id='" + id + '\'' + | |
534 | - ", refId='" + refId + '\'' + | |
535 | - ", fOrgName='" + fOrgName + '\'' + | |
536 | - ", fWarehouseEntryDate=" + fWarehouseEntryDate + | |
537 | - ", fProjectName='" + fProjectName + '\'' + | |
538 | - ", fProjectCategory='" + fProjectCategory + '\'' + | |
539 | - ", fBusinessScenarios='" + fBusinessScenarios + '\'' + | |
540 | - ", fSmartHeating='" + fSmartHeating + '\'' + | |
541 | - ", fEnergyEfficiency='" + fEnergyEfficiency + '\'' + | |
542 | - ", fPhotovoltaic='" + fPhotovoltaic + '\'' + | |
543 | - ", fEnergyStorage='" + fEnergyStorage + '\'' + | |
544 | - ", fProjectNature='" + fProjectNature + '\'' + | |
545 | - ", fBusinessModel='" + fBusinessModel + '\'' + | |
546 | - ", fInvestmentScale='" + fInvestmentScale + '\'' + | |
547 | - ", fProjectRating='" + fProjectRating + '\'' + | |
548 | - ", fStaticPaybackPeriod='" + fStaticPaybackPeriod + '\'' + | |
549 | - ", fCalculateIrr='" + fCalculateIrr + '\'' + | |
550 | - ", fAnnualIncomeForecast='" + fAnnualIncomeForecast + '\'' + | |
551 | - ", fAnnualNetProfitForecast='" + fAnnualNetProfitForecast + '\'' + | |
552 | - ", fTeamLeader='" + fTeamLeader + '\'' + | |
553 | - ", fTeamLeaderId='" + fTeamLeaderId + '\'' + | |
554 | - ", fTeamCollaborationPer='" + fTeamCollaborationPer + '\'' + | |
555 | - ", fTeamCollaborationPerId='" + fTeamCollaborationPerId + '\'' + | |
556 | - ", fExpectedSigningDate=" + fExpectedSigningDate + | |
557 | - ", fExpectedScheduledDate=" + fExpectedScheduledDate + | |
558 | - ", fStrategicValue='" + fStrategicValue + '\'' + | |
559 | - ", fProjectSource='" + fProjectSource + '\'' + | |
560 | - ", fCustomerContact='" + fCustomerContact + '\'' + | |
561 | - ", fProjectOverview='" + fProjectOverview + '\'' + | |
562 | - ", fProjectDebriefing='" + fProjectDebriefing + '\'' + | |
563 | - ", fDeviationAnalysis='" + fDeviationAnalysis + '\'' + | |
564 | - ", fProjectState='" + fProjectState + '\'' + | |
565 | - ", fCreateBy='" + fCreateBy + '\'' + | |
566 | - ", fCreateById='" + fCreateById + '\'' + | |
567 | - ", fCreateTime=" + fCreateTime + | |
568 | - ", fUpdateBy='" + fUpdateBy + '\'' + | |
569 | - ", fUpdateById='" + fUpdateById + '\'' + | |
570 | - ", fUpdateTime=" + fUpdateTime + | |
571 | - ", fFormDataRev=" + fFormDataRev + | |
572 | - ", fProjectNo='" + fProjectNo + '\'' + | |
573 | - ", fOrgId='" + fOrgId + '\'' + | |
574 | - ", createTime='" + createTime + '\'' + | |
575 | - ", updateTime='" + updateTime + '\'' + | |
576 | - '}'; | |
577 | - } | |
578 | - | |
579 | - public void setfOrgName(String fOrgName) { | |
580 | - this.fOrgName = fOrgName; | |
581 | - } | |
582 | - | |
583 | - public void setFCreateBy(String fCreateBy) { | |
584 | - this.fCreateBy = fCreateBy; | |
585 | - } | |
586 | - | |
587 | - public String getFCreateById() { | |
588 | - return fCreateById; | |
589 | - } | |
590 | - | |
591 | - public void setFCreateById(String fCreateById) { | |
592 | - this.fCreateById = fCreateById; | |
593 | - } | |
594 | - | |
595 | - public LocalDateTime getFCreateTime() { | |
596 | - return fCreateTime; | |
597 | - } | |
598 | - | |
599 | - public void setFCreateTime(LocalDateTime fCreateTime) { | |
600 | - this.fCreateTime = fCreateTime; | |
601 | - } | |
602 | - | |
603 | - public String getFUpdateBy() { | |
604 | - return fUpdateBy; | |
605 | - } | |
606 | - | |
607 | - public void setFUpdateBy(String fUpdateBy) { | |
608 | - this.fUpdateBy = fUpdateBy; | |
609 | - } | |
610 | - | |
611 | - public String getFUpdateById() { | |
612 | - return fUpdateById; | |
613 | - } | |
614 | - | |
615 | - public void setFUpdateById(String fUpdateById) { | |
616 | - this.fUpdateById = fUpdateById; | |
617 | - } | |
618 | - | |
619 | - public LocalDateTime getFUpdateTime() { | |
620 | - return fUpdateTime; | |
621 | - } | |
622 | - | |
623 | - public void setFUpdateTime(LocalDateTime fUpdateTime) { | |
624 | - this.fUpdateTime = fUpdateTime; | |
625 | - } | |
626 | - | |
627 | - public Long getFFormDataRev() { | |
628 | - return fFormDataRev; | |
629 | - } | |
630 | - | |
631 | - public void setFFormDataRev(Long fFormDataRev) { | |
632 | - this.fFormDataRev = fFormDataRev; | |
633 | - } | |
634 | - | |
635 | - public String getFProjectNo() { | |
636 | - return fProjectNo; | |
637 | - } | |
638 | - | |
639 | - public void setFProjectNo(String fProjectNo) { | |
640 | - this.fProjectNo = fProjectNo; | |
641 | - } | |
642 | - | |
643 | - public String getFOrgId() { | |
644 | - return fOrgId; | |
645 | - } | |
646 | - | |
647 | - public void setFOrgId(String fOrgId) { | |
648 | - this.fOrgId = fOrgId; | |
649 | - } | |
650 | - | |
651 | - | |
652 | 288 | @Override |
653 | 289 | protected Serializable pkVal() { |
654 | 290 | return this.id; | ... | ... |
backend/chkpower/src/main/java/com/hotent/chkpower/model/WProjectOperationRecord.java
... | ... | @@ -67,6 +67,21 @@ public class WProjectOperationRecord extends BaseModel<WProjectOperationRecord> |
67 | 67 | @JsonProperty("fFormDataRev") |
68 | 68 | private Long fFormDataRev; |
69 | 69 | |
70 | + @ApiModelProperty(value = "附件") | |
71 | + @TableField("F_file") | |
72 | + @JsonProperty("fFile") | |
73 | + private String fFile; | |
74 | + | |
75 | + | |
76 | + | |
77 | + public String getfFile() { | |
78 | + return fFile; | |
79 | + } | |
80 | + | |
81 | + public void setfFile(String fFile) { | |
82 | + this.fFile = fFile; | |
83 | + } | |
84 | + | |
70 | 85 | |
71 | 86 | public String getId() { |
72 | 87 | return id; | ... | ... |
backend/chkpower/src/main/resources/mapper/WProjectLibraryInventoryMapper.xml
... | ... | @@ -45,11 +45,69 @@ |
45 | 45 | <result column="F_form_data_rev_" property="fFormDataRev"/> |
46 | 46 | <result column="F_project_no" property="fProjectNo"/> |
47 | 47 | <result column="F_org_id" property="fOrgId"/> |
48 | + <result column="F_org_type" property="fOrgType"/> | |
49 | + <result column="F_project_area" property="fProjectArea"/> | |
50 | + <result column="F_this_month_key_promoted" property="fThisMonthKeyPromoted"/> | |
51 | + <result column="F_project_province" property="fProjectProvince"/> | |
52 | + <result column="F_project_city" property="fProjectCity"/> | |
53 | + <result column="F_project_district" property="fProjectDistrict"/> | |
54 | + <result column="F_customer_type" property="fCustomerType"/> | |
55 | + <result column="F_promoted_month" property="fPromotedMonth"/> | |
56 | + <result column="F_deviation_analysis_file" property="fDeviationAnalysisFile"/> | |
48 | 57 | </resultMap> |
49 | 58 | |
50 | 59 | <!-- 通用查询结果列 --> |
51 | 60 | <sql id="Base_Column_List"> |
52 | - ID_, REF_ID_, F_org_name, F_warehouse_entry_date, F_project_name, F_project_category, F_business_scenarios, F_smart_heating, F_energy_efficiency, F_photovoltaic, F_energy_storage, F_project_nature, F_business_model, F_investment_scale, F_project_rating, F_static_payback_period, F_calculate_IRR, F_annual_income_forecast, F_annual_net_profit_forecast, F_team_leader, F_team_leader_id, F_team_collaboration_per, F_team_collaboration_per_id, F_expected_signing_date, F_expected_scheduled_date, F_strategic_value, F_project_source, F_customer_contact, F_project_overview, F_project_debriefing, F_deviation_analysis, F_project_state, F_create_by, F_create_by_id, F_create_time, F_update_by, F_update_by_id, F_update_time, F_form_data_rev_, F_project_no, F_org_id | |
61 | + ID_, | |
62 | + REF_ID_, | |
63 | + F_org_name, | |
64 | + F_warehouse_entry_date, | |
65 | + F_project_name, | |
66 | + F_project_category, | |
67 | + F_business_scenarios, | |
68 | + F_smart_heating, | |
69 | + F_energy_efficiency, | |
70 | + F_photovoltaic, | |
71 | + F_energy_storage, | |
72 | + F_project_nature, | |
73 | + F_business_model, | |
74 | + F_investment_scale, | |
75 | + F_project_rating, | |
76 | + F_static_payback_period, | |
77 | + F_calculate_IRR, | |
78 | + F_annual_income_forecast, | |
79 | + F_annual_net_profit_forecast, | |
80 | + F_team_leader, | |
81 | + F_team_leader_id, | |
82 | + F_team_collaboration_per, | |
83 | + F_team_collaboration_per_id, | |
84 | + F_expected_signing_date, | |
85 | + F_expected_scheduled_date, | |
86 | + F_strategic_value, | |
87 | + F_project_source, | |
88 | + F_customer_contact, | |
89 | + F_project_overview, | |
90 | + F_project_debriefing, | |
91 | + F_deviation_analysis, | |
92 | + F_project_state, | |
93 | + F_create_by, | |
94 | + F_create_by_id, | |
95 | + F_create_time, | |
96 | + F_update_by, | |
97 | + F_update_by_id, | |
98 | + F_update_time, | |
99 | + F_form_data_rev_, | |
100 | + F_project_no, | |
101 | + F_org_id, | |
102 | + F_org_type, | |
103 | + F_project_area, | |
104 | + F_this_month_key_promoted, | |
105 | + F_project_province, | |
106 | + F_project_city, | |
107 | + F_project_district, | |
108 | + F_customer_type, | |
109 | + F_promoted_month, | |
110 | + F_deviation_analysis_file | |
53 | 111 | </sql> |
54 | 112 | |
55 | 113 | <select id="selectPage" resultMap="BaseResultMap"> |
... | ... | @@ -81,16 +139,20 @@ |
81 | 139 | |
82 | 140 | <select id="basicsStatistics" resultType="java.util.HashMap"> |
83 | 141 | SELECT |
84 | - IFNULL(SUM(CASE WHEN F_PROJECT_CATEGORY = '已通过投评项目' THEN 1 ELSE 0 END ),0) AS YTGTPXMS, -- 已通过投评项目 | |
85 | - IFNULL(SUM(CASE WHEN F_PROJECT_CATEGORY = '已签约项目' THEN 1 ELSE 0 END ),0) AS YQYXMS, -- 已签约项目 | |
142 | + IFNULL(SUM(CASE WHEN F_PROJECT_CATEGORY = '商机阶段' THEN 1 ELSE 0 END ),0) AS SJJD, -- 商机阶段 | |
143 | + IFNULL(SUM(CASE WHEN F_PROJECT_CATEGORY = '前期开发阶段' THEN 1 ELSE 0 END ),0) AS QQKFJD, -- 前期开发阶段 | |
86 | 144 | IFNULL(ROUND(SUM(F_ANNUAL_INCOME_FORECAST/10000),2),0.00) AS YJZNSR, -- 预计总年收入(亿元) |
87 | 145 | IFNULL(ROUND(SUM(F_ANNUAL_NET_PROFIT_FORECAST/10000),2),0.00) AS YJZNLR, -- 预计总年利润(亿元) |
88 | 146 | |
89 | 147 | |
90 | 148 | COUNT(*) AS XMZS, -- 项目总数 |
91 | - IFNULL(SUM(CASE WHEN F_PROJECT_CATEGORY = '暂缓项目' THEN 1 ELSE 0 END ),0) AS ZHXMS, -- 暂缓项目 | |
92 | - IFNULL(SUM(CASE WHEN F_PROJECT_CATEGORY = '出库项目' THEN 1 ELSE 0 END ),0) AS CKXMS, -- 出库项目数 | |
93 | - IFNULL(SUM(CASE WHEN F_PROJECT_CATEGORY = '本月重点推进项目' THEN 1 ELSE 0 END ),0) AS BYZDTJXMS, -- 本月重点推进项目 | |
149 | + IFNULL(SUM(CASE WHEN F_PROJECT_CATEGORY = '通过事业部投评阶段' THEN 1 ELSE 0 END ),0) AS TGSYBTPJD, -- 通过事业部投评阶段 | |
150 | + IFNULL(SUM(CASE WHEN F_PROJECT_CATEGORY = '通过集团过会阶段' THEN 1 ELSE 0 END ),0) AS TGJTGHJD, -- 通过集团过会阶段 | |
151 | + IFNULL(SUM(CASE WHEN F_PROJECT_CATEGORY = '签约阶段' THEN 1 ELSE 0 END ),0) AS QYJD, -- 签约阶段 | |
152 | + IFNULL(SUM(CASE WHEN F_PROJECT_CATEGORY = '项目建设阶段' THEN 1 ELSE 0 END ),0) AS XMJSJD, -- 项目建设阶段 | |
153 | + IFNULL(SUM(CASE WHEN F_PROJECT_CATEGORY = '项目运营阶段' THEN 1 ELSE 0 END ),0) AS XMYYJD, -- 项目运营阶段 | |
154 | + IFNULL(SUM(CASE WHEN F_PROJECT_CATEGORY = '项目暂缓' THEN 1 ELSE 0 END ),0) AS ZHXM, -- 项目暂缓 | |
155 | + IFNULL(SUM(CASE WHEN F_PROJECT_CATEGORY = '项目出库' THEN 1 ELSE 0 END ),0) AS CKXM, -- 项目出库 | |
94 | 156 | IFNULL(ROUND(SUM(F_INVESTMENT_SCALE/10000),2),0.00) AS YJZTZ, -- 预计总投资(亿元) |
95 | 157 | |
96 | 158 | |
... | ... | @@ -160,8 +222,8 @@ |
160 | 222 | |
161 | 223 | <select id="orgNameProjectStatistics" resultType="java.util.HashMap"> |
162 | 224 | SELECT |
163 | - F_org_name AS xmzt, | |
164 | - count( F_org_id ) AS sl | |
225 | + F_project_area AS xmzt, | |
226 | + count( F_project_area ) AS sl | |
165 | 227 | FROM |
166 | 228 | W_PROJECT_LIBRARY_INVENTORY |
167 | 229 | WHERE |
... | ... | @@ -176,7 +238,7 @@ |
176 | 238 | </foreach> |
177 | 239 | </if> |
178 | 240 | GROUP BY |
179 | - F_org_id | |
241 | + F_project_area | |
180 | 242 | </select> |
181 | 243 | |
182 | 244 | <select id="listDictByKey" resultType="java.lang.String"> |
... | ... | @@ -235,4 +297,133 @@ |
235 | 297 | </if> |
236 | 298 | GROUP BY temp1.business_model |
237 | 299 | </select> |
300 | + | |
301 | + <select id="areaDataAnalysis" resultType="java.util.HashMap"> | |
302 | + select | |
303 | + temp1.day, | |
304 | + IFNULL(temp2.type1,0) as type1, | |
305 | + IFNULL(temp2.type2,0) as type2, | |
306 | + IFNULL(temp2.type3,0) as type3 | |
307 | + from | |
308 | + ( | |
309 | + select | |
310 | + <foreach collection="rq" item="item" separator="union all select "> | |
311 | + #{item} as day | |
312 | + </foreach> | |
313 | + ) temp1 | |
314 | + left join | |
315 | + ( | |
316 | + select | |
317 | + F_project_area, | |
318 | + DATE_FORMAT(F_create_time,'%Y-%m-%d') as sj, | |
319 | + IFNULL(sum(case when F_project_category = '商机阶段' then 1 else 0 end ),0) as type1, | |
320 | + IFNULL(sum(case when F_project_category = '通过事业部投评阶段' then 1 else 0 end ),0) as type2, | |
321 | + IFNULL(sum(case when F_project_category = '通过集团过会阶段' then 1 else 0 end ),0) as type3 | |
322 | + from w_project_library_inventory | |
323 | + where F_create_time BETWEEN #{startDate} and #{endDate} | |
324 | + and F_project_area = #{area} | |
325 | + and F_project_state != '已作废' | |
326 | + and F_org_id IN | |
327 | + <foreach collection="orgIdList" separator="," item="orgId" open="(" close=")"> | |
328 | + #{orgId} | |
329 | + </foreach> | |
330 | + group by DATE_FORMAT(F_create_time,'%Y-%m-%d') | |
331 | + ) temp2 on temp1.day = temp2.sj order by temp1.day asc | |
332 | + </select> | |
333 | + | |
334 | + <!-- <select id="getRq" resultType="java.lang.String"> | |
335 | + SELECT | |
336 | + <if test="type == '1'.toString()"> | |
337 | + DATE_FORMAT(DATE_COLUMN, '%Y-%m-%d') AS DATE | |
338 | + </if> | |
339 | + <if test="type == '2'.toString()"> | |
340 | + WEEK(DATE_COLUMN) AS DATE | |
341 | + </if> | |
342 | + <if test="type == '3'.toString()"> | |
343 | + MONTH(DATE_COLUMN) AS DATE | |
344 | + </if> | |
345 | + FROM | |
346 | + ( | |
347 | + SELECT | |
348 | + @ROW := @ROW + 1 AS ROWNUM, | |
349 | + DATE_COLUMN | |
350 | + FROM | |
351 | + (SELECT @ROW := -1) R, | |
352 | + ( | |
353 | + SELECT | |
354 | + DATE(#{startDate}) + INTERVAL (T1.I + (T2.I * 10) + (T3.I * 100)) DAY AS DATE_COLUMN | |
355 | + FROM | |
356 | + (SELECT 0 AS I UNION ALL SELECT 1 UNION ALL SELECT 2 UNION ALL SELECT 3 UNION ALL SELECT 4 UNION ALL SELECT 5 UNION ALL SELECT 6 UNION ALL SELECT 7 UNION ALL SELECT 8 UNION ALL SELECT 9) T1, | |
357 | + (SELECT 0 AS I UNION ALL SELECT 1 UNION ALL SELECT 2 UNION ALL SELECT 3 UNION ALL SELECT 4 UNION ALL SELECT 5 UNION ALL SELECT 6 UNION ALL SELECT 7 UNION ALL SELECT 8 UNION ALL SELECT 9) T2, | |
358 | + (SELECT 0 AS I UNION ALL SELECT 1 UNION ALL SELECT 2 UNION ALL SELECT 3 UNION ALL SELECT 4 UNION ALL SELECT 5 UNION ALL SELECT 6 UNION ALL SELECT 7 UNION ALL SELECT 8 UNION ALL SELECT 9) T3 | |
359 | + ) | |
360 | + WHERE | |
361 | + DATE_COLUMN BETWEEN #{startDate} AND #{endDate} | |
362 | + ) AS SUBQUERY | |
363 | + <if test="type == '1'.toString()"> | |
364 | + GROUP BY DATE_FORMAT(DATE_COLUMN, '%Y-%m-%d') | |
365 | + </if> | |
366 | + <if test="type == '2'.toString()"> | |
367 | + GROUP BY WEEK(DATE_COLUMN) | |
368 | + </if> | |
369 | + <if test="type == '3'.toString()"> | |
370 | + GROUP BY MONTH(DATE_COLUMN) | |
371 | + </if> | |
372 | + </select>--> | |
373 | + | |
374 | + <select id="getRq" resultType="java.lang.String"> | |
375 | + SELECT | |
376 | + date_format(#{startDate} + INTERVAL (t3.dateStr * 100 + t2.dateStr * 10 + t1.dateStr) day,'%Y-%m-%d') as dateStr | |
377 | + FROM | |
378 | + (SELECT 0 dateStr UNION ALL SELECT 1 UNION ALL SELECT 2 UNION ALL SELECT 3 UNION ALL SELECT 4 UNION ALL SELECT 5 UNION ALL SELECT 6 UNION ALL SELECT 7 UNION ALL SELECT 8 UNION ALL SELECT 9) t1, | |
379 | + (SELECT 0 dateStr UNION ALL SELECT 1 UNION ALL SELECT 2 UNION ALL SELECT 3 UNION ALL SELECT 4 UNION ALL SELECT 5 UNION ALL SELECT 6 UNION ALL SELECT 7 UNION ALL SELECT 8 UNION ALL SELECT 9) t2, | |
380 | + (SELECT 0 dateStr UNION ALL SELECT 1 UNION ALL SELECT 2 UNION ALL SELECT 3 UNION ALL SELECT 4 UNION ALL SELECT 5 UNION ALL SELECT 6 UNION ALL SELECT 7 UNION ALL SELECT 8 UNION ALL SELECT 9) t3 | |
381 | + WHERE | |
382 | + (date_format(#{startDate} + INTERVAL (t3.dateStr * 100 + t2.dateStr * 10 + t1.dateStr) day ,'%Y-%m-%d')) <= date_format(#{endDate},'%Y-%m-%d') | |
383 | + </select> | |
384 | + | |
385 | + <select id="areaData" resultType="java.util.HashMap"> | |
386 | + select | |
387 | + temp1.area, | |
388 | + ifnull(temp2.xmzs,0) as xmzs, | |
389 | + ifnull(temp2.sjjd,0) as sjjd, | |
390 | + ifnull(temp2.qqkfjd,0) as qqkfjd, | |
391 | + ifnull(temp2.tgsybtpjd,0) as tgsybtpjd, | |
392 | + ifnull(temp2.tgjtghjd,0) as tgjtghjd, | |
393 | + ifnull(temp2.qyjd,0) as qyjd, | |
394 | + ifnull(temp2.xmjsjd,0) as xmjsjd, | |
395 | + ifnull(temp2.xmyyjd,0) as xmyyjd, | |
396 | + ifnull(temp2.xmzh,0) as xmzh, | |
397 | + ifnull(temp2.xmck,0) as xmck | |
398 | + from ( | |
399 | + select | |
400 | + <foreach collection="areaList" separator="union all select " item="area"> | |
401 | + #{area} as area | |
402 | + </foreach> | |
403 | + ) temp1 | |
404 | + left join | |
405 | + ( | |
406 | + select | |
407 | + F_project_area as projectArea, | |
408 | + count(*) as xmzs, | |
409 | + ifnull(sum(case when F_project_category = '商机阶段' then 1 else 0 end ),0) as sjjd, | |
410 | + ifnull(sum(case when F_project_category = '前期开发阶段' then 1 else 0 end ),0) as qqkfjd, | |
411 | + ifnull(sum(case when F_project_category = '通过事业部投评阶段' then 1 else 0 end ),0) as tgsybtpjd, | |
412 | + ifnull(sum(case when F_project_category = '通过集团过会阶段' then 1 else 0 end ),0) as tgjtghjd, | |
413 | + ifnull(sum(case when F_project_category = '签约阶段' then 1 else 0 end ),0) as qyjd, | |
414 | + ifnull(sum(case when F_project_category = '项目建设阶段' then 1 else 0 end ),0) as xmjsjd, | |
415 | + ifnull(sum(case when F_project_category = '项目运营阶段' then 1 else 0 end ),0) as xmyyjd, | |
416 | + ifnull(sum(case when F_project_category = '项目暂缓' then 1 else 0 end ),0) as xmzh, | |
417 | + ifnull(sum(case when F_project_category = '项目出库' then 1 else 0 end ),0) as xmck | |
418 | + from w_project_library_inventory | |
419 | + where F_project_state != '已作废' and F_create_time BETWEEN #{startDate} and #{endDate} | |
420 | + and F_org_id in | |
421 | + <foreach collection="orgIdList" open="(" close=")" item="orgId" separator=","> | |
422 | + #{orgId} | |
423 | + </foreach> | |
424 | + group by F_project_area | |
425 | + )temp2 | |
426 | + on temp1.area = temp2.projectArea | |
427 | + order by temp1.area | |
428 | + </select> | |
238 | 429 | </mapper> | ... | ... |
backend/chkpower/src/main/resources/mapper/WProjectOperationRecordMapper.xml
... | ... | @@ -13,11 +13,12 @@ |
13 | 13 | <result column="F_event_type" property="fEventType"/> |
14 | 14 | <result column="F_progress_status" property="fProgressStatus"/> |
15 | 15 | <result column="F_form_data_rev_" property="fFormDataRev"/> |
16 | + <result column="F_file" property="fFile"/> | |
16 | 17 | </resultMap> |
17 | 18 | |
18 | 19 | <!-- 通用查询结果列 --> |
19 | 20 | <sql id="Base_Column_List"> |
20 | - ID_, REF_ID_, F_project_id, F_create_by, F_create_by_id, F_create_time, F_event_type, F_progress_status, F_form_data_rev_ | |
21 | + ID_, REF_ID_, F_project_id, F_create_by, F_create_by_id, F_create_time, F_event_type, F_progress_status, F_form_data_rev_,F_file | |
21 | 22 | </sql> |
22 | 23 | |
23 | 24 | <select id="selectPage" resultMap="BaseResultMap"> | ... | ... |