|
|
|
@ -64,7 +64,7 @@ public class OrganizationController extends Controller {
|
|
|
|
|
//是不是有权限操作这个单位或区域下的数据?
|
|
|
|
|
@LengthInterface({"org_name,2,64"})
|
|
|
|
|
public void addBureau(String org_code, String org_name, String parent_org_id, int org_type_id,
|
|
|
|
|
int school_type_id, int sort_id, String property_id, int level_id) {
|
|
|
|
|
int school_type_id, int sort_id, String property_id, int level_id,int is_virtual) {
|
|
|
|
|
String person_id = SessionKit.get(getRequest(), getResponse(), "person_id");
|
|
|
|
|
if (org_code.trim().equals("-1")) {
|
|
|
|
|
renderJson(CommonUtil.returnMessageJson(false, "-1是保留字,不能做为编码使用!"));
|
|
|
|
@ -109,7 +109,7 @@ public class OrganizationController extends Controller {
|
|
|
|
|
//客户端ip_address
|
|
|
|
|
String ip_address = IpUtil.getIpAddr(getRequest());
|
|
|
|
|
model.addBureau(org_code, org_name, parent_org_id, org_type_id, school_type_id,
|
|
|
|
|
sort_id, operator, ip_address, property_id, level_id);
|
|
|
|
|
sort_id, operator, ip_address, property_id, level_id,is_virtual);
|
|
|
|
|
renderJson(CommonUtil.returnMessageJson(true, "保存成功!"));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -130,7 +130,7 @@ public class OrganizationController extends Controller {
|
|
|
|
|
@IsSysAdminInterface({"1", "2", "3"}) //是不是1,2,3号管理员
|
|
|
|
|
//是不是有权限操作这个单位或区域下的数据?
|
|
|
|
|
@LengthInterface({"bureau_name,2,64"})
|
|
|
|
|
public void updateBureau(String bureau_id, String org_code, String bureau_name, String parent_org_id, int sort_id, String main_school_id, int property_id) {
|
|
|
|
|
public void updateBureau(String bureau_id, String org_code, String bureau_name, String parent_org_id, int sort_id, String main_school_id, int property_id,int is_virtual) {
|
|
|
|
|
if (model.getOrgCodeCountExceptSelf(bureau_id, org_code) > 0) {
|
|
|
|
|
renderJson(CommonUtil.returnMessageJson(false, "此单位代码已存在,不能添加!"));
|
|
|
|
|
return;
|
|
|
|
@ -139,7 +139,7 @@ public class OrganizationController extends Controller {
|
|
|
|
|
String operator = SessionKit.get(getRequest(), getResponse(), "person_id");
|
|
|
|
|
//客户端ip_address
|
|
|
|
|
String ip_address = IpUtil.getIpAddr(getRequest());
|
|
|
|
|
model.updateBureau(bureau_id, org_code, bureau_name, parent_org_id, sort_id, main_school_id, property_id, operator, ip_address);
|
|
|
|
|
model.updateBureau(bureau_id, org_code, bureau_name, parent_org_id, sort_id, main_school_id, property_id, operator, ip_address,is_virtual);
|
|
|
|
|
renderJson(CommonUtil.returnMessageJson(true, "修改成功!"));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|