lamphua преди 1 година
родител
ревизия
e9ce306a73

+ 1
- 72
oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/file/FilesAchievementController.java Целия файл

15
 import com.ruoyi.file.service.IFilesStorageService;
15
 import com.ruoyi.file.service.IFilesStorageService;
16
 import org.springframework.beans.factory.annotation.Autowired;
16
 import org.springframework.beans.factory.annotation.Autowired;
17
 import org.springframework.beans.factory.annotation.Value;
17
 import org.springframework.beans.factory.annotation.Value;
18
-import org.springframework.security.access.prepost.PreAuthorize;
19
 import org.springframework.web.bind.annotation.*;
18
 import org.springframework.web.bind.annotation.*;
20
 import org.springframework.web.multipart.MultipartFile;
19
 import org.springframework.web.multipart.MultipartFile;
21
 
20
 
44
     @Autowired
43
     @Autowired
45
     private IFilesStorageService filesStorageService;
44
     private IFilesStorageService filesStorageService;
46
 
45
 
47
-    @Value("${ruoyi.profile}")
46
+    @Value("${cmc.profile}")
48
     private String profile;
47
     private String profile;
49
     /**
48
     /**
50
      * 查询成果表列表
49
      * 查询成果表列表
51
      */
50
      */
52
-    @PreAuthorize("@ss.hasPermi('file:achievement:list')")
53
     @GetMapping("/list")
51
     @GetMapping("/list")
54
     public TableDataInfo list(FilesAchievement filesAchievement)
52
     public TableDataInfo list(FilesAchievement filesAchievement)
55
     {
53
     {
75
     /**
73
     /**
76
      * 导出成果表列表
74
      * 导出成果表列表
77
      */
75
      */
78
-    @PreAuthorize("@ss.hasPermi('file:achievement:export')")
79
     @Log(title = "成果表", businessType = BusinessType.EXPORT)
76
     @Log(title = "成果表", businessType = BusinessType.EXPORT)
80
     @PostMapping("/export")
77
     @PostMapping("/export")
81
     public void export(HttpServletResponse response, FilesAchievement filesAchievement)
78
     public void export(HttpServletResponse response, FilesAchievement filesAchievement)
88
     /**
85
     /**
89
      * 导出选中成果表列表
86
      * 导出选中成果表列表
90
      */
87
      */
91
-    @PreAuthorize("@ss.hasPermi('file:achievement:export')")
92
     @Log(title = "成果表", businessType = BusinessType.EXPORT)
88
     @Log(title = "成果表", businessType = BusinessType.EXPORT)
93
     @PostMapping("/exportBatch/{ids}")
89
     @PostMapping("/exportBatch/{ids}")
94
     public void exportBatch(HttpServletResponse response, FilesAchievement filesAchievement, @PathVariable("ids") String[] ids)
90
     public void exportBatch(HttpServletResponse response, FilesAchievement filesAchievement, @PathVariable("ids") String[] ids)
110
     /**
106
     /**
111
      * 获取成果表详细信息
107
      * 获取成果表详细信息
112
      */
108
      */
113
-    @PreAuthorize("@ss.hasPermi('file:achievement:query')")
114
     @GetMapping(value = "/{id}")
109
     @GetMapping(value = "/{id}")
115
     public AjaxResult getInfo(@PathVariable("id") String id)
110
     public AjaxResult getInfo(@PathVariable("id") String id)
116
     {
111
     {
120
     /**
115
     /**
121
      * 获取项目对应成果列表
116
      * 获取项目对应成果列表
122
      */
117
      */
123
-    @PreAuthorize("@ss.hasPermi('file:achievement:query')")
124
     @GetMapping( "/getAchievementByProject")
118
     @GetMapping( "/getAchievementByProject")
125
     public AjaxResult getAchievementByProject(String projectId)
119
     public AjaxResult getAchievementByProject(String projectId)
126
     {
120
     {
132
     /**
126
     /**
133
      * 上传成果excel文件
127
      * 上传成果excel文件
134
      */
128
      */
135
-    @PreAuthorize("@ss.hasPermi('file:achievement:query')")
136
     @PostMapping("/uploadSheet")
129
     @PostMapping("/uploadSheet")
137
     public AjaxResult uploadAchievementSheet(MultipartFile file) throws Exception {
130
     public AjaxResult uploadAchievementSheet(MultipartFile file) throws Exception {
138
         if (file.isEmpty()) {
131
         if (file.isEmpty()) {
177
                 else
170
                 else
178
                     filesAchievementService.insertFilesAchievement(filesAchievement);
171
                     filesAchievementService.insertFilesAchievement(filesAchievement);
179
             }
172
             }
180
-//            File profilePath = new File(profile);
181
-//            if (!profilePath.exists())//若此目录不存在,则创建之
182
-//                profilePath.mkdirs();
183
-//            File transferFile = new File( profilePath + "\\" + file.getOriginalFilename());
184
-//            file.transferTo(transferFile);
185
-//            InputStream in = new FileInputStream(transferFile);
186
-//            XSSFSheet sheetAt = null;
187
-//            HSSFSheet sheetAt1 = null;
188
-//            int rowNumber = 0;
189
-//            boolean xlsx = Objects.requireNonNull(file.getOriginalFilename()).endsWith("xlsx");
190
-//            if (file.getOriginalFilename() != null && file.getOriginalFilename().endsWith("xlsx")) {
191
-//                sheetAt = new XSSFWorkbook(in).getSheetAt(0);
192
-//                rowNumber = sheetAt.getPhysicalNumberOfRows();
193
-//            }
194
-//            else if (file.getOriginalFilename() != null && file.getOriginalFilename().endsWith("xls")) {
195
-//                sheetAt1 = new HSSFWorkbook(in).getSheetAt(0);
196
-//                rowNumber = sheetAt1.getPhysicalNumberOfRows();
197
-//            }
198
-//            FilesAchievement filesAchievement = new FilesAchievement();
199
-//            for (int i = 0; i < rowNumber - 1;) {
200
-//                i++;
201
-//                String column0 = xlsx ? ExcelUtils.getString(sheetAt.getRow(i).getCell(0)): ExcelUtils.getString(sheetAt1.getRow(i).getCell(0));
202
-//                if (column0 != null && !column0.equals("")) {
203
-//                    filesAchievement.setId(new SnowFlake().generateId());
204
-//                    FilesProject filesProject = new FilesProject();
205
-//                    filesProject.setProjectNumber(xlsx ? ExcelUtils.getString(sheetAt.getRow(i).getCell(0)): ExcelUtils.getString(sheetAt1.getRow(i).getCell(0)));
206
-//                    filesAchievement.setProjectId(null);
207
-//                    if (filesProjectService.selectFilesProjectList(filesProject).size() > 0)
208
-//                        filesAchievement.setProjectId(filesProjectService.selectFilesProjectList(filesProject).get(0).getId());
209
-//                    filesAchievement.setDataYear(xlsx ? ExcelUtils.getString(sheetAt.getRow(i).getCell(1)).substring(0,4): ExcelUtils.getString(sheetAt1.getRow(i).getCell(1)).substring(0,4));
210
-//                    filesAchievement.setAchiName(xlsx ? ExcelUtils.getString(sheetAt.getRow(i).getCell(2)): ExcelUtils.getString(sheetAt1.getRow(i).getCell(2)));
211
-//                    filesAchievement.setScaleOrder(xlsx ? ExcelUtils.getString(sheetAt.getRow(i).getCell(3)): ExcelUtils.getString(sheetAt1.getRow(i).getCell(3)));
212
-//                    filesAchievement.setResultType(xlsx ? ExcelUtils.getString(sheetAt.getRow(i).getCell(4)): ExcelUtils.getString(sheetAt1.getRow(i).getCell(4)));
213
-//                    filesAchievement.setFileType(xlsx ? ExcelUtils.getString(sheetAt.getRow(i).getCell(5)): ExcelUtils.getString(sheetAt1.getRow(i).getCell(5)));
214
-//                    String storageAddress = xlsx ? ExcelUtils.getString(sheetAt.getRow(i).getCell(6)): ExcelUtils.getString(sheetAt1.getRow(i).getCell(6));
215
-//                    filesAchievement.setStorageId(null);
216
-//                    if (storageAddress != null && !storageAddress.equals("")) {
217
-//                        filesAchievement.setStorageId(new SnowFlake().generateId());
218
-//                        FilesStorage storage = new FilesStorage();
219
-//                        storage.setStorageAddress(storageAddress);
220
-//                        if (filesStorageService.selectFilesStorageListE(storage).size() > 0)
221
-//                            filesAchievement.setStorageId(filesStorageService.selectFilesStorageListE(storage).get(0).getId());
222
-//                        else {
223
-//                            FilesStorage filesStorage = new FilesStorage();
224
-//                            filesStorage.setId(filesAchievement.getStorageId());
225
-//                            filesStorage.setStorageAddress(xlsx ? ExcelUtils.getString(sheetAt.getRow(i).getCell(6)): ExcelUtils.getString(sheetAt1.getRow(i).getCell(6)));
226
-//                            filesStorage.setAdministrator(getLoginUser().getUsername());
227
-//                            filesStorage.setRemark("");
228
-//                            filesStorageService.insertFilesStorage(filesStorage);
229
-//                        }
230
-//                    }
231
-////                    filesAchievement.setKmlUrl(xlsx ? ExcelUtils.getString(sheetAt.getRow(i).getCell(7)): ExcelUtils.getString(sheetAt1.getRow(i).getCell(7)));
232
-//                    filesAchievement.setWorkLoad(xlsx ? ExcelUtils.getString(sheetAt.getRow(i).getCell(7)): ExcelUtils.getString(sheetAt1.getRow(i).getCell(7)));
233
-//                    filesAchievement.setUnit(xlsx ? ExcelUtils.getString(sheetAt.getRow(i).getCell(8)): ExcelUtils.getString(sheetAt1.getRow(i).getCell(8)));
234
-//                    filesAchievement.setDataSource(xlsx ? ExcelUtils.getString(sheetAt.getRow(i).getCell(9)): ExcelUtils.getString(sheetAt1.getRow(i).getCell(9)));
235
-//                    filesAchievement.setProductionTime(xlsx ? ExcelUtils.getString(sheetAt.getRow(i).getCell(10)): ExcelUtils.getString(sheetAt1.getRow(i).getCell(10)));
236
-////                    filesAchievement.setSubmitDate(xlsx ? ExcelUtils.getString(sheetAt.getRow(i).getCell(11)): ExcelUtils.getString(sheetAt1.getRow(i).getCell(11)));
237
-//                    filesAchievement.setRemark(xlsx ? ExcelUtils.getString(sheetAt.getRow(i).getCell(12)): ExcelUtils.getString(sheetAt1.getRow(i).getCell(12)));
238
-//                    filesAchievementService.insertFilesAchievement(filesAchievement);
239
-//                }
240
-//            }
241
             return AjaxResult.success("上传成功");
173
             return AjaxResult.success("上传成功");
242
         }
174
         }
243
     }
175
     }
245
     /**
177
     /**
246
      * 新增成果表
178
      * 新增成果表
247
      */
179
      */
248
-    @PreAuthorize("@ss.hasPermi('file:achievement:add')")
249
     @Log(title = "成果表", businessType = BusinessType.INSERT)
180
     @Log(title = "成果表", businessType = BusinessType.INSERT)
250
     @PostMapping
181
     @PostMapping
251
     public AjaxResult add(FilesAchievement filesAchievement, MultipartFile uploadKmlFile) throws IOException {
182
     public AjaxResult add(FilesAchievement filesAchievement, MultipartFile uploadKmlFile) throws IOException {
278
     /**
209
     /**
279
      * 修改成果表
210
      * 修改成果表
280
      */
211
      */
281
-    @PreAuthorize("@ss.hasPermi('file:achievement:edit')")
282
     @Log(title = "成果表", businessType = BusinessType.UPDATE)
212
     @Log(title = "成果表", businessType = BusinessType.UPDATE)
283
     @PostMapping("/edit")
213
     @PostMapping("/edit")
284
     public AjaxResult edit(FilesAchievement filesAchievement, MultipartFile uploadKmlFile) throws IOException {
214
     public AjaxResult edit(FilesAchievement filesAchievement, MultipartFile uploadKmlFile) throws IOException {
314
     /**
244
     /**
315
      * 删除成果表
245
      * 删除成果表
316
      */
246
      */
317
-    @PreAuthorize("@ss.hasPermi('file:achievement:remove')")
318
     @Log(title = "成果表", businessType = BusinessType.DELETE)
247
     @Log(title = "成果表", businessType = BusinessType.DELETE)
319
 	@DeleteMapping("/{ids}")
248
 	@DeleteMapping("/{ids}")
320
     public AjaxResult remove(@PathVariable String[] ids)
249
     public AjaxResult remove(@PathVariable String[] ids)

+ 1
- 69
oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/file/FilesProjectController.java Целия файл

15
 import com.ruoyi.file.service.IFilesTopicService;
15
 import com.ruoyi.file.service.IFilesTopicService;
16
 import org.springframework.beans.factory.annotation.Autowired;
16
 import org.springframework.beans.factory.annotation.Autowired;
17
 import org.springframework.beans.factory.annotation.Value;
17
 import org.springframework.beans.factory.annotation.Value;
18
-import org.springframework.security.access.prepost.PreAuthorize;
19
 import org.springframework.web.bind.annotation.*;
18
 import org.springframework.web.bind.annotation.*;
20
 import org.springframework.web.multipart.MultipartFile;
19
 import org.springframework.web.multipart.MultipartFile;
21
 
20
 
43
     @Autowired
42
     @Autowired
44
     private IFilesStorageService filesStorageService;
43
     private IFilesStorageService filesStorageService;
45
 
44
 
46
-    @Value("${ruoyi.profile}")
45
+    @Value("${cmc.profile}")
47
     private String profile;
46
     private String profile;
48
 
47
 
49
     /**
48
     /**
50
      * 查询项目管理列表
49
      * 查询项目管理列表
51
      */
50
      */
52
-    @PreAuthorize("@ss.hasPermi('file:project:list')")
53
     @GetMapping("/list")
51
     @GetMapping("/list")
54
     public TableDataInfo list(FilesProject filesProject) {
52
     public TableDataInfo list(FilesProject filesProject) {
55
         List<FilesProject> list = filesProjectService.selectFilesProjectList(filesProject);
53
         List<FilesProject> list = filesProjectService.selectFilesProjectList(filesProject);
71
     /**
69
     /**
72
      * 导出项目管理列表
70
      * 导出项目管理列表
73
      */
71
      */
74
-    @PreAuthorize("@ss.hasPermi('file:project:export')")
75
     @Log(title = "项目管理", businessType = BusinessType.EXPORT)
72
     @Log(title = "项目管理", businessType = BusinessType.EXPORT)
76
     @PostMapping("/export")
73
     @PostMapping("/export")
77
     public void export(HttpServletResponse response, FilesProject filesProject) {
74
     public void export(HttpServletResponse response, FilesProject filesProject) {
83
     /**
80
     /**
84
      * 导出选中项目管理列表
81
      * 导出选中项目管理列表
85
      */
82
      */
86
-    @PreAuthorize("@ss.hasPermi('file:project:export')")
87
     @Log(title = "成果表", businessType = BusinessType.EXPORT)
83
     @Log(title = "成果表", businessType = BusinessType.EXPORT)
88
     @PostMapping("/exportBatch/{ids}")
84
     @PostMapping("/exportBatch/{ids}")
89
     public void exportBatch(HttpServletResponse response, FilesProject filesProject, @PathVariable("ids") String[] ids)
85
     public void exportBatch(HttpServletResponse response, FilesProject filesProject, @PathVariable("ids") String[] ids)
108
     /**
104
     /**
109
      * 获取项目管理详细信息
105
      * 获取项目管理详细信息
110
      */
106
      */
111
-    @PreAuthorize("@ss.hasPermi('file:project:query')")
112
     @GetMapping(value = "/{id}")
107
     @GetMapping(value = "/{id}")
113
     public AjaxResult getInfo(@PathVariable("id") String id) {
108
     public AjaxResult getInfo(@PathVariable("id") String id) {
114
         return AjaxResult.success(filesProjectService.selectFilesProjectById(id));
109
         return AjaxResult.success(filesProjectService.selectFilesProjectById(id));
117
     /**
112
     /**
118
      * 获取专题对应项目列表
113
      * 获取专题对应项目列表
119
      */
114
      */
120
-    @PreAuthorize("@ss.hasPermi('file:project:query')")
121
     @GetMapping("/topicName")
115
     @GetMapping("/topicName")
122
     public AjaxResult getProjectByTopic(String topicName) {
116
     public AjaxResult getProjectByTopic(String topicName) {
123
         FilesTopic filesTopic = new FilesTopic();
117
         FilesTopic filesTopic = new FilesTopic();
131
     /**
125
     /**
132
      * 上传项目excel文件
126
      * 上传项目excel文件
133
      */
127
      */
134
-    @PreAuthorize("@ss.hasPermi('file:project:add')")
135
     @PostMapping("/uploadSheet")
128
     @PostMapping("/uploadSheet")
136
     public AjaxResult uploadProjectSheet(MultipartFile file) throws Exception {
129
     public AjaxResult uploadProjectSheet(MultipartFile file) throws Exception {
137
         if (file.isEmpty()) {
130
         if (file.isEmpty()) {
138
             return AjaxResult.error("文件内容为空!");
131
             return AjaxResult.error("文件内容为空!");
139
         } else {
132
         } else {
140
-//            File profilePath = new File(profile);
141
-//            if (!profilePath.exists())//若此目录不存在,则创建之
142
-//                profilePath.mkdirs();
143
-//            File transferFile = new File(profilePath + "\\" + file.getOriginalFilename());
144
-//            file.transferTo(transferFile);
145
-//            InputStream in = new FileInputStream(transferFile);
146
-//            XSSFSheet sheetAt = null;
147
-//            HSSFSheet sheetAt1 = null;
148
-//            int rowNumber = 0;
149
-//            boolean xlsx = Objects.requireNonNull(file.getOriginalFilename()).endsWith("xlsx");
150
-//            if (file.getOriginalFilename() != null && file.getOriginalFilename().endsWith("xlsx")) {
151
-//                sheetAt = new XSSFWorkbook(in).getSheetAt(0);
152
-//                rowNumber = sheetAt.getLastRowNum();
153
-//            } else if (file.getOriginalFilename() != null && file.getOriginalFilename().endsWith("xls")) {
154
-//                sheetAt1 = new HSSFWorkbook(in).getSheetAt(0);
155
-//                rowNumber = sheetAt1.getLastRowNum();
156
-//            }
157
             ExcelUtil<FilesProject> util = new ExcelUtil<FilesProject>(FilesProject.class);
133
             ExcelUtil<FilesProject> util = new ExcelUtil<FilesProject>(FilesProject.class);
158
             List<FilesProject> filesProjectList = util.importExcel(file.getInputStream());
134
             List<FilesProject> filesProjectList = util.importExcel(file.getInputStream());
159
             List<String> IdList = new ArrayList<>();
135
             List<String> IdList = new ArrayList<>();
169
                 else
145
                 else
170
                     filesProjectService.insertFilesProject(fileProject);
146
                     filesProjectService.insertFilesProject(fileProject);
171
             }
147
             }
172
-//            FilesProject filesProject = new FilesProject();
173
-//            for (int i = 0; i < rowNumber - 1; ) {
174
-//                i++;
175
-//                filesProject.setId(new SnowFlake().generateId());
176
-//                filesProject.setProjectNumber(xlsx ? ExcelUtils.getString(sheetAt.getRow(i).getCell(0)) : ExcelUtils.getString(sheetAt1.getRow(i).getCell(0)));
177
-//                filesProject.setProjectName(xlsx ? ExcelUtils.getString(sheetAt.getRow(i).getCell(1)) : ExcelUtils.getString(sheetAt1.getRow(i).getCell(1)));
178
-//                filesProject.setCurrentProgress(xlsx ? ExcelUtils.getString(sheetAt.getRow(i).getCell(2)) : ExcelUtils.getString(sheetAt1.getRow(i).getCell(2)));
179
-//                filesProject.setProjectSource(xlsx ? ExcelUtils.getString(sheetAt.getRow(i).getCell(3)) : ExcelUtils.getString(sheetAt1.getRow(i).getCell(3)));
180
-//                filesProject.setPartyA(xlsx ? ExcelUtils.getString(sheetAt.getRow(i).getCell(4)) : ExcelUtils.getString(sheetAt1.getRow(i).getCell(4)));
181
-//                filesProject.setContactPerson(xlsx ? ExcelUtils.getString(sheetAt.getRow(i).getCell(5)) : ExcelUtils.getString(sheetAt1.getRow(i).getCell(5)));
182
-//                filesProject.setTelephone(xlsx ? ExcelUtils.getString(sheetAt.getRow(i).getCell(6)) : ExcelUtils.getString(sheetAt1.getRow(i).getCell(6)));
183
-//                filesProject.setContractCode(xlsx ? ExcelUtils.getString(sheetAt.getRow(i).getCell(7)) : ExcelUtils.getString(sheetAt1.getRow(i).getCell(7)));
184
-//                filesProject.setContractNumber(xlsx ? ExcelUtils.getString(sheetAt.getRow(i).getCell(8)) : ExcelUtils.getString(sheetAt1.getRow(i).getCell(8)));
185
-//                filesProject.setProjectType(xlsx ? ExcelUtils.getString(sheetAt.getRow(i).getCell(9)) : ExcelUtils.getString(sheetAt1.getRow(i).getCell(9)));
186
-//                filesProject.setExpectedPrice(xlsx ? ExcelUtils.getString(sheetAt.getRow(i).getCell(10)) : ExcelUtils.getString(sheetAt1.getRow(i).getCell(10)));
187
-//                filesProject.setProjectLevel(xlsx ? ExcelUtils.getString(sheetAt.getRow(i).getCell(11)) : ExcelUtils.getString(sheetAt1.getRow(i).getCell(11)));
188
-//                filesProject.setTechnicalDirector(xlsx ? ExcelUtils.getString(sheetAt.getRow(i).getCell(12)) : ExcelUtils.getString(sheetAt1.getRow(i).getCell(12)));
189
-//                filesProject.setTechinicalDesigner(xlsx ? ExcelUtils.getString(sheetAt.getRow(i).getCell(13)) : ExcelUtils.getString(sheetAt1.getRow(i).getCell(13)));
190
-//                filesProject.setQualityInspector(xlsx ? ExcelUtils.getString(sheetAt.getRow(i).getCell(14)) : ExcelUtils.getString(sheetAt1.getRow(i).getCell(14)));
191
-//                filesProject.setUndertakingSector(xlsx ? ExcelUtils.getString(sheetAt.getRow(i).getCell(15)) : ExcelUtils.getString(sheetAt1.getRow(i).getCell(15)));
192
-//                filesProject.setProjectLeader(xlsx ? ExcelUtils.getString(sheetAt.getRow(i).getCell(16)) : ExcelUtils.getString(sheetAt1.getRow(i).getCell(16)));
193
-//                filesProject.setFund(xlsx ? ExcelUtils.getString(sheetAt.getRow(i).getCell(17)) : ExcelUtils.getString(sheetAt1.getRow(i).getCell(17)));
194
-//                filesProject.setApprovalDate(xlsx ? ExcelUtils.getString(sheetAt.getRow(i).getCell(18)) : ExcelUtils.getString(sheetAt1.getRow(i).getCell(18)));
195
-//                filesProject.setApproachTime(xlsx ? ExcelUtils.getString(sheetAt.getRow(i).getCell(19)) : ExcelUtils.getString(sheetAt1.getRow(i).getCell(19)));
196
-//                filesProject.setWithdrawalTime(xlsx ? ExcelUtils.getString(sheetAt.getRow(i).getCell(20)) : ExcelUtils.getString(sheetAt1.getRow(i).getCell(20)));
197
-//                filesProject.setRequiredCompletionDate(xlsx ? ExcelUtils.getString(sheetAt.getRow(i).getCell(21)) : ExcelUtils.getString(sheetAt1.getRow(i).getCell(21)));
198
-//                filesProject.setSubmissionDate(xlsx ? ExcelUtils.getString(sheetAt.getRow(i).getCell(22)) : ExcelUtils.getString(sheetAt1.getRow(i).getCell(22)));
199
-//                filesProject.setLicensePlateNumber(xlsx ? ExcelUtils.getString(sheetAt.getRow(i).getCell(23)) : ExcelUtils.getString(sheetAt1.getRow(i).getCell(23)));
200
-//                filesProject.setMileage(xlsx ? ExcelUtils.getString(sheetAt.getRow(i).getCell(24)) : ExcelUtils.getString(sheetAt1.getRow(i).getCell(24)));
201
-//                filesProject.setFuelExpense(xlsx ? ExcelUtils.getString(sheetAt.getRow(i).getCell(25)) : ExcelUtils.getString(sheetAt1.getRow(i).getCell(25)));
202
-//                filesProject.setMainEquipment(xlsx ? ExcelUtils.getString(sheetAt.getRow(i).getCell(26)) : ExcelUtils.getString(sheetAt1.getRow(i).getCell(26)));
203
-//                filesProject.setProjectParticipants(xlsx ? ExcelUtils.getString(sheetAt.getRow(i).getCell(27)) : ExcelUtils.getString(sheetAt1.getRow(i).getCell(27)));
204
-//                filesProject.setCurrentProcessing(xlsx ? ExcelUtils.getString(sheetAt.getRow(i).getCell(28)) : ExcelUtils.getString(sheetAt1.getRow(i).getCell(28)));
205
-//                filesProject.setCurrentHandler(xlsx ? ExcelUtils.getString(sheetAt.getRow(i).getCell(29)) : ExcelUtils.getString(sheetAt1.getRow(i).getCell(29)));
206
-//                filesProject.setProjectRegistrant(xlsx ? ExcelUtils.getString(sheetAt.getRow(i).getCell(30)) : ExcelUtils.getString(sheetAt1.getRow(i).getCell(30)));
207
-//                filesProject.setRegistrationDate(xlsx ? ExcelUtils.getString(sheetAt.getRow(i).getCell(31)) : ExcelUtils.getString(sheetAt1.getRow(i).getCell(31)));
208
-//                filesProject.setLeadingSector(xlsx ? ExcelUtils.getString(sheetAt.getRow(i).getCell(32)) : ExcelUtils.getString(sheetAt1.getRow(i).getCell(32)));
209
-//                filesProject.setYear(xlsx ? ExcelUtils.getString(sheetAt.getRow(i).getCell(33)).substring(0,4) : ExcelUtils.getString(sheetAt1.getRow(i).getCell(33)).substring(0,4));
210
-//                filesProjectService.insertFilesProject(filesProject);
211
-//            }
212
             return AjaxResult.success("上传成功");
148
             return AjaxResult.success("上传成功");
213
         }
149
         }
214
     }
150
     }
216
     /**
152
     /**
217
      * 新增项目管理
153
      * 新增项目管理
218
      */
154
      */
219
-    @PreAuthorize("@ss.hasPermi('file:project:add')")
220
     @Log(title = "项目管理", businessType = BusinessType.INSERT)
155
     @Log(title = "项目管理", businessType = BusinessType.INSERT)
221
     @PostMapping
156
     @PostMapping
222
     public AjaxResult add(FilesProject filesProject, @RequestParam(value = "kmlfile",required = false) MultipartFile uploadProjectKmlFile, @RequestParam(value = "cpfile",required = false) MultipartFile uploadCpKmlFile) throws IOException {
157
     public AjaxResult add(FilesProject filesProject, @RequestParam(value = "kmlfile",required = false) MultipartFile uploadProjectKmlFile, @RequestParam(value = "cpfile",required = false) MultipartFile uploadCpKmlFile) throws IOException {
297
     /**
232
     /**
298
      * 修改项目管理
233
      * 修改项目管理
299
      */
234
      */
300
-    @PreAuthorize("@ss.hasPermi('file:project:edit')")
301
     @Log(title = "项目管理", businessType = BusinessType.UPDATE)
235
     @Log(title = "项目管理", businessType = BusinessType.UPDATE)
302
     @PostMapping("/edit")
236
     @PostMapping("/edit")
303
     public AjaxResult edit(FilesProject filesProject, @RequestParam(value = "kmlfile",required = false) MultipartFile uploadProjectKmlFile, @RequestParam(value = "cpfile",required = false) MultipartFile uploadCpKmlFile) throws IOException {
237
     public AjaxResult edit(FilesProject filesProject, @RequestParam(value = "kmlfile",required = false) MultipartFile uploadProjectKmlFile, @RequestParam(value = "cpfile",required = false) MultipartFile uploadCpKmlFile) throws IOException {
312
     /**
246
     /**
313
      * 删除项目管理
247
      * 删除项目管理
314
      */
248
      */
315
-    @PreAuthorize("@ss.hasPermi('file:project:remove')")
316
     @Log(title = "项目管理", businessType = BusinessType.DELETE)
249
     @Log(title = "项目管理", businessType = BusinessType.DELETE)
317
     @DeleteMapping("/{ids}")
250
     @DeleteMapping("/{ids}")
318
     public AjaxResult remove(@PathVariable String[] ids) {
251
     public AjaxResult remove(@PathVariable String[] ids) {
321
     /**
254
     /**
322
      * 根据项目编号查询项目信息
255
      * 根据项目编号查询项目信息
323
      */
256
      */
324
-    @PreAuthorize("@ss.hasPermi('file:project:query')")
325
     @GetMapping("/query/{projectNumbers}")
257
     @GetMapping("/query/{projectNumbers}")
326
     public AjaxResult getInfoByProjectNumber(@PathVariable String[] projectNumbers){
258
     public AjaxResult getInfoByProjectNumber(@PathVariable String[] projectNumbers){
327
         return AjaxResult.success(filesProjectService.selectFilesProjectByNumbers(projectNumbers));
259
         return AjaxResult.success(filesProjectService.selectFilesProjectByNumbers(projectNumbers));

+ 0
- 7
oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/file/FilesStorageController.java Целия файл

10
 import com.ruoyi.file.domain.FilesStorage;
10
 import com.ruoyi.file.domain.FilesStorage;
11
 import com.ruoyi.file.service.IFilesStorageService;
11
 import com.ruoyi.file.service.IFilesStorageService;
12
 import org.springframework.beans.factory.annotation.Autowired;
12
 import org.springframework.beans.factory.annotation.Autowired;
13
-import org.springframework.security.access.prepost.PreAuthorize;
14
 import org.springframework.web.bind.annotation.*;
13
 import org.springframework.web.bind.annotation.*;
15
 
14
 
16
 import javax.servlet.http.HttpServletResponse;
15
 import javax.servlet.http.HttpServletResponse;
32
     /**
31
     /**
33
      * 查询存放表列表
32
      * 查询存放表列表
34
      */
33
      */
35
-    @PreAuthorize("@ss.hasPermi('file:storage:list')")
36
     @GetMapping("/list")
34
     @GetMapping("/list")
37
     public TableDataInfo list(FilesStorage filesStorage)
35
     public TableDataInfo list(FilesStorage filesStorage)
38
     {
36
     {
43
     /**
41
     /**
44
      * 导出存放表列表
42
      * 导出存放表列表
45
      */
43
      */
46
-    @PreAuthorize("@ss.hasPermi('file:storage:export')")
47
     @Log(title = "存放表", businessType = BusinessType.EXPORT)
44
     @Log(title = "存放表", businessType = BusinessType.EXPORT)
48
     @PostMapping("/export")
45
     @PostMapping("/export")
49
     public void export(HttpServletResponse response, FilesStorage filesStorage)
46
     public void export(HttpServletResponse response, FilesStorage filesStorage)
56
     /**
53
     /**
57
      * 获取存放表详细信息
54
      * 获取存放表详细信息
58
      */
55
      */
59
-    @PreAuthorize("@ss.hasPermi('file:storage:query')")
60
     @GetMapping(value = "/{id}")
56
     @GetMapping(value = "/{id}")
61
     public AjaxResult getInfo(@PathVariable("id") String id)
57
     public AjaxResult getInfo(@PathVariable("id") String id)
62
     {
58
     {
66
     /**
62
     /**
67
      * 新增存放表
63
      * 新增存放表
68
      */
64
      */
69
-    @PreAuthorize("@ss.hasPermi('file:storage:add')")
70
     @Log(title = "存放表", businessType = BusinessType.INSERT)
65
     @Log(title = "存放表", businessType = BusinessType.INSERT)
71
     @PostMapping
66
     @PostMapping
72
     public AjaxResult add(@RequestBody FilesStorage filesStorage)
67
     public AjaxResult add(@RequestBody FilesStorage filesStorage)
78
     /**
73
     /**
79
      * 修改存放表
74
      * 修改存放表
80
      */
75
      */
81
-    @PreAuthorize("@ss.hasPermi('file:storage:edit')")
82
     @Log(title = "存放表", businessType = BusinessType.UPDATE)
76
     @Log(title = "存放表", businessType = BusinessType.UPDATE)
83
     @PutMapping
77
     @PutMapping
84
     public AjaxResult edit(@RequestBody FilesStorage filesStorage)
78
     public AjaxResult edit(@RequestBody FilesStorage filesStorage)
89
     /**
83
     /**
90
      * 删除存放表
84
      * 删除存放表
91
      */
85
      */
92
-    @PreAuthorize("@ss.hasPermi('file:storage:remove')")
93
     @Log(title = "存放表", businessType = BusinessType.DELETE)
86
     @Log(title = "存放表", businessType = BusinessType.DELETE)
94
 	@DeleteMapping("/{ids}")
87
 	@DeleteMapping("/{ids}")
95
     public AjaxResult remove(@PathVariable String[] ids)
88
     public AjaxResult remove(@PathVariable String[] ids)

+ 0
- 7
oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/file/FilesTopicController.java Целия файл

10
 import com.ruoyi.file.domain.FilesTopic;
10
 import com.ruoyi.file.domain.FilesTopic;
11
 import com.ruoyi.file.service.IFilesTopicService;
11
 import com.ruoyi.file.service.IFilesTopicService;
12
 import org.springframework.beans.factory.annotation.Autowired;
12
 import org.springframework.beans.factory.annotation.Autowired;
13
-import org.springframework.security.access.prepost.PreAuthorize;
14
 import org.springframework.web.bind.annotation.*;
13
 import org.springframework.web.bind.annotation.*;
15
 
14
 
16
 import javax.servlet.http.HttpServletResponse;
15
 import javax.servlet.http.HttpServletResponse;
32
     /**
31
     /**
33
      * 查询专题管理列表
32
      * 查询专题管理列表
34
      */
33
      */
35
-    @PreAuthorize("@ss.hasPermi('file:topic:list')")
36
     @GetMapping("/list")
34
     @GetMapping("/list")
37
     public TableDataInfo list(FilesTopic filesTopic)
35
     public TableDataInfo list(FilesTopic filesTopic)
38
     {
36
     {
43
     /**
41
     /**
44
      * 导出专题管理列表
42
      * 导出专题管理列表
45
      */
43
      */
46
-    @PreAuthorize("@ss.hasPermi('file:topic:export')")
47
     @Log(title = "专题管理", businessType = BusinessType.EXPORT)
44
     @Log(title = "专题管理", businessType = BusinessType.EXPORT)
48
     @PostMapping("/export")
45
     @PostMapping("/export")
49
     public void export(HttpServletResponse response, FilesTopic filesTopic)
46
     public void export(HttpServletResponse response, FilesTopic filesTopic)
56
     /**
53
     /**
57
      * 获取专题管理详细信息
54
      * 获取专题管理详细信息
58
      */
55
      */
59
-    @PreAuthorize("@ss.hasPermi('file:topic:query')")
60
     @GetMapping(value = "/{id}")
56
     @GetMapping(value = "/{id}")
61
     public AjaxResult getInfo(@PathVariable("id") String id)
57
     public AjaxResult getInfo(@PathVariable("id") String id)
62
     {
58
     {
66
     /**
62
     /**
67
      * 新增专题管理
63
      * 新增专题管理
68
      */
64
      */
69
-    @PreAuthorize("@ss.hasPermi('file:topic:add')")
70
     @Log(title = "专题管理", businessType = BusinessType.INSERT)
65
     @Log(title = "专题管理", businessType = BusinessType.INSERT)
71
     @PostMapping
66
     @PostMapping
72
     public AjaxResult add(@RequestBody FilesTopic filesTopic)
67
     public AjaxResult add(@RequestBody FilesTopic filesTopic)
78
     /**
73
     /**
79
      * 修改专题管理
74
      * 修改专题管理
80
      */
75
      */
81
-    @PreAuthorize("@ss.hasPermi('file:topic:edit')")
82
     @Log(title = "专题管理", businessType = BusinessType.UPDATE)
76
     @Log(title = "专题管理", businessType = BusinessType.UPDATE)
83
     @PutMapping
77
     @PutMapping
84
     public AjaxResult edit(@RequestBody FilesTopic filesTopic)
78
     public AjaxResult edit(@RequestBody FilesTopic filesTopic)
89
     /**
83
     /**
90
      * 删除专题管理
84
      * 删除专题管理
91
      */
85
      */
92
-    @PreAuthorize("@ss.hasPermi('file:topic:remove')")
93
     @Log(title = "专题管理", businessType = BusinessType.DELETE)
86
     @Log(title = "专题管理", businessType = BusinessType.DELETE)
94
 	@DeleteMapping("/{ids}")
87
 	@DeleteMapping("/{ids}")
95
     public AjaxResult remove(@PathVariable String[] ids)
88
     public AjaxResult remove(@PathVariable String[] ids)

+ 26
- 0
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/domain/CmcTechnical.java Целия файл

60
     @Excel(name = "技术方案")
60
     @Excel(name = "技术方案")
61
     private String technicalDocument;
61
     private String technicalDocument;
62
 
62
 
63
+    /** 修改技术方案 */
64
+    @Excel(name = "修改技术方案")
65
+    private String modifyDocument;
66
+
67
+    /** 最终技术方案 */
68
+    @Excel(name = "最终技术方案")
69
+    private String finalDocument;
70
+
63
     /** 方案说明 */
71
     /** 方案说明 */
64
     @Excel(name = "方案说明")
72
     @Excel(name = "方案说明")
65
     private String designDescription;
73
     private String designDescription;
186
     {
194
     {
187
         return technicalDocument;
195
         return technicalDocument;
188
     }
196
     }
197
+    public void setModifyDocument(String modifyDocument)
198
+    {
199
+        this.modifyDocument = modifyDocument;
200
+    }
201
+
202
+    public String getModifyDocument()
203
+    {
204
+        return modifyDocument;
205
+    }
206
+    public void setFinalDocument(String finalDocument)
207
+    {
208
+        this.finalDocument = finalDocument;
209
+    }
210
+
211
+    public String getFinalDocument()
212
+    {
213
+        return finalDocument;
214
+    }
189
     public void setDesignDescription(String designDescription)
215
     public void setDesignDescription(String designDescription)
190
     {
216
     {
191
         this.designDescription = designDescription;
217
         this.designDescription = designDescription;

+ 10
- 2
oa-back/ruoyi-system/src/main/resources/mapper/oa/CmcTechnicalMapper.xml Целия файл

14
         <result property="qualityInspector"    column="quality_inspector"    />
14
         <result property="qualityInspector"    column="quality_inspector"    />
15
         <result property="technicalTime"    column="technical_time"    />
15
         <result property="technicalTime"    column="technical_time"    />
16
         <result property="technicalDocument"    column="technical_document"    />
16
         <result property="technicalDocument"    column="technical_document"    />
17
+        <result property="modifyDocument"    column="modify_document"    />
18
+        <result property="finalDocument"    column="final_document"    />
17
         <result property="designDescription"    column="design_description"    />
19
         <result property="designDescription"    column="design_description"    />
18
         <result property="technicalComment"    column="technical_comment"    />
20
         <result property="technicalComment"    column="technical_comment"    />
19
         <result property="manageComment"    column="manage_comment"    />
21
         <result property="manageComment"    column="manage_comment"    />
36
 
38
 
37
     <sql id="selectCmcTechnicalVo">
39
     <sql id="selectCmcTechnicalVo">
38
         select t.technical_id, t.project_id, t.technical_director, t.technical_designer, u.nick_name as design_nick_name, t.technical_planner, u1.nick_name as plan_nick_name,
40
         select t.technical_id, t.project_id, t.technical_director, t.technical_designer, u.nick_name as design_nick_name, t.technical_planner, u1.nick_name as plan_nick_name,
39
-               t.plan_comment, t.quality_inspector, t.technical_time, t.technical_document, t.design_description, t.technical_comment, t.manage_comment, t.technical_upload_time,
40
-               t.tech_approval_time, t.manage_approval_time from cmc_technical as t
41
+               t.plan_comment, t.quality_inspector, t.technical_time, t.technical_document, t.modify_document, t.final_document, t.design_description, t.technical_comment,
42
+               t.manage_comment, t.technical_upload_time, t.tech_approval_time, t.manage_approval_time from cmc_technical as t
41
          left join sys_user as u on u.user_id = t.technical_designer
43
          left join sys_user as u on u.user_id = t.technical_designer
42
          left join sys_user as u1 on u1.user_id = t.technical_planner
44
          left join sys_user as u1 on u1.user_id = t.technical_planner
43
     </sql>
45
     </sql>
79
             <if test="qualityInspector != null">quality_inspector,</if>
81
             <if test="qualityInspector != null">quality_inspector,</if>
80
             <if test="technicalTime != null">technical_time,</if>
82
             <if test="technicalTime != null">technical_time,</if>
81
             <if test="technicalDocument != null">technical_document,</if>
83
             <if test="technicalDocument != null">technical_document,</if>
84
+            <if test="modifyDocument != null">modify_document,</if>
85
+            <if test="finalDocument != null">final_document,</if>
82
             <if test="designDescription != null">design_description,</if>
86
             <if test="designDescription != null">design_description,</if>
83
             <if test="technicalComment != null">technical_comment,</if>
87
             <if test="technicalComment != null">technical_comment,</if>
84
             <if test="manageComment != null">manage_comment,</if>
88
             <if test="manageComment != null">manage_comment,</if>
96
             <if test="qualityInspector != null">#{qualityInspector},</if>
100
             <if test="qualityInspector != null">#{qualityInspector},</if>
97
             <if test="technicalTime != null">#{technicalTime},</if>
101
             <if test="technicalTime != null">#{technicalTime},</if>
98
             <if test="technicalDocument != null">#{technicalDocument},</if>
102
             <if test="technicalDocument != null">#{technicalDocument},</if>
103
+            <if test="modifyDocument != null">#{modifyDocument},</if>
104
+            <if test="finalDocument != null">#{finalDocument},</if>
99
             <if test="designDescription != null">#{designDescription},</if>
105
             <if test="designDescription != null">#{designDescription},</if>
100
             <if test="technicalComment != null">#{technicalComment},</if>
106
             <if test="technicalComment != null">#{technicalComment},</if>
101
             <if test="manageComment != null">#{manageComment},</if>
107
             <if test="manageComment != null">#{manageComment},</if>
116
             <if test="qualityInspector != null">quality_inspector = #{qualityInspector},</if>
122
             <if test="qualityInspector != null">quality_inspector = #{qualityInspector},</if>
117
             <if test="technicalTime != null">technical_time = #{technicalTime},</if>
123
             <if test="technicalTime != null">technical_time = #{technicalTime},</if>
118
             <if test="technicalDocument != null">technical_document = #{technicalDocument},</if>
124
             <if test="technicalDocument != null">technical_document = #{technicalDocument},</if>
125
+            <if test="modifyDocument != null">modify_document = #{modifyDocument},</if>
126
+            <if test="finalDocument != null">final_document = #{finalDocument},</if>
119
             <if test="designDescription != null">design_description = #{designDescription},</if>
127
             <if test="designDescription != null">design_description = #{designDescription},</if>
120
             <if test="technicalComment != null">technical_comment = #{technicalComment},</if>
128
             <if test="technicalComment != null">technical_comment = #{technicalComment},</if>
121
             <if test="manageComment != null">manage_comment = #{manageComment},</if>
129
             <if test="manageComment != null">manage_comment = #{manageComment},</if>

+ 3
- 1
oa-back/sql/sql.sql
Файловите разлики са ограничени, защото са твърде много
Целия файл


Loading…
Отказ
Запис