forked from integrated_whb/integrated_whb
Merge remote-tracking branch 'origin/dev' into dev
commit
9b880a5521
|
@ -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();
|
||||
}
|
||||
}
|
|
@ -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();
|
||||
}
|
||||
}
|
|
@ -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<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
|
|
|
@ -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<PageData> datalistPage(Page page);
|
||||
|
||||
PageData findById(PageData pageData);
|
||||
|
||||
void edit(PageData pageData);
|
||||
}
|
|
@ -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<PageData> safetyMeetingPeopledataList);
|
||||
}
|
|
@ -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<PageData> saftmanagelist(PageData pd);
|
||||
|
||||
List<PageData> saftpersonlist(PageData pd);
|
||||
|
||||
List<Map<String, Object>> getDeptAllByCorp(PageData pd);
|
||||
}
|
||||
|
||||
|
|
|
@ -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<PageData> list(Page page);
|
||||
|
||||
PageData findById(PageData pageData);
|
||||
|
||||
void edit(PageData pageData);
|
||||
}
|
|
@ -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<PageData> dataList = JSON.parseArray(pageData.getString("people"), PageData.class);
|
||||
List<PageData> 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<PageData> 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);
|
||||
}
|
||||
}
|
|
@ -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<PageData> saftpersonlist(PageData pd) throws Exception;
|
||||
|
||||
List<Map<String, Object>> getDeptAllByCorp(PageData pd);
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
||||
}
|
||||
|
|
|
@ -414,6 +414,12 @@ public class DepartmentServiceImpl implements DepartmentService {
|
|||
return departmentMapper.saftpersonlist(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> getDeptAllByCorp(PageData pd) {
|
||||
return departmentMapper.getDeptAllByCorp(pd);
|
||||
|
||||
}
|
||||
|
||||
public List<Department> listAllDigui(String parentId, Map<String,List<Department>> allList,String url) throws Exception {
|
||||
List<Department> itemList = this.listSubMenuByParentId(parentId,allList); //更具pid 获取数据
|
||||
for(Department depar : itemList){
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -0,0 +1,105 @@
|
|||
<?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.safetyMeeting.SafetyMeetingMapper">
|
||||
|
||||
<!--表名 -->
|
||||
<sql id="tableName">
|
||||
SAFETY_MEETING
|
||||
</sql>
|
||||
<!-- 字段 -->
|
||||
<sql id="Field">
|
||||
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
|
||||
</sql>
|
||||
<!-- 字段用于新增 -->
|
||||
<sql id="Field2">
|
||||
SAFETY_MEETING_ID
|
||||
,
|
||||
SAFETY_MEETING_TITLE,
|
||||
SAFETY_MEETING_CONTENT,
|
||||
SIGNATURES,
|
||||
ALL_SIGNATURES,
|
||||
CORPINFO_ID,
|
||||
CREATOR,
|
||||
CREATTIME,
|
||||
OPERATOR,
|
||||
OPERATTIME,
|
||||
ISDELETE
|
||||
</sql>
|
||||
|
||||
<!-- 字段值 -->
|
||||
<sql id="FieldValue">
|
||||
#{SAFETY_MEETING_ID}
|
||||
,
|
||||
#{SAFETY_MEETING_TITLE},
|
||||
#{SAFETY_MEETING_CONTENT},
|
||||
#{SIGNATURES},
|
||||
#{ALL_SIGNATURES},
|
||||
#{CORPINFO_ID},
|
||||
#{CREATOR},
|
||||
#{CREATTIME},
|
||||
#{OPERATOR},
|
||||
#{OPERATTIME},
|
||||
#{ISDELETE}
|
||||
</sql>
|
||||
<insert id="save">
|
||||
insert into
|
||||
<include refid="tableName"></include>
|
||||
(
|
||||
<include refid="Field2"></include>
|
||||
) values (
|
||||
<include refid="FieldValue"></include>
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="removeById">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
ISDELETE = '1',
|
||||
OPERATOR=#{OPERATOR},
|
||||
OPERATTIME=#{OPERATTIME}
|
||||
where
|
||||
SAFETY_MEETING_ID = #{SAFETY_MEETING_ID}
|
||||
</update>
|
||||
<update id="edit">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
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}
|
||||
</update>
|
||||
<select id="datalistPage" resultType="com.zcloud.entity.PageData">
|
||||
select * from <include refid="tableName"></include> where ISDELETE = '0' and CORPINFO_ID = #{pd.CORPINFO_ID}
|
||||
<if test="pd.SAFETY_MEETING_TITLE != null and pd.SAFETY_MEETING_TITLE != ''">
|
||||
and SAFETY_MEETING_TITLE like '%${pd.SAFETY_MEETING_TITLE}%'
|
||||
</if>
|
||||
</select>
|
||||
<select id="findById" resultType="com.zcloud.entity.PageData">
|
||||
select * from <include refid="tableName"></include> where ISDELETE = '0'
|
||||
and SAFETY_MEETING_ID = #{SAFETY_MEETING_ID}
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
|
@ -0,0 +1,86 @@
|
|||
<?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.safetyMeeting.SafetyMeetingPeopleMapper">
|
||||
|
||||
<!--表名 -->
|
||||
<sql id="tableName">
|
||||
SAFETY_MEETING_PEOPLE
|
||||
</sql>
|
||||
|
||||
<!--数据字典表名 -->
|
||||
<sql id="dicTableName">
|
||||
SYS_DICTIONARIES
|
||||
</sql>
|
||||
|
||||
<!-- 字段 -->
|
||||
<sql id="Field">
|
||||
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
|
||||
</sql>
|
||||
|
||||
<!-- 字段用于新增 -->
|
||||
<sql id="Field2">
|
||||
SAFETY_MEETING_PEOPLE_ID,
|
||||
SAFETY_MEETING_ID,
|
||||
SIGNATORY,
|
||||
FEED_BACK,
|
||||
CORPINFO_ID,
|
||||
CREATOR,
|
||||
CREATTIME,
|
||||
OPERATOR,
|
||||
OPERATTIME,
|
||||
ISDELETE
|
||||
</sql>
|
||||
|
||||
<!-- 字段值 -->
|
||||
<sql id="FieldValue">
|
||||
#{SAFETY_MEETING_PEOPLE_ID},
|
||||
#{SAFETY_MEETING_ID},
|
||||
#{SIGNATORY},
|
||||
#{FEED_BACK},
|
||||
#{CORPINFO_ID},
|
||||
#{CREATOR},
|
||||
#{CREATTIME},
|
||||
#{OPERATOR},
|
||||
#{OPERATTIME},
|
||||
#{ISDELETE}
|
||||
</sql>
|
||||
<sql id="FieldValue2">
|
||||
#{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}
|
||||
</sql>
|
||||
<!-- 新增-->
|
||||
<insert id="save" parameterType="pd">
|
||||
insert into
|
||||
<include refid="tableName"></include>
|
||||
(
|
||||
<include refid="Field2"></include>
|
||||
) values (
|
||||
<include refid="FieldValue"></include>
|
||||
)
|
||||
</insert>
|
||||
<insert id="saveBatch">
|
||||
insert into <include refid="tableName"></include>
|
||||
(<include refid="Field2"></include>) values
|
||||
<foreach item="item" index="index" collection="list" separator="," >
|
||||
(<include refid="FieldValue2"></include>)
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
</mapper>
|
|
@ -15,7 +15,8 @@
|
|||
|
||||
<!-- 字段 -->
|
||||
<sql id="Field">
|
||||
NAME,
|
||||
NAME
|
||||
,
|
||||
NAME_EN,
|
||||
BIANMA,
|
||||
PARENT_ID,
|
||||
|
@ -29,7 +30,7 @@
|
|||
LEVEL,
|
||||
DEP_ORDER,
|
||||
ISSUPERVISE,
|
||||
ISDELETE
|
||||
ISDELETE,
|
||||
LEADER_CHARGE,
|
||||
STATE,
|
||||
checkedIds,
|
||||
|
@ -38,7 +39,8 @@
|
|||
|
||||
<!-- 字段值 -->
|
||||
<sql id="FieldValue">
|
||||
#{NAME},
|
||||
#{NAME}
|
||||
,
|
||||
#{NAME_EN},
|
||||
#{BIANMA},
|
||||
#{PARENT_ID},
|
||||
|
@ -52,11 +54,11 @@
|
|||
#{LEVEL},
|
||||
#{DEP_ORDER},
|
||||
#{ISSUPERVISE},
|
||||
0
|
||||
0,
|
||||
#{LEADER_CHARGE},
|
||||
#{STATE},
|
||||
#{checkedIds},
|
||||
#{DJBM},
|
||||
#{DJBM}
|
||||
</sql>
|
||||
|
||||
<!-- 新增-->
|
||||
|
@ -154,16 +156,19 @@
|
|||
<include refid="Field"></include>,
|
||||
(select NAME from OA_DEPARTMENT o where t.PARENT_ID=o.DEPARTMENT_ID) as PARENT_NAME
|
||||
from
|
||||
<include refid="tableName"></include> t
|
||||
<include refid="tableName"></include>
|
||||
t
|
||||
where
|
||||
DEPARTMENT_ID = #{DEPARTMENT_ID}
|
||||
</select>
|
||||
<select id="findByName" parameterType="pd" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include> t ,
|
||||
<include refid="Field"></include>
|
||||
t ,
|
||||
(select NAME from OA_DEPARTMENT o where t.PARENT_ID=o.DEPARTMENT_ID) as PARENT_NAME
|
||||
from
|
||||
<include refid="tableName"></include> t
|
||||
<include refid="tableName"></include>
|
||||
t
|
||||
where t.ISDELETE = 0 and
|
||||
t.NAME = #{NAME} and t.CORPINFO_ID = #{CORPINFO_ID}
|
||||
<if test="PARENT_ID != null and PARENT_ID != ''">
|
||||
|
@ -179,7 +184,8 @@
|
|||
select
|
||||
<include refid="Field"></include>
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
<include refid="tableName"></include>
|
||||
f
|
||||
where f.ISDELETE = 0 and
|
||||
f.CORPINFO_ID = #{CORPINFO_ID} and f.PARENT_ID='0'
|
||||
</select>
|
||||
|
@ -245,8 +251,10 @@
|
|||
IF(o.SUPERVISIONDEPARTMENT_ID is not null,'false','true') DISABLED
|
||||
|
||||
from
|
||||
<include refid="tableName"></include> 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'
|
||||
<include refid="tableName"></include>
|
||||
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
|
||||
|
||||
|
@ -325,10 +333,10 @@
|
|||
<if test="pd.DEPARTMENT_ID!= null and pd.DEPARTMENT_ID != ''"><!-- 检索 -->
|
||||
and f.PARENT_ID = #{pd.DEPARTMENT_ID}
|
||||
</if>
|
||||
<!-- <if test="pd.SELECT_DEPARTMENT_ID != null and pd.SELECT_DEPARTMENT_ID != ''"><!– 关键词检索 –>-->
|
||||
<!-- AND-->
|
||||
<!-- (f.PARENT_ID = #{pd.SELECT_DEPARTMENT_ID} or f.DEPARTMENT_ID = #{pd.SELECT_DEPARTMENT_ID})-->
|
||||
<!-- </if>-->
|
||||
<!-- <if test="pd.SELECT_DEPARTMENT_ID != null and pd.SELECT_DEPARTMENT_ID != ''"><!– 关键词检索 –>-->
|
||||
<!-- AND-->
|
||||
<!-- (f.PARENT_ID = #{pd.SELECT_DEPARTMENT_ID} or f.DEPARTMENT_ID = #{pd.SELECT_DEPARTMENT_ID})-->
|
||||
<!-- </if>-->
|
||||
|
||||
<choose>
|
||||
<when test='pd.ISMAIN != null and pd.ISMAIN != "" and pd.ISMAIN == "1"'>
|
||||
|
@ -380,37 +388,27 @@
|
|||
</select>
|
||||
|
||||
<!-- 查询公司部门总数 -->
|
||||
<select id="getDepCount" parameterType="pd" resultType="int" >
|
||||
SELECT
|
||||
COUNT( 1 )
|
||||
FROM
|
||||
oa_department
|
||||
WHERE ISDELETE = 0 and
|
||||
CORPINFO_ID = #{CORPINFO_ID}
|
||||
<select id="getDepCount" parameterType="pd" resultType="int">
|
||||
SELECT COUNT(1)
|
||||
FROM oa_department
|
||||
WHERE ISDELETE = 0
|
||||
and CORPINFO_ID = #{CORPINFO_ID}
|
||||
</select>
|
||||
|
||||
<!-- 查询公司检查过清单的部门总数 -->
|
||||
<select id="getWorkedDepCount" parameterType="pd" resultType="int" >
|
||||
SELECT
|
||||
count( 1 )
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
count( s.DEPARTMENT_ID )
|
||||
FROM
|
||||
oa_department s
|
||||
<select id="getWorkedDepCount" parameterType="pd" resultType="int">
|
||||
SELECT count(1)
|
||||
FROM (SELECT count(s.DEPARTMENT_ID)
|
||||
FROM oa_department s
|
||||
LEFT JOIN bus_checkuser cu ON s.DEPARTMENT_ID = cu.DEPARTMENT_ID
|
||||
LEFT JOIN bus_checkrecord f ON f.CHECKRECORD_ID = cu.CHECKRECORD_ID
|
||||
WHERE
|
||||
s.CORPINFO_ID = #{CORPINFO_ID}
|
||||
WHERE s.CORPINFO_ID = #{CORPINFO_ID}
|
||||
AND s.ISDELETE = 0
|
||||
AND f.FINISHED = '1'
|
||||
AND f.isdelete = '0'
|
||||
AND f.CHECKRECORD_ID IS NOT NULL
|
||||
AND DATE_FORMAT(f.CHECK_TIME, '%Y%m') = DATE_FORMAT(CURDATE(), '%Y%m')
|
||||
GROUP BY
|
||||
s.DEPARTMENT_ID
|
||||
) q
|
||||
GROUP BY s.DEPARTMENT_ID) q
|
||||
</select>
|
||||
|
||||
<select id="findBySubId" parameterType="pd" resultType="pd">
|
||||
|
@ -521,12 +519,11 @@
|
|||
</select>
|
||||
<!-- 向下递归查询企业部门(只查监管端部门表集团部门) -->
|
||||
<select id="listTreeManageAndCorp1" parameterType="pd" resultType="com.zcloud.entity.PageData">
|
||||
SELECT
|
||||
DEPARTMENT_ID id,
|
||||
SELECT DEPARTMENT_ID id,
|
||||
NAME name,
|
||||
PARENT_ID pId
|
||||
FROM `qa-gwj-regulatory`.sys_department f
|
||||
WHERE FIND_IN_SET(DEPARTMENT_ID,`qa-gwj-regulatory`.queryRecursiveDeptDown(#{DEPARTMENT_ID}))
|
||||
WHERE FIND_IN_SET(DEPARTMENT_ID, `qa-gwj-regulatory`.queryRecursiveDeptDown(#{DEPARTMENT_ID}))
|
||||
</select>
|
||||
<!-- 向下递归查询企业部门(集团部门+子公司部门) -->
|
||||
<select id="listTreeManageAndCorpForPcPunishThePerson" parameterType="pd" resultType="com.zcloud.entity.PageData">
|
||||
|
@ -552,11 +549,36 @@
|
|||
</select>
|
||||
|
||||
<select id="saftpersonlist" parameterType="pd" resultType="com.zcloud.entity.PageData">
|
||||
select
|
||||
*
|
||||
from
|
||||
`qa-gwj-regulatory`.SYS_DEPARTMENT
|
||||
where 1=1
|
||||
select *
|
||||
from `qa-gwj-regulatory`.SYS_DEPARTMENT
|
||||
where 1 = 1
|
||||
and STATE = '0'
|
||||
</select>
|
||||
<select id="getDeptAllByCorp" resultType="java.util.Map">
|
||||
select
|
||||
name,
|
||||
NAME_EN,
|
||||
BIANMA,
|
||||
PARENT_ID,
|
||||
PARENT_ID pId,
|
||||
HEADMAN,
|
||||
TEL,
|
||||
FUNCTIONS,
|
||||
ADDRESS,
|
||||
BZ,
|
||||
DEPARTMENT_ID,
|
||||
DEPARTMENT_ID id,
|
||||
CORPINFO_ID,
|
||||
LEVEL,
|
||||
DEP_ORDER,
|
||||
ISSUPERVISE,
|
||||
ISDELETE
|
||||
LEADER_CHARGE,
|
||||
STATE,
|
||||
checkedIds,
|
||||
DJBM
|
||||
from oa_department
|
||||
where ISDELETE = 0
|
||||
and CORPINFO_ID = #{CORPINFO_ID}
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
Loading…
Reference in New Issue