Bladeren bron

update 自动化异常信息

qiangxuan 5 maanden geleden
bovenliggende
commit
02385b7865

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

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

+ 111 - 0
zgztBus/jeecg-module-sbm/src/main/java/org/jeecg/modules/billet/billetAutoException/entity/BilletAutoException.java

@@ -0,0 +1,111 @@
+package org.jeecg.modules.billet.billetAutoException.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: 钢坯自动化异常信息
+ * @Author: jeecg-boot
+ * @Date:   2025-01-07
+ * @Version: V1.0
+ */
+@Data
+@TableName("billet_auto_exception")
+@Accessors(chain = true)
+@EqualsAndHashCode(callSuper = false)
+@ApiModel(value="billet_auto_exception对象", description="钢坯自动化异常信息")
+public class BilletAutoException 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 = 15)
+    @ApiModelProperty(value = "铸机号")
+    private String ccmNo;
+	/**炉号*/
+	@Excel(name = "炉号", width = 15)
+    @ApiModelProperty(value = "炉号")
+    private String heatNo;
+	/**坯号集合*/
+	@Excel(name = "坯号集合", width = 15)
+    @ApiModelProperty(value = "坯号集合")
+    private String billetNos;
+	/**班组*/
+	@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 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(billet_hotsend_type_config)*/
+	@Excel(name = "目的地ID(billet_hotsend_type_config)", width = 15)
+    @ApiModelProperty(value = "目的地ID(billet_hotsend_type_config)")
+    private String bhtcId;
+	/**目的地名称*/
+	@Excel(name = "目的地名称", width = 15)
+    @ApiModelProperty(value = "目的地名称")
+    private String destination;
+	/**异常原因*/
+	@Excel(name = "异常原因", width = 15)
+    @ApiModelProperty(value = "异常原因")
+    private String massage;
+	/**备注*/
+	@Excel(name = "备注", width = 15)
+    @ApiModelProperty(value = "备注")
+    private String remark;
+}

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

@@ -0,0 +1,14 @@
+package org.jeecg.modules.billet.billetAutoException.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.jeecg.modules.billet.billetAutoException.entity.BilletAutoException;
+
+/**
+ * @Description: 钢坯自动化异常信息
+ * @Author: jeecg-boot
+ * @Date:   2025-01-07
+ * @Version: V1.0
+ */
+public interface BilletAutoExceptionMapper extends BaseMapper<BilletAutoException> {
+
+}

+ 5 - 0
zgztBus/jeecg-module-sbm/src/main/java/org/jeecg/modules/billet/billetAutoException/mapper/xml/BilletAutoExceptionMapper.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.billetAutoException.mapper.BilletAutoExceptionMapper">
+
+</mapper>

+ 15 - 0
zgztBus/jeecg-module-sbm/src/main/java/org/jeecg/modules/billet/billetAutoException/service/IBilletAutoExceptionService.java

@@ -0,0 +1,15 @@
+package org.jeecg.modules.billet.billetAutoException.service;
+
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import org.jeecg.modules.billet.billetAutoException.entity.BilletAutoException;
+
+/**
+ * @Description: 钢坯自动化异常信息
+ * @Author: jeecg-boot
+ * @Date:   2025-01-07
+ * @Version: V1.0
+ */
+public interface IBilletAutoExceptionService extends IService<BilletAutoException> {
+
+}

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

@@ -0,0 +1,18 @@
+package org.jeecg.modules.billet.billetAutoException.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.jeecg.modules.billet.billetAutoException.entity.BilletAutoException;
+import org.jeecg.modules.billet.billetAutoException.mapper.BilletAutoExceptionMapper;
+import org.jeecg.modules.billet.billetAutoException.service.IBilletAutoExceptionService;
+import org.springframework.stereotype.Service;
+
+/**
+ * @Description: 钢坯自动化异常信息
+ * @Author: jeecg-boot
+ * @Date:   2025-01-07
+ * @Version: V1.0
+ */
+@Service
+public class BilletAutoExceptionServiceImpl extends ServiceImpl<BilletAutoExceptionMapper, BilletAutoException> implements IBilletAutoExceptionService {
+
+}