添加公安机构和行政区划对应
parent
4259d6badd
commit
8aee7e598d
|
|
@ -0,0 +1,62 @@
|
|||
package basepro.manager.mapper;
|
||||
|
||||
import basepro.manager.pojo.SysDeptXzqh;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 公安机构行政区划对应Mapper接口
|
||||
*
|
||||
* @author basepro
|
||||
* @date 2024-07-16
|
||||
*/
|
||||
public interface SysDeptXzqhMapper
|
||||
{
|
||||
/**
|
||||
* 查询公安机构行政区划对应
|
||||
*
|
||||
* @param DeptId 公安机构行政区划对应ID
|
||||
* @return 公安机构行政区划对应
|
||||
*/
|
||||
public SysDeptXzqh selectSysDeptXzqhById(String DeptId);
|
||||
|
||||
/**
|
||||
* 查询公安机构行政区划对应列表
|
||||
*
|
||||
* @param sysDeptXzqh 公安机构行政区划对应
|
||||
* @return 公安机构行政区划对应集合
|
||||
*/
|
||||
public List<SysDeptXzqh> selectSysDeptXzqhList(SysDeptXzqh sysDeptXzqh);
|
||||
|
||||
/**
|
||||
* 新增公安机构行政区划对应
|
||||
*
|
||||
* @param sysDeptXzqh 公安机构行政区划对应
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSysDeptXzqh(SysDeptXzqh sysDeptXzqh);
|
||||
|
||||
/**
|
||||
* 修改公安机构行政区划对应
|
||||
*
|
||||
* @param sysDeptXzqh 公安机构行政区划对应
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSysDeptXzqh(SysDeptXzqh sysDeptXzqh);
|
||||
|
||||
/**
|
||||
* 删除公安机构行政区划对应
|
||||
*
|
||||
* @param DeptId 公安机构行政区划对应ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSysDeptXzqhById(String DeptId);
|
||||
|
||||
/**
|
||||
* 批量删除公安机构行政区划对应
|
||||
*
|
||||
* @param DeptIds 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSysDeptXzqhByIds(String[] DeptIds);
|
||||
}
|
||||
|
|
@ -0,0 +1,69 @@
|
|||
<?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="basepro.manager.mapper.SysDeptXzqhMapper">
|
||||
|
||||
<resultMap type="basepro.manager.pojo.SysDeptXzqh" id="SysDeptXzqhResult">
|
||||
<result property="DeptId" column="dept_id" />
|
||||
<result property="DeptName" column="dept_name" />
|
||||
<result property="Xzqhdm" column="xzqhdm" />
|
||||
<result property="Xzqhmc" column="xzqhmc" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectSysDeptXzqhVo">
|
||||
select dept_id, dept_name, xzqhdm, xzqhmc from sys_dept_xzqh
|
||||
</sql>
|
||||
|
||||
<select id="selectSysDeptXzqhList" parameterType="basepro.manager.pojo.SysDeptXzqh" resultMap="SysDeptXzqhResult">
|
||||
<include refid="selectSysDeptXzqhVo"/>
|
||||
<where>
|
||||
<if test="DeptName != null and DeptName != ''"> and dept_name like concat('%', #{DeptName}, '%')</if>
|
||||
<if test="Xzqhdm != null and Xzqhdm != ''"> and xzqhdm = #{Xzqhdm}</if>
|
||||
<if test="Xzqhmc != null and Xzqhmc != ''"> and xzqhmc = #{Xzqhmc}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectSysDeptXzqhById" parameterType="String" resultMap="SysDeptXzqhResult">
|
||||
<include refid="selectSysDeptXzqhVo"/>
|
||||
where dept_id = #{DeptId}
|
||||
</select>
|
||||
|
||||
<insert id="insertSysDeptXzqh" parameterType="basepro.manager.pojo.SysDeptXzqh">
|
||||
insert into sys_dept_xzqh
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="DeptId != null and DeptId != ''">dept_id,</if>
|
||||
<if test="DeptName != null and DeptName != ''">dept_name,</if>
|
||||
<if test="Xzqhdm != null and Xzqhdm != ''">xzqhdm,</if>
|
||||
<if test="Xzqhmc != null and Xzqhmc != ''">xzqhmc,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="DeptId != null and DeptId != ''">#{DeptId},</if>
|
||||
<if test="DeptName != null and DeptName != ''">#{DeptName},</if>
|
||||
<if test="Xzqhdm != null and Xzqhdm != ''">#{Xzqhdm},</if>
|
||||
<if test="Xzqhmc != null and Xzqhmc != ''">#{Xzqhmc},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateSysDeptXzqh" parameterType="basepro.manager.pojo.SysDeptXzqh">
|
||||
update sys_dept_xzqh
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="DeptName != null and DeptName != ''">dept_name = #{DeptName},</if>
|
||||
<if test="Xzqhdm != null and Xzqhdm != ''">xzqhdm = #{Xzqhdm},</if>
|
||||
<if test="Xzqhmc != null and Xzqhmc != ''">xzqhmc = #{Xzqhmc},</if>
|
||||
</trim>
|
||||
where dept_id = #{DeptId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteSysDeptXzqhById" parameterType="String">
|
||||
delete from sys_dept_xzqh where dept_id = #{DeptId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteSysDeptXzqhByIds" parameterType="String">
|
||||
delete from sys_dept_xzqh where dept_id in
|
||||
<foreach item="DeptId" collection="array" open="(" separator="," close=")">
|
||||
#{DeptId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,80 @@
|
|||
package basepro.manager.pojo;
|
||||
|
||||
import guo.ping.e3mall.common.annotation.Excel;
|
||||
import guo.ping.e3mall.common.pojo.BaseEntity;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
|
||||
/**
|
||||
* 公安机构行政区划对应对象 sys_dept_xzqh
|
||||
*
|
||||
* @author basepro
|
||||
* @date 2024-07-16
|
||||
*/
|
||||
public class SysDeptXzqh extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 机构ID */
|
||||
private String DeptId;
|
||||
|
||||
/** 机构名称 */
|
||||
@Excel(name = "机构名称")
|
||||
private String DeptName;
|
||||
|
||||
/** 行政区划代码 */
|
||||
@Excel(name = "行政区划代码")
|
||||
private String Xzqhdm;
|
||||
|
||||
/** 行政区划名称 */
|
||||
@Excel(name = "行政区划名称")
|
||||
private String Xzqhmc;
|
||||
|
||||
public void setDeptId(String DeptId)
|
||||
{
|
||||
this.DeptId = DeptId;
|
||||
}
|
||||
|
||||
public String getDeptId()
|
||||
{
|
||||
return DeptId;
|
||||
}
|
||||
public void setDeptName(String DeptName)
|
||||
{
|
||||
this.DeptName = DeptName;
|
||||
}
|
||||
|
||||
public String getDeptName()
|
||||
{
|
||||
return DeptName;
|
||||
}
|
||||
public void setXzqhdm(String Xzqhdm)
|
||||
{
|
||||
this.Xzqhdm = Xzqhdm;
|
||||
}
|
||||
|
||||
public String getXzqhdm()
|
||||
{
|
||||
return Xzqhdm;
|
||||
}
|
||||
public void setXzqhmc(String Xzqhmc)
|
||||
{
|
||||
this.Xzqhmc = Xzqhmc;
|
||||
}
|
||||
|
||||
public String getXzqhmc()
|
||||
{
|
||||
return Xzqhmc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("DeptId", getDeptId())
|
||||
.append("DeptName", getDeptName())
|
||||
.append("Xzqhdm", getXzqhdm())
|
||||
.append("Xzqhmc", getXzqhmc())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
|
@ -8,14 +8,8 @@ import java.util.List;
|
|||
import basepro.manager.common.core.text.Convert;
|
||||
import basepro.manager.common.utils.DateUtils;
|
||||
import basepro.manager.config.DataSourceUtil;
|
||||
import basepro.manager.mapper.RoadCheckStatisticsMapper;
|
||||
import basepro.manager.mapper.SysDeptMapper;
|
||||
import basepro.manager.mapper.TbStuckMapper;
|
||||
import basepro.manager.mapper.TbXjxdzhxxbMapper;
|
||||
import basepro.manager.pojo.RoadCheckStatistics;
|
||||
import basepro.manager.pojo.SysDept;
|
||||
import basepro.manager.pojo.TbStuck;
|
||||
import basepro.manager.pojo.TbXjxdzhxxb;
|
||||
import basepro.manager.mapper.*;
|
||||
import basepro.manager.pojo.*;
|
||||
import basepro.manager.service.ITbXjxdzhxxbService;
|
||||
import com.alibaba.dubbo.config.annotation.Service;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
|
|
@ -49,6 +43,9 @@ public class TbXjxdzhxxbServiceImpl implements ITbXjxdzhxxbService
|
|||
@Autowired
|
||||
private SysDeptMapper deptMapper;
|
||||
|
||||
@Autowired
|
||||
private SysDeptXzqhMapper xzqhMapper;
|
||||
|
||||
/**
|
||||
* 查询夏季行动综合信息
|
||||
*
|
||||
|
|
@ -207,6 +204,11 @@ public class TbXjxdzhxxbServiceImpl implements ITbXjxdzhxxbService
|
|||
xjxd.setGAJGDM(dept.getDeptId());
|
||||
xjxd.setGAJGMC(dept.getShortName());
|
||||
}
|
||||
SysDeptXzqh xzqh = xzqhMapper.selectSysDeptXzqhById(manageDeptId);
|
||||
if (null != xzqh){
|
||||
xjxd.setXZQHDM(xzqh.getXzqhdm());
|
||||
xjxd.setXZQHMC(xzqh.getXzqhmc());
|
||||
}
|
||||
return xjxd;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -6,11 +6,18 @@ mybatis:
|
|||
|
||||
spring:
|
||||
datasource:
|
||||
username: root
|
||||
password: 123456
|
||||
url: jdbc:mysql://53.1.252.179:8086/TESTDB?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&useTimezone=true&serverTimezone=GMT%2B8
|
||||
driver-class-name: com.mysql.jdbc.Driver
|
||||
type: com.alibaba.druid.pool.DruidDataSource
|
||||
druid:
|
||||
db1:
|
||||
username: root
|
||||
password: 123456
|
||||
jdbc-url: jdbc:mysql://53.1.252.179:8086/TESTDB?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&useTimezone=true&serverTimezone=GMT%2B8
|
||||
driver-class-name: com.mysql.jdbc.Driver
|
||||
db2:
|
||||
username: ahrs
|
||||
password: Ycgis!2509
|
||||
jdbc-url: jdbc:postgresql://53.1.213.131:25380/st_zazdr?currentSchema=public&useUnicode=true&characterEncoding=utf8&useSSL=true&autoReconnect=true&reWriteBatchedInserts=true
|
||||
driver-class-name: org.postgresql.Driver
|
||||
# type: com.alibaba.druid.pool.DruidDataSource
|
||||
devtools:
|
||||
restart:
|
||||
enabled: true
|
||||
|
|
|
|||
Loading…
Reference in New Issue