Browse Source

Merge branch 'master' of 123.57.213.14:guoqiang.duan/zgzt-bus-java into master

lingpeng.li 2 tháng trước cách đây
mục cha
commit
458b61a97e

+ 54 - 0
zgztBus/jeecg-module-sbm/src/main/java/org/jeecg/modules/billet/billetHotsendChangeShift/controller/BilletHotsendChangeShiftController.java

@@ -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);
+	}
 }

+ 104 - 0
zgztBus/jeecg-module-sbm/src/main/java/org/jeecg/modules/billet/billetHotsendChangeShift/entity/BilletShiftPerformance.java

@@ -0,0 +1,104 @@
+package org.jeecg.modules.billet.billetHotsendChangeShift.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import org.jeecgframework.poi.excel.annotation.Excel;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.util.Date;
+
+@Data
+public class BilletShiftPerformance {
+
+    @TableId(type = IdType.ASSIGN_ID)
+    @ApiModelProperty(value = "主键")
+    private String id;
+    /**创建人*/
+    @ApiModelProperty(value = "创建人")
+    private String createBy;
+
+    /**创建日期*/
+    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "创建日期")
+    private Date createTime;
+
+    /**铸机*/
+    @Excel(name = "铸机号", width = 15)
+    @ApiModelProperty(value = "铸机号")
+    private String ccmNo;
+
+    /**当前浇铸炉号*/
+    @Excel(name = "当前浇铸炉号", width = 15)
+    @ApiModelProperty(value = "当前浇铸炉号")
+    private String heatNo;
+
+    /**班组*/
+    @Excel(name = "班组", width = 15)
+    @ApiModelProperty(value = "班组")
+    private String shiftGroup;
+
+    /**班别*/
+    @Excel(name = "班别", width = 15)
+    @ApiModelProperty(value = "班别")
+    private String shift;
+
+    /**当班总重*/
+    @Excel(name = "当班总重", width = 15)
+    @ApiModelProperty(value = "当班总重")
+    private Double shiftProduct;
+
+    /**当班总数*/
+    @Excel(name = "当班总数", width = 15)
+    @ApiModelProperty(value = "当班总数")
+    private Integer shiftSum;
+
+
+    @Excel(name = "交班时间", width = 15)
+    @ApiModelProperty(value = "交班时间")
+    private Date changeShiftTime;
+
+
+
+
+    /**当前废品支数*/
+    @Excel(name = "当前废品支数", width = 15)
+    @ApiModelProperty(value = "当前废品支数")
+    private Integer shiftWasteAmount;
+
+
+
+    /**当前热送支数*/
+    @Excel(name = "当前热送支数", width = 15)
+    @ApiModelProperty(value = "当前热送支数")
+    private Integer shiftHotsendAmount;
+
+    /**当前热送支数*/
+    @Excel(name = "当前热送重量", width = 15)
+    @ApiModelProperty(value = "当前热送重量")
+    private Double shiftHotsendWeight;
+
+    /**当前热装支数*/
+    @Excel(name = "当前热装支数", width = 15)
+    @ApiModelProperty(value = "当前热装支数")
+    private Integer shiftHotfeignAmount;
+
+    /**当前热装支数*/
+    @Excel(name = "当前热装重量", width = 15)
+    @ApiModelProperty(value = "当前热装重量")
+    private Double shiftHotfeignWeight;
+
+    /**当前起垛支数*/
+    @Excel(name = "当前起垛支数", width = 15)
+    @ApiModelProperty(value = "当前起垛支数")
+    private Integer shiftStackAmount;
+
+
+    /**当前起垛支数*/
+    @Excel(name = "当前起垛重量", width = 15)
+    @ApiModelProperty(value = "当前起垛重量")
+    private Double shiftStackWeight;
+}