package com.fgkj.actions; import java.util.List; import com.fgkj.dto.BattInf; import com.fgkj.dto.Battinf_apply; import com.fgkj.dto.Page; import com.fgkj.dto.ServiceModel; import com.fgkj.dto.User_inf; import com.fgkj.services.Battinf_applyService; import com.google.gson.reflect.TypeToken; public class Battinf_applyAction extends ActionUtil{ private Battinf_applyService service=new Battinf_applyService(); private String json; private String result; //确认申请(多条) public String update(){ List list=ActionUtil.getGson("yyyy-MM-dd HH:mm:ss").fromJson(json,new TypeToken>(){}.getType() ); ServiceModel model=service.update(list); result=tojson(model); return SUCCESS; } //验收申请(多条) public String check(){ List list=ActionUtil.getGson("yyyy-MM-dd HH:mm:ss").fromJson(json,new TypeToken>(){}.getType() ); ServiceModel model=service.check(list); result=tojson(model); return SUCCESS; } //申请人再我的申请页面的修改操作 public String updatePro(){ List list=ActionUtil.getGson("yyyy-MM-dd HH:mm:ss").fromJson(json,new TypeToken>(){}.getType() ); ServiceModel model=service.updatePro(list); result=tojson(model); return SUCCESS; } //我的申请中取消申请多条 public String del(){ List list=ActionUtil.getGson("yyyy-MM-dd HH:mm:ss").fromJson(json,new TypeToken>(){}.getType() ); ServiceModel model=service.del(list); result=tojson(model); return SUCCESS; } //添加申请 public String add(){ List list=ActionUtil.getGson("yyyy-MM-dd HH:mm:ss").fromJson(json,new TypeToken>(){}.getType() ); ServiceModel model=service.add(list); result=tojson(model); return SUCCESS; } //查询出所有需要确认的申请 public String serchByCondition(){ Page page=ActionUtil.getGson().fromJson(json, Page.class); ServiceModel model=service.serchByCondition(page); result=tojson(model); return SUCCESS; } //申请表中已审批通过的设备连接数 public String devCommNum(){ ServiceModel model=service.devCommNum(); result=tojson(model); return SUCCESS; } //查询出审核完的申请和待审核的申请 public String serchByInfo(){ Battinf_apply bapply=ActionUtil.getGson().fromJson(json, Battinf_apply.class); User_inf uinf=(User_inf) getUser(); bapply.setNum(uinf.getUId()); ServiceModel model=service.serchByInfo(bapply); result=tojson(model); return SUCCESS; } //申请人修改待审核的申请时的查询 public String serchbystationId(){ Battinf_apply bapply=ActionUtil.getGson().fromJson(json, Battinf_apply.class); User_inf uinf=(User_inf) getUser(); bapply.setNum(uinf.getUId()); ServiceModel model=service.serchbystationId(bapply); result=tojson(model); return SUCCESS; } public String getResult() { return result; } public void setJson(String json) { this.json = json; } }