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>
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue