From abc8131e9279c5a5bdcf90dcca56004e8643fb1c Mon Sep 17 00:00:00 2001 From: whyclxw <810412026@qq.com> Date: 星期二, 23 七月 2024 10:34:43 +0800 Subject: [PATCH] 不良品录入 --- src/main/java/com/whyc/service/DefectiveProductsService.java | 24 ++++++++++++++++++++++-- 1 files changed, 22 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/whyc/service/DefectiveProductsService.java b/src/main/java/com/whyc/service/DefectiveProductsService.java index 17e1014..271ce1b 100644 --- a/src/main/java/com/whyc/service/DefectiveProductsService.java +++ b/src/main/java/com/whyc/service/DefectiveProductsService.java @@ -1,11 +1,15 @@ package com.whyc.service; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import com.whyc.dto.DefectiveDto; import com.whyc.dto.MailDTO; import com.whyc.dto.Response; import com.whyc.mapper.DefectiveProductsMapper; import com.whyc.mapper.DocUserMapper; import com.whyc.pojo.DefectiveProducts; +import com.whyc.pojo.DefectiveProductsHistory; import com.whyc.pojo.DocUser; import com.whyc.pojo.ProductHistory; import com.whyc.util.ActionUtil; @@ -67,8 +71,11 @@ //ZipUtils.toZip(fileList,new FileOutputStream(new File(rootFile+feedbackZipPath))); defective.setFileUrl("doc_file" + File.separator + defectiveDirSuffix); } - //淇濆瓨 - defective.setStartTime(date); + + if(defective.getStartTime()==null){ + //淇濆瓨 + defective.setStartTime(date); + } mapper.insert(defective); //鍙戦�侀偖浠� String receiverIds = defective.getReceiverIds(); @@ -111,4 +118,17 @@ defectiveHisService.addHis(defective); return new Response().set(1,true,"涓嶈壇鍝佹搷浣滃畬鎴�"); } + + //涓嶈壇鍝侀椤垫帹閫� + public Response getDefectiveLimit(DefectiveDto defectiveDto) { + PageHelper.startPage(defectiveDto.getPageCurr(),defectiveDto.getPageSize()); + List<DefectiveProducts> list=mapper.getDefectiveLimit(defectiveDto); + PageInfo pageInfo=new PageInfo(list); + return new Response().setII(1,list!=null,pageInfo,"涓嶈壇鍝侀椤垫帹閫�"); + } + + //澶勭悊涓嶈壇鍝� + public Response updateDefective(DefectiveProductsHistory defectiveHis) { + return new Response().set(1,true); + } } \ No newline at end of file -- Gitblit v1.9.1