## pasture - add column ``` alter table pasture add index (region_id), add index (center_id); add center_id int(11) default 0, add region_id int(11) default 0; add center varchar(64) default '' , add region varchar(64) default '' , add center_sort int(11) default 0 ``` - update 1. region ``` update pasture set region = case when name = '宝鸡牧场' or name = '吴忠牧场' or name = '阜民丰牧场' then '西北大区' when name = '双城牧场' or name = '尚志牧场' or name = '乌兰牧场' then '东北大区' when name = '商河牧场' or name = '汶上牧场' or name = '临沂牧场' then '华中大区' when name = '察一牧场' or name = '察北牧场' or name = '察二牧场' or name = '恒盛牧场' then '察北大区' when name = '塞一牧场' or name = '塞二牧场' or name = '塞三牧场' or name = '塞四牧场' or name = '塞五牧场' or name = '通辽牧场' then '塞北大区' when name = '蚌埠牧场' or name = '合肥牧场' or name = '马鞍山牧场' then '华东大区' when name = '和林牧场' or name = '西藏牧场' or name = '洪雅牧场' or name = '眉山牧场' or name = '云南牧场' then '蒙云川大区' when name = '赛罕牧场' or name = '托县牧场' or name = '和一牧场' or name = '大梁牧场' or name = '舍必崖牧场' or name = '马群沟牧场' or name = '磴口牧场' then '内蒙大区' when name = '衡一牧场' or name = '衡二牧场' or name = '新乐牧场' or name = '宿迁牧场' then '华北大区' end ``` 2. center ``` update pasture set center =case when name = '宝鸡牧场' or name = '吴忠牧场' or name = '阜民丰牧场' or name = '双城牧场' or name = '尚志牧场' or name = '乌兰牧场' or name = '商河牧场' or name = '汶上牧场' or name = '临沂牧场' then '一中心' when name = '察一牧场' or name = '察北牧场' or name = '察二牧场' or name = '恒盛牧场' or name = '塞一牧场' or name = '塞二牧场' or name = '塞三牧场' or name = '塞四牧场' or name = '塞五牧场' or name = '通辽牧场' or name = '蚌埠牧场' or name = '合肥牧场' or name = '马鞍山牧场' then '二中心' when name = '和林牧场' or name = '洪雅牧场' or name = '西藏牧场' or name = '眉山牧场' or name = '云南牧场' or name = '赛罕牧场' or name = '托县牧场' or name = '和一牧场' or name = '大梁牧场' or name = '舍必崖牧场' or name = '马群沟牧场' or name = '磴口牧场' or name = '衡一牧场' or name = '衡二牧场' or name = '新乐牧场' or name = '宿迁牧场' then '三中心' end ``` 3. region_id ``` update pasture set region_id = case when region = '西北大区' then 1 when region = '东北大区' then 2 when region = '华中大区' then 3 when region = '察北大区' then 4 when region = '塞北大区' then 5 when region = '华东大区' then 6 when region = '蒙云川大区' then 7 when region = '内蒙大区' then 8 when region = '华北大区' then 9 end ``` 4. center_id ``` update pasture set center_id =case when center = '一中心' then 1 when center = '二中心' then 2 when center = '三中心' then 3 end ``` ## interface - 设备指标 ``` {"name":"getChooseEqMonthBudgetListSumAll","page":1,"offset":1,"returntype":"Map","parammaps":{"startTime":"2022-07-04","endTime":"2022-07-04","pastureId":18,"departmentId":""}} ``` - 维修费 ``` {"name":"getChooseMonthWX","page":1,"offset":1,"returntype":"Map","parammaps":{"startTime":"2022-07-04","endTime":"2022-07-04","pastureId":18,"departmentId":""}} ``` - 电费 ``` {"name":"getChooseElectricityPrice","page":1,"offset":1,"returntype":"Map","parammaps":{"startTime":"2022-07-05","endTime":"2022-07-05","pastureId":18,"departmentId":""}} ``` - 水费 ``` {"name":"getChooseWaterPrice","page":1,"offset":1,"returntype":"Map","parammaps":{"startTime":"2022-07-05","endTime":"2022-07-05","pastureId":18,"departmentId":""}} ``` - 燃动费(柴油费) ``` {"name":"getChooseMonthiolPrice","page":1,"offset":1,"returntype":"Map","parammaps":{"startTime":"2022-07-05","endTime":"2022-07-05","pastureId":18,"departmentId":""}} ``` - 燃动动量(柴油量) ``` {"name":"getChooseMonthOilT","page":1,"offset":1,"returntype":"Map","parammaps":{"startTime":"2022-07-05","endTime":"2022-07-05","pastureId":18,"departmentId":""}} ``` - 电量 ``` {"name":"getChooseMonthElectricity","page":1,"offset":1,"returntype":"Map","parammaps":{"startTime":"2022-07-05","endTime":"2022-07-05","pastureId":18,"departmentId":""}} ``` - 水量 ``` {"name":"getChooseMonthWater","page":1,"offset":1,"returntype":"Map","parammaps":{"startTime":"2022-07-05","endTime":"2022-07-05","pastureId":18,"departmentId":""}} ``` - 导出 https://tmrwatch.cn:8082/authdata/downloadmailreport ``` {"name":"DownloadEquipment","offset":0,"pagecount":0,"parammaps":{"startTime":"2022-02-00","endTime":"2022-03-00","pastureId":"","departmentId":"","deptId":""}} ``` ## feiqi ## dict (revoke) - add column ``` alter table dict add type_name varchar(64) not null default ''; ``` - insert ``` insert into dict (name, pid, orderby, isAllow, enable, type_name,type_id) values ('西北大区', -1, 1, 1, 1, '牧场大区分级',1), ('东北大区', -1, 1, 1, 1, '牧场大区分级',2), ('华中大区', -1, 1, 1, 1, '牧场大区分级',3), ('一中心', -1, 1, 1, 1, '牧场中心分级',1), ('察北大区', -1, 1, 1, 1, '牧场大区分级',4), ('塞北大区', -1, 1, 1, 1, '牧场大区分级',5), ('华东大区', -1, 1, 1, 1, '牧场大区分级',6), ('二中心', -1, 1, 1, 1, '牧场中心分级',2), ('蒙云川大区', -1, 1, 1, 1, '牧场大区分级',7), ('内蒙大区', -1, 1, 1, 1, '牧场大区分级',8), ('华北大区', -1, 1, 1, 1, '牧场大区分级',9), ('三中心', -1, 1, 1, 1, '牧场中心分级',3) ``` https://eam.modernfarming.cn:8000/authdata/downloadmailreport {"name":"DownloadEquipment","offset":0,"pagecount":0,"parammaps":{"startTime":"2022-08-02","endTime":"2022-08-02","pastureId":"","departmentId":"","deptId":""}}