|  |  |  | 
|---|
|  |  |  | import com.zy.asrs.service.MatBarcodeService; | 
|---|
|  |  |  | import com.zy.asrs.service.MatService; | 
|---|
|  |  |  | import com.zy.asrs.service.MobileService; | 
|---|
|  |  |  | import com.zy.asrs.service.WaitPakinService; | 
|---|
|  |  |  | import com.zy.common.web.BaseController; | 
|---|
|  |  |  | import org.springframework.beans.factory.annotation.Autowired; | 
|---|
|  |  |  | import org.springframework.web.bind.annotation.RequestBody; | 
|---|
|  |  |  | 
|---|
|  |  |  | private MobileService mobileService; | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private MatService matService; | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private WaitPakinService waitPakinService; | 
|---|
|  |  |  | /* | 
|---|
|  |  |  | * 物料托盘绑定分页查询 | 
|---|
|  |  |  | * */ | 
|---|
|  |  |  | 
|---|
|  |  |  | public R matnrLostBarcode(@RequestBody List<MatBarcode> list) { | 
|---|
|  |  |  | matBarcodeService.deleteMatBarcode(list); | 
|---|
|  |  |  | return R.ok(); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /* | 
|---|
|  |  |  | * 批量组托 | 
|---|
|  |  |  | * */ | 
|---|
|  |  |  | @RequestMapping("/barcodeMatnr/matnrAndBarcode") | 
|---|
|  |  |  | @ManagerAuth(memo = "物料托盘批量组托") | 
|---|
|  |  |  | public R matnrAndBarcode(@RequestBody List<MatBarcode> list) { | 
|---|
|  |  |  | if (Cools.isEmpty(list)){ | 
|---|
|  |  |  | return R.error(BaseRes.PARAM); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | for (MatBarcode matBarcode : list) { | 
|---|
|  |  |  | if (!matBarcode.getZpallet().equals(list.get(0).getZpallet())){ | 
|---|
|  |  |  | throw new CoolException("请选择相同托盘码的数据"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | waitPakinService.comb(list); | 
|---|
|  |  |  | return R.ok("组托成功"); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /*物料托盘绑定 | 
|---|
|  |  |  | 
|---|
|  |  |  | CombParam.CombMat combMat=new CombParam.CombMat(); | 
|---|
|  |  |  | combMat.setMatnr(mat.getMatnr()); | 
|---|
|  |  |  | combMat.setMaktx(mat.getMaktx()); | 
|---|
|  |  |  | combMat.setAnfme(waitPakin.getAnfme()); | 
|---|
|  |  |  | //        combMat.setAnfme(waitPakin.getAnfme()); | 
|---|
|  |  |  | combMat.setAnfme(1.0); | 
|---|
|  |  |  | combMats.add(combMat); | 
|---|
|  |  |  | combParam.setBarcode(waitPakin.getBarcode()); | 
|---|
|  |  |  | combParam.setCombMats(combMats); | 
|---|