zhangtao
laozt 1 year ago
parent 0251f076d6
commit 31df5de2de

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

@ -1,47 +1,68 @@
<?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">
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.programManagement.mapper.BEnterpriseNewMapper">
<resultMap type="BEnterpriseNew" id="BEnterpriseNewResult">
<result property="id" column="id" />
<result property="enterpriseId" column="enterprise_id" />
<result property="enterpriseName" column="enterprise_name" />
<result property="district" column="district" />
<result property="supervisionLarge" column="SUPERVISION_LARGE" />
<result property="riskLevel" column="RISK_LEVEL" />
<result property="standLevel" column="STAND_LEVEL" />
<result property="examineEndTime" column="EXAMINE_END_TIME" />
<result property="createId" column="create_id" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateId" column="update_id" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="remark" column="remark" />
<result property="userId" column="user_id" />
<result property="deptId" column="dept_id" />
<result property="id" column="id"/>
<result property="enterpriseId" column="enterprise_id"/>
<result property="enterpriseName" column="enterprise_name"/>
<result property="district" column="district"/>
<result property="supervisionLarge" column="SUPERVISION_LARGE"/>
<result property="riskLevel" column="RISK_LEVEL"/>
<result property="standLevel" column="STAND_LEVEL"/>
<result property="examineEndTime" column="EXAMINE_END_TIME"/>
<result property="createId" column="create_id"/>
<result property="createBy" column="create_by"/>
<result property="createTime" column="create_time"/>
<result property="updateId" column="update_id"/>
<result property="updateBy" column="update_by"/>
<result property="updateTime" column="update_time"/>
<result property="remark" column="remark"/>
<result property="userId" column="user_id"/>
<result property="deptId" column="dept_id"/>
</resultMap>
<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>
<select id="selectBEnterpriseNewList" parameterType="BEnterpriseNew" resultMap="BEnterpriseNewResult">
<include refid="selectBEnterpriseNewVo"/>
<where>
<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="district != null and district != ''"> and district = #{district}</if>
<if test="supervisionLarge != null and supervisionLarge != ''"> and SUPERVISION_LARGE = #{supervisionLarge}</if>
<if test="riskLevel != null and riskLevel != ''"> and RISK_LEVEL = #{riskLevel}</if>
<if test="standLevel != null and standLevel != ''"> and STAND_LEVEL = #{standLevel}</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>
<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="district != null and district != ''">and district like concat('%', #{district}, '%')</if>
<if test="supervisionLarge != null and supervisionLarge != ''">and SUPERVISION_LARGE =
#{supervisionLarge}
</if>
<if test="riskLevel != null and riskLevel != ''">and RISK_LEVEL = #{riskLevel}</if>
<if test="standLevel != null and standLevel != ''">and STAND_LEVEL = #{standLevel}</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>
</select>
@ -69,7 +90,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="remark != null">remark,</if>
<if test="userId != null">user_id,</if>
<if test="deptId != null">dept_id,</if>
</trim>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="enterpriseId != null">#{enterpriseId},</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="userId != null">#{userId},</if>
<if test="deptId != null">#{deptId},</if>
</trim>
</trim>
</insert>
<update id="updateBEnterpriseNew" parameterType="BEnterpriseNew">
@ -114,7 +135,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</update>
<delete id="deleteBEnterpriseNewById" parameterType="Long">
delete from b_enterprise_new where id = #{id}
delete
from b_enterprise_new
where id = #{id}
</delete>
<delete id="deleteBEnterpriseNewByIds" parameterType="String">

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

Loading…
Cancel
Save