Commit a6d528d8 authored by hkl's avatar hkl

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

parent 03a6b9ef
package org.jeecg.modules.dynamicStaticAnalysis.controller;
import cn.hutool.core.util.ObjectUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.common.util.UUIDGenerator;
import org.jeecg.modules.deviceAsset.entity.CurveManagement;
import org.jeecg.modules.dynamicStaticAnalysis.entity.AllowValueConfig;
import org.jeecg.modules.dynamicStaticAnalysis.service.IAllowValueConfigService;
import org.springframework.web.bind.annotation.*;
import org.jeecg.common.system.base.controller.JeecgController;
import java.util.List;
/**
* <p>
* 动静态分析-参数配置-容许值差 前端控制器
* </p>
*
* @author hkl
* @since 2023-07-25
*/
@RestController
@RequestMapping("/dynamicStaticAnalysis/allowValueConfig")
@Api("动静态分析-参数配置-容许值差")
public class AllowValueConfigController extends JeecgController<AllowValueConfig, IAllowValueConfigService> {
@AutoLog(value = "动静态分析-参数配置-容许值差-查询一条记录")
@ApiOperation(value = "动静态分析-参数配置-容许值差-查询一条记录", notes = "动静态分析-参数配置-容许值差-查询一条记录")
@GetMapping(value = "/getOneRecord")
public Result<AllowValueConfig> getOneRecord() {
List<AllowValueConfig> list = this.service.list();
if (ObjectUtil.isEmpty(list)) {
AllowValueConfig oneRecord = new AllowValueConfig();
oneRecord.setId(UUIDGenerator.generate());
oneRecord.setBigTrackGauge(0);
oneRecord.setSmallTrackGauge(0);
oneRecord.setTriangularPit(0);
oneRecord.setDirection(0);
oneRecord.setLevel(0);
oneRecord.setHeight(0);
oneRecord.setIsWork(1);
oneRecord.setIsEnable(1);
this.service.save(oneRecord);
list.add(oneRecord);
}
return Result.OK(list.get(0));
}
@AutoLog(value = "动静态分析-参数配置-容许值差-编辑")
@ApiOperation(value = "动静态分析-参数配置-容许值差-编辑", notes = "动静态分析-参数配置-容许值差-编辑")
@PostMapping(value = "/updateRecord")
public Result<String> updateRecord(@RequestBody AllowValueConfig allowValueConfig) {
this.service.updateById(allowValueConfig);
return Result.OK("编辑成功!");
}
}
package org.jeecg.modules.dynamicStaticAnalysis.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.Api;
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.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.CheckBatchVO;
import org.springframework.web.bind.annotation.*;
/**
* <p>
* 动静态分析-分析批次表 前端控制器
* </p>
*
* @author hkl
* @since 2023-07-26
*/
@RestController
@RequestMapping("/dynamicStaticAnalysis/analysisBatch")
@Api("动静态分析-分析批次")
public class AnalysisBatchController extends JeecgController<AnalysisBatch, IAnalysisBatchService> {
@AutoLog(value = "动静态分析-分析批次-获取检查数据")
@ApiOperation(value = "动静态分析-分析批次-获取检查数据", notes = "动静态分析-分析批次-获取检查数据")
@GetMapping(value = "/getCheckData")
public Result<IPage<CheckBatchVO>> getCheckData(@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);
return Result.OK(pageData);
}
@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);
return Result.OK(pageData);
}
@AutoLog(value = "动静态分析-分析批次-新增分析批次")
@ApiOperation(value = "动静态分析-分析批次-新增分析批次", notes = "动静态分析-分析批次-新增分析批次")
@PostMapping(value = "/saveRecord")
public Result<String> saveRecord(@RequestBody AnalysisBatchSaveOrUpdateDTO dto) {
this.service.saveRecord(dto);
return Result.OK("操作成功");
}
@AutoLog(value = "动静态分析-分析批次-新增分析批次")
@ApiOperation(value = "动静态分析-分析批次-新增分析批次", notes = "动静态分析-分析批次-新增分析批次")
@PostMapping(value = "/updateRecord")
public Result<String> updateRecord(@RequestBody AnalysisBatchSaveOrUpdateDTO dto) {
this.service.updateRecord(dto);
return Result.OK("操作成功");
}
}
package org.jeecg.modules.dynamicStaticAnalysis.controller;
import io.swagger.annotations.Api;
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.common.util.UUIDGenerator;
import org.jeecg.modules.dynamicStaticAnalysis.entity.DispatchingConfig;
import org.jeecg.modules.dynamicStaticAnalysis.service.IDispatchingConfigService;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* <p>
* 动静态分析-参数配置-派工配置 前端控制器
* </p>
*
* @author hkl
* @since 2023-07-25
*/
@RestController
@RequestMapping("/dynamicStaticAnalysis/dispatchingConfig")
@Api("动静态分析-参数配置-派工配置")
public class DispatchingConfigController extends JeecgController<DispatchingConfig, IDispatchingConfigService> {
@AutoLog(value = "动静态分析-参数配置-派工配置-查询所有参数")
@ApiOperation(value = "动静态分析-参数配置-派工配置-查询所有参数", notes = "动静态分析-参数配置-派工配置-查询所有参数")
@GetMapping(value = "/listRecord")
public Result<List<DispatchingConfig>> listRecord() {
return Result.OK(this.service.list());
}
@AutoLog(value = "动静态分析-参数配置-派工配置-新增")
@ApiOperation(value = "动静态分析-参数配置-派工配置-新增", notes = "动静态分析-参数配置-派工配置-新增")
@PostMapping(value = "/saveRecord")
public Result<String> saveRecord(@RequestBody DispatchingConfig record) {
record.setId(UUIDGenerator.generate());
this.service.save(record);
return Result.OK("操作成功");
}
@AutoLog(value = "动静态分析-参数配置-派工配置-批量更新")
@ApiOperation(value = "动静态分析-参数配置-派工配置-批量更新", notes = "动静态分析-参数配置-派工配置-批量更新")
@PostMapping(value = "/batchUpdateRecord")
public Result<String> batchUpdateRecord(@RequestBody List<DispatchingConfig> records) {
this.service.updateBatchById(records);
return Result.OK("操作成功");
}
}
package org.jeecg.modules.dynamicStaticAnalysis.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
/**
* <p>
* 动静态分析-参数配置-容许值差
* </p>
*
* @author hkl
* @since 2023-07-25
*/
@Getter
@Setter
@TableName("t_dsa_allow_value_config")
@ApiModel(value = "AllowValueConfig对象", description = "动静态分析-参数配置-容许值差")
public class AllowValueConfig implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty("主键")
@TableId("id")
private String id;
@ApiModelProperty("创建人")
@TableField("create_by")
private String createBy;
@ApiModelProperty("创建日期")
@TableField("create_time")
private Date createTime;
@ApiModelProperty("更新人")
@TableField("update_by")
private String updateBy;
@ApiModelProperty("更新时间")
@TableField("update_time")
private Date updateTime;
@ApiModelProperty("大轨距(mm)")
@TableField("big_track_gauge")
private Integer bigTrackGauge;
@ApiModelProperty("小轨距(mm)")
@TableField("small_track_gauge")
private Integer smallTrackGauge;
@ApiModelProperty("水平(mm)")
@TableField("level")
private Integer level;
@ApiModelProperty("三角坑(mm)")
@TableField("triangular_pit")
private Integer triangularPit;
@ApiModelProperty("轨向(mm)")
@TableField("direction")
private Integer direction;
@ApiModelProperty("高低(mm)")
@TableField("height")
private Integer height;
@ApiModelProperty("垂直加速度(g)")
@TableField("vertical_acceleration")
private Integer verticalAcceleration;
@ApiModelProperty("横向加速度(g)")
@TableField("lateral_acceleration")
private Integer lateralAcceleration;
@ApiModelProperty("规矩变化率")
@TableField("track_gauge_change")
private Integer trackGaugeChange;
@ApiModelProperty("曲率变化率")
@TableField("curvature_change")
private Integer curvatureChange;
@ApiModelProperty("是否派工 0-否 1-是(默认值)")
@TableField("is_work")
private Integer isWork;
@ApiModelProperty("是否启用 0-否 1-启用(默认值)")
@TableField("is_enable")
private Integer isEnable;
}
package org.jeecg.modules.dynamicStaticAnalysis.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
/**
* <p>
* 动静态分析-分析批次表
* </p>
*
* @author hkl
* @since 2023-07-26
*/
@Getter
@Setter
@TableName("t_dsa_analysis_batch")
@ApiModel(value = "AnalysisBatch对象", description = "动静态分析-分析批次表")
public class AnalysisBatch implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty("主键")
@TableId("id")
private String id;
@ApiModelProperty("创建人")
@TableField("create_by")
private String createBy;
@ApiModelProperty("创建日期")
@TableField("create_time")
private Date createTime;
@ApiModelProperty("更新人")
@TableField("update_by")
private String updateBy;
@ApiModelProperty("更新时间")
@TableField("update_time")
private Date updateTime;
@ApiModelProperty("分析批次号")
@TableField("analysis_batch_code")
private String analysisBatchCode;
@ApiModelProperty("所属线路id")
@TableField("light_rail_id")
private String lightRailId;
@ApiModelProperty("所属线路名称")
@TableField("light_rail_name")
private String lightRailName;
@ApiModelProperty("所属线别id")
@TableField("line_alias_id")
private String lineAliasId;
@ApiModelProperty("所属线别名称")
@TableField("line_alias_name")
private String lineAliasName;
@ApiModelProperty("起始里程")
@TableField("starting_mileage")
private BigDecimal startingMileage;
@ApiModelProperty("终点里程")
@TableField("end_mileage")
private BigDecimal endMileage;
@ApiModelProperty("分析类型 1-均值分析 2-峰值分析")
@TableField("analysis_type")
private Integer analysisType;
@ApiModelProperty("容许值差")
@TableField("allow_value")
private String allowValue;
@ApiModelProperty("派工设置")
@TableField("dispatching")
private String dispatching;
@ApiModelProperty("分析状态 0-创建 1-分析中 99-分析完成")
@TableField("analysis_status")
private Integer analysisStatus;
@ApiModelProperty("备注")
@TableField("remark")
private String remark;
}
package org.jeecg.modules.dynamicStaticAnalysis.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
/**
* <p>
* 动静态分析-分析批次-检查数据关联关系
* </p>
*
* @author hkl
* @since 2023-07-26
*/
@Getter
@Setter
@TableName("t_dsa_analysis_batch_check_data_map")
@ApiModel(value = "AnalysisBatchCheckDataMap对象", description = "动静态分析-分析批次-检查数据关联关系")
public class AnalysisBatchCheckDataMap implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty("主键")
@TableId("id")
private String id;
@ApiModelProperty("创建人")
@TableField("create_by")
private String createBy;
@ApiModelProperty("创建日期")
@TableField("create_time")
private Date createTime;
@ApiModelProperty("更新人")
@TableField("update_by")
private String updateBy;
@ApiModelProperty("更新时间")
@TableField("update_time")
private Date updateTime;
@ApiModelProperty("分析批次号")
@TableField("analysis_batch_code")
private String analysisBatchCode;
@ApiModelProperty("分析批id")
@TableField("analysis_batch_id")
private String analysisBatchId;
@ApiModelProperty("检查批次号")
@TableField("ek_code")
private String ekCode;
@ApiModelProperty("检查批id")
@TableField("ek_id")
private String ekId;
@ApiModelProperty("检查数据类型 1-人工静态检查 2-轨检仪静态检查 3-轨检车检查 4-添乘仪检查" )
@TableField("ek_type")
private Integer ekType;
@ApiModelProperty("检查日期")
@TableField("check_time")
private Date checkTime;
@ApiModelProperty("起始里程")
@TableField("starting_mileage")
private BigDecimal startingMileage;
@ApiModelProperty("终点里程")
@TableField("end_mileage")
private BigDecimal endMileage;
@ApiModelProperty("容许值差")
@TableField("allow_value")
private String allowValue;
@ApiModelProperty("派工设置")
@TableField("dispatching")
private String dispatching;
@ApiModelProperty("分析状态 0-创建 1-分析中 99-分析完成")
@TableField("analysis_status")
private Integer analysisStatus;
@ApiModelProperty("备注")
@TableField("remark")
private String remark;
}
package org.jeecg.modules.dynamicStaticAnalysis.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
/**
* <p>
* 动静态分析-参数配置-派工配置
* </p>
*
* @author hkl
* @since 2023-07-25
*/
@Getter
@Setter
@TableName("t_dsa_dispatching_config")
@ApiModel(value = "DispatchingConfig对象", description = "动静态分析-参数配置-派工配置")
public class DispatchingConfig implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty("主键")
@TableId("id")
private String id;
@ApiModelProperty("创建人")
@TableField("create_by")
private String createBy;
@ApiModelProperty("创建日期")
@TableField("create_time")
private Date createTime;
@ApiModelProperty("更新人")
@TableField("update_by")
private String updateBy;
@ApiModelProperty("更新时间")
@TableField("update_time")
private Date updateTime;
@ApiModelProperty("派工类型 1-静态检查数据 2-轨检车动态检查数据 3-添乘仪动态检查数据")
@TableField("type")
private Integer type;
@ApiModelProperty("派工原因")
@TableField("reason_label")
private String reasonLabel;
@ApiModelProperty("派工值")
@TableField("reason_value")
private String reasonValue;
@ApiModelProperty("是否派工 0-否 1-是(默认值)")
@TableField("is_work")
private Integer isWork;
@ApiModelProperty("是否启用 0-否 1-启用(默认值)")
@TableField("is_enable")
private Integer isEnable;
}
package org.jeecg.modules.dynamicStaticAnalysis.mapper;
import org.jeecg.modules.dynamicStaticAnalysis.entity.AllowValueConfig;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* <p>
* 动静态分析-参数配置-容许值差 Mapper 接口
* </p>
*
* @author hkl
* @since 2023-07-25
*/
public interface AllowValueConfigMapper extends BaseMapper<AllowValueConfig> {
}
package org.jeecg.modules.dynamicStaticAnalysis.mapper;
import org.jeecg.modules.dynamicStaticAnalysis.entity.AnalysisBatchCheckDataMap;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* <p>
* 动静态分析-分析批次-检查数据关联关系 Mapper 接口
* </p>
*
* @author hkl
* @since 2023-07-26
*/
public interface AnalysisBatchCheckDataMapMapper extends BaseMapper<AnalysisBatchCheckDataMap> {
}
package org.jeecg.modules.dynamicStaticAnalysis.mapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
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.CheckBatchVO;
/**
* <p>
* 动静态分析-分析批次表 Mapper 接口
* </p>
*
* @author hkl
* @since 2023-07-26
*/
public interface AnalysisBatchMapper extends BaseMapper<AnalysisBatch> {
Page<CheckBatchVO> getCheckData(Page<CheckBatchVO> pageData, CheckBatchDTO dto);
}
package org.jeecg.modules.dynamicStaticAnalysis.mapper;
import org.jeecg.modules.dynamicStaticAnalysis.entity.DispatchingConfig;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* <p>
* 动静态分析-参数配置-派工配置 Mapper 接口
* </p>
*
* @author hkl
* @since 2023-07-25
*/
public interface DispatchingConfigMapper extends BaseMapper<DispatchingConfig> {
}
<?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">
<mapper namespace="org.jeecg.modules.dynamicStaticAnalysis.mapper.AllowValueConfigMapper">
</mapper>
<?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">
<mapper namespace="org.jeecg.modules.dynamicStaticAnalysis.mapper.AnalysisBatchCheckDataMapMapper">
</mapper>
<?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">
<mapper namespace="org.jeecg.modules.dynamicStaticAnalysis.mapper.AnalysisBatchMapper">
<select id="getCheckData" resultType="org.jeecg.modules.dynamicStaticAnalysis.vo.CheckBatchVO">
SELECT
t1.id,
t1.ek_code,
t1.type ek_type,
t1.end_mileage,
t1.starting_mileage,
t1.light_rail_id,
t1.light_rail_name,
t1.line_alias_id,
t1.line_alias_name,
t1.verify_by,
t1.verify_time,
t1.check_time,
t1.remark
FROM
t_djt_movement_records_master t1
WHERE t1.del_flag = '0'
<if test="dto.ekCode != null and dto.ekCode != ''">
AND t1.ek_code like concat('%',#{dto.ekCode},'%')
</if>
<if test="dto.ekType != null and dto.ekType != ''">
AND t1.type like concat('%',#{dto.ekCode},'%')
</if>
<if test="dto.lightRailId != null and dto.lightRailId != ''">
AND t1.light_rail_id = #{dto.lightRailId}
</if>
<if test="dto.lineAliasId != null and dto.lineAliasId != ''">
AND t1.line_alias_id = #{dto.lineAliasId}
</if>
<if test="dto.checkTime != null">
AND t1.check_time >= #{dto.checkTime}
</if>
<if test="dto.checkTime != null">
AND t1.check_time <![CDATA[ <= ]]> #{dto.checkTime}
</if>
</select>
</mapper>
<?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">
<mapper namespace="org.jeecg.modules.dynamicStaticAnalysis.mapper.DispatchingConfigMapper">
</mapper>
package org.jeecg.modules.dynamicStaticAnalysis.service;
import org.jeecg.modules.dynamicStaticAnalysis.entity.AllowValueConfig;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* <p>
* 动静态分析-参数配置-容许值差 服务类
* </p>
*
* @author hkl
* @since 2023-07-25
*/
public interface IAllowValueConfigService extends IService<AllowValueConfig> {
}
package org.jeecg.modules.dynamicStaticAnalysis.service;
import org.jeecg.modules.dynamicStaticAnalysis.entity.AnalysisBatchCheckDataMap;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* <p>
* 动静态分析-分析批次-检查数据关联关系 服务类
* </p>
*
* @author hkl
* @since 2023-07-26
*/
public interface IAnalysisBatchCheckDataMapService extends IService<AnalysisBatchCheckDataMap> {
}
package org.jeecg.modules.dynamicStaticAnalysis.service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
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.CheckBatchVO;
/**
* <p>
* 动静态分析-分析批次表 服务类
* </p>
*
* @author hkl
* @since 2023-07-26
*/
public interface IAnalysisBatchService extends IService<AnalysisBatch> {
Page<CheckBatchVO> getCheckData(Page<CheckBatchVO> pageData, CheckBatchDTO dto);
void saveRecord(AnalysisBatchSaveOrUpdateDTO dto);
void updateRecord(AnalysisBatchSaveOrUpdateDTO dto);
}
package org.jeecg.modules.dynamicStaticAnalysis.service;
import org.jeecg.modules.dynamicStaticAnalysis.entity.DispatchingConfig;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* <p>
* 动静态分析-参数配置-派工配置 服务类
* </p>
*
* @author hkl
* @since 2023-07-25
*/
public interface IDispatchingConfigService extends IService<DispatchingConfig> {
}
package org.jeecg.modules.dynamicStaticAnalysis.service.impl;
import org.jeecg.modules.dynamicStaticAnalysis.entity.AllowValueConfig;
import org.jeecg.modules.dynamicStaticAnalysis.mapper.AllowValueConfigMapper;
import org.jeecg.modules.dynamicStaticAnalysis.service.IAllowValueConfigService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
/**
* <p>
* 动静态分析-参数配置-容许值差 服务实现类
* </p>
*
* @author hkl
* @since 2023-07-25
*/
@Service
public class AllowValueConfigServiceImpl extends ServiceImpl<AllowValueConfigMapper, AllowValueConfig> implements IAllowValueConfigService {
}
package org.jeecg.modules.dynamicStaticAnalysis.service.impl;
import org.jeecg.modules.dynamicStaticAnalysis.entity.AnalysisBatchCheckDataMap;
import org.jeecg.modules.dynamicStaticAnalysis.mapper.AnalysisBatchCheckDataMapMapper;
import org.jeecg.modules.dynamicStaticAnalysis.service.IAnalysisBatchCheckDataMapService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
/**
* <p>
* 动静态分析-分析批次-检查数据关联关系 服务实现类
* </p>
*
* @author hkl
* @since 2023-07-26
*/
@Service
public class AnalysisBatchCheckDataMapServiceImpl extends ServiceImpl<AnalysisBatchCheckDataMapMapper, AnalysisBatchCheckDataMap> implements IAnalysisBatchCheckDataMapService {
}
package org.jeecg.modules.dynamicStaticAnalysis.service.impl;
import cn.hutool.core.bean.BeanUtil;
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.AnalysisBatchSaveOrUpdateDTO;
import org.jeecg.modules.dynamicStaticAnalysis.dto.CheckBatchDTO;
import org.jeecg.modules.dynamicStaticAnalysis.entity.AnalysisBatch;
import org.jeecg.modules.dynamicStaticAnalysis.entity.AnalysisBatchCheckDataMap;
import org.jeecg.modules.dynamicStaticAnalysis.mapper.AnalysisBatchCheckDataMapMapper;
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.CheckBatchVO;
import org.jeecg.modules.utils.BeanCopyUtil;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;
/**
* <p>
* 动静态分析-分析批次表 服务实现类
* </p>
*
* @author hkl
* @since 2023-07-26
*/
@Service
public class AnalysisBatchServiceImpl extends ServiceImpl<AnalysisBatchMapper, AnalysisBatch> implements IAnalysisBatchService {
@Resource
private AnalysisBatchCheckDataMapMapper analysisBatchCheckDataMapMapper;
@Override
public Page<CheckBatchVO> getCheckData(Page<CheckBatchVO> pageData, CheckBatchDTO dto) {
return this.baseMapper.getCheckData(pageData, dto);
}
@Override
public void saveRecord(AnalysisBatchSaveOrUpdateDTO dto) {
// 主表
AnalysisBatch analysisBatch = BeanUtil.copyProperties(dto, AnalysisBatch.class);
analysisBatch.setId(UUIDGenerator.generate());
analysisBatch.setAnalysisType(1); // 1-分析中
// 明细
List<AnalysisBatchCheckDataMap> analysisBatchCheckDataMaps = new ArrayList<>();
List<AnalysisBatchSaveOrUpdateDTO.CheckDataDTO> checkDataList = dto.getCheckDataList();
for (AnalysisBatchSaveOrUpdateDTO.CheckDataDTO checkDataDTO : checkDataList) {
AnalysisBatchCheckDataMap analysisBatchCheckDataMap = new AnalysisBatchCheckDataMap();
analysisBatchCheckDataMap.setId(UUIDGenerator.generate());
analysisBatchCheckDataMap.setAnalysisBatchId(analysisBatch.getId());
analysisBatchCheckDataMap.setAnalysisBatchCode(analysisBatch.getAnalysisBatchCode());
analysisBatchCheckDataMap.setAllowValue(analysisBatch.getAllowValue());
analysisBatchCheckDataMap.setDispatching(analysisBatch.getDispatching());
analysisBatchCheckDataMap.setEkCode(checkDataDTO.getEkCode());
analysisBatchCheckDataMap.setEkId(checkDataDTO.getEkId());
analysisBatchCheckDataMap.setStartingMileage(checkDataDTO.getStartingMileage());
analysisBatchCheckDataMap.setEndMileage(checkDataDTO.getEndMileage());
analysisBatchCheckDataMap.setCheckTime(checkDataDTO.getCheckTime());
analysisBatchCheckDataMap.setEkType(checkDataDTO.getEkType());
analysisBatchCheckDataMap.setAnalysisStatus(1);// 分析中
analysisBatchCheckDataMaps.add(analysisBatchCheckDataMap);
}
this.save(analysisBatch);
for (AnalysisBatchCheckDataMap analysisBatchCheckDataMap : analysisBatchCheckDataMaps) {
analysisBatchCheckDataMapMapper.insert(analysisBatchCheckDataMap);
}
}
@Override
public void updateRecord(AnalysisBatchSaveOrUpdateDTO dto) {
// 主表
AnalysisBatch analysisBatch = BeanUtil.copyProperties(dto, AnalysisBatch.class);
analysisBatch.setAnalysisType(1); // 1-分析中
// 明细
// 1.先删除
LambdaQueryWrapper<AnalysisBatchCheckDataMap> wrapper = Wrappers.lambdaQuery();
wrapper.eq(AnalysisBatchCheckDataMap::getAnalysisBatchId, analysisBatch.getId());
analysisBatchCheckDataMapMapper.delete(wrapper);
// 2.后新增
List<AnalysisBatchCheckDataMap> analysisBatchCheckDataMaps = new ArrayList<>();
List<AnalysisBatchSaveOrUpdateDTO.CheckDataDTO> checkDataList = dto.getCheckDataList();
for (AnalysisBatchSaveOrUpdateDTO.CheckDataDTO checkDataDTO : checkDataList) {
AnalysisBatchCheckDataMap analysisBatchCheckDataMap = new AnalysisBatchCheckDataMap();
analysisBatchCheckDataMap.setId(UUIDGenerator.generate());
analysisBatchCheckDataMap.setAnalysisBatchId(analysisBatch.getId());
analysisBatchCheckDataMap.setAnalysisBatchCode(analysisBatch.getAnalysisBatchCode());
analysisBatchCheckDataMap.setAllowValue(analysisBatch.getAllowValue());
analysisBatchCheckDataMap.setDispatching(analysisBatch.getDispatching());
analysisBatchCheckDataMap.setEkCode(checkDataDTO.getEkCode());
analysisBatchCheckDataMap.setEkId(checkDataDTO.getEkId());
analysisBatchCheckDataMap.setStartingMileage(checkDataDTO.getStartingMileage());
analysisBatchCheckDataMap.setEndMileage(checkDataDTO.getEndMileage());
analysisBatchCheckDataMap.setCheckTime(checkDataDTO.getCheckTime());
analysisBatchCheckDataMap.setEkType(checkDataDTO.getEkType());
analysisBatchCheckDataMap.setAnalysisStatus(1);// 分析中
analysisBatchCheckDataMaps.add(analysisBatchCheckDataMap);
}
this.updateById(analysisBatch);
for (AnalysisBatchCheckDataMap analysisBatchCheckDataMap : analysisBatchCheckDataMaps) {
analysisBatchCheckDataMapMapper.insert(analysisBatchCheckDataMap);
}
}
}
package org.jeecg.modules.dynamicStaticAnalysis.service.impl;
import org.jeecg.modules.dynamicStaticAnalysis.entity.DispatchingConfig;
import org.jeecg.modules.dynamicStaticAnalysis.mapper.DispatchingConfigMapper;
import org.jeecg.modules.dynamicStaticAnalysis.service.IDispatchingConfigService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
/**
* <p>
* 动静态分析-参数配置-派工配置 服务实现类
* </p>
*
* @author hkl
* @since 2023-07-25
*/
@Service
public class DispatchingConfigServiceImpl extends ServiceImpl<DispatchingConfigMapper, DispatchingConfig> implements IDispatchingConfigService {
}
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