|
@@ -15,14 +15,18 @@ import org.jeecg.common.system.base.controller.JeecgController;
|
|
|
import org.jeecg.common.system.query.QueryGenerator;
|
|
|
import org.jeecg.common.util.DateUtils;
|
|
|
import org.jeecg.common.util.oConvertUtils;
|
|
|
+import org.jeecg.modules.actualControl.billetActual.billetActual.entity.BilletBasicInfo;
|
|
|
+import org.jeecg.modules.actualControl.billetActual.billetActual.service.IBilletBasicInfoService;
|
|
|
import org.jeecg.modules.actualControl.heatsActuals.service.IHeatsActualsService;
|
|
|
import org.jeecg.modules.billet.billetHotsendChangeShift.entity.BilletHotsendChangeShift;
|
|
|
+import org.jeecg.modules.billet.billetHotsendChangeShift.entity.BilletShiftPerformance;
|
|
|
import org.jeecg.modules.billet.billetHotsendChangeShift.service.IBilletHotsendChangeShiftService;
|
|
|
import org.jeecg.modules.billet.billetHotsendChangeShift.util.ScheduleUtils;
|
|
|
import org.jeecg.modules.billet.billetHotsendChangeShift.util.ShiftInfo;
|
|
|
import org.jeecg.modules.billet.operateLog.service.IOperateLogService;
|
|
|
import org.jeecg.modules.billet.storageBill.entity.ShiftEnum;
|
|
|
import org.jeecg.modules.billet.storageBill.entity.ShiftGroupEnum;
|
|
|
+import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.data.redis.core.RedisTemplate;
|
|
|
import org.springframework.scheduling.annotation.Scheduled;
|
|
@@ -35,6 +39,7 @@ import java.time.LocalDateTime;
|
|
|
import java.time.LocalTime;
|
|
|
import java.time.YearMonth;
|
|
|
import java.time.format.DateTimeFormatter;
|
|
|
+import java.util.ArrayList;
|
|
|
import java.util.Arrays;
|
|
|
import java.util.Date;
|
|
|
import java.util.List;
|
|
@@ -62,6 +67,9 @@ public class BilletHotsendChangeShiftController extends JeecgController<BilletHo
|
|
|
@Autowired
|
|
|
private IHeatsActualsService heatsActualsService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private IBilletBasicInfoService billetBasicInfoService;
|
|
|
+
|
|
|
/**
|
|
|
* 分页列表查询
|
|
|
*
|
|
@@ -384,4 +392,50 @@ public class BilletHotsendChangeShiftController extends JeecgController<BilletHo
|
|
|
String nextCacheId = oConvertUtils.getString(redisTemplate.opsForValue().get(nextshiftIdKey));
|
|
|
log.info("获取索引ID结果:", nextCacheId);
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+ @ApiOperation(value="班次实绩查询-分页列表查询", notes="班次实绩查询-分页列表查询")
|
|
|
+ @GetMapping(value = "/shiftPerformanceList")
|
|
|
+ public Result<IPage<BilletShiftPerformance>> queryShiftPerformanceListPageList(BilletHotsendChangeShift billetHotsendChangeShift,
|
|
|
+ @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
|
|
+ @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
|
|
+ HttpServletRequest req) {
|
|
|
+ QueryWrapper<BilletHotsendChangeShift> queryWrapper = QueryGenerator.initQueryWrapper(billetHotsendChangeShift, req.getParameterMap());
|
|
|
+
|
|
|
+ Page<BilletHotsendChangeShift> page = new Page<BilletHotsendChangeShift>(pageNo, pageSize);
|
|
|
+ IPage<BilletHotsendChangeShift> pageList = billetHotsendChangeShiftService.page(page, queryWrapper);
|
|
|
+
|
|
|
+ List<BilletHotsendChangeShift> list = pageList.getRecords();
|
|
|
+ List<BilletShiftPerformance> billetShiftPerformanceList = new ArrayList<>();
|
|
|
+
|
|
|
+ for (BilletHotsendChangeShift billetHotsendChangeShift1 : list) {
|
|
|
+ BilletShiftPerformance billetShiftPerformance = new BilletShiftPerformance();
|
|
|
+ BeanUtils.copyProperties(billetHotsendChangeShift1, billetShiftPerformance);
|
|
|
+ // 根据ccmNo、shift、shiftGroup、交班开始时间到交班结束时间范围 查询对应钢坯基础信息所有数据
|
|
|
+ LambdaQueryWrapper<BilletBasicInfo> queryWrapper1 = new LambdaQueryWrapper<>();
|
|
|
+ queryWrapper1.eq(BilletBasicInfo::getCcmNo, billetHotsendChangeShift1.getCcmNo());
|
|
|
+ queryWrapper1.eq(BilletBasicInfo::getShift, billetHotsendChangeShift1.getShift());
|
|
|
+ queryWrapper1.eq(BilletBasicInfo::getShiftGroup, billetHotsendChangeShift1.getShiftGroup());
|
|
|
+ queryWrapper1.between(BilletBasicInfo::getCreateTime, billetHotsendChangeShift1.getCreateTime(), billetHotsendChangeShift1.getChangeShiftTime());
|
|
|
+ List<BilletBasicInfo> billetBasicInfoList = billetBasicInfoService.list(queryWrapper1);
|
|
|
+ if (oConvertUtils.listIsNotEmpty(billetBasicInfoList)){
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ billetShiftPerformanceList.add(billetShiftPerformance);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ // 创建新的分页对象,并设置相关属性
|
|
|
+ Page<BilletShiftPerformance> newPage = new Page<>(pageNo, pageSize);
|
|
|
+ newPage.setRecords(billetShiftPerformanceList);
|
|
|
+ newPage.setTotal(pageList.getTotal());
|
|
|
+ newPage.setPages(pageList.getPages());
|
|
|
+ newPage.setCurrent(pageList.getCurrent());
|
|
|
+ newPage.setSize(pageList.getSize());
|
|
|
+ return Result.OK(newPage);
|
|
|
+ }
|
|
|
}
|