From 09a83d789e5ee00a3f24ff67f06e8794c3f8b147 Mon Sep 17 00:00:00 2001 From: dearlin <1261008090@qq.com> Date: Tue, 6 Feb 2024 15:40:01 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=89=E5=85=A8=E4=BE=8B=E4=BC=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SafetyMeetingController.java | 114 ++ .../app/AppSafetyMeetingController.java | 24 + .../controller/system/UsersController.java | 5 +- .../safetyMeeting/SafetyMeetingMapper.java | 23 + .../SafetyMeetingPeopleMapper.java | 14 + .../datasource/system/DepartmentMapper.java | 3 + .../safetyMeeting/SafetyMeetingService.java | 23 + .../impl/SafetyMeetingServiceImpl.java | 74 ++ .../service/system/DepartmentService.java | 3 + .../zcloud/service/system/UsersService.java | 2 + .../system/impl/DepartmentServiceImpl.java | 6 + .../service/system/impl/UsersServiceImpl.java | 5 + .../safetyMeeting/SafetyMeetingMapper.xml | 105 ++ .../SafetyMeetingPeopleMapper.xml | 86 ++ .../datasource/system/DepartmentMapper.xml | 1040 +++++++++-------- 15 files changed, 1015 insertions(+), 512 deletions(-) create mode 100644 src/main/java/com/zcloud/controller/safetyMeeting/SafetyMeetingController.java create mode 100644 src/main/java/com/zcloud/controller/safetyMeeting/app/AppSafetyMeetingController.java create mode 100644 src/main/java/com/zcloud/mapper/datasource/safetyMeeting/SafetyMeetingMapper.java create mode 100644 src/main/java/com/zcloud/mapper/datasource/safetyMeeting/SafetyMeetingPeopleMapper.java create mode 100644 src/main/java/com/zcloud/service/safetyMeeting/SafetyMeetingService.java create mode 100644 src/main/java/com/zcloud/service/safetyMeeting/impl/SafetyMeetingServiceImpl.java create mode 100644 src/main/resources/mybatis/datasource/safetyMeeting/SafetyMeetingMapper.xml create mode 100644 src/main/resources/mybatis/datasource/safetyMeeting/SafetyMeetingPeopleMapper.xml diff --git a/src/main/java/com/zcloud/controller/safetyMeeting/SafetyMeetingController.java b/src/main/java/com/zcloud/controller/safetyMeeting/SafetyMeetingController.java new file mode 100644 index 0000000..6cfa506 --- /dev/null +++ b/src/main/java/com/zcloud/controller/safetyMeeting/SafetyMeetingController.java @@ -0,0 +1,114 @@ +package com.zcloud.controller.safetyMeeting; + +import com.alibaba.fastjson.JSON; +import com.zcloud.controller.base.BaseController; +import com.zcloud.entity.Page; +import com.zcloud.entity.PageData; +import com.zcloud.service.safetyMeeting.SafetyMeetingService; +import com.zcloud.util.InitPageDataUtil; +import com.zcloud.util.Jurisdiction; +import com.zcloud.util.ReturnMap; +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.List; + +/** + * 说明:TODO + * 作者:wangxuan + * 官网:www.zcloudchina.com + */ +@Controller +@RequestMapping("/safetyMeeting") +public class SafetyMeetingController extends BaseController { + + @Resource + private SafetyMeetingService safetyMeetingService; + @Resource + private InitPageDataUtil initPageDataUtil; + + /** + * @Description: 安全例会新增 + * @Author: dearLin + * @Date: 2024/2/6/006 14:09 + * @Param: [] [] + * @Return: java.lang.Object + */ + @RequestMapping(value = "/add") + // @RequiresPermissions("safetyMeeting:add") + @ResponseBody + public Object add() throws Exception { + PageData pageData = getPageData(); + pageData.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); + + initPageDataUtil.initSave(pageData,"SAFETY_MEETING_ID"); + safetyMeetingService.save(pageData); + return ReturnMap.ok(); + } + + /** + * @Description: 安全例会删除 + * @Author: dearLin + * @Date: 2024/2/6/006 14:09 + * @Param: [] [] + * @Return: java.lang.Object + */ + @RequestMapping(value = "/delete") + // @RequiresPermissions("safetyMeeting:del") + @ResponseBody + public Object delete() throws Exception { + PageData pageData = getPageData(); + initPageDataUtil.initEdit(pageData); + safetyMeetingService.removeById(pageData); + return ReturnMap.ok(); + } + + /** + * @Description: 安全例会列表 + * @Author: dearLin + * @Date: 2024/2/6/006 14:09 + * @Param: [com.zcloud.entity.Page] [page] + * @Return: java.lang.Object + */ + @RequestMapping(value = "/list") + // @RequiresPermissions("safetyMeeting:list") + @ResponseBody + public Object list(Page page) throws Exception { + PageData pageData = getPageData(); + pageData.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); + page.setPd(pageData); + return ReturnMap.ok().put("varList", safetyMeetingService.list(page)).put("page",page); + } + + /** + * @Description: 安全例会详情 + * @Author: dearLin + * @Date: 2024/2/6/006 14:10 + * @Param: [] [] + * @Return: java.lang.Object + */ + @RequestMapping(value = "/goEdit") + // @RequiresPermissions("safetyMeeting:list") + @ResponseBody + public Object goEdit() throws Exception { + PageData pageData = getPageData(); + return ReturnMap.ok().put("pd", safetyMeetingService.findById(pageData)); + } + /** + * @Description: 安全例会 修改 + * @Author: dearLin + * @Date: 2024/2/6/006 14:10 + * @Param: [] [] + * @Return: java.lang.Object + */ + @RequestMapping(value = "/edit") + // @RequiresPermissions("safetyMeeting:list") + @ResponseBody + public Object edit() throws Exception { + PageData pageData = getPageData(); + safetyMeetingService.edit(pageData); + return ReturnMap.ok(); + } +} diff --git a/src/main/java/com/zcloud/controller/safetyMeeting/app/AppSafetyMeetingController.java b/src/main/java/com/zcloud/controller/safetyMeeting/app/AppSafetyMeetingController.java new file mode 100644 index 0000000..262f66a --- /dev/null +++ b/src/main/java/com/zcloud/controller/safetyMeeting/app/AppSafetyMeetingController.java @@ -0,0 +1,24 @@ +package com.zcloud.controller.safetyMeeting.app; + +import com.zcloud.controller.base.BaseController; +import com.zcloud.util.ReturnMap; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.ResponseBody; + +/** + * 说明:TODO + * 作者:wangxuan + * 官网:www.zcloudchina.com + */ +@Controller +@RequestMapping("app/safetyMeeting") +public class AppSafetyMeetingController extends BaseController { + + @RequestMapping(value = "/list") + // @RequiresPermissions("safetyMeeting:list") + @ResponseBody + public Object list() throws Exception { + return ReturnMap.ok(); + } +} diff --git a/src/main/java/com/zcloud/controller/system/UsersController.java b/src/main/java/com/zcloud/controller/system/UsersController.java index 08be169..32b16ea 100644 --- a/src/main/java/com/zcloud/controller/system/UsersController.java +++ b/src/main/java/com/zcloud/controller/system/UsersController.java @@ -83,8 +83,8 @@ public class UsersController extends BaseController { @ResponseBody public Object getUserByCardNo() { PageData pageData = getPageData(); - pageData.put("CORPINFO_ID",Jurisdiction.getCORPINFO_ID()); - return ReturnMap.ok().put("pd",usersService.getUserByCardNo(pageData)); + pageData.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); + return ReturnMap.ok().put("pd", usersService.getUserByCardNo(pageData)); } /** @@ -2446,7 +2446,6 @@ public class UsersController extends BaseController { @RequestMapping(value = "/listAllByCorp") @ResponseBody @LogAnno(menuType = "监测预警", menuServer = "在线监测", instructionsOperate = "智能预警", instructionsType = "列表") - public Object listAllByCorp() throws Exception { Map map = new HashMap(); String errInfo = "success"; diff --git a/src/main/java/com/zcloud/mapper/datasource/safetyMeeting/SafetyMeetingMapper.java b/src/main/java/com/zcloud/mapper/datasource/safetyMeeting/SafetyMeetingMapper.java new file mode 100644 index 0000000..62926c1 --- /dev/null +++ b/src/main/java/com/zcloud/mapper/datasource/safetyMeeting/SafetyMeetingMapper.java @@ -0,0 +1,23 @@ +package com.zcloud.mapper.datasource.safetyMeeting; + +import com.zcloud.entity.Page; +import com.zcloud.entity.PageData; + +import java.util.List; + +/** + * 说明:TODO + * 作者:wangxuan + * 官网:www.zcloudchina.com + */ +public interface SafetyMeetingMapper { + void save(PageData pageData); + + void removeById(PageData pageData); + + List datalistPage(Page page); + + PageData findById(PageData pageData); + + void edit(PageData pageData); +} diff --git a/src/main/java/com/zcloud/mapper/datasource/safetyMeeting/SafetyMeetingPeopleMapper.java b/src/main/java/com/zcloud/mapper/datasource/safetyMeeting/SafetyMeetingPeopleMapper.java new file mode 100644 index 0000000..cf9991e --- /dev/null +++ b/src/main/java/com/zcloud/mapper/datasource/safetyMeeting/SafetyMeetingPeopleMapper.java @@ -0,0 +1,14 @@ +package com.zcloud.mapper.datasource.safetyMeeting; + +import com.zcloud.entity.PageData; + +import java.util.List; + +/** + * 说明:TODO + * 作者:wangxuan + * 官网:www.zcloudchina.com + */ +public interface SafetyMeetingPeopleMapper { + void saveBatch(List safetyMeetingPeopledataList); +} diff --git a/src/main/java/com/zcloud/mapper/datasource/system/DepartmentMapper.java b/src/main/java/com/zcloud/mapper/datasource/system/DepartmentMapper.java index e298de1..a016cb9 100644 --- a/src/main/java/com/zcloud/mapper/datasource/system/DepartmentMapper.java +++ b/src/main/java/com/zcloud/mapper/datasource/system/DepartmentMapper.java @@ -5,6 +5,7 @@ import com.zcloud.entity.PageData; import com.zcloud.entity.system.Department; import java.util.List; +import java.util.Map; /** * 说明: 组织机构接Mapper @@ -163,5 +164,7 @@ public interface DepartmentMapper{ List saftmanagelist(PageData pd); List saftpersonlist(PageData pd); + + List> getDeptAllByCorp(PageData pd); } diff --git a/src/main/java/com/zcloud/service/safetyMeeting/SafetyMeetingService.java b/src/main/java/com/zcloud/service/safetyMeeting/SafetyMeetingService.java new file mode 100644 index 0000000..e6e96b9 --- /dev/null +++ b/src/main/java/com/zcloud/service/safetyMeeting/SafetyMeetingService.java @@ -0,0 +1,23 @@ +package com.zcloud.service.safetyMeeting; + +import com.zcloud.entity.Page; +import com.zcloud.entity.PageData; + +import java.util.List; + +/** + * 说明:TODO + * 作者:wangxuan + * 官网:www.zcloudchina.com + */ +public interface SafetyMeetingService { + void save(PageData pageData); + + void removeById(PageData pageData); + + List list(Page page); + + PageData findById(PageData pageData); + + void edit(PageData pageData); +} diff --git a/src/main/java/com/zcloud/service/safetyMeeting/impl/SafetyMeetingServiceImpl.java b/src/main/java/com/zcloud/service/safetyMeeting/impl/SafetyMeetingServiceImpl.java new file mode 100644 index 0000000..d5efd0e --- /dev/null +++ b/src/main/java/com/zcloud/service/safetyMeeting/impl/SafetyMeetingServiceImpl.java @@ -0,0 +1,74 @@ +package com.zcloud.service.safetyMeeting.impl; + +import com.alibaba.fastjson.JSON; +import com.zcloud.entity.Page; +import com.zcloud.entity.PageData; +import com.zcloud.mapper.datasource.safetyMeeting.SafetyMeetingMapper; +import com.zcloud.mapper.datasource.safetyMeeting.SafetyMeetingPeopleMapper; +import com.zcloud.service.safetyMeeting.SafetyMeetingService; +import com.zcloud.util.InitPageDataUtil; +import com.zcloud.util.Jurisdiction; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import javax.annotation.Resource; +import java.util.ArrayList; +import java.util.List; + +/** + * 说明:TODO + * 作者:wangxuan + * 官网:www.zcloudchina.com + */ +@Service +@Transactional +public class SafetyMeetingServiceImpl implements SafetyMeetingService { + + @Resource + private SafetyMeetingMapper safetyMeetingMapper; + @Resource + private SafetyMeetingPeopleMapper safetyMeetingPeopleMapper; + @Resource + private InitPageDataUtil initPageDataUtil; + + @Override + public void save(PageData pageData) { + List dataList = JSON.parseArray(pageData.getString("people"), PageData.class); + List safetyMeetingPeopledataList = new ArrayList<>(); + dataList.forEach(item ->{ + String[] userIds = item.getString("USER_ID").split(","); + for (String userId : userIds) { + PageData safetyMeetingPeopledata = new PageData(); + safetyMeetingPeopledata.put("SAFETY_MEETING_ID",pageData.getString("SAFETY_MEETING_ID")); + safetyMeetingPeopledata.put("SIGNATORY",userId); + safetyMeetingPeopledata.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); + initPageDataUtil.initSave(safetyMeetingPeopledata,"SAFETY_MEETING_PEOPLE_ID"); + safetyMeetingPeopledataList.add(safetyMeetingPeopledata); + } + }); + pageData.put("ALL_SIGNATURES",dataList.size()); + pageData.put("SIGNATURES",0); + safetyMeetingMapper.save(pageData); + safetyMeetingPeopleMapper.saveBatch(safetyMeetingPeopledataList); + } + + @Override + public void removeById(PageData pageData) { + safetyMeetingMapper.removeById(pageData); + } + + @Override + public List list(Page page) { + return safetyMeetingMapper.datalistPage(page); + } + + @Override + public PageData findById(PageData pageData) { + return safetyMeetingMapper.findById(pageData); + } + + @Override + public void edit(PageData pageData) { + safetyMeetingMapper.edit(pageData); + } +} diff --git a/src/main/java/com/zcloud/service/system/DepartmentService.java b/src/main/java/com/zcloud/service/system/DepartmentService.java index 95491df..bb24e34 100644 --- a/src/main/java/com/zcloud/service/system/DepartmentService.java +++ b/src/main/java/com/zcloud/service/system/DepartmentService.java @@ -5,6 +5,7 @@ import com.zcloud.entity.PageData; import com.zcloud.entity.system.Department; import java.util.List; +import java.util.Map; /** * 说明: 组织机构接接口 @@ -218,5 +219,7 @@ public interface DepartmentService{ * @throws Exception */ public List saftpersonlist(PageData pd) throws Exception; + + List> getDeptAllByCorp(PageData pd); } diff --git a/src/main/java/com/zcloud/service/system/UsersService.java b/src/main/java/com/zcloud/service/system/UsersService.java index 4d09ed7..9896f78 100644 --- a/src/main/java/com/zcloud/service/system/UsersService.java +++ b/src/main/java/com/zcloud/service/system/UsersService.java @@ -7,6 +7,7 @@ import com.zcloud.util.ReturnMap; import java.io.IOException; import java.util.List; +import java.util.Map; /** * 说明:用户服务接口 @@ -303,4 +304,5 @@ public interface UsersService { * @Return: com.zcloud.entity.PageData */ PageData getUserByCardNo(PageData pageData); + } diff --git a/src/main/java/com/zcloud/service/system/impl/DepartmentServiceImpl.java b/src/main/java/com/zcloud/service/system/impl/DepartmentServiceImpl.java index 12798c7..cc2f93f 100644 --- a/src/main/java/com/zcloud/service/system/impl/DepartmentServiceImpl.java +++ b/src/main/java/com/zcloud/service/system/impl/DepartmentServiceImpl.java @@ -414,6 +414,12 @@ public class DepartmentServiceImpl implements DepartmentService { return departmentMapper.saftpersonlist(pd); } + @Override + public List> getDeptAllByCorp(PageData pd) { + return departmentMapper.getDeptAllByCorp(pd); + + } + public List listAllDigui(String parentId, Map> allList,String url) throws Exception { List itemList = this.listSubMenuByParentId(parentId,allList); //更具pid 获取数据 for(Department depar : itemList){ diff --git a/src/main/java/com/zcloud/service/system/impl/UsersServiceImpl.java b/src/main/java/com/zcloud/service/system/impl/UsersServiceImpl.java index d55919e..9f58f2b 100644 --- a/src/main/java/com/zcloud/service/system/impl/UsersServiceImpl.java +++ b/src/main/java/com/zcloud/service/system/impl/UsersServiceImpl.java @@ -14,7 +14,9 @@ import org.springframework.transaction.annotation.Transactional; import java.io.IOException; import java.util.ArrayList; +import java.util.HashMap; import java.util.List; +import java.util.Map; /** @@ -282,6 +284,9 @@ public class UsersServiceImpl implements UsersService { return usersMapper.getUserByCardNo(pageData); } + + + @Override public ReturnMap saveUserNew(PageData pd) throws Exception { pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); diff --git a/src/main/resources/mybatis/datasource/safetyMeeting/SafetyMeetingMapper.xml b/src/main/resources/mybatis/datasource/safetyMeeting/SafetyMeetingMapper.xml new file mode 100644 index 0000000..501f053 --- /dev/null +++ b/src/main/resources/mybatis/datasource/safetyMeeting/SafetyMeetingMapper.xml @@ -0,0 +1,105 @@ + + + + + + + SAFETY_MEETING + + + + f + . + SAFETY_MEETING_ID + , + f.SAFETY_MEETING_TITLE, + f.SAFETY_MEETING_CONTENT, + f.SIGNATURES, + f.ALL_SIGNATURES, + f.CORPINFO_ID, + f.CREATOR, + f.CREATTIME, + f.OPERATOR, + f.OPERATTIME, + f.ISDELETE + + + + SAFETY_MEETING_ID + , + SAFETY_MEETING_TITLE, + SAFETY_MEETING_CONTENT, + SIGNATURES, + ALL_SIGNATURES, + CORPINFO_ID, + CREATOR, + CREATTIME, + OPERATOR, + OPERATTIME, + ISDELETE + + + + + #{SAFETY_MEETING_ID} + , + #{SAFETY_MEETING_TITLE}, + #{SAFETY_MEETING_CONTENT}, + #{SIGNATURES}, + #{ALL_SIGNATURES}, + #{CORPINFO_ID}, + #{CREATOR}, + #{CREATTIME}, + #{OPERATOR}, + #{OPERATTIME}, + #{ISDELETE} + + + insert into + + ( + + ) values ( + + ) + + + + update + + set + ISDELETE = '1', + OPERATOR=#{OPERATOR}, + OPERATTIME=#{OPERATTIME} + where + SAFETY_MEETING_ID = #{SAFETY_MEETING_ID} + + + update + + set + SAFETY_MEETING_TITLE=#{SAFETY_MEETING_TITLE}, + SAFETY_MEETING_CONTENT=#{SAFETY_MEETING_CONTENT}, + SIGNATURES=#{SIGNATURES}, + ALL_SIGNATURES=#{ALL_SIGNATURES}, + CORPINFO_ID=#{CORPINFO_ID}, + CREATOR=#{CREATOR}, + CREATTIME=#{CREATTIME}, + OPERATOR=#{OPERATOR}, + OPERATTIME=#{OPERATTIME} + where + SAFETY_MEETING_ID = #{SAFETY_MEETING_ID} + + + + + + diff --git a/src/main/resources/mybatis/datasource/safetyMeeting/SafetyMeetingPeopleMapper.xml b/src/main/resources/mybatis/datasource/safetyMeeting/SafetyMeetingPeopleMapper.xml new file mode 100644 index 0000000..750416d --- /dev/null +++ b/src/main/resources/mybatis/datasource/safetyMeeting/SafetyMeetingPeopleMapper.xml @@ -0,0 +1,86 @@ + + + + + + + SAFETY_MEETING_PEOPLE + + + + + SYS_DICTIONARIES + + + + + f.SAFETY_MEETING_PEOPLE_ID, + f.SAFETY_MEETING_ID, + f.SIGNATORY, + f.FEED_BACK, + f.CORPINFO_ID, + f.CREATOR, + f.CREATTIME, + f.OPERATOR, + f.OPERATTIME, + f.ISDELETE + + + + + SAFETY_MEETING_PEOPLE_ID, + SAFETY_MEETING_ID, + SIGNATORY, + FEED_BACK, + CORPINFO_ID, + CREATOR, + CREATTIME, + OPERATOR, + OPERATTIME, + ISDELETE + + + + + #{SAFETY_MEETING_PEOPLE_ID}, + #{SAFETY_MEETING_ID}, + #{SIGNATORY}, + #{FEED_BACK}, + #{CORPINFO_ID}, + #{CREATOR}, + #{CREATTIME}, + #{OPERATOR}, + #{OPERATTIME}, + #{ISDELETE} + + + #{item.SAFETY_MEETING_PEOPLE_ID}, + #{item.SAFETY_MEETING_ID}, + #{item.SIGNATORY}, + #{item.FEED_BACK}, + #{item.CORPINFO_ID}, + #{item.CREATOR}, + #{item.CREATTIME}, + #{item.OPERATOR}, + #{item.OPERATTIME}, + #{item.ISDELETE} + + + + insert into + + ( + + ) values ( + + ) + + + insert into + () values + + () + + + + diff --git a/src/main/resources/mybatis/datasource/system/DepartmentMapper.xml b/src/main/resources/mybatis/datasource/system/DepartmentMapper.xml index 9fd023c..dd16b30 100644 --- a/src/main/resources/mybatis/datasource/system/DepartmentMapper.xml +++ b/src/main/resources/mybatis/datasource/system/DepartmentMapper.xml @@ -2,20 +2,21 @@ - - - - - + + + + + - - - OA_DEPARTMENT - + + + OA_DEPARTMENT + - - - NAME, + + + NAME + , NAME_EN, BIANMA, PARENT_ID, @@ -29,534 +30,555 @@ LEVEL, DEP_ORDER, ISSUPERVISE, - ISDELETE + ISDELETE, LEADER_CHARGE, STATE, checkedIds, DJBM - + - - - #{NAME}, - #{NAME_EN}, - #{BIANMA}, - #{PARENT_ID}, - #{HEADMAN}, - #{TEL}, - #{FUNCTIONS}, - #{ADDRESS}, - #{BZ}, - #{DEPARTMENT_ID}, - #{CORPINFO_ID}, - #{LEVEL}, - #{DEP_ORDER}, - #{ISSUPERVISE}, - 0 - #{LEADER_CHARGE}, - #{STATE}, - #{checkedIds}, - #{DJBM}, - + + + #{NAME} + , + #{NAME_EN}, + #{BIANMA}, + #{PARENT_ID}, + #{HEADMAN}, + #{TEL}, + #{FUNCTIONS}, + #{ADDRESS}, + #{BZ}, + #{DEPARTMENT_ID}, + #{CORPINFO_ID}, + #{LEVEL}, + #{DEP_ORDER}, + #{ISSUPERVISE}, + 0, + #{LEADER_CHARGE}, + #{STATE}, + #{checkedIds}, + #{DJBM} + - - - insert into - - ( - - ) values ( - - ) - + + + insert into + + ( + + ) values ( + + ) + - - - update - - set ISDELETE = 1 - where - DEPARTMENT_ID = #{DEPARTMENT_ID} - + + + update + + set ISDELETE = 1 + where + DEPARTMENT_ID = #{DEPARTMENT_ID} + - - - update - - set - NAME = #{NAME}, - NAME_EN = #{NAME_EN}, - HEADMAN = #{HEADMAN}, - BZ = #{BZ}, - TEL = #{TEL}, - FUNCTIONS = #{FUNCTIONS}, - ADDRESS = #{ADDRESS}, - LEVEL = #{LEVEL}, - DEPARTMENT_ID = DEPARTMENT_ID, - DEP_ORDER = #{DEP_ORDER}, - ISSUPERVISE = #{ISSUPERVISE} - LEADER_CHARGE = #{LEADER_CHARGE}, - STATE = #{STATE}, - checkedIds = #{checkedIds}, - DJBM = #{DJBM} - where ISDELETE = 0 and - DEPARTMENT_ID = #{DEPARTMENT_ID} - + + + update + + set + NAME = #{NAME}, + NAME_EN = #{NAME_EN}, + HEADMAN = #{HEADMAN}, + BZ = #{BZ}, + TEL = #{TEL}, + FUNCTIONS = #{FUNCTIONS}, + ADDRESS = #{ADDRESS}, + LEVEL = #{LEVEL}, + DEPARTMENT_ID = DEPARTMENT_ID, + DEP_ORDER = #{DEP_ORDER}, + ISSUPERVISE = #{ISSUPERVISE} + LEADER_CHARGE = #{LEADER_CHARGE}, + STATE = #{STATE}, + checkedIds = #{checkedIds}, + DJBM = #{DJBM} + where ISDELETE = 0 and + DEPARTMENT_ID = #{DEPARTMENT_ID} + - + - - - - + + + + - - - + + + - - + + - - + + - - + select + + from + + where + ISDELETE = 0 + + and PARENT_ID = #{pd.DEPARTMENT_ID} + + + AND + CORPINFO_ID = #{pd.CORPINFO_ID} + - - and - ( - NAME LIKE CONCAT(CONCAT('%', #{pd.keywords}),'%') - or - NAME_EN LIKE CONCAT(CONCAT('%', #{pd.keywords}),'%') - or - BIANMA LIKE CONCAT(CONCAT('%', #{pd.keywords}),'%') - ) - - order by DEP_ORDER asc , NAME - + + and + ( + NAME LIKE CONCAT(CONCAT('%', #{pd.keywords}),'%') + or + NAME_EN LIKE CONCAT(CONCAT('%', #{pd.keywords}),'%') + or + BIANMA LIKE CONCAT(CONCAT('%', #{pd.keywords}),'%') + ) + + order by DEP_ORDER asc , NAME + - - + select + + from + + where ISDELETE = 0 + + and PARENT_ID = #{parentId} + - order by DEP_ORDER asc, NAME - + order by DEP_ORDER asc, NAME + - - + select + f.*, + IF(o.SUPERVISIONDEPARTMENT_ID is not null,'false','true') DISABLED - from - f - left join oa_supervision_department o on f.DEPARTMENT_ID = o.SUB_DEPARTMENT_ID AND o.SUP_DEPARTMENT_ID = #{SUP_DEPARTMENT_ID} and o.isdelete= '0' + from + + f + left join oa_supervision_department o on f.DEPARTMENT_ID = o.SUB_DEPARTMENT_ID AND o.SUP_DEPARTMENT_ID = + #{SUP_DEPARTMENT_ID} and o.isdelete= '0' - where f.ISDELETE = 0 + where f.ISDELETE = 0 - - and f.PARENT_ID = #{parentId} - - order by f.DEP_ORDER asc, f.NAME - + + and f.PARENT_ID = #{parentId} + + order by f.DEP_ORDER asc, f.NAME + - - + + - - + select + f.NAME, + f.NAME_EN, + getFullName(f.DEPARTMENT_ID) DEPARTMENTNAME_ALL, + f.BIANMA, + f.PARENT_ID, + f.HEADMAN, + f.TEL, + f.FUNCTIONS, + f.ADDRESS, + f.BZ, + f.DEPARTMENT_ID, + f.CORPINFO_ID, + f.LEVEL, + f.ISSUPERVISE, + f.LEADER_CHARGE, + f.STATE, + f.checkedIds, + f.DJBM, + s.name as leName, + f.DEP_ORDER + from OA_DEPARTMENT f + LEFT JOIN SYS_DICTIONARIES s on s.BIANMA = f.LEVEL + where + f.ISDELETE = 0 + + and + ( + f.NAME LIKE CONCAT(CONCAT('%', #{pd.keywords}),'%') + or + f.NAME_EN LIKE CONCAT(CONCAT('%', #{pd.keywords}),'%') + or + f.BIANMA LIKE CONCAT(CONCAT('%', #{pd.keywords}),'%') + ) + + + AND + f.CORPINFO_ID = #{pd.CORPINFO_ID} + + + AND + f.LEVEL = #{pd.LEVEL} + + + and f.PARENT_ID = #{pd.DEPARTMENT_ID} + + + + + - - - - and - f.DEPARTMENT_ID in - - '${item}' - - - - - - - - - and - f.DEPARTMENT_ID in - - '${item}' - - - - and - f.DEPARTMENT_ID in ( - select - SUB_DEPARTMENT_ID - from - oa_supervision_department osd - where - osd.SUP_DEPARTMENT_ID = #{pd.DEPARTMENT_ID} - and osd.ISDELETE = '0' - and osd.CORPINFO_ID = #{pd.CORPINFO_ID} - ) - - - - - and (f.PARENT_ID = #{pd.SELECT_DEPARTMENT_ID} or f.DEPARTMENT_ID = #{pd.SELECT_DEPARTMENT_ID}) - - - - - - - order by DEP_ORDER asc ,NAME - + + + + and + f.DEPARTMENT_ID in + + '${item}' + + + + + + + + + and + f.DEPARTMENT_ID in + + '${item}' + + + + and + f.DEPARTMENT_ID in ( + select + SUB_DEPARTMENT_ID + from + oa_supervision_department osd + where + osd.SUP_DEPARTMENT_ID = #{pd.DEPARTMENT_ID} + and osd.ISDELETE = '0' + and osd.CORPINFO_ID = #{pd.CORPINFO_ID} + ) + + + + + and (f.PARENT_ID = #{pd.SELECT_DEPARTMENT_ID} or f.DEPARTMENT_ID = #{pd.SELECT_DEPARTMENT_ID}) + + + + + + + order by DEP_ORDER asc ,NAME + - - + + - - + + - - - + + + - + - - + + - + - - - - - - - - - + + + + + + + + + - + +