From 82dc799db3c539bf7e36a96d85a6bd789db554e3 Mon Sep 17 00:00:00 2001 From: haozq <1611483981@qq.com> Date: Tue, 12 Nov 2024 13:04:16 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../business/bases/service/PartInputServiceImpl.java | 11 +++++++++++ src/main/resources/mappers/bases/PaTypeMapper.xml | 4 ++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/bonus/gzgqj/business/bases/service/PartInputServiceImpl.java b/src/main/java/com/bonus/gzgqj/business/bases/service/PartInputServiceImpl.java index ac7ff20..cc73b50 100644 --- a/src/main/java/com/bonus/gzgqj/business/bases/service/PartInputServiceImpl.java +++ b/src/main/java/com/bonus/gzgqj/business/bases/service/PartInputServiceImpl.java @@ -1,10 +1,12 @@ package com.bonus.gzgqj.business.bases.service; import com.alibaba.fastjson.JSON; +import com.bonus.gzgqj.business.bases.entity.PartInputDetails; import com.bonus.gzgqj.business.bases.entity.PartInputVo; import com.bonus.gzgqj.business.bases.mapper.PartInputMapper; import com.bonus.gzgqj.business.plan.entity.ProOutInfoVo; import com.bonus.gzgqj.manager.common.util.StringHelper; +import com.bonus.gzgqj.manager.common.util.UserUtil; import com.bonus.gzgqj.manager.webResult.ServerResponse; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; @@ -66,6 +68,15 @@ public class PartInputServiceImpl implements PartInputService{ if(files==null || files.length<=0){ return ServerResponse.createErroe("未上传入库单"); } + List list=vo.getDetails(); + if(list==null || list.isEmpty()){ + return ServerResponse.createErroe("请上传入库配件"); + } + + long userId= UserUtil.getLoginUser().getUserId(); + String userName=UserUtil.getLoginUser().getUsername(); + //int num=mapper.addInputData(vo); + diff --git a/src/main/resources/mappers/bases/PaTypeMapper.xml b/src/main/resources/mappers/bases/PaTypeMapper.xml index c91d875..ca83f64 100644 --- a/src/main/resources/mappers/bases/PaTypeMapper.xml +++ b/src/main/resources/mappers/bases/PaTypeMapper.xml @@ -23,8 +23,8 @@ pt.price,pt.unit,pt.weight,pt.is_consumables , pt.remarks,pt.is_active ,pt.level,pt.warn_num FROM pa_type pt - left join pa_type pt1 on pt.parent_id=pt1.id and pt1.`level`=2 and pt1.is_active=1 - WHERE pt.is_active=1 and id=#{id} + left join pa_type pt1 on pt.parent_id=pt1.id and pt1.`level`=2 and pt1.is_active=1 + WHERE pt.is_active=1 and pt.id=#{id}