Commit 7eff6fb5 authored by hkl's avatar hkl

feat:1.动静态分析代码提交

parent a6d528d8
......@@ -8,13 +8,17 @@ import io.swagger.annotations.ApiOperation;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.common.system.base.controller.JeecgController;
import org.jeecg.modules.dynamicStaticAnalysis.dto.AnalysisBatchQueryDTO;
import org.jeecg.modules.dynamicStaticAnalysis.dto.AnalysisBatchSaveOrUpdateDTO;
import org.jeecg.modules.dynamicStaticAnalysis.dto.CheckBatchDTO;
import org.jeecg.modules.dynamicStaticAnalysis.entity.AnalysisBatch;
import org.jeecg.modules.dynamicStaticAnalysis.service.IAnalysisBatchService;
import org.jeecg.modules.dynamicStaticAnalysis.vo.AnalysisBatchQueryVO;
import org.jeecg.modules.dynamicStaticAnalysis.vo.CheckBatchVO;
import org.springframework.web.bind.annotation.*;
import java.util.Arrays;
/**
* <p>
* 动静态分析-分析批次表 前端控制器
......@@ -44,11 +48,11 @@ public class AnalysisBatchController extends JeecgController<AnalysisBatch, IAna
@AutoLog(value = "动静态分析-分析批次-获取列表数据")
@ApiOperation(value = "动静态分析-分析批次-获取列表数据", notes = "动静态分析-分析批次-获取列表数据")
@GetMapping(value = "/listRecord")
public Result<IPage<CheckBatchVO>> listRecord(@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
CheckBatchDTO dto) {
Page<CheckBatchVO> pageData = new Page<>(pageNo, pageSize);
pageData = this.service.getCheckData(pageData, dto);
public Result<IPage<AnalysisBatchQueryVO>> listRecord(@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
AnalysisBatchQueryDTO dto) {
Page<AnalysisBatchQueryVO> pageData = new Page<>(pageNo, pageSize);
pageData = this.service.listRecord(pageData, dto);
return Result.OK(pageData);
}
......@@ -65,8 +69,8 @@ public class AnalysisBatchController extends JeecgController<AnalysisBatch, IAna
}
@AutoLog(value = "动静态分析-分析批次-新增分析批次")
@ApiOperation(value = "动静态分析-分析批次-新增分析批次", notes = "动静态分析-分析批次-新增分析批次")
@AutoLog(value = "动静态分析-分析批次-更新分析批次")
@ApiOperation(value = "动静态分析-分析批次-更新分析批次", notes = "动静态分析-分析批次-更新分析批次")
@PostMapping(value = "/updateRecord")
public Result<String> updateRecord(@RequestBody AnalysisBatchSaveOrUpdateDTO dto) {
......@@ -74,4 +78,27 @@ public class AnalysisBatchController extends JeecgController<AnalysisBatch, IAna
return Result.OK("操作成功");
}
@AutoLog(value = "动静态分析-分析批次-通过id删除")
@ApiOperation(value = "动静态分析-分析批次-通过id删除", notes = "动静态分析-分析批次-通过id删除")
@GetMapping(value = "/deleteRecord")
public Result<String> deleteRecord(@RequestParam(name = "id", required = true) String id) {
this.service.deleteRecord(id);
return Result.OK("删除成功!");
}
/**
* 批量删除
*
* @param ids
* @return
*/
@AutoLog(value = "动静态分析-分析批次-批量删除")
@ApiOperation(value = "动静态分析-分析批次-批量删除", notes = "动静态分析-分析批次-批量删除")
@GetMapping(value = "/deleteBatchRecord")
public Result<String> deleteBatchRecord(@RequestParam(name = "ids", required = true) String ids) {
this.service.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
}
package org.jeecg.modules.dynamicStaticAnalysis.mapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.jeecg.modules.dynamicStaticAnalysis.dto.AnalysisBatchQueryDTO;
import org.jeecg.modules.dynamicStaticAnalysis.dto.CheckBatchDTO;
import org.jeecg.modules.dynamicStaticAnalysis.entity.AnalysisBatch;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.jeecg.modules.dynamicStaticAnalysis.vo.AnalysisBatchQueryVO;
import org.jeecg.modules.dynamicStaticAnalysis.vo.CheckBatchVO;
/**
......@@ -17,4 +19,6 @@ import org.jeecg.modules.dynamicStaticAnalysis.vo.CheckBatchVO;
public interface AnalysisBatchMapper extends BaseMapper<AnalysisBatch> {
Page<CheckBatchVO> getCheckData(Page<CheckBatchVO> pageData, CheckBatchDTO dto);
Page<AnalysisBatchQueryVO> listRecord(Page<AnalysisBatchQueryVO> pageData, AnalysisBatchQueryDTO dto);
}
......@@ -39,4 +39,22 @@
AND t1.check_time <![CDATA[ <= ]]> #{dto.checkTime}
</if>
</select>
<select id="listRecord" resultType="org.jeecg.modules.dynamicStaticAnalysis.vo.AnalysisBatchQueryVO">
SELECT
t1.id,
t1.analysis_batch_code,
t1.light_rail_id,
t1.light_rail_name,
t1.line_alias_id,
t1.line_alias_name,
t1.starting_mileage,
t1.end_mileage,
t1.analysis_type,
t1.allow_value,
t1.dispatching,
t1.analysis_status,
t1.remark
FROM
t_dsa_analysis_batch t1
</select>
</mapper>
package org.jeecg.modules.dynamicStaticAnalysis.service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.jeecg.modules.dynamicStaticAnalysis.dto.AnalysisBatchQueryDTO;
import org.jeecg.modules.dynamicStaticAnalysis.dto.AnalysisBatchSaveOrUpdateDTO;
import org.jeecg.modules.dynamicStaticAnalysis.dto.CheckBatchDTO;
import org.jeecg.modules.dynamicStaticAnalysis.entity.AnalysisBatch;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.modules.dynamicStaticAnalysis.vo.AnalysisBatchQueryVO;
import org.jeecg.modules.dynamicStaticAnalysis.vo.CheckBatchVO;
/**
......@@ -22,4 +24,8 @@ public interface IAnalysisBatchService extends IService<AnalysisBatch> {
void saveRecord(AnalysisBatchSaveOrUpdateDTO dto);
void updateRecord(AnalysisBatchSaveOrUpdateDTO dto);
Page<AnalysisBatchQueryVO> listRecord(Page<AnalysisBatchQueryVO> pageData, AnalysisBatchQueryDTO dto);
void deleteRecord(String id);
}
......@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.jeecg.common.util.UUIDGenerator;
import org.jeecg.modules.dynamicStaticAnalysis.dto.AnalysisBatchQueryDTO;
import org.jeecg.modules.dynamicStaticAnalysis.dto.AnalysisBatchSaveOrUpdateDTO;
import org.jeecg.modules.dynamicStaticAnalysis.dto.CheckBatchDTO;
import org.jeecg.modules.dynamicStaticAnalysis.entity.AnalysisBatch;
......@@ -13,6 +14,7 @@ import org.jeecg.modules.dynamicStaticAnalysis.mapper.AnalysisBatchCheckDataMapM
import org.jeecg.modules.dynamicStaticAnalysis.mapper.AnalysisBatchMapper;
import org.jeecg.modules.dynamicStaticAnalysis.service.IAnalysisBatchService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.modules.dynamicStaticAnalysis.vo.AnalysisBatchQueryVO;
import org.jeecg.modules.dynamicStaticAnalysis.vo.CheckBatchVO;
import org.jeecg.modules.utils.BeanCopyUtil;
import org.springframework.stereotype.Service;
......@@ -111,5 +113,22 @@ public class AnalysisBatchServiceImpl extends ServiceImpl<AnalysisBatchMapper, A
}
}
@Override
public Page<AnalysisBatchQueryVO> listRecord(Page<AnalysisBatchQueryVO> pageData, AnalysisBatchQueryDTO dto) {
return this.baseMapper.listRecord(pageData, dto);
}
@Override
public void deleteRecord(String id) {
// 1.先删除明细
LambdaQueryWrapper<AnalysisBatchCheckDataMap> wrapper = Wrappers.lambdaQuery();
wrapper.eq(AnalysisBatchCheckDataMap::getAnalysisBatchId, id);
analysisBatchCheckDataMapMapper.delete(wrapper);
// 2.删除主信息
this.removeById(id);
}
}
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