diff --git a/ruoyi-admin/src/main/java/com/ruoyi/erp/controller/ErpMaterialReturnInspectionController.java b/ruoyi-admin/src/main/java/com/ruoyi/erp/controller/ErpMaterialReturnInspectionController.java index 76c3387a..ccc85b72 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/erp/controller/ErpMaterialReturnInspectionController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/erp/controller/ErpMaterialReturnInspectionController.java @@ -1,6 +1,8 @@ package com.ruoyi.erp.controller; import java.util.List; + +import com.ruoyi.erp.domain.ErpMaterialReturnInspectionExcelDto; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; @@ -63,8 +65,8 @@ public class ErpMaterialReturnInspectionController extends BaseController @ResponseBody public AjaxResult export(ErpMaterialReturnInspection erpMaterialReturnInspection) { - List list = erpMaterialReturnInspectionService.selectErpMaterialReturnInspectionList(erpMaterialReturnInspection); - ExcelUtil util = new ExcelUtil(ErpMaterialReturnInspection.class); + List list = erpMaterialReturnInspectionService.selectExportList(erpMaterialReturnInspection); + ExcelUtil util = new ExcelUtil(ErpMaterialReturnInspectionExcelDto.class); return util.exportExcel(list, "物料退检单数据"); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/erp/domain/ErpMaterialReturnInspectionExcelDto.java b/ruoyi-admin/src/main/java/com/ruoyi/erp/domain/ErpMaterialReturnInspectionExcelDto.java new file mode 100644 index 00000000..aa4a70ad --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/erp/domain/ErpMaterialReturnInspectionExcelDto.java @@ -0,0 +1,39 @@ +package com.ruoyi.erp.domain; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.ruoyi.common.annotation.Excel; +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + +/** + * @author xiguniang + * @description ErpMaterialReturnInspectionExcelDto + * @date 2024/5/11 21:07 + */ +@Data +public class ErpMaterialReturnInspectionExcelDto implements Serializable { + @Excel(name = "退检单号") + private String returnInspectionNo; + @Excel(name = "料号") + private String materialNo; + @Excel(name = "物料名称") + private String materialName; + @Excel(name = "退检数量") + private Long returnInspectionNum; + @Excel(name = "退检类型") + private String returnInspectionType; + /** 领料时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "领料时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date pickMaterialTime; + @Excel(name = "退检备注") + private String returnInspectionRemark; + @Excel(name = "异常原因") + private String abnormalCause; + @Excel(name = "责任单位") + private String dutyUnit; + @Excel(name = "复检备注") + private String recheckRemark; +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/erp/mapper/ErpMaterialReturnInspectionMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/erp/mapper/ErpMaterialReturnInspectionMapper.java index 23cbb7e4..ccbcc0a9 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/erp/mapper/ErpMaterialReturnInspectionMapper.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/erp/mapper/ErpMaterialReturnInspectionMapper.java @@ -2,6 +2,7 @@ package com.ruoyi.erp.mapper; import java.util.List; import com.ruoyi.erp.domain.ErpMaterialReturnInspection; +import com.ruoyi.erp.domain.ErpMaterialReturnInspectionExcelDto; /** * 物料退检单Mapper接口 @@ -74,4 +75,6 @@ public interface ErpMaterialReturnInspectionMapper * @return 结果 */ public int restoreErpMaterialReturnInspectionById(Long id); + + List selectExportList(ErpMaterialReturnInspection erpMaterialReturnInspection); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/erp/service/IErpMaterialReturnInspectionService.java b/ruoyi-admin/src/main/java/com/ruoyi/erp/service/IErpMaterialReturnInspectionService.java index b387b410..60e77a69 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/erp/service/IErpMaterialReturnInspectionService.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/erp/service/IErpMaterialReturnInspectionService.java @@ -2,6 +2,7 @@ package com.ruoyi.erp.service; import java.util.List; import com.ruoyi.erp.domain.ErpMaterialReturnInspection; +import com.ruoyi.erp.domain.ErpMaterialReturnInspectionExcelDto; /** * 物料退检单Service接口 @@ -72,4 +73,6 @@ public interface IErpMaterialReturnInspectionService * @return */ int restoreErpMaterialReturnInspectionById(Long id); + + List selectExportList(ErpMaterialReturnInspection erpMaterialReturnInspection); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/erp/service/impl/ErpMaterialReturnInspectionServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/erp/service/impl/ErpMaterialReturnInspectionServiceImpl.java index 1f208120..3b5cd7b3 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/erp/service/impl/ErpMaterialReturnInspectionServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/erp/service/impl/ErpMaterialReturnInspectionServiceImpl.java @@ -9,6 +9,7 @@ import com.ruoyi.common.core.redis.RedisCache; import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.ShiroUtils; import com.ruoyi.erp.domain.ErpMaterialReturnInspectionDetail; +import com.ruoyi.erp.domain.ErpMaterialReturnInspectionExcelDto; import com.ruoyi.erp.service.IErpMaterialReturnInspectionDetailService; import com.ruoyi.system.domain.SysMakeorderPickDetail; import org.springframework.beans.factory.annotation.Autowired; @@ -178,4 +179,9 @@ public class ErpMaterialReturnInspectionServiceImpl implements IErpMaterialRetur { return erpMaterialReturnInspectionMapper.restoreErpMaterialReturnInspectionById(id); } + + @Override + public List selectExportList(ErpMaterialReturnInspection erpMaterialReturnInspection) { + return erpMaterialReturnInspectionMapper.selectExportList(erpMaterialReturnInspection); + } } diff --git a/ruoyi-admin/src/main/resources/mapper/erp/ErpMaterialReturnInspectionMapper.xml b/ruoyi-admin/src/main/resources/mapper/erp/ErpMaterialReturnInspectionMapper.xml index 94ad1c01..0f136d44 100644 --- a/ruoyi-admin/src/main/resources/mapper/erp/ErpMaterialReturnInspectionMapper.xml +++ b/ruoyi-admin/src/main/resources/mapper/erp/ErpMaterialReturnInspectionMapper.xml @@ -19,6 +19,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + + + + + + + + + + + + + select a.id, a.del_flag, a.create_by, a.create_time, a.update_by, a.update_time, a.remark, a.return_inspection_no, a.make_no, a.return_material_time, a.urgency_level, a.is_closed from erp_material_return_inspection a @@ -58,7 +71,44 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" where a.id = #{id} - + + insert into erp_material_return_inspection