From 8cfe20288690f2ba46c804f41f39e8aa48c2dea0 Mon Sep 17 00:00:00 2001 From: admin <15939171744@163.com> Date: 星期六, 15 六月 2024 09:08:30 +0800 Subject: [PATCH] 上传逻辑大版本更新 --- jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/service/impl/OmProductionOrdeInfoServiceImpl.java | 62 +++++++++++++++++++++++++++++++ 1 files changed, 62 insertions(+), 0 deletions(-) diff --git a/jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/service/impl/OmProductionOrdeInfoServiceImpl.java b/jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/service/impl/OmProductionOrdeInfoServiceImpl.java index 31601d7..fcd563a 100644 --- a/jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/service/impl/OmProductionOrdeInfoServiceImpl.java +++ b/jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/service/impl/OmProductionOrdeInfoServiceImpl.java @@ -3,12 +3,18 @@ import java.util.List; import java.util.stream.Collectors; +import cn.hutool.core.util.ObjectUtil; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.jcdm.common.core.domain.AjaxResult; import com.jcdm.common.utils.DateUtils; import com.jcdm.main.om.productionOrde.domain.OmProductionOrdeInfo; import com.jcdm.main.om.productionOrde.mapper.OmProductionOrdeInfoMapper; import com.jcdm.main.om.productionOrde.service.IOmProductionOrdeInfoService; +import com.jcdm.main.restful.factoryMes.service.RestfulService; +import lombok.extern.slf4j.Slf4j; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -18,9 +24,12 @@ * @author ruimin * @date 2023-12-11 */ +@Slf4j @Service public class OmProductionOrdeInfoServiceImpl extends ServiceImpl<OmProductionOrdeInfoMapper,OmProductionOrdeInfo> implements IOmProductionOrdeInfoService { + private static final Logger logger = LoggerFactory.getLogger("sys-user"); + @Autowired private OmProductionOrdeInfoMapper omProductionOrdeInfoMapper; @@ -135,4 +144,57 @@ omProductionOrdeInfoService.updateOmProductionOrdeInfo(currentOrdeInfos.get(0)); return AjaxResult.success("绉诲姩鎴愬姛"); } + + @Override + public void overrideSaveBatch(List<OmProductionOrdeInfo> omProductionOrdeInfoList) { + try { + this.saveBatch(omProductionOrdeInfoList); + }catch (Exception e){ + return; + } + } + + @Override + public AjaxResult receivingWorkOrders() { + return null; + } + + @Override + public AjaxResult trolleyYardBinDing(OmProductionOrdeInfo omProductionOrdeInfo) { + OmProductionOrdeInfo clearTrolleyYard = omProductionOrdeInfoService.getOne(new LambdaQueryWrapper<OmProductionOrdeInfo>().eq(OmProductionOrdeInfo::getTrolleyYard, omProductionOrdeInfo.getTrolleyYard())); + if(clearTrolleyYard!=null){ + clearTrolleyYard.setTrolleyYard(""); + omProductionOrdeInfoService.saveOrUpdate(clearTrolleyYard); + } + OmProductionOrdeInfo one = omProductionOrdeInfoService.getOne(new LambdaQueryWrapper<OmProductionOrdeInfo>().eq(OmProductionOrdeInfo::getProductNum, omProductionOrdeInfo.getProductNum())); + one.setTrolleyYard(omProductionOrdeInfo.getTrolleyYard()); + omProductionOrdeInfoService.saveOrUpdate(one); + logger.info("缁戝畾pack鐮亄}鍒板皬杞︼細{}",omProductionOrdeInfo.getProductNum(),omProductionOrdeInfo.getTrolleyYard()); + + return AjaxResult.success(); + } + + @Override + public AjaxResult getCarCodeSize(OmProductionOrdeInfo omProductionOrdeInfo) { +// omProductionOrdeInfo. + return null; + } + + @Override + public AjaxResult findBytrolleyYardGetOne(OmProductionOrdeInfo omProductionOrdeInfo) { + String str = ""; + OmProductionOrdeInfo one = omProductionOrdeInfoService.getOne(new LambdaQueryWrapper<OmProductionOrdeInfo>().eq(OmProductionOrdeInfo::getTrolleyYard, omProductionOrdeInfo.getTrolleyYard())); + if(one == null){ + str = "2"; + }else { + str = one.getProductNum(); + } + return AjaxResult.success(str); + } + + @Override + public List<OmProductionOrdeInfo> checkCarCode(OmProductionOrdeInfo omProductionOrdeInfo) { + List<OmProductionOrdeInfo> list = omProductionOrdeInfoService.list(new LambdaQueryWrapper<OmProductionOrdeInfo>().eq(OmProductionOrdeInfo::getProductNum, omProductionOrdeInfo.getProductNum()).isNotNull(OmProductionOrdeInfo::getTrolleyYard)); + return list; + } } -- Gitblit v1.9.3