package com.zy.asrs.service.impl; import com.core.common.BaseRes; import com.core.common.Cools; import com.core.exception.CoolException; import com.zy.asrs.entity.param.FullStoreParam; import com.zy.asrs.service.BasDevpService; import com.zy.asrs.service.WorkService; import com.zy.asrs.service.WrkMastService; import com.zy.common.service.DoubleDeepService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; /** * Created by vincent on 2020/6/11 */ @Service public class WorkServiceImpl implements WorkService { @Autowired private WrkMastService wrkMastService; @Autowired private BasDevpService basDevpService; @Autowired private DoubleDeepService doubleDeepService; @Override @Transactional public void startupFullStore(FullStoreParam param) { // 参数非空判断 if (Cools.isEmpty(param.getDevpNo(), param.getList())) { throw new CoolException(BaseRes.PARAM); } // 站点状态检测 basDevpService.checkSiteStatus(param.getDevpNo()); // 生成工作号 int workNo = doubleDeepService.getWorkNo(0); if (workNo == 0) { throw new CoolException("生成工作号失败,请联系管理员"); } else { if (wrkMastService.selectById(workNo)!=null) { throw new CoolException("生成工作号" + workNo + "在工作档中已存在"); } } // 库位检索 String locNo = doubleDeepService.getLocNo(); // if (staNo == null || staNo.get) // 获取最新的工作档 // WrkMast latestWrkMast = wrkMastService.selectOne(new EntityWrapper().orderBy("appe_time")); } }