guoyujia 10 月之前
父節點
當前提交
e34d0a0518

+ 106 - 0
src/main/java/cn/ezhizao/project/business/processErrorStatistics/controller/BizProcessDocumentsErrorStatisticsController.java

@@ -0,0 +1,106 @@
+package cn.ezhizao.project.business.processErrorStatistics.controller;
+
+import java.util.List;
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletResponse;
+
+import cn.ezhizao.common.utils.poi.ExcelUtil;
+import cn.ezhizao.framework.aspectj.lang.annotation.Log;
+import cn.ezhizao.framework.aspectj.lang.enums.BusinessType;
+import cn.ezhizao.framework.web.controller.BaseController;
+import cn.ezhizao.framework.web.domain.AjaxResult;
+import cn.ezhizao.framework.web.page.TableDataInfo;
+import cn.ezhizao.project.business.processErrorStatistics.domain.BizProcessDocumentsErrorStatistics;
+import cn.ezhizao.project.business.processErrorStatistics.service.IBizProcessDocumentsErrorStatisticsService;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+
+/**
+ * 工艺文件制作错误次数统计Controller
+ *
+ * @author ezhizao
+ * @date 2024-08-02
+ */
+@RestController
+@RequestMapping("/business/ProcessErrorStatistics")
+public class BizProcessDocumentsErrorStatisticsController extends BaseController
+{
+    @Resource
+    private IBizProcessDocumentsErrorStatisticsService bizProcessDocumentsErrorStatisticsService;
+
+    /**
+     * 查询工艺文件制作错误次数统计列表
+     */
+    @GetMapping("/list")
+    public TableDataInfo list(BizProcessDocumentsErrorStatistics bizProcessDocumentsErrorStatistics) throws NoSuchFieldException, IllegalAccessException
+    {
+        setTenantId(bizProcessDocumentsErrorStatistics);
+        startPage();
+        List<BizProcessDocumentsErrorStatistics> list = bizProcessDocumentsErrorStatisticsService.getList(bizProcessDocumentsErrorStatistics);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出工艺文件制作错误次数统计列表
+     */
+    @PreAuthorize("@ss.hasPermi('business:ProcessErrorStatistics:export')")
+    @Log(title = "工艺文件制作错误次数统计", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, BizProcessDocumentsErrorStatistics bizProcessDocumentsErrorStatistics) throws NoSuchFieldException, IllegalAccessException
+    {
+        setTenantId(bizProcessDocumentsErrorStatistics);
+        List<BizProcessDocumentsErrorStatistics> list = bizProcessDocumentsErrorStatisticsService.getList(bizProcessDocumentsErrorStatistics);
+        ExcelUtil<BizProcessDocumentsErrorStatistics> util = new ExcelUtil<BizProcessDocumentsErrorStatistics>(BizProcessDocumentsErrorStatistics.class);
+        util.exportExcel(response, list, "工艺文件制作错误次数统计数据");
+    }
+
+    /**
+     * 获取工艺文件制作错误次数统计详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('business:ProcessErrorStatistics:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return success(bizProcessDocumentsErrorStatisticsService.getById(id));
+    }
+
+    /**
+     * 新增工艺文件制作错误次数统计
+     */
+    @Log(title = "工艺文件制作错误次数统计", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody BizProcessDocumentsErrorStatistics bizProcessDocumentsErrorStatistics) throws NoSuchFieldException, IllegalAccessException
+    {
+        setTenantId(bizProcessDocumentsErrorStatistics);
+        return toAjax(bizProcessDocumentsErrorStatisticsService.save(bizProcessDocumentsErrorStatistics));
+    }
+
+    /**
+     * 修改工艺文件制作错误次数统计
+     */
+    @Log(title = "工艺文件制作错误次数统计", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody BizProcessDocumentsErrorStatistics bizProcessDocumentsErrorStatistics) throws NoSuchFieldException, IllegalAccessException
+    {
+        setTenantId(bizProcessDocumentsErrorStatistics);
+        return toAjax(bizProcessDocumentsErrorStatisticsService.updateById(bizProcessDocumentsErrorStatistics));
+    }
+
+    /**
+     * 删除工艺文件制作错误次数统计
+     */
+    @Log(title = "工艺文件制作错误次数统计", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable List<Long> ids)
+    {
+        return toAjax(bizProcessDocumentsErrorStatisticsService.removeBatchByIds(ids));
+    }
+}

+ 100 - 0
src/main/java/cn/ezhizao/project/business/processErrorStatistics/domain/BizProcessDocumentsErrorStatistics.java

@@ -0,0 +1,100 @@
+package cn.ezhizao.project.business.processErrorStatistics.domain;
+
+import java.util.Date;
+
+import cn.ezhizao.framework.aspectj.lang.annotation.Excel;
+import cn.ezhizao.framework.web.domain.BaseEntity;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.baomidou.mybatisplus.annotation.TableName;
+
+import lombok.Data;
+import io.swagger.annotations.ApiModelProperty;
+
+
+/**
+ * 工艺文件制作错误次数统计对象 biz_process_documents_error_statistics
+ *
+ * @author ezhizao
+ * @date 2024-08-02
+ */
+@Data
+@TableName(value = "biz_process_documents_error_statistics")
+public class BizProcessDocumentsErrorStatistics extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 租户(厂别)id */
+    @ApiModelProperty(value = "${comment}")
+    private Long tenantId;
+
+    /** 交易代码 */
+    @Excel(name = "交易代码")
+    @ApiModelProperty(value = "交易代码")
+    private String transactionCode;
+
+    /** 生产计划单id */
+    @ApiModelProperty(value = "交易代码")
+    private Long productionPlanDetailId;
+
+    /** 类型(0:内部;1:外部 */
+    @Excel(name = "类型", readConverterExp = "类型(0:内部;1:外部")
+    @ApiModelProperty(value = "类型")
+    private String type;
+
+    /** 客户简称 */
+    @Excel(name = "客户简称")
+    @ApiModelProperty(value = "客户简称")
+    private String companyAlias;
+
+    /** 产品规格 */
+    @Excel(name = "产品规格")
+    @ApiModelProperty(value = "产品规格")
+    private String specification;
+
+    /** 产品图号 */
+    @Excel(name = "产品图号")
+    @ApiModelProperty(value = "产品图号")
+    private String drawingNumber;
+
+    /** 工艺错误次数 */
+    @Excel(name = "工艺错误次数")
+    @ApiModelProperty(value = "工艺错误次数")
+    private Long errorQuantity;
+
+    /** 季度目标 */
+    @Excel(name = "季度目标")
+    @ApiModelProperty(value = "季度目标")
+    private Integer quarterTarget;
+
+    /** 投诉内容 */
+    @Excel(name = "投诉内容")
+    @ApiModelProperty(value = "投诉内容")
+    private String complaintContent;
+
+    /** 目标完成情况(0:达标;1;不达标) */
+    @Excel(name = "目标完成情况", readConverterExp = "0=:达标;1;不达标")
+    @ApiModelProperty(value = "目标完成情况")
+    private Integer status;
+
+    /** 年份 */
+    @Excel(name = "年份")
+    @ApiModelProperty(value = "年份")
+    private String year;
+
+    /** 季度 */
+    @Excel(name = "季度")
+    @ApiModelProperty(value = "季度")
+    private String quarter;
+
+    /** 日期 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "日期", width = 30, dateFormat = "yyyy-MM-dd")
+    @ApiModelProperty(value = "日期")
+    private Date date;
+    @TableField(exist = false)
+    private String startYear;
+    @TableField(exist = false)
+    private String endYear;
+
+}

+ 31 - 0
src/main/java/cn/ezhizao/project/business/processErrorStatistics/mapper/BizProcessDocumentsErrorStatisticsMapper.java

@@ -0,0 +1,31 @@
+package cn.ezhizao.project.business.processErrorStatistics.mapper;
+
+import java.util.List;
+
+import cn.ezhizao.project.business.processErrorStatistics.domain.BizProcessDocumentsErrorStatistics;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+
+/**
+ * 工艺文件制作错误次数统计Mapper接口
+ *
+ * @author ezhizao
+ * @date 2024-08-02
+ */
+public interface BizProcessDocumentsErrorStatisticsMapper extends BaseMapper<BizProcessDocumentsErrorStatistics>
+{
+    /**
+     * 查询工艺文件制作错误次数统计列表
+     *
+     * @param bizProcessDocumentsErrorStatistics 工艺文件制作错误次数统计
+     * @return 工艺文件制作错误次数统计集合
+     */
+    public List<BizProcessDocumentsErrorStatistics> getList(BizProcessDocumentsErrorStatistics bizProcessDocumentsErrorStatistics);
+
+    /**
+     * 物理删除
+     * @param bizProcessDocumentsErrorStatistics
+     * @return 删除结果
+    */
+    public int physicalDelete(BizProcessDocumentsErrorStatistics bizProcessDocumentsErrorStatistics);
+}

+ 32 - 0
src/main/java/cn/ezhizao/project/business/processErrorStatistics/service/IBizProcessDocumentsErrorStatisticsService.java

@@ -0,0 +1,32 @@
+package cn.ezhizao.project.business.processErrorStatistics.service;
+
+import java.util.List;
+
+import cn.ezhizao.project.business.processErrorStatistics.domain.BizProcessDocumentsErrorStatistics;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+
+/**
+ * 工艺文件制作错误次数统计Service接口
+ *
+ * @author ezhizao
+ * @date 2024-08-02
+ */
+public interface IBizProcessDocumentsErrorStatisticsService extends IService<BizProcessDocumentsErrorStatistics>
+{
+    /**
+     * 查询工艺文件制作错误次数统计列表
+     *
+     * @param bizProcessDocumentsErrorStatistics 工艺文件制作错误次数统计
+     * @return 工艺文件制作错误次数统计集合
+     */
+    public List<BizProcessDocumentsErrorStatistics> getList(BizProcessDocumentsErrorStatistics bizProcessDocumentsErrorStatistics);
+
+    /**
+     * 物理删除
+     * @param bizProcessDocumentsErrorStatistics
+     * @return 删除结果
+     */
+    public int physicalDelete(BizProcessDocumentsErrorStatistics bizProcessDocumentsErrorStatistics);
+
+}

+ 45 - 0
src/main/java/cn/ezhizao/project/business/processErrorStatistics/service/impl/BizProcessDocumentsErrorStatisticsServiceImpl.java

@@ -0,0 +1,45 @@
+package cn.ezhizao.project.business.processErrorStatistics.service.impl;
+
+import java.util.List;
+import javax.annotation.Resource;
+
+import cn.ezhizao.project.business.processErrorStatistics.domain.BizProcessDocumentsErrorStatistics;
+import cn.ezhizao.project.business.processErrorStatistics.mapper.BizProcessDocumentsErrorStatisticsMapper;
+import cn.ezhizao.project.business.processErrorStatistics.service.IBizProcessDocumentsErrorStatisticsService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+
+/**
+ * 工艺文件制作错误次数统计Service业务层处理
+ *
+ * @author ezhizao
+ * @date 2024-08-02
+ */
+@Service
+public class BizProcessDocumentsErrorStatisticsServiceImpl  extends ServiceImpl<BizProcessDocumentsErrorStatisticsMapper, BizProcessDocumentsErrorStatistics> implements IBizProcessDocumentsErrorStatisticsService
+{
+    @Resource
+    private BizProcessDocumentsErrorStatisticsMapper bizProcessDocumentsErrorStatisticsMapper;
+
+    /**
+     * 查询工艺文件制作错误次数统计列表
+     *
+     * @param bizProcessDocumentsErrorStatistics 工艺文件制作错误次数统计
+     * @return 工艺文件制作错误次数统计
+     */
+    @Override
+    public List<BizProcessDocumentsErrorStatistics> getList(BizProcessDocumentsErrorStatistics bizProcessDocumentsErrorStatistics)
+    {
+        return bizProcessDocumentsErrorStatisticsMapper.getList(bizProcessDocumentsErrorStatistics);
+    }
+
+    /**
+     * 物理删除
+     * @param bizProcessDocumentsErrorStatistics
+     * @return 删除结果
+     */
+    @Override
+    public int physicalDelete(BizProcessDocumentsErrorStatistics bizProcessDocumentsErrorStatistics){ return bizProcessDocumentsErrorStatisticsMapper.physicalDelete(bizProcessDocumentsErrorStatistics); };
+
+}

+ 41 - 0
src/main/resources/mybatis/business/processErrorStatistics/BizProcessDocumentsErrorStatisticsMapper.xml

@@ -0,0 +1,41 @@
+<?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="cn.ezhizao.project.business.processErrorStatistics.mapper.BizProcessDocumentsErrorStatisticsMapper">
+
+    <resultMap type="cn.ezhizao.project.business.processErrorStatistics.domain.BizProcessDocumentsErrorStatistics" id="BizProcessDocumentsErrorStatisticsResult">
+        <id column="id" property="id"/>
+    </resultMap>
+
+
+    <select id="getList" parameterType="BizProcessDocumentsErrorStatistics" resultMap="BizProcessDocumentsErrorStatisticsResult">
+        SELECT * FROM biz_process_documents_error_statistics
+        <trim prefix=" WHERE" suffix="" suffixOverrides="AND">
+            deleted = 0
+            <if test="transactionCode != null  and transactionCode != ''"> AND transaction_code = #{transactionCode}</if>
+            <if test="type != null "> AND type = #{type}</if>
+            <if test="companyAlias != null  and companyAlias != ''"> AND company_alias = #{companyAlias}</if>
+            <if test="specification != null  and specification != ''"> AND specification = #{specification}</if>
+            <if test="drawingNumber != null  and drawingNumber != ''"> AND drawing_number = #{drawingNumber}</if>
+            <if test="errorQuantity != null "> AND error_quantity = #{errorQuantity}</if>
+            <if test="quarterTarget != null "> AND quarter_target = #{quarterTarget}</if>
+            <if test="complaintContent != null  and complaintContent != ''"> AND complaint_content = #{complaintContent}</if>
+            <if test="status != null "> AND status = #{status}</if>
+            <if test="startYear != null "> AND year &gt;= #{startYear}</if>
+            <if test="endYear != null "> AND year &lt;= #{endYear}</if>
+            <if test="quarter != null  and quarter != ''"> AND quarter = #{quarter}</if>
+            <if test="date != null "> AND date = #{date}</if>
+        </trim>
+    </select>
+
+    <delete id="physicalDelete">
+        DELETE FROM biz_process_documents_error_statistics
+        <trim prefix=" WHERE" suffix="" suffixOverrides="AND">
+            <if test="id != null">
+                id = #{id} AND
+            </if>
+       <!-- 删除条件为其他外键可以在这里加 -->
+        </trim>
+    </delete>
+</mapper>