zhangtao
laozt 1 year ago
parent 0251f076d6
commit 31df5de2de

@ -40,11 +40,11 @@ public class BAdministrativeDivisionController extends BaseController {
@Resource @Resource
private IBAdministrativeDivisionService bAdministrativeDivisionService; private IBAdministrativeDivisionService bAdministrativeDivisionService;
/** /**
* *
*/ */
@ApiOperation(value = "查询行政区划列表", response = BAdministrativeDivision.class) @ApiOperation(value = "查询行政区划列表", response = BAdministrativeDivision.class)
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(BAdministrativeDivision bAdministrativeDivision) { public TableDataInfo list(BAdministrativeDivision bAdministrativeDivision) {
startPage(); startPage();
List<BAdministrativeDivision> list = bAdministrativeDivisionService.selectBAdministrativeDivisionList(bAdministrativeDivision); List<BAdministrativeDivision> list = bAdministrativeDivisionService.selectBAdministrativeDivisionList(bAdministrativeDivision);
@ -58,7 +58,7 @@ public class BAdministrativeDivisionController extends BaseController {
@PostMapping("/export") @PostMapping("/export")
public void export(HttpServletResponse response, BAdministrativeDivision bAdministrativeDivision) { public void export(HttpServletResponse response, BAdministrativeDivision bAdministrativeDivision) {
List<BAdministrativeDivision> list = bAdministrativeDivisionService.selectBAdministrativeDivisionList(bAdministrativeDivision); List<BAdministrativeDivision> list = bAdministrativeDivisionService.selectBAdministrativeDivisionList(bAdministrativeDivision);
ExcelUtil<BAdministrativeDivision> util = new ExcelUtil<BAdministrativeDivision>(BAdministrativeDivision. class); ExcelUtil<BAdministrativeDivision> util = new ExcelUtil<BAdministrativeDivision>(BAdministrativeDivision.class);
util.exportExcel(response, list, "行政区划数据"); util.exportExcel(response, list, "行政区划数据");
} }
@ -110,12 +110,12 @@ public class BAdministrativeDivisionController extends BaseController {
List<BAdministrativeTreeRequest> listsub = bAdministrativeDivisionService.selectByDistctList(); List<BAdministrativeTreeRequest> listsub = bAdministrativeDivisionService.selectByDistctList();
List<BAdministrativeDistrictRequest> cascadingSelectData = new ArrayList<>(); List<BAdministrativeDistrictRequest> cascadingSelectData = new ArrayList<>();
for (BAdministrativeDistrictRequest item1 : list) { for (BAdministrativeDistrictRequest item1 : list) {
BAdministrativeDistrictRequest parentDto = new BAdministrativeDistrictRequest(item1.getDistrictCode(),item1.getDistrict()); BAdministrativeDistrictRequest parentDto = new BAdministrativeDistrictRequest(item1.getDistrictCode(), item1.getDistrict());
for (BAdministrativeTreeRequest item2 : listsub) { for (BAdministrativeTreeRequest item2 : listsub) {
if (item2.getCountyCode() != null && !item2.getCountyCode().equals("")) { if (item2.getCountyCode() != null && !item2.getCountyCode().equals("")) {
if (item2.getCountyCode().substring(0,6).equals(item1.getDistrictCode())) { if (item2.getCountyCode().substring(0, 6).equals(item1.getDistrictCode())) {
BAdministrativeTreeRequest childDto = new BAdministrativeTreeRequest(item2.getCounty(), item2.getCountyCode(),item2.getSort()); BAdministrativeTreeRequest childDto = new BAdministrativeTreeRequest(item2.getCounty(), item2.getCountyCode(), item2.getSort());
parentDto.addChild(childDto); parentDto.addChild(childDto);
} }
} }

@ -1,55 +1,76 @@
<?xml version="1.0" encoding="UTF-8" ?> <?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper <!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.programManagement.mapper.BEnterpriseNewMapper"> <mapper namespace="com.ruoyi.programManagement.mapper.BEnterpriseNewMapper">
<resultMap type="BEnterpriseNew" id="BEnterpriseNewResult"> <resultMap type="BEnterpriseNew" id="BEnterpriseNewResult">
<result property="id" column="id" /> <result property="id" column="id"/>
<result property="enterpriseId" column="enterprise_id" /> <result property="enterpriseId" column="enterprise_id"/>
<result property="enterpriseName" column="enterprise_name" /> <result property="enterpriseName" column="enterprise_name"/>
<result property="district" column="district" /> <result property="district" column="district"/>
<result property="supervisionLarge" column="SUPERVISION_LARGE" /> <result property="supervisionLarge" column="SUPERVISION_LARGE"/>
<result property="riskLevel" column="RISK_LEVEL" /> <result property="riskLevel" column="RISK_LEVEL"/>
<result property="standLevel" column="STAND_LEVEL" /> <result property="standLevel" column="STAND_LEVEL"/>
<result property="examineEndTime" column="EXAMINE_END_TIME" /> <result property="examineEndTime" column="EXAMINE_END_TIME"/>
<result property="createId" column="create_id" /> <result property="createId" column="create_id"/>
<result property="createBy" column="create_by" /> <result property="createBy" column="create_by"/>
<result property="createTime" column="create_time" /> <result property="createTime" column="create_time"/>
<result property="updateId" column="update_id" /> <result property="updateId" column="update_id"/>
<result property="updateBy" column="update_by" /> <result property="updateBy" column="update_by"/>
<result property="updateTime" column="update_time" /> <result property="updateTime" column="update_time"/>
<result property="remark" column="remark" /> <result property="remark" column="remark"/>
<result property="userId" column="user_id" /> <result property="userId" column="user_id"/>
<result property="deptId" column="dept_id" /> <result property="deptId" column="dept_id"/>
</resultMap> </resultMap>
<sql id="selectBEnterpriseNewVo"> <sql id="selectBEnterpriseNewVo">
select id, enterprise_id, enterprise_name, district, SUPERVISION_LARGE, RISK_LEVEL, STAND_LEVEL, EXAMINE_END_TIME, create_id, create_by, create_time, update_id, update_by, update_time, remark, user_id, dept_id from b_enterprise_new select id,
enterprise_id,
enterprise_name,
district,
SUPERVISION_LARGE,
RISK_LEVEL,
STAND_LEVEL,
EXAMINE_END_TIME,
create_id,
create_by,
create_time,
update_id,
update_by,
update_time,
remark,
user_id,
dept_id
from b_enterprise_new
</sql> </sql>
<select id="selectBEnterpriseNewList" parameterType="BEnterpriseNew" resultMap="BEnterpriseNewResult"> <select id="selectBEnterpriseNewList" parameterType="BEnterpriseNew" resultMap="BEnterpriseNewResult">
<include refid="selectBEnterpriseNewVo"/> <include refid="selectBEnterpriseNewVo"/>
<where> <where>
<if test="enterpriseId != null and enterpriseId != ''"> and enterprise_id = #{enterpriseId}</if> <if test="enterpriseId != null and enterpriseId != ''">and enterprise_id = #{enterpriseId}</if>
<if test="enterpriseName != null and enterpriseName != ''"> and enterprise_name like concat('%', #{enterpriseName}, '%')</if> <if test="enterpriseName != null and enterpriseName != ''">and enterprise_name like concat('%',
<if test="district != null and district != ''"> and district = #{district}</if> #{enterpriseName}, '%')
<if test="supervisionLarge != null and supervisionLarge != ''"> and SUPERVISION_LARGE = #{supervisionLarge}</if> </if>
<if test="riskLevel != null and riskLevel != ''"> and RISK_LEVEL = #{riskLevel}</if> <if test="district != null and district != ''">and district like concat('%', #{district}, '%')</if>
<if test="standLevel != null and standLevel != ''"> and STAND_LEVEL = #{standLevel}</if> <if test="supervisionLarge != null and supervisionLarge != ''">and SUPERVISION_LARGE =
<if test="examineEndTime != null "> and EXAMINE_END_TIME = #{examineEndTime}</if> #{supervisionLarge}
<if test="createId != null "> and create_id = #{createId}</if> </if>
<if test="updateId != null "> and update_id = #{updateId}</if> <if test="riskLevel != null and riskLevel != ''">and RISK_LEVEL = #{riskLevel}</if>
<if test="userId != null "> and user_id = #{userId}</if> <if test="standLevel != null and standLevel != ''">and STAND_LEVEL = #{standLevel}</if>
<if test="deptId != null "> and dept_id = #{deptId}</if> <if test="examineEndTime != null ">and EXAMINE_END_TIME = #{examineEndTime}</if>
<if test="createId != null ">and create_id = #{createId}</if>
<if test="updateId != null ">and update_id = #{updateId}</if>
<if test="userId != null ">and user_id = #{userId}</if>
<if test="deptId != null ">and dept_id = #{deptId}</if>
</where> </where>
</select> </select>
<select id="selectBEnterpriseNewById" parameterType="Long" resultMap="BEnterpriseNewResult"> <select id="selectBEnterpriseNewById" parameterType="Long" resultMap="BEnterpriseNewResult">
<include refid="selectBEnterpriseNewVo"/> <include refid="selectBEnterpriseNewVo"/>
where id = #{id} where id = #{id}
</select> </select>
<insert id="insertBEnterpriseNew" parameterType="BEnterpriseNew" useGeneratedKeys="true" keyProperty="id"> <insert id="insertBEnterpriseNew" parameterType="BEnterpriseNew" useGeneratedKeys="true" keyProperty="id">
insert into b_enterprise_new insert into b_enterprise_new
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
@ -69,7 +90,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="remark != null">remark,</if> <if test="remark != null">remark,</if>
<if test="userId != null">user_id,</if> <if test="userId != null">user_id,</if>
<if test="deptId != null">dept_id,</if> <if test="deptId != null">dept_id,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="enterpriseId != null">#{enterpriseId},</if> <if test="enterpriseId != null">#{enterpriseId},</if>
<if test="enterpriseName != null">#{enterpriseName},</if> <if test="enterpriseName != null">#{enterpriseName},</if>
@ -87,7 +108,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="remark != null">#{remark},</if> <if test="remark != null">#{remark},</if>
<if test="userId != null">#{userId},</if> <if test="userId != null">#{userId},</if>
<if test="deptId != null">#{deptId},</if> <if test="deptId != null">#{deptId},</if>
</trim> </trim>
</insert> </insert>
<update id="updateBEnterpriseNew" parameterType="BEnterpriseNew"> <update id="updateBEnterpriseNew" parameterType="BEnterpriseNew">
@ -114,11 +135,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</update> </update>
<delete id="deleteBEnterpriseNewById" parameterType="Long"> <delete id="deleteBEnterpriseNewById" parameterType="Long">
delete from b_enterprise_new where id = #{id} delete
from b_enterprise_new
where id = #{id}
</delete> </delete>
<delete id="deleteBEnterpriseNewByIds" parameterType="String"> <delete id="deleteBEnterpriseNewByIds" parameterType="String">
delete from b_enterprise_new where id in delete from b_enterprise_new where id in
<foreach item="id" collection="array" open="(" separator="," close=")"> <foreach item="id" collection="array" open="(" separator="," close=")">
#{id} #{id}
</foreach> </foreach>

@ -4,25 +4,25 @@
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.programManagement.mapper.BPlanEnterpriseMapper"> <mapper namespace="com.ruoyi.programManagement.mapper.BPlanEnterpriseMapper">
<!-- <resultMap type="BPlanEnterprise" id="BPlanEnterpriseResult">--> <!-- <resultMap type="BPlanEnterprise" id="BPlanEnterpriseResult">-->
<!-- <result property="id" column="id"/>--> <!-- <result property="id" column="id"/>-->
<!-- <result property="enterpriseId" column="enterprise_id"/>--> <!-- <result property="enterpriseId" column="enterprise_id"/>-->
<!-- <result property="createId" column="create_id"/>--> <!-- <result property="createId" column="create_id"/>-->
<!-- <result property="createBy" column="create_by"/>--> <!-- <result property="createBy" column="create_by"/>-->
<!-- <result property="createTime" column="create_time"/>--> <!-- <result property="createTime" column="create_time"/>-->
<!-- <result property="updateId" column="update_id"/>--> <!-- <result property="updateId" column="update_id"/>-->
<!-- <result property="updateBy" column="update_by"/>--> <!-- <result property="updateBy" column="update_by"/>-->
<!-- <result property="updateTime" column="update_time"/>--> <!-- <result property="updateTime" column="update_time"/>-->
<!-- <result property="remark" column="remark"/>--> <!-- <result property="remark" column="remark"/>-->
<!-- <result property="userId" column="user_id"/>--> <!-- <result property="userId" column="user_id"/>-->
<!-- <result property="deptId" column="dept_id"/>--> <!-- <result property="deptId" column="dept_id"/>-->
<!-- <result property="district" column="district"/>--> <!-- <result property="district" column="district"/>-->
<!-- <result property="plannedYear" column="planned_year"/>--> <!-- <result property="plannedYear" column="planned_year"/>-->
<!-- <result property="planName" column="plan_name"/>--> <!-- <result property="planName" column="plan_name"/>-->
<!-- <result property="planContent" column="plan_content"/>--> <!-- <result property="planContent" column="plan_content"/>-->
<!-- <result property="isPoint" column="is_point"/>--> <!-- <result property="isPoint" column="is_point"/>-->
<!-- <result property="enterpriseName" column="enterprise_name"/>--> <!-- <result property="enterpriseName" column="enterprise_name"/>-->
<!-- </resultMap>--> <!-- </resultMap>-->
<sql id="selectBPlanEnterpriseVo"> <sql id="selectBPlanEnterpriseVo">
select id, select id,
enterprise_id, enterprise_id,
@ -37,8 +37,6 @@
dept_id, dept_id,
district, district,
planned_year, planned_year,
plan_name,
plan_content,
is_point, is_point,
enterprise_name, enterprise_name,
law_sort, law_sort,
@ -66,7 +64,9 @@
<if test="planName != null and planName != ''">and plan_name like concat('%', #{planName}, '%')</if> <if test="planName != null and planName != ''">and plan_name like concat('%', #{planName}, '%')</if>
<if test="planContent != null and planContent != ''">and plan_content = #{planContent}</if> <if test="planContent != null and planContent != ''">and plan_content = #{planContent}</if>
<if test="isPoint != null ">and is_point = #{isPoint}</if> <if test="isPoint != null ">and is_point = #{isPoint}</if>
<if test="enterpriseName != null and enterpriseName != ''">and enterprise_name like concat('%',#{enterpriseName}, '%')</if> <if test="enterpriseName != null and enterpriseName != ''">and enterprise_name like
concat('%',#{enterpriseName}, '%')
</if>
</where> </where>
</select> </select>
<delete id="deleteByPlanId"> <delete id="deleteByPlanId">
@ -109,7 +109,7 @@
and s.checkStatus =#{req.checkStatus} and s.checkStatus =#{req.checkStatus}
</if> </if>
<if test="req.enterpriseName !=null and req.enterpriseName !=''"> <if test="req.enterpriseName !=null and req.enterpriseName !=''">
and s.enterpriseName like concat('%', #{req.enterpriseName}, '%') and s.enterpriseName like concat('%', #{req.enterpriseName}, '%')
</if> </if>
and s.rn = 1 and s.rn = 1
</where> </where>
@ -177,11 +177,11 @@
and a.planned_year =#{req.plannedYear} and a.planned_year =#{req.plannedYear}
</if> </if>
<if test="req.enterpriseName !=null and req.enterpriseName!='' "> <if test="req.enterpriseName !=null and req.enterpriseName!='' ">
and a.ENTERPRISE_NAME like concat('%', #{req.enterpriseName}, '%') and a.ENTERPRISE_NAME like concat('%', #{req.enterpriseName}, '%')
</if> </if>
</where> </where>
group by a.id order by a.id desc group by a.id order by a.id desc
</select> </select>
<select id="selectById" resultType="com.ruoyi.programManagement.entity.BPlanEnterprise"> <select id="selectById" resultType="com.ruoyi.programManagement.entity.BPlanEnterprise">
select a.id, select a.id,

Loading…
Cancel
Save