Commit 34b837fe authored by hkl's avatar hkl

Merge remote-tracking branch 'origin/dev-szl' into dev-hkl

parents 4f7e4f2f 37e86dc0
......@@ -2,6 +2,7 @@ package org.jeecg.modules.checkData.equipmentCheckData.controller;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.poi.excel.ExcelUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
......@@ -20,14 +21,19 @@ import org.jeecg.modules.checkData.equipmentCheckData.service.IMovementCourseInf
import org.jeecg.modules.checkData.equipmentCheckData.service.IMovementCourseService;
import org.jeecg.modules.checkData.equipmentCheckData.service.IMovementRecordsMasterService;
import org.jeecg.modules.checkData.equipmentCheckData.vo.*;
import org.jeecg.modules.subwayNetwork.entity.LineAlias;
import org.jeecg.modules.subwayNetwork.entity.SubwaySection;
import org.jeecg.modules.subwayNetwork.service.ILineAliasService;
import org.jeecg.modules.subwayNetwork.service.ISubwaySectionService;
import org.jeecg.modules.utils.BeanCopyUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.jeecg.common.system.base.controller.JeecgController;
import org.springframework.web.multipart.MultipartFile;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
......@@ -52,6 +58,8 @@ public class MovementRecordsMasterController extends JeecgController<MovementRec
private IMovementCourseInfoService movementCourseInfoService;
@Autowired
private ISubwaySectionService subwaySectionService;
@Autowired
private ILineAliasService lineAliasService;
/**
* 动静态几何尺寸数据-分页列表查询
......@@ -171,7 +179,15 @@ public class MovementRecordsMasterController extends JeecgController<MovementRec
if (bean.getSectionEndMileage() != null) {
result.setEndMileage(bean.getSectionEndMileage());
}
if(ObjectUtil.isNotEmpty(bean.getSectionName())){
result.setSubwaySectionName(bean.getSectionName());
}
if(ObjectUtil.isNotEmpty(bean.getLightRailName())){
result.setLightRailName(bean.getLightRailName());
}
}
//查询区间起始终点里程
result.setLineAliasName(lineAliasService.getById(lineAliasId).getLineAliasName());
//TODO 后期改造完补充逻辑
result.setRailNum(25);
result.setCurveNum(30);
......@@ -227,7 +243,16 @@ public class MovementRecordsMasterController extends JeecgController<MovementRec
return Result.OK("删除成功!");
}
// @AutoLog(value = "导入")
// @ApiOperation(value = "导入", notes = "导入 ")
// @PostMapping(value = "/upload")
// @ResponseBody
// public Result<String> uploadFile(MultipartFile file) throws IOException {
// byte[] bytes = file.getBytes();
// ByteArrayInputStream bis = new ByteArrayInputStream(bytes);
// ExcelUtil.getReader(bis);
// return Result.ok("操作成功");
// }
/**
* 校验参数
*
......
......@@ -142,8 +142,9 @@ public class RecordsMasterCheckController extends JeecgController<RecordsMasterC
ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
List<RecordsMasterCheck> resultList = this.service.list(new LambdaQueryWrapper<RecordsMasterCheck>()
.like(ObjectUtil.isNotEmpty(recordsMasterCheck.getEkCode()), RecordsMasterCheck::getEkCode, recordsMasterCheck.getEkCode())
.like(ObjectUtil.isNotEmpty(recordsMasterCheck.getSubwaySectionName()), RecordsMasterCheck::getSubwaySectionName, recordsMasterCheck.getSubwaySectionName())
.like(ObjectUtil.isNotEmpty(recordsMasterCheck.getLightRailName()), RecordsMasterCheck::getLightRailName, recordsMasterCheck.getLightRailName())
.eq(ObjectUtil.isNotEmpty(recordsMasterCheck.getSubwaySectionId()), RecordsMasterCheck::getSubwaySectionId, recordsMasterCheck.getSubwaySectionId())
.eq(ObjectUtil.isNotEmpty(recordsMasterCheck.getLightRailId()), RecordsMasterCheck::getLightRailId, recordsMasterCheck.getLightRailId())
.eq(ObjectUtil.isNotEmpty(recordsMasterCheck.getLineAliasId()), RecordsMasterCheck::getLineAliasId, recordsMasterCheck.getLineAliasId())
.orderByAsc(RecordsMasterCheck::getCreateTime));
//导出文件名称
mv.addObject(NormalExcelConstants.FILE_NAME, "道床使用情况检查");
......@@ -164,8 +165,9 @@ public class RecordsMasterCheckController extends JeecgController<RecordsMasterC
public void export(RecordsMasterCheck recordsMasterCheck, HttpServletResponse response) {
List<RecordsMasterCheck> resultList = this.service.list(new LambdaQueryWrapper<RecordsMasterCheck>()
.like(ObjectUtil.isNotEmpty(recordsMasterCheck.getEkCode()), RecordsMasterCheck::getEkCode, recordsMasterCheck.getEkCode())
.like(ObjectUtil.isNotEmpty(recordsMasterCheck.getSubwaySectionName()), RecordsMasterCheck::getSubwaySectionName, recordsMasterCheck.getSubwaySectionName())
.like(ObjectUtil.isNotEmpty(recordsMasterCheck.getLightRailName()), RecordsMasterCheck::getLightRailName, recordsMasterCheck.getLightRailName())
.eq(ObjectUtil.isNotEmpty(recordsMasterCheck.getSubwaySectionId()), RecordsMasterCheck::getSubwaySectionId, recordsMasterCheck.getSubwaySectionId())
.eq(ObjectUtil.isNotEmpty(recordsMasterCheck.getLightRailId()), RecordsMasterCheck::getLightRailId, recordsMasterCheck.getLightRailId())
.eq(ObjectUtil.isNotEmpty(recordsMasterCheck.getLineAliasId()), RecordsMasterCheck::getLineAliasId, recordsMasterCheck.getLineAliasId())
.orderByAsc(RecordsMasterCheck::getCreateTime));
int num = 0;
for (RecordsMasterCheck s : resultList) {
......
......@@ -11,14 +11,14 @@
<if test="dto.ekCode != null and dto.ekCode != ''">
AND t1.ek_code like concat('%',#{dto.ekCode},'%')
</if>
<if test="dto.subwaySectionName != null and dto.subwaySectionName != ''">
AND t1.subway_section_name like concat('%',#{dto.subwaySectionName},'%')
<if test="dto.subwaySectionId != null and dto.subwaySectionId != ''">
AND t1.subway_section_id = #{dto.subwaySectionId}
</if>
<if test="dto.lightRailName != null and dto.lightRailName != ''">
AND t1.light_rail_name like concat('%',#{dto.lightRailName},'%')
<if test="dto.lightRailId != null and dto.lightRailId != ''">
AND t1.light_rail_id = #{dto.lightRailId}
</if>
<if test="dto.lineAliasName != null and dto.lineAliasName != ''">
AND t1.line_alias_name like concat('%',#{dto.lineAliasName},'%')
<if test="dto.lineAliasId != null and dto.lineAliasId != ''">
AND t1.line_alias_id = #{dto.lineAliasId}
</if>
AND t1.type = #{dto.type}
AND t1.del_flag = '0'
......
......@@ -11,11 +11,11 @@
<if test="dto.ekCode != null and dto.ekCode != ''">
AND t1.ek_code like concat('%',#{dto.ekCode},'%')
</if>
<if test="dto.lightRailName != null and dto.lightRailName != ''">
AND t1.light_rail_name like concat('%',#{dto.lightRailName},'%')
<if test="dto.lightRailId != null and dto.lightRailId != ''">
AND t1.light_rail_id = #{dto.lightRailId}
</if>
<if test="dto.lineAliasName != null and dto.lineAliasName != ''">
AND t1.line_alias_name like concat('%',#{dto.lineAliasName},'%')
<if test="dto.lineAliasId != null and dto.lineAliasId != ''">
AND t1.line_alias_id = #{dto.lineAliasId}
</if>
AND t1.del_flag = '0'
order by t1.create_time desc
......
......@@ -11,14 +11,14 @@
<if test="dto.ekCode != null and dto.ekCode != ''">
AND t1.ek_code like concat('%',#{dto.ekCode},'%')
</if>
<if test="dto.subwaySectionName != null and dto.subwaySectionName != ''">
AND t1.subway_section_name like concat('%',#{dto.subwaySectionName},'%')
<if test="dto.subwaySectionId != null and dto.subwaySectionId != ''">
AND t1.subway_section_id = #{dto.subwaySectionId}
</if>
<if test="dto.lightRailName != null and dto.lightRailName != ''">
AND t1.light_rail_name like concat('%',#{dto.lightRailName},'%')
<if test="dto.lightRailId != null and dto.lightRailId != ''">
AND t1.light_rail_id = #{dto.lightRailId}
</if>
<if test="dto.lineAliasName != null and dto.lineAliasName != ''">
AND t1.line_alias_name like concat('%',#{dto.lineAliasName},'%')
<if test="dto.lineAliasId != null and dto.lineAliasId != ''">
AND t1.line_alias_id = #{dto.lineAliasId}
</if>
AND t1.del_flag = '0'
order by t1.create_time desc
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment