Commit 31133260 authored by hkl's avatar hkl

feat:1.一键派工,一键失格维修按钮修复

parent e76bb9ee
package org.jeecg.config;
import org.jeecg.modules.base.mapper.CustomizedSqlInjector;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
/**
* @Description : TODO
* @Author : 黄康林
* @Date : 2023-10-11 15:13:10
* @Version : 1.0
**/
@Configuration
public class CustomMybatisPlusConfig {
@Bean
public CustomizedSqlInjector customizedSqlInjector() {
return new CustomizedSqlInjector();
}
}
package org.jeecg.config.mybatis; package org.jeecg.config.mybatisPlus;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.ibatis.binding.MapperMethod.ParamMap; import org.apache.ibatis.binding.MapperMethod.ParamMap;
......
package org.jeecg.config.mybatis; package org.jeecg.config.mybatisPlus;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
......
package org.jeecg.config.mybatis; package org.jeecg.config.mybatisPlus;
import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
......
package org.jeecg.config.mybatis.aspect; package org.jeecg.config.mybatisPlus.aspect;
import org.aspectj.lang.ProceedingJoinPoint; import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around; import org.aspectj.lang.annotation.Around;
...@@ -8,7 +8,7 @@ import org.aspectj.lang.reflect.MethodSignature; ...@@ -8,7 +8,7 @@ import org.aspectj.lang.reflect.MethodSignature;
import org.jeecg.common.aspect.annotation.DynamicTable; import org.jeecg.common.aspect.annotation.DynamicTable;
import org.jeecg.common.constant.CommonConstant; import org.jeecg.common.constant.CommonConstant;
import org.jeecg.common.util.SpringContextUtils; import org.jeecg.common.util.SpringContextUtils;
import org.jeecg.config.mybatis.ThreadLocalDataHelper; import org.jeecg.config.mybatisPlus.ThreadLocalDataHelper;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
......
package org.jeecg.config.mybatis.interceptor; package org.jeecg.config.mybatisPlus.interceptor;
import com.baomidou.dynamic.datasource.toolkit.DynamicDataSourceContextHolder; import com.baomidou.dynamic.datasource.toolkit.DynamicDataSourceContextHolder;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
......
package org.jeecg.modules.base.mapper;
import com.baomidou.mybatisplus.core.injector.AbstractMethod;
import com.baomidou.mybatisplus.core.injector.DefaultSqlInjector;
import com.baomidou.mybatisplus.core.metadata.TableInfo;
import org.jeecg.modules.base.mapper.InsertBatchMethod;
import org.jeecg.modules.base.mapper.UpdateBatchMethod;
import java.util.List;
/**
* @Description : 自定义方法SQL注入器
* @Author : 黄康林
* @Date : 2023-10-11 15:13:17
* @Version : 1.0
**/
public class CustomizedSqlInjector extends DefaultSqlInjector {
/**
* 如果只需增加方法,保留mybatis plus自带方法,
* 可以先获取super.getMethodList(),再添加add
*/
@Override
public List<AbstractMethod> getMethodList(Class<?> mapperClass, TableInfo tableInfo) {
List<AbstractMethod> methodList = super.getMethodList(mapperClass, tableInfo);
methodList.add(new InsertBatchMethod());
methodList.add(new UpdateBatchMethod());
return methodList;
}
}
package org.jeecg.modules.base.mapper;
import com.baomidou.mybatisplus.core.injector.AbstractMethod;
import com.baomidou.mybatisplus.core.metadata.TableInfo;
import org.apache.ibatis.executor.keygen.NoKeyGenerator;
import org.apache.ibatis.mapping.MappedStatement;
import org.apache.ibatis.mapping.SqlSource;
/**
* @Description : TODO
* @Author : 黄康林
* @Date : 2023-10-11 15:10:26
* @Version : 1.0
**/
public class InsertBatchMethod extends AbstractMethod {
/**
* insert into user(id, name, age) values (1, "a", 17), (2, "b", 18);
<script>
insert into user(id, name, age) values
<foreach collection="list" item="item" index="index" open="(" separator="),(" close=")">
#{item.id}, #{item.name}, #{item.age}
</foreach>
</script>
*/
@Override
public MappedStatement injectMappedStatement(Class<?> mapperClass, Class<?> modelClass, TableInfo tableInfo) {
final String sql = "<script>insert into %s %s values %s</script>";
final String fieldSql = prepareFieldSql(tableInfo);
final String valueSql = prepareValuesSql(tableInfo);
final String sqlResult = String.format(sql, tableInfo.getTableName(), fieldSql, valueSql);
SqlSource sqlSource = languageDriver.createSqlSource(configuration, sqlResult, modelClass);
// 第三个参数必须和RootMapper的自定义方法名一致
return this.addInsertMappedStatement(mapperClass, modelClass, "insertBatch", sqlSource, new NoKeyGenerator(), null, null);
}
private String prepareFieldSql(TableInfo tableInfo) {
StringBuilder fieldSql = new StringBuilder();
fieldSql.append(tableInfo.getKeyColumn()).append(",");
tableInfo.getFieldList().forEach(x -> {
fieldSql.append(x.getColumn()).append(",");
});
fieldSql.delete(fieldSql.length() - 1, fieldSql.length());
fieldSql.insert(0, "(");
fieldSql.append(")");
return fieldSql.toString();
}
private String prepareValuesSql(TableInfo tableInfo) {
final StringBuilder valueSql = new StringBuilder();
valueSql.append("<foreach collection=\"list\" item=\"item\" index=\"index\" open=\"(\" separator=\"),(\" close=\")\">");
valueSql.append("#{item.").append(tableInfo.getKeyProperty()).append("},");
tableInfo.getFieldList().forEach(x -> valueSql.append("#{item.").append(x.getProperty()).append("},"));
valueSql.delete(valueSql.length() - 1, valueSql.length());
valueSql.append("</foreach>");
return valueSql.toString();
}
}
package org.jeecg.modules.base.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import java.util.Collection;
import java.util.List;
import org.apache.ibatis.annotations.Param;
/**
* @Description : TODO
* @Author : 黄康林
* @Date : 2023-10-11 15:13:26
* @Version : 1.0
**/
public interface RootMapper<T> extends BaseMapper<T> {
/**
* 自定义批量插入
* 如果要自动填充,@Param(xx) xx参数名必须是 list/collection/array 3个的其中之一
*/
int insertBatch(@Param("list") List<T> list);
/**
* 自定义批量更新,条件为主键
* 如果要自动填充,@Param(xx) xx参数名必须是 list/collection/array 3个的其中之一
*/
int updateBatch(@Param("list") List<T> list);
}
package org.jeecg.modules.base.mapper;
import com.baomidou.mybatisplus.core.injector.AbstractMethod;
import com.baomidou.mybatisplus.core.metadata.TableInfo;
import org.apache.ibatis.mapping.MappedStatement;
import org.apache.ibatis.mapping.SqlSource;
/**
* @Description : 批量更新方法实现,条件为主键,选择性更新
* @Author : 黄康林
* @Date : 2023-10-11 15:10:05
* @Version : 1.0
**/
public class UpdateBatchMethod extends AbstractMethod {
/**
* update user set name = "a", age = 17 where id = 1;
* update user set name = "b", age = 18 where id = 2;
<script>
<foreach collection="list" item="item" separator=";">
update user
<set>
<if test="item.name != null and item.name != ''">
name = #{item.name,jdbcType=VARCHAR},
</if>
<if test="item.age != null">
age = #{item.age,jdbcType=INTEGER},
</if>
</set>
where id = #{item.id,jdbcType=INTEGER}
</foreach>
</script>
*/
@Override
public MappedStatement injectMappedStatement(Class<?> mapperClass, Class<?> modelClass, TableInfo tableInfo) {
String sql = "<script>\n<foreach collection=\"list\" item=\"item\" separator=\";\">\nupdate %s %s where %s=#{%s} %s\n</foreach>\n</script>";
String additional = tableInfo.isWithVersion() ? tableInfo.getVersionFieldInfo().getVersionOli("item", "item.") : "" + tableInfo.getLogicDeleteSql(true, true);
String setSql = sqlSet(tableInfo.isWithLogicDelete(), false, tableInfo, false, "item", "item.");
String sqlResult = String.format(sql, tableInfo.getTableName(), setSql, tableInfo.getKeyColumn(), "item." + tableInfo.getKeyProperty(), additional);
SqlSource sqlSource = languageDriver.createSqlSource(configuration, sqlResult, modelClass);
// 第三个参数必须和RootMapper的自定义方法名一致
return this.addUpdateMappedStatement(mapperClass, modelClass, "updateBatch", sqlSource);
}
}
...@@ -56,12 +56,6 @@ ...@@ -56,12 +56,6 @@
<artifactId>pinyin4j</artifactId> <artifactId>pinyin4j</artifactId>
<version>2.5.1</version> <version>2.5.1</version>
</dependency> </dependency>
<!-- 积木报表 mongo redis 支持包
<dependency>
<groupId>org.jeecgframework.jimureport</groupId>
<artifactId>jimureport-nosql-starter</artifactId>
</dependency>-->
</dependencies> </dependencies>
<profiles> <profiles>
...@@ -71,7 +65,6 @@ ...@@ -71,7 +65,6 @@
<properties> <properties>
<package.environment>dev</package.environment> <package.environment>dev</package.environment>
</properties> </properties>
</profile> </profile>
<!-- 黄康林本地配置--> <!-- 黄康林本地配置-->
......
...@@ -13,6 +13,7 @@ import org.jeecg.modules.dynamicStaticAnalysis.mapper.AnalysisAlgorithmMapper; ...@@ -13,6 +13,7 @@ import org.jeecg.modules.dynamicStaticAnalysis.mapper.AnalysisAlgorithmMapper;
import org.jeecg.modules.dynamicStaticAnalysis.service.*; import org.jeecg.modules.dynamicStaticAnalysis.service.*;
import org.jeecg.modules.dynamicStaticAnalysis.util.StrUtil; import org.jeecg.modules.dynamicStaticAnalysis.util.StrUtil;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.math.BigDecimal; import java.math.BigDecimal;
...@@ -81,10 +82,8 @@ public class AnalysisAlgorithm { ...@@ -81,10 +82,8 @@ public class AnalysisAlgorithm {
@Resource @Resource
private IMovementAdditiveInfoUnitDeviceMapService movementAdditiveInfoUnitDeviceMapService; private IMovementAdditiveInfoUnitDeviceMapService movementAdditiveInfoUnitDeviceMapService;
public AnalysisAlgorithm() {
}
@Transactional
public void analysis(String analysisBatchId) { public void analysis(String analysisBatchId) {
Map<String, Map<String, Object>> unitDeviceTable = new LinkedHashMap<>(); Map<String, Map<String, Object>> unitDeviceTable = new LinkedHashMap<>();
...@@ -375,7 +374,6 @@ public class AnalysisAlgorithm { ...@@ -375,7 +374,6 @@ public class AnalysisAlgorithm {
} }
} }
} }
analysisBatchUnitDeviceTqiScoreService.saveBatch(tqiScoreList); analysisBatchUnitDeviceTqiScoreService.saveBatch(tqiScoreList);
analysisBatchUnitDeviceService.saveBatch(analysisBatchUnitDevices); analysisBatchUnitDeviceService.saveBatch(analysisBatchUnitDevices);
...@@ -566,7 +564,7 @@ public class AnalysisAlgorithm { ...@@ -566,7 +564,7 @@ public class AnalysisAlgorithm {
zontalSpeedTransfinite.setEkType(4); zontalSpeedTransfinite.setEkType(4);
zontalSpeedTransfinite.setEkItemId(additiveInfo.getId()); zontalSpeedTransfinite.setEkItemId(additiveInfo.getId());
zontalSpeedTransfinite.setMeasurePointValue(additiveInfo.getVerticalSpeed().toString()); zontalSpeedTransfinite.setMeasurePointValue(additiveInfo.getVerticalSpeed().toString());
zontalSpeedTransfinite.setDiseaseMileage(additiveInfo.getPointMileage());
addInstrumentTransfiniteList.add(zontalSpeedTransfinite); addInstrumentTransfiniteList.add(zontalSpeedTransfinite);
} }
...@@ -595,6 +593,7 @@ public class AnalysisAlgorithm { ...@@ -595,6 +593,7 @@ public class AnalysisAlgorithm {
verticalSpeedTransfinite.setEkType(4); verticalSpeedTransfinite.setEkType(4);
verticalSpeedTransfinite.setEkItemId(additiveInfo.getId()); verticalSpeedTransfinite.setEkItemId(additiveInfo.getId());
verticalSpeedTransfinite.setMeasurePointValue(additiveInfo.getVerticalSpeed().toString()); verticalSpeedTransfinite.setMeasurePointValue(additiveInfo.getVerticalSpeed().toString());
verticalSpeedTransfinite.setDiseaseMileage(additiveInfo.getPointMileage());
addInstrumentTransfiniteList.add(verticalSpeedTransfinite); addInstrumentTransfiniteList.add(verticalSpeedTransfinite);
} }
...@@ -758,7 +757,7 @@ public class AnalysisAlgorithm { ...@@ -758,7 +757,7 @@ public class AnalysisAlgorithm {
// 说明超限 // 说明超限
if (startMileage.compareTo(movementOverReport.getMileage()) <= 0 && endMileage.compareTo(movementOverReport.getMileage()) > 0) { if (startMileage.compareTo(movementOverReport.getMileage()) <= 0 && endMileage.compareTo(movementOverReport.getMileage()) > 0) {
// 轨检车超限等级 // 轨检车超限等级
AnalysisBatchUnitDeviceTransfinite transfinite = this.createRailVehicleCheckTransfinite(dispatchingList, movementOverReport); AnalysisBatchUnitDeviceTransfinite transfinite = this.railVehicleCheckTransfinite(dispatchingList, movementOverReport);
if (ObjectUtil.isNotEmpty(transfinite)) { if (ObjectUtil.isNotEmpty(transfinite)) {
railVehicleTransfiniteList.add(transfinite); railVehicleTransfiniteList.add(transfinite);
} }
...@@ -1151,7 +1150,7 @@ public class AnalysisAlgorithm { ...@@ -1151,7 +1150,7 @@ public class AnalysisAlgorithm {
* @param movementOverReport * @param movementOverReport
* @return * @return
*/ */
private AnalysisBatchUnitDeviceTransfinite createRailVehicleCheckTransfinite(JSONArray dispatchingList, MovementOverReport movementOverReport) { private AnalysisBatchUnitDeviceTransfinite railVehicleCheckTransfinite(JSONArray dispatchingList, MovementOverReport movementOverReport) {
boolean isDisplay = false; boolean isDisplay = false;
int isWork = 1; int isWork = 1;
...@@ -1190,6 +1189,7 @@ public class AnalysisAlgorithm { ...@@ -1190,6 +1189,7 @@ public class AnalysisAlgorithm {
transfinite.setEkItemId(movementOverReport.getId()); transfinite.setEkItemId(movementOverReport.getId());
transfinite.setMeasurePointValue(movementOverReport.getPeakValue()); transfinite.setMeasurePointValue(movementOverReport.getPeakValue());
transfinite.setIsWork(isWork); transfinite.setIsWork(isWork);
transfinite.setDiseaseMileage(movementOverReport.getMileage());
transfinite.setTransfiniteGradeName(reasonLabel); transfinite.setTransfiniteGradeName(reasonLabel);
...@@ -1232,7 +1232,6 @@ public class AnalysisAlgorithm { ...@@ -1232,7 +1232,6 @@ public class AnalysisAlgorithm {
for (Map<String, Object> unitDevice : unitDeviceList) { for (Map<String, Object> unitDevice : unitDeviceList) {
BigDecimal centerMileage = Convert.toBigDecimal(unitDevice.get("centerMileage")); BigDecimal centerMileage = Convert.toBigDecimal(unitDevice.get("centerMileage"));
// System.out.println("单元设备code:" + unitDevice.get("unitCode") + "单元中心里程:" + centerMileage);
// 2.1 循环遍历检查项目比较【开始-结束】来映射关联关系 // 2.1 循环遍历检查项目比较【开始-结束】来映射关联关系
for (RailInspectionEquipmentItem checkItem : checkItemList) { for (RailInspectionEquipmentItem checkItem : checkItemList) {
BigDecimal checkItemStartingMileage = checkItem.getCourseStartingMileage(); BigDecimal checkItemStartingMileage = checkItem.getCourseStartingMileage();
...@@ -1565,6 +1564,9 @@ public class AnalysisAlgorithm { ...@@ -1565,6 +1564,9 @@ public class AnalysisAlgorithm {
} }
} }
// 轨仪器的病害里程:这个格子的(起点里程 + 终点里程)/2
BigDecimal diseaseMileage = movementCourseInfo.getCurrentStartMileage().add(movementCourseInfo.getCurrentEndEndMileage()).divide(new BigDecimal("2"), 3, BigDecimal.ROUND_HALF_UP);
// 超限 // 超限
if (isTransfinite) { if (isTransfinite) {
...@@ -1579,6 +1581,7 @@ public class AnalysisAlgorithm { ...@@ -1579,6 +1581,7 @@ public class AnalysisAlgorithm {
record.setEkItemId(movementCourseInfo.getRailInspectionEquipmentItemId()); record.setEkItemId(movementCourseInfo.getRailInspectionEquipmentItemId());
record.setMeasurePointValue(measurePointValue); record.setMeasurePointValue(measurePointValue);
record.setIsWork(isWork); record.setIsWork(isWork);
record.setDiseaseMileage(diseaseMileage);
return record; return record;
} else { } else {
return null; return null;
...@@ -1694,7 +1697,6 @@ public class AnalysisAlgorithm { ...@@ -1694,7 +1697,6 @@ public class AnalysisAlgorithm {
movementCheckDataUnitDeviceMapService.lambdaUpdate().eq(MovementCheckDataUnitDeviceMap::getCheckId, checkDataMap.getEkId()).remove(); movementCheckDataUnitDeviceMapService.lambdaUpdate().eq(MovementCheckDataUnitDeviceMap::getCheckId, checkDataMap.getEkId()).remove();
movementCheckDataUnitDeviceMapService.saveBatch(movementCheckDataUnitDeviceMaps); movementCheckDataUnitDeviceMapService.saveBatch(movementCheckDataUnitDeviceMaps);
} }
} }
/** /**
...@@ -2095,6 +2097,10 @@ public class AnalysisAlgorithm { ...@@ -2095,6 +2097,10 @@ public class AnalysisAlgorithm {
} }
} }
// 人工的病害里程:这个格子的(起点里程 + 终点里程)/2
BigDecimal diseaseMileage = movementCourseInfo.getCurrentStartMileage().add(movementCourseInfo.getCurrentEndEndMileage()).divide(new BigDecimal("2"), 3, BigDecimal.ROUND_HALF_UP);
// 超限 // 超限
if (isTransfinite) { if (isTransfinite) {
AnalysisBatchUnitDeviceTransfinite record = new AnalysisBatchUnitDeviceTransfinite(); AnalysisBatchUnitDeviceTransfinite record = new AnalysisBatchUnitDeviceTransfinite();
...@@ -2108,6 +2114,7 @@ public class AnalysisAlgorithm { ...@@ -2108,6 +2114,7 @@ public class AnalysisAlgorithm {
record.setEkItemId(movementCourseInfo.getMovementCourseId()); record.setEkItemId(movementCourseInfo.getMovementCourseId());
record.setMeasurePointValue(measurePointValue); record.setMeasurePointValue(measurePointValue);
record.setIsWork(isWork); record.setIsWork(isWork);
record.setDiseaseMileage(diseaseMileage);
return record; return record;
} else { } else {
return null; return null;
......
...@@ -35,7 +35,7 @@ public class AnalysisBatchUnitDeviceDTO { ...@@ -35,7 +35,7 @@ public class AnalysisBatchUnitDeviceDTO {
@ApiModelProperty("设备单元结束里程") @ApiModelProperty("设备单元结束里程")
private BigDecimal unitEndMileage; private BigDecimal unitEndMileage;
@ApiModelProperty("是否超限") @ApiModelProperty("是否超限 0-不超限 1-超限")
private Integer isTransfinite; private Integer isTransfinite;
@ApiModelProperty("单元编号") @ApiModelProperty("单元编号")
...@@ -44,15 +44,12 @@ public class AnalysisBatchUnitDeviceDTO { ...@@ -44,15 +44,12 @@ public class AnalysisBatchUnitDeviceDTO {
@ApiModelProperty("设备编号") @ApiModelProperty("设备编号")
private String unitDeviceCode; private String unitDeviceCode;
@ApiModelProperty("派工状态") @ApiModelProperty("派工状态 0-未派工 1-已派工")
private Integer workStatus; private Integer workStatus;
@ApiModelProperty("得分平级") @ApiModelProperty("得分平级 0-无 1-优良 2-合格 3-失格")
private List<String> gradeJudgeList; private List<String> gradeJudgeList;
@ApiModelProperty("派工状态 0-未派工 1-已派工")
private List<Integer> isWordList;
@ApiModelProperty("设备单元类型1-钢轨 2-曲线 3-竖曲线 4-道岔") @ApiModelProperty("设备单元类型1-钢轨 2-曲线 3-竖曲线 4-道岔")
private List<Integer> unitTypeList; private List<Integer> unitTypeList;
} }
...@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.annotation.TableId; ...@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
...@@ -112,6 +113,10 @@ public class AnalysisBatchUnitDeviceTransfinite implements Serializable { ...@@ -112,6 +113,10 @@ public class AnalysisBatchUnitDeviceTransfinite implements Serializable {
@TableField("is_work") @TableField("is_work")
private Integer isWork; private Integer isWork;
@ApiModelProperty("病害里程")
@TableField("disease_mileage")
private BigDecimal diseaseMileage;
@ApiModelProperty("备注") @ApiModelProperty("备注")
@TableField("remark") @TableField("remark")
private String remark; private String remark;
......
package org.jeecg.modules.dynamicStaticAnalysis.mapper; package org.jeecg.modules.dynamicStaticAnalysis.mapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.base.mapper.RootMapper;
import org.jeecg.modules.dynamicStaticAnalysis.dto.AnalysisBatchUnitDeviceDTO; import org.jeecg.modules.dynamicStaticAnalysis.dto.AnalysisBatchUnitDeviceDTO;
import org.jeecg.modules.dynamicStaticAnalysis.entity.AnalysisBatchUnitDevice; import org.jeecg.modules.dynamicStaticAnalysis.entity.AnalysisBatchUnitDevice;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
...@@ -22,7 +24,9 @@ import java.util.List; ...@@ -22,7 +24,9 @@ import java.util.List;
*/ */
public interface AnalysisBatchUnitDeviceMapper extends BaseMapper<AnalysisBatchUnitDevice> { public interface AnalysisBatchUnitDeviceMapper extends BaseMapper<AnalysisBatchUnitDevice> {
Page<AnalysisBatchUnitDeviceVO> listRecord(Page<AnalysisBatchUnitDeviceVO> pageData, AnalysisBatchUnitDeviceDTO dto); Page<AnalysisBatchUnitDeviceVO> pageRecord(Page<AnalysisBatchUnitDeviceVO> pageData, @Param("dto") AnalysisBatchUnitDeviceDTO dto);
List<AnalysisBatchUnitDeviceVO> listRecord(@Param("dto") AnalysisBatchUnitDeviceDTO dto);
List<StaticCheckVO> getUnitDeviceStaticData(String id); List<StaticCheckVO> getUnitDeviceStaticData(String id);
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!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.AnalysisBatchUnitDeviceMapper"> <mapper namespace="org.jeecg.modules.dynamicStaticAnalysis.mapper.AnalysisBatchUnitDeviceMapper">
<select id="listRecord" resultType="org.jeecg.modules.dynamicStaticAnalysis.vo.AnalysisBatchUnitDeviceVO"> <select id="pageRecord" resultType="org.jeecg.modules.dynamicStaticAnalysis.vo.AnalysisBatchUnitDeviceVO">
SELECT * FROM SELECT * FROM
( (
SELECT SELECT
...@@ -35,12 +35,6 @@ ...@@ -35,12 +35,6 @@
) analysis ) analysis
WHERE WHERE
1 =1 1 =1
<if test="dto.isWordList!=null and dto.isWordList.size()>0">
AND analysis.is_work in
<foreach collection="dto.isWordList" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="dto.unitTypeList!=null and dto.unitTypeList.size()>0"> <if test="dto.unitTypeList!=null and dto.unitTypeList.size()>0">
AND analysis.unit_type in AND analysis.unit_type in
<foreach collection="dto.unitTypeList" index="index" item="item" open="(" separator="," close=")"> <foreach collection="dto.unitTypeList" index="index" item="item" open="(" separator="," close=")">
...@@ -53,9 +47,8 @@ ...@@ -53,9 +47,8 @@
#{item} #{item}
</foreach> </foreach>
</if> </if>
<if test="dto.isTransfinite != null"> <if test="dto.isTransfinite != null">
AND analysis.is_transfinite > 0 AND analysis.is_transfinite = #{dto.isTransfinite}
</if> </if>
<if test="dto.unitStartingMileage != null"> <if test="dto.unitStartingMileage != null">
AND analysis.unit_starting_mileage >= #{dto.unitStartingMileage } AND analysis.unit_starting_mileage >= #{dto.unitStartingMileage }
...@@ -220,4 +213,72 @@ ...@@ -220,4 +213,72 @@
ORDER BY t3.ek_code ASC ORDER BY t3.ek_code ASC
</select> </select>
<select id="listRecord" resultType="org.jeecg.modules.dynamicStaticAnalysis.vo.AnalysisBatchUnitDeviceVO">
SELECT * FROM
(
SELECT
t1.id,
t1.create_by,
t1.create_time,
t1.update_by,
t1.update_time,
t1.analysis_batch_code,
t1.analysis_batch_id,
t1.unit_id,
t1.unit_code,
t1.unit_device_code,
t1.unit_type,
t1.unit_type_name,
t1.unit_start_mileage unit_starting_mileage,
t1.unit_center_mileage,
t1.unit_end_mileage,
t1.unit_score,
t1.unit_score_level,
t1.unit_score_level_str,
t1.remark,
( SELECT IF(COUNT( 1 )>0,1,0) FROM t_dsa_analysis_batch_unit_device_transfinite WHERE analysis_batch_unit_device_id = t1.id AND is_work = 1 ) AS is_work,
( SELECT IF(COUNT( 1 )>0,1,0) FROM t_dsa_analysis_batch_unit_device_transfinite WHERE analysis_batch_unit_device_id = t1.id ) AS is_transfinite,
( SELECT IF(COUNT( 1 )>0,1,0) FROM t_mw_work_batch_detail WHERE analysis_batch_unit_device_id = t1.id LIMIT 1 ) AS work_status
FROM
t_dsa_analysis_batch_unit_device t1
WHERE
t1.analysis_batch_id = #{dto.analysisBatchId}
) analysis
WHERE
1 =1
<if test="dto.unitTypeList!=null and dto.unitTypeList.size()>0">
AND analysis.unit_type in
<foreach collection="dto.unitTypeList" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="dto.gradeJudgeList!=null and dto.gradeJudgeList.size()>0">
AND analysis.unit_score_level in
<foreach collection="dto.gradeJudgeList" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="dto.isTransfinite != null">
AND analysis.is_transfinite = #{dto.isTransfinite}
</if>
<if test="dto.unitStartingMileage != null">
AND analysis.unit_starting_mileage >= #{dto.unitStartingMileage }
</if>
<if test="dto.unitEndMileage != null">
AND analysis.unit_end_mileage <![CDATA[ <= ]]> #{dto.unitEndMileage}
</if>
<if test="dto.unitCode != null and dto.unitCode != ''">
AND analysis.unit_code like concat('%',#{dto.unitCode},'%')
</if>
<if test="dto.unitDeviceCode != null and dto.unitDeviceCode != ''">
AND analysis.unit_device_code like concat('%',#{dto.unitDeviceCode},'%')
</if>
<if test="dto.unitDeviceCode != null and dto.unitDeviceCode != ''">
AND analysis.unit_device_code like concat('%',#{dto.unitDeviceCode},'%')
</if>
<if test="dto.workStatus != null ">
AND analysis.work_status = #{dto.workStatus}
</if>
order by unit_starting_mileage
</select>
</mapper> </mapper>
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
t1.allow_value, t1.allow_value,
t1.measure_point_value, t1.measure_point_value,
t1.is_work, t1.is_work,
t1.disease_mileage,
t1.remark t1.remark
FROM FROM
t_dsa_analysis_batch_unit_device_transfinite t1 t_dsa_analysis_batch_unit_device_transfinite t1
...@@ -49,6 +50,7 @@ ...@@ -49,6 +50,7 @@
t1.allow_value, t1.allow_value,
t1.measure_point_value, t1.measure_point_value,
t1.is_work, t1.is_work,
t1.disease_mileage,
t1.remark t1.remark
FROM FROM
t_dsa_analysis_batch_unit_device_transfinite t1 t_dsa_analysis_batch_unit_device_transfinite t1
......
...@@ -8,7 +8,6 @@ import org.jeecg.modules.dynamicStaticAnalysis.mapper.AnalysisBatchUnitDeviceMap ...@@ -8,7 +8,6 @@ import org.jeecg.modules.dynamicStaticAnalysis.mapper.AnalysisBatchUnitDeviceMap
import org.jeecg.modules.dynamicStaticAnalysis.mapper.AnalysisBatchUnitDeviceTransfiniteMapper; import org.jeecg.modules.dynamicStaticAnalysis.mapper.AnalysisBatchUnitDeviceTransfiniteMapper;
import org.jeecg.modules.dynamicStaticAnalysis.service.IAnalysisBatchUnitDeviceService; import org.jeecg.modules.dynamicStaticAnalysis.service.IAnalysisBatchUnitDeviceService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.modules.dynamicStaticAnalysis.vo.AnalysisBatchQueryVO;
import org.jeecg.modules.dynamicStaticAnalysis.vo.AnalysisBatchUnitDeviceTransfiniteVO; import org.jeecg.modules.dynamicStaticAnalysis.vo.AnalysisBatchUnitDeviceTransfiniteVO;
import org.jeecg.modules.dynamicStaticAnalysis.vo.AnalysisBatchUnitDeviceVO; import org.jeecg.modules.dynamicStaticAnalysis.vo.AnalysisBatchUnitDeviceVO;
import org.jeecg.modules.unitDevice.vo.RailAddInstrumentCheckVO; import org.jeecg.modules.unitDevice.vo.RailAddInstrumentCheckVO;
...@@ -40,7 +39,7 @@ public class AnalysisBatchUnitDeviceServiceImpl extends ServiceImpl<AnalysisBatc ...@@ -40,7 +39,7 @@ public class AnalysisBatchUnitDeviceServiceImpl extends ServiceImpl<AnalysisBatc
@Override @Override
public Page<AnalysisBatchUnitDeviceVO> listRecord(Page<AnalysisBatchUnitDeviceVO> pageData, AnalysisBatchUnitDeviceDTO dto) { public Page<AnalysisBatchUnitDeviceVO> listRecord(Page<AnalysisBatchUnitDeviceVO> pageData, AnalysisBatchUnitDeviceDTO dto) {
Page<AnalysisBatchUnitDeviceVO> page = this.baseMapper.listRecord(pageData, dto); Page<AnalysisBatchUnitDeviceVO> page = this.baseMapper.pageRecord(pageData, dto);
if (ObjectUtil.isNotEmpty(page.getRecords())) { if (ObjectUtil.isNotEmpty(page.getRecords())) {
List<String> analysisBatchUnitDeviceIds = page.getRecords().stream().map(AnalysisBatchUnitDeviceVO::getId).collect(Collectors.toList()); List<String> analysisBatchUnitDeviceIds = page.getRecords().stream().map(AnalysisBatchUnitDeviceVO::getId).collect(Collectors.toList());
......
...@@ -6,6 +6,7 @@ import io.swagger.annotations.ApiModel; ...@@ -6,6 +6,7 @@ import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
/** /**
...@@ -45,6 +46,9 @@ public class AnalysisBatchUnitDeviceTransfiniteVO { ...@@ -45,6 +46,9 @@ public class AnalysisBatchUnitDeviceTransfiniteVO {
@ApiModelProperty("是否派工 0-否 1-是") @ApiModelProperty("是否派工 0-否 1-是")
private Integer isWork; private Integer isWork;
@ApiModelProperty("病害里程")
private BigDecimal diseaseMileage;
@ApiModelProperty("备注") @ApiModelProperty("备注")
private String remark; private String remark;
} }
...@@ -114,7 +114,11 @@ public class WorkBatchController extends JeecgController<WorkBatch, IWorkBatchSe ...@@ -114,7 +114,11 @@ public class WorkBatchController extends JeecgController<WorkBatch, IWorkBatchSe
@ApiOperation(value = "维修作业管理-作业计划批次管理-通过id删除", notes = "维修作业管理-作业计划批次管理-通过id删除") @ApiOperation(value = "维修作业管理-作业计划批次管理-通过id删除", notes = "维修作业管理-作业计划批次管理-通过id删除")
@GetMapping(value = "/deleteRecord") @GetMapping(value = "/deleteRecord")
public Result<String> deleteRecord(@RequestParam(name = "id", required = true) String id) { public Result<String> deleteRecord(@RequestParam(name = "id", required = true) String id) {
this.service.deleteRecord(id); this.service.deleteRecord(id);
return Result.OK("删除成功!"); return Result.OK("删除成功!");
} }
......
...@@ -6,6 +6,7 @@ import lombok.Data; ...@@ -6,6 +6,7 @@ import lombok.Data;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
import java.util.List;
/** /**
* <p> * <p>
...@@ -62,8 +63,33 @@ public class AnalysisBatchSaveDTO { ...@@ -62,8 +63,33 @@ public class AnalysisBatchSaveDTO {
@ApiModelProperty("分析批次id") @ApiModelProperty("分析批次id")
private String analysisBatchId; private String analysisBatchId;
@ApiModelProperty("查询条件")
private Form form;
@Data @Data
public static class form { public static class Form {
@ApiModelProperty("设备单元起始里程")
private BigDecimal unitStartingMileage;
@ApiModelProperty("设备单元结束里程")
private BigDecimal unitEndMileage;
@ApiModelProperty("是否超限")
private Integer isTransfinite;
@ApiModelProperty("单元编号")
private String unitCode;
@ApiModelProperty("设备编号")
private String unitDeviceCode;
@ApiModelProperty("派工状态 0-未派工 1-已派工")
private Integer workStatus;
@ApiModelProperty("得分平级")
private List<String> gradeJudgeList;
@ApiModelProperty("设备单元类型1-钢轨 2-曲线 3-竖曲线 4-道岔")
private List<Integer> unitTypeList;
} }
} }
...@@ -15,7 +15,7 @@ import java.math.BigDecimal; ...@@ -15,7 +15,7 @@ import java.math.BigDecimal;
* @since 2023-08-09 * @since 2023-08-09
*/ */
@Data @Data
@ApiModel(value = "TransfiniteDTO对象", description = "维修作业管理-超限") @ApiModel(value = "DispatchDTO对象", description = "维修作业管理-超限")
public class DispatchDTO { public class DispatchDTO {
@ApiModelProperty("分析批次单元设备id") @ApiModelProperty("分析批次单元设备id")
...@@ -37,7 +37,7 @@ public class DispatchDTO { ...@@ -37,7 +37,7 @@ public class DispatchDTO {
private String unitDeviceCode; private String unitDeviceCode;
@ApiModelProperty("设备单元起始里程") @ApiModelProperty("设备单元起始里程")
private BigDecimal unitStartMileage; private BigDecimal unitStartingMileage;
@ApiModelProperty("设备单元中心里程") @ApiModelProperty("设备单元中心里程")
private BigDecimal unitCenterMileage; private BigDecimal unitCenterMileage;
......
...@@ -109,10 +109,6 @@ public class WorkBatchDetail implements Serializable { ...@@ -109,10 +109,6 @@ public class WorkBatchDetail implements Serializable {
@TableField("work_status") @TableField("work_status")
private Integer workStatus; private Integer workStatus;
@ApiModelProperty("病害里程")
@TableField("disease_mileage")
private BigDecimal diseaseMileage;
@ApiModelProperty("整改备注") @ApiModelProperty("整改备注")
@TableField("reform_remark") @TableField("reform_remark")
private String reformRemark; private String reformRemark;
......
package org.jeecg.modules.maintenanceWork.mapper; package org.jeecg.modules.maintenanceWork.mapper;
import org.jeecg.modules.base.mapper.RootMapper;
import org.jeecg.modules.maintenanceWork.entity.WorkBatchDetail; import org.jeecg.modules.maintenanceWork.entity.WorkBatchDetail;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.jeecg.modules.maintenanceWork.vo.WorkBatchDetailVO; import org.jeecg.modules.maintenanceWork.vo.WorkBatchDetailVO;
...@@ -16,9 +17,10 @@ import java.util.List; ...@@ -16,9 +17,10 @@ import java.util.List;
* @author hkl * @author hkl
* @since 2023-08-09 * @since 2023-08-09
*/ */
public interface WorkBatchDetailMapper extends BaseMapper<WorkBatchDetail> { public interface WorkBatchDetailMapper extends RootMapper<WorkBatchDetail> {
List<WorkBatchDetailVO> queryListByWorkBatchId(String workBatchId); List<WorkBatchDetailVO> queryListByWorkBatchId(String workBatchId);
List<CaseReportWorkBatchDetailVO> caseReportWorkBatchDetail(CaseReportWorkBatchDetailDTO dto);
List<WorkBatchDetailVO> queryListByWorkBatchIds(List<String> workBatchIds);
} }
...@@ -22,4 +22,29 @@ ...@@ -22,4 +22,29 @@
FROM t_mw_work_batch_detail t1 FROM t_mw_work_batch_detail t1
WHERE t1.work_batch_id = #{workBatchId} WHERE t1.work_batch_id = #{workBatchId}
</select> </select>
<select id="queryListByWorkBatchIds" resultType="org.jeecg.modules.maintenanceWork.vo.WorkBatchDetailVO">
SELECT t1.id,
t1.work_batch_id,
t1.work_batch_code,
t1.analysis_batch_unit_device_id,
t1.unit_id,
t1.unit_code,
t1.unit_type,
t1.unit_type_name,
t1.unit_device_code,
t1.unit_start_mileage,
t1.unit_center_mileage,
t1.unit_end_mileage,
t1.unit_score_level,
t1.unit_score_level_str,
t1.unit_score,
t1.remark
FROM t_mw_work_batch_detail t1
WHERE t1.work_batch_id in
<if test="workBatchIds !=null and workBatchIds.size()>0">
<foreach collection="workBatchIds" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
</select>
</mapper> </mapper>
package org.jeecg.modules.maintenanceWork.service.impl; package org.jeecg.modules.maintenanceWork.service.impl;
import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.convert.Convert;
import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.common.exception.JeecgBootException;
import org.jeecg.common.util.UUIDGenerator; import org.jeecg.common.util.UUIDGenerator;
import org.jeecg.modules.dynamicStaticAnalysis.dto.AnalysisBatchUnitDeviceDTO;
import org.jeecg.modules.dynamicStaticAnalysis.entity.AnalysisBatchUnitDevice; import org.jeecg.modules.dynamicStaticAnalysis.entity.AnalysisBatchUnitDevice;
import org.jeecg.modules.dynamicStaticAnalysis.mapper.AnalysisBatchUnitDeviceMapper; import org.jeecg.modules.dynamicStaticAnalysis.mapper.AnalysisBatchUnitDeviceMapper;
import org.jeecg.modules.dynamicStaticAnalysis.mapper.AnalysisBatchUnitDeviceTransfiniteMapper; import org.jeecg.modules.dynamicStaticAnalysis.mapper.AnalysisBatchUnitDeviceTransfiniteMapper;
import org.jeecg.modules.dynamicStaticAnalysis.vo.AnalysisBatchUnitDeviceTransfiniteVO;
import org.jeecg.modules.dynamicStaticAnalysis.vo.AnalysisBatchUnitDeviceVO;
import org.jeecg.modules.homePage.vo.ToDoDetailVO; import org.jeecg.modules.homePage.vo.ToDoDetailVO;
import org.jeecg.modules.maintenanceWork.dto.*; import org.jeecg.modules.maintenanceWork.dto.*;
import org.jeecg.modules.maintenanceWork.entity.WorkBatch; import org.jeecg.modules.maintenanceWork.entity.WorkBatch;
import org.jeecg.modules.maintenanceWork.entity.WorkBatchDetail; import org.jeecg.modules.maintenanceWork.entity.WorkBatchDetail;
import org.jeecg.modules.maintenanceWork.entity.WorkBatchDetailModify;
import org.jeecg.modules.maintenanceWork.mapper.WorkBatchDetailMapper; import org.jeecg.modules.maintenanceWork.mapper.WorkBatchDetailMapper;
import org.jeecg.modules.maintenanceWork.mapper.WorkBatchDetailModifyMapper;
import org.jeecg.modules.maintenanceWork.mapper.WorkBatchMapper; import org.jeecg.modules.maintenanceWork.mapper.WorkBatchMapper;
import org.jeecg.modules.maintenanceWork.service.IWorkBatchService; import org.jeecg.modules.maintenanceWork.service.IWorkBatchService;
import org.jeecg.modules.maintenanceWork.vo.WorkBatchDetailVO; import org.jeecg.modules.maintenanceWork.vo.WorkBatchDetailVO;
...@@ -22,10 +29,14 @@ import org.jeecg.modules.maintenanceWork.vo.WorkBatchVO; ...@@ -22,10 +29,14 @@ import org.jeecg.modules.maintenanceWork.vo.WorkBatchVO;
import org.jeecg.modules.unitDevice.dto.CaseReportWorkBatchDTO; import org.jeecg.modules.unitDevice.dto.CaseReportWorkBatchDTO;
import org.jeecg.modules.unitDevice.vo.CaseReportWorkBatchVO; import org.jeecg.modules.unitDevice.vo.CaseReportWorkBatchVO;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.stream.Collectors;
/** /**
* <p> * <p>
...@@ -40,30 +51,52 @@ public class WorkBatchServiceImpl extends ServiceImpl<WorkBatchMapper, WorkBatch ...@@ -40,30 +51,52 @@ public class WorkBatchServiceImpl extends ServiceImpl<WorkBatchMapper, WorkBatch
@Resource @Resource
private WorkBatchDetailMapper workBatchDetailMapper; private WorkBatchDetailMapper workBatchDetailMapper;
@Resource
private WorkBatchDetailModifyMapper workBatchDetailModifyMapper;
@Resource @Resource
private AnalysisBatchUnitDeviceMapper analysisBatchUnitDeviceMapper; private AnalysisBatchUnitDeviceMapper analysisBatchUnitDeviceMapper;
@Resource @Resource
private AnalysisBatchUnitDeviceTransfiniteMapper transfiniteMapper; private AnalysisBatchUnitDeviceTransfiniteMapper transfiniteMapper;
@Override @Override
public Page<WorkBatchVO> listRecord(Page<WorkBatchVO> pageData, WorkBatchDTO dto) { public Page<WorkBatchVO> listRecord(Page<WorkBatchVO> pageData, WorkBatchDTO dto) {
Page<WorkBatchVO> pageRecords = this.baseMapper.listRecord(pageData, dto); Page<WorkBatchVO> page = this.baseMapper.listRecord(pageData, dto);
// 作业批次明细,一次性讲当前列表的作业批次相关的详情查询出来通过筛选在重新组装数据
if (ObjectUtil.isNotEmpty(page.getRecords())) {
List<String> workBatchIds = page.getRecords().stream().map(WorkBatchVO::getId).collect(Collectors.toList());
List<WorkBatchDetailVO> workBatchDetailAllList = workBatchDetailMapper.queryListByWorkBatchIds(workBatchIds);
Map<String, List<WorkBatchDetailVO>> workBatchDetailMap = workBatchDetailAllList.stream().collect(Collectors.groupingBy(WorkBatchDetailVO::getWorkBatchId, LinkedHashMap::new, Collectors.toList()));
page.getRecords().forEach(record -> {
List<WorkBatchDetailVO> workBatchDetailList = workBatchDetailMap.get(record.getId());
workBatchDetailList = workBatchDetailList == null ? new ArrayList<>() : workBatchDetailList;
record.setDetailList(workBatchDetailList);
});
for (WorkBatchVO record : pageRecords.getRecords()) {
List<WorkBatchDetailVO> detailList = workBatchDetailMapper.queryListByWorkBatchId(record.getId());
// for (WorkBatchDetailVO workBatchDetailVO : detailList) {
// List<AnalysisBatchUnitDeviceTransfiniteVO> transfiniteList = transfiniteMapper.getTransfiniteList(record.getId());
// workBatchDetailVO.setTransfiniteList(transfiniteList);
// }
record.setDetailList(detailList);
}
return pageRecords; // 作业批次明细-超限列表
List<String> analysisBatchUnitDeviceIds = workBatchDetailAllList.stream().filter(obj -> obj.getAnalysisBatchUnitDeviceId() != null).map(WorkBatchDetailVO::getAnalysisBatchUnitDeviceId).collect(Collectors.toList());
if (ObjectUtil.isNotEmpty(analysisBatchUnitDeviceIds)) {
List<AnalysisBatchUnitDeviceTransfiniteVO> transfiniteListAll = transfiniteMapper.getTransfiniteListByIds(analysisBatchUnitDeviceIds);
Map<String, List<AnalysisBatchUnitDeviceTransfiniteVO>> map = transfiniteListAll.stream().collect(Collectors.groupingBy(AnalysisBatchUnitDeviceTransfiniteVO::getAnalysisBatchUnitDeviceId, LinkedHashMap::new, Collectors.toList()));
workBatchDetailAllList.forEach(record -> {
List<AnalysisBatchUnitDeviceTransfiniteVO> transfiniteList = map.get(record.getAnalysisBatchUnitDeviceId());
transfiniteList = transfiniteList == null ? new ArrayList<>() : transfiniteList;
record.setTransfiniteList(transfiniteList);
});
}
}
return page;
} }
@Override @Override
@Transactional
public void saveRecord(WorkBatchSaveOrUpdateDTO dto) { public void saveRecord(WorkBatchSaveOrUpdateDTO dto) {
// 保存主信息 // 保存主信息
WorkBatch workBatch = BeanUtil.copyProperties(dto, WorkBatch.class); WorkBatch workBatch = BeanUtil.copyProperties(dto, WorkBatch.class);
...@@ -103,16 +136,21 @@ public class WorkBatchServiceImpl extends ServiceImpl<WorkBatchMapper, WorkBatch ...@@ -103,16 +136,21 @@ public class WorkBatchServiceImpl extends ServiceImpl<WorkBatchMapper, WorkBatch
} }
@Override @Override
@Transactional
public void deleteRecord(String workBatchId) { public void deleteRecord(String workBatchId) {
this.removeById(workBatchId); LambdaQueryWrapper<WorkBatchDetailModify> delModifyWrapper = Wrappers.lambdaQuery();
delModifyWrapper.eq(WorkBatchDetailModify::getWorkBatchId, workBatchId);
workBatchDetailModifyMapper.delete(delModifyWrapper);
LambdaQueryWrapper<WorkBatchDetail> delWrapper = Wrappers.lambdaQuery(); LambdaQueryWrapper<WorkBatchDetail> delWrapper = Wrappers.lambdaQuery();
delWrapper.eq(WorkBatchDetail::getWorkBatchId, workBatchId); delWrapper.eq(WorkBatchDetail::getWorkBatchId, workBatchId);
workBatchDetailMapper.delete(delWrapper); workBatchDetailMapper.delete(delWrapper);
this.removeById(workBatchId);
} }
@Override @Override
@Transactional
public void transfiniteSaveRecord(WorkBatchTransfiniteSaveDTO dto) { public void transfiniteSaveRecord(WorkBatchTransfiniteSaveDTO dto) {
WorkBatch workBatch = BeanUtil.copyProperties(dto, WorkBatch.class); WorkBatch workBatch = BeanUtil.copyProperties(dto, WorkBatch.class);
workBatch.setId(UUIDGenerator.generate()); workBatch.setId(UUIDGenerator.generate());
...@@ -120,7 +158,9 @@ public class WorkBatchServiceImpl extends ServiceImpl<WorkBatchMapper, WorkBatch ...@@ -120,7 +158,9 @@ public class WorkBatchServiceImpl extends ServiceImpl<WorkBatchMapper, WorkBatch
workBatch.setSource(2); // 超限页面 workBatch.setSource(2); // 超限页面
this.save(workBatch); this.save(workBatch);
// 保存明细
List<DispatchDTO> transfiniteList = dto.getDetailList(); List<DispatchDTO> transfiniteList = dto.getDetailList();
List<WorkBatchDetail> workBatchDetailList = new ArrayList<>();
for (DispatchDTO transfiniteDTO : transfiniteList) { for (DispatchDTO transfiniteDTO : transfiniteList) {
WorkBatchDetail workBatchDetail = new WorkBatchDetail(); WorkBatchDetail workBatchDetail = new WorkBatchDetail();
workBatchDetail.setId(UUIDGenerator.generate()); workBatchDetail.setId(UUIDGenerator.generate());
...@@ -132,14 +172,16 @@ public class WorkBatchServiceImpl extends ServiceImpl<WorkBatchMapper, WorkBatch ...@@ -132,14 +172,16 @@ public class WorkBatchServiceImpl extends ServiceImpl<WorkBatchMapper, WorkBatch
workBatchDetail.setUnitType(transfiniteDTO.getUnitType()); workBatchDetail.setUnitType(transfiniteDTO.getUnitType());
workBatchDetail.setUnitTypeName(transfiniteDTO.getUnitTypeName()); workBatchDetail.setUnitTypeName(transfiniteDTO.getUnitTypeName());
workBatchDetail.setUnitDeviceCode(transfiniteDTO.getUnitDeviceCode()); workBatchDetail.setUnitDeviceCode(transfiniteDTO.getUnitDeviceCode());
workBatchDetail.setUnitEndMileage(transfiniteDTO.getUnitStartMileage()); workBatchDetail.setUnitStartMileage(transfiniteDTO.getUnitStartingMileage());
workBatchDetail.setUnitEndMileage(transfiniteDTO.getUnitEndMileage()); workBatchDetail.setUnitEndMileage(transfiniteDTO.getUnitEndMileage());
workBatchDetail.setUnitCenterMileage(transfiniteDTO.getUnitCenterMileage()); workBatchDetail.setUnitCenterMileage(transfiniteDTO.getUnitCenterMileage());
workBatchDetail.setUnitScore(transfiniteDTO.getUnitScore()); workBatchDetail.setUnitScore(transfiniteDTO.getUnitScore());
workBatchDetail.setUnitScoreLevel(transfiniteDTO.getUnitScoreLevel()); workBatchDetail.setUnitScoreLevel(transfiniteDTO.getUnitScoreLevel());
workBatchDetail.setUnitScoreLevelStr(transfiniteDTO.getUnitScoreLevelStr()); workBatchDetail.setUnitScoreLevelStr(transfiniteDTO.getUnitScoreLevelStr());
workBatchDetailMapper.insert(workBatchDetail); workBatchDetailList.add(workBatchDetail);
} }
workBatchDetailMapper.insertBatch(workBatchDetailList);
} }
...@@ -151,38 +193,68 @@ public class WorkBatchServiceImpl extends ServiceImpl<WorkBatchMapper, WorkBatch ...@@ -151,38 +193,68 @@ public class WorkBatchServiceImpl extends ServiceImpl<WorkBatchMapper, WorkBatch
} }
@Override @Override
@Transactional
public void batchSaveRecord(AnalysisBatchSaveDTO dto) { public void batchSaveRecord(AnalysisBatchSaveDTO dto) {
// 1.构建工单主信息
WorkBatch workBatch = BeanUtil.copyProperties(dto, WorkBatch.class); WorkBatch workBatch = BeanUtil.copyProperties(dto, WorkBatch.class);
workBatch.setId(UUIDGenerator.generate()); workBatch.setId(UUIDGenerator.generate());
workBatch.setWorkStatus(0); // 9-已作业 workBatch.setWorkStatus(0); // 9-已作业
workBatch.setSource(2); // 超限页面 workBatch.setSource(2); // 超限页面
this.save(workBatch);
// 2.查询 // 2.1 构建查询对象
LambdaQueryWrapper<AnalysisBatchUnitDevice> unitDeviceWrapper = Wrappers.lambdaQuery(); AnalysisBatchUnitDeviceDTO params = new AnalysisBatchUnitDeviceDTO();
params.setAnalysisBatchId(dto.getAnalysisBatchId());
params.setIsTransfinite(1); // 1-超限
params.setWorkStatus(0);// 0-未派工
// 2.1.1 一键全部派工按:照搜索条件来的
if (dto.getSaveType() == 1) {
params.setUnitCode(dto.getForm().getUnitCode());
params.setUnitDeviceCode(dto.getForm().getUnitDeviceCode());
params.setGradeJudgeList(dto.getForm().getGradeJudgeList());
params.setUnitTypeList(dto.getForm().getUnitTypeList());
params.setUnitStartingMileage(dto.getForm().getUnitStartingMileage());
params.setUnitEndMileage(dto.getForm().getUnitEndMileage());
}
// 2.1.2 一键失格派工:只要单元质量评价为失格的
if (dto.getSaveType() == 2) { if (dto.getSaveType() == 2) {
unitDeviceWrapper.eq(AnalysisBatchUnitDevice::getUnitScoreLevel, 3); List<String> gradeJudgeList = new ArrayList<>();
gradeJudgeList.add("3");
params.setGradeJudgeList(gradeJudgeList);
} }
List<AnalysisBatchUnitDevice> unitDevices = analysisBatchUnitDeviceMapper.selectList(unitDeviceWrapper);
for (AnalysisBatchUnitDevice unitDevice : unitDevices) { // 2.2 查询
List<AnalysisBatchUnitDeviceVO> transfiniteList = analysisBatchUnitDeviceMapper.listRecord(params);
if (ObjectUtil.isEmpty(transfiniteList)) {
throw JeecgBootException.error("创建失败,没有对应的超限数据");
}
// 2.3 循环构建保存对象
List<WorkBatchDetail> workBatchDetailList = new ArrayList<>();
for (AnalysisBatchUnitDeviceVO transfinite : transfiniteList) {
WorkBatchDetail workBatchDetail = new WorkBatchDetail(); WorkBatchDetail workBatchDetail = new WorkBatchDetail();
workBatchDetail.setId(UUIDGenerator.generate()); workBatchDetail.setId(UUIDGenerator.generate());
workBatchDetail.setWorkBatchId(workBatch.getId()); workBatchDetail.setWorkBatchId(workBatch.getId());
workBatchDetail.setWorkBatchCode(workBatch.getWorkBatchCode()); workBatchDetail.setWorkBatchCode(workBatch.getWorkBatchCode());
workBatchDetail.setUnitId(unitDevice.getUnitId()); workBatchDetail.setAnalysisBatchUnitDeviceId(transfinite.getId());
workBatchDetail.setUnitCode(unitDevice.getUnitCode()); workBatchDetail.setUnitId(transfinite.getUnitId());
workBatchDetail.setUnitType(unitDevice.getUnitType()); workBatchDetail.setUnitCode(transfinite.getUnitCode());
workBatchDetail.setUnitTypeName(unitDevice.getUnitTypeName()); workBatchDetail.setUnitType(transfinite.getUnitType());
workBatchDetail.setUnitDeviceCode(unitDevice.getUnitDeviceCode()); workBatchDetail.setUnitTypeName(transfinite.getUnitTypeName());
workBatchDetail.setUnitStartMileage(unitDevice.getUnitStartMileage()); workBatchDetail.setUnitDeviceCode(transfinite.getUnitDeviceCode());
workBatchDetail.setUnitEndMileage(unitDevice.getUnitEndMileage()); workBatchDetail.setUnitStartMileage(transfinite.getUnitStartingMileage());
workBatchDetail.setUnitCenterMileage(unitDevice.getUnitCenterMileage()); workBatchDetail.setUnitEndMileage(transfinite.getUnitEndMileage());
workBatchDetail.setUnitScore(unitDevice.getUnitScore()); workBatchDetail.setUnitCenterMileage(transfinite.getUnitCenterMileage());
workBatchDetail.setUnitScoreLevel(unitDevice.getUnitScoreLevel()); workBatchDetail.setUnitScore(Convert.toBigDecimal(transfinite.getUnitScore()));
workBatchDetail.setUnitScoreLevelStr(unitDevice.getUnitScoreLevelStr()); workBatchDetail.setUnitScoreLevel(transfinite.getUnitScoreLevel());
workBatchDetailMapper.insert(workBatchDetail); workBatchDetail.setUnitScoreLevelStr(transfinite.getUnitScoreLevelStr());
workBatchDetailList.add(workBatchDetail);
} }
// 3. 执行数据库保存
this.save(workBatch);
workBatchDetailMapper.insertBatch(workBatchDetailList);
} }
@Override @Override
......
...@@ -57,6 +57,8 @@ public class WorkBatchDetailVO { ...@@ -57,6 +57,8 @@ public class WorkBatchDetailVO {
@ApiModelProperty("设备单元起始里程") @ApiModelProperty("设备单元起始里程")
private BigDecimal unitStartMileage; private BigDecimal unitStartMileage;
@ApiModelProperty("分析批次单元设备id")
private String analysisBatchUnitDeviceId;
@ApiModelProperty("设备单元中心里程") @ApiModelProperty("设备单元中心里程")
private BigDecimal unitCenterMileage; private BigDecimal unitCenterMileage;
...@@ -73,7 +75,6 @@ public class WorkBatchDetailVO { ...@@ -73,7 +75,6 @@ public class WorkBatchDetailVO {
@ApiModelProperty("备注") @ApiModelProperty("备注")
private String remark; private String remark;
@ApiModelProperty("超限") @ApiModelProperty("超限list")
private List<AnalysisBatchUnitDeviceTransfiniteVO> transfiniteList = new ArrayList<>(); private List<AnalysisBatchUnitDeviceTransfiniteVO> transfiniteList;
} }
package org.jeecg.modules.system.controller; package org.jeecg.modules.system.controller;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
...@@ -22,7 +21,7 @@ import org.jeecg.common.util.DateUtils; ...@@ -22,7 +21,7 @@ import org.jeecg.common.util.DateUtils;
import org.jeecg.common.util.RedisUtil; import org.jeecg.common.util.RedisUtil;
import org.jeecg.common.util.TokenUtils; import org.jeecg.common.util.TokenUtils;
import org.jeecg.common.util.oConvertUtils; import org.jeecg.common.util.oConvertUtils;
import org.jeecg.config.mybatis.MybatisPlusSaasConfig; import org.jeecg.config.mybatisPlus.MybatisPlusSaasConfig;
import org.jeecg.modules.message.enums.RangeDateEnum; import org.jeecg.modules.message.enums.RangeDateEnum;
import org.jeecg.modules.message.websocket.WebSocket; import org.jeecg.modules.message.websocket.WebSocket;
import org.jeecg.modules.system.entity.SysAnnouncement; import org.jeecg.modules.system.entity.SysAnnouncement;
......
...@@ -17,7 +17,7 @@ import org.jeecg.common.system.vo.LoginUser; ...@@ -17,7 +17,7 @@ import org.jeecg.common.system.vo.LoginUser;
import org.jeecg.common.util.ImportExcelUtil; import org.jeecg.common.util.ImportExcelUtil;
import org.jeecg.common.util.SqlInjectionUtil; import org.jeecg.common.util.SqlInjectionUtil;
import org.jeecg.common.util.oConvertUtils; import org.jeecg.common.util.oConvertUtils;
import org.jeecg.config.mybatis.MybatisPlusSaasConfig; import org.jeecg.config.mybatisPlus.MybatisPlusSaasConfig;
import org.jeecg.modules.system.entity.SysCategory; import org.jeecg.modules.system.entity.SysCategory;
import org.jeecg.modules.system.model.TreeSelectModel; import org.jeecg.modules.system.model.TreeSelectModel;
import org.jeecg.modules.system.service.ISysCategoryService; import org.jeecg.modules.system.service.ISysCategoryService;
......
...@@ -3,9 +3,6 @@ package org.jeecg.modules.system.controller; ...@@ -3,9 +3,6 @@ package org.jeecg.modules.system.controller;
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.baomidou.dynamic.datasource.DynamicRoutingDataSource;
import com.baomidou.dynamic.datasource.creator.DruidDataSourceCreator;
import com.baomidou.dynamic.datasource.spring.boot.autoconfigure.DataSourceProperty;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
...@@ -13,8 +10,6 @@ import io.swagger.annotations.Api; ...@@ -13,8 +10,6 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.apache.shiro.authz.annotation.RequiresRoles;
import org.jeecg.common.api.vo.Result; import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog; import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.common.config.TenantContext; import org.jeecg.common.config.TenantContext;
...@@ -24,7 +19,7 @@ import org.jeecg.common.system.query.QueryGenerator; ...@@ -24,7 +19,7 @@ import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.util.dynamic.db.DataSourceCachePool; import org.jeecg.common.util.dynamic.db.DataSourceCachePool;
import org.jeecg.common.util.oConvertUtils; import org.jeecg.common.util.oConvertUtils;
import org.jeecg.common.util.security.JdbcSecurityUtil; import org.jeecg.common.util.security.JdbcSecurityUtil;
import org.jeecg.config.mybatis.MybatisPlusSaasConfig; import org.jeecg.config.mybatisPlus.MybatisPlusSaasConfig;
import org.jeecg.modules.system.entity.SysDataSource; import org.jeecg.modules.system.entity.SysDataSource;
import org.jeecg.modules.system.service.ISysDataSourceService; import org.jeecg.modules.system.service.ISysDataSourceService;
import org.jeecg.modules.system.util.SecurityUtil; import org.jeecg.modules.system.util.SecurityUtil;
...@@ -34,7 +29,6 @@ import org.springframework.web.servlet.ModelAndView; ...@@ -34,7 +29,6 @@ import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import javax.sql.DataSource;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
......
...@@ -6,7 +6,6 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; ...@@ -6,7 +6,6 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.shiro.SecurityUtils; import org.apache.shiro.SecurityUtils;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.jeecg.common.api.vo.Result; import org.jeecg.common.api.vo.Result;
import org.jeecg.common.config.TenantContext; import org.jeecg.common.config.TenantContext;
import org.jeecg.common.constant.CacheConstant; import org.jeecg.common.constant.CacheConstant;
...@@ -17,7 +16,7 @@ import org.jeecg.common.system.vo.LoginUser; ...@@ -17,7 +16,7 @@ import org.jeecg.common.system.vo.LoginUser;
import org.jeecg.common.util.ImportExcelUtil; import org.jeecg.common.util.ImportExcelUtil;
import org.jeecg.common.util.YouBianCodeUtil; import org.jeecg.common.util.YouBianCodeUtil;
import org.jeecg.common.util.oConvertUtils; import org.jeecg.common.util.oConvertUtils;
import org.jeecg.config.mybatis.MybatisPlusSaasConfig; import org.jeecg.config.mybatisPlus.MybatisPlusSaasConfig;
import org.jeecg.modules.system.entity.SysDepart; import org.jeecg.modules.system.entity.SysDepart;
import org.jeecg.modules.system.entity.SysUser; import org.jeecg.modules.system.entity.SysUser;
import org.jeecg.modules.system.model.DepartIdModel; import org.jeecg.modules.system.model.DepartIdModel;
......
...@@ -8,7 +8,6 @@ import com.baomidou.mybatisplus.core.metadata.IPage; ...@@ -8,7 +8,6 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.shiro.SecurityUtils; import org.apache.shiro.SecurityUtils;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.jeecg.common.api.vo.Result; import org.jeecg.common.api.vo.Result;
import org.jeecg.common.config.TenantContext; import org.jeecg.common.config.TenantContext;
import org.jeecg.common.constant.CacheConstant; import org.jeecg.common.constant.CacheConstant;
...@@ -19,7 +18,7 @@ import org.jeecg.common.system.vo.DictModel; ...@@ -19,7 +18,7 @@ import org.jeecg.common.system.vo.DictModel;
import org.jeecg.common.system.vo.DictQuery; import org.jeecg.common.system.vo.DictQuery;
import org.jeecg.common.system.vo.LoginUser; import org.jeecg.common.system.vo.LoginUser;
import org.jeecg.common.util.*; import org.jeecg.common.util.*;
import org.jeecg.config.mybatis.MybatisPlusSaasConfig; import org.jeecg.config.mybatisPlus.MybatisPlusSaasConfig;
import org.jeecg.modules.system.entity.SysDict; import org.jeecg.modules.system.entity.SysDict;
import org.jeecg.modules.system.entity.SysDictItem; import org.jeecg.modules.system.entity.SysDictItem;
import org.jeecg.modules.system.model.SysDictTree; import org.jeecg.modules.system.model.SysDictTree;
......
...@@ -17,7 +17,7 @@ import org.jeecg.common.system.query.QueryGenerator; ...@@ -17,7 +17,7 @@ import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.system.vo.LoginUser; import org.jeecg.common.system.vo.LoginUser;
import org.jeecg.common.util.ImportExcelUtil; import org.jeecg.common.util.ImportExcelUtil;
import org.jeecg.common.util.oConvertUtils; import org.jeecg.common.util.oConvertUtils;
import org.jeecg.config.mybatis.MybatisPlusSaasConfig; import org.jeecg.config.mybatisPlus.MybatisPlusSaasConfig;
import org.jeecg.modules.system.entity.SysPosition; import org.jeecg.modules.system.entity.SysPosition;
import org.jeecg.modules.system.service.ISysPositionService; import org.jeecg.modules.system.service.ISysPositionService;
import org.jeecg.modules.system.service.ISysUserService; import org.jeecg.modules.system.service.ISysUserService;
...@@ -41,7 +41,6 @@ import java.util.ArrayList; ...@@ -41,7 +41,6 @@ import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.stream.Collectors;
/** /**
* @Description: 职务表 * @Description: 职务表
......
package org.jeecg.modules.system.controller; package org.jeecg.modules.system.controller;
import java.io.File;
import java.io.IOException; import java.io.IOException;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date; import java.util.Date;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
...@@ -13,23 +11,19 @@ import java.util.Map; ...@@ -13,23 +11,19 @@ import java.util.Map;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import com.baomidou.mybatisplus.extension.plugins.pagination.PageDTO;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.jeecg.common.api.vo.Result; import org.jeecg.common.api.vo.Result;
import org.jeecg.common.config.TenantContext; import org.jeecg.common.config.TenantContext;
import org.jeecg.common.constant.CommonConstant; import org.jeecg.common.constant.CommonConstant;
import org.jeecg.common.system.query.QueryGenerator; import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.util.oConvertUtils; import org.jeecg.common.util.oConvertUtils;
import org.jeecg.config.mybatis.MybatisPlusSaasConfig; import org.jeecg.config.mybatisPlus.MybatisPlusSaasConfig;
import org.jeecg.modules.system.entity.*; import org.jeecg.modules.system.entity.*;
import org.jeecg.modules.system.model.TreeModel; import org.jeecg.modules.system.model.TreeModel;
import org.jeecg.modules.system.service.*; import org.jeecg.modules.system.service.*;
import org.jeecg.modules.system.vo.SysUserRoleCountVo;
import org.jeecgframework.poi.excel.def.NormalExcelConstants; import org.jeecgframework.poi.excel.def.NormalExcelConstants;
import org.jeecgframework.poi.excel.entity.ExportParams; import org.jeecgframework.poi.excel.entity.ExportParams;
import org.jeecgframework.poi.excel.entity.ImportParams; import org.jeecgframework.poi.excel.entity.ImportParams;
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView; import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PathVariable;
......
...@@ -8,7 +8,6 @@ import com.baomidou.mybatisplus.core.metadata.IPage; ...@@ -8,7 +8,6 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.shiro.SecurityUtils; import org.apache.shiro.SecurityUtils;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.jeecg.common.api.vo.Result; import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.PermissionData; import org.jeecg.common.aspect.annotation.PermissionData;
import org.jeecg.common.config.TenantContext; import org.jeecg.common.config.TenantContext;
...@@ -19,7 +18,7 @@ import org.jeecg.common.system.vo.LoginUser; ...@@ -19,7 +18,7 @@ import org.jeecg.common.system.vo.LoginUser;
import org.jeecg.common.util.PasswordUtil; import org.jeecg.common.util.PasswordUtil;
import org.jeecg.common.util.TokenUtils; import org.jeecg.common.util.TokenUtils;
import org.jeecg.common.util.oConvertUtils; import org.jeecg.common.util.oConvertUtils;
import org.jeecg.config.mybatis.MybatisPlusSaasConfig; import org.jeecg.config.mybatisPlus.MybatisPlusSaasConfig;
import org.jeecg.modules.base.service.BaseCommonService; import org.jeecg.modules.base.service.BaseCommonService;
import org.jeecg.modules.system.entity.*; import org.jeecg.modules.system.entity.*;
import org.jeecg.modules.system.service.ISysTenantPackService; import org.jeecg.modules.system.service.ISysTenantPackService;
......
...@@ -17,14 +17,13 @@ import io.swagger.annotations.ApiOperation; ...@@ -17,14 +17,13 @@ import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
import org.apache.shiro.SecurityUtils; import org.apache.shiro.SecurityUtils;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.apache.shiro.authz.annotation.RequiresRoles; import org.apache.shiro.authz.annotation.RequiresRoles;
import org.jeecg.common.api.vo.Result; import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.PermissionData; import org.jeecg.common.aspect.annotation.PermissionData;
import org.jeecg.common.config.TenantContext; import org.jeecg.common.config.TenantContext;
import org.jeecg.common.constant.CommonConstant; import org.jeecg.common.constant.CommonConstant;
import org.jeecg.common.constant.SymbolConstant; import org.jeecg.common.constant.SymbolConstant;
import org.jeecg.config.mybatis.MybatisPlusSaasConfig; import org.jeecg.config.mybatisPlus.MybatisPlusSaasConfig;
import org.jeecg.modules.base.service.BaseCommonService; import org.jeecg.modules.base.service.BaseCommonService;
import org.jeecg.common.system.query.QueryGenerator; import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.system.util.JwtUtil; import org.jeecg.common.system.util.JwtUtil;
......
...@@ -19,7 +19,7 @@ import org.jeecg.common.system.vo.LoginUser; ...@@ -19,7 +19,7 @@ import org.jeecg.common.system.vo.LoginUser;
import org.jeecg.common.util.FillRuleUtil; import org.jeecg.common.util.FillRuleUtil;
import org.jeecg.common.util.YouBianCodeUtil; import org.jeecg.common.util.YouBianCodeUtil;
import org.jeecg.common.util.oConvertUtils; import org.jeecg.common.util.oConvertUtils;
import org.jeecg.config.mybatis.MybatisPlusSaasConfig; import org.jeecg.config.mybatisPlus.MybatisPlusSaasConfig;
import org.jeecg.modules.system.entity.*; import org.jeecg.modules.system.entity.*;
import org.jeecg.modules.system.mapper.*; import org.jeecg.modules.system.mapper.*;
import org.jeecg.modules.system.model.DepartIdModel; import org.jeecg.modules.system.model.DepartIdModel;
...@@ -27,7 +27,6 @@ import org.jeecg.modules.system.model.SysDepartTreeModel; ...@@ -27,7 +27,6 @@ import org.jeecg.modules.system.model.SysDepartTreeModel;
import org.jeecg.modules.system.service.ISysDepartService; import org.jeecg.modules.system.service.ISysDepartService;
import org.jeecg.modules.system.util.FindsDepartsChildrenUtil; import org.jeecg.modules.system.util.FindsDepartsChildrenUtil;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
......
...@@ -13,14 +13,12 @@ import org.jeecg.common.constant.DataBaseConstant; ...@@ -13,14 +13,12 @@ import org.jeecg.common.constant.DataBaseConstant;
import org.jeecg.common.constant.SymbolConstant; import org.jeecg.common.constant.SymbolConstant;
import org.jeecg.common.exception.JeecgBootException; import org.jeecg.common.exception.JeecgBootException;
import org.jeecg.common.system.query.QueryGenerator; import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.system.util.JwtUtil;
import org.jeecg.common.system.util.ResourceUtil; import org.jeecg.common.system.util.ResourceUtil;
import org.jeecg.common.system.vo.DictModel; import org.jeecg.common.system.vo.DictModel;
import org.jeecg.common.system.vo.DictModelMany; import org.jeecg.common.system.vo.DictModelMany;
import org.jeecg.common.system.vo.DictQuery; import org.jeecg.common.system.vo.DictQuery;
import org.jeecg.common.util.SqlInjectionUtil; import org.jeecg.common.util.SqlInjectionUtil;
import org.jeecg.common.util.oConvertUtils; import org.jeecg.common.util.oConvertUtils;
import org.jeecg.config.mybatis.MybatisPlusSaasConfig;
import org.jeecg.modules.system.entity.SysDict; import org.jeecg.modules.system.entity.SysDict;
import org.jeecg.modules.system.entity.SysDictItem; import org.jeecg.modules.system.entity.SysDictItem;
import org.jeecg.modules.system.mapper.SysDictItemMapper; import org.jeecg.modules.system.mapper.SysDictItemMapper;
......
...@@ -8,10 +8,9 @@ import org.apache.commons.lang3.StringUtils; ...@@ -8,10 +8,9 @@ import org.apache.commons.lang3.StringUtils;
import org.apache.shiro.SecurityUtils; import org.apache.shiro.SecurityUtils;
import org.jeecg.common.config.TenantContext; import org.jeecg.common.config.TenantContext;
import org.jeecg.common.constant.CommonConstant; import org.jeecg.common.constant.CommonConstant;
import org.jeecg.common.constant.SymbolConstant;
import org.jeecg.common.system.vo.LoginUser; import org.jeecg.common.system.vo.LoginUser;
import org.jeecg.common.util.oConvertUtils; import org.jeecg.common.util.oConvertUtils;
import org.jeecg.config.mybatis.MybatisPlusSaasConfig; import org.jeecg.config.mybatisPlus.MybatisPlusSaasConfig;
import org.jeecg.modules.system.entity.SysDepart; import org.jeecg.modules.system.entity.SysDepart;
import org.jeecg.modules.system.entity.SysUser; import org.jeecg.modules.system.entity.SysUser;
import org.jeecg.modules.system.entity.SysUserDepart; import org.jeecg.modules.system.entity.SysUserDepart;
......
...@@ -29,7 +29,7 @@ import org.jeecg.common.util.FillRuleUtil; ...@@ -29,7 +29,7 @@ import org.jeecg.common.util.FillRuleUtil;
import org.jeecg.common.util.PasswordUtil; import org.jeecg.common.util.PasswordUtil;
import org.jeecg.common.util.UUIDGenerator; import org.jeecg.common.util.UUIDGenerator;
import org.jeecg.common.util.oConvertUtils; import org.jeecg.common.util.oConvertUtils;
import org.jeecg.config.mybatis.MybatisPlusSaasConfig; import org.jeecg.config.mybatisPlus.MybatisPlusSaasConfig;
import org.jeecg.modules.base.service.BaseCommonService; import org.jeecg.modules.base.service.BaseCommonService;
import org.jeecg.modules.system.entity.*; import org.jeecg.modules.system.entity.*;
import org.jeecg.modules.system.mapper.*; import org.jeecg.modules.system.mapper.*;
......
...@@ -69,9 +69,9 @@ ...@@ -69,9 +69,9 @@
<!-- 日志输出级别 --> <!-- 日志输出级别 -->
<root level="INFO"> <root level="INFO">
<appender-ref ref="STDOUT" /> <appender-ref ref="STDOUT" />
<appender-ref ref="FILE" /> <!-- <appender-ref ref="FILE" />-->
<appender-ref ref="HTML" /> <!-- <appender-ref ref="HTML" />-->
<appender-ref ref="FILE_HTML" /> <!-- <appender-ref ref="FILE_HTML" />-->
</root> </root>
</configuration> </configuration>
\ No newline at end of file
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