parent
c5c7583ba5
commit
b0c8355986
File diff suppressed because one or more lines are too long
@ -1,58 +0,0 @@
|
||||
/**
|
||||
* 增加维修故障类型字典
|
||||
* @param type_name 类型名称
|
||||
*/
|
||||
@Before({POST.class})
|
||||
@JwtCheckInterface({})
|
||||
public void addWxFaultType(String type_name){
|
||||
ym.addWxFaultType(type_name );
|
||||
renderJson(RetKit.renderSuccess());
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除维修故障类型字典
|
||||
* @param type_id 主键
|
||||
*/
|
||||
@Before({POST.class})
|
||||
@JwtCheckInterface({})
|
||||
@IsNumericInterface({"type_id"})
|
||||
public void delWxFaultTypeById(int type_id){
|
||||
ym.delWxFaultTypeById(type_id);
|
||||
renderJson(RetKit.renderSuccess());
|
||||
}
|
||||
|
||||
/**
|
||||
按ID修改维修故障类型字典
|
||||
* @param type_id 主键
|
||||
* @param type_name 类型名称
|
||||
*/
|
||||
@Before({POST.class})
|
||||
@JwtCheckInterface({})
|
||||
@IsNumericInterface({type_id)
|
||||
public void updateWxFaultTypeById(int type_id , String type_name){
|
||||
ym.updateWxFaultTypeById(type_id , type_name );
|
||||
renderJson(RetKit.renderSuccess());
|
||||
}
|
||||
|
||||
/**
|
||||
按ID查询维修故障类型字典
|
||||
* @para type_id 主键
|
||||
*/
|
||||
@Before({GET.class})
|
||||
@JwtCheckInterface({})
|
||||
@IsNumericInterface("{type_id}")
|
||||
public void getWxFaultTypeById(int type_id){
|
||||
renderJson(RetKit.renderSuccess(ym.getWxFaultTypeById(type_id)));
|
||||
}
|
||||
|
||||
/**
|
||||
分页查询维修故障类型字典
|
||||
@param pageNum 页码
|
||||
@param pageSize 每页数量
|
||||
*/
|
||||
@Before({GET.class})
|
||||
@JwtCheckInterface({})
|
||||
public void getWxFaultTypeList(int pageNum, int pageSize){
|
||||
Page<Record> listPage = ym.getWxFaultTypeList(pageNum, pageSize);
|
||||
renderJson(RetKit.renderSuccess(listPage));
|
||||
}
|
@ -1,53 +0,0 @@
|
||||
/**
|
||||
增加维修故障类型字典
|
||||
* @param type_name 类型名称
|
||||
*/
|
||||
public void addWxFaultType(String type_name){
|
||||
Record record = new Record();
|
||||
record.set("type_name", type_name);
|
||||
Db.save("t_wx_fault_type","type_id",record);
|
||||
}
|
||||
|
||||
/**
|
||||
删除维修故障类型字典
|
||||
@para type_id 主键
|
||||
*/
|
||||
public void delWxFaultTypeById(int type_id){
|
||||
String sql="delete from t_wx_fault_type where type_id =?";
|
||||
Db.update(sql,type_id);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
修改维修故障类型字典
|
||||
* @para type_id 主键
|
||||
* @param type_name 类型名称
|
||||
*/
|
||||
public void updateWxFaultTypeById(int type_id,String type_name){
|
||||
String sql="update t_wx_fault_type set type_name =? where type_id =?";
|
||||
Db.update(sql,type_name ,type_id);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
单条查询维修故障类型字典
|
||||
* @para type_id 主键
|
||||
*/
|
||||
public Record getWxFaultTypeById(int type_id){
|
||||
String sql="select * from t_wx_fault_type where type_id =?";
|
||||
return Db.findFirst(sql,type_id);
|
||||
}
|
||||
|
||||
/**
|
||||
分页查询维修故障类型字典
|
||||
* @para pageNum 当前页码
|
||||
* @para pageSize 每页显示条数
|
||||
*/
|
||||
public Page<Record> getWxFaultTypeList(int pageNum, int pageSize){
|
||||
String sql1="select * ";
|
||||
String sql2=" from t_wx_fault_type";
|
||||
return Db.paginate(pageNum, pageSize, sql1,sql2);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in new issue