qiangxuan 3 сар өмнө
parent
commit
e9090909df

+ 2 - 2
zgztBus/jeecg-module-sbm/src/main/java/org/jeecg/modules/billet/rollClubOne/controller/RollClubOneDetailsController.java

@@ -165,7 +165,7 @@ public class RollClubOneDetailsController extends JeecgController<RollClubOneDet
 
 
 	@ApiOperation(value = "棒一热送单信息-分页列表查询", notes = "棒一热送单信息-分页列表查询")
-	@GetMapping(value = "/hotSendList")
+	@GetMapping(value = "/hotSendRollClubOneList")
 	public Result<IPage<HotSendRollClubOneDetails>> queryHotSendPageList(RollClubOneDetails rollClubOneDetails,
 																		 @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
 																		 @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
@@ -207,7 +207,7 @@ public class RollClubOneDetailsController extends JeecgController<RollClubOneDet
 	}
 
 	 @ApiOperation(value="棒一热送单明细查询", notes="棒一热送单明细查询")
-	 @GetMapping(value = "/hotSendDetailList")
+	 @GetMapping(value = "/hotSendRollClubOneDetailList")
 	 public Result<List<RollClubOneDetails>> queryHotSendDetailList(@RequestParam(name="ccmNo") String ccmNo, @RequestParam(name="heatNo") String heatNo) {
 		 // 根据铸机号、炉号查询棒一明细,返回List<RollClubOneDetails>
 		 QueryWrapper<RollClubOneDetails> queryWrapper = new QueryWrapper<>();

+ 1 - 1
zgztBus/jeecg-module-sbm/src/main/java/org/jeecg/modules/billet/rollClubOne/entity/RollClubOneDetails.java

@@ -119,6 +119,6 @@ public class RollClubOneDetails implements Serializable {
     private String assemblyNumber;
 
     @Excel(name = "棒一热送统计总数", width = 15)
-    @ApiModelProperty(value = "组坯号")
+    @ApiModelProperty(value = "棒一热送统计总数")
     private Integer hotsendSum;
 }

+ 61 - 1
zgztBus/jeecg-module-sbm/src/main/java/org/jeecg/modules/billet/rollHeight/controller/RollHeightDetailsController.java

@@ -11,17 +11,21 @@ import org.jeecg.common.api.vo.Result;
 import org.jeecg.common.aspect.annotation.AutoLog;
 import org.jeecg.common.system.base.controller.JeecgController;
 import org.jeecg.common.system.query.QueryGenerator;
+import org.jeecg.modules.billet.rollHeight.entity.HotSendRollHeightDetails;
 import org.jeecg.modules.billet.rollHeight.entity.RollHeightDetails;
 import org.jeecg.modules.billet.rollHeight.service.IRollHeightDetailsService;
+import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.servlet.ModelAndView;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
+import java.util.ArrayList;
 import java.util.Arrays;
+import java.util.List;
 
- /**
+/**
  * @Description: 高线明细信息
  * @Author: jeecg-boot
  * @Date:   2024-11-20
@@ -159,4 +163,60 @@ public class RollHeightDetailsController extends JeecgController<RollHeightDetai
         return super.importExcel(request, response, RollHeightDetails.class);
     }
 
+
+	@ApiOperation(value = "高线热送单信息-分页列表查询", notes = "高线热送单信息-分页列表查询")
+	@GetMapping(value = "/hotSendRollHeightList")
+	public Result<IPage<HotSendRollHeightDetails>> queryHotSendPageList(RollHeightDetails rollHeightDetails,
+																		@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
+																		@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
+																		HttpServletRequest req) {
+		QueryWrapper<RollHeightDetails> queryWrapper = QueryGenerator.initQueryWrapper(rollHeightDetails, req.getParameterMap());
+
+		queryWrapper.isNotNull("heat_no");
+		// 添加分组条件
+		queryWrapper.groupBy("heat_no");
+
+		// 如果需要统计每组的 hotsendSum 总和,可以添加聚合函数
+		queryWrapper.select("MAX(id) AS id", "GROUP_CONCAT( DISTINCT ccm_no ) AS ccmNo",
+				"GROUP_CONCAT( DISTINCT shift_group ) AS shiftGroup", "GROUP_CONCAT( DISTINCT shift ) AS shift",
+				"heat_no", "GROUP_CONCAT( DISTINCT steel ) AS steel", "MAX(start_num) AS startNum",
+				"MAX(end_num) AS endNum", "GROUP_CONCAT( DISTINCT spec ) AS spec",
+				"MAX(blank_output) AS blankOutput", "GROUP_CONCAT( DISTINCT size ) AS size",
+				"GROUP_CONCAT( DISTINCT license_plate ) AS licensePlate",
+				"GROUP_CONCAT( DISTINCT assembly_number ) AS assemblyNumber",
+				"MAX(create_time) as createTime", "COUNT(*) as hotsendSum");
+		Page<RollHeightDetails> page = new Page<>(pageNo, pageSize);
+
+		IPage<RollHeightDetails> pageList = rollHeightDetailsService.page(page, queryWrapper);
+
+		List<HotSendRollHeightDetails> hotSendRollClubOneDetailsList = new ArrayList<>();
+
+		List<RollHeightDetails> records = pageList.getRecords();
+		records.forEach(x -> {
+			HotSendRollHeightDetails hotSendRollHeightDetails = new HotSendRollHeightDetails();
+			hotSendRollHeightDetails.setDestination("高线");
+			hotSendRollHeightDetails.setHotsendSum(x.getHotsendSum());
+			BeanUtils.copyProperties(x, hotSendRollHeightDetails);
+			hotSendRollClubOneDetailsList.add(hotSendRollHeightDetails);
+		});
+
+		// 创建一个新的分页对象,封装 hotSendRollClubOneDetailsList
+		Page<HotSendRollHeightDetails> hotSendPage = new Page<>(pageNo, pageSize, pageList.getTotal());
+		hotSendPage.setRecords(hotSendRollClubOneDetailsList);
+
+		return Result.OK(hotSendPage);
+	}
+
+
+	@ApiOperation(value="高线热送单明细查询", notes="高线热送单明细查询")
+	@GetMapping(value = "/hotSendRollHeightDetailList")
+	public Result<List<RollHeightDetails>> queryHotSendDetailList(@RequestParam(name="ccmNo") String ccmNo, @RequestParam(name="heatNo") String heatNo) {
+		// 根据铸机号、炉号查询棒一明细,返回List<RollHeightDetails>
+		QueryWrapper<RollHeightDetails> queryWrapper = new QueryWrapper<>();
+		queryWrapper.eq("ccm_no", ccmNo);
+		queryWrapper.eq("heat_no", heatNo);
+		queryWrapper.orderByDesc("create_time");
+		List<RollHeightDetails> rollHeightDetailsList = rollHeightDetailsService.list(queryWrapper);
+		return Result.OK(rollHeightDetailsList);
+	}
 }

+ 103 - 0
zgztBus/jeecg-module-sbm/src/main/java/org/jeecg/modules/billet/rollHeight/entity/HotSendRollHeightDetails.java

@@ -0,0 +1,103 @@
+package org.jeecg.modules.billet.rollHeight.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.jeecg.common.aspect.annotation.Dict;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.util.Date;
+
+@Data
+public class HotSendRollHeightDetails {
+    /**id*/
+    @TableId(type = IdType.ASSIGN_ID)
+    @ApiModelProperty(value = "id")
+    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;
+    /**更新人*/
+    @ApiModelProperty(value = "更新人")
+    private String updateBy;
+    /**更新日期*/
+    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "更新日期")
+    private Date updateTime;
+    /**所属部门*/
+    @ApiModelProperty(value = "所属部门")
+    private String sysOrgCode;
+    /**炉号*/
+    @ApiModelProperty(value = "炉号")
+    private String heatNo;
+    /**铸机号*/
+    @ApiModelProperty(value = "铸机号")
+    private String ccmNo;
+    /**坯号*/
+    @ApiModelProperty(value = "坯号")
+    private String billetNo;
+    /**班组*/
+    @ApiModelProperty(value = "班组")
+    @Dict(dicCode = "lg_bz")
+    private String shiftGroup;
+    /**班别*/
+    @Dict(dicCode = "lg_bb")
+    @ApiModelProperty(value = "班别")
+    private String shift;
+    /**起始根数*/
+    @ApiModelProperty(value = "起始根数")
+    private Integer startNum;
+    /**结束根数*/
+    @ApiModelProperty(value = "结束根数")
+    private Integer endNum;
+    /**钢种*/
+    @ApiModelProperty(value = "钢种")
+    private String steel;
+    /**规格*/
+    @ApiModelProperty(value = "规格")
+    @Dict(dicCode = "billet_spec")
+    private String spec;
+    /**定尺1*/
+    @ApiModelProperty(value = "定尺")
+    @Dict(dicCode = "lg_dcgg")
+    private String size;
+
+    /**装运单ID*/
+    @ApiModelProperty(value = "装运单ID")
+    private String storageBillId;
+
+    @ApiModelProperty(value = "车牌号")
+    private String licensePlate;
+    /**出坯量*/
+    @ApiModelProperty(value = "出坯量")
+    private Double blankOutput;
+
+    /**堆垛层号(1-20)*/
+    @ApiModelProperty(value = "堆垛层号(1-20)")
+    private String stackStorey;
+    /**堆垛编号(1-9)*/
+    @ApiModelProperty(value = "堆垛编号(1-9)")
+    private String stackNum;
+    /**垛位*/
+    @ApiModelProperty(value = "垛位")
+    private String stackAddr;
+
+    /**
+     * 组坯号
+     */
+    @ApiModelProperty(value = "组坯号")
+    private String assemblyNumber;
+
+    // 添加用于存储分炉统计后的热送总数
+    private Integer hotsendSum;
+    // 添加用于存储目的地
+    private String destination;
+}

+ 5 - 1
zgztBus/jeecg-module-sbm/src/main/java/org/jeecg/modules/billet/rollHeight/entity/RollHeightDetails.java

@@ -128,6 +128,10 @@ public class RollHeightDetails implements Serializable {
      * 组坯号
      */
     @Excel(name = "组坯号", width = 15)
-    @ApiModelProperty(value = "组坯号", required = true)
+    @ApiModelProperty(value = "组坯号")
     private String assemblyNumber;
+
+    @Excel(name = "高线热送统计总数", width = 15)
+    @ApiModelProperty(value = "高线热送统计总数")
+    private Integer hotsendSum;
 }