修改移动端内容,后端添加了所有查询接口
This commit is contained in:
@@ -23,6 +23,15 @@ public class Klptcm1ProPlantStateDefineController extends BaseController {
|
||||
@Resource
|
||||
private IKlptcm1ProPlantStateDefineService defineService;
|
||||
|
||||
/**
|
||||
* 获取所有定义及其当前值(用于前端初始化缓存)
|
||||
* @return 所有定义列表,每个定义包含对应的当前值
|
||||
*/
|
||||
@GetMapping("/allWithValues")
|
||||
public R<List<PlantStateWithValueVo>> getAllWithValues() {
|
||||
return R.ok(defineService.selectAllWithValues());
|
||||
}
|
||||
|
||||
@GetMapping("/plant/state")
|
||||
public List<PlantStateWithValueVo> getTopByValue(@RequestParam String name) {
|
||||
return defineService.selectByValue(name);
|
||||
|
||||
@@ -0,0 +1,93 @@
|
||||
package com.klp.pocket.controller;
|
||||
|
||||
import com.klp.common.core.controller.BaseController;
|
||||
import com.klp.common.core.domain.R;
|
||||
import com.klp.pocket.domain.vo.ProductionStatisticsVo;
|
||||
import com.klp.pocket.domain.vo.CrewProductionVo;
|
||||
import com.klp.pocket.domain.vo.SpecDistributionVo;
|
||||
import com.klp.pocket.domain.vo.TeamPerformanceVo;
|
||||
import com.klp.pocket.service.IKlptcm1PdoExcoilService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 生产统计Controller
|
||||
*
|
||||
* @author klp
|
||||
* @date 2025-10-31
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/pocket/productionStatistics")
|
||||
public class Klptcm1ProductionStatisticsController extends BaseController {
|
||||
|
||||
private final IKlptcm1PdoExcoilService excoilService;
|
||||
|
||||
/**
|
||||
* 获取生产统计汇总数据
|
||||
* @param startDate 开始日期(格式:yyyy-MM-dd)
|
||||
* @param endDate 结束日期(格式:yyyy-MM-dd)
|
||||
* @return 统计数据(钢卷数、平均宽度、平均厚度、原料总量、成品总量、成材率)
|
||||
*/
|
||||
@GetMapping("/summary")
|
||||
public R<ProductionStatisticsVo> getSummary(
|
||||
@RequestParam String startDate,
|
||||
@RequestParam String endDate) {
|
||||
return R.ok(excoilService.getProductionStatistics(startDate, endDate));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取班组产量统计
|
||||
* @param startDate 开始日期
|
||||
* @param endDate 结束日期
|
||||
* @return 班组产量列表(按产量倒序)
|
||||
*/
|
||||
@GetMapping("/crewProduction")
|
||||
public R<List<CrewProductionVo>> getCrewProduction(
|
||||
@RequestParam String startDate,
|
||||
@RequestParam String endDate) {
|
||||
return R.ok(excoilService.getCrewProduction(startDate, endDate));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取厚度分布统计
|
||||
* @param startDate 开始日期
|
||||
* @param endDate 结束日期
|
||||
* @return 厚度分布列表
|
||||
*/
|
||||
@GetMapping("/thicknessDistribution")
|
||||
public R<List<SpecDistributionVo>> getThicknessDistribution(
|
||||
@RequestParam String startDate,
|
||||
@RequestParam String endDate) {
|
||||
return R.ok(excoilService.getThicknessDistribution(startDate, endDate));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取宽度分布统计
|
||||
* @param startDate 开始日期
|
||||
* @param endDate 结束日期
|
||||
* @return 宽度分布列表
|
||||
*/
|
||||
@GetMapping("/widthDistribution")
|
||||
public R<List<SpecDistributionVo>> getWidthDistribution(
|
||||
@RequestParam String startDate,
|
||||
@RequestParam String endDate) {
|
||||
return R.ok(excoilService.getWidthDistribution(startDate, endDate));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取班组绩效统计
|
||||
* @param startDate 开始日期
|
||||
* @param endDate 结束日期
|
||||
* @return 班组绩效列表(按综合评分倒序排列)
|
||||
*/
|
||||
@GetMapping("/teamPerformance")
|
||||
public R<List<TeamPerformanceVo>> getTeamPerformance(
|
||||
@RequestParam String startDate,
|
||||
@RequestParam String endDate) {
|
||||
return R.ok(excoilService.getTeamPerformance(startDate, endDate));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
package com.klp.pocket.controller;
|
||||
|
||||
import com.klp.common.core.controller.BaseController;
|
||||
import com.klp.common.core.domain.R;
|
||||
import com.klp.pocket.domain.vo.Klptcm1ShiftCurrentVo;
|
||||
import com.klp.pocket.service.IKlptcm1ShiftCurrentService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* 当前班组Controller
|
||||
*
|
||||
* @author klp
|
||||
* @date 2025-10-31
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/pocket/shiftCurrent")
|
||||
public class Klptcm1ShiftCurrentController extends BaseController {
|
||||
|
||||
private final IKlptcm1ShiftCurrentService shiftCurrentService;
|
||||
|
||||
/**
|
||||
* 获取当前班组信息
|
||||
* @return 当前班组信息(班次+班组)
|
||||
*/
|
||||
@GetMapping("/current")
|
||||
public R<Klptcm1ShiftCurrentVo> getCurrentShift() {
|
||||
return R.ok(shiftCurrentService.getCurrentShift());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
package com.klp.pocket.domain;
|
||||
|
||||
import lombok.Data;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 成品卷对象 klptcm1_pdo_excoil
|
||||
*/
|
||||
@Data
|
||||
public class Klptcm1PdoExcoil {
|
||||
|
||||
/** 成品卷号 */
|
||||
private String encoilid;
|
||||
|
||||
/** 钢种 */
|
||||
private String grade;
|
||||
|
||||
/** 厚度质量 */
|
||||
private BigDecimal thickQuality;
|
||||
|
||||
/** 板形质量 */
|
||||
private BigDecimal shapeQuality;
|
||||
|
||||
/** 入口厚度 */
|
||||
private BigDecimal entryThick;
|
||||
|
||||
/** 出口厚度 */
|
||||
private BigDecimal exitThick;
|
||||
|
||||
/** 入口宽度 */
|
||||
private BigDecimal entryWidth;
|
||||
|
||||
/** 出口宽度 */
|
||||
private BigDecimal exitWidth;
|
||||
|
||||
/** 入口重量 */
|
||||
private BigDecimal entryWeight;
|
||||
|
||||
/** 出口重量 */
|
||||
private BigDecimal exitWeight;
|
||||
|
||||
/** 上线时间 */
|
||||
private Date onlineDate;
|
||||
|
||||
/** 开始时间 */
|
||||
private Date startDate;
|
||||
|
||||
/** 结束时间 */
|
||||
private Date endDate;
|
||||
|
||||
/** 插入时间 */
|
||||
private Date insdate;
|
||||
|
||||
/** 班次 */
|
||||
private String shift;
|
||||
|
||||
/** 班组 */
|
||||
private String crew;
|
||||
|
||||
/** 出口卷号 */
|
||||
private String excoilid;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
package com.klp.pocket.domain;
|
||||
|
||||
import lombok.Data;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 当前班组对象 klptcm1_shift_current
|
||||
*/
|
||||
@Data
|
||||
public class Klptcm1ShiftCurrent {
|
||||
|
||||
/**
|
||||
* 班次(如:A/B/C 或 早/中/晚)
|
||||
*/
|
||||
private String shift;
|
||||
|
||||
/**
|
||||
* 班组编号
|
||||
*/
|
||||
private BigDecimal crew;
|
||||
|
||||
/**
|
||||
* 序列号
|
||||
*/
|
||||
private BigDecimal seqNum;
|
||||
|
||||
/**
|
||||
* 系统时间
|
||||
*/
|
||||
private Date sysTime;
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.klp.pocket.domain.bo;
|
||||
import com.klp.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@@ -58,13 +59,15 @@ public class Klptcm1ProStoppageBo extends BaseEntity {
|
||||
private String REMARK;
|
||||
|
||||
/**
|
||||
*
|
||||
* 开始日期(支持多种日期格式)
|
||||
*/
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private Date startDate;
|
||||
|
||||
/**
|
||||
*
|
||||
* 结束日期(支持多种日期格式)
|
||||
*/
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private Date endDate;
|
||||
|
||||
/**
|
||||
@@ -73,8 +76,9 @@ public class Klptcm1ProStoppageBo extends BaseEntity {
|
||||
private Long DURATION;
|
||||
|
||||
/**
|
||||
*
|
||||
* 插入日期
|
||||
*/
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date insDate;
|
||||
|
||||
/**
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.klp.pocket.domain.vo;
|
||||
|
||||
import lombok.Data;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 班组产量统计视图对象
|
||||
*/
|
||||
@Data
|
||||
public class CrewProductionVo {
|
||||
|
||||
/** 班组 */
|
||||
private String crew;
|
||||
|
||||
/** 班次 */
|
||||
private String shift;
|
||||
|
||||
/** 钢卷数 */
|
||||
private Long coilCount;
|
||||
|
||||
/** 总产量 */
|
||||
private BigDecimal totalWeight;
|
||||
|
||||
/** 平均厚度 */
|
||||
private BigDecimal avgThick;
|
||||
|
||||
/** 平均宽度 */
|
||||
private BigDecimal avgWidth;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.klp.pocket.domain.vo;
|
||||
|
||||
import lombok.Data;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 当前班组视图对象 klptcm1_shift_current
|
||||
*/
|
||||
@Data
|
||||
public class Klptcm1ShiftCurrentVo {
|
||||
|
||||
private String shift;
|
||||
private BigDecimal crew;
|
||||
private BigDecimal seqNum;
|
||||
private Date sysTime;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.klp.pocket.domain.vo;
|
||||
|
||||
import lombok.Data;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 生产统计视图对象
|
||||
*/
|
||||
@Data
|
||||
public class ProductionStatisticsVo {
|
||||
|
||||
/** 生产钢卷数 */
|
||||
private Long coilCount;
|
||||
|
||||
/** 平均宽度 */
|
||||
private BigDecimal avgWidth;
|
||||
|
||||
/** 平均厚度 */
|
||||
private BigDecimal avgThick;
|
||||
|
||||
/** 原料总量 */
|
||||
private BigDecimal totalEntryWeight;
|
||||
|
||||
/** 成品总量 */
|
||||
private BigDecimal totalExitWeight;
|
||||
|
||||
/** 成材率 */
|
||||
private BigDecimal yieldRate;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.klp.pocket.domain.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 规格分布视图对象
|
||||
*/
|
||||
@Data
|
||||
public class SpecDistributionVo {
|
||||
|
||||
/** 分类名称 */
|
||||
private String category;
|
||||
|
||||
/** 数量 */
|
||||
private Long count;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
package com.klp.pocket.domain.vo;
|
||||
|
||||
import lombok.Data;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 班组绩效视图对象
|
||||
*/
|
||||
@Data
|
||||
public class TeamPerformanceVo {
|
||||
|
||||
/** 班组 */
|
||||
private String crew;
|
||||
|
||||
/** 班次 */
|
||||
private String shift;
|
||||
|
||||
/** 班组-班次组合(用于显示) */
|
||||
private String teamName;
|
||||
|
||||
/** 产量(t) */
|
||||
private BigDecimal output;
|
||||
|
||||
/** 成材率(%) */
|
||||
private BigDecimal yieldRate;
|
||||
|
||||
/** 合格率(%) - 基于厚度质量 */
|
||||
private BigDecimal passRate;
|
||||
|
||||
/** 平均厚度质量 */
|
||||
private BigDecimal avgThickQuality;
|
||||
|
||||
/** 平均板形质量 */
|
||||
private BigDecimal avgShapeQuality;
|
||||
|
||||
/** 效率指标(钢卷数/时间,这里简化为钢卷数) */
|
||||
private Long efficiency;
|
||||
|
||||
/** 综合评分 */
|
||||
private BigDecimal score;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
package com.klp.pocket.mapper;
|
||||
|
||||
import com.klp.pocket.domain.vo.ProductionStatisticsVo;
|
||||
import com.klp.pocket.domain.vo.CrewProductionVo;
|
||||
import com.klp.pocket.domain.vo.SpecDistributionVo;
|
||||
import com.klp.pocket.domain.vo.TeamPerformanceVo;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 成品卷Mapper接口
|
||||
*/
|
||||
@Mapper
|
||||
public interface Klptcm1PdoExcoilMapper {
|
||||
|
||||
/**
|
||||
* 查询生产统计汇总数据
|
||||
* @param startDate 开始日期
|
||||
* @param endDate 结束日期
|
||||
* @return 统计数据
|
||||
*/
|
||||
ProductionStatisticsVo selectProductionStatistics(@Param("startDate") String startDate,
|
||||
@Param("endDate") String endDate);
|
||||
|
||||
/**
|
||||
* 查询班组产量统计
|
||||
* @param startDate 开始日期
|
||||
* @param endDate 结束日期
|
||||
* @return 班组产量列表
|
||||
*/
|
||||
List<CrewProductionVo> selectCrewProduction(@Param("startDate") String startDate,
|
||||
@Param("endDate") String endDate);
|
||||
|
||||
/**
|
||||
* 查询厚度分布
|
||||
* @param startDate 开始日期
|
||||
* @param endDate 结束日期
|
||||
* @return 厚度分布列表
|
||||
*/
|
||||
List<SpecDistributionVo> selectThicknessDistribution(@Param("startDate") String startDate,
|
||||
@Param("endDate") String endDate);
|
||||
|
||||
/**
|
||||
* 查询宽度分布
|
||||
* @param startDate 开始日期
|
||||
* @param endDate 结束日期
|
||||
* @return 宽度分布列表
|
||||
*/
|
||||
List<SpecDistributionVo> selectWidthDistribution(@Param("startDate") String startDate,
|
||||
@Param("endDate") String endDate);
|
||||
|
||||
/**
|
||||
* 查询班组绩效统计
|
||||
* @param startDate 开始日期
|
||||
* @param endDate 结束日期
|
||||
* @return 班组绩效列表
|
||||
*/
|
||||
List<TeamPerformanceVo> selectTeamPerformance(@Param("startDate") String startDate,
|
||||
@Param("endDate") String endDate);
|
||||
}
|
||||
|
||||
@@ -25,6 +25,12 @@ public interface Klptcm1ProPlantStateDefineMapper {
|
||||
|
||||
List<PlantStateWithValueVo> selectByValue(String name);
|
||||
|
||||
/**
|
||||
* 获取所有定义及其当前值
|
||||
* @return 所有定义列表,每个定义包含对应的当前值
|
||||
*/
|
||||
List<PlantStateWithValueVo> selectAllWithValues();
|
||||
|
||||
/**
|
||||
* 按ID查询
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.klp.pocket.mapper;
|
||||
|
||||
import com.klp.pocket.domain.Klptcm1ShiftCurrent;
|
||||
import com.klp.pocket.domain.vo.Klptcm1ShiftCurrentVo;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 当前班组Mapper接口
|
||||
*/
|
||||
@Mapper
|
||||
public interface Klptcm1ShiftCurrentMapper {
|
||||
|
||||
/**
|
||||
* 查询当前班组信息(最新一条)
|
||||
* @return 当前班组信息
|
||||
*/
|
||||
Klptcm1ShiftCurrentVo selectCurrent();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
package com.klp.pocket.service;
|
||||
|
||||
import com.klp.pocket.domain.vo.ProductionStatisticsVo;
|
||||
import com.klp.pocket.domain.vo.CrewProductionVo;
|
||||
import com.klp.pocket.domain.vo.SpecDistributionVo;
|
||||
import com.klp.pocket.domain.vo.TeamPerformanceVo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 生产统计Service接口
|
||||
*/
|
||||
public interface IKlptcm1PdoExcoilService {
|
||||
|
||||
/**
|
||||
* 查询生产统计汇总数据
|
||||
* @param startDate 开始日期
|
||||
* @param endDate 结束日期
|
||||
* @return 统计数据
|
||||
*/
|
||||
ProductionStatisticsVo getProductionStatistics(String startDate, String endDate);
|
||||
|
||||
/**
|
||||
* 查询班组产量统计
|
||||
* @param startDate 开始日期
|
||||
* @param endDate 结束日期
|
||||
* @return 班组产量列表
|
||||
*/
|
||||
List<CrewProductionVo> getCrewProduction(String startDate, String endDate);
|
||||
|
||||
/**
|
||||
* 查询厚度分布
|
||||
* @param startDate 开始日期
|
||||
* @param endDate 结束日期
|
||||
* @return 厚度分布列表
|
||||
*/
|
||||
List<SpecDistributionVo> getThicknessDistribution(String startDate, String endDate);
|
||||
|
||||
/**
|
||||
* 查询宽度分布
|
||||
* @param startDate 开始日期
|
||||
* @param endDate 结束日期
|
||||
* @return 宽度分布列表
|
||||
*/
|
||||
List<SpecDistributionVo> getWidthDistribution(String startDate, String endDate);
|
||||
|
||||
/**
|
||||
* 查询班组绩效统计
|
||||
* @param startDate 开始日期
|
||||
* @param endDate 结束日期
|
||||
* @return 班组绩效列表(按综合评分倒序)
|
||||
*/
|
||||
List<TeamPerformanceVo> getTeamPerformance(String startDate, String endDate);
|
||||
}
|
||||
|
||||
@@ -25,6 +25,12 @@ public interface IKlptcm1ProPlantStateDefineService {
|
||||
|
||||
List<PlantStateWithValueVo> selectByValue(String name);
|
||||
|
||||
/**
|
||||
* 获取所有定义及其当前值
|
||||
* @return 所有定义列表,每个定义包含对应的当前值
|
||||
*/
|
||||
List<PlantStateWithValueVo> selectAllWithValues();
|
||||
|
||||
Klptcm1ProPlantStateDefine selectById(BigDecimal id);
|
||||
|
||||
int insert(Klptcm1ProPlantStateDefine entity);
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.klp.pocket.service;
|
||||
|
||||
import com.klp.pocket.domain.vo.Klptcm1ShiftCurrentVo;
|
||||
|
||||
/**
|
||||
* 当前班组Service接口
|
||||
*/
|
||||
public interface IKlptcm1ShiftCurrentService {
|
||||
|
||||
/**
|
||||
* 查询当前班组信息
|
||||
* @return 当前班组信息
|
||||
*/
|
||||
Klptcm1ShiftCurrentVo getCurrentShift();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
package com.klp.pocket.service.impl;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.klp.pocket.domain.vo.ProductionStatisticsVo;
|
||||
import com.klp.pocket.domain.vo.CrewProductionVo;
|
||||
import com.klp.pocket.domain.vo.SpecDistributionVo;
|
||||
import com.klp.pocket.domain.vo.TeamPerformanceVo;
|
||||
import com.klp.pocket.mapper.Klptcm1PdoExcoilMapper;
|
||||
import com.klp.pocket.service.IKlptcm1PdoExcoilService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 生产统计Service实现类
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@DS("slave")
|
||||
@Service
|
||||
public class Klptcm1PdoExcoilServiceImpl implements IKlptcm1PdoExcoilService {
|
||||
|
||||
private final Klptcm1PdoExcoilMapper excoilMapper;
|
||||
|
||||
@Override
|
||||
public ProductionStatisticsVo getProductionStatistics(String startDate, String endDate) {
|
||||
return excoilMapper.selectProductionStatistics(startDate, endDate);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<CrewProductionVo> getCrewProduction(String startDate, String endDate) {
|
||||
return excoilMapper.selectCrewProduction(startDate, endDate);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SpecDistributionVo> getThicknessDistribution(String startDate, String endDate) {
|
||||
return excoilMapper.selectThicknessDistribution(startDate, endDate);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SpecDistributionVo> getWidthDistribution(String startDate, String endDate) {
|
||||
return excoilMapper.selectWidthDistribution(startDate, endDate);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<TeamPerformanceVo> getTeamPerformance(String startDate, String endDate) {
|
||||
return excoilMapper.selectTeamPerformance(startDate, endDate);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,6 +42,11 @@ public class Klptcm1ProPlantStateDefineServiceImpl implements IKlptcm1ProPlantSt
|
||||
return defineMapper.selectByValue(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PlantStateWithValueVo> selectAllWithValues() {
|
||||
return defineMapper.selectAllWithValues();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Klptcm1ProPlantStateDefine selectById(BigDecimal id) {
|
||||
return defineMapper.selectById(id);
|
||||
|
||||
@@ -71,12 +71,15 @@ public class Klptcm1ProStoppageServiceImpl implements IKlptcm1ProStoppageService
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getUNIT()), Klptcm1ProStoppage::getUnit, bo.getUNIT());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getSETON()), Klptcm1ProStoppage::getSeton, bo.getSETON());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getREMARK()), Klptcm1ProStoppage::getRemark, bo.getREMARK());
|
||||
lqw.eq(bo.getStartDate() != null, Klptcm1ProStoppage::getStartDate, bo.getStartDate());
|
||||
lqw.eq(bo.getEndDate() != null, Klptcm1ProStoppage::getEndDate, bo.getEndDate());
|
||||
// 日期范围查询:查询停机开始时间在指定范围内的记录
|
||||
// bo.startDate 是查询开始时间,stoppage.startDate 是停机开始时间
|
||||
lqw.ge(bo.getStartDate() != null, Klptcm1ProStoppage::getStartDate, bo.getStartDate());
|
||||
// bo.endDate 是查询结束时间,stoppage.startDate 是停机开始时间
|
||||
lqw.le(bo.getEndDate() != null, Klptcm1ProStoppage::getStartDate, bo.getEndDate());
|
||||
lqw.eq(bo.getDURATION() != null, Klptcm1ProStoppage::getDuration, bo.getDURATION());
|
||||
lqw.eq(bo.getInsDate() != null, Klptcm1ProStoppage::getInsDate, bo.getInsDate());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getStopType()), Klptcm1ProStoppage::getStopType, bo.getStopType());
|
||||
//倒叙
|
||||
//倒序
|
||||
lqw.orderByDesc(Klptcm1ProStoppage::getInsDate);
|
||||
return lqw;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.klp.pocket.service.impl;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.klp.pocket.domain.vo.Klptcm1ShiftCurrentVo;
|
||||
import com.klp.pocket.mapper.Klptcm1ShiftCurrentMapper;
|
||||
import com.klp.pocket.service.IKlptcm1ShiftCurrentService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 当前班组Service实现类
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@DS("slave")
|
||||
@Service
|
||||
public class Klptcm1ShiftCurrentServiceImpl implements IKlptcm1ShiftCurrentService {
|
||||
|
||||
private final Klptcm1ShiftCurrentMapper shiftCurrentMapper;
|
||||
|
||||
@Override
|
||||
public Klptcm1ShiftCurrentVo getCurrentShift() {
|
||||
return shiftCurrentMapper.selectCurrent();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user