场站删除

main
yangzhicheng 12 months ago
parent 26573975fc
commit 4dea0d94fc
  1. 5
      src/main/java/org/energy/modules/inspection/controller/InspectionPlanController.java
  2. 5
      src/main/java/org/energy/modules/inspection/controller/InspectionRouteController.java
  3. 4
      src/main/java/org/energy/modules/inspection/excel/InspectionPlanExcel.java
  4. 4
      src/main/java/org/energy/modules/inspection/excel/InspectionRouteExcel.java
  5. 6
      src/main/java/org/energy/modules/inspection/mapper/InspectionPlanMapper.xml
  6. 6
      src/main/java/org/energy/modules/inspection/mapper/InspectionRouteMapper.xml

@ -91,9 +91,6 @@ public class InspectionPlanController extends DafController {
if (StringUtil.isNotEmpty(inspectionPlan.getPlanName())) { if (StringUtil.isNotEmpty(inspectionPlan.getPlanName())) {
qw.lambda().like(InspectionPlan::getPlanName, inspectionPlan.getPlanName()); qw.lambda().like(InspectionPlan::getPlanName, inspectionPlan.getPlanName());
} }
if (null != inspectionPlan.getStation()) {
qw.lambda().eq(InspectionPlan::getStation, inspectionPlan.getStation());
}
if (StringUtil.isNotEmpty(inspectionPlan.getPeriodType())) { if (StringUtil.isNotEmpty(inspectionPlan.getPeriodType())) {
qw.lambda().like(InspectionPlan::getPeriodType, inspectionPlan.getPeriodType()); qw.lambda().like(InspectionPlan::getPeriodType, inspectionPlan.getPeriodType());
} }
@ -217,7 +214,7 @@ public class InspectionPlanController extends DafController {
public void exportInspectionRoute(@ApiIgnore @RequestParam Map<String, Object> entity, HttpServletResponse response) { public void exportInspectionRoute(@ApiIgnore @RequestParam Map<String, Object> entity, HttpServletResponse response) {
entity.remove("daf-auth"); entity.remove("daf-auth");
entity.forEach((key, value) -> { entity.forEach((key, value) -> {
if (!"station".equals(key) && !"planStatus".equals(key)) if (!"planStatus".equals(key))
{ {
entity.put(key, "%" + value + "%"); entity.put(key, "%" + value + "%");
} }

@ -91,9 +91,6 @@ public class InspectionRouteController extends DafController {
if (StringUtil.isNotEmpty(inspectionRoute.getRouteName())) { if (StringUtil.isNotEmpty(inspectionRoute.getRouteName())) {
qw.lambda().like(InspectionRoute::getRouteName, inspectionRoute.getRouteName()); qw.lambda().like(InspectionRoute::getRouteName, inspectionRoute.getRouteName());
} }
if (null != inspectionRoute.getStations()) {
qw.lambda().eq(InspectionRoute::getStations, inspectionRoute.getStations());
}
if (StringUtil.isNotEmpty(inspectionRoute.getType())) { if (StringUtil.isNotEmpty(inspectionRoute.getType())) {
qw.lambda().like(InspectionRoute::getType, inspectionRoute.getType()); qw.lambda().like(InspectionRoute::getType, inspectionRoute.getType());
} }
@ -218,7 +215,7 @@ public class InspectionRouteController extends DafController {
public void exportInspectionRoute(@ApiIgnore @RequestParam Map<String, Object> entity, HttpServletResponse response) { public void exportInspectionRoute(@ApiIgnore @RequestParam Map<String, Object> entity, HttpServletResponse response) {
entity.remove("daf-auth"); entity.remove("daf-auth");
entity.forEach((key, value) -> { entity.forEach((key, value) -> {
if (!"stations".equals(key) && !"istatus".equals(key)) if (!"istatus".equals(key))
{ {
entity.put(key, "%" + value + "%"); entity.put(key, "%" + value + "%");
} }

@ -42,10 +42,6 @@ public class InspectionPlanExcel implements Serializable {
@ExcelProperty(value = "计划名称") @ExcelProperty(value = "计划名称")
private String planName; private String planName;
@ColumnWidth(15)
@ExcelProperty(value = "场站")
private String stationName;
@ColumnWidth(15) @ColumnWidth(15)
@ExcelProperty(value = "计划类型") @ExcelProperty(value = "计划类型")
private String planType; private String planType;

@ -42,10 +42,6 @@ public class InspectionRouteExcel implements Serializable {
@ExcelProperty(value = "路线名称") @ExcelProperty(value = "路线名称")
private String routeName; private String routeName;
@ColumnWidth(15)
@ExcelProperty(value = "场站")
private String stationsName;
@ColumnWidth(15) @ColumnWidth(15)
@ExcelProperty(value = "类型") @ExcelProperty(value = "类型")
private String type; private String type;

@ -30,9 +30,8 @@
<select id="exportData" resultType="org.energy.modules.inspection.excel.InspectionPlanExcel"> <select id="exportData" resultType="org.energy.modules.inspection.excel.InspectionPlanExcel">
SELECT plan_no, plan_name, plan_type, period_type, period_value, start_time, end_time, cancel_reason SELECT plan_no, plan_name, plan_type, period_type, period_value, start_time, end_time, cancel_reason
,dic1.dict_value AS station_name, dic2.dict_value AS plan_status_name , dic2.dict_value AS plan_status_name
FROM i_inspection_plan a FROM i_inspection_plan a
LEFT JOIN sys_dict dic1 ON dic1.code = 'station' AND dic1.dict_key = a.station AND dic1.is_deleted = '0'
LEFT JOIN sys_dict dic2 ON dic2.code = 'istatus' AND dic2.dict_key = a.plan_status AND dic2.is_deleted = '0' LEFT JOIN sys_dict dic2 ON dic2.code = 'istatus' AND dic2.dict_key = a.plan_status AND dic2.is_deleted = '0'
WHERE a.is_deleted = 0 WHERE a.is_deleted = 0
<if test="entity.planNo != null and entity.planNo != ''"> <if test="entity.planNo != null and entity.planNo != ''">
@ -41,9 +40,6 @@
<if test="entity.planName != null and entity.planName != ''"> <if test="entity.planName != null and entity.planName != ''">
AND a.plan_name LIKE #{entity.planName} AND a.plan_name LIKE #{entity.planName}
</if> </if>
<if test="entity.station != null and entity.station != ''">
AND a.station = #{entity.station}
</if>
<if test="entity.periodType != null and entity.periodType != ''"> <if test="entity.periodType != null and entity.periodType != ''">
AND a.period_type LIKE #{entity.periodType} AND a.period_type LIKE #{entity.periodType}
</if> </if>

@ -27,9 +27,8 @@
<select id="exportData" resultType="org.energy.modules.inspection.excel.InspectionRouteExcel"> <select id="exportData" resultType="org.energy.modules.inspection.excel.InspectionRouteExcel">
SELECT a.route_no, a.route_name, a.type, a.factory, a.cancel_reason SELECT a.route_no, a.route_name, a.type, a.factory, a.cancel_reason
,dic1.dict_value AS stations_name, dic2.dict_value AS istatus_name , dic2.dict_value AS istatus_name
FROM i_inspection_route a FROM i_inspection_route a
LEFT JOIN sys_dict dic1 ON dic1.code = 'station' AND dic1.dict_key = a.stations AND dic1.is_deleted = '0'
LEFT JOIN sys_dict dic2 ON dic2.code = 'istatus' AND dic2.dict_key = a.istatus AND dic2.is_deleted = '0' LEFT JOIN sys_dict dic2 ON dic2.code = 'istatus' AND dic2.dict_key = a.istatus AND dic2.is_deleted = '0'
WHERE a.is_deleted = 0 WHERE a.is_deleted = 0
<if test="entity.routeNo != null and entity.routeNo != ''"> <if test="entity.routeNo != null and entity.routeNo != ''">
@ -38,9 +37,6 @@
<if test="entity.routeName != null and entity.routeName != ''"> <if test="entity.routeName != null and entity.routeName != ''">
AND a.route_name LIKE #{entity.routeName} AND a.route_name LIKE #{entity.routeName}
</if> </if>
<if test="entity.stations != null and entity.stations != ''">
AND a.stations = #{entity.stations}
</if>
<if test="entity.type != null and entity.type != ''"> <if test="entity.type != null and entity.type != ''">
AND a.type LIKE #{entity.type} AND a.type LIKE #{entity.type}
</if> </if>

Loading…
Cancel
Save