合并线上代码
parent
f18132db06
commit
bc05a89ae6
|
@ -0,0 +1,30 @@
|
|||
package com.zcloud.controller.api;
|
||||
|
||||
import com.zcloud.controller.base.BaseController;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.service.bus.CorpInfoService;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
@Controller
|
||||
@RequestMapping("/openApi/preventCorp")
|
||||
public class ApiXgfDepartmentController extends BaseController {
|
||||
|
||||
@Resource
|
||||
private CorpInfoService corpInfoService;
|
||||
|
||||
/**
|
||||
* 获取所有公司
|
||||
*/
|
||||
@RequestMapping(value = "/getAllPreventionCorp")
|
||||
@ResponseBody
|
||||
private PageData getAllPreventionCorp() throws Exception {
|
||||
PageData response = new PageData();
|
||||
response.put("result", "success");
|
||||
response.put("data", corpInfoService.listAll(new PageData()));
|
||||
return response;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,56 @@
|
|||
package com.zcloud.controller.api;
|
||||
|
||||
import com.zcloud.controller.base.BaseController;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.service.xgf.XgfUserService;
|
||||
import com.zcloud.util.Warden;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Controller
|
||||
@RequestMapping("/openApi/xfgUser")
|
||||
public class ApiXgfUserController extends BaseController {
|
||||
|
||||
@Resource
|
||||
private XgfUserService xgfUserService;
|
||||
|
||||
@RequestMapping(value = "/synchronizationUserInfo")
|
||||
@ResponseBody
|
||||
public Object synchronizationUserInfo() throws Exception {
|
||||
try {
|
||||
PageData request = this.getPageData();
|
||||
xgfUserService.init(request);
|
||||
Map<String, Object> response = new HashMap<String, Object>();
|
||||
response.put("result", "success");
|
||||
return response;
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
throw new RuntimeException("系统异常");
|
||||
}
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/approvalApplication")
|
||||
@ResponseBody
|
||||
public Object approvalApplication() throws Exception {
|
||||
Map<String, Object> response = new HashMap<String, Object>();
|
||||
try {
|
||||
PageData request = this.getPageData();
|
||||
xgfUserService.approvalApplication(request);
|
||||
response.put("result", "success");
|
||||
response.put("code","0");
|
||||
return response;
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
response.put("result", "error");
|
||||
response.put("code","9999");
|
||||
response.put("msg", e.getMessage());
|
||||
return response;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,4 @@
|
|||
package com.zcloud.controller.api.dto;
|
||||
|
||||
public class XgfUserDto {
|
||||
}
|
|
@ -0,0 +1,231 @@
|
|||
package com.zcloud.controller.corpsystem;
|
||||
|
||||
import com.zcloud.controller.base.BaseController;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.entity.system.Menu;
|
||||
import com.zcloud.service.system.FHlogService;
|
||||
import com.zcloud.service.system.corpsystem.CorpMenuService;
|
||||
import com.zcloud.util.Const;
|
||||
import com.zcloud.util.Jurisdiction;
|
||||
import com.zcloud.util.RightsHelper;
|
||||
import com.zcloud.util.Tools;
|
||||
import net.sf.json.JSONArray;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 说明:菜单管理处理类
|
||||
* 作者:luoxiaobao
|
||||
* 官网:www.qdkjchina.com
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/corpMenu")
|
||||
public class CorpMenuController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private CorpMenuService corpMenuService;
|
||||
@Autowired
|
||||
private FHlogService FHLOG;
|
||||
|
||||
/**
|
||||
* 菜单列表ztree(菜单管理)
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value="/listAllMenu")
|
||||
@ResponseBody
|
||||
public Object listAllMenu()throws Exception{
|
||||
Map<String,String> map = new HashMap<String,String>();
|
||||
String errInfo = "success";
|
||||
JSONArray arr = JSONArray.fromObject(corpMenuService.listAllMenu("0"));
|
||||
String json = arr.toString();
|
||||
json = json.replaceAll("MENU_ID", "id").replaceAll("PARENT_ID", "pId").replaceAll("MENU_NAME", "name").replaceAll("subMenu", "nodes").replaceAll("hasMenu", "checked").replaceAll("MENU_URL", "url");
|
||||
map.put("zTreeNodes", json);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 菜单列表
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value="/list")
|
||||
@ResponseBody
|
||||
public Object list(String MENU_ID)throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
MENU_ID = Tools.isEmpty(MENU_ID)?"0":MENU_ID;
|
||||
List<Menu> menuList = corpMenuService.listSubMenuByParentId(MENU_ID);
|
||||
map.put("pd", corpMenuService.getMenuById(pd)); //传入父菜单所有信息
|
||||
map.put("MSG", null == pd.get("MSG")?"'list'":pd.get("MSG").toString()); //MSG=change 则为编辑或删除后跳转过来的
|
||||
map.put("menuList", menuList);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 请求新增菜单页面
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value="/toAdd")
|
||||
@ResponseBody
|
||||
public Object toAdd()throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
String MENU_ID = (null == pd.get("MENU_ID") || "".equals(pd.get("MENU_ID").toString()))?"0":pd.get("MENU_ID").toString();//接收传过来的上级菜单ID,如果上级为顶级就取值“0”
|
||||
pd.put("MENU_ID",MENU_ID);
|
||||
map.put("pds", corpMenuService.getMenuById(pd)); //传入父菜单所有信息
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增菜单
|
||||
* @param menu
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value="/add")
|
||||
@ResponseBody
|
||||
public Object add(Menu menu)throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
menu.setMENU_ID(String.valueOf(Integer.parseInt(corpMenuService.findMaxId(pd).get("MID").toString())+1));
|
||||
menu.setMENU_ICON(""); //默认无菜单图标
|
||||
corpMenuService.addMenu(menu); //新增菜单
|
||||
FHLOG.save(Jurisdiction.getUsername(), "新增菜单:"+menu.getMENU_NAME()); //记录日志
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 请求编辑菜单页面
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value="/toEdit")
|
||||
@ResponseBody
|
||||
public Object toEdit(String MENU_ID)throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd = corpMenuService.getMenuById(pd); //读取此ID的菜单数据
|
||||
map.put("pd", pd);
|
||||
pd.put("MENU_ID",pd.get("PARENT_ID").toString()); //用作读取父菜单信息
|
||||
map.put("pds", corpMenuService.getMenuById(pd)); //传入父菜单所有信息
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存编辑
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value="/edit")
|
||||
@ResponseBody
|
||||
public Object edit(Menu menu)throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
corpMenuService.edit(menu);
|
||||
FHLOG.save(Jurisdiction.getUsername(), "修改菜单:"+menu.getMENU_NAME()); //记录日志
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除菜单
|
||||
* @param MENU_ID
|
||||
* @param out
|
||||
*/
|
||||
@RequestMapping(value="/delete")
|
||||
@ResponseBody
|
||||
public Object delete(@RequestParam String MENU_ID)throws Exception{
|
||||
Map<String,String> map = new HashMap<String,String>();
|
||||
String errInfo = "success";
|
||||
if(corpMenuService.listSubMenuByParentId(MENU_ID).size() > 0){//判断是否有子菜单,是:不允许删除
|
||||
errInfo = "error";
|
||||
}else{
|
||||
corpMenuService.deleteMenuById(MENU_ID);
|
||||
errInfo = "success";
|
||||
FHLOG.save(Jurisdiction.getUsername(), "删除的菜单ID为:"+MENU_ID); //记录日志
|
||||
}
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存菜单图标
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value="/editicon")
|
||||
@ResponseBody
|
||||
public Object editicon()throws Exception{
|
||||
Map<String,String> map = new HashMap<String,String>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
corpMenuService.editicon(pd);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 显示菜单列表ztree(拓展左侧四级菜单)
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value="/otherlistMenu")
|
||||
@ResponseBody
|
||||
public Object otherlistMenu(String MENU_ID)throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd.put("MENU_ID", MENU_ID);
|
||||
String MENU_URL = corpMenuService.getMenuById(pd).getString("MENU_URL");
|
||||
if("#".equals(MENU_URL.trim()) || "".equals(MENU_URL.trim()) || null == MENU_URL){
|
||||
MENU_URL = "../index/default.html";
|
||||
}
|
||||
String roleRights = Jurisdiction.getSession().getAttribute(Jurisdiction.getUsername() + Const.SESSION_ROLE_RIGHTS).toString(); //获取本角色菜单权限
|
||||
List<Menu> athmenuList = corpMenuService.listAllMenuQx(MENU_ID); //获取某菜单下所有子菜单
|
||||
athmenuList = this.readMenu(athmenuList, roleRights); //根据权限分配菜单
|
||||
JSONArray arr = JSONArray.fromObject(athmenuList);
|
||||
String json = arr.toString();
|
||||
json = json.replaceAll("MENU_ID", "id").replaceAll("PARENT_ID", "pId").replaceAll("MENU_NAME", "name").replaceAll("subMenu", "nodes").replaceAll("hasMenu", "checked").replaceAll("MENU_URL", "url").replaceAll("#", "");
|
||||
map.put("zTreeNodes", json);
|
||||
map.put("MENU_URL",MENU_URL); //本ID菜单链接
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**根据角色权限获取本权限的菜单列表(递归处理)
|
||||
* @param menuList:传入的总菜单
|
||||
* @param roleRights:加密的权限字符串
|
||||
* @return
|
||||
*/
|
||||
public List<Menu> readMenu(List<Menu> menuList,String roleRights){
|
||||
for(int i=0;i<menuList.size();i++){
|
||||
menuList.get(i).setHasMenu(RightsHelper.testRights(roleRights, menuList.get(i).getMENU_ID()));
|
||||
if(menuList.get(i).isHasMenu() && "1".equals(menuList.get(i).getMENU_STATE())){ //判断是否有此菜单权限并且是否隐藏
|
||||
this.readMenu(menuList.get(i).getSubMenu(), roleRights); //是:继续排查其子菜单
|
||||
}else{
|
||||
menuList.remove(i);
|
||||
i--;
|
||||
}
|
||||
}
|
||||
return menuList;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,447 @@
|
|||
package com.zcloud.controller.corpsystem;
|
||||
|
||||
import com.zcloud.controller.base.BaseController;
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.entity.system.Menu;
|
||||
import com.zcloud.entity.system.Role;
|
||||
import com.zcloud.service.bus.CorpInfoService;
|
||||
import com.zcloud.service.system.FHlogService;
|
||||
import com.zcloud.service.system.corpsystem.CorpMenuService;
|
||||
import com.zcloud.service.system.corpsystem.CorpRoleService;
|
||||
import com.zcloud.service.system.corpsystem.CorpUsersService;
|
||||
import com.zcloud.util.DateUtil;
|
||||
import com.zcloud.util.Jurisdiction;
|
||||
import com.zcloud.util.RightsHelper;
|
||||
import com.zcloud.util.Tools;
|
||||
import net.sf.json.JSONArray;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
import java.math.BigInteger;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 说明:角色处理类
|
||||
* 作者:luoxiaobao
|
||||
* 官网:www.qdkjchina.com
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/corpRrole")
|
||||
public class CorpRoleController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private CorpRoleService corpRoleService;
|
||||
@Autowired
|
||||
private CorpUsersService corpUsersService;
|
||||
@Autowired
|
||||
private CorpMenuService corpMenuService;
|
||||
@Autowired
|
||||
private CorpInfoService corpInfoService;
|
||||
@Autowired
|
||||
private FHlogService FHLOG;
|
||||
|
||||
/** 进入权限首页
|
||||
* @param
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping("/list")
|
||||
@ResponseBody
|
||||
public Object list()throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = this.getPageData();
|
||||
// 横排一级组
|
||||
String corpId = Jurisdiction.getCORPINFO_ID();
|
||||
pd.put("CORPINFO_ID", corpId);
|
||||
PageData corp = corpInfoService.findById(pd);
|
||||
PageData fpd = new PageData();
|
||||
fpd.put("CORPINFO_ID",corp.getString("ROLE_NAME"));
|
||||
fpd.put("ROLE_ID",corp.getString("ROLE_NAME"));
|
||||
pd.put("ROLE_ID",corp.getString("ROLE_NAME"));
|
||||
Role roleList = corpRoleService.getRoleById(corp.getString("ROLE_NAME")); //列出组(页面横向排列的一级组)
|
||||
List<Role> roleList_z = corpRoleService.listAllRolesByPId(fpd); //列出此组下架角色
|
||||
pd = corpRoleService.findById(pd); //取得点击的角色组(横排的)
|
||||
map.put("pd", pd);
|
||||
map.put("roleList", Collections.singletonList(roleList));
|
||||
map.put("roleList_z", roleList_z);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**保存新增角色
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/add")
|
||||
@ResponseBody
|
||||
public Object add()throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
String parent_id = pd.getString("PARENT_ID"); //父类角色id
|
||||
pd.put("ROLE_ID", parent_id);
|
||||
if("0".equals(parent_id)){
|
||||
pd.put("RIGHTS", ""); //菜单权限
|
||||
}else{
|
||||
String rights = corpRoleService.findById(pd).getString("RIGHTS");
|
||||
pd.put("RIGHTS", (null == rights)?"":rights); //组菜单权限
|
||||
}
|
||||
String RNUMBER = "R"+DateUtil.getDays()+Tools.getRandomNum();
|
||||
pd.put("RNUMBER", RNUMBER); //编码
|
||||
pd.put("ROLE_ID", this.get32UUID()); //主键
|
||||
pd.put("ADD_QX", "0"); //初始新增权限为否
|
||||
pd.put("DEL_QX", "0"); //删除权限
|
||||
pd.put("EDIT_QX", "0"); //修改权限
|
||||
pd.put("CHA_QX", "0"); //查看权限
|
||||
if ("".equals(pd.getString("LEVEL"))) {
|
||||
pd.put("LEVEL",0);
|
||||
}
|
||||
corpRoleService.add(pd);
|
||||
FHLOG.save(Jurisdiction.getUsername(), "新增角色"+pd.getString("ROLE_NAME")); //记录日志
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**请求编辑
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/toEdit")
|
||||
@ResponseBody
|
||||
public Object toEdit()throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd = corpRoleService.findById(pd);
|
||||
map.put("pd", pd);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**保存修改
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/edit")
|
||||
@ResponseBody
|
||||
public Object edit()throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
corpRoleService.edit(pd);
|
||||
FHLOG.save(Jurisdiction.getUsername(), "修改角色"+pd.getString("ROLE_NAME")); //记录日志
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**删除角色
|
||||
* @param ROLE_ID
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/delete")
|
||||
@ResponseBody
|
||||
public Object deleteRole(@RequestParam String ROLE_ID)throws Exception{
|
||||
Map<String,String> map = new HashMap<String,String>();
|
||||
PageData pd = new PageData();
|
||||
String errInfo = "success";
|
||||
pd.put("ROLE_ID", ROLE_ID);
|
||||
List<Role> roleList_z = corpRoleService.listAllRolesByPId(pd); //列出此角色的所有下级
|
||||
if("fhadminzhuche".equals(ROLE_ID)|| roleList_z.size() > 0){
|
||||
// errInfo = "false"; //下级有数据时or注册用户角色,删除失败
|
||||
errInfo = "fail";
|
||||
map.put("result", "errInfo");
|
||||
map.put("msg", "此组下有角色,不能删除!");
|
||||
return map;
|
||||
}else{
|
||||
List<PageData> userlist = corpUsersService.listAllUserByRoldId(pd); //此角色下的用户
|
||||
if(userlist.size() > 0){ //此角色已被使用就不能删除
|
||||
errInfo = "false2";
|
||||
}else{
|
||||
corpRoleService.deleteRoleById(ROLE_ID); //执行删除
|
||||
errInfo = "success";
|
||||
FHLOG.save(Jurisdiction.getUsername(), "删除角色ID为:"+ROLE_ID); //记录日志
|
||||
}
|
||||
}
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 显示菜单列表ztree(菜单授权菜单)
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value="/menuqx")
|
||||
@ResponseBody
|
||||
public Object listAllMenu(String ROLE_ID)throws Exception{
|
||||
Map<String,String> map = new HashMap<String,String>();
|
||||
String errInfo = "success";
|
||||
Role role = corpRoleService.getRoleById(ROLE_ID); //根据角色ID获取角色对象
|
||||
String roleRights = role.getRIGHTS(); //取出本角色菜单权限
|
||||
List<Menu> menuList = corpMenuService.listAllMenuQx("0"); //获取所有菜单
|
||||
menuList = this.readMenu(menuList, roleRights); //根据角色权限处理菜单权限状态(递归处理)
|
||||
JSONArray arr = JSONArray.fromObject(menuList);
|
||||
String json = arr.toString();
|
||||
json = json.replaceAll("MENU_ID", "id").replaceAll("PARENT_ID", "pId").replaceAll("MENU_NAME", "name").replaceAll("subMenu", "nodes").replaceAll("hasMenu", "checked");
|
||||
map.put("zTreeNodes", json);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**根据角色权限处理权限状态(递归处理)
|
||||
* @param menuList:传入的总菜单
|
||||
* @param roleRights:加密的权限字符串
|
||||
* @return
|
||||
*/
|
||||
public List<Menu> readMenu(List<Menu> menuList,String roleRights){
|
||||
for(int i=0;i<menuList.size();i++){
|
||||
menuList.get(i).setHasMenu(RightsHelper.testRights(roleRights, menuList.get(i).getMENU_ID()));
|
||||
this.readMenu(menuList.get(i).getSubMenu(), roleRights); //是:继续排查其子菜单
|
||||
}
|
||||
return menuList;
|
||||
}
|
||||
|
||||
/**保存角色菜单权限
|
||||
* @param ROLE_ID 角色ID
|
||||
* @param menuIds 菜单ID集合
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/saveMenuqx")
|
||||
@ResponseBody
|
||||
public Object saveMenuqx(@RequestParam String ROLE_ID,@RequestParam String menuIds)throws Exception{
|
||||
Map<String,String> map = new HashMap<String,String>();
|
||||
PageData pd = new PageData();
|
||||
if(null != menuIds && !"".equals(menuIds.trim())){
|
||||
BigInteger rights = RightsHelper.sumRights(Tools.str2StrArray(menuIds));//用菜单ID做权处理
|
||||
Role role = corpRoleService.getRoleById(ROLE_ID); //通过id获取角色对象
|
||||
role.setRIGHTS(rights.toString());
|
||||
corpRoleService.updateRoleRights(role); //更新当前角色菜单权限
|
||||
pd.put("rights",rights.toString());
|
||||
}else{
|
||||
Role role = new Role();
|
||||
role.setRIGHTS("");
|
||||
role.setROLE_ID(ROLE_ID);
|
||||
corpRoleService.updateRoleRights(role); //更新当前角色菜单权限(没有任何勾选)
|
||||
pd.put("rights","");
|
||||
}
|
||||
pd.put("ROLE_ID", ROLE_ID);
|
||||
if(!"1".equals(ROLE_ID)){ //当修改admin权限时,不修改其它角色权限
|
||||
corpRoleService.setAllRights(pd); //更新此角色所有子角色的菜单权限
|
||||
}
|
||||
map.put("result", "success");
|
||||
FHLOG.save(Jurisdiction.getUsername(), "给角色ID:"+ROLE_ID+" 授权了菜单权限操作"); //记录日志
|
||||
return map;
|
||||
}
|
||||
|
||||
/**请求角色按钮授权页面(增删改查)
|
||||
* @param ROLE_ID: 角色ID
|
||||
* @param msg: 区分增删改查
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/b4Button")
|
||||
@ResponseBody
|
||||
public Object b4Button(@RequestParam String ROLE_ID,@RequestParam String msg)throws Exception{
|
||||
Map<String,String> map = new HashMap<String,String>();
|
||||
List<Menu> menuList = corpMenuService.listAllMenuQx("0"); //获取所有菜单
|
||||
Role role = corpRoleService.getRoleById(ROLE_ID); //根据角色ID获取角色对象
|
||||
String roleRights = "";
|
||||
if("add_qx".equals(msg)){
|
||||
roleRights = role.getADD_QX(); //新增权限
|
||||
}else if("del_qx".equals(msg)){
|
||||
roleRights = role.getDEL_QX(); //删除权限
|
||||
}else if("edit_qx".equals(msg)){
|
||||
roleRights = role.getEDIT_QX(); //修改权限
|
||||
}else if("cha_qx".equals(msg)){
|
||||
roleRights = role.getCHA_QX(); //查看权限
|
||||
}
|
||||
menuList = this.readMenu(menuList, roleRights); //根据角色权限处理菜单权限状态(递归处理)
|
||||
JSONArray arr = JSONArray.fromObject(menuList);
|
||||
String json = arr.toString();
|
||||
json = json.replaceAll("MENU_ID", "id").replaceAll("PARENT_ID", "pId").replaceAll("MENU_NAME", "name").replaceAll("subMenu", "nodes").replaceAll("hasMenu", "checked");
|
||||
map.put("zTreeNodes", json);
|
||||
map.put("result", "success");
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存角色按钮权限
|
||||
* @param ROLE_ID
|
||||
* @param menuIds
|
||||
* @param msg
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/saveB4Button")
|
||||
@ResponseBody
|
||||
public Object saveB4Button(@RequestParam String ROLE_ID,@RequestParam String menuIds,@RequestParam String msg)throws Exception{
|
||||
Map<String,String> map = new HashMap<String,String>();
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
if(null != menuIds && !"".equals(menuIds.trim())){
|
||||
BigInteger rights = RightsHelper.sumRights(Tools.str2StrArray(menuIds));
|
||||
pd.put("value",rights.toString());
|
||||
}else{
|
||||
pd.put("value","");
|
||||
}
|
||||
pd.put("ROLE_ID", ROLE_ID);
|
||||
corpRoleService.saveB4Button(msg,pd);
|
||||
map.put("result", "success");
|
||||
FHLOG.save(Jurisdiction.getUsername(), "给角色ID:"+ROLE_ID+" 授权了增删改查按钮权限操作"); //记录日志
|
||||
return map;
|
||||
}
|
||||
|
||||
/** 选择角色(弹窗选择用)
|
||||
* @param
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/roleListWindow")
|
||||
@ResponseBody
|
||||
public Object roleListWindow(Page page)throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
String KEYWORDS = pd.getString("KEYWORDS"); //关键词检索条件
|
||||
if(Tools.notEmpty(KEYWORDS))pd.put("KEYWORDS", KEYWORDS.trim());
|
||||
page.setPd(pd);
|
||||
List<PageData> roleList = corpRoleService.roleListWindow(page); //列出所有角色
|
||||
map.put("roleList", roleList);
|
||||
map.put("page", page);
|
||||
map.put("result", "success");
|
||||
return map;
|
||||
}
|
||||
|
||||
/**根据名称查询角色
|
||||
* @param ROLE_ID
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/findByName")
|
||||
@ResponseBody
|
||||
public Object findByName()throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
// pd = corpRoleService.findByName(pd);///
|
||||
map.put("pd", pd);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
@RequestMapping(value="/b4ButtonV2")
|
||||
@ResponseBody
|
||||
public Object b4ButtonV2(@RequestParam String ROLE_ID,@RequestParam String msg)throws Exception{
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
String pid =pd.getString("PARENT_ID");
|
||||
Map<String,String> map = new HashMap<String,String>();
|
||||
String errInfo = "success";
|
||||
Role role = corpRoleService.getRoleById(ROLE_ID); //根据角色ID获取角色对象
|
||||
String roleRights = "";
|
||||
if("add_qx".equals(msg)){
|
||||
roleRights = role.getADD_QX(); //新增权限
|
||||
}else if("del_qx".equals(msg)){
|
||||
roleRights = role.getDEL_QX(); //删除权限
|
||||
}else if("edit_qx".equals(msg)){
|
||||
roleRights = role.getEDIT_QX(); //修改权限
|
||||
}else if("cha_qx".equals(msg)){
|
||||
roleRights = role.getCHA_QX(); //查看权限
|
||||
}
|
||||
List<Menu> menuListAll = corpMenuService.listSubMenuAll();
|
||||
Map<String,List<Menu>> menuAllMap = new HashMap<>();
|
||||
for (int i=0;i<menuListAll.size();i++){
|
||||
List<Menu> menuListValue = new ArrayList<>();
|
||||
Menu menu = menuListAll.get(i);
|
||||
if(menuAllMap.containsKey(menu.getPARENT_ID())){
|
||||
menuListValue = menuAllMap.get(menu.getPARENT_ID());
|
||||
}
|
||||
menuListValue.add(menu);
|
||||
menuAllMap.put(menu.getPARENT_ID(),menuListValue);
|
||||
}
|
||||
List<Menu> menuList = this.listAllMenuDigui("0",menuAllMap,roleRights); //获取所有菜单
|
||||
menuList = this.readMenu(menuList, roleRights); //根据角色权限处理菜单权限状态(递归处理)
|
||||
JSONArray arr = JSONArray.fromObject(menuList);
|
||||
String json = arr.toString();
|
||||
json = json.replaceAll("MENU_ID", "id")
|
||||
.replaceAll("PARENT_ID", "pId")
|
||||
.replaceAll("MENU_NAME", "name")
|
||||
.replaceAll("subMenu", "nodes")
|
||||
.replaceAll("hasMenu", "checked");
|
||||
map.put("zTreeNodes", json);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
|
||||
}
|
||||
/**
|
||||
* 显示菜单列表ztree(菜单授权菜单)
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value="/listAllMenuV2")
|
||||
@ResponseBody
|
||||
public Object listAllMenuByParentID(String ROLE_ID)throws Exception{
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
String pid =pd.getString("PARENT_ID");
|
||||
Map<String,String> map = new HashMap<String,String>();
|
||||
String errInfo = "success";
|
||||
Role role = corpRoleService.getRoleById(ROLE_ID); //根据角色ID获取角色对象
|
||||
String roleRights = role.getRIGHTS(); //取出本角色菜单权限
|
||||
List<Menu> menuListAll = corpMenuService.listSubMenuAll();
|
||||
Map<String,List<Menu>> menuAllMap = new HashMap<>();
|
||||
for (int i=0;i<menuListAll.size();i++){
|
||||
List<Menu> menuListValue = new ArrayList<>();
|
||||
Menu menu = menuListAll.get(i);
|
||||
if(menuAllMap.containsKey(menu.getPARENT_ID())){
|
||||
menuListValue = menuAllMap.get(menu.getPARENT_ID());
|
||||
}
|
||||
menuListValue.add(menu);
|
||||
menuAllMap.put(menu.getPARENT_ID(),menuListValue);
|
||||
}
|
||||
List<Menu> menuList = this.listAllMenuDigui("0",menuAllMap,roleRights); //获取所有菜单
|
||||
menuList = this.readMenu(menuList, roleRights); //根据角色权限处理菜单权限状态(递归处理)
|
||||
JSONArray arr = JSONArray.fromObject(menuList);
|
||||
String json = arr.toString();
|
||||
json = json.replaceAll("MENU_ID", "id")
|
||||
.replaceAll("PARENT_ID", "pId")
|
||||
.replaceAll("MENU_NAME", "name")
|
||||
.replaceAll("subMenu", "nodes")
|
||||
.replaceAll("hasMenu", "checked");
|
||||
map.put("zTreeNodes", json);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param MENU_ID
|
||||
* @param menuAllList key pid val Pid 下面的list
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<Menu> listAllMenuDigui(String MENU_ID,Map<String,List<Menu>> menuAllList,String roleRights) throws Exception {
|
||||
List<Menu> menuList = this.listSubMenuByParentId(MENU_ID,menuAllList); //更具pid 获取数据
|
||||
for(Menu menu : menuList){
|
||||
menu.setMENU_URL("menu_edit.html?MENU_ID="+menu.getMENU_ID());
|
||||
menu.setSubMenu(this.listAllMenuDigui(menu.getMENU_ID(),menuAllList,roleRights));
|
||||
menu.setTarget("treeFrame");
|
||||
menu.setHasMenu(RightsHelper.testRights(roleRights, menu.getMENU_ID()));
|
||||
}
|
||||
return menuList;
|
||||
}
|
||||
public List<Menu> listSubMenuByParentId (String MENU_ID,Map<String,List<Menu>> menuAllList){ //更具pid 获取数据
|
||||
List<Menu> menuList = new ArrayList<>();
|
||||
if(menuAllList.containsKey(MENU_ID)){
|
||||
menuList = menuAllList.get(MENU_ID);
|
||||
}
|
||||
return menuList;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,725 @@
|
|||
package com.zcloud.controller.corpsystem;
|
||||
|
||||
import com.zcloud.controller.base.BaseController;
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.entity.system.Department;
|
||||
import com.zcloud.entity.system.Role;
|
||||
import com.zcloud.service.system.DepartmentService;
|
||||
import com.zcloud.service.system.FHlogService;
|
||||
import com.zcloud.service.system.RoleService;
|
||||
import com.zcloud.service.system.UeditorService;
|
||||
import com.zcloud.service.system.corpsystem.CorpUsersService;
|
||||
import com.zcloud.util.*;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
import org.apache.shiro.authc.*;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.apache.shiro.crypto.hash.SimpleHash;
|
||||
import org.apache.shiro.session.Session;
|
||||
import org.apache.shiro.subject.Subject;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 说明:系统用户处理类
|
||||
* 作者:luoxiaobao
|
||||
* 官网:www.qdkjchina.com
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/corpUser")
|
||||
public class CorpUsersController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private CorpUsersService corpUsersService;
|
||||
@Autowired
|
||||
private RoleService roleService;
|
||||
@Autowired
|
||||
private UeditorService ueditorService;
|
||||
@Autowired
|
||||
private FHlogService FHLOG;
|
||||
@Autowired
|
||||
private DepartmentService departmentService;
|
||||
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/listAll")
|
||||
@ResponseBody
|
||||
public Object listAll() throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
List<PageData> userList = corpUsersService.listAllUser(pd); //列出Post列表
|
||||
map.put("userList", userList);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**用户列表
|
||||
* @param page
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping("/list")
|
||||
@ResponseBody
|
||||
public Object listUsers(Page page)throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
|
||||
/*检索条件*/
|
||||
String ROLE_ID = pd.getString("ROLE_ID"); //角色ID
|
||||
String KEYWORDS = pd.getString("KEYWORDS"); //关键词检索条件
|
||||
if(Tools.notEmpty(KEYWORDS))pd.put("KEYWORDS", KEYWORDS.trim());
|
||||
String STRARTTIME = pd.getString("STRARTTIME"); //开始时间
|
||||
String ENDTIME = pd.getString("ENDTIME"); //结束时间
|
||||
if(Tools.notEmpty(STRARTTIME))pd.put("STRARTTIME", STRARTTIME+" 00:00:00");
|
||||
if(Tools.notEmpty(ENDTIME))pd.put("ENDTIME", ENDTIME+" 00:00:00");
|
||||
if(!"admin".equals(Jurisdiction.getUsername())) {
|
||||
Session session = Jurisdiction.getSession();
|
||||
PageData dept = (PageData)session.getAttribute(Const.SESSION_DEPT);
|
||||
if(Tools.isEmpty(pd.get("PROVINCE")) && Tools.isEmpty(pd.get("CITY")) && Tools.isEmpty(pd.get("COUNTRY")) && Tools.isEmpty(pd.get("VILLAGE")) ){
|
||||
if (!"000000".equals(dept.getString("PROVINCE"))){
|
||||
pd.put("PROVINCE", dept.get("PROVINCE"));
|
||||
}
|
||||
pd.put("CITY", dept.get("CITY"));
|
||||
pd.put("COUNTRY", dept.get("COUNTRY"));
|
||||
pd.put("VILLAGE", dept.get("VILLAGE"));
|
||||
}
|
||||
}
|
||||
page.setPd(pd);
|
||||
List<PageData> userList = corpUsersService.userlistPage(page); //列出用户列表
|
||||
pd.put("ROLE_ID", "1");
|
||||
List<Role> roleList = roleService.listAllRolesByPId(pd); //列出所有系统用户角色
|
||||
|
||||
map.put("userList", userList);
|
||||
map.put("roleList", roleList);
|
||||
map.put("ROLE_ID", ROLE_ID);
|
||||
map.put("page", page);
|
||||
map.put("pd", pd);
|
||||
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**去新增用户页面
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/goAddUser")
|
||||
@ResponseBody
|
||||
public Object goAddUser()throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd.put("ROLE_ID", "1");
|
||||
List<Role> roleList = roleService.listAllRolesByPId(pd); //列出所有系统用户角色
|
||||
map.put("roleList", roleList);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**去修改用户页面(从系统用户页面修改)
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/goEditUser")
|
||||
@ResponseBody
|
||||
public Object goEditUser() throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
if("1".equals(pd.getString("USER_ID"))){return null;} //不能修改admin用户
|
||||
pd.put("ROLE_ID", "1");
|
||||
List<Role> roleList = roleService.listAllRolesByPId(pd); //列出所有系统用户角色
|
||||
List<Department> departmentList=departmentService.listAllDepartment("c14c41b8058b421ba6b988c2c3bd3139");
|
||||
pd = corpUsersService.findById(pd); //根据ID读取
|
||||
String ROLE_IDS = pd.getString("ROLE_IDS"); //副职角色ID
|
||||
if(Tools.notEmpty(ROLE_IDS)){
|
||||
String arryROLE_ID[] = ROLE_IDS.split(",");
|
||||
for(int i=0;i<roleList.size();i++){
|
||||
Role role = roleList.get(i);
|
||||
String roleId = role.getROLE_ID();
|
||||
for(int n=0;n<arryROLE_ID.length;n++){
|
||||
if(arryROLE_ID[n].equals(roleId)){
|
||||
role.setRIGHTS("1"); //此时的目的是为了修改用户信息上,能看到副职角色都有哪些
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
map.put("pd", pd);
|
||||
map.put("roleList", roleList);
|
||||
map.put("departmentList", departmentList);
|
||||
PageData pd2 = new PageData();
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**去修改用户页面(个人资料修改)
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/goEditMyInfo")
|
||||
@ResponseBody
|
||||
public Object goEditMyInfo() throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd.put("ROLE_ID", "1");
|
||||
List<Role> roleList = roleService.listAllRolesByPId(pd); //列出所有系统用户角色
|
||||
pd.put("USERNAME", Jurisdiction.getUsername());
|
||||
pd = corpUsersService.findByUsername(pd); //根据用户名读取
|
||||
map.put("pd", pd);
|
||||
map.put("roleList", roleList);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改用户(系统用户列表修改)
|
||||
*/
|
||||
@RequestMapping(value="/editUser")
|
||||
@ResponseBody
|
||||
public Object editUser() throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
FHLOG.save(Jurisdiction.getUsername(), "从系统用户中修改"+pd.getString("USERNAME")+"的资料"); //记录日志
|
||||
if(!Jurisdiction.getUsername().equals(pd.getString("USERNAME"))){ //如果当前登录用户修改用户资料提交的用户名非本人
|
||||
if("admin".equals(pd.getString("USERNAME")) && !"admin".equals(Jurisdiction.getUsername())){return null;} //非admin用户不能修改admin
|
||||
}else{ //如果当前登录用户修改用户资料提交的用户名是本人,则不能修改本人的角色ID
|
||||
PageData upd = new PageData();
|
||||
upd = corpUsersService.findByUsername(pd);
|
||||
pd.put("ROLE_ID", upd.getString("ROLE_ID")); //对角色ID还原本人角色ID
|
||||
pd.put("ROLE_IDS", Tools.notEmpty(upd.getString("ROLE_IDS"))?upd.get("ROLE_IDS"):""); //对角色ID还原本人副职角色ID
|
||||
}
|
||||
if(pd.getString("PASSWORD") != null && !"".equals(pd.getString("PASSWORD"))){
|
||||
pd.put("PASSWORD", new SimpleHash("SHA-1", pd.getString("USERNAME"), pd.getString("PASSWORD")).toString());
|
||||
}
|
||||
corpUsersService.editUser(pd); //执行修改
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改用户(系统用户列表修改)
|
||||
*/
|
||||
@RequestMapping(value="/editUserFuns")
|
||||
@ResponseBody
|
||||
public Object editUserFuns() throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
FHLOG.save(Jurisdiction.getUsername(), "从系统用户中修改"+pd.getString("USERNAME")+"的小程序菜单权限"); //记录日志
|
||||
corpUsersService.editUserFuns(pd); //执行修改
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改用户(个人资料修改)
|
||||
*/
|
||||
@RequestMapping(value="/editUserOwn")
|
||||
@ResponseBody
|
||||
public Object editUserOwn() throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
if(!Jurisdiction.getUsername().equals(pd.getString("USERNAME"))){ //如果当前登录用户修改用户资料提交的用户名非本人
|
||||
FHLOG.save(Jurisdiction.getUsername(), "恶意修改用户资料:"+pd.getString("USERNAME"));
|
||||
return null;//不能修改非本人的资料
|
||||
}else{ //如果当前登录用户修改用户资料提交的用户名是本人,则不能修改本人的角色ID
|
||||
PageData upd = new PageData();
|
||||
upd = corpUsersService.findByUsername(pd);
|
||||
pd.put("USER_ID", upd.getString("USER_ID")); //对ID还原本人ID,防止串改
|
||||
pd.put("ROLE_ID", upd.getString("ROLE_ID")); //对角色ID还原本人角色ID
|
||||
pd.put("ROLE_IDS", Tools.notEmpty(upd.getString("ROLE_IDS"))?upd.get("ROLE_IDS"):""); //对角色ID还原本人副职角色ID
|
||||
}
|
||||
if(pd.getString("PASSWORD") != null && !"".equals(pd.getString("PASSWORD"))){
|
||||
pd.put("PASSWORD", new SimpleHash("SHA-1", pd.getString("USERNAME"), pd.getString("PASSWORD")).toString());
|
||||
}
|
||||
corpUsersService.editUser(pd); //执行修改
|
||||
FHLOG.save(Jurisdiction.getUsername(), "从个人资料中修改"+pd.getString("USERNAME")+"的资料"); //记录日志
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改用户密码()
|
||||
*/
|
||||
@RequestMapping(value="/editUserPwd")
|
||||
@ResponseBody
|
||||
public Object editUserPwd() throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
String userName = Jurisdiction.getUsername();
|
||||
String userOldPwd = pd.getString("password");
|
||||
UsernamePasswordToken token = new UsernamePasswordToken(userName, new SimpleHash("SHA-1", userName, userOldPwd).toString());
|
||||
|
||||
Subject subject = SecurityUtils.getSubject();
|
||||
try {
|
||||
subject.login(token); //这一步在调用login(token)方法时,它会走到MyRealm.doGetAuthenticationInfo()方法中
|
||||
}catch(UnknownAccountException uae){
|
||||
errInfo = "usererror";
|
||||
}catch(IncorrectCredentialsException ice){
|
||||
errInfo = "usererror";
|
||||
}catch(LockedAccountException lae){
|
||||
errInfo = "usererror";
|
||||
}catch(ExcessiveAttemptsException eae){
|
||||
errInfo = "usererror4";
|
||||
}catch (DisabledAccountException sae){
|
||||
errInfo = "usererror";
|
||||
}catch(AuthenticationException ae){
|
||||
errInfo = "usererror";
|
||||
}
|
||||
|
||||
if("success".equals(errInfo)) {
|
||||
if(subject.isAuthenticated()){ //密码验证成功
|
||||
String newPwd =new SimpleHash("SHA-1",userName, pd.getString("newpwd")).toString();//加密新密码
|
||||
PageData updateUserPd = new PageData();
|
||||
updateUserPd.put("USER_ID", Jurisdiction.getUSER_ID());
|
||||
updateUserPd.put("PASSWORD", newPwd);
|
||||
corpUsersService.editPassword(updateUserPd);
|
||||
FHLOG.save(userName, "从app修改密码中修改"+userName+"的密码"); //记录日志
|
||||
}else {
|
||||
token.clear();
|
||||
errInfo = "usererror";
|
||||
}
|
||||
}else {
|
||||
errInfo="error";
|
||||
map.put("result", errInfo);
|
||||
map.put("msg", "用户密码错误");
|
||||
return map;
|
||||
}
|
||||
/**
|
||||
* 1.验证原始密码是否正确
|
||||
* 2.密码加密
|
||||
* 3.修改数据库
|
||||
* 4.增加日志
|
||||
*/
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/resetPwd")
|
||||
@ResponseBody
|
||||
public Object resetPwd (Page page) throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
PageData pageData = corpUsersService.findById(pd);
|
||||
//corpInfo
|
||||
String pwd = new SimpleHash("SHA-1", pageData.getString("USERNAME"), "Aa@123456789").toString();
|
||||
PageData updateUser = new PageData();
|
||||
updateUser.put("PASSWORD", pwd);
|
||||
updateUser.put("USER_ID", pageData.getString("USER_ID"));
|
||||
corpUsersService.editPassword(updateUser);
|
||||
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**判断用户名是否存在
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value="/hasUser")
|
||||
@ResponseBody
|
||||
public Object hasUser() throws Exception{
|
||||
Map<String,String> map = new HashMap<String,String>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
if(corpUsersService.findByUsername(pd) != null){
|
||||
errInfo = "fail";
|
||||
}
|
||||
map.put("result", errInfo); //返回结果
|
||||
return map;
|
||||
}
|
||||
|
||||
/**判断邮箱是否存在
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value="/hasEmail")
|
||||
@ResponseBody
|
||||
public Object hasEmail() throws Exception{
|
||||
Map<String,String> map = new HashMap<String,String>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
if(corpUsersService.findByEmail(pd) != null){
|
||||
errInfo = "error";
|
||||
}
|
||||
map.put("result", errInfo); //返回结果
|
||||
return map;
|
||||
}
|
||||
|
||||
/**判断编码是否存在
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value="/hasNumber")
|
||||
@ResponseBody
|
||||
public Object hasNumber() throws Exception{
|
||||
Map<String,String> map = new HashMap<String,String>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
if(corpUsersService.findByNumbe(pd) != null){
|
||||
errInfo = "error";
|
||||
}
|
||||
map.put("result", errInfo); //返回结果
|
||||
return map;
|
||||
}
|
||||
|
||||
/**保存用户
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/saveUser")
|
||||
@ResponseBody
|
||||
public Object saveUser() throws Exception{
|
||||
Map<String,String> map = new HashMap<String,String>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd.put("USER_ID", this.get32UUID()); //ID 主键
|
||||
pd.put("LAST_LOGIN", ""); //最后登录时间
|
||||
pd.put("IP", ""); //IP
|
||||
pd.put("STATUS", "0"); //状态
|
||||
pd.put("SKIN", "pcoded-navbar navbar-image-3,navbar pcoded-header navbar-expand-lg navbar-light header-dark,"); //用户默认皮肤
|
||||
String userPwd = Tools.isEmpty(pd.get("PASSWORD"))?"Aa@123456789" : pd.getString("PASSWORD");
|
||||
pd.put("PASSWORD", new SimpleHash("SHA-1", pd.getString("USERNAME"), userPwd).toString()); //密码加密
|
||||
String[] userRole = pd.getString("roleIDs").split(";"); //处理多角色的用户
|
||||
pd.put("ROLE_ID",userRole[0]);
|
||||
pd.put("PASSWORD",pd.getString("userPASSWORD"));
|
||||
if(userRole.length>1){
|
||||
String ROLE_IDS =pd.getString("roleIDs").replaceAll(";",",").replaceAll(userRole[0]+',' ,"");
|
||||
pd.put("ROLE_IDS",ROLE_IDS);
|
||||
}
|
||||
if(null == corpUsersService.findByUsername(pd)){ //判断用户名是否存在
|
||||
corpUsersService.saveUser(pd); //执行保存
|
||||
}else{
|
||||
map.put("result","failed");
|
||||
}
|
||||
FHLOG.save(Jurisdiction.getUsername(), "新增用户:"+pd.getString("USERNAME")); //记录日志
|
||||
map.put("result", errInfo); //返回结果
|
||||
return map;
|
||||
}
|
||||
|
||||
/**删除用户
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value="/deleteUser")
|
||||
@ResponseBody
|
||||
public Object deleteUser() throws Exception{
|
||||
Map<String,String> map = new HashMap<String,String>();
|
||||
PageData pd = new PageData();
|
||||
String errInfo = "success";
|
||||
pd = this.getPageData();
|
||||
FHLOG.save(Jurisdiction.getUsername(), "删除用户ID:"+pd.getString("USER_ID")); //记录日志
|
||||
corpUsersService.deleteUser(pd); //删除用户
|
||||
ueditorService.delete(pd); //删除副文本关联数据
|
||||
map.put("result", errInfo); //返回结果
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/deleteAllUser")
|
||||
@ResponseBody
|
||||
public Object deleteAllUser() throws Exception{
|
||||
PageData pd = new PageData();
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
pd = this.getPageData();
|
||||
String USER_IDS = pd.getString("USER_IDS");
|
||||
String errInfo = "success";
|
||||
if(Tools.notEmpty(USER_IDS)){
|
||||
String ArrayUSER_IDS[] = USER_IDS.split(",");
|
||||
FHLOG.save(Jurisdiction.getUsername(), "批量删除用户"); //记录日志
|
||||
corpUsersService.deleteAllUser(ArrayUSER_IDS); //删除用户
|
||||
ueditorService.deleteAll(ArrayUSER_IDS); //删除副文本关联数据
|
||||
errInfo = "success";
|
||||
}else{
|
||||
errInfo = "error";
|
||||
}
|
||||
map.put("result", errInfo); //返回结果
|
||||
return map;
|
||||
}
|
||||
|
||||
/**导出用户信息到EXCEL
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/excel")
|
||||
public ModelAndView exportExcel() throws Exception{
|
||||
ModelAndView mv = new ModelAndView();
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
try{
|
||||
|
||||
/*检索条件*/
|
||||
String KEYWORDS = pd.getString("KEYWORDS"); //关键词检索条件
|
||||
if(Tools.notEmpty(KEYWORDS))pd.put("KEYWORDS", KEYWORDS.trim());
|
||||
String STRARTTIME = pd.getString("STRARTTIME"); //开始时间
|
||||
String ENDTIME = pd.getString("ENDTIME"); //结束时间
|
||||
if(Tools.notEmpty(STRARTTIME))pd.put("STRARTTIME", STRARTTIME+" 00:00:00");
|
||||
if(Tools.notEmpty(ENDTIME))pd.put("ENDTIME", ENDTIME+" 00:00:00");
|
||||
|
||||
Map<String,Object> dataMap = new HashMap<String,Object>();
|
||||
List<String> titles = new ArrayList<String>();
|
||||
titles.add("用户名"); //1
|
||||
titles.add("编号"); //2
|
||||
titles.add("姓名"); //3
|
||||
titles.add("职位"); //4
|
||||
titles.add("手机"); //5
|
||||
titles.add("邮箱"); //6
|
||||
titles.add("最近登录"); //7
|
||||
titles.add("上次登录IP"); //8
|
||||
dataMap.put("titles", titles);
|
||||
List<PageData> userList = corpUsersService.listAllUser(pd);
|
||||
List<PageData> varList = new ArrayList<PageData>();
|
||||
for(int i=0;i<userList.size();i++){
|
||||
PageData vpd = new PageData();
|
||||
vpd.put("var1", userList.get(i).getString("USERNAME")); //1
|
||||
vpd.put("var2", userList.get(i).getString("NUMBER")); //2
|
||||
vpd.put("var3", userList.get(i).getString("NAME")); //3
|
||||
vpd.put("var4", userList.get(i).getString("ROLE_NAME")); //4
|
||||
vpd.put("var5", userList.get(i).getString("PHONE")); //5
|
||||
vpd.put("var6", userList.get(i).getString("EMAIL")); //6
|
||||
vpd.put("var7", userList.get(i).getString("LAST_LOGIN")); //7
|
||||
vpd.put("var8", userList.get(i).getString("IP")); //8
|
||||
varList.add(vpd);
|
||||
}
|
||||
dataMap.put("varList", varList);
|
||||
ObjectExcelView erv = new ObjectExcelView(); //执行excel操作
|
||||
mv = new ModelAndView(erv,dataMap);
|
||||
} catch(Exception e){
|
||||
}
|
||||
return mv;
|
||||
}
|
||||
|
||||
/**下载模版
|
||||
* @param response
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/downExcel")
|
||||
public void downExcel(HttpServletResponse response)throws Exception{
|
||||
FileDownload.fileDownload(response, PathUtil.getProjectpath() + Const.FILEPATHFILE + "Users.xls", "Users.xls");
|
||||
}
|
||||
|
||||
/**从EXCEL导入到数据库
|
||||
* @param file
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/readExcel")
|
||||
@SuppressWarnings("unchecked")
|
||||
@ResponseBody
|
||||
public Object readExcel(@RequestParam(value="excel",required=false) MultipartFile file) throws Exception{
|
||||
Map<String,String> map = new HashMap<String,String>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
if (null != file && !file.isEmpty()) {
|
||||
String suffixName = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")+1).toLowerCase();
|
||||
if (!"xls".equals(suffixName)) {
|
||||
map.put("result", "fail");
|
||||
map.put("exception", "上传文件格式不正确");
|
||||
return map;
|
||||
}
|
||||
String filePath = PathUtil.getProjectpath() + Const.FILEPATHFILE; //文件上传路径
|
||||
String fileName = FileUpload.fileUp(file, filePath, "userexcel"); //执行上传
|
||||
List<PageData> listPd = (List)ObjectExcelRead.readExcel(filePath, fileName, 2, 0, 0); //执行读EXCEL操作,读出的数据导入List 2:从第3行开始;0:从第A列开始;0:第0个sheet
|
||||
pd.put("LAST_LOGIN", ""); //最后登录时间
|
||||
pd.put("IP", ""); //IP
|
||||
pd.put("STATUS", "0"); //状态
|
||||
pd.put("SKIN", "pcoded-navbar navbar-image-3,navbar pcoded-header navbar-expand-lg navbar-light header-dark,"); //默认皮肤
|
||||
pd.put("ROLE_ID", "fhadminzhuche"); //默认角色注册用户
|
||||
pd.put("ROLE_IDS", ""); //副职角色
|
||||
/**
|
||||
* var0 :编号
|
||||
* var1 :姓名
|
||||
* var2 :手机
|
||||
* var3 :邮箱
|
||||
* var4 :备注
|
||||
*/
|
||||
for(int i=0;i<listPd.size();i++){
|
||||
pd.put("USER_ID", this.get32UUID()); //ID
|
||||
pd.put("NAME", listPd.get(i).getString("var1")); //姓名
|
||||
String USERNAME = GetPinyin.getPingYin(listPd.get(i).getString("var1")); //根据姓名汉字生成全拼
|
||||
pd.put("USERNAME", USERNAME);
|
||||
if(corpUsersService.findByUsername(pd) != null){ //判断用户名是否重复
|
||||
USERNAME = GetPinyin.getPingYin(listPd.get(i).getString("var1"))+Tools.getRandomNum();
|
||||
pd.put("USERNAME", USERNAME);
|
||||
}
|
||||
pd.put("BZ", listPd.get(i).getString("var4")); //备注
|
||||
if(Tools.checkEmail(listPd.get(i).getString("var3"))){ //邮箱格式不对就跳过
|
||||
pd.put("EMAIL", listPd.get(i).getString("var3"));
|
||||
if(corpUsersService.findByEmail(pd) != null){ //邮箱已存在就跳过
|
||||
continue;
|
||||
}
|
||||
}else{
|
||||
continue;
|
||||
}
|
||||
pd.put("NUMBER", listPd.get(i).getString("var0")); //编号已存在就跳过
|
||||
pd.put("PHONE", listPd.get(i).getString("var2")); //手机号
|
||||
|
||||
pd.put("PASSWORD", new SimpleHash("SHA-1", USERNAME, Const.DEFAULT_PASSWORD).toString()); //默认密码123
|
||||
if(corpUsersService.findByNumbe(pd) != null){
|
||||
continue;
|
||||
}
|
||||
corpUsersService.saveUser(pd);
|
||||
}
|
||||
}
|
||||
map.put("result", errInfo); //返回结果
|
||||
return map;
|
||||
}
|
||||
|
||||
/**去修改用户页面(在线管理页面打开)
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/goEditUfromOnline")
|
||||
@ResponseBody
|
||||
public Object goEditUfromOnline() throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
if("admin".equals(pd.getString("USERNAME"))){return null;} //不能查看admin用户
|
||||
pd.put("ROLE_ID", "1");
|
||||
List<Role> roleList = roleService.listAllRolesByPId(pd); //列出所有系统用户角色
|
||||
map.put("fx", "user");
|
||||
pd = corpUsersService.findByUsername(pd); //根据ID读取
|
||||
String ROLE_IDS = pd.getString("ROLE_IDS"); //副职角色ID
|
||||
if(Tools.notEmpty(ROLE_IDS)){
|
||||
String arryROLE_ID[] = ROLE_IDS.split(",");
|
||||
for(int i=0;i<roleList.size();i++){
|
||||
Role role = roleList.get(i);
|
||||
String roleId = role.getROLE_ID();
|
||||
for(int n=0;n<arryROLE_ID.length;n++){
|
||||
if(arryROLE_ID[n].equals(roleId)){
|
||||
role.setRIGHTS("1"); //此时的目的是为了修改用户信息上,能看到副职角色都有哪些
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
map.put("pd", pd);
|
||||
map.put("roleList", roleList);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**查看用户
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/view")
|
||||
@ResponseBody
|
||||
public Object view() throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
String USERNAME = pd.getString("USERNAME");
|
||||
if("admin".equals(USERNAME)){return null;} //不能查看admin用户
|
||||
pd.put("ROLE_ID", "1");
|
||||
List<Role> roleList = roleService.listAllRolesByPId(pd); //列出所有系统用户角色
|
||||
pd = corpUsersService.findByUsername(pd); //根据ID读取
|
||||
map.put("msg", "1");
|
||||
if(null == pd){
|
||||
PageData rpd = new PageData();
|
||||
rpd.put("RNUMBER", USERNAME); //用户名查不到数据时就把数据当作角色的编码去查询角色表
|
||||
rpd = roleService.getRoleByRnumber(rpd);
|
||||
map.put("rpd", rpd);
|
||||
map.put("msg", "2");
|
||||
}
|
||||
map.put("pd", pd);
|
||||
map.put("roleList", roleList);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**显示用户列表(弹窗选择用)
|
||||
* @param page
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/listUsersForWindow")
|
||||
@ResponseBody
|
||||
public Object listUsersForWindow(Page page)throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
String KEYWORDS = pd.getString("KEYWORDS"); //关键词检索条件
|
||||
if(Tools.notEmpty(KEYWORDS))pd.put("KEYWORDS", KEYWORDS.trim());
|
||||
String STRARTTIME = pd.getString("STRARTTIME"); //开始时间
|
||||
String ENDTIME = pd.getString("ENDTIME"); //结束时间
|
||||
if(Tools.notEmpty(STRARTTIME))pd.put("STRARTTIME", STRARTTIME+" 00:00:00");
|
||||
if(Tools.notEmpty(ENDTIME))pd.put("ENDTIME", ENDTIME+" 00:00:00");
|
||||
page.setPd(pd);
|
||||
List<PageData> userList = corpUsersService.listUsersBystaff(page); //列出用户列表(弹窗选择用)
|
||||
pd.put("ROLE_ID", "1");
|
||||
List<Role> roleList = roleService.listAllRolesByPId(pd); //列出所有系统用户角色
|
||||
map.put("userList", userList);
|
||||
map.put("roleList", roleList);
|
||||
map.put("page", page);
|
||||
map.put("pd", pd);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
/**修改用户状态 STATUS
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value="/updateUserStatus")
|
||||
@ResponseBody
|
||||
public Object updateUserStatus() throws Exception{
|
||||
Map<String,String> map = new HashMap<String,String>();
|
||||
PageData pd = new PageData();
|
||||
String errInfo = "success";
|
||||
pd = this.getPageData();
|
||||
pd.put("STATUS",pd.getString("status"));
|
||||
corpUsersService.updateUserStatus(pd);
|
||||
FHLOG.save(Jurisdiction.getUsername(), "修改用户状态ID:"+pd.getString("USER_ID")); //记录日志
|
||||
map.put("result", errInfo); //返回结果
|
||||
return map;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,230 @@
|
|||
package com.zcloud.controller.xgf;
|
||||
|
||||
import com.zcloud.controller.base.BaseController;
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.service.xgf.TrainUsersService;
|
||||
import com.zcloud.util.ObjectExcelView;
|
||||
import com.zcloud.util.Tools;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 说明:原来: 现在入场告知培训
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2023-09-27
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/trainusers")
|
||||
public class TrainUsersController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private TrainUsersService trainusersService;
|
||||
|
||||
/**新增
|
||||
* @param
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/add")
|
||||
@RequiresPermissions("trainusers:add")
|
||||
@ResponseBody
|
||||
public Object add() throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd.put("TRAINUSERS_ID", this.get32UUID()); //主键
|
||||
pd.put("STEP_STATUS", "0");
|
||||
trainusersService.save(pd);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**删除
|
||||
* @param out
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/delete")
|
||||
@RequiresPermissions("trainusers:del")
|
||||
@ResponseBody
|
||||
public Object delete() throws Exception{
|
||||
Map<String,String> map = new HashMap<String,String>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
trainusersService.delete(pd);
|
||||
map.put("result", errInfo); //返回结果
|
||||
return map;
|
||||
}
|
||||
|
||||
/**修改
|
||||
* @param
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/edit")
|
||||
@RequiresPermissions("trainusers:edit")
|
||||
@ResponseBody
|
||||
public Object edit() throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
trainusersService.edit(pd);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/list")
|
||||
@RequiresPermissions("trainusers:list")
|
||||
@ResponseBody
|
||||
public Object list(Page page) throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
String KEYWORDS = pd.getString("KEYWORDS"); //关键词检索条件
|
||||
if(Tools.notEmpty(KEYWORDS))pd.put("KEYWORDS", KEYWORDS.trim());
|
||||
page.setPd(pd);
|
||||
List<PageData> varList = trainusersService.list(page); //列出TrainUsers列表
|
||||
map.put("varList", varList);
|
||||
map.put("page", page);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**去修改页面获取数据
|
||||
* @param
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/goEdit")
|
||||
@RequiresPermissions("trainusers:edit")
|
||||
@ResponseBody
|
||||
public Object goEdit() throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd = trainusersService.findById(pd); //根据ID读取
|
||||
map.put("pd", pd);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**批量删除
|
||||
* @param
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/deleteAll")
|
||||
@RequiresPermissions("trainusers:del")
|
||||
@ResponseBody
|
||||
public Object deleteAll() throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
String DATA_IDS = pd.getString("DATA_IDS");
|
||||
if(Tools.notEmpty(DATA_IDS)){
|
||||
String ArrayDATA_IDS[] = DATA_IDS.split(",");
|
||||
trainusersService.deleteAll(ArrayDATA_IDS);
|
||||
errInfo = "success";
|
||||
}else{
|
||||
errInfo = "error";
|
||||
}
|
||||
map.put("result", errInfo); //返回结果
|
||||
return map;
|
||||
}
|
||||
|
||||
/**导出到excel
|
||||
* @param
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/excel")
|
||||
@RequiresPermissions("toExcel")
|
||||
public ModelAndView exportExcel() throws Exception{
|
||||
ModelAndView mv = new ModelAndView();
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
Map<String,Object> dataMap = new HashMap<String,Object>();
|
||||
List<String> titles = new ArrayList<String>();
|
||||
titles.add("备注1"); //1
|
||||
titles.add("培训批次"); //2
|
||||
titles.add("用户ID"); //3
|
||||
titles.add("培训开始时间"); //4
|
||||
titles.add("培训结束时间"); //5
|
||||
titles.add("培训状态0未培训1培训中2培训通过-1培训未通过"); //6
|
||||
titles.add("培训企业"); //7
|
||||
titles.add("流动类型"); //8
|
||||
titles.add("安全监督部"); //9
|
||||
titles.add("主管部门"); //10
|
||||
titles.add("主管部门审批状态"); //11
|
||||
titles.add("主管部门审批意见"); //12
|
||||
titles.add("管理部门审批状态"); //13
|
||||
titles.add("管理部门审批意见"); //14
|
||||
dataMap.put("titles", titles);
|
||||
List<PageData> varOList = trainusersService.listAll(pd);
|
||||
List<PageData> varList = new ArrayList<PageData>();
|
||||
for(int i=0;i<varOList.size();i++){
|
||||
PageData vpd = new PageData();
|
||||
vpd.put("var1", varOList.get(i).getString("TRAINUSERS_ID")); //1
|
||||
vpd.put("var2", varOList.get(i).getString("TRAININGBATCH_ID")); //2
|
||||
vpd.put("var3", varOList.get(i).getString("USER_ID")); //3
|
||||
vpd.put("var4", varOList.get(i).getString("START_DATE")); //4
|
||||
vpd.put("var5", varOList.get(i).getString("END_DATE")); //5
|
||||
vpd.put("var6", varOList.get(i).get("STATUS").toString()); //6
|
||||
vpd.put("var7", varOList.get(i).getString("TRAIN_CORPINFO_ID")); //7
|
||||
vpd.put("var8", varOList.get(i).getString("TRAIN_AREA")); //8
|
||||
vpd.put("var9", varOList.get(i).get("SUPERVISION_STATE").toString()); //9
|
||||
vpd.put("var10", varOList.get(i).getString("SUPERVISION_OPINION")); //10
|
||||
vpd.put("var11", varOList.get(i).get("MANAGER_STATE").toString()); //11
|
||||
vpd.put("var12", varOList.get(i).getString("MANAGER_OPINION")); //12
|
||||
vpd.put("var13", varOList.get(i).get("TERRITORIALITY_STATE").toString()); //13
|
||||
vpd.put("var14", varOList.get(i).getString("TERRITORIALITY_OPINION")); //14
|
||||
varList.add(vpd);
|
||||
}
|
||||
dataMap.put("varList", varList);
|
||||
ObjectExcelView erv = new ObjectExcelView();
|
||||
mv = new ModelAndView(erv,dataMap);
|
||||
return mv;
|
||||
}
|
||||
/**用户审批
|
||||
* @param
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/approveUser")
|
||||
@ResponseBody
|
||||
public Object approveUser() throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
trainusersService.approveUser(pd);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
@RequestMapping(value = "/getUserinfoList")
|
||||
@ResponseBody
|
||||
public Object getUserinfoList() throws Exception {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
List<PageData> list = trainusersService.findinfoByCondition(pd);
|
||||
map.put("list", list);
|
||||
map.put("result", "success");
|
||||
return map;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,203 @@
|
|||
package com.zcloud.controller.xgf;
|
||||
|
||||
import com.zcloud.controller.base.BaseController;
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.service.xgf.TrainingBatchService;
|
||||
import com.zcloud.service.xgf.XgfUserService;
|
||||
import com.zcloud.util.*;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 说明:培训批次管理
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2023-05-08
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/trainingbatch")
|
||||
public class TrainingBatchController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private TrainingBatchService trainingbatchService;
|
||||
|
||||
@Autowired
|
||||
private XgfUserService xgfUserService;
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*
|
||||
* @param
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "/add")
|
||||
@RequiresPermissions("trainingbatch:add")
|
||||
@ResponseBody
|
||||
public Object add() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
trainingbatchService.save(pd);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*
|
||||
*/
|
||||
@RequestMapping(value = "/delete")
|
||||
@RequiresPermissions("trainingbatch:del")
|
||||
@ResponseBody
|
||||
public Object delete() throws Exception {
|
||||
Map<String, String> map = new HashMap<String, String>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
trainingbatchService.delete(pd);
|
||||
map.put("result", errInfo); //返回结果
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*
|
||||
* @param
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "/edit")
|
||||
@RequiresPermissions("trainingbatch:edit")
|
||||
@ResponseBody
|
||||
public Object edit() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
trainingbatchService.edit(pd);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "/list")
|
||||
@RequiresPermissions("trainingbatch:list")
|
||||
@ResponseBody
|
||||
public Object list(Page page) throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
String KEYWORDS = pd.getString("KEYWORDS"); //关键词检索条件
|
||||
if (Tools.notEmpty(KEYWORDS)) pd.put("KEYWORDS", KEYWORDS.trim());
|
||||
page.setPd(pd);
|
||||
List<PageData> varList = trainingbatchService.list(page); //列出TrainingBatch列表
|
||||
map.put("varList", varList);
|
||||
map.put("page", page);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "/userList")
|
||||
@RequiresPermissions("trainingbatch:list")
|
||||
@ResponseBody
|
||||
public Object userList(Page page) throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
String KEYWORDS = pd.getString("KEYWORDS"); //关键词检索条件
|
||||
if (Tools.notEmpty(KEYWORDS)) pd.put("KEYWORDS", KEYWORDS.trim());
|
||||
page.setPd(pd);
|
||||
List<PageData> varList = xgfUserService.flowlistPage(page); //列出TrainingBatch列表
|
||||
map.put("varList", varList);
|
||||
map.put("page", page);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "/batchUserList")
|
||||
@RequiresPermissions("trainingbatch:list")
|
||||
@ResponseBody
|
||||
public Object batchUserList(Page page) throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
String KEYWORDS = pd.getString("KEYWORDS"); //关键词检索条件
|
||||
if (Tools.notEmpty(KEYWORDS)) pd.put("KEYWORDS", KEYWORDS.trim());
|
||||
page.setPd(pd);
|
||||
List<PageData> varList = trainingbatchService.batchUserlistPage(page); //列出TrainingBatch列表
|
||||
map.put("varList", varList);
|
||||
map.put("page", page);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 去修改页面获取数据
|
||||
*
|
||||
* @param
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "/goEdit")
|
||||
@RequiresPermissions("trainingbatch:edit")
|
||||
@ResponseBody
|
||||
public Object goEdit() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd = trainingbatchService.findById(pd); //根据ID读取
|
||||
map.put("pd", pd);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "/deleteAll")
|
||||
@RequiresPermissions("trainingbatch:del")
|
||||
@ResponseBody
|
||||
public Object deleteAll() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
PageData pd = this.getPageData();
|
||||
String DATA_IDS = pd.getString("DATA_IDS");
|
||||
if (Tools.notEmpty(DATA_IDS)) {
|
||||
String ArrayDATA_IDS[] = DATA_IDS.split(",");
|
||||
trainingbatchService.deleteAll(ArrayDATA_IDS);
|
||||
}
|
||||
map.put("result", "success"); //返回结果
|
||||
return map;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,98 @@
|
|||
package com.zcloud.controller.xgf;
|
||||
|
||||
import com.zcloud.controller.base.BaseController;
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.service.xgf.TrainingBatchService;
|
||||
import com.zcloud.service.xgf.XgfUserService;
|
||||
import com.zcloud.util.HttpClientService;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Controller
|
||||
@RequestMapping("/xgf/user")
|
||||
public class XgfUserController extends BaseController {
|
||||
|
||||
@Resource
|
||||
private XgfUserService xgfUserService;
|
||||
|
||||
@Value("${preventionxgf.api.url}")
|
||||
private String url;
|
||||
|
||||
@Resource
|
||||
private TrainingBatchService trainingBatchService;
|
||||
|
||||
|
||||
@RequestMapping(value = "/list")
|
||||
@ResponseBody
|
||||
public Object list(Page page) throws Exception {
|
||||
PageData request = this.getPageData();
|
||||
page.setPd(request);
|
||||
xgfUserService.list(page);
|
||||
PageData response = new PageData();
|
||||
response.put("result", "success");
|
||||
response.put("page", page);
|
||||
response.put("data", request);
|
||||
return response;
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/approve")
|
||||
@ResponseBody
|
||||
public Object approve() throws Exception {
|
||||
PageData request = this.getPageData();
|
||||
xgfUserService.approve(request);
|
||||
PageData response = new PageData();
|
||||
response.put("result", "success");
|
||||
response.put("data", request);
|
||||
return response;
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/regulatoryUserList")
|
||||
@ResponseBody
|
||||
public Object regulatoryUserList() throws Exception{
|
||||
PageData request = this.getPageData();
|
||||
PageData response = new PageData();
|
||||
response.put("result", "success");
|
||||
response.put("data", request);
|
||||
return response;
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/getInfo")
|
||||
@ResponseBody
|
||||
public Object getInfo() throws Exception {
|
||||
PageData request = this.getPageData();
|
||||
PageData condition = new PageData();
|
||||
/*组织人员信息*/
|
||||
condition.put("XGF_USER_ID", request.getString("XGF_USER_ID"));
|
||||
PageData entity = xgfUserService.findInfo(condition);
|
||||
/*组织人员图片信息*/
|
||||
condition.put("USER_ID", entity.getString("XGF_USER_ID"));
|
||||
condition.put("CORPINFO_ID", entity.getString("BELONG_TO_CORP"));
|
||||
Map result = HttpClientService.doPost(url + "/openApi/user/getInfoPicture", condition);
|
||||
if (result == null || !"succeed".equals(result.get("result"))) throw new RuntimeException("请求失败");
|
||||
/*组织员工培训信息*/
|
||||
condition.clear();
|
||||
condition.put("USER_ID", entity.getString("XGF_USER_ID"));
|
||||
List<PageData> recordList = xgfUserService.findRecordList(condition);
|
||||
/*培训申请记录*/
|
||||
condition.clear();
|
||||
condition.put("USER_ID", entity.getString("XGF_USER_ID"));
|
||||
List<PageData> trainList = trainingBatchService.findByUserId(condition);
|
||||
|
||||
PageData response = new PageData();
|
||||
response.put("result", "success");
|
||||
response.put("info", entity);
|
||||
response.put("img", result);
|
||||
response.put("trainRecordList", recordList);
|
||||
response.put("applyList", trainList);
|
||||
response.put("data", request);
|
||||
return response;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,62 @@
|
|||
package com.zcloud.mapper.datasource.corpsystem;
|
||||
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.entity.system.Menu;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:菜单Mapper
|
||||
* 作者:luoxiaobao
|
||||
* 官网:www.qdkjchina.com
|
||||
*/
|
||||
public interface CorpMenuMapper {
|
||||
|
||||
/**新增菜单
|
||||
* @param menu
|
||||
*/
|
||||
void addMenu(Menu menu);
|
||||
|
||||
/**保存修改菜单
|
||||
* @param menu
|
||||
*/
|
||||
void edit(Menu menu);
|
||||
|
||||
/**
|
||||
* 通过菜单ID获取数据
|
||||
* @param pd
|
||||
* @return
|
||||
*/
|
||||
PageData getMenuById(PageData pd);
|
||||
|
||||
/**获取最大的菜单ID
|
||||
* @param pd
|
||||
* @return
|
||||
*/
|
||||
PageData findMaxId(PageData pd);
|
||||
|
||||
/**通过ID获取其子一级菜单
|
||||
* @param parentId
|
||||
* @return
|
||||
*/
|
||||
List<Menu> listSubMenuByParentId(String parentId);
|
||||
|
||||
/**获取所有菜单并填充每个菜单的子菜单列表(菜单管理)
|
||||
* @param MENU_ID
|
||||
* @return
|
||||
*/
|
||||
List<Menu> listAllMenu(String MENU_ID);
|
||||
|
||||
/**删除菜单
|
||||
* @param MENU_ID
|
||||
*/
|
||||
void deleteMenuById(String MENU_ID);
|
||||
|
||||
/**保存菜单图标
|
||||
* @param pd
|
||||
* @return
|
||||
*/
|
||||
void editicon(PageData pd);
|
||||
|
||||
List<Menu> listSubMenuAll(String MENU_ID);
|
||||
}
|
|
@ -0,0 +1,110 @@
|
|||
package com.zcloud.mapper.datasource.corpsystem;
|
||||
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.entity.system.Role;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:角色Mapper
|
||||
* 作者:luoxiaobao
|
||||
* 官网:www.qdkjchina.com
|
||||
*/
|
||||
public interface CorpRoleMapper {
|
||||
|
||||
/**通过角色ID获取数据
|
||||
* @param pd
|
||||
* @return
|
||||
*/
|
||||
PageData findById(PageData pd);
|
||||
|
||||
/**通过id查找(返回角色对象)
|
||||
* @param roleId
|
||||
* @return
|
||||
*/
|
||||
Role getRoleById(String ROLE_ID);
|
||||
|
||||
/**通过角色编码查找
|
||||
* @param pd
|
||||
* @return
|
||||
*/
|
||||
PageData getRoleByRnumber(PageData pd);
|
||||
|
||||
/**通过组ID获取组下级角色列表
|
||||
* @param pd
|
||||
* @return
|
||||
*/
|
||||
List<Role> listAllRolesByPId(PageData pd);
|
||||
|
||||
/**添加
|
||||
* @param pd
|
||||
*/
|
||||
void add(PageData pd);
|
||||
|
||||
/**保存修改
|
||||
* @param pd
|
||||
*/
|
||||
void edit(PageData pd);
|
||||
|
||||
/**删除角色
|
||||
* @param ROLE_ID
|
||||
* @throws Exception
|
||||
*/
|
||||
void deleteRoleById(String ROLE_ID);
|
||||
|
||||
/**给当前角色附加菜单权限
|
||||
* @param role
|
||||
* @throws Exception
|
||||
*/
|
||||
void updateRoleRights(Role role);
|
||||
|
||||
/**给全部子角色加菜单权限
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void setAllRights(PageData pd);
|
||||
|
||||
/**权限(增删改查)
|
||||
* @param msg 区分增删改查
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void addQx(PageData pd);
|
||||
|
||||
/**权限(增删改查)
|
||||
* @param msg 区分增删改查
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void delQx(PageData pd);
|
||||
|
||||
/**权限(增删改查)
|
||||
* @param msg 区分增删改查
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void editQx(PageData pd);
|
||||
|
||||
/**权限(增删改查)
|
||||
* @param msg 区分增删改查
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void chaQx(PageData pd);
|
||||
|
||||
/**通过角色ID数组获取角色列表
|
||||
* @param arryROLE_ID
|
||||
* @throws Exception
|
||||
*/
|
||||
List<Role> listAllRolesByArryROLE_ID(String[] arryROLE_ID);
|
||||
|
||||
/**角色列表(弹窗选择用)
|
||||
* @param page
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> roleWindowlistPage(Page page);
|
||||
|
||||
}
|
|
@ -0,0 +1,130 @@
|
|||
package com.zcloud.mapper.datasource.corpsystem;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.entity.system.User;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:用户Mapper
|
||||
* 作者:luoxiaobao
|
||||
* 官网:www.qdkjchina.com
|
||||
*/
|
||||
public interface CorpUsersMapper {
|
||||
|
||||
/**通过用户获取数据
|
||||
* @param pd
|
||||
* @return
|
||||
*/
|
||||
PageData findByUsername(PageData pd);
|
||||
|
||||
/**用户列表
|
||||
* @param page
|
||||
* @return
|
||||
*/
|
||||
List<PageData> userlistPage(Page page);
|
||||
|
||||
/**通过用户ID获取用户信息和角色信息
|
||||
* @param USER_ID
|
||||
* @return
|
||||
*/
|
||||
User getUserAndRoleById(String USER_ID);
|
||||
|
||||
/**通过邮箱获取数据
|
||||
* @param pd
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
PageData findByEmail(PageData pd);
|
||||
|
||||
/**通过编码获取数据
|
||||
* @param pd
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
PageData findByNumbe(PageData pd);
|
||||
|
||||
/**列出某角色下的所有用户
|
||||
* @param pd
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> listAllUserByRoldId(PageData pd);
|
||||
|
||||
/**用户列表(全部)
|
||||
* @param pd
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> listAllUser(PageData pd);
|
||||
|
||||
/**用户列表(弹窗选择用)
|
||||
* @param page
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> userBystafflistPage(Page page);
|
||||
|
||||
/**通过用户ID获取数据
|
||||
* @param pd
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
PageData findById(PageData pd);
|
||||
|
||||
/**通过分公司ID获取数据
|
||||
* @param pd
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
PageData findByCorpId(PageData pd);
|
||||
|
||||
/**保存用户IP
|
||||
* @param pd
|
||||
*/
|
||||
void saveIP(PageData pd);
|
||||
|
||||
/**保存用户
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void saveUser(PageData pd);
|
||||
void editPassword(PageData pd);
|
||||
|
||||
/**保存用户系统皮肤
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void saveSkin(PageData pd);
|
||||
|
||||
/**修改用户
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void editUser(PageData pd);
|
||||
|
||||
/**删除用户
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void deleteUser(PageData pd);
|
||||
|
||||
/**批量删除用户
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void deleteAllUser(String[] USER_IDS);
|
||||
|
||||
/**修改用户小程序权限
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void editUserFuns(PageData pd);
|
||||
Integer hasUserName (PageData pd);
|
||||
|
||||
List<PageData> listUserAndDept (PageData pd);
|
||||
void updateUserStatus (PageData pd);
|
||||
|
||||
void unLockUser(PageData pd);
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
package com.zcloud.mapper.datasource.system;
|
||||
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
/**
|
||||
* 企业图片地址、后端地址访问表
|
||||
*/
|
||||
public interface CorpPathMapper {
|
||||
|
||||
PageData getCorpPathByCorpId(PageData pd);
|
||||
|
||||
PageData getCorpPathByPersonInfo(PageData pd);
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
package com.zcloud.mapper.datasource.xgf;
|
||||
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
public interface FlowDetailMapper {
|
||||
|
||||
void save(PageData flow);
|
||||
|
||||
void delete(PageData flow);
|
||||
|
||||
void edit(PageData flow);
|
||||
|
||||
PageData findById(PageData flow);
|
||||
|
||||
PageData selectOne(PageData condition);
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
package com.zcloud.mapper.datasource.xgf;
|
||||
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
public interface FlowMapper {
|
||||
|
||||
void save(PageData flow);
|
||||
|
||||
void delete(PageData flow);
|
||||
|
||||
void edit(PageData flow);
|
||||
|
||||
PageData findById(PageData flow);
|
||||
|
||||
PageData findByCondition(PageData condition);
|
||||
}
|
|
@ -0,0 +1,129 @@
|
|||
package com.zcloud.mapper.datasource.xgf;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:培训学员
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2023-05-08
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
public interface TrainUsersMapper{
|
||||
|
||||
/**新增
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void save(PageData pd);
|
||||
|
||||
/**删除
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void delete(PageData pd);
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void edit(PageData pd);
|
||||
|
||||
/**固定服务人员培训管理列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> datalistPage(Page page);
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> listAll(PageData pd);
|
||||
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
PageData findById(PageData pd);
|
||||
|
||||
/**批量删除
|
||||
* @param ArrayDATA_IDS
|
||||
* @throws Exception
|
||||
*/
|
||||
void deleteAll(String[] ArrayDATA_IDS);
|
||||
|
||||
void updateStatusByFlowTrain(PageData pd);
|
||||
|
||||
List<PageData> unflowlistPage(Page page);
|
||||
|
||||
void updateStatus(PageData pd);
|
||||
|
||||
/**
|
||||
* 固定服务人员培训管理培训申请记录
|
||||
* @param page
|
||||
* @return
|
||||
*/
|
||||
List<PageData> trainApplicationRecordList(Page page);
|
||||
|
||||
/**
|
||||
* 固定服务人员培训管理查看
|
||||
* @param pd
|
||||
* @return
|
||||
*/
|
||||
PageData trainView(PageData pd);
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 安全监督部 审核
|
||||
* @param pd
|
||||
* @return
|
||||
*/
|
||||
Integer approveSupervision(PageData pd);
|
||||
/**
|
||||
* 主管部门 审核
|
||||
* @param pd
|
||||
* @return
|
||||
*/
|
||||
Integer approveManager(PageData pd);
|
||||
/**
|
||||
* 安全监督部 审核
|
||||
* @param pd
|
||||
* @return
|
||||
*/
|
||||
Integer approveTerritoriality(PageData pd);
|
||||
|
||||
/**
|
||||
* 根据培训批次id 获取 这次培训中审批完成的次数
|
||||
* @param pd
|
||||
* @return
|
||||
*/
|
||||
List<PageData> getApproveCountByGbatchId(PageData pd );
|
||||
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
PageData getPdById(PageData pd);
|
||||
|
||||
|
||||
/**
|
||||
* 查询和这个批次完成评审的 数量 和 传过来的对比
|
||||
*/
|
||||
Integer getCountByWanchengPingshen(PageData pd);
|
||||
|
||||
void graduation(PageData condition);
|
||||
void graduationstudent(PageData condition);
|
||||
|
||||
|
||||
|
||||
void updateDate(PageData condition);
|
||||
|
||||
List<PageData> findinfoByCondition(PageData pd);
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,82 @@
|
|||
package com.zcloud.mapper.datasource.xgf;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:培训批次管理
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2023-05-08
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
public interface TrainingBatchMapper{
|
||||
|
||||
/**新增
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void save(PageData pd);
|
||||
|
||||
/**删除
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void delete(PageData pd);
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void edit(PageData pd);
|
||||
|
||||
void audit(PageData pd);
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> datalistPage(Page page);
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> listAll(PageData pd);
|
||||
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
PageData findById(PageData pd);
|
||||
|
||||
/**批量删除
|
||||
* @param ArrayDATA_IDS
|
||||
* @throws Exception
|
||||
*/
|
||||
void deleteAll(String[] ArrayDATA_IDS);
|
||||
|
||||
/**
|
||||
* 获取编号
|
||||
* @param pd
|
||||
* @return
|
||||
*/
|
||||
PageData getCode(PageData pd);
|
||||
|
||||
List<PageData> batchUserlistPage(Page page);
|
||||
|
||||
List<PageData> passUserlistPage(Page page);
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
PageData findAndTimeById(PageData pd);
|
||||
|
||||
void graduation(PageData condition);
|
||||
|
||||
List<PageData> findByUserId(PageData condition);
|
||||
|
||||
List<PageData> oldlistPage(Page page);
|
||||
}
|
||||
|
|
@ -0,0 +1,58 @@
|
|||
package com.zcloud.mapper.datasource.xgf;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface XgfUserDetailsMapper {
|
||||
|
||||
/**新增
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void save(PageData pd);
|
||||
|
||||
/**删除
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void delete(PageData pd);
|
||||
|
||||
/**批量删除
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void deleteAll(PageData pd);
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void edit(PageData pd);
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> listPage(Page page);
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> listAll(PageData pd);
|
||||
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
PageData findById(PageData pd);
|
||||
|
||||
/**列表(根据多选ID查询数据)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> listByIds(PageData pd);
|
||||
|
||||
}
|
|
@ -0,0 +1,73 @@
|
|||
package com.zcloud.mapper.datasource.xgf;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface XgfUserMapper {
|
||||
|
||||
/**新增
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void save(PageData pd);
|
||||
|
||||
/**删除
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void delete(PageData pd);
|
||||
|
||||
/**批量删除
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void deleteAll(PageData pd);
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void edit(PageData pd);
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> listPage(Page page);
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
List<PageData> listAll(PageData pd);
|
||||
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
PageData findById(PageData pd);
|
||||
|
||||
/**列表(根据多选ID查询数据)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> listByIds(PageData pd);
|
||||
|
||||
void updateStatusByUnflowTrain(PageData pd);
|
||||
|
||||
void bantchUpdateStatus(int STATUS, String[] arrayDATA_ids);
|
||||
|
||||
void updateStatusByFlowTrain(PageData pd);
|
||||
|
||||
void graduation(PageData condition);
|
||||
|
||||
void graduationstudent(PageData condition);
|
||||
|
||||
List<PageData> flowlistPage(Page page);
|
||||
|
||||
PageData getInfoById(PageData condition);
|
||||
|
||||
List<PageData> findRecordList(PageData condition);
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
package com.zcloud.service.system;
|
||||
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
/**
|
||||
* 企业图片地址、后端地址访问表
|
||||
*/
|
||||
public interface CorpPathService {
|
||||
|
||||
/**
|
||||
* 根据企业id获取企业图片、后端路径访问地址
|
||||
* @param pd
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
PageData getCorpPathByCorpId(PageData pd) throws Exception;
|
||||
|
||||
/**
|
||||
* 根据人员信息获取对应企业图片、后端路径访问地址
|
||||
* @param pd
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
PageData getCorpPathByPersonInfo(PageData pd) throws Exception;
|
||||
}
|
|
@ -0,0 +1,75 @@
|
|||
package com.zcloud.service.system.corpsystem;
|
||||
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.entity.system.Menu;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:菜单服务接口
|
||||
* 作者:luoxiaobao
|
||||
* 官网:www.qdkjchina.com
|
||||
*/
|
||||
public interface CorpMenuService {
|
||||
|
||||
/**新增菜单
|
||||
* @param menu
|
||||
* @throws Exception
|
||||
*/
|
||||
public void addMenu(Menu menu) throws Exception;
|
||||
|
||||
/**保存修改菜单
|
||||
* @param menu
|
||||
* @throws Exception
|
||||
*/
|
||||
public void edit(Menu menu) throws Exception;
|
||||
|
||||
/**获取最大的菜单ID
|
||||
* @param pd
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public PageData findMaxId(PageData pd) throws Exception;
|
||||
|
||||
/**获取所有菜单并填充每个菜单的子菜单列表(系统菜单列表)
|
||||
* @param MENU_ID
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<Menu> listAllMenuQx(String MENU_ID) throws Exception;
|
||||
|
||||
/**通过ID获取其子一级菜单
|
||||
* @param parentId
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<Menu> listSubMenuByParentId(String parentId)throws Exception;
|
||||
|
||||
/**获取所有菜单并填充每个菜单的子菜单列表(菜单管理)(
|
||||
* @param MENU_ID
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<Menu> listAllMenu(String MENU_ID) throws Exception;
|
||||
|
||||
/**获取所有菜单并填充每个菜单的子菜单列表(系统菜单列表)
|
||||
* @param pd
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public PageData getMenuById(PageData pd) throws Exception;
|
||||
|
||||
/**删除菜单
|
||||
* @param MENU_ID
|
||||
* @throws Exception
|
||||
*/
|
||||
public void deleteMenuById(String MENU_ID) throws Exception;
|
||||
|
||||
/**保存菜单图标
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void editicon(PageData pd) throws Exception;
|
||||
public List<Menu> listSubMenuAll()throws Exception;
|
||||
|
||||
}
|
|
@ -0,0 +1,94 @@
|
|||
package com.zcloud.service.system.corpsystem;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.entity.system.Role;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:角色服务接口
|
||||
* 作者:luoxiaobao
|
||||
* 官网:www.qdkjchina.com
|
||||
*/
|
||||
public interface CorpRoleService {
|
||||
|
||||
/**通过角色ID获取数据
|
||||
* @param pd
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public PageData findById(PageData pd)throws Exception;
|
||||
|
||||
/**通过id查找(返回角色对象)
|
||||
* @param roleId
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public Role getRoleById(String ROLE_ID) throws Exception;
|
||||
|
||||
/**通过组ID获取组下级角色列表
|
||||
* @param pd
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<Role> listAllRolesByPId(PageData pd) throws Exception;
|
||||
|
||||
/**通过角色编码查找
|
||||
* @param pd
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public PageData getRoleByRnumber(PageData pd) throws Exception;
|
||||
|
||||
/**添加
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void add(PageData pd) throws Exception;
|
||||
|
||||
/**保存修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void edit(PageData pd) throws Exception;
|
||||
|
||||
/**删除角色
|
||||
* @param ROLE_ID
|
||||
* @throws Exception
|
||||
*/
|
||||
public void deleteRoleById(String ROLE_ID) throws Exception;
|
||||
|
||||
/**给当前角色附加菜单权限
|
||||
* @param role
|
||||
* @throws Exception
|
||||
*/
|
||||
public void updateRoleRights(Role role) throws Exception;
|
||||
|
||||
/**给全部子角色加菜单权限
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void setAllRights(PageData pd) throws Exception;
|
||||
|
||||
/**权限(增删改查)
|
||||
* @param msg 区分增删改查
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void saveB4Button(String msg,PageData pd) throws Exception;
|
||||
|
||||
/**通过角色ID数组获取角色列表
|
||||
* @param arryROLE_ID
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<Role> getRoleByArryROLE_ID(String[] arryROLE_ID)throws Exception;
|
||||
|
||||
/**角色列表(弹窗选择用)
|
||||
* @param page
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> roleListWindow(Page page)throws Exception;
|
||||
|
||||
}
|
|
@ -0,0 +1,133 @@
|
|||
package com.zcloud.service.system.corpsystem;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.entity.system.User;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:用户服务接口
|
||||
* 作者:luoxiaobao
|
||||
* 官网:www.qdkjchina.com
|
||||
*/
|
||||
public interface CorpUsersService {
|
||||
|
||||
/**通过用户名获取用户信息
|
||||
* @param pd
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public PageData findByUsername(PageData pd)throws Exception;
|
||||
|
||||
/**通过用户ID获取用户信息
|
||||
* @param pd
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public PageData findById(PageData pd)throws Exception;
|
||||
|
||||
/**用户列表
|
||||
* @param page
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> userlistPage(Page page)throws Exception;
|
||||
|
||||
/**通过用户ID获取用户信息和角色信息
|
||||
* @param USER_ID
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public User getUserAndRoleById(String USER_ID) throws Exception;
|
||||
|
||||
/**保存用户IP
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void saveIP(PageData pd)throws Exception;
|
||||
|
||||
/**通过邮箱获取数据
|
||||
* @param pd
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public PageData findByEmail(PageData pd)throws Exception;
|
||||
|
||||
/**通过编码获取数据
|
||||
* @param pd
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public PageData findByNumbe(PageData pd) throws Exception;
|
||||
|
||||
/**列出某角色下的所有用户
|
||||
* @param pd
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> listAllUserByRoldId(PageData pd) throws Exception;
|
||||
|
||||
/**用户列表(全部)
|
||||
* @param pd
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> listAllUser(PageData pd)throws Exception;
|
||||
|
||||
/**用户列表(弹窗选择用)
|
||||
* @param page
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> listUsersBystaff(Page page)throws Exception;
|
||||
|
||||
/**保存用户
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void saveUser(PageData pd)throws Exception;
|
||||
|
||||
/**保存用户系统皮肤
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void saveSkin(PageData pd)throws Exception;
|
||||
|
||||
/**修改用户
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void editUser(PageData pd)throws Exception;
|
||||
public void editPassword(PageData pd)throws Exception;
|
||||
|
||||
/**删除用户
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void deleteUser(PageData pd)throws Exception;
|
||||
|
||||
/**批量删除用户
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void deleteAllUser(String[] USER_IDS)throws Exception;
|
||||
|
||||
/**修改用户小程序权限
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void editUserFuns(PageData pd);
|
||||
|
||||
public Integer hasUserName(PageData pd)throws Exception;
|
||||
|
||||
public List<PageData> listUserAndDept (PageData pd) throws Exception;
|
||||
|
||||
/***
|
||||
* 修改用户状态
|
||||
* @param pd
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public void updateUserStatus (PageData pd) throws Exception;
|
||||
}
|
|
@ -0,0 +1,126 @@
|
|||
package com.zcloud.service.system.corpsystem.impl;
|
||||
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.entity.system.Menu;
|
||||
import com.zcloud.mapper.datasource.corpsystem.CorpMenuMapper;
|
||||
import com.zcloud.service.system.corpsystem.CorpMenuService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.cache.annotation.CacheEvict;
|
||||
import org.springframework.cache.annotation.Cacheable;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:菜单服务接口实现类
|
||||
* 作者:luoxiaobao
|
||||
* 官网:www.qdkjchina.com
|
||||
*/
|
||||
@Service
|
||||
@Transactional //开启事物
|
||||
public class CorpMenuServiceImpl implements CorpMenuService {
|
||||
|
||||
@Autowired
|
||||
private CorpMenuMapper corpMenuMapper;
|
||||
|
||||
/**新增菜单
|
||||
* @param menu
|
||||
* @throws Exception
|
||||
*/
|
||||
@CacheEvict(value="menucache", allEntries=true)
|
||||
public void addMenu(Menu menu) throws Exception{
|
||||
corpMenuMapper.addMenu(menu);
|
||||
}
|
||||
|
||||
/**保存修改菜单
|
||||
* @param menu
|
||||
* @throws Exception
|
||||
*/
|
||||
@CacheEvict(value="menucache", allEntries=true)
|
||||
public void edit(Menu menu) throws Exception{
|
||||
corpMenuMapper.edit(menu);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过菜单ID获取数据
|
||||
* @param pd
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public PageData getMenuById(PageData pd) throws Exception {
|
||||
return corpMenuMapper.getMenuById(pd);
|
||||
}
|
||||
|
||||
/**获取最大的菜单ID
|
||||
* @param pd
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public PageData findMaxId(PageData pd) throws Exception{
|
||||
return corpMenuMapper.findMaxId(pd);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过ID获取其子一级菜单
|
||||
* @param parentId
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@Cacheable(key="'menu-'+#parentId",value="menucache")
|
||||
public List<Menu> listSubMenuByParentId(String parentId) throws Exception {
|
||||
return corpMenuMapper.listSubMenuByParentId(parentId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取所有菜单并填充每个菜单的子菜单列表(菜单管理)(递归处理)
|
||||
* @param MENU_ID
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<Menu> listAllMenu(String MENU_ID) throws Exception {
|
||||
List<Menu> menuList = this.listSubMenuByParentId(MENU_ID);
|
||||
for(Menu menu : menuList){
|
||||
menu.setMENU_URL("menu_edit.html?MENU_ID="+menu.getMENU_ID());
|
||||
menu.setSubMenu(this.listAllMenu(menu.getMENU_ID()));
|
||||
menu.setTarget("treeFrame");
|
||||
}
|
||||
return menuList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取所有菜单并填充每个菜单的子菜单列表(系统菜单列表)(递归处理)
|
||||
* @param MENU_ID
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<Menu> listAllMenuQx(String MENU_ID) throws Exception {
|
||||
List<Menu> menuList = this.listSubMenuByParentId(MENU_ID);
|
||||
for(Menu menu : menuList){
|
||||
menu.setSubMenu(this.listAllMenuQx(menu.getMENU_ID()));
|
||||
menu.setTarget("treeFrame");
|
||||
}
|
||||
return menuList;
|
||||
}
|
||||
|
||||
/**删除菜单
|
||||
* @param MENU_ID
|
||||
* @throws Exception
|
||||
*/
|
||||
@CacheEvict(value="menucache", allEntries=true)
|
||||
public void deleteMenuById(String MENU_ID) throws Exception{
|
||||
corpMenuMapper.deleteMenuById(MENU_ID);
|
||||
}
|
||||
|
||||
/**保存菜单图标
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
@CacheEvict(value="menucache", allEntries=true)
|
||||
public void editicon(PageData pd) throws Exception{
|
||||
corpMenuMapper.editicon(pd);
|
||||
}
|
||||
public List<Menu> listSubMenuAll()throws Exception{
|
||||
return corpMenuMapper.listSubMenuAll("");
|
||||
}
|
||||
}
|
|
@ -0,0 +1,136 @@
|
|||
package com.zcloud.service.system.corpsystem.impl;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.entity.system.Role;
|
||||
import com.zcloud.mapper.datasource.corpsystem.CorpRoleMapper;
|
||||
import com.zcloud.service.system.corpsystem.CorpRoleService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:角色服务接口实现类
|
||||
* 作者:luoxiaobao
|
||||
* 官网:www.qdkjchina.com
|
||||
*/
|
||||
@Service
|
||||
@Transactional //开启事物
|
||||
public class CorpRoleServiceImpl implements CorpRoleService {
|
||||
|
||||
@Autowired
|
||||
private CorpRoleMapper corpRoleMapper;
|
||||
|
||||
/**通过角色ID获取数据
|
||||
* @param pd
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public PageData findById(PageData pd) throws Exception {
|
||||
return corpRoleMapper.findById(pd);
|
||||
}
|
||||
|
||||
/**通过id查找(返回角色对象)
|
||||
* @param roleId
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public Role getRoleById(String ROLE_ID) throws Exception{
|
||||
return corpRoleMapper.getRoleById(ROLE_ID);
|
||||
}
|
||||
|
||||
/**通过角色编码查找
|
||||
* @param pd
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public PageData getRoleByRnumber(PageData pd) throws Exception{
|
||||
return corpRoleMapper.getRoleByRnumber(pd);
|
||||
}
|
||||
|
||||
/**通过组ID获取组下级角色列表
|
||||
* @param pd
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<Role> listAllRolesByPId(PageData pd) throws Exception {
|
||||
return corpRoleMapper.listAllRolesByPId(pd);
|
||||
}
|
||||
|
||||
/**添加
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void add(PageData pd) throws Exception{
|
||||
corpRoleMapper.add( pd);
|
||||
}
|
||||
|
||||
/**保存修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void edit(PageData pd) throws Exception{
|
||||
corpRoleMapper.edit( pd);
|
||||
}
|
||||
|
||||
/**删除角色
|
||||
* @param ROLE_ID
|
||||
* @throws Exception
|
||||
*/
|
||||
public void deleteRoleById(String ROLE_ID) throws Exception{
|
||||
corpRoleMapper.deleteRoleById(ROLE_ID);
|
||||
}
|
||||
|
||||
/**给当前角色附加菜单权限
|
||||
* @param role
|
||||
* @throws Exception
|
||||
*/
|
||||
public void updateRoleRights(Role role) throws Exception{
|
||||
corpRoleMapper.updateRoleRights(role);
|
||||
}
|
||||
|
||||
/**给全部子角色加菜单权限
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void setAllRights(PageData pd) throws Exception{
|
||||
corpRoleMapper.setAllRights(pd);
|
||||
}
|
||||
|
||||
/**权限(增删改查)
|
||||
* @param msg 区分增删改查
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void saveB4Button(String msg,PageData pd) throws Exception{
|
||||
if("add_qx".equals(msg)){
|
||||
corpRoleMapper.addQx(pd);
|
||||
}else if("del_qx".equals(msg)){
|
||||
corpRoleMapper.delQx(pd);
|
||||
}else if("edit_qx".equals(msg)){
|
||||
corpRoleMapper.editQx(pd);
|
||||
}else if("cha_qx".equals(msg)){
|
||||
corpRoleMapper.chaQx(pd);
|
||||
}
|
||||
}
|
||||
|
||||
/**通过角色ID数组获取角色列表
|
||||
* @param arryROLE_ID
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<Role> getRoleByArryROLE_ID(String[] arryROLE_ID)throws Exception{
|
||||
return corpRoleMapper.listAllRolesByArryROLE_ID(arryROLE_ID);
|
||||
}
|
||||
|
||||
/**角色列表(弹窗选择用)
|
||||
* @param page
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> roleListWindow(Page page)throws Exception{
|
||||
return corpRoleMapper.roleWindowlistPage(page);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,177 @@
|
|||
package com.zcloud.service.system.corpsystem.impl;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.entity.system.User;
|
||||
import com.zcloud.mapper.datasource.corpsystem.CorpUsersMapper;
|
||||
import com.zcloud.service.system.corpsystem.CorpUsersService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:用户服务接口实现类
|
||||
* 作者:luoxiaobao
|
||||
* 官网:www.qdkjchina.com
|
||||
*/
|
||||
@Service
|
||||
@Transactional //开启事物
|
||||
public class CorpUsersServiceImpl implements CorpUsersService {
|
||||
|
||||
@Autowired
|
||||
private CorpUsersMapper corpUsersMapper;
|
||||
|
||||
/**通过用户名获取用户信息
|
||||
* @param pd
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public PageData findByUsername(PageData pd) throws Exception {
|
||||
return corpUsersMapper.findByUsername(pd);
|
||||
}
|
||||
|
||||
/**通过用户ID获取用户信息
|
||||
* @param pd
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public PageData findById(PageData pd)throws Exception{
|
||||
return corpUsersMapper.findById(pd);
|
||||
}
|
||||
|
||||
/**用户列表
|
||||
* @param page
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> userlistPage(Page page) throws Exception {
|
||||
return corpUsersMapper.userlistPage(page);
|
||||
}
|
||||
|
||||
/**通过用户ID获取用户信息和角色信息
|
||||
* @param USER_ID
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public User getUserAndRoleById(String USER_ID) throws Exception {
|
||||
return corpUsersMapper.getUserAndRoleById(USER_ID);
|
||||
}
|
||||
|
||||
/**保存用户IP
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void saveIP(PageData pd) throws Exception {
|
||||
corpUsersMapper.saveIP(pd);
|
||||
}
|
||||
|
||||
/**通过邮箱获取数据
|
||||
* @param pd
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public PageData findByEmail(PageData pd) throws Exception {
|
||||
return corpUsersMapper.findByEmail(pd);
|
||||
}
|
||||
|
||||
/**通过编码获取数据
|
||||
* @param pd
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public PageData findByNumbe(PageData pd) throws Exception {
|
||||
return corpUsersMapper.findByNumbe(pd);
|
||||
}
|
||||
|
||||
/**列出某角色下的所有用户
|
||||
* @param pd
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> listAllUserByRoldId(PageData pd) throws Exception{
|
||||
return corpUsersMapper.listAllUserByRoldId(pd);
|
||||
}
|
||||
|
||||
/**用户列表(全部)
|
||||
* @param pd
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> listAllUser(PageData pd)throws Exception{
|
||||
return corpUsersMapper.listAllUser(pd);
|
||||
}
|
||||
|
||||
/**用户列表(弹窗选择用)
|
||||
* @param page
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> listUsersBystaff(Page page)throws Exception{
|
||||
return corpUsersMapper.userBystafflistPage(page);
|
||||
}
|
||||
|
||||
/**保存用户
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void saveUser(PageData pd)throws Exception {
|
||||
corpUsersMapper.saveUser(pd);
|
||||
}
|
||||
|
||||
/**保存用户系统皮肤
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void saveSkin(PageData pd)throws Exception{
|
||||
corpUsersMapper.saveSkin(pd);
|
||||
}
|
||||
|
||||
/**修改用户
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void editUser(PageData pd)throws Exception{
|
||||
corpUsersMapper.editUser(pd);
|
||||
}
|
||||
public void editPassword(PageData pd)throws Exception{
|
||||
corpUsersMapper.editPassword(pd);
|
||||
}
|
||||
|
||||
/**删除用户
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void deleteUser(PageData pd)throws Exception{
|
||||
corpUsersMapper.deleteUser(pd);
|
||||
}
|
||||
|
||||
/**批量删除用户
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void deleteAllUser(String[] USER_IDS)throws Exception{
|
||||
corpUsersMapper.deleteAllUser(USER_IDS);
|
||||
}
|
||||
|
||||
/**修改用户小程序权限
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void editUserFuns(PageData pd) {
|
||||
corpUsersMapper.editUserFuns(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer hasUserName(PageData pd) throws Exception {
|
||||
return corpUsersMapper.hasUserName(pd);
|
||||
}
|
||||
|
||||
public List<PageData> listUserAndDept (PageData pd) throws Exception{
|
||||
return corpUsersMapper.listUserAndDept(pd);
|
||||
}
|
||||
public void updateUserStatus (PageData pd) throws Exception{
|
||||
corpUsersMapper.updateUserStatus(pd);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,60 @@
|
|||
package com.zcloud.service.system.impl;
|
||||
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.mapper.datasource.system.CorpPathMapper;
|
||||
import com.zcloud.service.system.CorpPathService;
|
||||
import com.zcloud.util.Tools;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 企业图片地址、后端地址访问表
|
||||
*/
|
||||
@Service
|
||||
public class CorpPathServiceImpl implements CorpPathService {
|
||||
@Autowired
|
||||
private CorpPathMapper corpPathMapper;
|
||||
|
||||
@Value("${corp.default.pic-path}")
|
||||
private String defaultPicPath;
|
||||
|
||||
@Value("${corp.default.back-end-path}")
|
||||
private String defaultBackEndPath;
|
||||
|
||||
/**
|
||||
* 根据企业id获取企业图片、后端路径访问地址
|
||||
* @param pd
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@Override
|
||||
public PageData getCorpPathByCorpId(PageData pd) throws Exception {
|
||||
PageData data = corpPathMapper.getCorpPathByCorpId(pd);
|
||||
if (Tools.isEmpty(data)) {
|
||||
PageData result = new PageData();
|
||||
result.put("PIC_PATH",defaultPicPath);
|
||||
result.put("BACK_END_PATH", defaultBackEndPath);
|
||||
return result;
|
||||
}
|
||||
return data;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据人员信息获取企业图片、后端路径访问地址
|
||||
* @param pd
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@Override
|
||||
public PageData getCorpPathByPersonInfo(PageData pd) throws Exception {
|
||||
PageData data = corpPathMapper.getCorpPathByPersonInfo(pd);
|
||||
if ("1".equals(pd.getString("USER_ID")) || Tools.isEmpty(data)) {
|
||||
PageData result = new PageData();
|
||||
result.put("PIC_PATH",defaultPicPath);
|
||||
result.put("BACK_END_PATH", defaultBackEndPath);
|
||||
return result;
|
||||
}
|
||||
return data;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,100 @@
|
|||
package com.zcloud.service.xgf;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:培训学员
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2023-05-08
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
public interface TrainUsersService{
|
||||
|
||||
/**新增
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void save(PageData pd)throws Exception;
|
||||
|
||||
/**删除
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void delete(PageData pd)throws Exception;
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void edit(PageData pd)throws Exception;
|
||||
|
||||
/**固定服务人员培训管理列表
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> list(Page page)throws Exception;
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> listAll(PageData pd)throws Exception;
|
||||
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public PageData findById(PageData pd)throws Exception;
|
||||
|
||||
/**批量删除
|
||||
* @param ArrayDATA_IDS
|
||||
* @throws Exception
|
||||
*/
|
||||
public void deleteAll(String[] ArrayDATA_IDS)throws Exception;
|
||||
|
||||
/**
|
||||
* 固定服务人员培训管理查看
|
||||
* @param pd
|
||||
* @return
|
||||
*/
|
||||
public PageData trainView(PageData pd) throws Exception;
|
||||
|
||||
/**
|
||||
* 培训申请记录
|
||||
* @param pd
|
||||
* @return
|
||||
*/
|
||||
public List<PageData> trainApplicationRecordList(Page page);
|
||||
|
||||
|
||||
/**固定人员列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> unflowlist(Page page)throws Exception;
|
||||
|
||||
/**审核
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void audit(PageData pd)throws Exception;
|
||||
|
||||
|
||||
/**新增
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void approveUser(PageData pd)throws Exception;
|
||||
List<PageData> findinfoByCondition(PageData condition) throws Exception;
|
||||
|
||||
void endApproval(PageData pd) throws Exception;
|
||||
}
|
||||
|
|
@ -0,0 +1,95 @@
|
|||
package com.zcloud.service.xgf;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:培训批次管理
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2023-05-08
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
public interface TrainingBatchService{
|
||||
|
||||
/**新增
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void save(PageData pd)throws Exception;
|
||||
|
||||
public void unflowTrain(PageData pd)throws Exception;
|
||||
|
||||
/**删除
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void delete(PageData pd)throws Exception;
|
||||
|
||||
/**修改
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void edit(PageData pd)throws Exception;
|
||||
|
||||
/**审核
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void audit(PageData pd)throws Exception;
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> list(Page page)throws Exception;
|
||||
|
||||
/**列表(全部)
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> listAll(PageData pd)throws Exception;
|
||||
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public PageData findById(PageData pd)throws Exception;
|
||||
|
||||
/**批量删除
|
||||
* @param ArrayDATA_IDS
|
||||
* @throws Exception
|
||||
*/
|
||||
public void deleteAll(String[] ArrayDATA_IDS)throws Exception;
|
||||
|
||||
/**
|
||||
* 获取编号
|
||||
* @param pd
|
||||
* @return
|
||||
*/
|
||||
public PageData getCode(PageData pd) throws Exception;
|
||||
|
||||
/**批次内人员列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> batchUserlistPage(Page page)throws Exception;
|
||||
|
||||
List<PageData> passUserlistPage(Page page) throws Exception;
|
||||
|
||||
void graduation(PageData condition);
|
||||
|
||||
void openClass(PageData condition);
|
||||
|
||||
void openStudentClass(PageData condition);
|
||||
|
||||
void updateClassMessage(PageData condition);
|
||||
|
||||
void saveFlow(PageData request) throws Exception;
|
||||
|
||||
List<PageData> findByUserId(PageData condition) throws Exception;
|
||||
|
||||
List<PageData> oldBatchList(Page page) throws Exception;
|
||||
}
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
package com.zcloud.service.xgf;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface XgfUserService {
|
||||
|
||||
void save(PageData pd) throws Exception;
|
||||
|
||||
void saveDetail(PageData pd) throws Exception;
|
||||
|
||||
List<PageData> list(Page page) throws Exception;
|
||||
|
||||
void init(PageData request) throws Exception;
|
||||
|
||||
void approvalApplication(PageData request) throws Exception;
|
||||
|
||||
List<PageData> flowlistPage(Page page)throws Exception;
|
||||
|
||||
void approve(PageData request) throws Exception;
|
||||
|
||||
PageData findInfo(PageData condition);
|
||||
|
||||
List<PageData> findRecordList(PageData condition) throws Exception;
|
||||
}
|
|
@ -0,0 +1,207 @@
|
|||
package com.zcloud.service.xgf.impl;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.mapper.datasource.system.UsersMapper;
|
||||
import com.zcloud.mapper.datasource.xgf.*;
|
||||
import com.zcloud.service.xgf.TrainUsersService;
|
||||
import com.zcloud.util.DateUtil;
|
||||
import com.zcloud.util.Tools;
|
||||
import com.zcloud.util.Warden;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 说明:培训学员
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2023-05-08
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
@Service
|
||||
@Transactional //开启事物
|
||||
public class TrainUsersServiceImpl implements TrainUsersService {
|
||||
|
||||
@Resource
|
||||
private TrainUsersMapper trainusersMapper;
|
||||
|
||||
@Resource
|
||||
private TrainingBatchMapper trainingBatchMapper;
|
||||
@Resource
|
||||
private XgfUserMapper xgfUserMapper;
|
||||
|
||||
@Resource
|
||||
private FlowDetailMapper flowDetailMapper;
|
||||
|
||||
@Resource
|
||||
private FlowMapper flowMapper;
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void save(PageData pd) throws Exception {
|
||||
trainusersMapper.save(pd);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void delete(PageData pd) throws Exception {
|
||||
trainusersMapper.delete(pd);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void edit(PageData pd) throws Exception {
|
||||
trainusersMapper.edit(pd);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> list(Page page) throws Exception {
|
||||
return trainusersMapper.datalistPage(page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表(全部)
|
||||
*
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> listAll(PageData pd) throws Exception {
|
||||
return trainusersMapper.listAll(pd);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id获取数据
|
||||
*
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public PageData findById(PageData pd) throws Exception {
|
||||
return trainusersMapper.findById(pd);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ArrayDATA_IDS
|
||||
* @throws Exception
|
||||
*/
|
||||
public void deleteAll(String[] ArrayDATA_IDS) throws Exception {
|
||||
trainusersMapper.deleteAll(ArrayDATA_IDS);
|
||||
}
|
||||
|
||||
/**
|
||||
* 固定服务人员培训管理查看
|
||||
*
|
||||
* @param pd
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@Override
|
||||
public PageData trainView(PageData pd) throws Exception {
|
||||
return trainusersMapper.trainView(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PageData> trainApplicationRecordList(Page page) {
|
||||
return trainusersMapper.trainApplicationRecordList(page);
|
||||
}
|
||||
|
||||
|
||||
public List<PageData> unflowlist(Page page) throws Exception {
|
||||
return trainusersMapper.unflowlistPage(page);
|
||||
}
|
||||
|
||||
public void audit(PageData pd) throws Exception {
|
||||
if (Integer.parseInt(pd.getString("AUDIT_STATUS")) == -1) {
|
||||
|
||||
} else if (Integer.parseInt(pd.getString("AUDIT_STATUS")) == 1) {
|
||||
pd.put("STATUS", 2);
|
||||
pd.put("END_DATE", DateUtil.date2Str(new Date()));
|
||||
xgfUserMapper.updateStatusByUnflowTrain(pd);
|
||||
trainusersMapper.updateStatus(pd);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void approveUser(PageData pd) throws Exception {
|
||||
PageData condition = new PageData();
|
||||
condition.put("TRAIN_USERS_ID", pd.get("TRAIN_USERS_ID"));
|
||||
PageData userEntity = trainusersMapper.findById(condition);
|
||||
switch (userEntity.getString("STEP_STATUS")){
|
||||
case "0":
|
||||
userEntity.put("TERRITORIALITY_STATE", pd.getString("IS_STATE"));
|
||||
userEntity.put("TERRITORIALITY_OPINION", pd.getString("OPINION"));
|
||||
userEntity.put("TERRITORIALITY_TIME", DateUtil.getTime());
|
||||
break;
|
||||
case "1":
|
||||
userEntity.put("MANAGER_STATE", pd.getString("IS_STATE"));
|
||||
userEntity.put("MANAGER_OPINION", pd.getString("OPINION"));
|
||||
userEntity.put("MANAGER_TIME", DateUtil.getTime());
|
||||
break;
|
||||
case "3":
|
||||
userEntity.put("SUPERVISION_STATE", pd.getString("IS_STATE"));
|
||||
userEntity.put("SUPERVISION_OPINION", pd.getString("OPINION"));
|
||||
userEntity.put("SUPERVISION_TIME", DateUtil.getTime());
|
||||
break;
|
||||
}
|
||||
if ("0".equals(pd.getString("IS_STATE"))) {
|
||||
userEntity.put("STEP_STATUS", '-' + userEntity.getString("STEP_STATUS"));
|
||||
userEntity.put("RESULT_STATUS","3");
|
||||
} else {
|
||||
int stepNumber = Integer.parseInt(userEntity.getString("STEP_STATUS")) + 1;
|
||||
if (stepNumber == 3){
|
||||
userEntity.put("RESULT_STATUS","2");
|
||||
}
|
||||
userEntity.put("STEP_STATUS", Integer.toString(stepNumber));
|
||||
}
|
||||
trainusersMapper.edit(userEntity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PageData> findinfoByCondition(PageData condition) throws Exception {
|
||||
return trainusersMapper.findinfoByCondition(condition);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void endApproval(PageData pd) throws Exception {
|
||||
PageData condition = new PageData();
|
||||
condition.put("TRAINING_BATCH_ID",pd.getString("TRAINING_BATCH_ID"));
|
||||
PageData entity = trainingBatchMapper.findById(condition);
|
||||
int stepNumber = Integer.parseInt(entity.getString("STEP_STATUS"));
|
||||
switch (stepNumber){
|
||||
case 0:
|
||||
entity.put("TERRITORIALITY_TIME",DateUtil.getTime());
|
||||
break;
|
||||
case 1:
|
||||
entity.put("MANAGER_TIME",DateUtil.getTime());
|
||||
break;
|
||||
case 2:
|
||||
entity.put("SUPERVISION_TIME",DateUtil.getTime());
|
||||
break;
|
||||
}
|
||||
entity.put("STEP_STATUS",++stepNumber);
|
||||
trainingBatchMapper.edit(entity);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,416 @@
|
|||
package com.zcloud.service.xgf.impl;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.mapper.datasource.system.DepartmentMapper;
|
||||
import com.zcloud.mapper.datasource.system.UsersMapper;
|
||||
import com.zcloud.mapper.datasource.xgf.*;
|
||||
import com.zcloud.service.xgf.TrainingBatchService;
|
||||
import com.zcloud.util.*;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.text.DecimalFormat;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 说明:培训批次管理
|
||||
* 作者:luoxiaobao
|
||||
* 时间:2023-05-08
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
@Service
|
||||
@Transactional //开启事物
|
||||
public class TrainingBatchServiceImpl implements TrainingBatchService {
|
||||
|
||||
@Resource
|
||||
private TrainingBatchMapper trainingbatchMapper;
|
||||
|
||||
@Resource
|
||||
private TrainUsersMapper trainUsersMapper;
|
||||
|
||||
@Resource
|
||||
private XgfUserMapper xgfUserMapper;
|
||||
|
||||
@Resource
|
||||
private FlowMapper flowMapper;
|
||||
|
||||
@Resource
|
||||
private FlowDetailMapper flowDetailMapper;
|
||||
|
||||
@Resource
|
||||
private UsersMapper usersMapper;
|
||||
|
||||
@Resource
|
||||
private DepartmentMapper departmentMapper;
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void save(PageData pd) throws Exception {
|
||||
/* 保存主题信息 */
|
||||
String batch_id = UuidUtil.get32UUID();
|
||||
String train_area = pd.getString("TRAIN_AREA");
|
||||
pd.put("TRAINING_BATCH_ID", batch_id); //主键
|
||||
pd.put("CREATOR", Jurisdiction.getUsername()); //添加人
|
||||
pd.put("CREATTIME", DateUtil.date2Str(new Date())); //添加时间
|
||||
pd.put("OPERATOR", Jurisdiction.getUsername()); //修改人
|
||||
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
pd.put("ISDELETE", 0); //是否删除 1-是 0-否
|
||||
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
DecimalFormat dft = new DecimalFormat("00");
|
||||
int year = calendar.get(Calendar.YEAR);
|
||||
String month = dft.format(calendar.get(Calendar.MONTH) + 1);
|
||||
pd.put("CREATDATE", year + "-" + month);
|
||||
PageData cpd = trainingbatchMapper.getCode(pd); //根据ID读取
|
||||
String code = year + "-" + month + "-" + dft.format((Integer.parseInt(cpd.get("code").toString()) + 1));
|
||||
pd.put("BATCH_NAME", code);
|
||||
/*翻译*/
|
||||
PageData condition = new PageData();
|
||||
condition.put("USER_ID", pd.get("SUPERVISION_USER_ID"));
|
||||
PageData supUser = usersMapper.getUserInfo(condition);
|
||||
pd.put("SUPERVISION_USER_NAME", supUser.get("NAME"));
|
||||
|
||||
condition.clear();
|
||||
condition.put("DEPARTMENT_ID", pd.get("SUPERVISION"));
|
||||
PageData supDepartment = departmentMapper.getInfo(condition);
|
||||
pd.put("SUPERVISION_DEPARTMENT_NAME", supDepartment.get("NAME"));
|
||||
|
||||
condition.clear();
|
||||
condition.put("USER_ID", pd.get("MANAGER_USER_ID"));
|
||||
PageData manUser = usersMapper.getUserInfo(condition);
|
||||
pd.put("MANAGER_USER_NAME", manUser.get("NAME"));
|
||||
|
||||
condition.clear();
|
||||
condition.put("DEPARTMENT_ID", pd.get("MANAGER"));
|
||||
PageData manDepartment = departmentMapper.getInfo(condition);
|
||||
pd.put("MANAGER_DEPARTMENT_NAME", manDepartment.get("NAME"));
|
||||
|
||||
// 2023-12-21 相关方功能限制,暂时移除集团单位审批节点 created by sparrow
|
||||
if (StringUtils.isNotEmpty(pd.getString("TERRITORIALITY_USER_ID"))) {
|
||||
condition.clear();
|
||||
condition.put("USER_ID", pd.get("TERRITORIALITY_USER_ID"));
|
||||
PageData terUser = usersMapper.getUserInfo(condition);
|
||||
pd.put("TERRITORIALITY_USER_NAME", terUser == null ? "" : terUser.get("NAME"));
|
||||
|
||||
condition.clear();
|
||||
condition.put("DEPARTMENT_ID", pd.get("TERRITORIALITY"));
|
||||
PageData terDepartment = departmentMapper.getInfo(condition);
|
||||
pd.put("TERRITORIALITY_DEPARTMENT_NAME", terDepartment == null ? "" : terDepartment.get("NAME"));
|
||||
}
|
||||
|
||||
pd.put("IS_DELETE", "0");
|
||||
pd.put("STEP_STATUS", "1");
|
||||
trainingbatchMapper.save(pd);
|
||||
|
||||
String arrayDATA_ids[] = pd.getString("users").split(",");
|
||||
Arrays.asList(arrayDATA_ids).forEach(id -> {
|
||||
PageData user = new PageData();
|
||||
user.put("TRAIN_USERS_ID", UuidUtil.get32UUID());
|
||||
user.put("TRAINING_BATCH_ID", batch_id);
|
||||
user.put("USER_ID", id);
|
||||
user.put("TRAIN_AREA", train_area);
|
||||
user.put("STATUS", 0);
|
||||
user.put("SUPERVISION_STATE", 9);
|
||||
user.put("MANAGER_STATE", 9);
|
||||
user.put("TERRITORIALITY_STATE", 9);
|
||||
user.put("STEP_STATUS", "1");
|
||||
user.put("BELONG_TO_CORP", pd.get("BELONG_TO_CORP"));
|
||||
user.put("BELONG_TO_CORP_NAME", pd.get("BELONG_TO_CORP_NAME"));
|
||||
user.put("IS_DELETE", "0");
|
||||
user.put("RESULT_STATUS", "1");
|
||||
trainUsersMapper.save(user);
|
||||
condition.clear();
|
||||
condition.put("XGF_USER_ID", id);
|
||||
PageData userEntity = xgfUserMapper.findById(condition);
|
||||
userEntity.put("STATUS", "3");
|
||||
userEntity.put("STUDY_STATUS", "9");
|
||||
xgfUserMapper.edit(userEntity);
|
||||
});
|
||||
|
||||
/* 保存审批流程信息 */
|
||||
PageData flow = new PageData();
|
||||
flow.put("FLOW_ID", Warden.get32UUID());
|
||||
flow.put("TYPE", "0");
|
||||
flow.put("CREATOR", Jurisdiction.getUSER_ID());
|
||||
flow.put("CREATOR_NAME", Jurisdiction.getName());
|
||||
flow.put("CREATOR_TIME", DateUtil.getTime());
|
||||
flow.put("VALID_FLAG", "1");
|
||||
flow.put("FOREIGN_KEY", pd.getString("TRAINING_BATCH_ID"));
|
||||
flow.put("ISDELETE", "0");
|
||||
flowMapper.save(flow);
|
||||
/* 保存审批流程明细信息 */
|
||||
PageData flowDetail = new PageData();
|
||||
flowDetail.put("FLOW_DETAIL_ID", Warden.get32UUID());
|
||||
flowDetail.put("FLOW_ID", flow.getString("FLOW_ID"));
|
||||
flowDetail.put("STEP_FLAG", "1");
|
||||
flowDetail.put("SORT", 0);
|
||||
flowDetail.put("APPROVER_ID", Jurisdiction.getUSER_ID());
|
||||
flowDetail.put("APPROVER_NAME", Jurisdiction.getName());
|
||||
flowDetail.put("APPROVER_TIME", DateUtil.getTime());
|
||||
flowDetail.put("APPROVER_CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
|
||||
// TODO 未完成
|
||||
flowDetail.put("APPROVER_CORPINFO_NAME", "");
|
||||
flowDetail.put("PASS_FLAG", "1");
|
||||
flowDetail.put("END_FLAG", "0");
|
||||
flowDetail.put("ISDELETE", "0");
|
||||
flowDetail.put("PARENT_ID", "0");
|
||||
flowDetailMapper.save(flowDetail);
|
||||
}
|
||||
|
||||
/**
|
||||
* 固定人员培训
|
||||
*
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void unflowTrain(PageData pd) throws Exception {
|
||||
PageData trainBatch = new PageData();
|
||||
String batch_id = UuidUtil.get32UUID();
|
||||
trainBatch.put("TRAINING_BATCH_ID", batch_id); //主键
|
||||
trainBatch.put("CREATOR", pd.getString("TRAIN_CORP_LEADER_NAME")); //添加人
|
||||
trainBatch.put("CREATTIME", DateUtil.date2Str(new Date())); //添加时间
|
||||
trainBatch.put("OPERATOR", pd.getString("TRAIN_CORP_LEADER_NAME")); //修改人
|
||||
trainBatch.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
||||
trainBatch.put("ISDELETE", 0); //是否删除 1-是 0-否
|
||||
trainBatch.put("TYPE", 1);
|
||||
trainBatch.put("USER_COUNT", pd.getString("USER_COUNT"));
|
||||
trainBatch.put("AUDIT_STATUS", 0);
|
||||
trainBatch.put("TRAIN_CORP_DEPT", pd.getString("TRAIN_CORP_DEPT"));
|
||||
trainBatch.put("TRAIN_CORP_LEADER", pd.getString("TRAIN_CORP_LEADER"));
|
||||
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
DecimalFormat dft = new DecimalFormat("00");
|
||||
int year = calendar.get(Calendar.YEAR);
|
||||
String month = dft.format(calendar.get(Calendar.MONTH) + 1);
|
||||
trainBatch.put("CREATDATE", year + "-" + month);
|
||||
PageData cpd = trainingbatchMapper.getCode(trainBatch); //根据ID读取
|
||||
String code = year + "-" + month + "-" + dft.format((Integer.parseInt(cpd.get("code").toString()) + 1));
|
||||
trainBatch.put("BATCH_NAME", code);
|
||||
|
||||
trainingbatchMapper.save(trainBatch);
|
||||
trainBatch.put("AUDIT_STATUS", "2");
|
||||
this.audit(trainBatch);
|
||||
|
||||
String arrayDATA_IDS[] = pd.getString("users").split(",");
|
||||
Arrays.asList(arrayDATA_IDS).forEach(id -> {
|
||||
PageData user = new PageData();
|
||||
user.put("TRAIN_USERS_ID", UuidUtil.get32UUID());
|
||||
user.put("TRAINING_BATCH_ID", batch_id);
|
||||
user.put("USER_ID", id);
|
||||
user.put("TRAIN_CORPINFO_ID", pd.getString("FIRST_PARTY_ID"));
|
||||
user.put("STATUS", 1);
|
||||
user.put("START_DATE", DateUtil.date2Str(new Date()));
|
||||
user.put("SUPERVISION_STATE", 9);
|
||||
user.put("MANAGER_STATE", 9);
|
||||
user.put("TERRITORIALITY_STATE", 9);
|
||||
user.put("STEP_STATUS", "0");
|
||||
trainUsersMapper.save(user);
|
||||
});
|
||||
xgfUserMapper.bantchUpdateStatus(1, arrayDATA_IDS);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void delete(PageData pd) throws Exception {
|
||||
trainingbatchMapper.delete(pd);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void edit(PageData pd) throws Exception {
|
||||
trainingbatchMapper.edit(pd);
|
||||
}
|
||||
|
||||
public void audit(PageData pd) throws Exception {
|
||||
if (Integer.parseInt(pd.getString("AUDIT_STATUS")) == -1) {
|
||||
pd.put("STATUS", 0);
|
||||
pd.put("ENTRUST_TIME", DateUtil.date2Str(new Date()));
|
||||
xgfUserMapper.updateStatusByFlowTrain(pd);
|
||||
trainingbatchMapper.audit(pd);
|
||||
} else if (Integer.parseInt(pd.getString("AUDIT_STATUS")) == 2) {
|
||||
pd.put("STATUS", 1);
|
||||
pd.put("START_DATE", DateUtil.date2Str(new Date()));
|
||||
pd.put("AUDIT_TIME", DateUtil.date2Str(new Date()));
|
||||
xgfUserMapper.updateStatusByFlowTrain(pd);
|
||||
trainUsersMapper.updateStatusByFlowTrain(pd);
|
||||
trainingbatchMapper.audit(pd);
|
||||
} else if (Integer.parseInt(pd.getString("AUDIT_STATUS")) == 3) {
|
||||
pd.put("STATUS", 2);
|
||||
pd.put("END_DATE", DateUtil.date2Str(new Date()));
|
||||
pd.put("VERIFY_TIME", DateUtil.date2Str(new Date()));
|
||||
xgfUserMapper.updateStatusByFlowTrain(pd);
|
||||
trainUsersMapper.updateStatusByFlowTrain(pd);
|
||||
trainingbatchMapper.audit(pd);
|
||||
} else {
|
||||
pd.put("ENTRUST_TIME", DateUtil.date2Str(new Date()));
|
||||
trainingbatchMapper.audit(pd);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> list(Page page) throws Exception {
|
||||
return trainingbatchMapper.datalistPage(page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表(全部)
|
||||
*
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> listAll(PageData pd) throws Exception {
|
||||
return trainingbatchMapper.listAll(pd);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id获取数据
|
||||
*
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public PageData findById(PageData pd) throws Exception {
|
||||
return trainingbatchMapper.findById(pd);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ArrayDATA_IDS
|
||||
* @throws Exception
|
||||
*/
|
||||
public void deleteAll(String[] ArrayDATA_IDS) throws Exception {
|
||||
trainingbatchMapper.deleteAll(ArrayDATA_IDS);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取编号
|
||||
*
|
||||
* @param pd
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public PageData getCode(PageData pd) throws Exception {
|
||||
return trainingbatchMapper.getCode(pd);
|
||||
}
|
||||
|
||||
public List<PageData> batchUserlistPage(Page page) throws Exception {
|
||||
return trainingbatchMapper.batchUserlistPage(page);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PageData> passUserlistPage(Page page) throws Exception {
|
||||
return trainingbatchMapper.passUserlistPage(page);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void graduation(PageData condition) {
|
||||
trainingbatchMapper.graduation(condition);
|
||||
xgfUserMapper.graduation(condition);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void openClass(PageData info) {
|
||||
List<PageData> list = Warden.getList(info.getString("list"));
|
||||
PageData condition = new PageData();
|
||||
condition.put("STATUS", info.getString("userStatus"));
|
||||
condition.put("list", list.stream().filter(n -> "1".equals(n.getString("STATUS"))).map(n -> n.getString("USER_ID")).collect(Collectors.toList()));
|
||||
xgfUserMapper.graduation(condition);
|
||||
|
||||
condition.clear();
|
||||
condition.put("STATUS", info.getString("detailsStatus"));
|
||||
condition.put("list", list.stream().filter(n -> "1".equals(n.getString("STATUS"))).map(n -> n.getString("TRAIN_USERS_ID")).collect(Collectors.toList()));
|
||||
trainUsersMapper.graduation(condition);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void openStudentClass(PageData info) {
|
||||
// List<PageData> list = Warden.getList(info.getString("list"));
|
||||
PageData condition = new PageData();
|
||||
condition.put("STATUS", info.getString("userStatus"));
|
||||
condition.put("USER_ID", info.getString("USER_ID"));
|
||||
xgfUserMapper.graduationstudent(condition);
|
||||
|
||||
condition.clear();
|
||||
condition.put("STATUS", info.getString("detailsStatus"));
|
||||
condition.put("TRAIN_USERS_ID", info.getString("TRAIN_USERS_ID"));
|
||||
trainUsersMapper.graduationstudent(condition);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateClassMessage(PageData info) {
|
||||
List<PageData> list = Warden.getList(info.getString("list"));
|
||||
PageData condition = new PageData();
|
||||
condition.put("list", list.stream().map(n -> n.getString("TRAIN_USERS_ID")).collect(Collectors.toList()));
|
||||
if (StringUtils.isNotEmpty(info.getString("START_DATE"))) {
|
||||
condition.put("START_DATE", DateUtil.getTime());
|
||||
}
|
||||
if (StringUtils.isNotEmpty(info.getString("END_DATE"))) {
|
||||
condition.put("END_DATE", DateUtil.getTime());
|
||||
}
|
||||
trainUsersMapper.updateDate(condition);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveFlow(PageData request) throws Exception {
|
||||
/* 保存审批流程明细信息 */
|
||||
PageData condition = new PageData();
|
||||
condition.put("FLOW_ID", request.getString("FLOW_ID"));
|
||||
condition.put("STEP_FLAG", "1");
|
||||
PageData flow = flowDetailMapper.selectOne(condition);
|
||||
flow.put("STEP_FLAG", "0");
|
||||
flowDetailMapper.edit(flow);
|
||||
PageData next_flow = new PageData();
|
||||
next_flow.put("FLOW_DETAIL_ID", Warden.get32UUID());
|
||||
next_flow.put("FLOW_ID", flow.getString("FLOW_ID"));
|
||||
next_flow.put("STEP_FLAG", "1");
|
||||
next_flow.put("SORT", (Integer) flow.get("SORT") + 1);
|
||||
next_flow.put("APPROVER_ID", request.get("APPROVER_ID"));
|
||||
next_flow.put("APPROVER_NAME", request.get("APPROVER_NAME"));
|
||||
next_flow.put("APPROVER_TIME", DateUtil.getTime());
|
||||
next_flow.put("APPROVER_CORPINFO_ID", request.get("APPROVER_CORPINFO_ID"));
|
||||
next_flow.put("APPROVER_CORPINFO_NAME", request.get("APPROVER_CORPINFO_NAME"));
|
||||
next_flow.put("PASS_FLAG", "1");
|
||||
next_flow.put("END_FLAG", "0");
|
||||
next_flow.put("ISDELETE", "0");
|
||||
next_flow.put("PARENT_ID", flow.getString("FLOW_DETAIL_ID"));
|
||||
flowDetailMapper.save(next_flow);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PageData> findByUserId(PageData condition) throws Exception {
|
||||
return trainingbatchMapper.findByUserId(condition);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PageData> oldBatchList(Page page) throws Exception {
|
||||
return trainingbatchMapper.oldlistPage(page);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,199 @@
|
|||
package com.zcloud.service.xgf.impl;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.mapper.datasource.xgf.TrainUsersMapper;
|
||||
import com.zcloud.mapper.datasource.xgf.XgfUserDetailsMapper;
|
||||
import com.zcloud.mapper.datasource.xgf.XgfUserMapper;
|
||||
import com.zcloud.service.bus.CorpInfoService;
|
||||
import com.zcloud.service.system.DepartmentService;
|
||||
import com.zcloud.service.xgf.XgfUserService;
|
||||
import com.zcloud.util.*;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Service
|
||||
public class XgfUserServiceImpl implements XgfUserService {
|
||||
|
||||
@Resource
|
||||
private XgfUserMapper xgfUserMapper;
|
||||
|
||||
@Resource
|
||||
private XgfUserDetailsMapper xgfUserDetailsMapper;
|
||||
|
||||
@Resource
|
||||
private TrainUsersMapper trainUsersMapper;
|
||||
|
||||
@Resource
|
||||
private DepartmentService departmentService;
|
||||
|
||||
@Value("${preventionxgf.api.url}")
|
||||
private String prevention_xgf_url;
|
||||
|
||||
@Override
|
||||
public void save(PageData pd) throws Exception {
|
||||
xgfUserMapper.save(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveDetail(PageData pd) throws Exception {
|
||||
xgfUserDetailsMapper.save(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PageData> list(Page page) throws Exception {
|
||||
return xgfUserDetailsMapper.listPage(page);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public void init(PageData request) throws Exception {
|
||||
List<PageData> list = Warden.getList(request.getString("infoList"));
|
||||
PageData condition = new PageData();
|
||||
for (PageData x : list) {
|
||||
if (StringUtils.isNotBlank(x.getString("USER_ID"))) {
|
||||
condition.put("XGF_USER_ID", x.getString("USER_ID"));
|
||||
PageData entity = xgfUserMapper.findById(condition);
|
||||
if (entity == null || entity.size() <= 0) {
|
||||
x.put("XGF_USER_ID", x.get("USER_ID"));
|
||||
x.put("XGF_USER_DETAILS_ID", x.get("USER_ID"));
|
||||
x.put("XGF_USER_NAME", x.get("NAME"));
|
||||
x.put("VALID_FLAG", "1");
|
||||
x.put("STATUS", "2");
|
||||
x.put("CREATED_TIME", DateUtil.getTime());
|
||||
x.put("OPERATOR_TIME", DateUtil.getTime());
|
||||
x.put("IS_DELETE", "0");
|
||||
x.put("CREATE_TIME", DateUtil.getTime());
|
||||
/* 监管部门 */
|
||||
condition.clear();
|
||||
condition.put("DEPARTMENT_ID", x.get("MANAGER_DEPARTMENT_ID"));
|
||||
PageData regDepartmentEntity = departmentService.getCorpDepartment(condition);
|
||||
if (regDepartmentEntity != null && regDepartmentEntity.size() > 0) {
|
||||
x.put("MANAGER_DEPARTMENT_NAME", regDepartmentEntity.get("NAME"));
|
||||
}
|
||||
|
||||
/* 主管部门 */
|
||||
condition.clear();
|
||||
condition.put("DEPARTMENT_ID", x.get("MAIN_DEPARTMENT_ID"));
|
||||
regDepartmentEntity = departmentService.getCorpDepartment(condition);
|
||||
x.put("MAIN_DEPARTMENT_NAME", regDepartmentEntity.get("NAME"));
|
||||
if (regDepartmentEntity.size() > 0) {
|
||||
x.put("MAIN_DEPARTMENT_NAME", regDepartmentEntity.get("NAME"));
|
||||
}
|
||||
xgfUserMapper.save(x);
|
||||
xgfUserDetailsMapper.save(x);
|
||||
} else {
|
||||
x.put("XGF_USER_ID", x.get("USER_ID"));
|
||||
x.put("XGF_USER_DETAILS_ID", x.get("USER_ID"));
|
||||
x.put("IS_DELETE", "0");
|
||||
x.put("CREATE_TIME", DateUtil.getTime());
|
||||
x.put("OPERATOR_TIME", DateUtil.getTime());
|
||||
/* 监管部门 */
|
||||
condition.clear();
|
||||
condition.put("DEPARTMENT_ID", x.get("MANAGER_DEPARTMENT_ID"));
|
||||
PageData regDepartmentEntity = departmentService.getCorpDepartment(condition);
|
||||
if (regDepartmentEntity != null && regDepartmentEntity.size() > 0) {
|
||||
x.put("MANAGER_DEPARTMENT_NAME", regDepartmentEntity.get("NAME"));
|
||||
}
|
||||
/* 主管部门 */
|
||||
condition.clear();
|
||||
condition.put("DEPARTMENT_ID", x.get("MAIN_DEPARTMENT_ID"));
|
||||
regDepartmentEntity = departmentService.getCorpDepartment(condition);
|
||||
x.put("MAIN_DEPARTMENT_NAME", regDepartmentEntity.get("NAME"));
|
||||
if (regDepartmentEntity.size() > 0) {
|
||||
x.put("MAIN_DEPARTMENT_NAME", regDepartmentEntity.get("NAME"));
|
||||
}
|
||||
x.put("IS_DELETE", "0");
|
||||
x.put("VALID_FLAG", "1");
|
||||
x.put("STATUS", "2");
|
||||
if ("2".equals(x.getString("STUDY_STATUS"))) {
|
||||
x.put("STUDY_STATUS", "2");
|
||||
}else {
|
||||
x.put("STUDY_STATUS", entity.getString("STUDY_STATUS"));
|
||||
}
|
||||
x.put("STUDY_STATUS",entity.getString("STUDY_STATUS"));
|
||||
|
||||
xgfUserMapper.edit(x);
|
||||
xgfUserDetailsMapper.edit(x);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void approvalApplication(PageData request) throws Exception {
|
||||
|
||||
|
||||
List<String> list = Arrays.asList(request.getString("xgf_user_ids").split(","));
|
||||
|
||||
PageData condition = new PageData();
|
||||
condition.put("XGF_USER_IDS", list);
|
||||
List<PageData> entities = xgfUserMapper.listByIds(condition);
|
||||
/* 校验所有数据是否都是正常状态 */
|
||||
if (entities.stream().anyMatch(n -> !"2".equals(n.getString("STATUS")))) {
|
||||
String name = entities.stream().filter(n -> !"2".equals(n.getString("STATUS"))).map( n -> n.getString("NAME")).collect(Collectors.joining(","));
|
||||
throw new RuntimeException("用户[" + name + "]在系统流程中无法被打回");
|
||||
}
|
||||
|
||||
for (PageData x : entities) {
|
||||
x.put("VALID_FLAG", "0");
|
||||
x.put("STATUS", "1");
|
||||
xgfUserMapper.edit(x);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PageData> flowlistPage(Page page) throws Exception {
|
||||
return xgfUserMapper.flowlistPage(page);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public void approve(PageData request) throws Exception {
|
||||
List<PageData> _list = Warden.getList(request.getString("list"));
|
||||
if (_list == null || _list.size() == 0) {
|
||||
throw new RuntimeException("请求数据异常");
|
||||
}
|
||||
List<String> list = _list.stream().map(x -> x.getString("XGF_USER_ID")).collect(Collectors.toList());
|
||||
PageData condition = new PageData();
|
||||
for (String x : list) {
|
||||
condition.put("XGF_USER_ID", x);
|
||||
PageData entity = xgfUserMapper.findById(condition);
|
||||
if (entity == null || entity.size() == 0) {
|
||||
throw new RuntimeException("未找到该用户");
|
||||
}
|
||||
if ("1".equals(request.getString("STATUS"))) {
|
||||
entity.put("STATUS", "0");
|
||||
} else {
|
||||
entity.put("STATUS", "2");
|
||||
entity.put("VALID_FLAG", "1");
|
||||
}
|
||||
xgfUserMapper.edit(entity);
|
||||
|
||||
entity.put("USER_ID", condition.get("XGF_USER_ID"));
|
||||
entity.put("STATUS", request.getString("STATUS"));
|
||||
Map result = HttpClientService.doPost(prevention_xgf_url + "openApi/user/approve", entity);
|
||||
if (result == null || !"succeed".equals(result.get("result"))) {
|
||||
throw new RuntimeException("请求失败");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageData findInfo(PageData condition) {
|
||||
return xgfUserMapper.getInfoById(condition);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PageData> findRecordList(PageData condition) throws Exception {
|
||||
return xgfUserMapper.findRecordList(condition);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,146 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zcloud.mapper.datasource.corpsystem.CorpMenuMapper">
|
||||
|
||||
<resultMap type="Menu" id="menuResultMap">
|
||||
<id column="MENU_ID" property="MENU_ID"/>
|
||||
<result column="MENU_NAME" property="MENU_NAME"/>
|
||||
<result column="MENU_URL" property="MENU_URL"/>
|
||||
<result column="PARENT_ID" property="PARENT_ID"/>
|
||||
<result column="MENU_ORDER" property="MENU_ORDER"/>
|
||||
<result column="MENU_ICON" property="MENU_ICON"/>
|
||||
<result column="MENU_TYPE" property="MENU_TYPE"/>
|
||||
<result column="SHIRO_KEY" property="SHIRO_KEY"/>
|
||||
<result column="COMPONENT" property="COMPONENT"/>
|
||||
<result column="SHOW_MODEL" property="SHOW_MODEL"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- ztree -->
|
||||
<resultMap type="Menu" id="menuZtreeResultMap">
|
||||
<id column="MENU_ID" property="MENU_ID"/>
|
||||
<result column="MENU_NAME" property="MENU_NAME"/>
|
||||
<result column="MENU_URL" property="MENU_URL"/>
|
||||
<result column="PARENT_ID" property="PARENT_ID"/>
|
||||
<result column="MENU_ORDER" property="MENU_ORDER"/>
|
||||
<result column="MENU_ICON" property="MENU_ICON"/>
|
||||
<result column="MENU_TYPE" property="MENU_TYPE"/>
|
||||
<result column="SHIRO_KEY" property="SHIRO_KEY"/>
|
||||
<result column="COMPONENT" property="COMPONENT"/>
|
||||
<result column="SHOW_MODEL" property="SHOW_MODEL"/>
|
||||
<result column="target" property="target"></result>
|
||||
</resultMap>
|
||||
|
||||
<!--表名 -->
|
||||
<sql id="tableName">
|
||||
SYS_MENU
|
||||
</sql>
|
||||
|
||||
<!-- 字段 -->
|
||||
<sql id="Field">
|
||||
MENU_ID,
|
||||
MENU_NAME,
|
||||
MENU_URL,
|
||||
PARENT_ID,
|
||||
MENU_ICON,
|
||||
SHIRO_KEY,
|
||||
MENU_ORDER,
|
||||
MENU_STATE,
|
||||
MENU_TYPE,
|
||||
COMPONENT,
|
||||
SHOW_MODEL
|
||||
</sql>
|
||||
|
||||
<!-- 字段值 -->
|
||||
<sql id="FieldValue">
|
||||
#{MENU_ID},
|
||||
#{MENU_NAME},
|
||||
#{MENU_URL},
|
||||
#{PARENT_ID},
|
||||
#{MENU_ICON},
|
||||
#{SHIRO_KEY},
|
||||
#{MENU_ORDER},
|
||||
#{MENU_STATE},
|
||||
#{MENU_TYPE},
|
||||
#{COMPONENT},
|
||||
#{SHOW_MODEL}
|
||||
</sql>
|
||||
|
||||
<!--新增 -->
|
||||
<insert id="addMenu" parameterType="menu">
|
||||
insert into
|
||||
<include refid="tableName"></include>
|
||||
(
|
||||
<include refid="Field"></include>
|
||||
) values (
|
||||
<include refid="FieldValue"></include>
|
||||
)
|
||||
</insert>
|
||||
|
||||
<!--编辑 -->
|
||||
<update id="edit" parameterType="menu">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
MENU_NAME =#{MENU_NAME},
|
||||
MENU_URL =#{MENU_URL} ,
|
||||
MENU_ORDER=#{MENU_ORDER},
|
||||
MENU_STATE=#{MENU_STATE},
|
||||
SHIRO_KEY=#{SHIRO_KEY},
|
||||
MENU_TYPE =#{MENU_TYPE},
|
||||
COMPONENT=#{COMPONENT},
|
||||
SHOW_MODEL=#{SHOW_MODEL}
|
||||
where
|
||||
MENU_ID=#{MENU_ID}
|
||||
</update>
|
||||
|
||||
<!--通过菜单ID获取数据 -->
|
||||
<select id="getMenuById" parameterType="pd" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include>
|
||||
from
|
||||
<include refid="tableName"></include>
|
||||
where MENU_ID=#{MENU_ID}
|
||||
</select>
|
||||
|
||||
<!--取最大ID-->
|
||||
<select id="findMaxId" parameterType="pd" resultType="pd">
|
||||
select MAX(MENU_ID) MID from
|
||||
<include refid="tableName"></include>
|
||||
</select>
|
||||
|
||||
<!--通过ID获取其子一级菜单 -->
|
||||
<select id="listSubMenuByParentId" parameterType="String" resultMap="menuResultMap">
|
||||
select
|
||||
<include refid="Field"></include>
|
||||
from
|
||||
<include refid="tableName"></include>
|
||||
where PARENT_ID = #{parentId} order by (MENU_ORDER+0)
|
||||
</select>
|
||||
|
||||
<!--删除菜单-->
|
||||
<delete id="deleteMenuById" parameterType="String">
|
||||
delete from
|
||||
<include refid="tableName"></include>
|
||||
where MENU_ID=#{MENU_ID}
|
||||
</delete>
|
||||
|
||||
<!--保存菜单图标 -->
|
||||
<update id="editicon" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
MENU_ICON=#{MENU_ICON}
|
||||
where
|
||||
MENU_ID=#{MENU_ID}
|
||||
</update>
|
||||
<!--通过ID获取其子一级菜单 -->
|
||||
<select id="listSubMenuAll" parameterType="String" resultMap="menuResultMap">
|
||||
select
|
||||
<include refid="Field"></include>
|
||||
from
|
||||
<include refid="tableName"></include>
|
||||
where MENU_STATE = 1 order by (MENU_ORDER+0)
|
||||
</select>
|
||||
</mapper>
|
|
@ -0,0 +1,199 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zcloud.mapper.datasource.corpsystem.CorpRoleMapper">
|
||||
|
||||
<resultMap type="Role" id="roleResultMap">
|
||||
<id column="ROLE_ID" property="ROLE_ID" />
|
||||
<result column="ROLE_NAME" property="ROLE_NAME" />
|
||||
<result column="RIGHTS" property="RIGHTS" />
|
||||
<result column="DEPT_TYPE" property="DEPT_TYPE" />
|
||||
|
||||
</resultMap>
|
||||
|
||||
<!--表名 -->
|
||||
<sql id="tableName">
|
||||
SYS_ROLE
|
||||
</sql>
|
||||
|
||||
<!-- 字段 -->
|
||||
<sql id="Field">
|
||||
ROLE_ID,
|
||||
ROLE_NAME,
|
||||
RIGHTS,
|
||||
PARENT_ID,
|
||||
ADD_QX,
|
||||
DEL_QX,
|
||||
EDIT_QX,
|
||||
CHA_QX,
|
||||
DEPT_TYPE,
|
||||
RNUMBER,
|
||||
LEVEL,
|
||||
PRIMARYNUM
|
||||
</sql>
|
||||
|
||||
<!-- 字段值 -->
|
||||
<sql id="FieldValue">
|
||||
#{ROLE_ID},
|
||||
#{ROLE_NAME},
|
||||
#{RIGHTS},
|
||||
#{PARENT_ID},
|
||||
#{ADD_QX},
|
||||
#{DEL_QX},
|
||||
#{EDIT_QX},
|
||||
#{CHA_QX},
|
||||
#{DEPT_TYPE},
|
||||
#{RNUMBER},
|
||||
#{LEVEL},
|
||||
#{PRIMARYNUM}
|
||||
</sql>
|
||||
|
||||
<!-- 通过id查找 -->
|
||||
<select id="findById" parameterType="pd" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include>
|
||||
from
|
||||
<include refid="tableName"></include>
|
||||
where ROLE_ID = #{ROLE_ID}
|
||||
</select>
|
||||
|
||||
<!-- 通过id查找 返回角色对象)-->
|
||||
<select id="getRoleById" parameterType="String" resultMap="roleResultMap">
|
||||
select * from
|
||||
<include refid="tableName"></include>
|
||||
where ROLE_ID=#{ROLE_ID}
|
||||
</select>
|
||||
|
||||
<!-- 通过编码查找 -->
|
||||
<select id="getRoleByRnumber" parameterType="pd" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include>
|
||||
from
|
||||
<include refid="tableName"></include>
|
||||
where RNUMBER = #{RNUMBER}
|
||||
</select>
|
||||
|
||||
<!-- 列出此组下的角色 -->
|
||||
<select id="listAllRolesByPId" resultMap="roleResultMap">
|
||||
select
|
||||
<include refid="Field"></include>
|
||||
from
|
||||
<include refid="tableName"></include>
|
||||
where
|
||||
PARENT_ID = #{ROLE_ID}
|
||||
ORDER BY RNUMBER
|
||||
</select>
|
||||
|
||||
<!-- 添加 -->
|
||||
<insert id="add" parameterType="pd">
|
||||
insert into
|
||||
<include refid="tableName"></include>
|
||||
(
|
||||
<include refid="Field"></include>
|
||||
) values (
|
||||
<include refid="FieldValue"></include>
|
||||
)
|
||||
</insert>
|
||||
|
||||
<!-- 保存修改 -->
|
||||
<update id="edit" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set ROLE_NAME = #{ROLE_NAME},
|
||||
DEPT_TYPE = #{DEPT_TYPE},
|
||||
PRIMARYNUM = #{PRIMARYNUM},
|
||||
LEVEL = #{LEVEL}
|
||||
where ROLE_ID = #{ROLE_ID}
|
||||
</update>
|
||||
|
||||
<!-- 删除角色 -->
|
||||
<delete id="deleteRoleById" parameterType="String">
|
||||
delete from
|
||||
<include refid="tableName"></include>
|
||||
where ROLE_ID=#{ROLE_ID}
|
||||
</delete>
|
||||
|
||||
<!-- 给当前角色附加菜单权限 -->
|
||||
<update id="updateRoleRights" parameterType="role">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set RIGHTS=#{RIGHTS}
|
||||
where ROLE_ID=#{ROLE_ID}
|
||||
</update>
|
||||
|
||||
<!-- 给全部子角色加菜单权限 -->
|
||||
<update id="setAllRights" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set RIGHTS=#{rights}
|
||||
where PARENT_ID=#{ROLE_ID}
|
||||
</update>
|
||||
|
||||
<!-- 新增权限 -->
|
||||
<update id="addQx" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set ADD_QX=#{value}
|
||||
where ROLE_ID=#{ROLE_ID}
|
||||
</update>
|
||||
|
||||
<!-- 删除权限 -->
|
||||
<update id="delQx" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set DEL_QX=#{value}
|
||||
where ROLE_ID=#{ROLE_ID}
|
||||
</update>
|
||||
|
||||
<!-- 修改权限 -->
|
||||
<update id="editQx" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set EDIT_QX=#{value}
|
||||
where ROLE_ID=#{ROLE_ID}
|
||||
</update>
|
||||
|
||||
<!-- 查看权限 -->
|
||||
<update id="chaQx" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set CHA_QX=#{value}
|
||||
where ROLE_ID=#{ROLE_ID}
|
||||
</update>
|
||||
|
||||
<!-- 通过角色ID数组获取角色列表 -->
|
||||
<select id="listAllRolesByArryROLE_ID" parameterType="String" resultType="Role" >
|
||||
select
|
||||
RNUMBER
|
||||
from
|
||||
<include refid="tableName"></include>
|
||||
where
|
||||
ROLE_ID in
|
||||
<foreach item="item" index="index" collection="array" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
<!-- 角色列表(弹窗选择用) -->
|
||||
<select id="roleWindowlistPage" parameterType="page" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include>
|
||||
from
|
||||
<include refid="tableName"></include>
|
||||
where 1=1
|
||||
<if test="pd.KEYWORDS != null and pd.KEYWORDS != ''"><!-- 关键词检索 -->
|
||||
and
|
||||
(
|
||||
ROLE_NAME LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
|
||||
or
|
||||
RNUMBER LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
|
||||
)
|
||||
</if>
|
||||
<if test="pd.ROLE_ID != null and pd.ROLE_ID != ''">
|
||||
and PARENT_ID = #{pd.ROLE_ID}
|
||||
</if>
|
||||
ORDER BY RNUMBER
|
||||
</select>
|
||||
|
||||
</mapper>
|
|
@ -0,0 +1,549 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zcloud.mapper.datasource.corpsystem.CorpUsersMapper">
|
||||
|
||||
<resultMap type="User" id="userAndRoleResultMap">
|
||||
<id column="USER_ID" property="USER_ID"/>
|
||||
<result column="USERNAME" property="USERNAME"/>
|
||||
<result column="PASSWORD" property="PASSWORD"/>
|
||||
<result column="NAME" property="NAME"/>
|
||||
<result column="LAST_LOGIN" property="LAST_LOGIN"/>
|
||||
<result column="IP" property="IP"/>
|
||||
<result column="STATUS" property="STATUS"/>
|
||||
<result column="SKIN" property="SKIN"/>
|
||||
<result column="ROLE_IDS" property="ROLE_IDS"/>
|
||||
<association property="role" column="ROLE_ID" javaType="Role">
|
||||
<id column="ROLE_ID" property="ROLE_ID"/>
|
||||
<result column="ROLE_NAME" property="ROLE_NAME"/>
|
||||
<result column="ROLE_RIGHTS" property="RIGHTS"/>
|
||||
<result column="ADD_QX" property="ADD_QX"/>
|
||||
<result column="DEL_QX" property="DEL_QX"/>
|
||||
<result column="EDIT_QX" property="EDIT_QX"/>
|
||||
<result column="CHA_QX" property="CHA_QX"/>
|
||||
</association>
|
||||
</resultMap>
|
||||
<resultMap type="User" id="userResultMap">
|
||||
<id column="USER_ID" property="USER_ID"/>
|
||||
<result column="USERNAME" property="USERNAME"/>
|
||||
<result column="PASSWORD" property="PASSWORD"/>
|
||||
<result column="NAME" property="NAME"/>
|
||||
<result column="LAST_LOGIN" property="LAST_LOGIN"/>
|
||||
<result column="IP" property="IP"/>
|
||||
<result column="STATUS" property="STATUS"/>
|
||||
<result column="ROLE_ID" property="ROLE_ID"/>
|
||||
<result column="SKIN" property="SKIN"/>
|
||||
<result column="ROLE_IDS" property="ROLE_IDS"/>
|
||||
</resultMap>
|
||||
|
||||
<!--用户表名 -->
|
||||
<sql id="tableName">
|
||||
SYS_USER
|
||||
</sql>
|
||||
|
||||
<!--角色表名 -->
|
||||
<sql id="roleTableName">
|
||||
SYS_ROLE
|
||||
</sql>
|
||||
|
||||
<!-- 字段 -->
|
||||
<sql id="Field">
|
||||
USER_ID,
|
||||
USERNAME,
|
||||
PASSWORD,
|
||||
NAME,
|
||||
ROLE_ID,
|
||||
LAST_LOGIN,
|
||||
IP,
|
||||
STATUS,
|
||||
BZ,
|
||||
SKIN,
|
||||
EMAIL,
|
||||
NUMBER,
|
||||
PHONE,
|
||||
ROLE_IDS,
|
||||
FUN_IDS,
|
||||
TYPE,
|
||||
LEVEL,
|
||||
PROVINCE,
|
||||
CITY,
|
||||
COUNTRY,
|
||||
VILLAGE,
|
||||
SEX,
|
||||
SORT,
|
||||
JOB_LEVEL,
|
||||
JOB
|
||||
</sql>
|
||||
|
||||
<!-- 字段值 -->
|
||||
<sql id="FieldValue">
|
||||
#{USER_ID},
|
||||
#{USERNAME},
|
||||
#{PASSWORD},
|
||||
#{NAME},
|
||||
#{ROLE_ID},
|
||||
#{LAST_LOGIN},
|
||||
#{IP},
|
||||
#{STATUS},
|
||||
#{BZ},
|
||||
#{SKIN},
|
||||
#{EMAIL},
|
||||
#{NUMBER},
|
||||
#{PHONE},
|
||||
#{ROLE_IDS},
|
||||
#{DEPARTMENT_ID},
|
||||
#{FUN_IDS},
|
||||
#{TYPE},
|
||||
#{LEVEL},
|
||||
#{PROVINCE},
|
||||
#{CITY},
|
||||
#{COUNTRY},
|
||||
#{VILLAGE},
|
||||
#{SEX},
|
||||
#{SORT},
|
||||
#{JOB_LEVEL},
|
||||
#{JOB}
|
||||
</sql>
|
||||
|
||||
<!-- 通过USERNAME获取数据 -->
|
||||
<select id="findByUsername" parameterType="pd" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include>
|
||||
from
|
||||
<include refid="tableName"></include>
|
||||
where
|
||||
USERNAME = #{USERNAME}
|
||||
<if test="USER_ID != null and USER_ID != ''">
|
||||
and USER_ID != #{USER_ID}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!-- 通过用户ID获取数据 -->
|
||||
<select id="findById" parameterType="pd" resultType="pd">
|
||||
select
|
||||
*
|
||||
from
|
||||
<include refid="tableName"></include>
|
||||
where
|
||||
USER_ID = #{USER_ID}
|
||||
</select>
|
||||
|
||||
<!-- 通过分公司ID获取数据 -->
|
||||
<select id="findByCorpId" parameterType="pd" resultType="pd">
|
||||
select
|
||||
USER_ID,USERNAME,PASSWORD,NAME
|
||||
from
|
||||
<include refid="tableName"></include>
|
||||
where
|
||||
CORPINFO_ID = #{CORPINFO_ID}
|
||||
and ISMAIN = '1'
|
||||
</select>
|
||||
|
||||
<!-- 通过邮箱获取数据 -->
|
||||
<select id="findByEmail" parameterType="pd" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include>
|
||||
from
|
||||
<include refid="tableName"></include>
|
||||
where
|
||||
EMAIL = #{EMAIL}
|
||||
<if test="USERNAME != null and USERNAME != ''">
|
||||
and USERNAME != #{USERNAME}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!-- 通过编码获取数据 -->
|
||||
<select id="findByNumbe" parameterType="pd" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include>
|
||||
from
|
||||
<include refid="tableName"></include>
|
||||
where
|
||||
NUMBER = #{NUMBER}
|
||||
<if test="USERNAME != null and USERNAME != ''">
|
||||
and USERNAME != #{USERNAME}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!-- 列出某角色下的所有用户 -->
|
||||
<select id="listAllUserByRoldId" parameterType="pd" resultType="pd">
|
||||
select USER_ID
|
||||
from
|
||||
<include refid="tableName"></include>
|
||||
where
|
||||
ROLE_ID = #{ROLE_ID}
|
||||
</select>
|
||||
|
||||
<!-- 新增用户 -->
|
||||
<insert id="saveUser" parameterType="pd">
|
||||
insert into <include refid="tableName"></include> (
|
||||
<include refid="Field"></include>
|
||||
) values (
|
||||
<include refid="FieldValue"></include>
|
||||
)
|
||||
</insert>
|
||||
|
||||
<!-- 修改 -->
|
||||
<update id="editUser" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set NAME = #{NAME},
|
||||
DEPARTMENT_ID = #{DEPARTMENT_ID},
|
||||
ROLE_ID = #{ROLE_ID},
|
||||
ROLE_IDS = #{ROLE_IDS},
|
||||
BZ = #{BZ},
|
||||
EMAIL = #{EMAIL},
|
||||
NUMBER = #{NUMBER},
|
||||
PHONE = #{PHONE},
|
||||
LEVEL=#{LEVEL},
|
||||
TYPE=#{TYPE},
|
||||
PROVINCE=#{PROVINCE},
|
||||
CITY=#{CITY},
|
||||
COUNTRY=#{COUNTRY},
|
||||
VILLAGE=#{VILLAGE}
|
||||
<if test="PASSWORD != null and PASSWORD != ''">
|
||||
,PASSWORD = #{PASSWORD}
|
||||
</if>
|
||||
where
|
||||
USER_ID = #{USER_ID}
|
||||
</update>
|
||||
<update id="editPassword" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set PASSWORD = #{PASSWORD}
|
||||
where
|
||||
USER_ID = #{USER_ID}
|
||||
</update>
|
||||
|
||||
<!-- 用户列表 -->
|
||||
<select id="userlistPage" parameterType="page" resultType="pd">
|
||||
select u.USER_ID,
|
||||
u.USERNAME,
|
||||
u.PASSWORD,
|
||||
u.LAST_LOGIN,
|
||||
u.NAME,
|
||||
u.IP,
|
||||
u.EMAIL,
|
||||
u.NUMBER,
|
||||
u.PHONE,
|
||||
u.PROVINCE,
|
||||
u.CITY,
|
||||
u.COUNTRY,
|
||||
u.VILLAGE,
|
||||
u.TYPE,
|
||||
u.DEPARTMENT_ID,
|
||||
r.ROLE_NAME,
|
||||
u.ROLE_ID,
|
||||
d.NAME as DEPARTMENT_NAME,
|
||||
u.LEVEL,
|
||||
u.SEX,
|
||||
deptLeven.name as jobLevenName,
|
||||
d.LEVEL as deptTypeID ,
|
||||
u.JOB_LEVEL,
|
||||
u.JOB,
|
||||
u.BZ,
|
||||
u.SORT,
|
||||
u.STATUS
|
||||
from <include refid="tableName"></include> u
|
||||
left join SYS_ROLE r on u.ROLE_ID = r.ROLE_ID
|
||||
left join SYS_DEPARTMENT d on d.DEPARTMENT_ID=u.DEPARTMENT_ID
|
||||
left join `qa-gwj-prevention`.sys_dictionaries deptLeven on deptLeven.DICTIONARIES_ID=u.JOB_LEVEL
|
||||
where
|
||||
u.USERNAME != 'admin'
|
||||
and r.PARENT_ID = '1'
|
||||
<if test="pd.KEYWORDS!= null and pd.KEYWORDS != ''"><!-- 关键词检索 -->
|
||||
and
|
||||
(
|
||||
u.USERNAME LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
|
||||
or
|
||||
u.EMAIL LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
|
||||
or
|
||||
u.NUMBER LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
|
||||
or
|
||||
u.NAME LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
|
||||
or
|
||||
u.PHONE LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
|
||||
)
|
||||
</if>
|
||||
<if test="pd.ROLE_ID != null and pd.ROLE_ID != ''"> <!-- 角色检索 -->
|
||||
and u.ROLE_ID=#{pd.ROLE_ID}
|
||||
</if>
|
||||
<if test="pd.STRARTTIME!=null and pd.STRARTTIME!=''"> <!-- 登录时间检索 -->
|
||||
and u.LAST_LOGIN >= #{pd.STRARTTIME}
|
||||
</if>
|
||||
<if test="pd.ENDTIME!=null and pd.ENDTIME!=''"> <!-- 登录时间检索 -->
|
||||
and u.LAST_LOGIN <= #{pd.ENDTIME}
|
||||
</if>
|
||||
<if test="pd.DEPARTMENT_ID!=null and pd.DEPARTMENT_ID!=''"> <!-- 登录时间检索 -->
|
||||
and u.DEPARTMENT_ID = #{pd.DEPARTMENT_ID}
|
||||
</if>
|
||||
<if test="pd.PROVINCE != null and pd.PROVINCE != ''">
|
||||
and d.PROVINCE = #{pd.PROVINCE}
|
||||
</if>
|
||||
<if test="pd.CITY != null and pd.CITY != ''"><!-- 检索 -->
|
||||
and d.CITY = #{pd.CITY}
|
||||
</if>
|
||||
<if test="pd.COUNTRY != null and pd.COUNTRY != ''"><!-- 检索 -->
|
||||
and d.COUNTRY = #{pd.COUNTRY}
|
||||
</if>
|
||||
<if test="pd.VILLAGE != null and pd.VILLAGE != ''"><!-- 检索 -->
|
||||
and d.VILLAGE = #{pd.VILLAGE}
|
||||
</if>
|
||||
|
||||
<if test="pd.keyUserName != null and pd.keyUserName != ''"><!-- 用户名称 -->
|
||||
and ( u.USERNAME LIKE CONCAT(CONCAT('%', #{pd.keyUserName}),'%'))
|
||||
</if>
|
||||
<if test="pd.keyDeptLeven != null and pd.keyDeptLeven != ''"><!-- 部门级别 -->
|
||||
and d.LEVEL = #{pd.keyDeptLeven}
|
||||
</if>
|
||||
<if test="pd.keyDeptType != null and pd.keyDeptType != ''"><!-- 单位类型 -->
|
||||
and d.UNITTYPE = #{pd.keyDeptType}
|
||||
</if>
|
||||
<if test="pd.keyDepeName != null and pd.keyDepeName != ''"><!-- 部门名称 -->
|
||||
and ( d.NAME LIKE CONCAT(CONCAT('%', #{pd.keyDepeName}),'%'))
|
||||
</if>
|
||||
<if test="pd.keyJobLeven != null and pd.keyJobLeven != ''"><!-- 职务级别 -->
|
||||
and u.JOB_LEVEL = #{pd.keyJobLeven}
|
||||
</if>
|
||||
order by u.LAST_LOGIN desc
|
||||
</select>
|
||||
|
||||
<!-- 用户列表(全部) -->
|
||||
<select id="listAllUser" parameterType="pd" resultType="pd">
|
||||
select u.USER_ID,
|
||||
u.USERNAME,
|
||||
u.PASSWORD,
|
||||
u.LAST_LOGIN,
|
||||
u.NAME,
|
||||
u.IP,
|
||||
u.EMAIL,
|
||||
u.NUMBER,
|
||||
u.PHONE,
|
||||
r.ROLE_ID,
|
||||
r.ROLE_NAME
|
||||
from <include refid="tableName"></include> u, <include refid="roleTableName"></include> r
|
||||
where u.ROLE_ID = r.ROLE_ID
|
||||
and u.USERNAME != 'admin'
|
||||
and u.ISDELETE = '0'
|
||||
and u.CORPINFO_ID in (select CORPINFO_ID from bus_corp_info where ISDELETE = '0')
|
||||
<!-- and r.PARENT_ID = '1' -->
|
||||
<if test="KEYWORDS != null and KEYWORDS != ''"><!-- 关键词检索 -->
|
||||
and
|
||||
(
|
||||
u.USERNAME LIKE CONCAT(CONCAT('%', #{KEYWORDS}),'%')
|
||||
or
|
||||
u.EMAIL LIKE CONCAT(CONCAT('%', #{KEYWORDS}),'%')
|
||||
or
|
||||
u.NUMBER LIKE CONCAT(CONCAT('%', #{KEYWORDS}),'%')
|
||||
or
|
||||
u.NAME LIKE CONCAT(CONCAT('%', #{KEYWORDS}),'%')
|
||||
or
|
||||
u.PHONE LIKE CONCAT(CONCAT('%', #{KEYWORDS}),'%')
|
||||
)
|
||||
</if>
|
||||
<if test="ROLE_ID != null and ROLE_ID != ''"><!-- 角色检索 -->
|
||||
and u.ROLE_ID=#{ROLE_ID}
|
||||
</if>
|
||||
<if test="STRARTTIME!=null and STRARTTIME!=''"><!-- 登录时间检索 -->
|
||||
and u.LAST_LOGIN >= #{STRARTTIME}
|
||||
</if>
|
||||
<if test="ENDTIME!=null and ENDTIME!=''"><!-- 登录时间检索 -->
|
||||
and u.LAST_LOGIN <= #{ENDTIME}
|
||||
</if>
|
||||
<if test="PRECINCT_ID != null and PRECINCT_ID != ''"><!-- 关键词检索 -->
|
||||
AND
|
||||
u.PRECINCT_ID = #{PRECINCT_ID}
|
||||
</if>
|
||||
<if test="DEPARTMENT_ID != null and DEPARTMENT_ID != ''"><!-- 用户部门 -->
|
||||
AND u.DEPARTMENT_ID = #{DEPARTMENT_ID}
|
||||
</if>
|
||||
<if test="NOMAIN != null and NOMAIN != ''"><!-- 关键词检索 -->
|
||||
AND u.ISMAIN != '1'
|
||||
</if>
|
||||
order by u.LAST_LOGIN desc
|
||||
</select>
|
||||
|
||||
<!-- 通过用户ID获取用户信息和角色信息 -->
|
||||
<select id="getUserAndRoleById" parameterType="String" resultMap="userAndRoleResultMap">
|
||||
select u.USER_ID,
|
||||
u.USERNAME,
|
||||
u.NAME,
|
||||
u.PASSWORD,
|
||||
u.SKIN,
|
||||
u.NUMBER,
|
||||
u.ROLE_IDS,
|
||||
r.ROLE_ID,
|
||||
r.ROLE_NAME,
|
||||
r.RIGHTS as ROLE_RIGHTS,
|
||||
r.ADD_QX,
|
||||
r.DEL_QX,
|
||||
r.EDIT_QX,
|
||||
r.CHA_QX
|
||||
from
|
||||
<include refid="tableName"></include>
|
||||
u
|
||||
left join
|
||||
<include refid="roleTableName"></include>
|
||||
r
|
||||
on u.ROLE_ID=r.ROLE_ID
|
||||
where u.STATUS=0
|
||||
and u.USER_ID=#{USER_ID}
|
||||
</select>
|
||||
|
||||
<!-- 存入IP -->
|
||||
<update id="saveIP" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
IP = #{IP},
|
||||
LAST_LOGIN = #{LAST_LOGIN}
|
||||
where
|
||||
USERNAME = #{USERNAME}
|
||||
</update>
|
||||
|
||||
<!-- 保存用户皮肤 -->
|
||||
<update id="saveSkin" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
SKIN = #{SKIN}
|
||||
where USERNAME = #{USERNAME}
|
||||
</update>
|
||||
|
||||
<!-- 删除用户 -->
|
||||
<delete id="deleteUser" parameterType="pd">
|
||||
delete from
|
||||
<include refid="tableName"></include>
|
||||
where
|
||||
USER_ID = #{USER_ID}
|
||||
and
|
||||
USER_ID != '1'
|
||||
</delete>
|
||||
|
||||
<!-- 批量删除用户 -->
|
||||
<delete id="deleteAllUser" parameterType="String">
|
||||
delete from
|
||||
<include refid="tableName"></include>
|
||||
where
|
||||
USER_ID in
|
||||
<foreach item="item" index="index" collection="array" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
and
|
||||
USER_ID != '1'
|
||||
</delete>
|
||||
|
||||
<!-- 用户列表(弹窗选择用) -->
|
||||
<select id="userBystafflistPage" parameterType="page" resultType="pd">
|
||||
select u.USER_ID,
|
||||
u.USERNAME,
|
||||
u.PASSWORD,
|
||||
u.LAST_LOGIN,
|
||||
u.NAME,
|
||||
u.IP,
|
||||
u.EMAIL,
|
||||
u.NUMBER,
|
||||
u.PHONE,
|
||||
r.ROLE_ID,
|
||||
r.ROLE_NAME
|
||||
from <include refid="tableName"></include> u, <include refid="roleTableName"></include> r
|
||||
where u.ROLE_ID = r.ROLE_ID
|
||||
and u.USERNAME != 'admin'
|
||||
and r.PARENT_ID = '1'
|
||||
<if test="pd.KEYWORDS!= null and pd.KEYWORDS != ''"><!-- 关键词检索 -->
|
||||
and
|
||||
(
|
||||
u.USERNAME LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
|
||||
or
|
||||
u.EMAIL LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
|
||||
or
|
||||
u.NUMBER LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
|
||||
or
|
||||
u.NAME LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
|
||||
or
|
||||
u.PHONE LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
|
||||
)
|
||||
</if>
|
||||
<if test="pd.ROLE_ID != null and pd.ROLE_ID != ''"><!-- 角色检索 -->
|
||||
and u.ROLE_ID=#{pd.ROLE_ID}
|
||||
</if>
|
||||
<if test="pd.STRARTTIME!=null and pd.STRARTTIME!=''"> <!-- 登录时间检索 -->
|
||||
and u.LAST_LOGIN >= #{pd.STRARTTIME}
|
||||
</if>
|
||||
<if test="pd.ENDTIME!=null and pd.ENDTIME!=''"> <!-- 登录时间检索 -->
|
||||
and u.LAST_LOGIN <= #{pd.ENDTIME}
|
||||
</if>
|
||||
order by u.LAST_LOGIN desc
|
||||
</select>
|
||||
|
||||
<!--设置小程序菜单 -->
|
||||
<update id="editUserFuns" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set FUN_IDS = #{FUN_IDS}
|
||||
where
|
||||
USER_ID = #{USER_ID}
|
||||
</update>
|
||||
<!-- 用户列表(全部) -->
|
||||
<select id="listUserAndDept" parameterType="pd" resultType="pd">
|
||||
select u.USER_ID,
|
||||
u.USERNAME,
|
||||
u.PASSWORD,
|
||||
u.LAST_LOGIN,
|
||||
u.NAME,
|
||||
u.IP,
|
||||
u.EMAIL,
|
||||
u.NUMBER,
|
||||
u.PHONE,
|
||||
d.NAME as deptName
|
||||
from <include refid="tableName"></include> u
|
||||
left join oa_department d on d.DEPARTMENT_ID=u.DEPARTMENT_ID
|
||||
where 1=1
|
||||
and u.DEPARTMENT_ID is not null and u.DEPARTMENT_ID !='0'
|
||||
<if test="userIds != null">
|
||||
and u.USER_ID in
|
||||
<foreach item="item" index="index" collection="userIds" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="corpinfoId != null and corpinfoId != ''"><!-- -->
|
||||
AND u.CORPINFO_ID = #{corpinfoId}
|
||||
</if>
|
||||
|
||||
<if test="userName!= null and userName != ''"><!-- 关键词检索 -->
|
||||
and
|
||||
(
|
||||
u.USERNAME LIKE CONCAT(CONCAT('%', #{userName}),'%')
|
||||
or
|
||||
u.NUMBER LIKE CONCAT(CONCAT('%', #{userName}),'%')
|
||||
or
|
||||
u.NAME LIKE CONCAT(CONCAT('%', #{userName}),'%')
|
||||
or
|
||||
u.PHONE LIKE CONCAT(CONCAT('%', #{userName}),'%')
|
||||
)
|
||||
</if>
|
||||
<if test="deptId != null and deptId != ''"><!-- -->
|
||||
AND u.DEPARTMENT_ID = #{deptId}
|
||||
</if>
|
||||
order by u.LAST_LOGIN desc
|
||||
</select>
|
||||
<!-- 保存用户皮肤 -->
|
||||
<update id="updateUserStatus" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
STATUS = #{STATUS}
|
||||
where USER_ID = #{USER_ID}
|
||||
</update>
|
||||
|
||||
<!-- 解锁用户 -->
|
||||
<update id="unLockUser" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
STATUS = #{STATUS},
|
||||
ERROR_COUNT = #{ERROR_COUNT}
|
||||
where USER_ID = #{USER_ID}
|
||||
</update>
|
||||
</mapper>
|
|
@ -0,0 +1,54 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zcloud.mapper.datasource.system.CorpPathMapper">
|
||||
|
||||
<!--表名 -->
|
||||
<sql id="tableName">
|
||||
SYS_CORP_PATH
|
||||
</sql>
|
||||
|
||||
<!-- 字段 -->
|
||||
<sql id="Field">
|
||||
CORP_PATH_ID,
|
||||
CORPINFO_ID,
|
||||
PIC_PATH,
|
||||
BACK_END_PATH,
|
||||
USER_IDENTITY
|
||||
</sql>
|
||||
|
||||
<!-- 字段 -->
|
||||
<sql id="Field2">
|
||||
f.CORP_PATH_ID,
|
||||
f.CORPINFO_ID,
|
||||
f.PIC_PATH,
|
||||
f.BACK_END_PATH
|
||||
</sql>
|
||||
|
||||
<!-- 字段值 -->
|
||||
<sql id="FieldValue">
|
||||
#{CORP_PATH_ID},
|
||||
#{CORPINFO_ID},
|
||||
#{PIC_PATH},
|
||||
#{BACK_END_PATH}
|
||||
</sql>
|
||||
|
||||
<select id="getCorpPathByCorpId" resultType="pd">
|
||||
select
|
||||
<include refid="Field"/>
|
||||
from
|
||||
<include refid="tableName"/>
|
||||
where
|
||||
CORPINFO_ID = #{CORPINFO_ID}
|
||||
</select>
|
||||
|
||||
<select id="getCorpPathByPersonInfo" resultType="pd">
|
||||
select
|
||||
<include refid="Field2"/>
|
||||
from
|
||||
<include refid="tableName"/> f
|
||||
left join `qa-gwj-prevention`.vi_user_all vua on vua.USER_ID = #{USER_ID}
|
||||
where f.CORPINFO_ID = vua.CORPINFO_ID
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
|
@ -0,0 +1,132 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zcloud.mapper.datasource.xgf.FlowDetailMapper">
|
||||
|
||||
<!--表名 -->
|
||||
<sql id="tableName">
|
||||
BUS_FLOW_DETAIL
|
||||
</sql>
|
||||
|
||||
<!--数据字典表名 -->
|
||||
<sql id="dicTableName">
|
||||
SYS_DICTIONARIES
|
||||
</sql>
|
||||
|
||||
<!-- 字段 -->
|
||||
<sql id="Field">
|
||||
f.FLOW_DETAIL_ID,
|
||||
f.FLOW_ID,
|
||||
f.STEP_FLAG,
|
||||
F.STEP_NAME,
|
||||
f.APPROVER_ID,
|
||||
f.APPROVER_NAME,
|
||||
f.APPROVER_OPINION,
|
||||
f.APPROVER_CORPINFO_ID,
|
||||
f.APPROVER_CORPINFO_NAME,
|
||||
f.APPROVER_TIME,
|
||||
f.PASS_FLAG,
|
||||
f.END_FLAG,
|
||||
f.ISDELETE,
|
||||
f.PARENT_ID,
|
||||
f.FOREIGN_KEY
|
||||
</sql>
|
||||
|
||||
<!-- 字段用于新增 -->
|
||||
<sql id="Field2">
|
||||
FLOW_DETAIL_ID,
|
||||
FLOW_ID,
|
||||
STEP_FLAG,
|
||||
STEP_NAME,
|
||||
APPROVER_ID,
|
||||
APPROVER_NAME,
|
||||
APPROVER_OPINION,
|
||||
APPROVER_CORPINFO_ID,
|
||||
APPROVER_CORPINFO_NAME,
|
||||
APPROVER_TIME,
|
||||
PASS_FLAG,
|
||||
END_FLAG,
|
||||
ISDELETE,
|
||||
PARENT_ID,
|
||||
FOREIGN_KEY
|
||||
</sql>
|
||||
|
||||
<!-- 字段值 -->
|
||||
<sql id="FieldValue">
|
||||
#{FLOW_DETAIL_ID},
|
||||
#{FLOW_ID},
|
||||
#{STEP_FLAG},
|
||||
#{STEP_NAME},
|
||||
#{APPROVER_ID},
|
||||
#{APPROVER_NAME},
|
||||
#{APPROVER_OPINION},
|
||||
#{APPROVER_CORPINFO_ID},
|
||||
#{APPROVER_CORPINFO_NAME},
|
||||
#{APPROVER_TIME},
|
||||
#{PASS_FLAG},
|
||||
#{END_FLAG},
|
||||
#{ISDELETE},
|
||||
#{PARENT_ID},
|
||||
#{FOREIGN_KEY}
|
||||
</sql>
|
||||
|
||||
<!-- 新增-->
|
||||
<insert id="save" parameterType="pd">
|
||||
insert into
|
||||
<include refid="tableName"></include>
|
||||
(
|
||||
<include refid="Field2"></include>
|
||||
) values (
|
||||
<include refid="FieldValue"></include>
|
||||
)
|
||||
</insert>
|
||||
|
||||
<!-- 删除-->
|
||||
<delete id="delete" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
ISDELETE = '1'
|
||||
where
|
||||
FLOW_DETAIL_ID = #{FLOW_DETAIL_ID}
|
||||
</delete>
|
||||
|
||||
<!-- 修改 -->
|
||||
<update id="edit" parameterType="pd">
|
||||
update BUS_FLOW_DETAIL
|
||||
set FLOW_ID = #{FLOW_ID},
|
||||
STEP_FLAG = #{STEP_FLAG},
|
||||
APPROVER_ID = #{APPROVER_ID},
|
||||
APPROVER_NAME = #{APPROVER_NAME},
|
||||
APPROVER_OPINION = #{APPROVER_OPINION},
|
||||
APPROVER_CORPINFO_NAME = #{APPROVER_CORPINFO_NAME},
|
||||
APPROVER_TIME = #{APPROVER_TIME},
|
||||
PASS_FLAG = #{PASS_FLAG},
|
||||
END_FLAG = #{END_FLAG},
|
||||
ISDELETE = #{ISDELETE},
|
||||
PARENT_ID = #{PARENT_ID},
|
||||
FOREIGN_ID = #{FOREIGN_ID},
|
||||
STEP_NAME = #{STEP_NAME},
|
||||
where FLOW_DETAIL_ID = #{FLOW_DETAIL_ID}
|
||||
</update>
|
||||
|
||||
<select id="findById" parameterType="pd" resultType="pd">
|
||||
select * from BUS_FLOW_DETAIL a where a.FLOW_DETAIL_ID = #{FLOW_DETAIL_ID}
|
||||
</select>
|
||||
<select id="selectOne" resultType="com.zcloud.entity.PageData">
|
||||
select *
|
||||
from BUS_FLOW_DETAIL a
|
||||
where a.ISDELETE = '0'
|
||||
<if test="FLOW_ID != null and FLOW_ID != ''">
|
||||
and a.FLOW_ID = #{FLOW_ID}
|
||||
</if>
|
||||
<if test="STEP_FLAG != null and STEP_FLAG != ''">
|
||||
and a.STEP_FLAG = #{STEP_FLAG}
|
||||
</if>
|
||||
<if test="PARENT_ID != null and PARENT_ID != ''">
|
||||
and a.PARENT_ID = #{PARENT_ID}
|
||||
</if>
|
||||
<if test="FOREIGN_ID != null and FOREIGN_ID != ''">
|
||||
and a.FOREIGN_ID = #{FOREIGN_ID}
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
|
@ -0,0 +1,91 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zcloud.mapper.datasource.xgf.FlowMapper">
|
||||
|
||||
<!--表名 -->
|
||||
<sql id="tableName">
|
||||
BUS_FLOW
|
||||
</sql>
|
||||
|
||||
<!--数据字典表名 -->
|
||||
<sql id="dicTableName">
|
||||
SYS_DICTIONARIES
|
||||
</sql>
|
||||
|
||||
<!-- 字段 -->
|
||||
<sql id="Field">
|
||||
f.FLOW_ID,
|
||||
f.TYPE,
|
||||
f.CREATOR,
|
||||
f.CREATOR_NAME,
|
||||
f.CREATOR_TIME,
|
||||
f.VALID_FLAG,
|
||||
f.FOREIGN_KEY
|
||||
</sql>
|
||||
|
||||
<!-- 字段用于新增 -->
|
||||
<sql id="Field2">
|
||||
FLOW_ID,
|
||||
TYPE,
|
||||
CREATOR,
|
||||
CREATOR_NAME,
|
||||
CREATOR_TIME,
|
||||
VALID_FLAG,
|
||||
FOREIGN_KEY
|
||||
</sql>
|
||||
|
||||
<!-- 字段值 -->
|
||||
<sql id="FieldValue">
|
||||
#{FLOW_ID},
|
||||
#{TYPE},
|
||||
#{CREATOR},
|
||||
#{CREATOR_NAME},
|
||||
#{CREATOR_TIME},
|
||||
#{VALID_FLAG},
|
||||
#{FOREIGN_KEY}
|
||||
</sql>
|
||||
|
||||
<!-- 新增-->
|
||||
<insert id="save" parameterType="pd">
|
||||
insert into
|
||||
<include refid="tableName"></include>
|
||||
(
|
||||
<include refid="Field2"></include>
|
||||
) values (
|
||||
<include refid="FieldValue"></include>
|
||||
)
|
||||
</insert>
|
||||
|
||||
<!-- 删除-->
|
||||
<delete id="delete" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
ISDELETE = '1'
|
||||
where
|
||||
FLOW_ID = #{FLOW_ID}
|
||||
</delete>
|
||||
|
||||
<!-- 修改 -->
|
||||
<update id="edit" parameterType="pd">
|
||||
update BUS_FLOW set
|
||||
TYPE = #{TYPE},
|
||||
CREATOR = #{CREATOR},
|
||||
CREATOR_NAME = #{CREATOR_NAME},
|
||||
CREATOR_TIME = #{CREATOR_TIME},
|
||||
VALID_FLAG = #{VALID_FLAG},
|
||||
FOREIGN_KEY = FOREIGN_KEY
|
||||
where
|
||||
FLOW_ID = #{FLOW_ID}
|
||||
</update>
|
||||
|
||||
<select id="findById" parameterType="pd" resultType="pd">
|
||||
select * from bus_flow a where a.FLOW_ID = #{FLOW_ID}
|
||||
</select>
|
||||
<select id="findByCondition" resultType="com.zcloud.entity.PageData">
|
||||
select * from bus_flow a where a.ISDELETE = '0'
|
||||
<if test="FOREIGN_KEY != null and FOREIGN_KEY != ''">
|
||||
and a.FOREIGN_KEY = #{FOREIGN_KEY}
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
|
@ -0,0 +1,493 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zcloud.mapper.datasource.xgf.TrainUsersMapper">
|
||||
|
||||
<!--表名 -->
|
||||
<sql id="tableName">
|
||||
xgf_train_users
|
||||
</sql>
|
||||
|
||||
<!--数据字典表名 -->
|
||||
<sql id="dicTableName">
|
||||
SYS_DICTIONARIES
|
||||
</sql>
|
||||
|
||||
<!-- 字段 -->
|
||||
<sql id="Field">
|
||||
f.TRAINING_BATCH_ID,
|
||||
f.USER_ID,
|
||||
f.START_DATE,
|
||||
f.END_DATE,
|
||||
f.STATUS,
|
||||
f.TRAIN_CORPINFO_ID,
|
||||
f.TRAIN_AREA,
|
||||
f.SUPERVISION_STATE,
|
||||
f.SUPERVISION_OPINION,
|
||||
f.SUPERVISION_TIME,
|
||||
f.MANAGER_STATE,
|
||||
f.MANAGER_OPINION,
|
||||
f.MANAGER_TIME,
|
||||
f.TERRITORIALITY_STATE,
|
||||
f.TERRITORIALITY_OPINION,
|
||||
f.TERRITORIALITY_TIME,
|
||||
f.TRAIN_USERS_ID,
|
||||
f.STEP_STATUS,
|
||||
f.BELONG_TO_CORP
|
||||
f.BELONG_TO_CORP_NAME,
|
||||
f.IS_DELETE,
|
||||
f.RESULT_STATUS
|
||||
</sql>
|
||||
|
||||
<!-- 字段用于新增 -->
|
||||
<sql id="Field2">
|
||||
TRAINING_BATCH_ID,
|
||||
USER_ID,
|
||||
START_DATE,
|
||||
END_DATE,
|
||||
STATUS,
|
||||
TRAIN_CORPINFO_ID,
|
||||
TRAIN_AREA,
|
||||
SUPERVISION_STATE,
|
||||
SUPERVISION_OPINION,
|
||||
SUPERVISION_TIME,
|
||||
MANAGER_STATE,
|
||||
MANAGER_OPINION,
|
||||
MANAGER_TIME,
|
||||
TERRITORIALITY_STATE,
|
||||
TERRITORIALITY_OPINION,
|
||||
TERRITORIALITY_TIME,
|
||||
TRAIN_USERS_ID,
|
||||
STEP_STATUS,
|
||||
BELONG_TO_CORP,
|
||||
BELONG_TO_CORP_NAME,
|
||||
IS_DELETE,
|
||||
RESULT_STATUS
|
||||
</sql>
|
||||
|
||||
<!-- 字段值 -->
|
||||
<sql id="FieldValue">
|
||||
#{TRAINING_BATCH_ID},
|
||||
#{USER_ID},
|
||||
#{START_DATE},
|
||||
#{END_DATE},
|
||||
#{STATUS},
|
||||
#{TRAIN_CORPINFO_ID},
|
||||
#{TRAIN_AREA},
|
||||
#{SUPERVISION_STATE},
|
||||
#{SUPERVISION_OPINION},
|
||||
#{SUPERVISION_TINE},
|
||||
#{MANAGER_STATE},
|
||||
#{MANAGER_OPINION},
|
||||
#{MANAGER_TIME},
|
||||
#{TERRITORIALITY_STATE},
|
||||
#{TERRITORIALITY_OPINION},
|
||||
#{TERRITORIALITY_TIME},
|
||||
#{TRAIN_USERS_ID},
|
||||
#{STEP_STATUS},
|
||||
#{BELONG_TO_CORP},
|
||||
#{BELONG_TO_CORP_NAME},
|
||||
#{IS_DELETE},
|
||||
#{RESULT_STATUS}
|
||||
</sql>
|
||||
|
||||
<!-- 新增-->
|
||||
<insert id="save" parameterType="pd">
|
||||
insert into
|
||||
<include refid="tableName"></include>
|
||||
(
|
||||
<include refid="Field2"></include>
|
||||
) values (
|
||||
<include refid="FieldValue"></include>
|
||||
)
|
||||
</insert>
|
||||
|
||||
<!-- 删除-->
|
||||
<delete id="delete" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
ISDELETE = '1'
|
||||
where
|
||||
TRAIN_USERS_ID = #{TRAIN_USERS_ID}
|
||||
</delete>
|
||||
|
||||
<!-- 修改 -->
|
||||
<update id="edit" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
TRAINING_BATCH_ID= #{TRAINING_BATCH_ID},
|
||||
USER_ID = #{USER_ID},
|
||||
START_DATE = #{START_DATE},
|
||||
END_DATE = #{END_DATE},
|
||||
STATUS = #{STATUS},
|
||||
TRAIN_CORPINFO_ID = #{TRAIN_CORPINFO_ID},
|
||||
TRAIN_AREA = #{TRAIN_AREA},
|
||||
SUPERVISION_STATE = #{SUPERVISION_STATE},
|
||||
SUPERVISION_OPINION = #{SUPERVISION_OPINION},
|
||||
SUPERVISION_TIME = #{SUPERVISION_TINE},
|
||||
MANAGER_STATE = #{MANAGER_STATE},
|
||||
MANAGER_OPINION = #{MANAGER_OPINION},
|
||||
MANAGER_TIME = #{MANAGER_TIME},
|
||||
TERRITORIALITY_STATE = #{TERRITORIALITY_STATE},
|
||||
TERRITORIALITY_OPINION = #{TERRITORIALITY_OPINION},
|
||||
TERRITORIALITY_TIME = #{TERRITORIALITY_TIME},
|
||||
STEP_STATUS = #{STEP_STATUS},
|
||||
BELONG_TO_CORP = #{BELONG_TO_CORP},
|
||||
BELONG_TO_CORP_NAME = #{BELONG_TO_CORP_NAME},
|
||||
IS_DELETE = #{IS_DELETE},
|
||||
RESULT_STATUS = #{RESULT_STATUS}
|
||||
where
|
||||
TRAIN_USERS_ID = #{TRAIN_USERS_ID}
|
||||
</update>
|
||||
|
||||
<!-- 通过USER_ID获取数据 -->
|
||||
<select id="findById" parameterType="pd" resultType="pd">
|
||||
select * from xgf_train_users a where a.TRAIN_USERS_ID = #{TRAIN_USERS_ID}
|
||||
</select>
|
||||
|
||||
<!-- 服务人员管理列表 -->
|
||||
<select id="datalistPage" parameterType="page" resultType="pd">
|
||||
select
|
||||
u.USER_ID,
|
||||
IFNULL(u.NAME, "") AS NAME,
|
||||
IFNULL(bc.RELEVANT_UNIT_NAME, "") AS RELEVANT_UNIT_NAME,
|
||||
IFNULL(sud.PERSON_WORK_TYPE, "") AS PERSON_WORK_TYPE_NAME,<!-- 工种名称-->
|
||||
IFNULL(sd.NAME, "") AS DICNAME,
|
||||
IFNULL(oa.NAME, "") AS DEP_NAME,
|
||||
IFNULL(t.END_DATE, "") as END_DATE,
|
||||
corpTypeDic.NAME corpTypeName,
|
||||
IFNULL(u.STATUS, "") as STATUS
|
||||
from
|
||||
sys_user u
|
||||
left join bus_corpinfo bc on bc.CORPINFO_ID = u.CORPINFO_ID<!-- 相关方企业名称 -->
|
||||
left join BUS_CORPINFODETAILS bcd on bcd.CORPINFO_ID = bc.CORPINFO_ID
|
||||
left join sys_dictionaries corpTypeDic on corpTypeDic.BIANMA = bcd.CORP_TYPE
|
||||
left join sys_user_details sud on sud.USER_ID = u.USER_ID<!-- 工种 -->
|
||||
left join SYS_DICTIONARIES sd on sud.PERSON_WORK_TYPE = sd.BIANMA<!-- 工种名字 -->
|
||||
left join oa_department oa on oa.DEPARTMENT_ID = u.DEPARTMENT_ID <!-- 部门-->
|
||||
left join (select tu.* from BUS_TRAINUSERS tu where tu.STATUS = 2 and tu.TRAIN_AREA is null GROUP BY tu.USER_ID HAVING END_DATE = MAX(END_DATE ) ) t on t.USER_ID = u.USER_ID
|
||||
<!--年份-->
|
||||
<where>
|
||||
<if test="pd.KEYWORDS != null and pd.KEYWORDS != ''"><!-- 关键词检索(用户名) -->
|
||||
and (u.NAME LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%'))
|
||||
</if>
|
||||
<if test="pd.RELEVANT_UNIT_NAME != null and pd.RELEVANT_UNIT_NAME != ''"><!-- 关键词检索(相关方单位名称) -->
|
||||
and bc.RELEVANT_UNIT_NAME LIKE CONCAT(CONCAT('%', #{pd.RELEVANT_UNIT_NAME}),'%')
|
||||
</if>
|
||||
<if test="pd.STATUS != null and pd.STATUS != ''"><!-- 关键词检索(年份) -->
|
||||
and u.STATUS = #{pd.STATUS}
|
||||
</if>
|
||||
<if test="pd.END_DATE != null and pd.END_DATE != ''"><!-- 关键词检索(年份) -->
|
||||
and t.END_DATE LIKE CONCAT(CONCAT('%', #{pd.END_DATE}),'%')
|
||||
</if>
|
||||
<if test="pd.CORPINFO_ID != null and pd.CORPINFO_ID != ''"><!-- 关键词检索(年份) -->
|
||||
and
|
||||
exists (select 1 from bus_service_company_user_map um where um.USER_ID = u.USER_ID and um.STATUS = 1 and um.SERVICE_PROVIDER_ID = #{pd.CORPINFO_ID} )
|
||||
</if>
|
||||
<if test="pd.TYPE == 1">
|
||||
and u.ISFLOW='0'
|
||||
</if>
|
||||
</where>
|
||||
order by u.CREATTIME desc
|
||||
</select>
|
||||
|
||||
<!-- 列表(全部) -->
|
||||
<select id="listAll1" parameterType="pd" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include>
|
||||
from
|
||||
<include refid="tableName"></include>
|
||||
f
|
||||
</select>
|
||||
<!-- 列表 -->
|
||||
<select id="unflowlistPage" parameterType="page" resultType="pd">
|
||||
select
|
||||
f.*,
|
||||
c.RELEVANT_UNIT_NAME,
|
||||
vc.CORP_NAME FIRST_PARTY_NAME,
|
||||
u.USERNAME,
|
||||
u.NAME,
|
||||
d.NAME DEPARTMENT_NAME
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
left join SYS_USER u on u.USER_ID = f.USER_ID
|
||||
left join bus_corpinfo c on c.CORPINFO_ID = u.CORPINFO_ID
|
||||
left join vi_corp_info vc on vc.CORPINFO_ID = f.TRAIN_CORPINFO_ID
|
||||
left join oa_department d on d.DEPARTMENT_ID = u.DEPARTMENT_ID
|
||||
where f.TRAINING_BATCH_ID is null
|
||||
<if test="pd.KEYWORDS != null and pd.KEYWORDS != ''"><!-- 关键词检索 -->
|
||||
and
|
||||
(
|
||||
u.USERNAME LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
|
||||
or
|
||||
c.RELEVANT_UNIT_NAME LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
|
||||
)
|
||||
</if>
|
||||
<if test="pd.YEAR != null and pd.YEAR != ''"><!-- 关键词检索 -->
|
||||
and YEAR(f.START_DATE) = #{pd.YEAR}
|
||||
</if>
|
||||
<if test="pd.STATUS != null and pd.STATUS != '' and pd.STATUS == 0"><!-- 关键词检索 -->
|
||||
and f.STATUS = 1
|
||||
</if>
|
||||
<if test="pd.STATUS != null and pd.STATUS != '' and pd.STATUS == 1"><!-- 关键词检索 -->
|
||||
and f.STATUS != 1
|
||||
</if>
|
||||
order by f.STATUS = 0,f.START_DATE desc
|
||||
</select>
|
||||
|
||||
<!-- 批量删除 -->
|
||||
<delete id="deleteAll" parameterType="String">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
ISDELETE = '1'
|
||||
where
|
||||
TRAIN_USERS_ID in
|
||||
<foreach item="item" index="index" collection="ArrayDATA_IDS" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<!-- 批量修改用户状态 -->
|
||||
<update id="updateStatusByFlowTrain" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set STATUS = #{STATUS},
|
||||
<if test="START_DATE != null and START_DATE != ''">
|
||||
START_DATE = #{START_DATE},
|
||||
</if>
|
||||
<if test="END_DATE != null and END_DATE != ''">
|
||||
END_DATE = #{END_DATE},
|
||||
</if>
|
||||
TRAINING_BATCH_ID = #{TRAINING_BATCH_ID}
|
||||
where
|
||||
TRAINING_BATCH_ID = #{TRAINING_BATCH_ID}
|
||||
</update>
|
||||
|
||||
<!-- 培训申请记录 -->
|
||||
<select id="trainApplicationRecordList" parameterType="pd" resultType="pd">
|
||||
select
|
||||
IFNULL(f.TRAIN_USERS_ID, "") AS TRAIN_USERS_ID,
|
||||
IFNULL(f.TRAIN_CORPINFO_ID, "") AS TRAIN_CORPINFO_ID, <!-- 分公司申请部门 -->
|
||||
IFNULL(f.STATUS, "") AS STATUS,<!-- 验证状态 -->
|
||||
IFNULL(od.NAME, "") AS DEP_NAME<!-- 部门名称 -->
|
||||
from
|
||||
bus_trainusers f
|
||||
left join bus_corpinfo bc on bc.CORPINFO_ID = f.TRAIN_CORPINFO_ID
|
||||
left join oa_department od on od.DEPARTMENT_ID = bc.CORPINFO_ID
|
||||
<where>
|
||||
<if test="pd.DEP_NAME != null and pd.DEP_NAME != ''"><!-- 关键词检索(分工是申请部门) -->
|
||||
and
|
||||
(od.DEP_NAME LIKE CONCAT(CONCAT('%', #{pd.DEP_NAME}),'%'))
|
||||
</if>
|
||||
<if test="pd.STATUS != null and pd.STATUS != ''"><!-- 验证状态 -->
|
||||
and
|
||||
(f.STATUS LIKE CONCAT(CONCAT('%', #{pd.STATUS}),'%'))
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
<!-- 固定人员管理培训查看按钮 -->
|
||||
<select id="trainView" parameterType="pd" resultType="pd" >
|
||||
select
|
||||
su.USER_ID,
|
||||
su.NAME,
|
||||
sud.PHOTO,
|
||||
sud.SEX,
|
||||
sud.DATE_OF_BIRTH,
|
||||
sud.AGE,
|
||||
sud.HKLOCAL,
|
||||
su.CARD_ID,
|
||||
sud.ADDRESS,
|
||||
sud.PHONE,
|
||||
sud.DEGREE_OF_EDUCATION,
|
||||
be.CORP_START_DATE,
|
||||
be.POST_ID,
|
||||
be.ENTRY_DATE,
|
||||
be.IS_SIGN_LABOR,
|
||||
be.IS_INJURIES_PAY,
|
||||
su.SOCIAL_NUMBER,
|
||||
be.ISPAY,
|
||||
be.IS_LEVEL_THREE,
|
||||
be.IS_SAFETY_TELL,
|
||||
be.IS_BODY_ADAPT,
|
||||
be.IS_SPECIAL_JOB,
|
||||
su.ISFLOW,
|
||||
bc.CORPINFO_ID,
|
||||
bc.RELEVANT_UNIT_NAME,
|
||||
dic.NAME as TRAIN_AREA,
|
||||
sd.NAME as POST_NAME,
|
||||
sdic.NAME as EDUCATION_NAME
|
||||
from SYS_USER su
|
||||
left join SYS_USER_DETAILS sud on su.USER_ID = sud.USER_ID
|
||||
left join (select tu.* from BUS_TRAINUSERS tu where tu.STATUS = 2 GROUP BY tu.USER_ID HAVING START_DATE = MAX(START_DATE) ) t on t.USER_ID = su.USER_ID
|
||||
left join SYS_DICTIONARIES dic on dic.DICTIONARIES_ID = t.TRAIN_AREA
|
||||
left join BUS_EMPLOYMENT_APPLY_MANAGEMENT be on su.USER_ID = be.USER_ID and be.ISDELETE = '0' and be.CORPINFO_ID = su.CORPINFO_ID
|
||||
left join SYS_DICTIONARIES sd on sd.BIANMA = be.POST_ID
|
||||
left join SYS_DICTIONARIES sdic on sdic.BIANMA = sud.DEGREE_OF_EDUCATION
|
||||
left join BUS_CORPINFO bc on bc.CORPINFO_ID = su.CORPINFO_ID
|
||||
where su.USER_ID = #{USER_ID}
|
||||
limit 1
|
||||
</select>
|
||||
|
||||
<!-- 批量修改用户状态 -->
|
||||
<update id="updateStatus" parameterType="pd" >
|
||||
update <include refid="tableName"></include>
|
||||
set STATUS = #{STATUS},
|
||||
<if test="START_DATE != null and START_DATE != ''">
|
||||
START_DATE = #{START_DATE},
|
||||
</if>
|
||||
<if test="END_DATE != null and END_DATE != ''">
|
||||
END_DATE = #{END_DATE},
|
||||
</if>
|
||||
TRAIN_USERS_ID = #{TRAIN_USERS_ID}
|
||||
where
|
||||
TRAIN_USERS_ID = #{TRAIN_USERS_ID}
|
||||
</update>
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- 安全监督部 审核 -->
|
||||
<update id="approveSupervision" parameterType="pd" >
|
||||
update <include refid="tableName"></include>
|
||||
set
|
||||
SUPERVISION_STATE = #{SUPERVISION_STATE},
|
||||
<if test="STATUS != null and STATUS != ''">
|
||||
STATUS = #{STATUS},
|
||||
</if>
|
||||
SUPERVISION_OPINION = #{SUPERVISION_OPINION},
|
||||
SUPERVISION_TIME= #{SUPERVISION_TIME},
|
||||
STEP_STATUS = #{STEP_STATUS}
|
||||
where
|
||||
TRAIN_USERS_ID = #{TRAIN_USERS_ID}
|
||||
</update>
|
||||
<update id="approveManager" parameterType="pd" >
|
||||
update <include refid="tableName"></include>
|
||||
set
|
||||
MANAGER_STATE= #{MANAGER_STATE},
|
||||
<if test="STATUS != null and STATUS != ''">
|
||||
STATUS = #{STATUS},
|
||||
</if>
|
||||
MANAGER_OPINION = #{MANAGER_OPINION},
|
||||
MANAGER_TIME = #{MANAGER_TIME},
|
||||
STEP_STATUS = #{STEP_STATUS}
|
||||
where
|
||||
TRAIN_USERS_ID = #{TRAIN_USERS_ID}
|
||||
</update>
|
||||
<update id="approveTerritoriality" parameterType="pd" >
|
||||
update <include refid="tableName"></include>
|
||||
set
|
||||
TERRITORIALITY_STATE = #{TERRITORIALITY_STATE},
|
||||
<if test="STATUS != null and STATUS != ''">
|
||||
STATUS = #{STATUS},
|
||||
</if>
|
||||
TERRITORIALITY_OPINION = #{TERRITORIALITY_OPINION},
|
||||
TERRITORIALITY_TIME = #{TERRITORIALITY_TIME},
|
||||
STEP_STATUS = #{STEP_STATUS}
|
||||
where
|
||||
TRAIN_USERS_ID = #{TRAIN_USERS_ID}
|
||||
</update>
|
||||
<update id="graduation">
|
||||
update bus_trainusers a set a.STATUS = #{STATUS} where a.TRAIN_USERS_ID in
|
||||
<foreach item="item" index="index" collection="list" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>;
|
||||
</update>
|
||||
|
||||
<update id="graduationstudent">
|
||||
update bus_trainusers a set a.STATUS = #{STATUS} where a.TRAIN_USERS_ID = #{TRAIN_USERS_ID}
|
||||
</update>
|
||||
<update id="updateDate" parameterType="pd">
|
||||
update bus_trainusers a set
|
||||
<if test="START_DATE != null and START_DATE != ''">
|
||||
a.START_DATE = #{START_DATE}
|
||||
</if>
|
||||
<if test="END_DATE != null and END_DATE != ''">
|
||||
a.END_DATE = #{END_DATE}
|
||||
</if>
|
||||
where a.TRAIN_USERS_ID in
|
||||
<foreach item="item" index="index" collection="list" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>;
|
||||
</update>
|
||||
|
||||
<!-- 根据培训批次id 获取 这次培训中审批完成的次数 -->
|
||||
<select id="getApproveCountByGbatchId" parameterType="pd" resultType="pd">
|
||||
select
|
||||
count(*),
|
||||
STATUS
|
||||
from
|
||||
bus_trainusers f
|
||||
where TRAINING_BATCH_ID = #{TRAINING_BATCH_ID}
|
||||
GROUP BY STATUS
|
||||
|
||||
</select>
|
||||
|
||||
<!-- 通过USER_ID获取数据 -->
|
||||
<select id="getPdById" parameterType="pd" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include>
|
||||
from
|
||||
<include refid="tableName"></include>
|
||||
f
|
||||
where
|
||||
f.TRAIN_USERS_ID = #{TRAIN_USERS_ID}
|
||||
</select>
|
||||
<!-- 通过USER_ID获取数据 -->
|
||||
<select id="getCountByWanchengPingshen" parameterType="pd" resultType="Integer">
|
||||
|
||||
select
|
||||
count(1)
|
||||
from
|
||||
<include refid="tableName"></include>
|
||||
f
|
||||
where
|
||||
f.TRAINING_BATCH_ID = #{TRAINING_BATCH_ID}
|
||||
and (
|
||||
(f.SUPERVISION_STATE = '1' and f.MANAGER_STATE = '1' and f.TERRITORIALITY_STATE = '1')
|
||||
or (f.SUPERVISION_STATE = '0' or f.MANAGER_STATE = '0' or f.TERRITORIALITY_STATE = '0'))
|
||||
</select>
|
||||
|
||||
|
||||
<select id="findinfoByCondition" resultType="com.zcloud.entity.PageData">
|
||||
select distinct
|
||||
a.CREATE_TIME,
|
||||
a.CREATOR,
|
||||
a.OPERATE_TIME,
|
||||
a.OPERATOR,
|
||||
a.ISDELETE,
|
||||
a.CORPINFO_ID,
|
||||
a.USER_ID,
|
||||
a.STATUS,
|
||||
a.CLASS_MESSAGE_ID,
|
||||
a.CLASS_INFO_ID,
|
||||
a.USERNAME,
|
||||
a.NAME,
|
||||
a.SEX,
|
||||
a.CARD_ID,
|
||||
a.RELEVANT_UNIT_NAME,
|
||||
a.DEPARTMENT_NAME,
|
||||
a.PHOTO,
|
||||
a.PHONE,
|
||||
a.PERSON_WORK_TYPE,
|
||||
a.CLASS_NO,
|
||||
a.TRAIN_USERS_ID
|
||||
,b.OPENING_TIME,b.VALIDITY_PERIOD_END,
|
||||
(select f.JOBS_TYPE from `qa-prevention-xgf`.sys_special_user f where f.USER_ID = a.USER_ID order by f.CREATTIME limit 1) as JOBS_TYPE,
|
||||
(select f.CERTIFICATE from `qa-prevention-xgf`.sys_special_user f where f.USER_ID = a.USER_ID order by f.CREATTIME limit 1) as CERTIFICATE
|
||||
from `qa-gwj-regulatory`.bus_class_info a
|
||||
left join `qa-gwj-regulatory`.bus_class_message b on a.CLASS_MESSAGE_ID = b.CLASS_MESSAGE_ID
|
||||
where a.ISDELETE = '0'
|
||||
<if test="CLASS_MESSAGE_ID != null and CLASS_MESSAGE_ID != ''">
|
||||
and a.CLASS_MESSAGE_ID = #{CLASS_MESSAGE_ID}
|
||||
</if>
|
||||
<if test="CLASS_INFO_ID != null and CLASS_INFO_ID != ''">
|
||||
and a.CLASS_INFO_ID = #{CLASS_INFO_ID}
|
||||
</if>
|
||||
<if test="USER_ID != null and USER_ID != ''">
|
||||
and a.USER_ID = #{USER_ID}
|
||||
</if>
|
||||
order by CREATE_TIME desc limit 1
|
||||
</select>
|
||||
</mapper>
|
|
@ -0,0 +1,388 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zcloud.mapper.datasource.xgf.TrainingBatchMapper">
|
||||
|
||||
<!--表名 -->
|
||||
<sql id="tableName">
|
||||
xgf_training_batch
|
||||
</sql>
|
||||
|
||||
<!--数据字典表名 -->
|
||||
<sql id="dicTableName">
|
||||
SYS_DICTIONARIES
|
||||
</sql>
|
||||
|
||||
<!-- 字段 -->
|
||||
<sql id="Field">
|
||||
f.CREATOR,
|
||||
f.CREATTIME,
|
||||
f.OPERATOR,
|
||||
f.OPERATTIME,
|
||||
f.ISDELETE,
|
||||
f.BATCH_NAME,
|
||||
f.CORPINFO_ID,
|
||||
f.USER_COUNT,
|
||||
f.TRAIN_CORP_DEPT,
|
||||
f.TRAIN_CORP_LEADER,
|
||||
f.DESCR,
|
||||
f.TRAIN_AREA,
|
||||
f.MANAGER,
|
||||
f.MANAGER_DEPARTMENT_NAME,
|
||||
f.MANAGER_USER_ID,
|
||||
f.MANAGER_USER_NAME,
|
||||
f.MANAGER_TIME,
|
||||
f.AUDIT_STATUS,
|
||||
f.TRAINING_BATCH_ID,
|
||||
f.SUPERVISION,
|
||||
f.SUPERVISION_DEPARTMENT_NAME,
|
||||
f.SUPERVISION_USER_ID,
|
||||
f.SUPERVISION_USER_NAME,
|
||||
f.SUPERVISION_TIME,
|
||||
f.TERRITORIALITY,
|
||||
f.TERRITORIALITY_DEPARTMENT_NAME,
|
||||
f.TERRITORIALITY_USER_ID,
|
||||
f.TERRITORIALITY_USER_NAME,
|
||||
f.TERRITORIALITY_TIME,
|
||||
f.BELONG_TO_CORP,
|
||||
f.BELONG_TO_CORP_NAME,
|
||||
f.IS_DELETE,
|
||||
f.STEP_STATUS
|
||||
</sql>
|
||||
|
||||
<!-- 字段用于新增 -->
|
||||
<sql id="Field2">
|
||||
CREATOR,
|
||||
CREATTIME,
|
||||
OPERATOR,
|
||||
OPERATTIME,
|
||||
ISDELETE,
|
||||
BATCH_NAME,
|
||||
CORPINFO_ID,
|
||||
USER_COUNT,
|
||||
TRAIN_CORP_DEPT,
|
||||
TRAIN_CORP_LEADER,
|
||||
DESCR,
|
||||
TRAIN_AREA,
|
||||
MANAGER,
|
||||
MANAGER_DEPARTMENT_NAME,
|
||||
MANAGER_USER_ID,
|
||||
MANAGER_USER_NAME,
|
||||
MANAGER_TIME,
|
||||
AUDIT_STATUS,
|
||||
TRAINING_BATCH_ID,
|
||||
SUPERVISION,
|
||||
SUPERVISION_DEPARTMENT_NAME,
|
||||
SUPERVISION_USER_ID,
|
||||
SUPERVISION_USER_NAME,
|
||||
SUPERVISION_TIME,
|
||||
TERRITORIALITY,
|
||||
TERRITORIALITY_DEPARTMENT_NAME,
|
||||
TERRITORIALITY_USER_ID,
|
||||
TERRITORIALITY_USER_NAME,
|
||||
TERRITORIALITY_TIME,
|
||||
BELONG_TO_CORP,
|
||||
BELONG_TO_CORP_NAME,
|
||||
IS_DELETE,
|
||||
STEP_STATUS
|
||||
</sql>
|
||||
|
||||
<!-- 字段值 -->
|
||||
<sql id="FieldValue">
|
||||
#{CREATOR},
|
||||
#{CREATTIME},
|
||||
#{OPERATOR},
|
||||
#{OPERATTIME},
|
||||
#{ISDELETE},
|
||||
#{BATCH_NAME},
|
||||
#{CORPINFO_ID},
|
||||
#{USER_COUNT},
|
||||
#{TRAIN_CORP_DEPT},
|
||||
#{TRAIN_CORP_LEADER},
|
||||
#{DESCR},
|
||||
#{TRAIN_AREA},
|
||||
#{MANAGER},
|
||||
#{MANAGER_DEPARTMENT_NAME},
|
||||
#{MANAGER_USER_ID},
|
||||
#{MANAGER_USER_NAME},
|
||||
#{MANAGER_TIME},
|
||||
#{AUDIT_STATUS},
|
||||
#{TRAINING_BATCH_ID},
|
||||
#{SUPERVISION},
|
||||
#{SUPERVISION_DEPARTMENT_NAME},
|
||||
#{SUPERVISION_USER_ID},
|
||||
#{SUPERVISION_USER_NAME},
|
||||
#{SUPERVISION_TIME},
|
||||
#{TERRITORIALITY},
|
||||
#{TERRITORIALITY_DEPARTMENT_NAME},
|
||||
#{TERRITORIALITY_USER_ID},
|
||||
#{TERRITORIALITY_USER_NAME},
|
||||
#{TERRITORIALITY_TIME},
|
||||
#{BELONG_TO_CORP},
|
||||
#{BELONG_TO_CORP_NAME},
|
||||
#{IS_DELETE},
|
||||
#{STEP_STATUS}
|
||||
</sql>
|
||||
|
||||
<!-- 新增-->
|
||||
<insert id="save" parameterType="pd">
|
||||
insert into
|
||||
<include refid="tableName"></include>
|
||||
(
|
||||
<include refid="Field2"></include>
|
||||
) values (
|
||||
<include refid="FieldValue"></include>
|
||||
)
|
||||
</insert>
|
||||
|
||||
<!-- 删除-->
|
||||
<delete id="delete" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
ISDELETE = '1'
|
||||
where
|
||||
TRAINING_BATCH_ID = #{TRAINING_BATCH_ID}
|
||||
</delete>
|
||||
|
||||
<!-- 修改 -->
|
||||
<update id="edit" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
CREATOR = #{CREATOR},
|
||||
CREATTIME = #{CREATTIME},
|
||||
OPERATOR = #{OPERATOR},
|
||||
OPERATTIME = #{OPERATTIME},
|
||||
ISDELETE = #{ISDELETE},
|
||||
BATCH_NAME = #{BATCH_NAME},
|
||||
CORPINFO_ID = #{CORPINFO_ID},
|
||||
USER_COUNT = #{USER_COUNT},
|
||||
TRAIN_CORP_DEPT = #{TRAIN_CORP_DEPT},
|
||||
TRAIN_CORP_LEADER = #{TRAIN_CORP_LEADER},
|
||||
DESCR = #{DESCR},
|
||||
TRAIN_AREA = #{TRAIN_AREA},
|
||||
MANAGER = #{MANAGER},
|
||||
MANAGER_DEPARTMENT_NAME = #{MANAGER_DEPARTMENT_NAME},
|
||||
MANAGER_USER_ID = #{MANAGER_USER_ID},
|
||||
MANAGER_USER_NAME = #{MANAGER_USER_NAME},
|
||||
MANAGER_TIME = #{MANAGER_TIME},
|
||||
AUDIT_STATUS = #{AUDIT_STATUS},
|
||||
TRAINING_BATCH_ID = #{TRAINING_BATCH_ID},
|
||||
SUPERVISION = #{SUPERVISION},
|
||||
SUPERVISION_DEPARTMENT_NAME = #{SUPERVISION_DEPARTMENT_NAME},
|
||||
SUPERVISION_USER_ID = #{SUPERVISION_USER_ID},
|
||||
SUPERVISION_USER_NAME = #{SUPERVISION_USER_NAME},
|
||||
SUPERVISION_TIME = #{SUPERVISION_TIME},
|
||||
TERRITORIALITY = #{TERRITORIALITY},
|
||||
TERRITORIALITY_DEPARTMENT_NAME = #{TERRITORIALITY_DEPARTMENT_NAME},
|
||||
TERRITORIALITY_USER_ID = #{TERRITORIALITY_USER_ID},
|
||||
TERRITORIALITY_USER_NAME = #{TERRITORIALITY_USER_NAME},
|
||||
TERRITORIALITY_TIME = #{TERRITORIALITY_TIME},
|
||||
BELONG_TO_CORP = #{BELONG_TO_CORP},
|
||||
BELONG_TO_CORP_NAME = #{BELONG_TO_CORP_NAME},
|
||||
IS_DELETE = #{IS_DELETE},
|
||||
STEP_STATUS = #{STEP_STATUS}
|
||||
where
|
||||
TRAINING_BATCH_ID = #{TRAINING_BATCH_ID}
|
||||
</update>
|
||||
|
||||
<!-- 修改 -->
|
||||
<update id="audit" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
AUDIT_STATUS = #{AUDIT_STATUS},
|
||||
<if test="TRAIN_CORP_DEPT != null and TRAIN_CORP_DEPT != ''">
|
||||
TRAIN_CORP_DEPT = #{TRAIN_CORP_DEPT},
|
||||
</if>
|
||||
<if test="TRAIN_CORP_LEADER != null and TRAIN_CORP_LEADER != ''">
|
||||
TRAIN_CORP_LEADER = #{TRAIN_CORP_LEADER},
|
||||
</if>
|
||||
<if test="ENTRUST_TIME != null and ENTRUST_TIME != ''">
|
||||
ENTRUST_TIME = #{ENTRUST_TIME},
|
||||
</if>
|
||||
<if test="AUDIT_TIME != null and AUDIT_TIME != ''">
|
||||
AUDIT_TIME = #{AUDIT_TIME},
|
||||
</if>
|
||||
<if test="VERIFY_TIME != null and VERIFY_TIME != ''">
|
||||
VERIFY_TIME = #{VERIFY_TIME},
|
||||
</if>
|
||||
<if test="AUDIT_DESCR != null and AUDIT_DESCR != ''">
|
||||
AUDIT_DESCR = #{AUDIT_DESCR},
|
||||
</if>
|
||||
<if test="CORP_AUDIT_DESCR != null and CORP_AUDIT_DESCR != ''">
|
||||
CORP_AUDIT_DESCR = #{CORP_AUDIT_DESCR},
|
||||
</if>
|
||||
TRAINING_BATCH_ID = #{TRAINING_BATCH_ID}
|
||||
where
|
||||
TRAINING_BATCH_ID = #{TRAINING_BATCH_ID}
|
||||
</update>
|
||||
<update id="graduation" parameterType="pd">
|
||||
update xgf_train_users a set a.STATUS = '2' where a.USER_ID in
|
||||
<foreach item="item" index="index" collection="users" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>;
|
||||
</update>
|
||||
|
||||
<!-- 通过ID获取数据 -->
|
||||
<select id="findById" parameterType="pd" resultType="pd">
|
||||
select
|
||||
f.*
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
where
|
||||
f.TRAINING_BATCH_ID = #{TRAINING_BATCH_ID}
|
||||
</select>
|
||||
|
||||
<!-- 列表 -->
|
||||
<select id="datalistPage" parameterType="page" resultType="pd">
|
||||
select *
|
||||
from xgf_training_batch a
|
||||
where a.IS_DELETE = '0'
|
||||
and (a.MANAGER_USER_ID = #{pd.USER_ID} or a.SUPERVISION_USER_ID = #{pd.USER_ID} or a.TERRITORIALITY_USER_ID = #{pd.USER_ID})
|
||||
and a.STEP_STATUS != '3'
|
||||
</select>
|
||||
|
||||
<!-- 列表(全部) -->
|
||||
<select id="listAll" parameterType="pd" resultType="pd">
|
||||
select
|
||||
f.*
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
</select>
|
||||
|
||||
<!-- 批量删除 -->
|
||||
<delete id="deleteAll" parameterType="String">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
ISDELETE = '1'
|
||||
where
|
||||
TRAINING_BATCH_ID in
|
||||
<foreach item="item" index="index" collection="ArrayDATA_IDS" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<!-- 获取编码 -->
|
||||
<select id="getCode" parameterType="pd" resultType="pd">
|
||||
SELECT
|
||||
COUNT(1) as code
|
||||
FROM <include refid="tableName"></include> f
|
||||
WHERE f.CREATTIME LIKE CONCAT(#{CREATDATE},'%')
|
||||
</select>
|
||||
|
||||
<select id="batchUserlistPage" parameterType="page" resultType="pd">
|
||||
select
|
||||
b.USERNAME,
|
||||
b.NAME,
|
||||
b.BELONG_TO_CORP_NAME,
|
||||
a.TRAIN_USERS_ID,
|
||||
a.STEP_STATUS,
|
||||
a.USER_ID,
|
||||
a.USER_ID as XGF_USER_ID,
|
||||
a.SUPERVISION_STATE,
|
||||
a.MANAGER_STATE,
|
||||
a.TERRITORIALITY_STATE,
|
||||
a.RESULT_STATUS,
|
||||
c.SUPERVISION_USER_ID,
|
||||
c.MANAGER_USER_ID,
|
||||
c.TERRITORIALITY_USER_ID
|
||||
from xgf_train_users a
|
||||
left join xgf_user b on a.USER_ID = b.XGF_USER_ID
|
||||
left join xgf_training_batch c on a.TRAINING_BATCH_ID = c.TRAINING_BATCH_ID
|
||||
where a.IS_DELETE = '0'
|
||||
<if test="pd.TRAINING_BATCH_ID != null and pd.TRAINING_BATCH_ID != ''">
|
||||
and a.TRAINING_BATCH_ID = #{pd.TRAINING_BATCH_ID}
|
||||
</if>
|
||||
</select>
|
||||
<select id="passUserlistPage" resultType="com.zcloud.entity.PageData">
|
||||
select distinct su.USERNAME,
|
||||
su.NAME,
|
||||
sud.SEX,
|
||||
su.CARD_ID,
|
||||
ci.RELEVANT_UNIT_NAME,
|
||||
od.NAME as DEPARTMENT_NAME,
|
||||
sud.PHOTO,
|
||||
sud.PHONE,
|
||||
ci.CORPINFO_ID,
|
||||
su.USER_ID,
|
||||
a.TRAINUSERS_ID,
|
||||
ssu.JOBS_TYPE as PERSON_WORK_TYPE,
|
||||
ssu.CERTIFICATE
|
||||
from xgf_train_users a
|
||||
left join bus_trainingbatch tb on a.TRAINING_BATCH_ID = tb.TRAINING_BATCH_ID
|
||||
left join sys_user su on su.USER_ID = a.USER_ID
|
||||
left join SYS_USER_DETAILS sud on su.USER_ID = sud.USER_ID
|
||||
left join bus_corp_info ci on ci.CORPINFO_ID = su.CORPINFO_ID
|
||||
left join oa_department od on od.DEPARTMENT_ID = su.DEPARTMENT_ID
|
||||
left join (select ssup.USER_ID, ssup. JOBS_TYPE, ssup.CERTIFICATE
|
||||
from sys_special_user ssup
|
||||
group by ssup.USER_ID) as ssu on ssu.USER_ID = a.USER_ID
|
||||
where su.AUDIT_STATE = '2'
|
||||
and tb.ISDELETE = '0'
|
||||
AND su.STATUS = '9'
|
||||
AND (a.STATUS = '1'
|
||||
or a.STATUS = '2')
|
||||
and a.SUPERVISION_STATE = 1
|
||||
and a.MANAGER_STATE = 1
|
||||
and a.TERRITORIALITY_STATE = 1
|
||||
order by tb.CREATTIME
|
||||
</select>
|
||||
|
||||
<!-- 通过ID获取数据 -->
|
||||
<select id="findAndTimeById" parameterType="pd" resultType="pd">
|
||||
select
|
||||
f.*,
|
||||
supUser.USERNAME as SUPERVISION_USER_USERNAME,
|
||||
supUser.NAME as SUPERVISION_USER_NAME,
|
||||
supDept.NAME as SUPERVISION_DEPT_NAME,
|
||||
mangUser.NAME as MANAGER_USER_USERNAME,
|
||||
mangUser.NAME as MANAGER_USER_NAME,
|
||||
mangDept.NAME as MANAGER_DEPT_NAME,
|
||||
rerUser.NAME as ERRITORIALITY_USER_USERNAME,
|
||||
rerUser.NAME as ERRITORIALITY_USER_NAME,
|
||||
rerDept.NAME as ERRITORIALITY_DEPT_NAME,
|
||||
(SELECT MAX( t1.SUPERVISION_TIME ) AS SUPERVISION_TIME FROM xgf_train_users t1 where
|
||||
t1.TRAINING_BATCH_ID = f.TRAINING_BATCH_ID ) AS SUPERVISION_TIME,
|
||||
(SELECT MAX( t2.MANAGER_TIME ) AS MANAGER_TIME FROM xgf_train_users t2 where
|
||||
t2.TRAINING_BATCH_ID = f.TRAINING_BATCH_ID ) AS MANAGER_TIME,
|
||||
(SELECT MAX( t3.TERRITORIALITY_TIME ) AS TERRITORIALITY_TIME FROM xgf_train_users t3 where
|
||||
t3.TRAINING_BATCH_ID = f.TRAINING_BATCH_ID ) AS TERRITORIALITY_TIME
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
left join vi_user_all supUser on supUser.USER_ID = f.SUPERVISION_USER_ID
|
||||
left join vi_department_all supDept on supDept.DEPARTMENT_ID = f.SUPERVISION
|
||||
left join vi_corp_user mangUser on mangUser.USER_ID = f.MANAGER_USER_ID
|
||||
left join vi_corp_department mangDept on mangDept.DEPARTMENT_ID = f.MANAGER
|
||||
left join vi_corp_user rerUser on rerUser.USER_ID = f.TERRITORIALITY_USER_ID
|
||||
left join vi_corp_department rerDept on rerDept.DEPARTMENT_ID = f.TERRITORIALITY
|
||||
where
|
||||
f.TRAINING_BATCH_ID = #{TRAINING_BATCH_ID}
|
||||
</select>
|
||||
<select id="findByUserId" resultType="com.zcloud.entity.PageData">
|
||||
select b.MANAGER_DEPARTMENT_NAME,
|
||||
b.MANAGER_USER_NAME,
|
||||
a.MANAGER_STATE,
|
||||
a.MANAGER_OPINION,
|
||||
b.SUPERVISION_DEPARTMENT_NAME,
|
||||
b.SUPERVISION_USER_NAME,
|
||||
a.SUPERVISION_STATE,
|
||||
a.SUPERVISION_OPINION,
|
||||
b.TERRITORIALITY_DEPARTMENT_NAME,
|
||||
b.TERRITORIALITY_USER_NAME,
|
||||
a.TERRITORIALITY_STATE,
|
||||
a.TERRITORIALITY_OPINION
|
||||
from xgf_train_users a
|
||||
left join xgf_training_batch b on a.TRAINING_BATCH_ID = b.TRAINING_BATCH_ID
|
||||
where a.IS_DELETE = '0'
|
||||
and USER_ID = #{USER_ID}
|
||||
order by b.CREATTIME desc;
|
||||
</select>
|
||||
<select id="oldlistPage" resultType="com.zcloud.entity.PageData">
|
||||
select *
|
||||
from xgf_training_batch a
|
||||
where a.IS_DELETE = '0'
|
||||
and a.CORPINFO_ID = #{pd.CORPINFO_ID}
|
||||
</select>
|
||||
</mapper>
|
|
@ -0,0 +1,337 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zcloud.mapper.datasource.xgf.XgfUserDetailsMapper">
|
||||
|
||||
<!--表名 -->
|
||||
<sql id="tableName">
|
||||
XGF_USER_DETAILS
|
||||
</sql>
|
||||
|
||||
<!-- 字段 -->
|
||||
<sql id="Field">
|
||||
f.XGF_USER_DETAILS_ID,
|
||||
f.XGF_USER_ID,
|
||||
f.XGF_USER_NAME,
|
||||
f.BELONG_TO_CORP,
|
||||
f.BELONG_TO_CORP_NAME,
|
||||
f.PHONE,
|
||||
f.CREATE_TIME,
|
||||
f.DEPART_STATE,
|
||||
f.IS_DELETE,
|
||||
f.AGE,
|
||||
f.HKLOCAL,
|
||||
f.ADDRESS,
|
||||
f.DEGREE_OF_EDUCATION,
|
||||
f.DEGREE_OF_EDUCATION_NAME,
|
||||
f.CORP_START_DATE,
|
||||
f.POST_ID,
|
||||
f.POST_NAME,
|
||||
f.WORK_SIGN,
|
||||
f.JOINED_DATE,
|
||||
f.WORK_DATE,
|
||||
f.PHOTO,
|
||||
f.DATE_OF_BIRTH,
|
||||
f.ISPAY,
|
||||
f.ISPAY_NUMBER,
|
||||
f.IS_SAFETY_TELL,
|
||||
f.IS_SAFETY_TIME,
|
||||
f.IS_INJURIES_PAY,
|
||||
f.IS_SIGN_LABOR,
|
||||
f.SEX,
|
||||
f.ENTRY_DATE,
|
||||
f.PERSON_WORK_TYPE,
|
||||
f.PERSON_WORK_TYPE_NAME,
|
||||
f.NATIONALITY,
|
||||
f.NATIONALITY_NAME,
|
||||
f.POLITICAL_TIME,
|
||||
f.POLITICAL_STATUS,
|
||||
f.POLITICAL_STATUS_NAME,
|
||||
f.IS_INJURIES_PAY_TIME,
|
||||
f.IS_LEVEL_THREE,
|
||||
f.IS_BODY_ADAPT,
|
||||
f.IS_SPECIAL_JOB,
|
||||
f.CORPINFO_ID,
|
||||
f.MANAGER_DEPARTMENT_ID,
|
||||
f.MANAGER_DEPARTMENT_NAME,
|
||||
f.COMPETENT_DEPARTMENT_ID,
|
||||
f.COMPETENT_DEPARTMENT_NAME,
|
||||
f.MAIN_DEPARTMENT_ID,
|
||||
f.MAIN_DEPARTMENT_NAME,
|
||||
f.CARD_ID,
|
||||
f.DEPARTMENT_ID,
|
||||
f.DEPARTMENT_NAME,
|
||||
f.IS_BF,
|
||||
f.IS_SOCIAL,
|
||||
f.SOCIAL_NUMBER,
|
||||
f.zzName
|
||||
</sql>
|
||||
|
||||
<!-- 字段用于新增 -->
|
||||
<sql id="Field2">
|
||||
XGF_USER_DETAILS_ID,
|
||||
XGF_USER_ID,
|
||||
XGF_USER_NAME,
|
||||
BELONG_TO_CORP,
|
||||
BELONG_TO_CORP_NAME,
|
||||
PHONE,
|
||||
CREATE_TIME,
|
||||
DEPART_STATE,
|
||||
IS_DELETE,
|
||||
AGE,
|
||||
HKLOCAL,
|
||||
ADDRESS,
|
||||
DEGREE_OF_EDUCATION,
|
||||
DEGREE_OF_EDUCATION_NAME,
|
||||
CORP_START_DATE,
|
||||
POST_ID,
|
||||
POST_NAME,
|
||||
WORK_SIGN,
|
||||
JOINED_DATE,
|
||||
WORK_DATE,
|
||||
PHOTO,
|
||||
DATE_OF_BIRTH,
|
||||
ISPAY,
|
||||
ISPAY_NUMBER,
|
||||
IS_SAFETY_TELL,
|
||||
IS_SAFETY_TIME,
|
||||
IS_INJURIES_PAY,
|
||||
IS_SIGN_LABOR,
|
||||
SEX,
|
||||
ENTRY_DATE,
|
||||
PERSON_WORK_TYPE,
|
||||
PERSON_WORK_TYPE_NAME,
|
||||
NATIONALITY,
|
||||
NATIONALITY_NAME,
|
||||
POLITICAL_TIME,
|
||||
POLITICAL_STATUS,
|
||||
POLITICAL_STATUS_NAME,
|
||||
IS_INJURIES_PAY_TIME,
|
||||
IS_LEVEL_THREE,
|
||||
IS_BODY_ADAPT,
|
||||
IS_SPECIAL_JOB,
|
||||
CORPINFO_ID,
|
||||
MANAGER_DEPARTMENT_ID,
|
||||
MANAGER_DEPARTMENT_NAME,
|
||||
COMPETENT_DEPARTMENT_ID,
|
||||
COMPETENT_DEPARTMENT_NAME,
|
||||
MAIN_DEPARTMENT_ID,
|
||||
MAIN_DEPARTMENT_NAME,
|
||||
CARD_ID,
|
||||
DEPARTMENT_ID,
|
||||
DEPARTMENT_NAME,
|
||||
IS_BF,
|
||||
IS_SOCIAL,
|
||||
SOCIAL_NUMBER,
|
||||
zzName
|
||||
</sql>
|
||||
|
||||
<!-- 字段值 -->
|
||||
<sql id="FieldValue">
|
||||
#{XGF_USER_DETAILS_ID},
|
||||
#{XGF_USER_ID},
|
||||
#{XGF_USER_NAME},
|
||||
#{BELONG_TO_CORP},
|
||||
#{BELONG_TO_CORP_NAME},
|
||||
#{PHONE},
|
||||
#{CREATE_TIME},
|
||||
#{DEPART_STATE},
|
||||
#{IS_DELETE},
|
||||
#{AGE},
|
||||
#{HKLOCAL},
|
||||
#{ADDRESS},
|
||||
#{DEGREE_OF_EDUCATION},
|
||||
#{DEGREE_OF_EDUCATION_NAME},
|
||||
#{CORP_START_DATE},
|
||||
#{POST_ID},
|
||||
#{POST_NAME},
|
||||
#{WORK_SIGN},
|
||||
#{JOINED_DATE},
|
||||
#{WORK_DATE},
|
||||
#{PHOTO},
|
||||
#{DATE_OF_BIRTH},
|
||||
#{ISPAY},
|
||||
#{ISPAY_NUMBER},
|
||||
#{IS_SAFETY_TELL},
|
||||
#{IS_SAFETY_TIME},
|
||||
#{IS_INJURIES_PAY},
|
||||
#{IS_SIGN_LABOR},
|
||||
#{SEX},
|
||||
#{ENTRY_DATE},
|
||||
#{PERSON_WORK_TYPE},
|
||||
#{PERSON_WORK_TYPE_NAME},
|
||||
#{NATIONALITY},
|
||||
#{NATIONALITY_NAME},
|
||||
#{POLITICAL_TIME},
|
||||
#{POLITICAL_STATUS},
|
||||
#{POLITICAL_STATUS_NAME},
|
||||
#{IS_INJURIES_PAY_TIME},
|
||||
#{IS_LEVEL_THREE},
|
||||
#{IS_BODY_ADAPT},
|
||||
#{IS_SPECIAL_JOB},
|
||||
#{CORPINFO_ID},
|
||||
#{MANAGER_DEPARTMENT_ID},
|
||||
#{MANAGER_DEPARTMENT_NAME},
|
||||
#{COMPETENT_DEPARTMENT_ID},
|
||||
#{COMPETENT_DEPARTMENT_NAME},
|
||||
#{MAIN_DEPARTMENT_ID},
|
||||
#{MAIN_DEPARTMENT_NAME},
|
||||
#{CARD_ID},
|
||||
#{DEPARTMENT_ID},
|
||||
#{DEPARTMENT_NAME},
|
||||
#{IS_BF},
|
||||
#{IS_SOCIAL},
|
||||
#{SOCIAL_NUMBER},
|
||||
#{zzName}
|
||||
</sql>
|
||||
|
||||
<!-- 新增-->
|
||||
<insert id="save" parameterType="pd">
|
||||
insert into
|
||||
<include refid="tableName"></include>
|
||||
(
|
||||
<include refid="Field2"></include>
|
||||
) values (
|
||||
<include refid="FieldValue"></include>
|
||||
)
|
||||
</insert>
|
||||
|
||||
<!-- 删除-->
|
||||
<delete id="delete" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
IS_DELETE = '1'
|
||||
where
|
||||
XGF_USER_ID = #{XGF_USER_ID}
|
||||
</delete>
|
||||
|
||||
<!-- 修改 -->
|
||||
<update id="edit" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
XGF_USER_DETAILS_ID = #{XGF_USER_DETAILS_ID},
|
||||
XGF_USER_ID = #{XGF_USER_ID},
|
||||
XGF_USER_NAME = #{XGF_USER_NAME},
|
||||
BELONG_TO_CORP = #{BELONG_TO_CORP},
|
||||
BELONG_TO_CORP_NAME = #{BELONG_TO_CORP_NAME},
|
||||
PHONE = #{PHONE},
|
||||
CREATE_TIME = #{CREATE_TIME},
|
||||
DEPART_STATE = #{DEPART_STATE},
|
||||
IS_DELETE = #{IS_DELETE},
|
||||
AGE = #{AGE},
|
||||
HKLOCAL = #{HKLOCAL},
|
||||
ADDRESS = #{ADDRESS},
|
||||
DEGREE_OF_EDUCATION = #{DEGREE_OF_EDUCATION},
|
||||
DEGREE_OF_EDUCATION_NAME = #{DEGREE_OF_EDUCATION_NAME},
|
||||
CORP_START_DATE = #{CORP_START_DATE},
|
||||
POST_ID = #{POST_ID},
|
||||
POST_NAME = #{POST_NAME},
|
||||
WORK_SIGN = #{WORK_SIGN},
|
||||
JOINED_DATE = #{JOINED_DATE},
|
||||
WORK_DATE = #{WORK_DATE},
|
||||
PHOTO = #{PHOTO},
|
||||
DATE_OF_BIRTH = #{DATE_OF_BIRTH},
|
||||
ISPAY = #{ISPAY},
|
||||
ISPAY_NUMBER = #{ISPAY_NUMBER},
|
||||
IS_SAFETY_TELL = #{IS_SAFETY_TELL},
|
||||
IS_SAFETY_TIME = #{IS_SAFETY_TIME},
|
||||
IS_INJURIES_PAY = #{IS_INJURIES_PAY},
|
||||
IS_SIGN_LABOR = #{IS_SIGN_LABOR},
|
||||
SEX = #{SEX},
|
||||
ENTRY_DATE = #{ENTRY_DATE},
|
||||
PERSON_WORK_TYPE = #{PERSON_WORK_TYPE},
|
||||
PERSON_WORK_TYPE_NAME = #{PERSON_WORK_TYPE_NAME},
|
||||
NATIONALITY = #{NATIONALITY},
|
||||
NATIONALITY_NAME = #{NATIONALITY_NAME},
|
||||
POLITICAL_TIME = #{POLITICAL_TIME},
|
||||
POLITICAL_STATUS = #{POLITICAL_STATUS},
|
||||
POLITICAL_STATUS_NAME = #{POLITICAL_STATUS_NAME},
|
||||
IS_INJURIES_PAY_TIME = #{IS_INJURIES_PAY_TIME},
|
||||
IS_LEVEL_THREE = #{IS_LEVEL_THREE},
|
||||
IS_BODY_ADAPT = #{IS_BODY_ADAPT},
|
||||
IS_SPECIAL_JOB = #{IS_SPECIAL_JOB},
|
||||
CORPINFO_ID = #{CORPINFO_ID},
|
||||
MANAGER_DEPARTMENT_ID = #{MANAGER_DEPARTMENT_ID},
|
||||
MANAGER_DEPARTMENT_NAME = #{MANAGER_DEPARTMENT_NAME},
|
||||
COMPETENT_DEPARTMENT_ID = #{COMPETENT_DEPARTMENT_ID},
|
||||
COMPETENT_DEPARTMENT_NAME = #{COMPETENT_DEPARTMENT_NAME},
|
||||
MAIN_DEPARTMENT_ID = #{MAIN_DEPARTMENT_ID},
|
||||
MAIN_DEPARTMENT_NAME = #{MAIN_DEPARTMENT_NAME},
|
||||
CARD_ID = #{CARD_ID},
|
||||
DEPARTMENT_ID = #{DEPARTMENT_ID},
|
||||
DEPARTMENT_NAME = #{DEPARTMENT_NAME},
|
||||
IS_BF = #{IS_BF},
|
||||
IS_SOCIAL = #{IS_SOCIAL},
|
||||
SOCIAL_NUMBER = #{SOCIAL_NUMBER},
|
||||
zzName = #{zzName}
|
||||
where
|
||||
XGF_USER_DETAILS_ID = #{XGF_USER_DETAILS_ID}
|
||||
</update>
|
||||
|
||||
<!-- 通过ID获取数据 -->
|
||||
<select id="findById" parameterType="pd" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include>
|
||||
from
|
||||
<include refid="tableName"></include>
|
||||
f
|
||||
where
|
||||
f.XFG_USER_DETAILS_ID = #{XFG_USER_DETAILS_ID}
|
||||
</select>
|
||||
|
||||
<!-- 列表 -->
|
||||
<select id="listPage" parameterType="page" resultType="pd">
|
||||
select
|
||||
*
|
||||
from
|
||||
<include refid="tableName"></include>
|
||||
f
|
||||
where f.IS_DELETE = '0' and f.CORPINFO_ID = #{pd.CORPINFO_ID}
|
||||
<if test="pd.KEYWORDS != null and pd.KEYWORDS != ''"><!-- 关键词检索 -->
|
||||
and(f.BELONG_TO_CORP_NAME LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%'))
|
||||
</if>
|
||||
ORDER BY f.CREATED_TIME DESC
|
||||
</select>
|
||||
|
||||
<!-- 列表(全部) -->
|
||||
<select id="listAll" parameterType="pd" resultType="pd">
|
||||
select
|
||||
*
|
||||
<include refid="Field"></include>
|
||||
from
|
||||
<include refid="tableName"></include>
|
||||
f
|
||||
where f.IS_DELETE = '0' and f.CORPINFO_ID = #{pd.CORPINFO_ID}
|
||||
</select>
|
||||
|
||||
<!-- 批量删除 -->
|
||||
<delete id="deleteAll" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
IS_DELETE = '1',
|
||||
OPERATOR = #{OPERATOR},
|
||||
OPERATTIME = #{OPERATTIME}
|
||||
where
|
||||
XFG_USER_DETAILS_ID in
|
||||
<foreach item="item" index="index" collection="ArrayDATA_IDS" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<!-- 列表(根据多选ID查询数据) -->
|
||||
<select id="listByIds" parameterType="pd" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include>
|
||||
from
|
||||
<include refid="tableName"></include>
|
||||
f
|
||||
where f.IS_DELETE = '0'
|
||||
and XFG_USER_DETAILS_ID in
|
||||
<foreach item="item" index="index" collection="ArrayDATA_IDS" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
</mapper>
|
|
@ -0,0 +1,312 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zcloud.mapper.datasource.xgf.XgfUserMapper">
|
||||
|
||||
<!--表名 -->
|
||||
<sql id="tableName">
|
||||
XGF_USER
|
||||
</sql>
|
||||
|
||||
<!-- 字段 -->
|
||||
<sql id="Field">
|
||||
f.XGF_USER_ID,
|
||||
f.USERNAME,
|
||||
f.NAME,
|
||||
f.VALID_FLAG,
|
||||
f.BELONG_TO_CORP,
|
||||
f.BELONG_TO_CORP_NAME,
|
||||
f.IS_DELETE,
|
||||
f.CREATE_TIME,
|
||||
f.CORPINFO_ID,
|
||||
f.STATUS,
|
||||
f.OPERATOR_TIME,
|
||||
f.ISFLOW,
|
||||
f.STUDY_STATUS
|
||||
</sql>
|
||||
|
||||
<!-- 字段用于新增 -->
|
||||
<sql id="Field2">
|
||||
XGF_USER_ID,
|
||||
USERNAME,
|
||||
NAME,
|
||||
VALID_FLAG,
|
||||
BELONG_TO_CORP,
|
||||
BELONG_TO_CORP_NAME,
|
||||
IS_DELETE,
|
||||
CREATE_TIME,
|
||||
CORPINFO_ID,
|
||||
STATUS,
|
||||
OPERATOR_TIME,
|
||||
ISFLOW,
|
||||
STUDY_STATUS
|
||||
</sql>
|
||||
|
||||
<!-- 字段值 -->
|
||||
<sql id="FieldValue">
|
||||
#{XGF_USER_ID},
|
||||
#{USERNAME},
|
||||
#{NAME},
|
||||
#{VALID_FLAG},
|
||||
#{BELONG_TO_CORP},
|
||||
#{BELONG_TO_CORP_NAME},
|
||||
#{IS_DELETE},
|
||||
#{CREATE_TIME},
|
||||
#{CORPINFO_ID},
|
||||
#{STATUS},
|
||||
#{OPERATOR_TIME},
|
||||
#{ISFLOW},
|
||||
#{STUDY_STATUS}
|
||||
</sql>
|
||||
|
||||
<!-- 新增-->
|
||||
<insert id="save" parameterType="pd">
|
||||
insert into
|
||||
<include refid="tableName"></include>
|
||||
(
|
||||
<include refid="Field2"></include>
|
||||
) values (
|
||||
<include refid="FieldValue"></include>
|
||||
)
|
||||
</insert>
|
||||
|
||||
<!-- 删除-->
|
||||
<delete id="delete" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
IS_DELETE = '1'
|
||||
where
|
||||
XGF_USER_ID = #{XGF_USER_ID}
|
||||
</delete>
|
||||
|
||||
<!-- 修改 -->
|
||||
<update id="edit" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
USERNAME = #{USERNAME},
|
||||
NAME = #{NAME},
|
||||
VALID_FLAG = #{VALID_FLAG},
|
||||
BELONG_TO_CORP = #{BELONG_TO_CORP},
|
||||
BELONG_TO_CORP_NAME = #{BELONG_TO_CORP_NAME},
|
||||
IS_DELETE = #{IS_DELETE},
|
||||
CREATE_TIME = #{CREATE_TIME},
|
||||
CORPINFO_ID = #{CORPINFO_ID},
|
||||
STATUS = #{STATUS},
|
||||
OPERATOR_TIME = #{OPERATOR_TIME},
|
||||
ISFLOW = #{ISFLOW},
|
||||
STUDY_STATUS = #{STUDY_STATUS}
|
||||
where
|
||||
XGF_USER_ID = #{XGF_USER_ID}
|
||||
</update>
|
||||
|
||||
<update id="updateStatusByUnflowTrain">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set STATUS = #{STATUS}
|
||||
where
|
||||
XGF_USER_ID in (select USER_ID from xgf_train_users bu where bu.TRAINUSERS_ID = #{TRAINUSERS_ID})
|
||||
</update>
|
||||
<update id="bantchUpdateStatus">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set STUDY_STATUS = #{STATUS}
|
||||
where
|
||||
XGF_USER_ID in
|
||||
<foreach item="item" index="index" collection="arrayDATA_ids" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</update>
|
||||
<update id="updateStatusByFlowTrain">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set STATUS = #{STATUS}
|
||||
where
|
||||
XGF_USER_ID in (select USER_ID from xgf_train_users bu where bu.TRAININGBATCH_ID = #{TRAININGBATCH_ID})
|
||||
</update>
|
||||
<update id="graduation">
|
||||
update xgf_train_users a set a.STATUS = #{STATUS} where a.TRAINUSERS_ID in
|
||||
<foreach item="item" index="index" collection="list" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>;
|
||||
</update>
|
||||
<update id="graduationstudent">
|
||||
update xgf_train_users a set a.STATUS = #{STATUS} where a.TRAINUSERS_ID = #{TRAINUSERS_ID}
|
||||
</update>
|
||||
|
||||
<!-- 通过ID获取数据 -->
|
||||
<select id="findById" parameterType="pd" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include>
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
where
|
||||
f.XGF_USER_ID = #{XGF_USER_ID}
|
||||
</select>
|
||||
|
||||
<!-- 列表 -->
|
||||
<select id="listPage" parameterType="page" resultType="pd">
|
||||
select
|
||||
*
|
||||
from
|
||||
<include refid="tableName"></include>
|
||||
f
|
||||
where f.IS_DELETE = '0' and f.CORPINFO_ID = #{pd.CORPINFO_ID}
|
||||
<if test="pd.KEYWORDS != null and pd.KEYWORDS != ''"><!-- 关键词检索 -->
|
||||
and(f.BELONG_TO_CORP_NAME LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%'))
|
||||
</if>
|
||||
ORDER BY f.CREATE_TIME DESC
|
||||
</select>
|
||||
|
||||
<!-- 列表(全部) -->
|
||||
<select id="listAll" parameterType="pd" resultType="pd">
|
||||
select
|
||||
*
|
||||
<include refid="Field"></include>
|
||||
from
|
||||
<include refid="tableName"></include>
|
||||
f
|
||||
where f.IS_DELETE = '0' and f.CORPINFO_ID = #{pd.CORPINFO_ID}
|
||||
</select>
|
||||
|
||||
<!-- 批量删除 -->
|
||||
<delete id="deleteAll" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
IS_DELETE = '1',
|
||||
OPERATOR = #{OPERATOR},
|
||||
OPERATTIME = #{OPERATTIME}
|
||||
where
|
||||
SPECIALEQUIPMENT_ID in
|
||||
<foreach item="item" index="index" collection="ArrayDATA_IDS" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<!-- 列表(根据多选ID查询数据) -->
|
||||
<select id="listByIds" parameterType="pd" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include>
|
||||
from
|
||||
<include refid="tableName"></include>
|
||||
f
|
||||
where f.IS_DELETE = '0'
|
||||
and f.XGF_USER_ID in
|
||||
<foreach item="item" index="index" collection="XGF_USER_IDS" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</select>
|
||||
<select id="flowlistPage" resultType="com.zcloud.entity.PageData">
|
||||
select a.XGF_USER_ID,
|
||||
a.BELONG_TO_CORP,
|
||||
a.BELONG_TO_CORP_NAME,
|
||||
a.USERNAME,
|
||||
a.NAME,
|
||||
b.MANAGER_DEPARTMENT_ID,
|
||||
b.MANAGER_DEPARTMENT_NAME,
|
||||
b.MAIN_DEPARTMENT_ID,
|
||||
b.MAIN_DEPARTMENT_NAME
|
||||
from
|
||||
xgf_user a
|
||||
left join xgf_user_details b on a.XGF_USER_ID = b.XGF_USER_ID
|
||||
where a.IS_DELETE = '0'
|
||||
<if test="pd.STATUS != null and pd.STATUS != ''">
|
||||
and a.STATUS = #{pd.STATUS}
|
||||
</if>
|
||||
<if test="pd.UN_STUDY_STATUS != null and pd.UN_STUDY_STATUS != ''">
|
||||
and a.STUDY_STATUS != #{pd.UN_STUDY_STATUS}
|
||||
</if>
|
||||
<if test="pd.STUDY_STATUS != null and pd.STUDY_STATUS != ''">
|
||||
and a.STUDY_STATUS = #{pd.STUDY_STATUS}
|
||||
</if>
|
||||
<if test="pd.CORPINFO_ID != '' and pd.CORPINFO_ID != null">
|
||||
and a.CORPINFO_ID = #{pd.CORPINFO_ID}
|
||||
</if>
|
||||
<if test="pd.KEYWORDS != null and pd.KEYWORDS != ''">
|
||||
and (a.USERNAME LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%'))
|
||||
</if>
|
||||
<if test="pd.VALID_FLAG != null and pd.VALID_FLAG != ''">
|
||||
and a.VALID_FLAG = #{pd.VALID_FLAG}
|
||||
</if>
|
||||
</select>
|
||||
<select id="getInfoById" resultType="com.zcloud.entity.PageData">
|
||||
select a.XGF_USER_ID,
|
||||
a.ISFLOW,
|
||||
a.NAME,
|
||||
b.XGF_USER_DETAILS_ID,
|
||||
b.XGF_USER_ID,
|
||||
b.XGF_USER_NAME,
|
||||
b.BELONG_TO_CORP,
|
||||
b.BELONG_TO_CORP_NAME,
|
||||
b.PHONE,
|
||||
b.CREATE_TIME,
|
||||
b.DEPART_STATE,
|
||||
b.IS_DELETE,
|
||||
b.AGE,
|
||||
b.HKLOCAL,
|
||||
b.ADDRESS,
|
||||
b.DEGREE_OF_EDUCATION,
|
||||
b.DEGREE_OF_EDUCATION_NAME,
|
||||
b.CORP_START_DATE,
|
||||
b.POST_ID,
|
||||
b.POST_NAME,
|
||||
b.WORK_SIGN,
|
||||
b.JOINED_DATE,
|
||||
b.WORK_DATE,
|
||||
b.PHOTO,
|
||||
b.DATE_OF_BIRTH,
|
||||
b.ISPAY,
|
||||
b.ISPAY_NUMBER,
|
||||
b.IS_SAFETY_TELL,
|
||||
b.IS_SAFETY_TIME,
|
||||
b.IS_INJURIES_PAY,
|
||||
b.IS_SIGN_LABOR,
|
||||
b.SEX,
|
||||
b.ENTRY_DATE,
|
||||
b.PERSON_WORK_TYPE,
|
||||
b.PERSON_WORK_TYPE_NAME,
|
||||
b.NATIONALITY,
|
||||
b.NATIONALITY_NAME,
|
||||
b.POLITICAL_TIME,
|
||||
b.POLITICAL_STATUS,
|
||||
b.POLITICAL_STATUS_NAME,
|
||||
b.IS_INJURIES_PAY_TIME,
|
||||
b.IS_LEVEL_THREE,
|
||||
b.IS_BODY_ADAPT,
|
||||
b.IS_SPECIAL_JOB,
|
||||
b.CORPINFO_ID,
|
||||
b.MANAGER_DEPARTMENT_ID,
|
||||
b.MANAGER_DEPARTMENT_NAME,
|
||||
b.CARD_ID,
|
||||
b.DEPARTMENT_ID,
|
||||
b.DEPARTMENT_NAME,
|
||||
b.IS_SOCIAL,
|
||||
b.IS_BF,
|
||||
b.SOCIAL_NUMBER,
|
||||
b.zzName,
|
||||
b.POLITICAL_TIME
|
||||
from xgf_user a
|
||||
left join xgf_user_details b on a.XGF_USER_ID = b.XGF_USER_ID
|
||||
where a.IS_DELETE = '0'
|
||||
<if test="XGF_USER_ID != null and XGF_USER_ID != ''">
|
||||
and a.XGF_USER_ID = #{XGF_USER_ID}
|
||||
</if>
|
||||
</select>
|
||||
<select id="findRecordList" resultType="com.zcloud.entity.PageData">
|
||||
select rf.*,
|
||||
rcm.CLASS_NAME,
|
||||
rcm.OPENING_TIME,
|
||||
sdp.NAME as PLACE_NAME,
|
||||
sdt.NAME as TRAINING_TYPE_NAME,
|
||||
rcm.VALIDITY_PERIOD_START,
|
||||
rcm.VALIDITY_PERIOD_END
|
||||
from `qa-gwj-regulatory`.bus_class_info rf
|
||||
left join `qa-gwj-regulatory`.bus_class_message rcm on rf.CLASS_MESSAGE_ID = rcm.CLASS_MESSAGE_ID
|
||||
left join sys_dictionaries sdp on sdp.DICTIONARIES_ID = rcm.PLACE
|
||||
left join sys_dictionaries sdt on sdt.DICTIONARIES_ID = rcm.TRAINING_TYPE
|
||||
where rf.USER_ID = #{USER_ID} and rf.ISDELETE = '0'
|
||||
order by rf.CREATE_TIME desc
|
||||
</select>
|
||||
|
||||
</mapper>
|
|
@ -0,0 +1 @@
|
|||
升级内容: 企业端PC: 1、新增-三人以上风险分布图菜单-分公司进行上传维护 2、新增-人员聚集分布图菜单-分公司进行上传维护 3、新增-人员培训申请-分公司进行申请培训 4、新增-相关方人员撤场申请审批-分公司审批相关方人员撤回申请 监管端PC: 1、新增-三人以上风险分布图菜单,查看分公司数据 2、新增-人员聚集分布图菜单,查看分公司数据 3、优化-重点工程菜单-搜索条件可以手动输入,主管部门和监管部门可以选择全部企业 4、优化-入场告知培训管理-优化审核流程 相关方PC: 1、新增-人员推送申请-相关方对分公司推送人员 2、新增-人员撤回申请-相关方对分公司申请撤回人员 企业端APP: 1、优化-动火作业-监火改为选择部门 2、新增-查看重点工程监控视频 3、新增-重点工程创建人审核开工申请和结束申请 监管端APP: 1、新增-查看重点工程监控视频 2、新增-重点工程创建人审核开工申请和结束申请 一公司app: 1、新增-原来动火作业改为国标新动火作业审批流程
|
Loading…
Reference in New Issue