双重预防项目-国泰新华二开定制版
heheng
2025-03-20 88b3abfe8187a562a6a083d880f3fef863b01df2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
package com.ruoyi.project.tr.riskCheckPoint.controller;
 
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.utils.security.ShiroUtils;
import com.ruoyi.framework.aspectj.lang.annotation.Log;
import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
import com.ruoyi.framework.web.controller.BaseController;
import com.ruoyi.framework.web.domain.AjaxResult;
import com.ruoyi.framework.web.page.TableDataInfo;
import com.ruoyi.project.enumerate.TrEvaluationMajorEnum;
import com.ruoyi.project.enumerate.TrEvaluationMethodTypeEnum;
import com.ruoyi.project.enumerate.TrEvaluationStatusEnum;
import com.ruoyi.project.enumerate.TrReviewStatusEnum;
import com.ruoyi.project.system.role.service.IRoleService;
import com.ruoyi.project.system.user.domain.User;
import com.ruoyi.project.tr.hiddenDangerCheckPoint.domain.HiddenDangerCheckPoint;
import com.ruoyi.project.tr.hiddenDangerCheckPoint.service.IHiddenDangerCheckPointService;
import com.ruoyi.project.tr.region.domain.Region;
import com.ruoyi.project.tr.region.service.IRegionService;
import com.ruoyi.project.tr.riskCheckPoint.domain.RiskCheckPoint;
import com.ruoyi.project.tr.riskCheckPoint.domain.RiskCheckPointBak;
import com.ruoyi.project.tr.riskCheckPoint.service.IRiskCheckPointService;
import com.ruoyi.project.tr.riskEvaluationPlan.domain.RiskEvaluationPlan;
import com.ruoyi.project.tr.riskEvaluationPlan.service.IRiskEvaluationPlanService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*;
 
import java.util.Date;
import java.util.List;
import java.util.Set;
 
/**
 * 检查点及评价Controller
 * 
 * @author wm
 * @date 2020-05-09
 */
@Controller
@RequestMapping("/tr/riskCheckPoint")
public class RiskCheckPointController extends BaseController
{
    private String prefix = "tr/riskCheckPoint";
 
    @Autowired
    private IRiskCheckPointService riskCheckPointService;
 
    @Autowired
    private IRiskEvaluationPlanService riskEvaluationPlanService;
 
 
    @Autowired
    private IRoleService roleService;
 
    @Autowired
    private IHiddenDangerCheckPointService hiddenDangerCheckPointService;
 
    @Autowired
    private IRegionService regionService;
 
 
 
    @GetMapping()
    public String riskCheckPoint()
    {
        return prefix + "/riskCheckPoint";
    }
 
    /**
     * 查询检查点及评价列表
     */
    @PostMapping("/list")
    @ResponseBody
    public TableDataInfo list(RiskCheckPoint riskCheckPoint)
    {
        startPage();
        List<RiskCheckPoint> list = riskCheckPointService.selectRiskCheckPointList(riskCheckPoint);
        return getDataTable(list);
    }
 
    /**
     * 跳转查询检查点及评价列表-旧页面
     * @return
     */
    @GetMapping("/ledgerBak")
    public String ledgerBak(){
        return prefix + "/ledgerBak";
    }
 
    /**
     * 查询检查点及评价列表-旧
     * @param riskCheckPointBak
     * @return
     */
    @PostMapping("/listBak")
    @ResponseBody
    public TableDataInfo listBak(RiskCheckPointBak riskCheckPointBak)
    {
        startPage();
        List<RiskCheckPointBak> list = riskCheckPointService.selectRiskCheckPointBakList(riskCheckPointBak);
        return getDataTable(list);
    }
 
    /**
     * 查询检查点及评价详情
     * @param checkPointId
     * @param mmap
     * @return
     */
    @GetMapping("/bakDetail/{checkPointId}")
    public String bakDetail(@PathVariable("checkPointId") Long checkPointId, ModelMap mmap)
    {
        RiskCheckPointBak riskCheckPointBak = new RiskCheckPointBak();
        riskCheckPointBak.setCheckPointId(checkPointId);
        List<RiskCheckPointBak> list = riskCheckPointService.selectRiskCheckPointBakList(riskCheckPointBak);
        mmap.put("riskCheckPoint", list.get(0));
        return prefix + "/detailByLSBak";
        //查出该检查点,选用的评价方法
//        Integer evaluationMethodType  = riskCheckPoint.getEvaluationMethodType();
//        if(TrEvaluationMethodTypeEnum.LS.getMethodId().equals(evaluationMethodType)){
//            return prefix + "/detail" +TrEvaluationMethodTypeEnum.LS.getUrl();
//        }
//        else if(TrEvaluationMethodTypeEnum.LEC.getMethodId().equals(evaluationMethodType)){
//            return prefix + "/detail" +TrEvaluationMethodTypeEnum.LEC.getUrl();
//        }else if(TrEvaluationMethodTypeEnum.MES.getMethodId().equals(evaluationMethodType)){
//            return prefix + "/detail" +TrEvaluationMethodTypeEnum.MES.getUrl();
//        }else if(TrEvaluationMethodTypeEnum.RS.getMethodId().equals(evaluationMethodType)){
//            return prefix + "/detail" +TrEvaluationMethodTypeEnum.RS.getUrl();
//        }
//        else{
//            return "/error/404";
//        }
    }
    @Log(title = "检查点及评价Bak", businessType = BusinessType.EXPORT)
    @PostMapping("/exportBak")
    @ResponseBody
    public AjaxResult exportBak(RiskCheckPointBak riskCheckPoint)
    {
        List<RiskCheckPointBak> list = riskCheckPointService.selectRiskCheckPointBakList(riskCheckPoint);
        ExcelUtil<RiskCheckPointBak> util = new ExcelUtil<RiskCheckPointBak>(RiskCheckPointBak.class);
        return util.exportExcel(list, "风险评价台账");
    }
 
 
    /**
     * 导出检查点及评价列表
     */
    @Log(title = "检查点及评价", businessType = BusinessType.EXPORT)
    @PostMapping("/export")
    @ResponseBody
    public AjaxResult export(RiskCheckPoint riskCheckPoint)
    {
        List<RiskCheckPoint> list = riskCheckPointService.selectRiskCheckPointList(riskCheckPoint);
        ExcelUtil<RiskCheckPoint> util = new ExcelUtil<RiskCheckPoint>(RiskCheckPoint.class);
        return util.exportExcel(list, "riskCheckPoint");
    }
 
    /**
     * 新增检查点及评价
     */
    @GetMapping("/add")
    public String add()
    {
        return prefix + "/add";
    }
 
    /**
     * 新增保存检查点及评价
     */
    @Log(title = "检查点及评价", businessType = BusinessType.INSERT)
    @PostMapping("/add")
    @ResponseBody
    public AjaxResult addSave(RiskCheckPoint riskCheckPoint)
    {
        User user = ShiroUtils.getSysUser();
        riskCheckPoint.setCompanyId(user.getCompanyId());
        return toAjax(riskCheckPointService.insertRiskCheckPoint(riskCheckPoint));
    }
 
    /**
     * 修改检查点及评价
     */
    @GetMapping("/edit/{checkPointId}")
    public String edit(@PathVariable("checkPointId") Long checkPointId, ModelMap mmap)
    {
        RiskCheckPoint riskCheckPoint = riskCheckPointService.selectRiskCheckPointById(checkPointId);
        mmap.put("riskCheckPoint", riskCheckPoint);
        return prefix + "/edit";
    }
 
    /**
     * 修改保存检查点及评价
     */
    @Log(title = "检查点及评价", businessType = BusinessType.UPDATE)
    @PostMapping("/edit")
    @ResponseBody
    public AjaxResult editSave(RiskCheckPoint riskCheckPoint)
    {
        return toAjax(riskCheckPointService.updateRiskCheckPoint(riskCheckPoint));
    }
 
    /**
     * 修改保存检查点及评价
     */
    @Log(title = "检查点及评价", businessType = BusinessType.UPDATE)
    @PostMapping("/editByEvaluation")
    @ResponseBody
    public AjaxResult editSaveByEvaluation(RiskCheckPoint riskCheckPoint)
    {
        RiskCheckPoint oldRiskCheckPoint = riskCheckPointService.selectRiskCheckPointById(riskCheckPoint.getCheckPointId());
 
        //判断是是否为已评价
        if(TrEvaluationStatusEnum.EVALUATION.getCode().equals(riskCheckPoint.getEvaluationStatus())){
            //获取风险单元负责人为其审核人
            riskCheckPoint.setReviewUserId(oldRiskCheckPoint.getPlan().getRisk().getUserId());
 
            //检查该项目是否还有未评价的检查点,
            RiskCheckPoint r = new RiskCheckPoint();
            r.setPlan(riskCheckPoint.getPlan());
            r.setCheckPointId(riskCheckPoint.getCheckPointId());
            List<RiskCheckPoint> rList = riskCheckPointService.selectRiskCheckPointListByNoEvaluation(r);
            if (rList.size()<=0){
                //如果没有,阶段状态进入审核阶段
                RiskEvaluationPlan plan = new RiskEvaluationPlan();
                plan.setPlanId(riskCheckPoint.getPlanId());
                plan.setStageStatus(4);
                riskEvaluationPlanService.updateRiskEvaluationPlan(plan);
            }
 
            //评审时判断其是否是已经审核过一次的,如果是,则重置其审核信息
            if(!TrReviewStatusEnum.NO_REVIEW.getCode().equals(oldRiskCheckPoint.getReviewStatus())){
                riskCheckPoint.setReviewStatus(TrReviewStatusEnum.NO_REVIEW.getCode());
                riskCheckPoint.setReviewOpinion(" ");
                riskCheckPoint.setReviewTime(null);
            }
        }
        int i = riskCheckPointService.updateRiskCheckPoint(riskCheckPoint);
        hiddenDangerCheckPointService.getTaskCountTotal(getSysUser().getUserId());//查询未执行任务总数量并推送
        return toAjax(i);
    }
 
    @Log(title = "检查点及评价", businessType = BusinessType.UPDATE)
    @PostMapping("/editByReview")
    @ResponseBody
    public AjaxResult editSaveByReview(RiskCheckPoint riskCheckPoint)
    {
        if(TrReviewStatusEnum.REVIEW_PASS.getCode().equals(riskCheckPoint.getReviewStatus())){
           riskCheckPoint.setReviewTime(new Date());
        }
 
        //如果是审核驳回,这将此条信息从已评价,改为待评价
        if(TrReviewStatusEnum.REVIEW_NOT_PASS.getCode().equals(riskCheckPoint.getReviewStatus())){
            riskCheckPoint.setEvaluationStatus(TrEvaluationStatusEnum.NOT_EVALUATION.getCode());
        }
 
        int i = riskCheckPointService.updateRiskCheckPoint(riskCheckPoint);
 
        hiddenDangerCheckPointService.getTaskCountTotal(getSysUser().getUserId());//查询未执行任务总数量并推送
 
        return toAjax(i);
    }
 
    /**
     * 删除检查点及评价
     */
    @Log(title = "检查点及评价", businessType = BusinessType.DELETE)
    @PostMapping( "/remove")
    @ResponseBody
    public AjaxResult remove(String ids)
    {
        return toAjax(riskCheckPointService.deleteRiskCheckPointByIds(ids));
    }
 
    /**
     * 新增检查点及评价
     */
    @GetMapping("/addIdentify/{identifyMethod}/{planId}")
    public String addIdentify(@PathVariable("identifyMethod")String identifyMethod,@PathVariable("planId") Long planId,ModelMap mmap){
        mmap.put("planId",planId);
        return prefix + "/addIdentify"+identifyMethod;
    }
 
    /**
     * 根据不同的辨识类型,跳转至不同的编辑页面
     * @param identifyMethod
     * @param checkPointId
     * @param mmap
     * @return
     */
    @GetMapping("/editIdentify/{identifyMethod}/{checkPointId}")
    public String editIdentify(@PathVariable("identifyMethod")String identifyMethod, @PathVariable("checkPointId") Long checkPointId, ModelMap mmap)
    {
 
        RiskCheckPoint riskCheckPoint = riskCheckPointService.selectRiskCheckPointById(checkPointId);
        mmap.put("riskCheckPoint", riskCheckPoint);
        return prefix + "/editIdentify" +identifyMethod;
    }
 
    /**
     * 跳转至评价页面
     * @return
     */
    @GetMapping("/evaluation")
    public String listByEvaluation(){
        return prefix + "/riskCheckPointByEvaluation";
    }
 
    /**
     * 根据不同的评价类型,跳转至不同的评价页面
     * @param checkPointId
     * @param mmap
     * @return
     */
    @GetMapping("/editEvaluation/{checkPointId}")
    public String editEvaluation(@PathVariable("checkPointId") Long checkPointId, ModelMap mmap){
 
        RiskCheckPoint riskCheckPoint = riskCheckPointService.selectRiskCheckPointById(checkPointId);
        mmap.put("riskCheckPoint", riskCheckPoint);
 
        //查出该检查点,选用的评价方法
        Integer evaluationMethodType  = riskCheckPoint.getEvaluationMethodType();
        if(TrEvaluationMethodTypeEnum.LS.getMethodId().equals(evaluationMethodType)){
            return prefix + "/editEvaluation" +TrEvaluationMethodTypeEnum.LS.getUrl();
        }else if(TrEvaluationMethodTypeEnum.LEC.getMethodId().equals(evaluationMethodType)){
            return prefix + "/editEvaluation" +TrEvaluationMethodTypeEnum.LEC.getUrl();
        }else if(TrEvaluationMethodTypeEnum.MES.getMethodId().equals(evaluationMethodType)){
            return prefix + "/editEvaluation" +TrEvaluationMethodTypeEnum.MES.getUrl();
        }else if(TrEvaluationMethodTypeEnum.RS.getMethodId().equals(evaluationMethodType)){
            return prefix + "/editEvaluation" +TrEvaluationMethodTypeEnum.RS.getUrl();
        }else{
            return "/error/404";
        }
    }
 
    @PostMapping("/listByEvaluation")
    @ResponseBody
    public TableDataInfo listByEvaluation(RiskCheckPoint riskCheckPoint)
    {
        //查询评价人为当前用户的列表
        riskCheckPoint.setEvaluationUserId(ShiroUtils.getUserId());
 
        startPage();
        List<RiskCheckPoint> list = riskCheckPointService.selectRiskCheckPointList(riskCheckPoint);
        return getDataTable(list);
    }
 
 
    /**
     * 跳转至审核页面
     * @return
     */
    @GetMapping("/review")
    public String listByReview()
    {
        return prefix + "/riskCheckPointByReview";
    }
 
    /**
     * 审核页面的列表内容查询
     */
    @PostMapping("/listByReview")
    @ResponseBody
    public TableDataInfo listByReview(RiskCheckPoint riskCheckPoint){
        //查询审核人为当前用户的,
        riskCheckPoint.setReviewUserId(ShiroUtils.getUserId());
 
        startPage();
        List<RiskCheckPoint> list = riskCheckPointService.selectRiskCheckPointList(riskCheckPoint);
        return getDataTable(list);
    }
 
 
 
    /**
     * 跳转至审核的编辑页面
     * @param checkPointId
     * @param mmap
     * @return
     */
    @GetMapping("/editReview/{checkPointId}")
    public String editReview(@PathVariable("checkPointId") Long checkPointId, ModelMap mmap){
 
        RiskCheckPoint riskCheckPoint = riskCheckPointService.selectRiskCheckPointById(checkPointId);
        mmap.put("riskCheckPoint", riskCheckPoint);
 
        //查出该检查点,选用的评价方法
        Integer evaluationMethodType  = riskCheckPoint.getEvaluationMethodType();
        if(TrEvaluationMethodTypeEnum.LS.getMethodId().equals(evaluationMethodType)){
            return prefix + "/editReview" +TrEvaluationMethodTypeEnum.LS.getUrl();
        }else if(TrEvaluationMethodTypeEnum.LEC.getMethodId().equals(evaluationMethodType)){
            return prefix + "/editReview" +TrEvaluationMethodTypeEnum.LEC.getUrl();
        }else if(TrEvaluationMethodTypeEnum.MES.getMethodId().equals(evaluationMethodType)){
            return prefix + "/editReview" +TrEvaluationMethodTypeEnum.MES.getUrl();
        }else{
            return null;
        }
    }
 
    /**
     * 查询检查点详情
     * @param checkPointId
     * @param mmap
     * @return
     */
    @GetMapping("/detail/{checkPointId}")
    public String detail(@PathVariable("checkPointId") Long checkPointId, ModelMap mmap){
 
        RiskCheckPoint riskCheckPoint = riskCheckPointService.selectRiskCheckPointById(checkPointId);
        mmap.put("riskCheckPoint", riskCheckPoint);
 
        //查出该检查点,选用的评价方法
        Integer evaluationMethodType  = riskCheckPoint.getEvaluationMethodType();
        if(TrEvaluationMethodTypeEnum.LS.getMethodId().equals(evaluationMethodType)){
            return prefix + "/detail" +TrEvaluationMethodTypeEnum.LS.getUrl();
        }else if(TrEvaluationMethodTypeEnum.LEC.getMethodId().equals(evaluationMethodType)){
            return prefix + "/detail" +TrEvaluationMethodTypeEnum.LEC.getUrl();
        }else if(TrEvaluationMethodTypeEnum.MES.getMethodId().equals(evaluationMethodType)){
            return prefix + "/detail" +TrEvaluationMethodTypeEnum.MES.getUrl();
        }else if(TrEvaluationMethodTypeEnum.RS.getMethodId().equals(evaluationMethodType)){
            return prefix + "/detail" +TrEvaluationMethodTypeEnum.RS.getUrl();
        }else{
            return "/error/404";
        }
    }
 
 
    /**
     * 用于记录风险清单台账
     * @return
     */
    @GetMapping("/ledger")
    public String ledger(ModelMap modelMap){
 
        User user = getSysUser();
        Long companyId = user.getCompanyId();
 
        Set<String> stringSet = roleService.selectRoleKeys(user.getUserId());
        if (stringSet.contains("common")){
            modelMap.put("common", "common");
        }else{
 
        }
        //查询该公司所有区域
        List<Region> regionList = regionService.selectRegionListByCompanyId(companyId);
        modelMap.put("regionList", regionList);
        modelMap.put("companyId",companyId);
        return prefix + "/ledger";
    }
 
 
    /**
     * 用于记录风险清单台账
     * @return
     */
    @GetMapping("/ledger/{companyId}/{level}")
    public String ledgerByCompanyIdAndRiskLevel(ModelMap modelMap,
        @PathVariable("companyId") Long companyId,@PathVariable("level") String level){
 
        //查询该公司所有区域
        List<Region> regionList = regionService.selectRegionListByCompanyId(companyId);
        modelMap.put("regionList", regionList);
 
        modelMap.put("companyId",companyId);
        if("major".equals(level)){
            //重大风险
            modelMap.put("level","重大");
        }else if("larger".equals(level)){
            //较大风险
            modelMap.put("level","较大");
        }else if("general".equals(level)){
            //一般风险
            modelMap.put("level","一般");
        }else if("low".equals(level)){
            modelMap.put("level","低");
        }
 
        return prefix + "/ledgerByCompanyIdAndRiskLevel";
    }
 
 
 
    /**
     * 删除风险台账
     */
    @Log(title = "删除风险台账", businessType = BusinessType.DELETE)
    @PostMapping("/removeRiskCheckPointLedger")
    @ResponseBody
    public AjaxResult removeRiskCheckPointLedger(String ids) {
        if(StringUtils.isEmpty(ids)){
            return AjaxResult.error("id不能为空");
        }
        RiskCheckPoint rcp  = riskCheckPointService.selectRiskCheckPointById(Long.valueOf(ids));
        if(rcp.getCheckPointId()!=null){
            riskCheckPointService.deleteRiskCheckPointById(rcp.getCheckPointId());
            return AjaxResult.success();
        }
        return AjaxResult.error("数据有误");
    }
 
 
 
    /**
     * 根据指定公司id,跳转至该公司台账页面
     * @param modelMap
     * @param companyId
     * @return
     */
    @GetMapping("/ledger/{companyId}")
    public String ledgerByCompanyId(ModelMap modelMap,
                                    @PathVariable("companyId") String companyId){
        //查询该公司所有区域
        List<Region> regionList = regionService.selectRegionListByCompanyId(Long.valueOf(companyId));
        modelMap.put("regionList", regionList);
 
        modelMap.put("companyId",companyId);
        return prefix + "/ledger";
    }
 
 
    //判定为重大风险
    @Log(title = "检查点判断为重大", businessType = BusinessType.UPDATE)
    @PostMapping("/major")
    @ResponseBody
    public AjaxResult distributePlan(RiskCheckPoint checkPoint)
    {
        RiskCheckPoint oldRiskCheckPoint = riskCheckPointService.selectRiskCheckPointById(checkPoint.getCheckPointId());
 
 
            //检查该项目是否还有未评价的检查点,
            RiskCheckPoint r = new RiskCheckPoint();
            r.setPlan(checkPoint.getPlan());
            r.setCheckPointId(checkPoint.getCheckPointId());
            List<RiskCheckPoint> rList = riskCheckPointService.selectRiskCheckPointListByNoEvaluation(r);
            if (rList.size()<=0){
                //如果没有,阶段状态进入审核阶段
                RiskEvaluationPlan plan = new RiskEvaluationPlan();
                plan.setPlanId(checkPoint.getPlanId());
                plan.setStageStatus(4);
                riskEvaluationPlanService.updateRiskEvaluationPlan(plan);
            }
 
            //评审时判断其是否是已经审核过一次的,如果是,则重置其审核信息
            if(!TrReviewStatusEnum.NO_REVIEW.getCode().equals(oldRiskCheckPoint.getReviewStatus())){
                checkPoint.setReviewStatus(TrReviewStatusEnum.NO_REVIEW.getCode());
                checkPoint.setReviewOpinion(" ");
                checkPoint.setReviewTime(null);
            }
 
 
 
        if(TrEvaluationMajorEnum.LS.getMethodId().equals(oldRiskCheckPoint.getEvaluationMethodType())){
            checkPoint.setEvaluationNowFengxianzhi(TrEvaluationMajorEnum.LS.getFengxianzhi());
            checkPoint.setEvaluationNowJibie(TrEvaluationMajorEnum.LS.getJibie());
            checkPoint.setEvaluationNowFengxianJibie(TrEvaluationMajorEnum.LS.getFengxianJibie());
            checkPoint.setEvaluationNowFengxianse(TrEvaluationMajorEnum.LS.getFengxianse());
            checkPoint.setEvaluationNowGuankongCengji(TrEvaluationMajorEnum.LS.getGuankongCengji());
 
            checkPoint.setEvaluationAfterFengxianzhi(TrEvaluationMajorEnum.LS.getFengxianzhi());
            checkPoint.setEvaluationAfterJibie(TrEvaluationMajorEnum.LS.getJibie());
            checkPoint.setEvaluationAfterFengxianJibie(TrEvaluationMajorEnum.LS.getFengxianJibie());
            checkPoint.setEvaluationAfterFengxianse(TrEvaluationMajorEnum.LS.getFengxianse());
            checkPoint.setEvaluationAfterGuankongCengji(TrEvaluationMajorEnum.LS.getGuankongCengji());
 
        }else if(TrEvaluationMajorEnum.LEC.getMethodId().equals(oldRiskCheckPoint.getEvaluationMethodType())){
            checkPoint.setEvaluationNowFengxianzhi(TrEvaluationMajorEnum.LEC.getFengxianzhi());
            checkPoint.setEvaluationNowJibie(TrEvaluationMajorEnum.LEC.getJibie());
            checkPoint.setEvaluationNowFengxianJibie(TrEvaluationMajorEnum.LEC.getFengxianJibie());
            checkPoint.setEvaluationNowFengxianse(TrEvaluationMajorEnum.LEC.getFengxianse());
            checkPoint.setEvaluationNowGuankongCengji(TrEvaluationMajorEnum.LEC.getGuankongCengji());
 
            checkPoint.setEvaluationAfterFengxianzhi(TrEvaluationMajorEnum.LEC.getFengxianzhi());
            checkPoint.setEvaluationAfterJibie(TrEvaluationMajorEnum.LEC.getJibie());
            checkPoint.setEvaluationAfterFengxianJibie(TrEvaluationMajorEnum.LEC.getFengxianJibie());
            checkPoint.setEvaluationAfterFengxianse(TrEvaluationMajorEnum.LEC.getFengxianse());
            checkPoint.setEvaluationAfterGuankongCengji(TrEvaluationMajorEnum.LEC.getGuankongCengji());
 
        }else if(TrEvaluationMajorEnum.MES.getMethodId().equals(oldRiskCheckPoint.getEvaluationMethodType())){
            checkPoint.setEvaluationNowFengxianzhi(TrEvaluationMajorEnum.MES.getFengxianzhi());
            checkPoint.setEvaluationNowJibie(TrEvaluationMajorEnum.MES.getJibie());
            checkPoint.setEvaluationNowFengxianJibie(TrEvaluationMajorEnum.MES.getFengxianJibie());
            checkPoint.setEvaluationNowFengxianse(TrEvaluationMajorEnum.MES.getFengxianse());
            checkPoint.setEvaluationNowGuankongCengji(TrEvaluationMajorEnum.MES.getGuankongCengji());
 
            checkPoint.setEvaluationAfterFengxianzhi(TrEvaluationMajorEnum.MES.getFengxianzhi());
            checkPoint.setEvaluationAfterJibie(TrEvaluationMajorEnum.MES.getJibie());
            checkPoint.setEvaluationAfterFengxianJibie(TrEvaluationMajorEnum.MES.getFengxianJibie());
            checkPoint.setEvaluationAfterFengxianse(TrEvaluationMajorEnum.MES.getFengxianse());
            checkPoint.setEvaluationAfterGuankongCengji(TrEvaluationMajorEnum.MES.getGuankongCengji());
        }else if(TrEvaluationMajorEnum.RS.getMethodId().equals(oldRiskCheckPoint.getEvaluationMethodType())){
            checkPoint.setEvaluationNowFengxianzhi(TrEvaluationMajorEnum.RS.getFengxianzhi());
            checkPoint.setEvaluationNowJibie(TrEvaluationMajorEnum.RS.getJibie());
            checkPoint.setEvaluationNowFengxianJibie(TrEvaluationMajorEnum.RS.getFengxianJibie());
            checkPoint.setEvaluationNowFengxianse(TrEvaluationMajorEnum.RS.getFengxianse());
            checkPoint.setEvaluationNowGuankongCengji(TrEvaluationMajorEnum.RS.getGuankongCengji());
 
            checkPoint.setEvaluationAfterFengxianzhi(TrEvaluationMajorEnum.RS.getFengxianzhi());
            checkPoint.setEvaluationAfterJibie(TrEvaluationMajorEnum.RS.getJibie());
            checkPoint.setEvaluationAfterFengxianJibie(TrEvaluationMajorEnum.RS.getFengxianJibie());
            checkPoint.setEvaluationAfterFengxianse(TrEvaluationMajorEnum.RS.getFengxianse());
            checkPoint.setEvaluationAfterGuankongCengji(TrEvaluationMajorEnum.RS.getGuankongCengji());
        }
 
        //风险单元直接为已评价
        checkPoint.setEvaluationStatus(TrEvaluationStatusEnum.EVALUATION.getCode());
        //获取风险单元负责人为其审核人
        checkPoint.setReviewUserId(oldRiskCheckPoint.getPlan().getRisk().getUserId());
 
        int i = riskCheckPointService.updateRiskCheckPoint(checkPoint);
        hiddenDangerCheckPointService.getTaskCountTotal(getSysUser().getUserId());//查询未执行任务总数量并推送
        return toAjax(i);
    }
 
}