集团管理 更新接口
This commit is contained in:
parent
6978eb5246
commit
b2fd60a9bc
|
|
@ -154,7 +154,7 @@
|
|||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateForbiddenTagById" parameterType="com.engine.organization.entity.sequence.po.SequencePO">
|
||||
<update id="updateForbiddenTagById" parameterType="com.engine.organization.entity.post.po.PostInfoPO">
|
||||
update jcl_org_post_info
|
||||
<set>
|
||||
forbidden_tag=#{forbiddenTag},
|
||||
|
|
|
|||
|
|
@ -17,14 +17,24 @@ public interface GroupService {
|
|||
*/
|
||||
Map<String, Object> getGroupFormField(Map<String, Object> params);
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
boolean updateGroup(Map<String, Object> params);
|
||||
|
||||
/**
|
||||
* 获取列表页面按钮信息
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
Map<String, Object> getHasRight();
|
||||
|
||||
/**
|
||||
* 获取列表tabs
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
Map<String, Object> getTabInfo();
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ import com.engine.core.impl.Service;
|
|||
import com.engine.organization.entity.TopTab;
|
||||
import com.engine.organization.service.GroupService;
|
||||
import com.engine.organization.util.MenuBtn;
|
||||
import com.engine.organization.util.OrganizationAssert;
|
||||
import com.engine.organization.util.OrganizationFormItemUtil;
|
||||
import weaver.conn.RecordSet;
|
||||
import weaver.general.StringUtil;
|
||||
|
|
@ -37,7 +38,6 @@ public class GroupServiceImpl extends Service implements GroupService {
|
|||
String id = Util.null2String(params.get("id"));
|
||||
if (!StringUtil.isEmpty(id)) {
|
||||
RecordSet rs = new RecordSet();
|
||||
|
||||
String sql = "select * from HrmCompany where id in(" + id + ")";
|
||||
rs.executeQuery(sql);
|
||||
rs.executeQuery(sql);
|
||||
|
|
@ -71,6 +71,18 @@ public class GroupServiceImpl extends Service implements GroupService {
|
|||
return apiDatas;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean updateGroup(Map<String, Object> params) {
|
||||
String id = Util.null2String(params.get("id"));
|
||||
OrganizationAssert.notNull(id, "数据有误");
|
||||
String companyname = (String) params.get("companyname");
|
||||
String companydesc = (String) params.get("companydesc");
|
||||
String companyweb = (String) params.get("companyweb");
|
||||
RecordSet rs = new RecordSet();
|
||||
return rs.executeUpdate("update HrmCompany set COMPANYNAME = ?,COMPANYDESC=?,COMPANYWEB=? where id = ?", companyname, companydesc, companyweb, id);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getHasRight() {
|
||||
Map<String, Object> btnDatas = new HashMap<>();
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ public class MenuBtn {
|
|||
* @return
|
||||
*/
|
||||
public static MenuBtn topMenu_addNew() {
|
||||
return MenuBtn.builder().isBatch("1").isTop("1").menuFun("new").menuIcon("icon-coms-New-Flow").menuName("新建").type("BTN_Addnew").build();
|
||||
return MenuBtn.builder().isBatch("1").isTop("1").menuFun("new").menuIcon("icon-coms-New-Flow").menuName("新增").type("BTN_Addnew").build();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -51,7 +51,7 @@ public class MenuBtn {
|
|||
* @return
|
||||
*/
|
||||
public static MenuBtn rightMenu_addNew() {
|
||||
return MenuBtn.builder().isBatch("0").isTop("1").menuFun("new").menuIcon("icon-coms-New-Flow").menuName("新建").type("BTN_Addnew").build();
|
||||
return MenuBtn.builder().isBatch("0").isTop("1").menuFun("new").menuIcon("icon-coms-New-Flow").menuName("新增").type("BTN_Addnew").build();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -80,12 +80,12 @@ public class MenuBtn {
|
|||
Map<String, Object> btnDatas = new HashMap<>();
|
||||
ArrayList<MenuBtn> topMenuList = new ArrayList<>();
|
||||
ArrayList<MenuBtn> rightMenuList = new ArrayList<>();
|
||||
// 新建
|
||||
// 新增
|
||||
topMenuList.add(MenuBtn.topMenu_addNew());
|
||||
// 批量删除
|
||||
topMenuList.add(MenuBtn.topMenu_batchDelete());
|
||||
btnDatas.put("topMenu", topMenuList);
|
||||
// 新建
|
||||
// 新增
|
||||
rightMenuList.add(MenuBtn.rightMenu_addNew());
|
||||
// 日志
|
||||
rightMenuList.add(MenuBtn.rightMenu_btnLog());
|
||||
|
|
|
|||
|
|
@ -4,12 +4,14 @@ import com.engine.common.util.ParamUtil;
|
|||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.organization.util.response.ReturnResult;
|
||||
import com.engine.organization.wrapper.GroupWrapper;
|
||||
import io.swagger.v3.oas.annotations.parameters.RequestBody;
|
||||
import weaver.hrm.HrmUserVarify;
|
||||
import weaver.hrm.User;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.ws.rs.GET;
|
||||
import javax.ws.rs.POST;
|
||||
import javax.ws.rs.Path;
|
||||
import javax.ws.rs.Produces;
|
||||
import javax.ws.rs.core.Context;
|
||||
|
|
@ -47,6 +49,18 @@ public class GroupController {
|
|||
}
|
||||
}
|
||||
|
||||
@POST
|
||||
@Path("/updateGroup")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public ReturnResult updateGroup(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody Map<String, Object> map) {
|
||||
try {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return ReturnResult.successed(getGroupWrapper(user).updateGroup(map));
|
||||
} catch (Exception e) {
|
||||
return ReturnResult.exceptionHandle(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表页顶部按钮
|
||||
*
|
||||
|
|
|
|||
|
|
@ -30,6 +30,16 @@ public class GroupWrapper extends Service {
|
|||
return getGroupService(user).getGroupFormField(params);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
public boolean updateGroup(Map<String, Object> params) {
|
||||
return getGroupService(user).updateGroup(params);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取列表页面按钮信息
|
||||
*
|
||||
|
|
|
|||
Loading…
Reference in New Issue