Commit 95de846b authored by shizhilong's avatar shizhilong

筛选数据条件更新提交 --shizhilong

parent 3948b672
......@@ -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;
......@@ -27,7 +28,10 @@ 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;
......@@ -227,7 +231,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