whycrzh
2021-01-28 9f05d9863af714b206bdfffe2096d60a942c9d23
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
package com.fgkj.controller;
 
import com.fgkj.dto.Batt_Maint_Dealarm;
import com.fgkj.dto.ServiceModel;
import com.fgkj.dto.User_inf;
import com.fgkj.services.Batt_Maint_DealarmService;
import com.fgkj.util.ActionUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
 
import javax.annotation.Resource;
import java.util.List;
 
@RequestMapping("battMainDeAlarm")
@RestController
@Api(tags = "battMainDeAlarm接口")
public class Batt_Maint_DealarmController{
 
 
    private ServiceModel model=new ServiceModel();
 
    @Resource
    private Batt_Maint_DealarmService service;
 
    //1.1电池信息统计分析查询
    @GetMapping("byConditionNew")
    @ApiOperation(notes = "",value="电池信息统计分析查询")
    public ServiceModel serchByConditionNew(@RequestBody Batt_Maint_Dealarm bd){
        // bd=ActionUtil.getGson("yyyy-MM-dd").fromJson(result, Batt_Maint_Dealarm.class);
        User_inf uinf=(User_inf) ActionUtil.getUser();
        bd.setUinf(uinf);
        ServiceModel model=service.serchByConditionNew(bd);
        return model;
    }    
    
    //1.2电池组统计分析查询
    @GetMapping("low")
    @ApiOperation(notes = "",value="电池组统计分析查询")
    public ServiceModel serchLow(@RequestBody Batt_Maint_Dealarm bd){
        // bd = ActionUtil.getGson("yyyy-MM-dd HH:mm:ss").fromJson(result, Batt_Maint_Dealarm.class);
        User_inf uinf=(User_inf) ActionUtil.getUser();
        bd.setUinf(uinf);
        List list=service.serchLow(bd);
        if(list!=null && list.size()>0){
            model.setCode(1);
            model.setData(list);            
        }
        return model;
    }
    
    //1.4电池组性能评估
    @GetMapping("byCondition")
    @ApiOperation(notes = "",value="电池组性能评估")
    public ServiceModel serchByCondition(@RequestBody Batt_Maint_Dealarm bd){
        // bd = ActionUtil.getGson("yyyy-MM-dd").fromJson(result, Batt_Maint_Dealarm.class);
        User_inf uinf=(User_inf) ActionUtil.getUser();
        bd.setUinf(uinf);
        List list=service.serchGroupAssess(bd);
        if(list!=null && list.size()>0){
            model.setCode(1);
            model.setData(list);
        }
        return model;
    }
    
    /*public static void main(String[] args) throws ParseException {
        Batt_Maint_DealarmAction ba=new Batt_Maint_DealarmAction();
        
        BattInf bi=new BattInf();
        bi.setStationName("");
        bi.setStationName1("");
        //bi.setBattGroupName("");
        bi.setBattGroupId(0);
        bi.setBattGroupName1("");
        bi.setBattProducer("");
        bi.setMonCapStd(0f);
        bi.setMonVolStd(0f);
        SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd");
        Date date1= sdf.parse("2000-01-01");
        Date date2= sdf.parse("2016-07-14");
        bi.setBattProductDate(ActionUtil.getSimpDate(date1));
        bi.setBattProductDate1(ActionUtil.getSimpDate(date2));
        bi.setBattInUseDate(ActionUtil.getSimpDate(date1));
        bi.setBattInUseDate1(ActionUtil.getSimpDate(date2));
        Batt_maintenance_inf minf=new Batt_maintenance_inf();
        minf.setRemark("100");
        Batttestdata_inf tdata=new Batttestdata_inf();
        tdata.setTest_type(3);
        tdata.setRecord_time(date1);
        tdata.setRecord_time1(date2);
        
        Battalarm_data adata=new Battalarm_data();
        Batt_Maint_Dealarm b=new Batt_Maint_Dealarm();
        Page page = new Page();
        page.setPageCurr(1);
        page.setPageSize(10);
        b.setBinf(bi);
        b.setMinf(minf);
        b.setTdata(tdata);
        b.setAdata(adata);
        b.setPage(page);
        
        ba.setBd(b);        
        ba.serchLow();
    }*/
}