Commit 4c5250f43aef07a5488241cc0ffc95c6af73f808
1 parent
2a7cc3da
Exists in
master
项目库管理开发
Showing
16 changed files
with
1407 additions
and
5 deletions
Show diff stats
backend/chkpower/src/main/java/com/hotent/chkpower/controller/WProjectLibraryInventoryController.java
0 → 100644
... | ... | @@ -0,0 +1,161 @@ |
1 | +package com.hotent.chkpower.controller; | |
2 | + | |
3 | + | |
4 | +import cn.afterturn.easypoi.excel.ExcelExportUtil; | |
5 | +import cn.afterturn.easypoi.excel.entity.TemplateExportParams; | |
6 | +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | |
7 | +import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; | |
8 | +import com.hotent.base.controller.BaseController; | |
9 | +import com.hotent.base.model.CommonResult; | |
10 | +import com.hotent.base.util.StringUtil; | |
11 | +import com.hotent.chkpower.manager.WProjectLibraryInventoryManager; | |
12 | +import com.hotent.chkpower.model.WProjectLibraryInventory; | |
13 | +import io.swagger.annotations.ApiOperation; | |
14 | +import io.swagger.annotations.ApiParam; | |
15 | +import org.apache.poi.ss.usermodel.Workbook; | |
16 | +import org.springframework.web.bind.annotation.*; | |
17 | + | |
18 | +import javax.servlet.http.HttpServletResponse; | |
19 | +import java.io.OutputStream; | |
20 | +import java.net.URLEncoder; | |
21 | +import java.time.LocalDate; | |
22 | +import java.time.format.DateTimeFormatter; | |
23 | +import java.util.ArrayList; | |
24 | +import java.util.HashMap; | |
25 | +import java.util.List; | |
26 | + | |
27 | +/** | |
28 | + * 项目库清单 前端控制器 | |
29 | + * | |
30 | + * @author admin | |
31 | + * @company 广州宏天软件股份有限公司 | |
32 | + * @since 2024-07-12 | |
33 | + */ | |
34 | +@RestController | |
35 | +@RequestMapping("/wProjectLibraryInventory/v1/") | |
36 | +public class WProjectLibraryInventoryController extends BaseController<WProjectLibraryInventoryManager, WProjectLibraryInventory> { | |
37 | + | |
38 | + /** | |
39 | + * 根据id获取项目库清单数据详情 | |
40 | + * | |
41 | + * @param id | |
42 | + * @return | |
43 | + * @throws Exception ModelAndView | |
44 | + */ | |
45 | + @GetMapping(value = "/getDetail") | |
46 | + @ApiOperation(value = "根据id获取项目库清单数据详情", httpMethod = "GET", notes = "根据id获取项目库清单数据详情") | |
47 | + public CommonResult<WProjectLibraryInventory> getDetail(@ApiParam(name = "id", value = "业务对象主键", required = true) @RequestParam(required = true) String id) throws Exception { | |
48 | + return CommonResult.<WProjectLibraryInventory>ok().value(baseService.getDetail(id)); | |
49 | + } | |
50 | + | |
51 | + /** | |
52 | + * 新增,更新项目库清单 | |
53 | + * | |
54 | + * @param wProjectLibraryInventory | |
55 | + * @return | |
56 | + * @throws Exception | |
57 | + * @throws | |
58 | + */ | |
59 | + @PostMapping(value = "/save") | |
60 | + @ApiOperation(value = "新增,更新项目库清单数据", httpMethod = "POST", notes = "新增,更新项目库清单数据") | |
61 | + public CommonResult<String> save(@ApiParam(name = "WProjectLibraryInventory", value = "项目库清单对象", required = true) @RequestBody WProjectLibraryInventory wProjectLibraryInventory) throws Exception { | |
62 | + String msg = StringUtil.isEmpty(wProjectLibraryInventory.getId()) ? "添加项目库清单成功" : "更新项目库清单成功"; | |
63 | + baseService.createOrUpdate(wProjectLibraryInventory); | |
64 | + return CommonResult.<String>ok().message(msg); | |
65 | + } | |
66 | + | |
67 | + @GetMapping("/down") | |
68 | + public void down(HttpServletResponse response, WProjectLibraryInventory wProjectLibraryInventory) throws Exception { | |
69 | + QueryWrapper<WProjectLibraryInventory> queryWrapper = new QueryWrapper<>(); | |
70 | + if (ObjectUtils.isNotEmpty(wProjectLibraryInventory.getFProjectNo())) { | |
71 | + queryWrapper.eq("F_project_no", wProjectLibraryInventory.getFProjectNo()); | |
72 | + } | |
73 | + if (ObjectUtils.isNotEmpty(wProjectLibraryInventory.getFProjectName())) { | |
74 | + queryWrapper.like("F_project_name", wProjectLibraryInventory.getFProjectName()); | |
75 | + } | |
76 | + if (ObjectUtils.isNotEmpty(wProjectLibraryInventory.getFProjectCategory())) { | |
77 | + queryWrapper.eq("F_project_category", wProjectLibraryInventory.getFProjectCategory()); | |
78 | + } | |
79 | + if (ObjectUtils.isNotEmpty(wProjectLibraryInventory.getFProjectState())) { | |
80 | + queryWrapper.eq("F_project_state", wProjectLibraryInventory.getFProjectState()); | |
81 | + } | |
82 | + if (ObjectUtils.isNotEmpty(wProjectLibraryInventory.getCreateTime())) { | |
83 | + queryWrapper.like("F_create_time", wProjectLibraryInventory.getCreateTime()); | |
84 | + } | |
85 | + if (ObjectUtils.isNotEmpty(wProjectLibraryInventory.getFProjectNature())) { | |
86 | + queryWrapper.eq("F_project_nature", wProjectLibraryInventory.getFProjectNature()); | |
87 | + } | |
88 | + if (ObjectUtils.isNotEmpty(wProjectLibraryInventory.getFBusinessScenarios())) { | |
89 | + queryWrapper.eq("F_business_scenarios", wProjectLibraryInventory.getFBusinessScenarios()); | |
90 | + } | |
91 | + if (ObjectUtils.isNotEmpty(wProjectLibraryInventory.getFBusinessModel())) { | |
92 | + queryWrapper.eq("F_business_model", wProjectLibraryInventory.getFBusinessModel()); | |
93 | + } | |
94 | + if (ObjectUtils.isNotEmpty(wProjectLibraryInventory.getFProjectRating())) { | |
95 | + queryWrapper.eq("F_project_rating", wProjectLibraryInventory.getFProjectRating()); | |
96 | + } | |
97 | + if (ObjectUtils.isNotEmpty(wProjectLibraryInventory.getUpdateTime())) { | |
98 | + queryWrapper.like("F_update_time", wProjectLibraryInventory.getUpdateTime()); | |
99 | + } | |
100 | + List<WProjectLibraryInventory> list = baseService.list(queryWrapper); | |
101 | + HashMap<String, Object> map = new HashMap<>(); | |
102 | + ArrayList<HashMap> hashMaps = new ArrayList<>(); | |
103 | + DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd"); | |
104 | + for (WProjectLibraryInventory projectLibraryInventory : list) { | |
105 | + HashMap<String, Object> mapSon = new HashMap<>(); | |
106 | + mapSon.put("projectNo", projectLibraryInventory.getFProjectNo()); | |
107 | + mapSon.put("projectCompany", projectLibraryInventory.getFProjectCompany()); | |
108 | + mapSon.put("warehouseEntryDate", ObjectUtils.isNotEmpty(projectLibraryInventory.getFWarehouseEntryDate()) ? projectLibraryInventory.getFWarehouseEntryDate().format(dateTimeFormatter) : ""); | |
109 | + mapSon.put("projectName", projectLibraryInventory.getFProjectName()); | |
110 | + mapSon.put("projectCategory", projectLibraryInventory.getFProjectCategory()); | |
111 | + mapSon.put("smartHeating", ObjectUtils.isEmpty(projectLibraryInventory.getFSmartHeating()) ? "" : projectLibraryInventory.getFSmartHeating()); | |
112 | + mapSon.put("energyEfficiency", ObjectUtils.isEmpty(projectLibraryInventory.getFEnergyEfficiency()) ? "" : projectLibraryInventory.getFEnergyEfficiency()); | |
113 | + mapSon.put("photovoltaic", ObjectUtils.isEmpty(projectLibraryInventory.getFPhotovoltaic()) ? "" : projectLibraryInventory.getFPhotovoltaic()); | |
114 | + mapSon.put("energyStorage", ObjectUtils.isEmpty(projectLibraryInventory.getFEnergyStorage()) ? "" : projectLibraryInventory.getFEnergyStorage()); | |
115 | + mapSon.put("projectNature", projectLibraryInventory.getFProjectNature()); | |
116 | + mapSon.put("businessScenarios", projectLibraryInventory.getFBusinessScenarios()); | |
117 | + mapSon.put("projectOverview", projectLibraryInventory.getFProjectOverview()); | |
118 | + mapSon.put("projectDebriefing", projectLibraryInventory.getFProjectDebriefing()); | |
119 | + mapSon.put("deviationAnalysis", projectLibraryInventory.getFDeviationAnalysis()); | |
120 | + mapSon.put("businessModel", projectLibraryInventory.getFBusinessModel()); | |
121 | + mapSon.put("investmentScale", projectLibraryInventory.getFInvestmentScale()); | |
122 | + mapSon.put("projectRating", projectLibraryInventory.getFProjectRating()); | |
123 | + mapSon.put("staticPaybackPeriod", ObjectUtils.isEmpty(projectLibraryInventory.getFStaticPaybackPeriod()) ? "/" : projectLibraryInventory.getFStaticPaybackPeriod()); | |
124 | + mapSon.put("calculateIRR", ObjectUtils.isEmpty(projectLibraryInventory.getFCalculateIrr()) ? "/" : projectLibraryInventory.getFCalculateIrr()); | |
125 | + mapSon.put("annualIncomeForecast", projectLibraryInventory.getFAnnualIncomeForecast()); | |
126 | + mapSon.put("annualNetProfitForecast", projectLibraryInventory.getFAnnualIncomeForecast()); | |
127 | + mapSon.put("teamLeader", projectLibraryInventory.getFTeamLeader()); | |
128 | + mapSon.put("teamCollaborationPer", projectLibraryInventory.getFTeamCollaborationPer()); | |
129 | + mapSon.put("expectedSigningDate", ObjectUtils.isEmpty(projectLibraryInventory.getFExpectedSigningDate()) ? "待定" : projectLibraryInventory.getFExpectedSigningDate().format(dateTimeFormatter)); | |
130 | + mapSon.put("expectedScheduledDate", ObjectUtils.isEmpty(projectLibraryInventory.getFExpectedScheduledDate()) ? "待定" : projectLibraryInventory.getFExpectedScheduledDate().format(dateTimeFormatter)); | |
131 | + mapSon.put("strategicValue", ObjectUtils.isEmpty(projectLibraryInventory.getFStrategicValue()) ? "无" : projectLibraryInventory.getFStrategicValue()); | |
132 | + mapSon.put("projectSource", projectLibraryInventory.getFProjectSource()); | |
133 | + mapSon.put("customerContact", projectLibraryInventory.getFCustomerContact()); | |
134 | + mapSon.put("projectState", projectLibraryInventory.getFProjectState()); | |
135 | + hashMaps.add(mapSon); | |
136 | + } | |
137 | + map.put("list", hashMaps); | |
138 | + | |
139 | + TemplateExportParams params = new TemplateExportParams("doc/project_down.xls"); | |
140 | + params.setColForEach(true); | |
141 | + Workbook workbook = ExcelExportUtil.exportExcel(params, map); | |
142 | + String filedisplay = "项目填报" + LocalDate.now().format(DateTimeFormatter.ofPattern("yyyyMMdd")) + ".xls"; | |
143 | + response.setContentType("APPLICATION/OCTET-STREAM"); | |
144 | + response.setHeader("Access-Control-Expose-Headers", "Content-Disposition"); | |
145 | + response.addHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(filedisplay, "utf-8")); | |
146 | + OutputStream os = null; | |
147 | + try { | |
148 | + os = response.getOutputStream(); | |
149 | + workbook.write(os); | |
150 | + os.flush(); | |
151 | + os.close(); | |
152 | + } catch (Exception e) { | |
153 | + e.printStackTrace(); | |
154 | + } finally { | |
155 | + if (os != null) | |
156 | + os.close(); | |
157 | + } | |
158 | + | |
159 | + } | |
160 | + | |
161 | +} | ... | ... |
backend/chkpower/src/main/java/com/hotent/chkpower/controller/WProjectOperationRecordController.java
0 → 100644
... | ... | @@ -0,0 +1,52 @@ |
1 | +package com.hotent.chkpower.controller; | |
2 | + | |
3 | + | |
4 | +import com.hotent.base.controller.BaseController; | |
5 | +import com.hotent.base.model.CommonResult; | |
6 | +import com.hotent.base.util.StringUtil; | |
7 | +import com.hotent.chkpower.manager.WProjectOperationRecordManager; | |
8 | +import com.hotent.chkpower.model.WProjectOperationRecord; | |
9 | +import io.swagger.annotations.ApiOperation; | |
10 | +import io.swagger.annotations.ApiParam; | |
11 | +import org.springframework.web.bind.annotation.*; | |
12 | + | |
13 | +/** | |
14 | + * 项目操作记录 前端控制器 | |
15 | + * | |
16 | + * @author admin | |
17 | + * @company 广州宏天软件股份有限公司 | |
18 | + * @since 2024-07-12 | |
19 | + */ | |
20 | +@RestController | |
21 | +@RequestMapping("/wProjectOperationRecord/v1/") | |
22 | +public class WProjectOperationRecordController extends BaseController<WProjectOperationRecordManager, WProjectOperationRecord> { | |
23 | + | |
24 | + /** | |
25 | + * 根据id获取项目操作记录数据详情 | |
26 | + * | |
27 | + * @param id | |
28 | + * @return | |
29 | + * @throws Exception ModelAndView | |
30 | + */ | |
31 | + @GetMapping(value = "/getDetail") | |
32 | + @ApiOperation(value = "根据id获取项目操作记录数据详情", httpMethod = "GET", notes = "根据id获取项目操作记录数据详情") | |
33 | + public CommonResult<WProjectOperationRecord> getDetail(@ApiParam(name = "id", value = "业务对象主键", required = true) @RequestParam(required = true) String id) throws Exception { | |
34 | + return CommonResult.<WProjectOperationRecord>ok().value(baseService.getDetail(id)); | |
35 | + } | |
36 | + | |
37 | + /** | |
38 | + * 新增,更新项目操作记录 | |
39 | + * | |
40 | + * @param wProjectOperationRecord | |
41 | + * @return | |
42 | + * @throws Exception | |
43 | + * @throws | |
44 | + */ | |
45 | + @PostMapping(value = "/save") | |
46 | + @ApiOperation(value = "新增,更新项目操作记录数据", httpMethod = "POST", notes = "新增,更新项目操作记录数据") | |
47 | + public CommonResult<String> save(@ApiParam(name = "WProjectOperationRecord", value = "项目操作记录对象", required = true) @RequestBody WProjectOperationRecord wProjectOperationRecord) throws Exception { | |
48 | + String msg = StringUtil.isEmpty(wProjectOperationRecord.getId()) ? "添加项目操作记录成功" : "更新项目操作记录成功"; | |
49 | + baseService.createOrUpdate(wProjectOperationRecord); | |
50 | + return CommonResult.<String>ok().message(msg); | |
51 | + } | |
52 | +} | ... | ... |
backend/chkpower/src/main/java/com/hotent/chkpower/dao/WProjectLibraryInventoryDao.java
0 → 100644
... | ... | @@ -0,0 +1,15 @@ |
1 | +package com.hotent.chkpower.dao; | |
2 | + | |
3 | +import com.baomidou.mybatisplus.core.mapper.BaseMapper; | |
4 | +import com.hotent.chkpower.model.WProjectLibraryInventory; | |
5 | + | |
6 | +/** | |
7 | + * 项目库清单 Mapper 接口 | |
8 | + * | |
9 | + * @author admin | |
10 | + * @company 广州宏天软件股份有限公司 | |
11 | + * @since 2024-07-12 | |
12 | + */ | |
13 | +public interface WProjectLibraryInventoryDao extends BaseMapper<WProjectLibraryInventory> { | |
14 | + | |
15 | +} | ... | ... |
backend/chkpower/src/main/java/com/hotent/chkpower/dao/WProjectOperationRecordDao.java
0 → 100644
... | ... | @@ -0,0 +1,15 @@ |
1 | +package com.hotent.chkpower.dao; | |
2 | + | |
3 | +import com.baomidou.mybatisplus.core.mapper.BaseMapper; | |
4 | +import com.hotent.chkpower.model.WProjectOperationRecord; | |
5 | + | |
6 | +/** | |
7 | + * 项目操作记录 Mapper 接口 | |
8 | + * | |
9 | + * @author admin | |
10 | + * @company 广州宏天软件股份有限公司 | |
11 | + * @since 2024-07-12 | |
12 | + */ | |
13 | +public interface WProjectOperationRecordDao extends BaseMapper<WProjectOperationRecord> { | |
14 | + | |
15 | +} | ... | ... |
backend/chkpower/src/main/java/com/hotent/chkpower/manager/WAfterScriptManager.java
backend/chkpower/src/main/java/com/hotent/chkpower/manager/WProjectLibraryInventoryManager.java
0 → 100644
... | ... | @@ -0,0 +1,29 @@ |
1 | +package com.hotent.chkpower.manager; | |
2 | + | |
3 | +import com.hotent.base.manager.BaseManager; | |
4 | +import com.hotent.chkpower.model.WProjectLibraryInventory; | |
5 | + | |
6 | +/** | |
7 | + * 项目库清单 服务类 | |
8 | + * | |
9 | + * @author admin | |
10 | + * @company 广州宏天软件股份有限公司 | |
11 | + * @since 2024-07-12 | |
12 | + */ | |
13 | +public interface WProjectLibraryInventoryManager extends BaseManager<WProjectLibraryInventory> { | |
14 | + /** | |
15 | + * 根据主键获取详情 | |
16 | + * | |
17 | + * @param id | |
18 | + * @return | |
19 | + */ | |
20 | + WProjectLibraryInventory getDetail(String id); | |
21 | + | |
22 | + /** | |
23 | + * 新建、更新项目库清单 | |
24 | + * | |
25 | + * @param wProjectLibraryInventory | |
26 | + * @return | |
27 | + */ | |
28 | + void createOrUpdate(WProjectLibraryInventory wProjectLibraryInventory); | |
29 | +} | ... | ... |
backend/chkpower/src/main/java/com/hotent/chkpower/manager/WProjectOperationRecordManager.java
0 → 100644
... | ... | @@ -0,0 +1,29 @@ |
1 | +package com.hotent.chkpower.manager; | |
2 | + | |
3 | +import com.hotent.base.manager.BaseManager; | |
4 | +import com.hotent.chkpower.model.WProjectOperationRecord; | |
5 | + | |
6 | +/** | |
7 | + * 项目操作记录 服务类 | |
8 | + * | |
9 | + * @author admin | |
10 | + * @company 广州宏天软件股份有限公司 | |
11 | + * @since 2024-07-12 | |
12 | + */ | |
13 | +public interface WProjectOperationRecordManager extends BaseManager<WProjectOperationRecord> { | |
14 | + /** | |
15 | + * 根据主键获取详情 | |
16 | + * | |
17 | + * @param id | |
18 | + * @return | |
19 | + */ | |
20 | + WProjectOperationRecord getDetail(String id); | |
21 | + | |
22 | + /** | |
23 | + * 新建、更新项目操作记录 | |
24 | + * | |
25 | + * @param wProjectOperationRecord | |
26 | + * @return | |
27 | + */ | |
28 | + void createOrUpdate(WProjectOperationRecord wProjectOperationRecord); | |
29 | +} | ... | ... |
backend/chkpower/src/main/java/com/hotent/chkpower/manager/impl/WAfterScriptManagerImpl.java
1 | 1 | package com.hotent.chkpower.manager.impl; |
2 | 2 | |
3 | +import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; | |
4 | +import com.baomidou.mybatisplus.core.toolkit.Wrappers; | |
3 | 5 | import com.google.gson.Gson; |
4 | -import com.google.gson.reflect.TypeToken; | |
5 | 6 | import com.hotent.chkpower.manager.WAfterScriptManager; |
6 | 7 | import com.hotent.chkpower.manager.WDailyFundsManager; |
7 | -import com.hotent.chkpower.model.WCurrent; | |
8 | +import com.hotent.chkpower.manager.WProjectOperationRecordManager; | |
9 | +import com.hotent.chkpower.model.WProjectOperationRecord; | |
10 | +import com.hotent.chkpower.model.enums.EventTypeEnum; | |
8 | 11 | import lombok.AllArgsConstructor; |
9 | 12 | import lombok.extern.slf4j.Slf4j; |
10 | 13 | import org.activiti.engine.impl.util.json.JSONObject; |
11 | -import org.springframework.beans.factory.annotation.Autowired; | |
12 | 14 | import org.springframework.stereotype.Service; |
13 | 15 | import org.springframework.transaction.annotation.Transactional; |
14 | 16 | |
15 | 17 | import javax.annotation.Resource; |
16 | -import java.lang.reflect.Type; | |
17 | 18 | import java.time.LocalDate; |
18 | 19 | import java.time.LocalDateTime; |
19 | 20 | import java.time.LocalTime; |
... | ... | @@ -30,7 +31,8 @@ import java.util.Map; |
30 | 31 | public class WAfterScriptManagerImpl implements WAfterScriptManager { |
31 | 32 | @Resource |
32 | 33 | private WDailyFundsManager wDailyFundsManager; |
33 | - | |
34 | + @Resource | |
35 | + private WProjectOperationRecordManager wProjectOperationRecordManager; | |
34 | 36 | |
35 | 37 | @Override |
36 | 38 | public void editCurrentReport(Map map) { |
... | ... | @@ -54,6 +56,19 @@ public class WAfterScriptManagerImpl implements WAfterScriptManager { |
54 | 56 | wDailyFundsManager.editWDailyFunds(list, date); |
55 | 57 | } |
56 | 58 | |
59 | + @Override | |
60 | + public void createWProjectOperationRecord(Map map) { | |
61 | + String project_state = String.valueOf(map.get("project_state")); | |
62 | + String projectId = String.valueOf(map.get("id")); | |
63 | + List<WProjectOperationRecord> list = wProjectOperationRecordManager.list(Wrappers.<WProjectOperationRecord>lambdaQuery().eq(WProjectOperationRecord::getFProjectId, projectId).eq(WProjectOperationRecord::getFEventType, EventTypeEnum.tibao.getInfo())); | |
64 | + if ("待入库".equals(project_state) && ObjectUtils.isEmpty(list)) { | |
65 | + WProjectOperationRecord wProjectOperationRecord = new WProjectOperationRecord(); | |
66 | + wProjectOperationRecord.setFProjectId(projectId); | |
67 | + wProjectOperationRecord.setFEventType(EventTypeEnum.tibao.getCode()); | |
68 | + wProjectOperationRecordManager.createOrUpdate(wProjectOperationRecord); | |
69 | + } | |
70 | + } | |
71 | + | |
57 | 72 | |
58 | 73 | private static LocalDateTime convertStringToLocalDateTime(String dateString) { |
59 | 74 | String datePart = dateString.substring(0, 10); | ... | ... |
backend/chkpower/src/main/java/com/hotent/chkpower/manager/impl/WProjectLibraryInventoryManagerImpl.java
0 → 100644
... | ... | @@ -0,0 +1,33 @@ |
1 | +package com.hotent.chkpower.manager.impl; | |
2 | + | |
3 | +import com.hotent.base.manager.impl.BaseManagerImpl; | |
4 | +import com.hotent.chkpower.dao.WProjectLibraryInventoryDao; | |
5 | +import com.hotent.chkpower.manager.WProjectLibraryInventoryManager; | |
6 | +import com.hotent.chkpower.model.WProjectLibraryInventory; | |
7 | +import org.springframework.stereotype.Service; | |
8 | +import org.springframework.transaction.annotation.Transactional; | |
9 | + | |
10 | + | |
11 | +/** | |
12 | + * 项目库清单 服务实现类 | |
13 | + * | |
14 | + * @author admin | |
15 | + * @company 广州宏天软件股份有限公司 | |
16 | + * @since 2024-07-12 | |
17 | + */ | |
18 | +@Service | |
19 | +public class WProjectLibraryInventoryManagerImpl extends BaseManagerImpl<WProjectLibraryInventoryDao, WProjectLibraryInventory> implements WProjectLibraryInventoryManager { | |
20 | + | |
21 | + @Override | |
22 | + public WProjectLibraryInventory getDetail(String id) { | |
23 | + WProjectLibraryInventory wProjectLibraryInventory = this.get(id); | |
24 | + return wProjectLibraryInventory; | |
25 | + } | |
26 | + | |
27 | + @Override | |
28 | + @Transactional | |
29 | + public void createOrUpdate(WProjectLibraryInventory wProjectLibraryInventory) { | |
30 | + //新建或更新 | |
31 | + this.saveOrUpdate(wProjectLibraryInventory); | |
32 | + } | |
33 | +} | ... | ... |
backend/chkpower/src/main/java/com/hotent/chkpower/manager/impl/WProjectOperationRecordManagerImpl.java
0 → 100644
... | ... | @@ -0,0 +1,88 @@ |
1 | +package com.hotent.chkpower.manager.impl; | |
2 | + | |
3 | +import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; | |
4 | +import com.hotent.base.manager.impl.BaseManagerImpl; | |
5 | +import com.hotent.chkpower.dao.WProjectLibraryInventoryDao; | |
6 | +import com.hotent.chkpower.dao.WProjectOperationRecordDao; | |
7 | +import com.hotent.chkpower.manager.WProjectOperationRecordManager; | |
8 | +import com.hotent.chkpower.model.WProjectLibraryInventory; | |
9 | +import com.hotent.chkpower.model.WProjectOperationRecord; | |
10 | +import com.hotent.chkpower.model.enums.EventTypeEnum; | |
11 | +import com.hotent.runtime.script.ScriptImpl; | |
12 | +import com.hotent.uc.api.model.IUser; | |
13 | +import org.springframework.stereotype.Service; | |
14 | +import org.springframework.transaction.annotation.Transactional; | |
15 | + | |
16 | +import javax.annotation.Resource; | |
17 | +import java.time.LocalDateTime; | |
18 | + | |
19 | + | |
20 | +/** | |
21 | + * 项目操作记录 服务实现类 | |
22 | + * | |
23 | + * @author admin | |
24 | + * @company 广州宏天软件股份有限公司 | |
25 | + * @since 2024-07-12 | |
26 | + */ | |
27 | +@Transactional(rollbackFor = Exception.class) | |
28 | +@Service | |
29 | +public class WProjectOperationRecordManagerImpl extends BaseManagerImpl<WProjectOperationRecordDao, WProjectOperationRecord> implements WProjectOperationRecordManager { | |
30 | + | |
31 | + @Resource | |
32 | + private WProjectLibraryInventoryDao projectLibraryInventoryDao; | |
33 | + @Resource | |
34 | + private ScriptImpl script; | |
35 | + | |
36 | + @Override | |
37 | + public WProjectOperationRecord getDetail(String id) { | |
38 | + WProjectOperationRecord wProjectOperationRecord = this.get(id); | |
39 | + return wProjectOperationRecord; | |
40 | + } | |
41 | + | |
42 | + @Override | |
43 | + @Transactional | |
44 | + public void createOrUpdate(WProjectOperationRecord wProjectOperationRecord) { | |
45 | + //新建或更新 | |
46 | + if (ObjectUtils.isEmpty(wProjectOperationRecord.getFEventType())) { | |
47 | + throw new RuntimeException("请填写事件类型"); | |
48 | + } | |
49 | + if (ObjectUtils.isEmpty(wProjectOperationRecord.getFProjectId())) { | |
50 | + throw new RuntimeException("请填写项目id"); | |
51 | + } | |
52 | + EventTypeEnum eventTypeEnum = null; | |
53 | + try { | |
54 | + eventTypeEnum = EventTypeEnum.valueOf(wProjectOperationRecord.getFEventType()); | |
55 | + } catch (Exception e) { | |
56 | + throw new RuntimeException("事件类型不存在"); | |
57 | + } | |
58 | + if (eventTypeEnum == null) { | |
59 | + throw new RuntimeException("事件类型不存在"); | |
60 | + } | |
61 | + WProjectLibraryInventory wProjectLibraryInventory = projectLibraryInventoryDao.selectById(wProjectOperationRecord.getFProjectId()); | |
62 | + if (ObjectUtils.isEmpty(wProjectLibraryInventory)) { | |
63 | + throw new RuntimeException("项目库清单不存在"); | |
64 | + } | |
65 | + IUser currentUser = script.getCurrentUser(); | |
66 | + wProjectOperationRecord.setFCreateBy(currentUser.getFullname()); | |
67 | + wProjectOperationRecord.setFCreateById(currentUser.getUserId()); | |
68 | + wProjectOperationRecord.setFCreateTime(LocalDateTime.now()); | |
69 | + | |
70 | + wProjectOperationRecord.setFEventType(eventTypeEnum.getInfo()); | |
71 | + if (EventTypeEnum.tibao.getCode().equals(eventTypeEnum.getCode())) { | |
72 | + wProjectOperationRecord.setFProgressStatus(null); | |
73 | + } else if (EventTypeEnum.zuofei.getCode().equals(eventTypeEnum.getCode())) { | |
74 | + wProjectOperationRecord.setFProgressStatus(null); | |
75 | + wProjectLibraryInventory.setFProjectState("已作废"); | |
76 | + } else if (EventTypeEnum.ruku.getCode().equals(eventTypeEnum.getCode())) { | |
77 | + wProjectOperationRecord.setFProgressStatus(null); | |
78 | + wProjectLibraryInventory.setFProjectState("已入库"); | |
79 | + } else if (EventTypeEnum.xiangmujinzhan.getCode().equals(eventTypeEnum.getCode())) { | |
80 | + wProjectLibraryInventory.setFProjectDebriefing(wProjectLibraryInventory.getFProjectDebriefing() + "\n" + wProjectOperationRecord.getFProgressStatus()); | |
81 | + } else if (EventTypeEnum.chuku.getCode().equals(eventTypeEnum.getCode())) { | |
82 | + wProjectOperationRecord.setFProgressStatus(null); | |
83 | + wProjectLibraryInventory.setFProjectState("已出库"); | |
84 | + } | |
85 | + this.saveOrUpdate(wProjectOperationRecord); | |
86 | + projectLibraryInventoryDao.updateById(wProjectLibraryInventory); | |
87 | + } | |
88 | +} | ... | ... |
backend/chkpower/src/main/java/com/hotent/chkpower/model/WProjectLibraryInventory.java
0 → 100644
... | ... | @@ -0,0 +1,632 @@ |
1 | +package com.hotent.chkpower.model; | |
2 | + | |
3 | +import com.baomidou.mybatisplus.annotation.IdType; | |
4 | +import com.baomidou.mybatisplus.annotation.TableField; | |
5 | +import com.baomidou.mybatisplus.annotation.TableId; | |
6 | +import com.fasterxml.jackson.annotation.JsonProperty; | |
7 | +import com.hotent.base.entity.BaseModel; | |
8 | +import io.swagger.annotations.ApiModel; | |
9 | +import io.swagger.annotations.ApiModelProperty; | |
10 | + | |
11 | +import java.io.Serializable; | |
12 | +import java.time.LocalDateTime; | |
13 | + | |
14 | +/** | |
15 | + * 项目库清单 | |
16 | + * | |
17 | + * @author admin | |
18 | + * @company 广州宏天软件股份有限公司 | |
19 | + * @since 2024-07-12 | |
20 | + */ | |
21 | +@ApiModel(value = "WProjectLibraryInventory对象", description = "项目库清单") | |
22 | +public class WProjectLibraryInventory extends BaseModel<WProjectLibraryInventory> { | |
23 | + | |
24 | + private static final long serialVersionUID = 1L; | |
25 | + @ApiModelProperty(value = "主键") | |
26 | + @TableId(value = "ID_", type = IdType.ASSIGN_ID) | |
27 | + @JsonProperty("id") | |
28 | + private String id; | |
29 | + | |
30 | + @ApiModelProperty(value = "外键") | |
31 | + @TableField("REF_ID_") | |
32 | + @JsonProperty("refId") | |
33 | + private String refId; | |
34 | + | |
35 | + @ApiModelProperty(value = "项目公司或代表处") | |
36 | + @TableField("F_project_company") | |
37 | + @JsonProperty("fProjectCompany") | |
38 | + private String fProjectCompany; | |
39 | + | |
40 | + @ApiModelProperty(value = "入库时间") | |
41 | + @TableField("F_warehouse_entry_date") | |
42 | + @JsonProperty("fWarehouseEntryDate") | |
43 | + private LocalDateTime fWarehouseEntryDate; | |
44 | + | |
45 | + @ApiModelProperty(value = "项目名称") | |
46 | + @TableField("F_project_name") | |
47 | + @JsonProperty("fProjectName") | |
48 | + private String fProjectName; | |
49 | + | |
50 | + @ApiModelProperty(value = "项目类别") | |
51 | + @TableField("F_project_category") | |
52 | + @JsonProperty("fProjectCategory") | |
53 | + private String fProjectCategory; | |
54 | + | |
55 | + @ApiModelProperty(value = "业务场景") | |
56 | + @TableField("F_business_scenarios") | |
57 | + @JsonProperty("fBusinessScenarios") | |
58 | + private String fBusinessScenarios; | |
59 | + | |
60 | + @ApiModelProperty(value = "万㎡/智慧供热") | |
61 | + @TableField("F_smart_heating") | |
62 | + @JsonProperty("fSmartHeating") | |
63 | + private String fSmartHeating; | |
64 | + | |
65 | + @ApiModelProperty(value = "万KWh/综合能效") | |
66 | + @TableField("F_energy_efficiency") | |
67 | + @JsonProperty("fEnergyEfficiency") | |
68 | + private String fEnergyEfficiency; | |
69 | + | |
70 | + @ApiModelProperty(value = "MW/光伏") | |
71 | + @TableField("F_photovoltaic") | |
72 | + @JsonProperty("fPhotovoltaic") | |
73 | + private String fPhotovoltaic; | |
74 | + | |
75 | + @ApiModelProperty(value = "MWh/储能") | |
76 | + @TableField("F_energy_storage") | |
77 | + @JsonProperty("fEnergyStorage") | |
78 | + private String fEnergyStorage; | |
79 | + | |
80 | + @ApiModelProperty(value = "项目性质") | |
81 | + @TableField("F_project_nature") | |
82 | + @JsonProperty("fProjectNature") | |
83 | + private String fProjectNature; | |
84 | + | |
85 | + @ApiModelProperty(value = "商务模式") | |
86 | + @TableField("F_business_model") | |
87 | + @JsonProperty("fBusinessModel") | |
88 | + private String fBusinessModel; | |
89 | + | |
90 | + @ApiModelProperty(value = "投资规模(万元)") | |
91 | + @TableField("F_investment_scale") | |
92 | + @JsonProperty("fInvestmentScale") | |
93 | + private String fInvestmentScale; | |
94 | + | |
95 | + @ApiModelProperty(value = "项目评级") | |
96 | + @TableField("F_project_rating") | |
97 | + @JsonProperty("fProjectRating") | |
98 | + private String fProjectRating; | |
99 | + | |
100 | + @ApiModelProperty(value = "静态回收期") | |
101 | + @TableField("F_static_payback_period") | |
102 | + @JsonProperty("fStaticPaybackPeriod") | |
103 | + private String fStaticPaybackPeriod; | |
104 | + | |
105 | + @ApiModelProperty(value = "测算IRR") | |
106 | + @TableField("F_calculate_IRR") | |
107 | + @JsonProperty("fCalculateIrr") | |
108 | + private String fCalculateIrr; | |
109 | + | |
110 | + @ApiModelProperty(value = "年收入预测(万元)") | |
111 | + @TableField("F_annual_income_forecast") | |
112 | + @JsonProperty("fAnnualIncomeForecast") | |
113 | + private String fAnnualIncomeForecast; | |
114 | + | |
115 | + @ApiModelProperty(value = "年净利润预测(万元)") | |
116 | + @TableField("F_annual_net_profit_forecast") | |
117 | + @JsonProperty("fAnnualNetProfitForecast") | |
118 | + private String fAnnualNetProfitForecast; | |
119 | + | |
120 | + @ApiModelProperty(value = " 团队负责人") | |
121 | + @TableField("F_team_leader") | |
122 | + @JsonProperty("fTeamLeader") | |
123 | + private String fTeamLeader; | |
124 | + | |
125 | + @ApiModelProperty(value = " 团队负责人id") | |
126 | + @TableField("F_team_leader_id") | |
127 | + @JsonProperty("fTeamLeaderId") | |
128 | + private String fTeamLeaderId; | |
129 | + | |
130 | + @ApiModelProperty(value = "团队协同人员") | |
131 | + @TableField("F_team_collaboration_per") | |
132 | + @JsonProperty("fTeamCollaborationPer") | |
133 | + private String fTeamCollaborationPer; | |
134 | + | |
135 | + @ApiModelProperty(value = "团队协同人员id") | |
136 | + @TableField("F_team_collaboration_per_id") | |
137 | + @JsonProperty("fTeamCollaborationPerId") | |
138 | + private String fTeamCollaborationPerId; | |
139 | + | |
140 | + @ApiModelProperty(value = "预计签约时间") | |
141 | + @TableField("F_expected_signing_date") | |
142 | + @JsonProperty("fExpectedSigningDate") | |
143 | + private LocalDateTime fExpectedSigningDate; | |
144 | + | |
145 | + @ApiModelProperty(value = "预计开工时间") | |
146 | + @TableField("F_expected_scheduled_date") | |
147 | + @JsonProperty("fExpectedScheduledDate") | |
148 | + private LocalDateTime fExpectedScheduledDate; | |
149 | + | |
150 | + @ApiModelProperty(value = "战略价值") | |
151 | + @TableField("F_strategic_value") | |
152 | + @JsonProperty("fStrategicValue") | |
153 | + private String fStrategicValue; | |
154 | + | |
155 | + @ApiModelProperty(value = "项目来源") | |
156 | + @TableField("F_project_source") | |
157 | + @JsonProperty("fProjectSource") | |
158 | + private String fProjectSource; | |
159 | + | |
160 | + @ApiModelProperty(value = "客户联系人/职位") | |
161 | + @TableField("F_customer_contact") | |
162 | + @JsonProperty("fCustomerContact") | |
163 | + private String fCustomerContact; | |
164 | + | |
165 | + @ApiModelProperty(value = "项目概况") | |
166 | + @TableField("F_project_overview") | |
167 | + @JsonProperty("fProjectOverview") | |
168 | + private String fProjectOverview; | |
169 | + | |
170 | + @ApiModelProperty(value = "项目进展") | |
171 | + @TableField("F_project_debriefing") | |
172 | + @JsonProperty("fProjectDebriefing") | |
173 | + private String fProjectDebriefing; | |
174 | + | |
175 | + @ApiModelProperty(value = "偏差分析") | |
176 | + @TableField("F_deviation_analysis") | |
177 | + @JsonProperty("fDeviationAnalysis") | |
178 | + private String fDeviationAnalysis; | |
179 | + | |
180 | + @ApiModelProperty(value = "项目状态") | |
181 | + @TableField("F_project_state") | |
182 | + @JsonProperty("fProjectState") | |
183 | + private String fProjectState; | |
184 | + | |
185 | + @ApiModelProperty(value = "创建人") | |
186 | + @TableField("F_create_by") | |
187 | + @JsonProperty("fCreateBy") | |
188 | + private String fCreateBy; | |
189 | + | |
190 | + @ApiModelProperty(value = "创建人id") | |
191 | + @TableField("F_create_by_id") | |
192 | + @JsonProperty("fCreateById") | |
193 | + private String fCreateById; | |
194 | + | |
195 | + @ApiModelProperty(value = "创建时间") | |
196 | + @TableField("F_create_time") | |
197 | + @JsonProperty("fCreateTime") | |
198 | + private LocalDateTime fCreateTime; | |
199 | + | |
200 | + @ApiModelProperty(value = "修改人") | |
201 | + @TableField("F_update_by") | |
202 | + @JsonProperty("fUpdateBy") | |
203 | + private String fUpdateBy; | |
204 | + | |
205 | + @ApiModelProperty(value = "修改人id") | |
206 | + @TableField("F_update_by_id") | |
207 | + @JsonProperty("fUpdateById") | |
208 | + private String fUpdateById; | |
209 | + | |
210 | + @ApiModelProperty(value = "修改时间") | |
211 | + @TableField("F_update_time") | |
212 | + @JsonProperty("fUpdateTime") | |
213 | + private LocalDateTime fUpdateTime; | |
214 | + | |
215 | + @ApiModelProperty(value = "表单数据版本") | |
216 | + @TableField("F_form_data_rev_") | |
217 | + @JsonProperty("fFormDataRev") | |
218 | + private Long fFormDataRev; | |
219 | + | |
220 | + @ApiModelProperty(value = "项目编号") | |
221 | + @TableField("F_project_no") | |
222 | + @JsonProperty("fProjectNo") | |
223 | + private String fProjectNo; | |
224 | + | |
225 | + @ApiModelProperty(value = "组织id") | |
226 | + @TableField("F_org_id") | |
227 | + @JsonProperty("fOrgId") | |
228 | + private String fOrgId; | |
229 | + | |
230 | + public String getCreateTime() { | |
231 | + return createTime; | |
232 | + } | |
233 | + | |
234 | + public void setCreateTime(String createTime) { | |
235 | + this.createTime = createTime; | |
236 | + } | |
237 | + | |
238 | + public String getUpdateTime() { | |
239 | + return updateTime; | |
240 | + } | |
241 | + | |
242 | + public void setUpdateTime(String updateTime) { | |
243 | + this.updateTime = updateTime; | |
244 | + } | |
245 | + | |
246 | + @TableField(exist = false) | |
247 | + private String createTime; | |
248 | + @TableField(exist = false) | |
249 | + private String updateTime; | |
250 | + | |
251 | + | |
252 | + public String getId() { | |
253 | + return id; | |
254 | + } | |
255 | + | |
256 | + public void setId(String id) { | |
257 | + this.id = id; | |
258 | + } | |
259 | + | |
260 | + public String getRefId() { | |
261 | + return refId; | |
262 | + } | |
263 | + | |
264 | + public void setRefId(String refId) { | |
265 | + this.refId = refId; | |
266 | + } | |
267 | + | |
268 | + public String getFProjectCompany() { | |
269 | + return fProjectCompany; | |
270 | + } | |
271 | + | |
272 | + public void setFProjectCompany(String fProjectCompany) { | |
273 | + this.fProjectCompany = fProjectCompany; | |
274 | + } | |
275 | + | |
276 | + public LocalDateTime getFWarehouseEntryDate() { | |
277 | + return fWarehouseEntryDate; | |
278 | + } | |
279 | + | |
280 | + public void setFWarehouseEntryDate(LocalDateTime fWarehouseEntryDate) { | |
281 | + this.fWarehouseEntryDate = fWarehouseEntryDate; | |
282 | + } | |
283 | + | |
284 | + public String getFProjectName() { | |
285 | + return fProjectName; | |
286 | + } | |
287 | + | |
288 | + public void setFProjectName(String fProjectName) { | |
289 | + this.fProjectName = fProjectName; | |
290 | + } | |
291 | + | |
292 | + public String getFProjectCategory() { | |
293 | + return fProjectCategory; | |
294 | + } | |
295 | + | |
296 | + public void setFProjectCategory(String fProjectCategory) { | |
297 | + this.fProjectCategory = fProjectCategory; | |
298 | + } | |
299 | + | |
300 | + public String getFBusinessScenarios() { | |
301 | + return fBusinessScenarios; | |
302 | + } | |
303 | + | |
304 | + public void setFBusinessScenarios(String fBusinessScenarios) { | |
305 | + this.fBusinessScenarios = fBusinessScenarios; | |
306 | + } | |
307 | + | |
308 | + public String getFSmartHeating() { | |
309 | + return fSmartHeating; | |
310 | + } | |
311 | + | |
312 | + public void setFSmartHeating(String fSmartHeating) { | |
313 | + this.fSmartHeating = fSmartHeating; | |
314 | + } | |
315 | + | |
316 | + public String getFEnergyEfficiency() { | |
317 | + return fEnergyEfficiency; | |
318 | + } | |
319 | + | |
320 | + public void setFEnergyEfficiency(String fEnergyEfficiency) { | |
321 | + this.fEnergyEfficiency = fEnergyEfficiency; | |
322 | + } | |
323 | + | |
324 | + public String getFPhotovoltaic() { | |
325 | + return fPhotovoltaic; | |
326 | + } | |
327 | + | |
328 | + public void setFPhotovoltaic(String fPhotovoltaic) { | |
329 | + this.fPhotovoltaic = fPhotovoltaic; | |
330 | + } | |
331 | + | |
332 | + public String getFEnergyStorage() { | |
333 | + return fEnergyStorage; | |
334 | + } | |
335 | + | |
336 | + public void setFEnergyStorage(String fEnergyStorage) { | |
337 | + this.fEnergyStorage = fEnergyStorage; | |
338 | + } | |
339 | + | |
340 | + public String getFProjectNature() { | |
341 | + return fProjectNature; | |
342 | + } | |
343 | + | |
344 | + public void setFProjectNature(String fProjectNature) { | |
345 | + this.fProjectNature = fProjectNature; | |
346 | + } | |
347 | + | |
348 | + public String getFBusinessModel() { | |
349 | + return fBusinessModel; | |
350 | + } | |
351 | + | |
352 | + public void setFBusinessModel(String fBusinessModel) { | |
353 | + this.fBusinessModel = fBusinessModel; | |
354 | + } | |
355 | + | |
356 | + public String getFInvestmentScale() { | |
357 | + return fInvestmentScale; | |
358 | + } | |
359 | + | |
360 | + public void setFInvestmentScale(String fInvestmentScale) { | |
361 | + this.fInvestmentScale = fInvestmentScale; | |
362 | + } | |
363 | + | |
364 | + public String getFProjectRating() { | |
365 | + return fProjectRating; | |
366 | + } | |
367 | + | |
368 | + public void setFProjectRating(String fProjectRating) { | |
369 | + this.fProjectRating = fProjectRating; | |
370 | + } | |
371 | + | |
372 | + public String getFStaticPaybackPeriod() { | |
373 | + return fStaticPaybackPeriod; | |
374 | + } | |
375 | + | |
376 | + public void setFStaticPaybackPeriod(String fStaticPaybackPeriod) { | |
377 | + this.fStaticPaybackPeriod = fStaticPaybackPeriod; | |
378 | + } | |
379 | + | |
380 | + public String getFCalculateIrr() { | |
381 | + return fCalculateIrr; | |
382 | + } | |
383 | + | |
384 | + public void setFCalculateIrr(String fCalculateIrr) { | |
385 | + this.fCalculateIrr = fCalculateIrr; | |
386 | + } | |
387 | + | |
388 | + public String getFAnnualIncomeForecast() { | |
389 | + return fAnnualIncomeForecast; | |
390 | + } | |
391 | + | |
392 | + public void setFAnnualIncomeForecast(String fAnnualIncomeForecast) { | |
393 | + this.fAnnualIncomeForecast = fAnnualIncomeForecast; | |
394 | + } | |
395 | + | |
396 | + public String getFAnnualNetProfitForecast() { | |
397 | + return fAnnualNetProfitForecast; | |
398 | + } | |
399 | + | |
400 | + public void setFAnnualNetProfitForecast(String fAnnualNetProfitForecast) { | |
401 | + this.fAnnualNetProfitForecast = fAnnualNetProfitForecast; | |
402 | + } | |
403 | + | |
404 | + public String getFTeamLeader() { | |
405 | + return fTeamLeader; | |
406 | + } | |
407 | + | |
408 | + public void setFTeamLeader(String fTeamLeader) { | |
409 | + this.fTeamLeader = fTeamLeader; | |
410 | + } | |
411 | + | |
412 | + public String getFTeamLeaderId() { | |
413 | + return fTeamLeaderId; | |
414 | + } | |
415 | + | |
416 | + public void setFTeamLeaderId(String fTeamLeaderId) { | |
417 | + this.fTeamLeaderId = fTeamLeaderId; | |
418 | + } | |
419 | + | |
420 | + public String getFTeamCollaborationPer() { | |
421 | + return fTeamCollaborationPer; | |
422 | + } | |
423 | + | |
424 | + public void setFTeamCollaborationPer(String fTeamCollaborationPer) { | |
425 | + this.fTeamCollaborationPer = fTeamCollaborationPer; | |
426 | + } | |
427 | + | |
428 | + public String getFTeamCollaborationPerId() { | |
429 | + return fTeamCollaborationPerId; | |
430 | + } | |
431 | + | |
432 | + public void setFTeamCollaborationPerId(String fTeamCollaborationPerId) { | |
433 | + this.fTeamCollaborationPerId = fTeamCollaborationPerId; | |
434 | + } | |
435 | + | |
436 | + public LocalDateTime getFExpectedSigningDate() { | |
437 | + return fExpectedSigningDate; | |
438 | + } | |
439 | + | |
440 | + public void setFExpectedSigningDate(LocalDateTime fExpectedSigningDate) { | |
441 | + this.fExpectedSigningDate = fExpectedSigningDate; | |
442 | + } | |
443 | + | |
444 | + public LocalDateTime getFExpectedScheduledDate() { | |
445 | + return fExpectedScheduledDate; | |
446 | + } | |
447 | + | |
448 | + public void setFExpectedScheduledDate(LocalDateTime fExpectedScheduledDate) { | |
449 | + this.fExpectedScheduledDate = fExpectedScheduledDate; | |
450 | + } | |
451 | + | |
452 | + public String getFStrategicValue() { | |
453 | + return fStrategicValue; | |
454 | + } | |
455 | + | |
456 | + public void setFStrategicValue(String fStrategicValue) { | |
457 | + this.fStrategicValue = fStrategicValue; | |
458 | + } | |
459 | + | |
460 | + public String getFProjectSource() { | |
461 | + return fProjectSource; | |
462 | + } | |
463 | + | |
464 | + public void setFProjectSource(String fProjectSource) { | |
465 | + this.fProjectSource = fProjectSource; | |
466 | + } | |
467 | + | |
468 | + public String getFCustomerContact() { | |
469 | + return fCustomerContact; | |
470 | + } | |
471 | + | |
472 | + public void setFCustomerContact(String fCustomerContact) { | |
473 | + this.fCustomerContact = fCustomerContact; | |
474 | + } | |
475 | + | |
476 | + public String getFProjectOverview() { | |
477 | + return fProjectOverview; | |
478 | + } | |
479 | + | |
480 | + public void setFProjectOverview(String fProjectOverview) { | |
481 | + this.fProjectOverview = fProjectOverview; | |
482 | + } | |
483 | + | |
484 | + public String getFProjectDebriefing() { | |
485 | + return fProjectDebriefing; | |
486 | + } | |
487 | + | |
488 | + public void setFProjectDebriefing(String fProjectDebriefing) { | |
489 | + this.fProjectDebriefing = fProjectDebriefing; | |
490 | + } | |
491 | + | |
492 | + public String getFDeviationAnalysis() { | |
493 | + return fDeviationAnalysis; | |
494 | + } | |
495 | + | |
496 | + public void setFDeviationAnalysis(String fDeviationAnalysis) { | |
497 | + this.fDeviationAnalysis = fDeviationAnalysis; | |
498 | + } | |
499 | + | |
500 | + public String getFProjectState() { | |
501 | + return fProjectState; | |
502 | + } | |
503 | + | |
504 | + public void setFProjectState(String fProjectState) { | |
505 | + this.fProjectState = fProjectState; | |
506 | + } | |
507 | + | |
508 | + public String getFCreateBy() { | |
509 | + return fCreateBy; | |
510 | + } | |
511 | + | |
512 | + public void setFCreateBy(String fCreateBy) { | |
513 | + this.fCreateBy = fCreateBy; | |
514 | + } | |
515 | + | |
516 | + public String getFCreateById() { | |
517 | + return fCreateById; | |
518 | + } | |
519 | + | |
520 | + public void setFCreateById(String fCreateById) { | |
521 | + this.fCreateById = fCreateById; | |
522 | + } | |
523 | + | |
524 | + public LocalDateTime getFCreateTime() { | |
525 | + return fCreateTime; | |
526 | + } | |
527 | + | |
528 | + public void setFCreateTime(LocalDateTime fCreateTime) { | |
529 | + this.fCreateTime = fCreateTime; | |
530 | + } | |
531 | + | |
532 | + public String getFUpdateBy() { | |
533 | + return fUpdateBy; | |
534 | + } | |
535 | + | |
536 | + public void setFUpdateBy(String fUpdateBy) { | |
537 | + this.fUpdateBy = fUpdateBy; | |
538 | + } | |
539 | + | |
540 | + public String getFUpdateById() { | |
541 | + return fUpdateById; | |
542 | + } | |
543 | + | |
544 | + public void setFUpdateById(String fUpdateById) { | |
545 | + this.fUpdateById = fUpdateById; | |
546 | + } | |
547 | + | |
548 | + public LocalDateTime getFUpdateTime() { | |
549 | + return fUpdateTime; | |
550 | + } | |
551 | + | |
552 | + public void setFUpdateTime(LocalDateTime fUpdateTime) { | |
553 | + this.fUpdateTime = fUpdateTime; | |
554 | + } | |
555 | + | |
556 | + public Long getFFormDataRev() { | |
557 | + return fFormDataRev; | |
558 | + } | |
559 | + | |
560 | + public void setFFormDataRev(Long fFormDataRev) { | |
561 | + this.fFormDataRev = fFormDataRev; | |
562 | + } | |
563 | + | |
564 | + public String getFProjectNo() { | |
565 | + return fProjectNo; | |
566 | + } | |
567 | + | |
568 | + public void setFProjectNo(String fProjectNo) { | |
569 | + this.fProjectNo = fProjectNo; | |
570 | + } | |
571 | + | |
572 | + public String getFOrgId() { | |
573 | + return fOrgId; | |
574 | + } | |
575 | + | |
576 | + public void setFOrgId(String fOrgId) { | |
577 | + this.fOrgId = fOrgId; | |
578 | + } | |
579 | + | |
580 | + | |
581 | + @Override | |
582 | + protected Serializable pkVal() { | |
583 | + return this.id; | |
584 | + } | |
585 | + | |
586 | + @Override | |
587 | + public String toString() { | |
588 | + return "WProjectLibraryInventory{" + | |
589 | + "id=" + id + | |
590 | + ", refId=" + refId + | |
591 | + ", fProjectCompany=" + fProjectCompany + | |
592 | + ", fWarehouseEntryDate=" + fWarehouseEntryDate + | |
593 | + ", fProjectName=" + fProjectName + | |
594 | + ", fProjectCategory=" + fProjectCategory + | |
595 | + ", fBusinessScenarios=" + fBusinessScenarios + | |
596 | + ", fSmartHeating=" + fSmartHeating + | |
597 | + ", fEnergyEfficiency=" + fEnergyEfficiency + | |
598 | + ", fPhotovoltaic=" + fPhotovoltaic + | |
599 | + ", fEnergyStorage=" + fEnergyStorage + | |
600 | + ", fProjectNature=" + fProjectNature + | |
601 | + ", fBusinessModel=" + fBusinessModel + | |
602 | + ", fInvestmentScale=" + fInvestmentScale + | |
603 | + ", fProjectRating=" + fProjectRating + | |
604 | + ", fStaticPaybackPeriod=" + fStaticPaybackPeriod + | |
605 | + ", fCalculateIrr=" + fCalculateIrr + | |
606 | + ", fAnnualIncomeForecast=" + fAnnualIncomeForecast + | |
607 | + ", fAnnualNetProfitForecast=" + fAnnualNetProfitForecast + | |
608 | + ", fTeamLeader=" + fTeamLeader + | |
609 | + ", fTeamLeaderId=" + fTeamLeaderId + | |
610 | + ", fTeamCollaborationPer=" + fTeamCollaborationPer + | |
611 | + ", fTeamCollaborationPerId=" + fTeamCollaborationPerId + | |
612 | + ", fExpectedSigningDate=" + fExpectedSigningDate + | |
613 | + ", fExpectedScheduledDate=" + fExpectedScheduledDate + | |
614 | + ", fStrategicValue=" + fStrategicValue + | |
615 | + ", fProjectSource=" + fProjectSource + | |
616 | + ", fCustomerContact=" + fCustomerContact + | |
617 | + ", fProjectOverview=" + fProjectOverview + | |
618 | + ", fProjectDebriefing=" + fProjectDebriefing + | |
619 | + ", fDeviationAnalysis=" + fDeviationAnalysis + | |
620 | + ", fProjectState=" + fProjectState + | |
621 | + ", fCreateBy=" + fCreateBy + | |
622 | + ", fCreateById=" + fCreateById + | |
623 | + ", fCreateTime=" + fCreateTime + | |
624 | + ", fUpdateBy=" + fUpdateBy + | |
625 | + ", fUpdateById=" + fUpdateById + | |
626 | + ", fUpdateTime=" + fUpdateTime + | |
627 | + ", fFormDataRev=" + fFormDataRev + | |
628 | + ", fProjectNo=" + fProjectNo + | |
629 | + ", fOrgId=" + fOrgId + | |
630 | + "}"; | |
631 | + } | |
632 | +} | ... | ... |
backend/chkpower/src/main/java/com/hotent/chkpower/model/WProjectOperationRecord.java
0 → 100644
... | ... | @@ -0,0 +1,163 @@ |
1 | +package com.hotent.chkpower.model; | |
2 | + | |
3 | +import com.baomidou.mybatisplus.annotation.IdType; | |
4 | +import com.baomidou.mybatisplus.annotation.TableField; | |
5 | +import com.baomidou.mybatisplus.annotation.TableId; | |
6 | +import com.fasterxml.jackson.annotation.JsonProperty; | |
7 | +import com.hotent.base.entity.BaseModel; | |
8 | +import io.swagger.annotations.ApiModel; | |
9 | +import io.swagger.annotations.ApiModelProperty; | |
10 | + | |
11 | +import java.io.Serializable; | |
12 | +import java.time.LocalDateTime; | |
13 | + | |
14 | +/** | |
15 | + * 项目操作记录 | |
16 | + * | |
17 | + * @author admin | |
18 | + * @company 广州宏天软件股份有限公司 | |
19 | + * @since 2024-07-12 | |
20 | + */ | |
21 | +@ApiModel(value = "WProjectOperationRecord对象", description = "项目操作记录") | |
22 | +public class WProjectOperationRecord extends BaseModel<WProjectOperationRecord> { | |
23 | + | |
24 | + private static final long serialVersionUID = 1L; | |
25 | + @ApiModelProperty(value = "主键") | |
26 | + @TableId(value = "ID_", type = IdType.ASSIGN_ID) | |
27 | + @JsonProperty("id") | |
28 | + private String id; | |
29 | + | |
30 | + @ApiModelProperty(value = "外键") | |
31 | + @TableField("REF_ID_") | |
32 | + @JsonProperty("refId") | |
33 | + private String refId; | |
34 | + | |
35 | + @ApiModelProperty(value = "项目id") | |
36 | + @TableField("F_project_id") | |
37 | + @JsonProperty("fProjectId") | |
38 | + private String fProjectId; | |
39 | + | |
40 | + @ApiModelProperty(value = "创建人") | |
41 | + @TableField("F_create_by") | |
42 | + @JsonProperty("fCreateBy") | |
43 | + private String fCreateBy; | |
44 | + | |
45 | + @ApiModelProperty(value = "创建人id") | |
46 | + @TableField("F_create_by_id") | |
47 | + @JsonProperty("fCreateById") | |
48 | + private String fCreateById; | |
49 | + | |
50 | + @ApiModelProperty(value = "创建时间") | |
51 | + @TableField("F_create_time") | |
52 | + @JsonProperty("fCreateTime") | |
53 | + private LocalDateTime fCreateTime; | |
54 | + | |
55 | + @ApiModelProperty(value = "事件类型") | |
56 | + @TableField("F_event_type") | |
57 | + @JsonProperty("fEventType") | |
58 | + private String fEventType; | |
59 | + | |
60 | + @ApiModelProperty(value = "进展情况") | |
61 | + @TableField("F_progress_status") | |
62 | + @JsonProperty("fProgressStatus") | |
63 | + private String fProgressStatus; | |
64 | + | |
65 | + @ApiModelProperty(value = "表单数据版本") | |
66 | + @TableField("F_form_data_rev_") | |
67 | + @JsonProperty("fFormDataRev") | |
68 | + private Long fFormDataRev; | |
69 | + | |
70 | + | |
71 | + public String getId() { | |
72 | + return id; | |
73 | + } | |
74 | + | |
75 | + public void setId(String id) { | |
76 | + this.id = id; | |
77 | + } | |
78 | + | |
79 | + public String getRefId() { | |
80 | + return refId; | |
81 | + } | |
82 | + | |
83 | + public void setRefId(String refId) { | |
84 | + this.refId = refId; | |
85 | + } | |
86 | + | |
87 | + public String getFProjectId() { | |
88 | + return fProjectId; | |
89 | + } | |
90 | + | |
91 | + public void setFProjectId(String fProjectId) { | |
92 | + this.fProjectId = fProjectId; | |
93 | + } | |
94 | + | |
95 | + public String getFCreateBy() { | |
96 | + return fCreateBy; | |
97 | + } | |
98 | + | |
99 | + public void setFCreateBy(String fCreateBy) { | |
100 | + this.fCreateBy = fCreateBy; | |
101 | + } | |
102 | + | |
103 | + public String getFCreateById() { | |
104 | + return fCreateById; | |
105 | + } | |
106 | + | |
107 | + public void setFCreateById(String fCreateById) { | |
108 | + this.fCreateById = fCreateById; | |
109 | + } | |
110 | + | |
111 | + public LocalDateTime getFCreateTime() { | |
112 | + return fCreateTime; | |
113 | + } | |
114 | + | |
115 | + public void setFCreateTime(LocalDateTime fCreateTime) { | |
116 | + this.fCreateTime = fCreateTime; | |
117 | + } | |
118 | + | |
119 | + public String getFEventType() { | |
120 | + return fEventType; | |
121 | + } | |
122 | + | |
123 | + public void setFEventType(String fEventType) { | |
124 | + this.fEventType = fEventType; | |
125 | + } | |
126 | + | |
127 | + public String getFProgressStatus() { | |
128 | + return fProgressStatus; | |
129 | + } | |
130 | + | |
131 | + public void setFProgressStatus(String fProgressStatus) { | |
132 | + this.fProgressStatus = fProgressStatus; | |
133 | + } | |
134 | + | |
135 | + public Long getFFormDataRev() { | |
136 | + return fFormDataRev; | |
137 | + } | |
138 | + | |
139 | + public void setFFormDataRev(Long fFormDataRev) { | |
140 | + this.fFormDataRev = fFormDataRev; | |
141 | + } | |
142 | + | |
143 | + | |
144 | + @Override | |
145 | + protected Serializable pkVal() { | |
146 | + return this.id; | |
147 | + } | |
148 | + | |
149 | + @Override | |
150 | + public String toString() { | |
151 | + return "WProjectOperationRecord{" + | |
152 | + "id=" + id + | |
153 | + ", refId=" + refId + | |
154 | + ", fProjectId=" + fProjectId + | |
155 | + ", fCreateBy=" + fCreateBy + | |
156 | + ", fCreateById=" + fCreateById + | |
157 | + ", fCreateTime=" + fCreateTime + | |
158 | + ", fEventType=" + fEventType + | |
159 | + ", fProgressStatus=" + fProgressStatus + | |
160 | + ", fFormDataRev=" + fFormDataRev + | |
161 | + "}"; | |
162 | + } | |
163 | +} | ... | ... |
backend/chkpower/src/main/java/com/hotent/chkpower/model/enums/EventTypeEnum.java
0 → 100644
... | ... | @@ -0,0 +1,42 @@ |
1 | +package com.hotent.chkpower.model.enums; | |
2 | + | |
3 | +import lombok.AllArgsConstructor; | |
4 | +import lombok.Getter; | |
5 | + | |
6 | +/** | |
7 | + * 安检类型 | |
8 | + */ | |
9 | +@AllArgsConstructor | |
10 | +@Getter | |
11 | +public enum EventTypeEnum { | |
12 | + | |
13 | + /** | |
14 | + * 提报 | |
15 | + */ | |
16 | + tibao("tibao", "提报"), | |
17 | + | |
18 | + /** | |
19 | + * 作废 | |
20 | + */ | |
21 | + zuofei("zuofei", "作废"), | |
22 | + | |
23 | + /** | |
24 | + * 入库 | |
25 | + */ | |
26 | + ruku("ruku", "入库"), | |
27 | + | |
28 | + /** | |
29 | + * 项目进展 | |
30 | + */ | |
31 | + xiangmujinzhan("xiangmujinzhan", "项目进展"), | |
32 | + | |
33 | + /** | |
34 | + * 出库 | |
35 | + */ | |
36 | + chuku("chuku", "出库"), | |
37 | + | |
38 | + ; | |
39 | + | |
40 | + private final String code; | |
41 | + private final String info; | |
42 | +} | ... | ... |
No preview for this file type
backend/chkpower/src/main/resources/mapper/WProjectLibraryInventoryMapper.xml
0 → 100644
... | ... | @@ -0,0 +1,79 @@ |
1 | +<?xml version="1.0" encoding="UTF-8"?> | |
2 | +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |
3 | +<mapper namespace="com.hotent.chkpower.dao.WProjectLibraryInventoryDao"> | |
4 | + | |
5 | + <!-- 通用查询映射结果 --> | |
6 | + <resultMap id="BaseResultMap" type="com.hotent.chkpower.model.WProjectLibraryInventory"> | |
7 | + <id column="ID_" property="id"/> | |
8 | + <result column="REF_ID_" property="refId"/> | |
9 | + <result column="F_project_company" property="fProjectCompany"/> | |
10 | + <result column="F_warehouse_entry_date" property="fWarehouseEntryDate"/> | |
11 | + <result column="F_project_name" property="fProjectName"/> | |
12 | + <result column="F_project_category" property="fProjectCategory"/> | |
13 | + <result column="F_business_scenarios" property="fBusinessScenarios"/> | |
14 | + <result column="F_smart_heating" property="fSmartHeating"/> | |
15 | + <result column="F_energy_efficiency" property="fEnergyEfficiency"/> | |
16 | + <result column="F_photovoltaic" property="fPhotovoltaic"/> | |
17 | + <result column="F_energy_storage" property="fEnergyStorage"/> | |
18 | + <result column="F_project_nature" property="fProjectNature"/> | |
19 | + <result column="F_business_model" property="fBusinessModel"/> | |
20 | + <result column="F_investment_scale" property="fInvestmentScale"/> | |
21 | + <result column="F_project_rating" property="fProjectRating"/> | |
22 | + <result column="F_static_payback_period" property="fStaticPaybackPeriod"/> | |
23 | + <result column="F_calculate_IRR" property="fCalculateIrr"/> | |
24 | + <result column="F_annual_income_forecast" property="fAnnualIncomeForecast"/> | |
25 | + <result column="F_annual_net_profit_forecast" property="fAnnualNetProfitForecast"/> | |
26 | + <result column="F_team_leader" property="fTeamLeader"/> | |
27 | + <result column="F_team_leader_id" property="fTeamLeaderId"/> | |
28 | + <result column="F_team_collaboration_per" property="fTeamCollaborationPer"/> | |
29 | + <result column="F_team_collaboration_per_id" property="fTeamCollaborationPerId"/> | |
30 | + <result column="F_expected_signing_date" property="fExpectedSigningDate"/> | |
31 | + <result column="F_expected_scheduled_date" property="fExpectedScheduledDate"/> | |
32 | + <result column="F_strategic_value" property="fStrategicValue"/> | |
33 | + <result column="F_project_source" property="fProjectSource"/> | |
34 | + <result column="F_customer_contact" property="fCustomerContact"/> | |
35 | + <result column="F_project_overview" property="fProjectOverview"/> | |
36 | + <result column="F_project_debriefing" property="fProjectDebriefing"/> | |
37 | + <result column="F_deviation_analysis" property="fDeviationAnalysis"/> | |
38 | + <result column="F_project_state" property="fProjectState"/> | |
39 | + <result column="F_create_by" property="fCreateBy"/> | |
40 | + <result column="F_create_by_id" property="fCreateById"/> | |
41 | + <result column="F_create_time" property="fCreateTime"/> | |
42 | + <result column="F_update_by" property="fUpdateBy"/> | |
43 | + <result column="F_update_by_id" property="fUpdateById"/> | |
44 | + <result column="F_update_time" property="fUpdateTime"/> | |
45 | + <result column="F_form_data_rev_" property="fFormDataRev"/> | |
46 | + <result column="F_project_no" property="fProjectNo"/> | |
47 | + <result column="F_org_id" property="fOrgId"/> | |
48 | + </resultMap> | |
49 | + | |
50 | + <!-- 通用查询结果列 --> | |
51 | + <sql id="Base_Column_List"> | |
52 | + ID_, REF_ID_, F_project_company, 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 | |
53 | + </sql> | |
54 | + | |
55 | + <select id="selectPage" resultMap="BaseResultMap"> | |
56 | + select | |
57 | + <include refid="Base_Column_List"/> | |
58 | + from | |
59 | + w_project_library_inventory | |
60 | + ${ew.customSqlSegment} | |
61 | + </select> | |
62 | + | |
63 | + <select id="selectList" resultMap="BaseResultMap"> | |
64 | + select | |
65 | + <include refid="Base_Column_List"/> | |
66 | + from | |
67 | + w_project_library_inventory | |
68 | + ${ew.customSqlSegment} | |
69 | + </select> | |
70 | + | |
71 | + <select id="selectById" resultMap="BaseResultMap"> | |
72 | + select | |
73 | + <include refid="Base_Column_List"/> | |
74 | + from | |
75 | + w_project_library_inventory | |
76 | + where | |
77 | + ID_ = #{id} | |
78 | + </select> | |
79 | +</mapper> | ... | ... |
backend/chkpower/src/main/resources/mapper/WProjectOperationRecordMapper.xml
0 → 100644
... | ... | @@ -0,0 +1,47 @@ |
1 | +<?xml version="1.0" encoding="UTF-8"?> | |
2 | +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |
3 | +<mapper namespace="com.hotent.chkpower.dao.WProjectOperationRecordDao"> | |
4 | + | |
5 | + <!-- 通用查询映射结果 --> | |
6 | + <resultMap id="BaseResultMap" type="com.hotent.chkpower.model.WProjectOperationRecord"> | |
7 | + <id column="ID_" property="id"/> | |
8 | + <result column="REF_ID_" property="refId"/> | |
9 | + <result column="F_project_id" property="fProjectId"/> | |
10 | + <result column="F_create_by" property="fCreateBy"/> | |
11 | + <result column="F_create_by_id" property="fCreateById"/> | |
12 | + <result column="F_create_time" property="fCreateTime"/> | |
13 | + <result column="F_event_type" property="fEventType"/> | |
14 | + <result column="F_progress_status" property="fProgressStatus"/> | |
15 | + <result column="F_form_data_rev_" property="fFormDataRev"/> | |
16 | + </resultMap> | |
17 | + | |
18 | + <!-- 通用查询结果列 --> | |
19 | + <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 | + </sql> | |
22 | + | |
23 | + <select id="selectPage" resultMap="BaseResultMap"> | |
24 | + select | |
25 | + <include refid="Base_Column_List"/> | |
26 | + from | |
27 | + w_project_operation_record | |
28 | + ${ew.customSqlSegment} | |
29 | + </select> | |
30 | + | |
31 | + <select id="selectList" resultMap="BaseResultMap"> | |
32 | + select | |
33 | + <include refid="Base_Column_List"/> | |
34 | + from | |
35 | + w_project_operation_record | |
36 | + ${ew.customSqlSegment} | |
37 | + </select> | |
38 | + | |
39 | + <select id="selectById" resultMap="BaseResultMap"> | |
40 | + select | |
41 | + <include refid="Base_Column_List"/> | |
42 | + from | |
43 | + w_project_operation_record | |
44 | + where | |
45 | + ID_ = #{id} | |
46 | + </select> | |
47 | +</mapper> | ... | ... |