| | |
| | | import com.zy.common.model.DetlDto; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | |
| | | @Autowired |
| | | private WaitPakinService waitPakinService; |
| | | |
| | | @Transactional |
| | | @Override |
| | | public void comb(List<MatBarcode> list) { |
| | | String zpallet = list.get(0).getZpallet(); |
| | |
| | | Mat mat = matService.selectByMatnr(matBarcode.getMatnr()); |
| | | if (Cools.isEmpty(mat)) { |
| | | throw new CoolException(matBarcode.getMatnr() + "商品档案不存在"); |
| | | } |
| | | |
| | | //对于已经组托过的 模具+托盘 不允许再次组托 |
| | | Integer waitPakinCount = waitPakinService.selectByBarcodeAndMatnr(matBarcode.getMatnr(), matBarcode.getZpallet()); |
| | | if (waitPakinCount >= 1){ |
| | | throw new CoolException("该模具已经组托,商品模具名称:" + matBarcode.getMatnr() + "托盘码:" + matBarcode.getZpallet()); |
| | | } |
| | | WaitPakin waitPakin1 = new WaitPakin(); |
| | | waitPakin1.sync(mat); |
| | |
| | | public Integer selectCountByMatNr(String matnr) { |
| | | return this.baseMapper.selectCountByMatNr(matnr); |
| | | } |
| | | |
| | | @Override |
| | | public Integer selectByBarcodeAndMatnr(String matnr, String zpallet) { |
| | | return this.baseMapper.selectByBarcodeAndMatnr(matnr, zpallet); |
| | | } |
| | | } |