瀏覽代碼

钢坯临时表添加和装运明细查询调整

qiangxuan 5 月之前
父節點
當前提交
051b53a132

+ 162 - 0
zgztBus/jeecg-module-sbm/src/main/java/org/jeecg/modules/billet/billetAutoTmp/controller/BilletAutoTmpController.java

@@ -0,0 +1,162 @@
+package org.jeecg.modules.billet.billetAutoTmp.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.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.billetAutoTmp.entity.BilletAutoTmp;
+import org.jeecg.modules.billet.billetAutoTmp.service.IBilletAutoTmpService;
+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.Arrays;
+
+ /**
+ * @Description: billet_auto_tmp
+ * @Author: jeecg-boot
+ * @Date:   2025-01-09
+ * @Version: V1.0
+ */
+@Api(tags="billet_auto_tmp")
+@RestController
+@RequestMapping("/billetAutoTmp/billetAutoTmp")
+@Slf4j
+public class BilletAutoTmpController extends JeecgController<BilletAutoTmp, IBilletAutoTmpService> {
+	@Autowired
+	private IBilletAutoTmpService billetAutoTmpService;
+	
+	/**
+	 * 分页列表查询
+	 *
+	 * @param billetAutoTmp
+	 * @param pageNo
+	 * @param pageSize
+	 * @param req
+	 * @return
+	 */
+	//@AutoLog(value = "billet_auto_tmp-分页列表查询")
+	@ApiOperation(value="billet_auto_tmp-分页列表查询", notes="billet_auto_tmp-分页列表查询")
+	@GetMapping(value = "/list")
+	public Result<IPage<BilletAutoTmp>> queryPageList(BilletAutoTmp billetAutoTmp,
+													  @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
+													  @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
+													  HttpServletRequest req) {
+		QueryWrapper<BilletAutoTmp> queryWrapper = QueryGenerator.initQueryWrapper(billetAutoTmp, req.getParameterMap());
+		Page<BilletAutoTmp> page = new Page<BilletAutoTmp>(pageNo, pageSize);
+		IPage<BilletAutoTmp> pageList = billetAutoTmpService.page(page, queryWrapper);
+		return Result.OK(pageList);
+	}
+	
+	/**
+	 *   添加
+	 *
+	 * @param billetAutoTmp
+	 * @return
+	 */
+	@AutoLog(value = "billet_auto_tmp-添加")
+	@ApiOperation(value="billet_auto_tmp-添加", notes="billet_auto_tmp-添加")
+	@RequiresPermissions("billetAutoTmp:billet_auto_tmp:add")
+	@PostMapping(value = "/add")
+	public Result<String> add(@RequestBody BilletAutoTmp billetAutoTmp) {
+		billetAutoTmpService.save(billetAutoTmp);
+		return Result.OK("添加成功!");
+	}
+	
+	/**
+	 *  编辑
+	 *
+	 * @param billetAutoTmp
+	 * @return
+	 */
+	@AutoLog(value = "billet_auto_tmp-编辑")
+	@ApiOperation(value="billet_auto_tmp-编辑", notes="billet_auto_tmp-编辑")
+	@RequiresPermissions("billetAutoTmp:billet_auto_tmp:edit")
+	@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
+	public Result<String> edit(@RequestBody BilletAutoTmp billetAutoTmp) {
+		billetAutoTmpService.updateById(billetAutoTmp);
+		return Result.OK("编辑成功!");
+	}
+	
+	/**
+	 *   通过id删除
+	 *
+	 * @param id
+	 * @return
+	 */
+	@AutoLog(value = "billet_auto_tmp-通过id删除")
+	@ApiOperation(value="billet_auto_tmp-通过id删除", notes="billet_auto_tmp-通过id删除")
+	@RequiresPermissions("billetAutoTmp:billet_auto_tmp:delete")
+	@DeleteMapping(value = "/delete")
+	public Result<String> delete(@RequestParam(name="id",required=true) String id) {
+		billetAutoTmpService.removeById(id);
+		return Result.OK("删除成功!");
+	}
+	
+	/**
+	 *  批量删除
+	 *
+	 * @param ids
+	 * @return
+	 */
+	@AutoLog(value = "billet_auto_tmp-批量删除")
+	@ApiOperation(value="billet_auto_tmp-批量删除", notes="billet_auto_tmp-批量删除")
+	@RequiresPermissions("billetAutoTmp:billet_auto_tmp:deleteBatch")
+	@DeleteMapping(value = "/deleteBatch")
+	public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
+		this.billetAutoTmpService.removeByIds(Arrays.asList(ids.split(",")));
+		return Result.OK("批量删除成功!");
+	}
+	
+	/**
+	 * 通过id查询
+	 *
+	 * @param id
+	 * @return
+	 */
+	//@AutoLog(value = "billet_auto_tmp-通过id查询")
+	@ApiOperation(value="billet_auto_tmp-通过id查询", notes="billet_auto_tmp-通过id查询")
+	@GetMapping(value = "/queryById")
+	public Result<BilletAutoTmp> queryById(@RequestParam(name="id",required=true) String id) {
+		BilletAutoTmp billetAutoTmp = billetAutoTmpService.getById(id);
+		if(billetAutoTmp==null) {
+			return Result.error("未找到对应数据");
+		}
+		return Result.OK(billetAutoTmp);
+	}
+
+    /**
+    * 导出excel
+    *
+    * @param request
+    * @param billetAutoTmp
+    */
+    @RequiresPermissions("billetAutoTmp:billet_auto_tmp:exportXls")
+    @RequestMapping(value = "/exportXls")
+    public ModelAndView exportXls(HttpServletRequest request, BilletAutoTmp billetAutoTmp) {
+        return super.exportXls(request, billetAutoTmp, BilletAutoTmp.class, "billet_auto_tmp");
+    }
+
+    /**
+      * 通过excel导入数据
+    *
+    * @param request
+    * @param response
+    * @return
+    */
+    @RequiresPermissions("billetAutoTmp:billet_auto_tmp:importExcel")
+    @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
+    public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
+        return super.importExcel(request, response, BilletAutoTmp.class);
+    }
+
+}

+ 125 - 0
zgztBus/jeecg-module-sbm/src/main/java/org/jeecg/modules/billet/billetAutoTmp/entity/BilletAutoTmp.java

@@ -0,0 +1,125 @@
+package org.jeecg.modules.billet.billetAutoTmp.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.annotation.JsonFormat;
+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: billet_auto_tmp
+ * @Author: jeecg-boot
+ * @Date:   2025-01-09
+ * @Version: V1.0
+ */
+@Data
+@TableName("billet_auto_tmp")
+@Accessors(chain = true)
+@EqualsAndHashCode(callSuper = false)
+@ApiModel(value="billet_auto_tmp对象", description="billet_auto_tmp")
+public class BilletAutoTmp implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+	/**主键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;
+	/**日期*/
+	@Excel(name = "日期", width = 20, format = "yyyy-MM-dd HH:mm:ss")
+	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "日期")
+    private Date createDate;
+	/**铸机号*/
+	@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 String billetNo;
+	/**起始根*/
+	@Excel(name = "起始根", width = 15)
+    @ApiModelProperty(value = "起始根")
+    private Integer startNum;
+	/**结束根*/
+	@Excel(name = "结束根", width = 15)
+    @ApiModelProperty(value = "结束根")
+    private Integer endNum;
+    /**堆垛层号(1-20)*/
+    @Excel(name = "堆垛层号(1-20)", width = 15)
+    @ApiModelProperty(value = "堆垛层号(1-20)")
+    private String stackStorey;
+    /**堆垛编号(1-9)*/
+    @Excel(name = "堆垛编号(1-9)", width = 15)
+    @ApiModelProperty(value = "堆垛编号(1-9)")
+    private String stackNum;
+    /**垛位*/
+    @Excel(name = "垛位", width = 15)
+    @ApiModelProperty(value = "垛位")
+    private String stackAddr;
+	/**装运单ID*/
+	@Excel(name = "装运单ID", width = 15)
+    @ApiModelProperty(value = "装运单ID")
+    private String storageBillId;
+	/**钢种*/
+	@Excel(name = "钢种", width = 15)
+    @ApiModelProperty(value = "钢种")
+    private String steel;
+	/**规格*/
+	@Excel(name = "规格", width = 15)
+    @ApiModelProperty(value = "规格")
+    private String spec;
+	/**定尺*/
+	@Excel(name = "定尺", width = 15)
+    @ApiModelProperty(value = "定尺")
+    private String size;
+	/**车牌号*/
+	@Excel(name = "车牌号", width = 15)
+    @ApiModelProperty(value = "车牌号")
+    private String licensePlate;
+	/**出坯量*/
+	@Excel(name = "出坯量", width = 15)
+    @ApiModelProperty(value = "出坯量")
+    private Double blankOutput;
+}

+ 14 - 0
zgztBus/jeecg-module-sbm/src/main/java/org/jeecg/modules/billet/billetAutoTmp/mapper/BilletAutoTmpMapper.java

@@ -0,0 +1,14 @@
+package org.jeecg.modules.billet.billetAutoTmp.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.jeecg.modules.billet.billetAutoTmp.entity.BilletAutoTmp;
+
+/**
+ * @Description: billet_auto_tmp
+ * @Author: jeecg-boot
+ * @Date:   2025-01-09
+ * @Version: V1.0
+ */
+public interface BilletAutoTmpMapper extends BaseMapper<BilletAutoTmp> {
+
+}

+ 5 - 0
zgztBus/jeecg-module-sbm/src/main/java/org/jeecg/modules/billet/billetAutoTmp/mapper/xml/BilletAutoTmpMapper.xml

@@ -0,0 +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.billet.billetAutoTmp.mapper.BilletAutoTmpMapper">
+
+</mapper>

+ 14 - 0
zgztBus/jeecg-module-sbm/src/main/java/org/jeecg/modules/billet/billetAutoTmp/service/IBilletAutoTmpService.java

@@ -0,0 +1,14 @@
+package org.jeecg.modules.billet.billetAutoTmp.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import org.jeecg.modules.billet.billetAutoTmp.entity.BilletAutoTmp;
+
+/**
+ * @Description: billet_auto_tmp
+ * @Author: jeecg-boot
+ * @Date:   2025-01-09
+ * @Version: V1.0
+ */
+public interface IBilletAutoTmpService extends IService<BilletAutoTmp> {
+
+}

+ 18 - 0
zgztBus/jeecg-module-sbm/src/main/java/org/jeecg/modules/billet/billetAutoTmp/service/impl/BilletAutoTmpServiceImpl.java

@@ -0,0 +1,18 @@
+package org.jeecg.modules.billet.billetAutoTmp.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.jeecg.modules.billet.billetAutoTmp.entity.BilletAutoTmp;
+import org.jeecg.modules.billet.billetAutoTmp.mapper.BilletAutoTmpMapper;
+import org.jeecg.modules.billet.billetAutoTmp.service.IBilletAutoTmpService;
+import org.springframework.stereotype.Service;
+
+/**
+ * @Description: billet_auto_tmp
+ * @Author: jeecg-boot
+ * @Date:   2025-01-09
+ * @Version: V1.0
+ */
+@Service
+public class BilletAutoTmpServiceImpl extends ServiceImpl<BilletAutoTmpMapper, BilletAutoTmp> implements IBilletAutoTmpService {
+
+}

+ 27 - 1
zgztBus/jeecg-module-sbm/src/main/java/org/jeecg/modules/billet/storageBill/service/impl/StorageBillServiceImpl.java

@@ -1,5 +1,6 @@
 package org.jeecg.modules.billet.storageBill.service.impl;
 
+import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@@ -9,6 +10,8 @@ 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.billet.billetAutoTmp.entity.BilletAutoTmp;
+import org.jeecg.modules.billet.billetAutoTmp.service.IBilletAutoTmpService;
 import org.jeecg.modules.billet.billetHotsend.entity.BilletHotsendDetailsVo;
 import org.jeecg.modules.billet.billetHotsend.entity.RollClubCommon;
 import org.jeecg.modules.billet.billetHotsendChangeShift.entity.BilletHotsendChangeShift;
@@ -26,9 +29,13 @@ import org.jeecg.modules.billet.rollHeight.entity.RollHeightDetails;
 import org.jeecg.modules.billet.rollHeight.service.IRollHeightDetailsService;
 import org.jeecg.modules.billet.rollOutShipp.entity.RollOutShippDetails;
 import org.jeecg.modules.billet.rollOutShipp.service.IRollOutShippDetailsService;
-import org.jeecg.modules.billet.storageBill.entity.*;
+import org.jeecg.modules.billet.storageBill.entity.BilletHotsendDetails;
+import org.jeecg.modules.billet.storageBill.entity.ShiftEnum;
+import org.jeecg.modules.billet.storageBill.entity.ShiftGroupEnum;
+import org.jeecg.modules.billet.storageBill.entity.StorageBill;
 import org.jeecg.modules.billet.storageBill.mapper.StorageBillMapper;
 import org.jeecg.modules.billet.storageBill.service.IStorageBillService;
+import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.data.redis.core.RedisTemplate;
 import org.springframework.stereotype.Service;
@@ -84,6 +91,9 @@ public class StorageBillServiceImpl extends ServiceImpl<StorageBillMapper, Stora
     @Autowired
     private IOperateLogService operateLogService;
 
+    @Autowired
+    private IBilletAutoTmpService billetAutoTmpService;
+
     @Override
     public void departHandle(BilletHotsendDetailsVo billetHotsendDetailsVo) {
         StorageBill storageBill = billetHotsendDetailsVo.getStorageBill();
@@ -129,8 +139,23 @@ public class StorageBillServiceImpl extends ServiceImpl<StorageBillMapper, Stora
         //根据部门orgCode查询部门,需要将职位id进行传递
         BilletHotsendTypeConfig billetHotsendTypeConfig = billetHotsendTypeConfigService.getById(storageBill.getTypeConfigId());
         if (oConvertUtils.isEmpty(billetHotsendTypeConfig)){
+            log.info("{}{}", "钢坯类型配置信息查询为空,装运明细查询失败", JSON.toJSON(storageBill));
             return null;
         }
+        if ("billet_auto_tmp".equals(billetHotsendTypeConfig.getBelongTable())){
+            List<BilletAutoTmp> billetAutoTmpList = billetAutoTmpService.list(new LambdaQueryWrapper<BilletAutoTmp>().eq(BilletAutoTmp::getStorageBillId, storageBill.getId()));
+            if (oConvertUtils.listIsNotEmpty(billetAutoTmpList)){
+                List<RollClubTwoDetails> rollClubTwoDetailsList = new ArrayList<>();
+                billetAutoTmpList.forEach(x ->{
+                    RollClubTwoDetails rollClubTwoDetails = new RollClubTwoDetails();
+                    BeanUtils.copyProperties(x, rollClubTwoDetails);
+                    rollClubTwoDetailsList.add(rollClubTwoDetails);
+                });
+                result.setRollClubTwoDetailsList(rollClubTwoDetailsList);
+                return result;
+            }
+            return result;
+        }
         List<RollClubOneDetails> rollClubOneDetailsList = rollClubOneDetailsService.list(new LambdaQueryWrapper<RollClubOneDetails>().eq(RollClubOneDetails::getStorageBillId, storageBill.getId()));
         result.setRollClubOneDetailsList(rollClubOneDetailsList);
         List<RollClubTwoDetails> rollClubTwoDetailsList = rollClubTwoDetailsService.list(new LambdaQueryWrapper<RollClubTwoDetails>().eq(RollClubTwoDetails::getStorageBillId, storageBill.getId()));
@@ -141,6 +166,7 @@ public class StorageBillServiceImpl extends ServiceImpl<StorageBillMapper, Stora
         result.setRollOutShippDetailsList(rollOutShippDetailsList);
         List<RollHeightDetails> rollHeightDetails = rollHeightDetailsService.list(new LambdaQueryWrapper<RollHeightDetails>().eq(RollHeightDetails::getStorageBillId, storageBill.getId()));
         result.setRollHeightDetails(rollHeightDetails);
+
         //        List<StackingDownLogDetails> stackingDownLogDetailsList = new ArrayList<>();
 //        List<StackingDownLog> stackingDownLogList = stackingDownLogService.list(new LambdaQueryWrapper<StackingDownLog>().eq(StackingDownLog::getStorageBillId, storageBill.getId()));
 //        if (oConvertUtils.listIsEmpty(stackingDownLogList)){