| | |
| | | import org.springframework.transaction.interceptor.TransactionAspectSupport; |
| | | |
| | | import java.util.Date; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * Created by vincent on 2020/7/4 |
| | |
| | | private WaitPakinService waitPakinService; |
| | | @Autowired |
| | | private OrderDetlService orderDetlService; |
| | | |
| | | private static final Map<Integer,Integer> sourceSite = new HashMap<>(); |
| | | static { |
| | | sourceSite.put(1041,1040);sourceSite.put(1042,1040); |
| | | sourceSite.put(2011,2010);sourceSite.put(2012,2010); |
| | | sourceSite.put(2001,2000);sourceSite.put(2002,2000); |
| | | sourceSite.put(3011,3010);sourceSite.put(3010,1040); |
| | | } |
| | | |
| | | public ReturnT<String> start(WrkMast wrkMast) { |
| | | // 4.入库完成 |
| | |
| | | |
| | | // 更新入库站点的入库暂存数 |
| | | int sourceStaNo = wrkMast.getSourceStaNo() == null ? 0 : wrkMast.getSourceStaNo(); |
| | | if (sourceStaNo == 1041 || sourceStaNo == 2011 || sourceStaNo == 2001 || sourceStaNo == 3011 ) { |
| | | if (sourceSite.get(sourceStaNo) != null) { |
| | | BasDevpMapper basDevpMapper = SpringUtils.getBean(BasDevpMapper.class); |
| | | BasDevp basDevp = basDevpMapper.selectById(sourceStaNo - 1); |
| | | BasDevp basDevp = basDevpMapper.selectById(sourceSite.get(sourceStaNo)); |
| | | basDevp.setInQty(basDevp.getInQty() -1); |
| | | basDevpMapper.updateById(basDevp); |
| | | } |