qiangxuan 8 meses atrás
pai
commit
bea71b6151

+ 23 - 1
zgztBus/jeecg-module-sbm/src/main/java/org/jeecg/modules/actualControl/billetActual/billetActual/controller/BilletBasicInfoController.java

@@ -19,8 +19,9 @@ import org.springframework.web.servlet.ModelAndView;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import java.util.Arrays;
+import java.util.List;
 
- /**
+/**
  * @Description: 钢坯基础信息
  * @Author: jeecg-boot
  * @Date:   2024-05-16
@@ -152,4 +153,25 @@ public class BilletBasicInfoController extends JeecgController<BilletBasicInfo,
         return super.importExcel(request, response, BilletBasicInfo.class);
     }
 
+	 @AutoLog(value = "钢坯定尺信息-通过铸机和炉号")
+	 @ApiOperation(value="钢坯定尺信息-通过铸机和炉号", notes="钢坯定尺信息-通过铸机和炉号")
+	 @GetMapping(value = "/queryBilletLength")
+	 public Result<?> queryBilletLengthList(@RequestParam(name="ccmNo") Integer ccmNo, @RequestParam(name="heatNo") String heatNo) {
+		 List<Integer> billetLengthList = billetBasicInfoService.queryBilletLengthList(ccmNo, heatNo);
+		 if (billetLengthList.size() == 0){
+			 return Result.error("钢坯定尺信息不存在!");
+		 }
+		 return Result.OK(billetLengthList);
+	 }
+
+	@AutoLog(value = "钢坯类型名称信息-通过铸机号")
+	@ApiOperation(value="钢坯类型名称信息-通过铸机号", notes="钢坯类型名称信息-通过铸机号")
+	@GetMapping(value = "/queryBilletNameList")
+	public Result<?> queryBilletNameList(@RequestParam(name="castMachine") String castMachine) {
+		List<String> billetNameList = billetBasicInfoService.queryBilletNameList(castMachine);
+		if (billetNameList.size() == 0){
+			return Result.error("钢坯类型名称信息不存在!");
+		}
+		return Result.OK(billetNameList);
+	}
 }

+ 6 - 0
zgztBus/jeecg-module-sbm/src/main/java/org/jeecg/modules/actualControl/billetActual/billetActual/service/IBilletBasicInfoService.java

@@ -4,6 +4,8 @@ import com.baomidou.mybatisplus.extension.service.IService;
 import org.jeecg.modules.actualControl.billetActual.billetActual.entity.BilletBasicInfo;
 import org.jeecg.modules.billet.billetHotsend.entity.RulerDefaultConfig;
 
+import java.util.List;
+
 /**
  * @Description: 钢坯基础信息
  * @Author: jeecg-boot
@@ -15,4 +17,8 @@ public interface IBilletBasicInfoService extends IService<BilletBasicInfo> {
     void insertBatch(String sid, RulerDefaultConfig rulerDefaultConfig);
 
     void addC(BilletBasicInfo billetBasicInfo);
+
+    List<Integer> queryBilletLengthList(Integer ccmNo, String heatNo);
+
+    List<String> queryBilletNameList(String castMachine);
 }

+ 27 - 0
zgztBus/jeecg-module-sbm/src/main/java/org/jeecg/modules/actualControl/billetActual/billetActual/service/impl/BilletBasicInfoServiceImpl.java

@@ -7,8 +7,15 @@ import org.jeecg.modules.actualControl.billetActual.billetActual.entity.BilletBa
 import org.jeecg.modules.actualControl.billetActual.billetActual.mapper.BilletBasicInfoMapper;
 import org.jeecg.modules.actualControl.billetActual.billetActual.service.IBilletBasicInfoService;
 import org.jeecg.modules.billet.billetHotsend.entity.RulerDefaultConfig;
+import org.jeecg.modules.billet.billetHotsendConfig.entity.BilletHotsendTypeConfig;
+import org.jeecg.modules.billet.billetHotsendConfig.service.IBilletHotsendTypeConfigService;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import java.util.ArrayList;
+import java.util.List;
+import java.util.stream.Collectors;
+
 /**
  * @Description: 钢坯基础信息
  * @Author: jeecg-boot
@@ -18,6 +25,9 @@ import org.springframework.stereotype.Service;
 @Service
 public class BilletBasicInfoServiceImpl extends ServiceImpl<BilletBasicInfoMapper, BilletBasicInfo> implements IBilletBasicInfoService {
 
+    @Autowired
+    private IBilletHotsendTypeConfigService billetHotsendTypeConfigService;
+
     @Override
     public void insertBatch(String sid, RulerDefaultConfig rulerDefaultConfig) {
         for (int i = 0; i < 4; i++) {
@@ -40,5 +50,22 @@ public class BilletBasicInfoServiceImpl extends ServiceImpl<BilletBasicInfoMappe
         }
     }
 
+    @Override
+    public List<Integer> queryBilletLengthList(Integer ccmNo, String heatNo) {
+        LambdaQueryWrapper<BilletBasicInfo> queryWrapper = new LambdaQueryWrapper<>();
+        queryWrapper.eq(BilletBasicInfo::getCcmNo, ccmNo).eq(BilletBasicInfo::getHeatNo, heatNo).groupBy(BilletBasicInfo::getLength);
+        List<BilletBasicInfo> billetBasicInfoList = baseMapper.selectList(queryWrapper);
+        if (oConvertUtils.listIsEmpty(billetBasicInfoList)){
+            return new ArrayList<>();
+        }
+        List<Integer> billetLengthList = billetBasicInfoList.stream().map(BilletBasicInfo::getLength).collect(Collectors.toList());
+        return billetLengthList;
+    }
 
+    @Override
+    public List<String> queryBilletNameList(String castMachine) {
+        LambdaQueryWrapper<BilletHotsendTypeConfig> queryWrapper = new LambdaQueryWrapper<>();
+        queryWrapper.eq(BilletHotsendTypeConfig::getCastMachine, castMachine);
+        return billetHotsendTypeConfigService.list(queryWrapper).stream().map(BilletHotsendTypeConfig::getTypeName).collect(Collectors.toList());
+    }
 }

+ 13 - 29
zgztBus/jeecg-module-sbm/src/main/java/org/jeecg/modules/billet/billetHotsendConfig/controller/BilletHotsendTypeConfigController.java

@@ -1,41 +1,25 @@
-package org.jeecg.modules.demo.billetHotsendConfig.controller;
-
-import java.util.Arrays;
-import java.util.List;
-import java.util.Map;
-import java.util.stream.Collectors;
-import java.io.IOException;
-import java.io.UnsupportedEncodingException;
-import java.net.URLDecoder;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
-import org.jeecg.common.util.oConvertUtils;
-import org.jeecg.modules.demo.billetHotsendConfig.entity.BilletHotsendTypeConfig;
-import org.jeecg.modules.demo.billetHotsendConfig.service.IBilletHotsendTypeConfigService;
+package org.jeecg.modules.billet.billetHotsendConfig.controller;
 
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
-
-import org.jeecgframework.poi.excel.ExcelImportUtil;
-import org.jeecgframework.poi.excel.def.NormalExcelConstants;
-import org.jeecgframework.poi.excel.entity.ExportParams;
-import org.jeecgframework.poi.excel.entity.ImportParams;
-import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+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.billetHotsendConfig.entity.BilletHotsendTypeConfig;
+import org.jeecg.modules.billet.billetHotsendConfig.service.IBilletHotsendTypeConfigService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
-import org.springframework.web.multipart.MultipartFile;
-import org.springframework.web.multipart.MultipartHttpServletRequest;
 import org.springframework.web.servlet.ModelAndView;
-import com.alibaba.fastjson.JSON;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import org.jeecg.common.aspect.annotation.AutoLog;
-import org.apache.shiro.authz.annotation.RequiresPermissions;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.util.Arrays;
 
  /**
  * @Description: 钢坯类型配置

+ 20 - 19
zgztBus/jeecg-module-sbm/src/main/java/org/jeecg/modules/billet/billetHotsendConfig/entity/BilletHotsendTypeConfig.java

@@ -1,22 +1,19 @@
-package org.jeecg.modules.demo.billetHotsendConfig.entity;
+package org.jeecg.modules.billet.billetHotsendConfig.entity;
 
-import java.io.Serializable;
-import java.io.UnsupportedEncodingException;
-import java.util.Date;
-import java.math.BigDecimal;
 import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableName;
-import com.baomidou.mybatisplus.annotation.TableLogic;
-import lombok.Data;
 import com.fasterxml.jackson.annotation.JsonFormat;
-import org.springframework.format.annotation.DateTimeFormat;
-import org.jeecgframework.poi.excel.annotation.Excel;
-import org.jeecg.common.aspect.annotation.Dict;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
 import lombok.EqualsAndHashCode;
 import lombok.experimental.Accessors;
+import org.jeecgframework.poi.excel.annotation.Excel;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.io.Serializable;
+import java.util.Date;
 
 /**
  * @Description: 钢坯类型配置
@@ -35,36 +32,40 @@ public class BilletHotsendTypeConfig implements Serializable {
 	/**主键*/
 	@TableId(type = IdType.ASSIGN_ID)
     @ApiModelProperty(value = "主键")
-    private java.lang.String id;
+    private String id;
 	/**创建人*/
     @ApiModelProperty(value = "创建人")
-    private java.lang.String createBy;
+    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 java.util.Date createTime;
+    private Date createTime;
 	/**更新人*/
     @ApiModelProperty(value = "更新人")
-    private java.lang.String updateBy;
+    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 java.util.Date updateTime;
+    private Date updateTime;
 	/**所属部门*/
     @ApiModelProperty(value = "所属部门")
-    private java.lang.String sysOrgCode;
+    private String sysOrgCode;
 	/**铸机*/
 	@Excel(name = "铸机", width = 15)
     @ApiModelProperty(value = "铸机")
-    private java.lang.String castMachine;
+    private String castMachine;
 	/**名称*/
 	@Excel(name = "名称", width = 15)
     @ApiModelProperty(value = "名称")
-    private java.lang.String typeName;
+    private String typeName;
+
+    @Excel(name = "归属类型(0:棒线,1:堆垛类型)", width = 15)
+    @ApiModelProperty(value = "归属类型")
+    private Integer belongType;
 	/**备注*/
 	@Excel(name = "备注", width = 15)
     @ApiModelProperty(value = "备注")
-    private java.lang.String remark;
+    private String remark;
 }

+ 2 - 5
zgztBus/jeecg-module-sbm/src/main/java/org/jeecg/modules/billet/billetHotsendConfig/mapper/BilletHotsendTypeConfigMapper.java

@@ -1,10 +1,7 @@
-package org.jeecg.modules.demo.billetHotsendConfig.mapper;
+package org.jeecg.modules.billet.billetHotsendConfig.mapper;
 
-import java.util.List;
-
-import org.apache.ibatis.annotations.Param;
-import org.jeecg.modules.demo.billetHotsendConfig.entity.BilletHotsendTypeConfig;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.jeecg.modules.billet.billetHotsendConfig.entity.BilletHotsendTypeConfig;
 
 /**
  * @Description: 钢坯类型配置

+ 1 - 1
zgztBus/jeecg-module-sbm/src/main/java/org/jeecg/modules/billet/billetHotsendConfig/mapper/xml/BilletHotsendTypeConfigMapper.xml

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.jeecg.modules.demo.billetHotsendConfig.mapper.BilletHotsendTypeConfigMapper">
+<mapper namespace="org.jeecg.modules.billet.billetHotsendConfig.mapper.BilletHotsendTypeConfigMapper">
 
 </mapper>

+ 2 - 2
zgztBus/jeecg-module-sbm/src/main/java/org/jeecg/modules/billet/billetHotsendConfig/service/IBilletHotsendTypeConfigService.java

@@ -1,7 +1,7 @@
-package org.jeecg.modules.demo.billetHotsendConfig.service;
+package org.jeecg.modules.billet.billetHotsendConfig.service;
 
-import org.jeecg.modules.demo.billetHotsendConfig.entity.BilletHotsendTypeConfig;
 import com.baomidou.mybatisplus.extension.service.IService;
+import org.jeecg.modules.billet.billetHotsendConfig.entity.BilletHotsendTypeConfig;
 
 /**
  * @Description: 钢坯类型配置

+ 5 - 6
zgztBus/jeecg-module-sbm/src/main/java/org/jeecg/modules/billet/billetHotsendConfig/service/impl/BilletHotsendTypeConfigServiceImpl.java

@@ -1,11 +1,10 @@
-package org.jeecg.modules.demo.billetHotsendConfig.service.impl;
-
-import org.jeecg.modules.demo.billetHotsendConfig.entity.BilletHotsendTypeConfig;
-import org.jeecg.modules.demo.billetHotsendConfig.mapper.BilletHotsendTypeConfigMapper;
-import org.jeecg.modules.demo.billetHotsendConfig.service.IBilletHotsendTypeConfigService;
-import org.springframework.stereotype.Service;
+package org.jeecg.modules.billet.billetHotsendConfig.service.impl;
 
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.jeecg.modules.billet.billetHotsendConfig.entity.BilletHotsendTypeConfig;
+import org.jeecg.modules.billet.billetHotsendConfig.mapper.BilletHotsendTypeConfigMapper;
+import org.jeecg.modules.billet.billetHotsendConfig.service.IBilletHotsendTypeConfigService;
+import org.springframework.stereotype.Service;
 
 /**
  * @Description: 钢坯类型配置