forked from integrated_whb/integrated_whb
				
			企业人员定位系统参数表
							parent
							
								
									60bb52b485
								
							
						
					
					
						commit
						9c86394e0b
					
				|  | @ -0,0 +1,148 @@ | ||||||
|  | package com.zcloud.controller.corp; | ||||||
|  | 
 | ||||||
|  | import com.zcloud.controller.base.BaseController; | ||||||
|  | import com.zcloud.entity.Page; | ||||||
|  | import com.zcloud.entity.PageData; | ||||||
|  | import com.zcloud.logs.LogAnno; | ||||||
|  | import com.zcloud.service.corp.CorpPlsInfoService; | ||||||
|  | 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 java.util.HashMap; | ||||||
|  | import java.util.List; | ||||||
|  | import java.util.Map; | ||||||
|  | 
 | ||||||
|  | /** | ||||||
|  |  * 说明:企业人员定位系统参数表 | ||||||
|  |  * 作者:chenxinying | ||||||
|  |  * 时间:2024-01-10 | ||||||
|  |  * 官网:www.qdkjchina.com | ||||||
|  |  */ | ||||||
|  | @Controller | ||||||
|  | @RequestMapping("/corpplsinfo") | ||||||
|  | public class CorpPlsInfoController extends BaseController { | ||||||
|  | 
 | ||||||
|  | 	@Autowired | ||||||
|  | 	private CorpPlsInfoService corpplsinfoService; | ||||||
|  | 
 | ||||||
|  | 	/**新增 | ||||||
|  | 	 * @param | ||||||
|  | 	 * @throws Exception | ||||||
|  | 	 */ | ||||||
|  | 	@RequestMapping(value="/add") | ||||||
|  | 	@RequiresPermissions("corpplsinfo: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("CORPPLSINFO_ID", this.get32UUID());	//主键
 | ||||||
|  | 		corpplsinfoService.save(pd); | ||||||
|  | 		map.put("result", errInfo); | ||||||
|  | 		return map; | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
|  | 	/**删除 | ||||||
|  | 	 * @param out | ||||||
|  | 	 * @throws Exception | ||||||
|  | 	 */ | ||||||
|  | 	@RequestMapping(value="/delete") | ||||||
|  | 	@RequiresPermissions("corpplsinfo: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(); | ||||||
|  | 		corpplsinfoService.delete(pd); | ||||||
|  | 		map.put("result", errInfo);				//返回结果
 | ||||||
|  | 		return map; | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
|  | 	/**修改 | ||||||
|  | 	 * @param | ||||||
|  | 	 * @throws Exception | ||||||
|  | 	 */ | ||||||
|  | 	@RequestMapping(value="/edit") | ||||||
|  | 	@RequiresPermissions("corpplsinfo: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(); | ||||||
|  | 		corpplsinfoService.edit(pd); | ||||||
|  | 		map.put("result", errInfo); | ||||||
|  | 		return map; | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
|  | 	/**列表 | ||||||
|  | 	 * @param page | ||||||
|  | 	 * @throws Exception | ||||||
|  | 	 */ | ||||||
|  | 	@RequestMapping(value="/list") | ||||||
|  | 	@RequiresPermissions("corpplsinfo: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 = corpplsinfoService.list(page);	//列出corpplsinfo列表
 | ||||||
|  | 		map.put("varList", varList); | ||||||
|  | 		map.put("page", page); | ||||||
|  | 		map.put("result", errInfo); | ||||||
|  | 		return map; | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
|  | 	 /**去修改页面获取数据 | ||||||
|  | 	 * @param | ||||||
|  | 	 * @throws Exception | ||||||
|  | 	 */ | ||||||
|  | 	@RequestMapping(value="/goEdit") | ||||||
|  | //	@RequiresPermissions("corpplsinfo: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 = corpplsinfoService.findById(pd);	//根据ID读取
 | ||||||
|  | 		map.put("pd", pd); | ||||||
|  | 		map.put("result", errInfo); | ||||||
|  | 		return map; | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
|  | 	 /**批量删除 | ||||||
|  | 	 * @param | ||||||
|  | 	 * @throws Exception | ||||||
|  | 	 */ | ||||||
|  | 	@RequestMapping(value="/deleteAll") | ||||||
|  | 	@RequiresPermissions("corpplsinfo: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(","); | ||||||
|  | 			corpplsinfoService.deleteAll(ArrayDATA_IDS); | ||||||
|  | 			errInfo = "success"; | ||||||
|  | 		}else{ | ||||||
|  | 			errInfo = "error"; | ||||||
|  | 		} | ||||||
|  | 		map.put("result", errInfo);				//返回结果
 | ||||||
|  | 		return map; | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
|  | } | ||||||
|  | @ -0,0 +1,59 @@ | ||||||
|  | package com.zcloud.mapper.datasource.corp; | ||||||
|  | 
 | ||||||
|  | import com.zcloud.entity.Page; | ||||||
|  | import com.zcloud.entity.PageData; | ||||||
|  | 
 | ||||||
|  | import java.util.List; | ||||||
|  | 
 | ||||||
|  | /** | ||||||
|  |  * 说明:企业类型主管部门 | ||||||
|  |  * 作者:shaojie | ||||||
|  |  * 时间:2021-03-18 | ||||||
|  |  * 官网:www.qdkjchina.com | ||||||
|  |  */ | ||||||
|  | public interface CorpPlsInfoMapper { | ||||||
|  | 
 | ||||||
|  | 	/**新增 | ||||||
|  | 	 * @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); | ||||||
|  | 
 | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | @ -0,0 +1,61 @@ | ||||||
|  | package com.zcloud.service.corp; | ||||||
|  | 
 | ||||||
|  | import com.zcloud.entity.Page; | ||||||
|  | import com.zcloud.entity.PageData; | ||||||
|  | 
 | ||||||
|  | import java.util.List; | ||||||
|  | 
 | ||||||
|  | /** | ||||||
|  |  * 说明:企业类型主管部门 | ||||||
|  |  * 作者:shaojie | ||||||
|  |  * 时间:2021-03-18 | ||||||
|  |  * 官网:www.qdkjchina.com | ||||||
|  |  */ | ||||||
|  | public interface CorpPlsInfoService { | ||||||
|  | 
 | ||||||
|  | 	/**新增 | ||||||
|  | 	 * @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; | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | @ -0,0 +1,83 @@ | ||||||
|  | package com.zcloud.service.corp.impl; | ||||||
|  | 
 | ||||||
|  | import com.zcloud.entity.Page; | ||||||
|  | import com.zcloud.entity.PageData; | ||||||
|  | import com.zcloud.mapper.datasource.corp.CorpPlsInfoMapper; | ||||||
|  | import com.zcloud.service.corp.CorpPlsInfoService; | ||||||
|  | import org.springframework.beans.factory.annotation.Autowired; | ||||||
|  | import org.springframework.stereotype.Service; | ||||||
|  | import org.springframework.transaction.annotation.Transactional; | ||||||
|  | 
 | ||||||
|  | import java.util.List; | ||||||
|  | 
 | ||||||
|  | /** | ||||||
|  |  * 说明:企业类型主管部门 | ||||||
|  |  * 作者:shaojie | ||||||
|  |  * 时间:2021-03-18 | ||||||
|  |  * 官网:www.qdkjchina.com | ||||||
|  |  */ | ||||||
|  | @Service | ||||||
|  | @Transactional //开启事物
 | ||||||
|  | public class CorpPlsInfoServiceImpl implements CorpPlsInfoService{ | ||||||
|  | 
 | ||||||
|  | 	@Autowired | ||||||
|  | 	private CorpPlsInfoMapper corpplsinfoMapper; | ||||||
|  | 
 | ||||||
|  | 	/**新增 | ||||||
|  | 	 * @param pd | ||||||
|  | 	 * @throws Exception | ||||||
|  | 	 */ | ||||||
|  | 	public void save(PageData pd)throws Exception{ | ||||||
|  | 		corpplsinfoMapper.save(pd); | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
|  | 	/**删除 | ||||||
|  | 	 * @param pd | ||||||
|  | 	 * @throws Exception | ||||||
|  | 	 */ | ||||||
|  | 	public void delete(PageData pd)throws Exception{ | ||||||
|  | 		corpplsinfoMapper.delete(pd); | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
|  | 	/**修改 | ||||||
|  | 	 * @param pd | ||||||
|  | 	 * @throws Exception | ||||||
|  | 	 */ | ||||||
|  | 	public void edit(PageData pd)throws Exception{ | ||||||
|  | 		corpplsinfoMapper.edit(pd); | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
|  | 	/**列表 | ||||||
|  | 	 * @param page | ||||||
|  | 	 * @throws Exception | ||||||
|  | 	 */ | ||||||
|  | 	public List<PageData> list(Page page)throws Exception{ | ||||||
|  | 		return corpplsinfoMapper.datalistPage(page); | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
|  | 	/**列表(全部) | ||||||
|  | 	 * @param pd | ||||||
|  | 	 * @throws Exception | ||||||
|  | 	 */ | ||||||
|  | 	public List<PageData> listAll(PageData pd)throws Exception{ | ||||||
|  | 		return corpplsinfoMapper.listAll(pd); | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
|  | 	/**通过id获取数据 | ||||||
|  | 	 * @param pd | ||||||
|  | 	 * @throws Exception | ||||||
|  | 	 */ | ||||||
|  | 	public PageData findById(PageData pd)throws Exception{ | ||||||
|  | 		return corpplsinfoMapper.findById(pd); | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
|  | 	/**批量删除 | ||||||
|  | 	 * @param ArrayDATA_IDS | ||||||
|  | 	 * @throws Exception | ||||||
|  | 	 */ | ||||||
|  | 	public void deleteAll(String[] ArrayDATA_IDS)throws Exception{ | ||||||
|  | 		corpplsinfoMapper.deleteAll(ArrayDATA_IDS); | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | @ -0,0 +1,131 @@ | ||||||
|  | <?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.corp.CorpPlsInfoMapper"> | ||||||
|  | 
 | ||||||
|  | 	<!--表名 --> | ||||||
|  | 	<sql id="tableName"> | ||||||
|  | 		BUS_CORP_PLS_INFO | ||||||
|  | 	</sql> | ||||||
|  | 
 | ||||||
|  | 	<!--数据字典表名 --> | ||||||
|  | 	<sql id="dicTableName"> | ||||||
|  | 		SYS_DICTIONARIES | ||||||
|  | 	</sql> | ||||||
|  | 
 | ||||||
|  | 	<!-- 字段 --> | ||||||
|  | 	<sql id="Field"> | ||||||
|  | 		f.CORPINFO_ID, | ||||||
|  | 		f.POST_URL, | ||||||
|  | 		f.ACCOUNT, | ||||||
|  | 		f.PASSWORD, | ||||||
|  | 		f.TOKEN, | ||||||
|  | 		f.EXPIRE_TIME | ||||||
|  | 	</sql> | ||||||
|  | 
 | ||||||
|  | 	<!-- 字段用于新增 --> | ||||||
|  | 	<sql id="Field2"> | ||||||
|  | 		CORPINFO_ID, | ||||||
|  | 		POST_URL, | ||||||
|  | 		ACCOUNT, | ||||||
|  | 		PASSWORD, | ||||||
|  | 		TOKEN, | ||||||
|  | 		EXPIRE_TIME | ||||||
|  | 	</sql> | ||||||
|  | 
 | ||||||
|  | 	<!-- 字段值 --> | ||||||
|  | 	<sql id="FieldValue"> | ||||||
|  | 		#{CORPINFO_ID}, | ||||||
|  | 		#{POST_URL}, | ||||||
|  | 		#{ACCOUNT}, | ||||||
|  | 		#{PASSWORD}, | ||||||
|  | 		#{TOKEN}, | ||||||
|  | 		#{EXPIRE_TIME} | ||||||
|  | 	</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"> | ||||||
|  | 		delete from | ||||||
|  | 		<include refid="tableName"></include> | ||||||
|  | 		where | ||||||
|  | 			CORPINFO_ID = #{CORPINFO_ID} | ||||||
|  | 	</delete> | ||||||
|  | 
 | ||||||
|  | 	<!-- 修改 --> | ||||||
|  | 	<update id="edit" parameterType="pd"> | ||||||
|  | 		update | ||||||
|  | 		<include refid="tableName"></include> | ||||||
|  | 		set | ||||||
|  | 			CORPINFO_ID = #{CORPINFO_ID}, | ||||||
|  | 			POST_URL = #{POST_URL}, | ||||||
|  | 			ACCOUNT = #{ACCOUNT}, | ||||||
|  | 			PASSWORD = #{PASSWORD}, | ||||||
|  | 			TOKEN = #{TOKEN}, | ||||||
|  | 			EXPIRE_TIME = #{EXPIRE_TIME} | ||||||
|  | 		where | ||||||
|  | 		CORPINFO_ID = #{CORPINFO_ID} | ||||||
|  | 	</update> | ||||||
|  | 
 | ||||||
|  | 	<!-- 通过ID获取数据 --> | ||||||
|  | 	<select id="findById" parameterType="pd" resultType="pd"> | ||||||
|  | 		select | ||||||
|  | 		<include refid="Field"></include> | ||||||
|  | 		from | ||||||
|  | 		<include refid="tableName"></include> f | ||||||
|  | 		where | ||||||
|  | 			f.CORPINFO_ID = #{CORPINFO_ID} | ||||||
|  | 	</select> | ||||||
|  | 
 | ||||||
|  | 	<!-- 列表 --> | ||||||
|  | 	<select id="datalistPage" parameterType="page" resultType="pd"> | ||||||
|  | 		select | ||||||
|  | 		<include refid="Field"></include> | ||||||
|  | 		from | ||||||
|  | 		<include refid="tableName"></include> f | ||||||
|  | 		where 1=1 | ||||||
|  | 		<if test="pd.KEYWORDS != null and pd.KEYWORDS != ''"><!-- 关键词检索 --> | ||||||
|  | 			and | ||||||
|  | 				( | ||||||
|  | 				<!--	根据需求自己加检索条件 | ||||||
|  | 					字段1 LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%') | ||||||
|  | 					 or | ||||||
|  | 					字段2 LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%') | ||||||
|  | 				--> | ||||||
|  | 				) | ||||||
|  | 		</if> | ||||||
|  | 	</select> | ||||||
|  | 
 | ||||||
|  | 	<!-- 列表(全部) --> | ||||||
|  | 	<select id="listAll" parameterType="pd" resultType="pd"> | ||||||
|  | 		select | ||||||
|  | 		<include refid="Field"></include> | ||||||
|  | 		from | ||||||
|  | 		<include refid="tableName"></include> f | ||||||
|  | 		where 1=1 | ||||||
|  | 		<if test="CORPINFO_ID != null and CORPINFO_ID != ''"><!-- 关键词检索 --> | ||||||
|  | 			and f.CORPINFO_ID = CORPINFO_ID | ||||||
|  | 		</if> | ||||||
|  | 	</select> | ||||||
|  | 
 | ||||||
|  | 	<!-- 批量删除 --> | ||||||
|  | 	<delete id="deleteAll" parameterType="String"> | ||||||
|  | 		delete from | ||||||
|  | 		<include refid="tableName"></include> | ||||||
|  | 		where | ||||||
|  | 		CORPINFO_ID in | ||||||
|  | 		<foreach item="item" index="index" collection="array" open="(" separator="," close=")"> | ||||||
|  |                  #{item} | ||||||
|  | 		</foreach> | ||||||
|  | 	</delete> | ||||||
|  | 
 | ||||||
|  | </mapper> | ||||||
		Loading…
	
		Reference in New Issue