| | |
| | | import com.zy.common.utils.Synchro; |
| | | import com.zy.common.web.BaseController; |
| | | import com.zy.nc.entity.NccJcQilibcBarcodeflowWms; |
| | | import com.zy.nc.entity.NccXsckmxTkWms; |
| | | import com.zy.nc.service.NccJcQilibcBarcodeflowWmsService; |
| | | import com.zy.nc.service.NccXsckmxTkWmsService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | |
| | | @Autowired |
| | | private OrderDetlPakinService orderDetlPakinService; |
| | | |
| | | @Autowired |
| | | private NccXsckmxTkWmsService nccXsckmxTkWmsService; |
| | | |
| | | @RequestMapping("/pda/WarehouseOut/v1") |
| | | @ManagerAuth(memo = "并板途中拣料-参考念初") |
| | |
| | | matParam.setAnfme(nccJcQilibcBarcodeflowWms.getAsnnum() == null ? 0.0D : nccJcQilibcBarcodeflowWms.getAsnnum().doubleValue()); |
| | | matParam.setWeight(nccJcQilibcBarcodeflowWms.getNastnum() == null ? 0.0D : nccJcQilibcBarcodeflowWms.getNastnum().doubleValue()); |
| | | matParam.setAnfme2(nccJcQilibcBarcodeflowWms.getNastnum() == null ? 0.0D : nccJcQilibcBarcodeflowWms.getNastnum().doubleValue()); |
| | | matParam.setTiaoma(nccJcQilibcBarcodeflowWms.getVbarcode()); |
| | | return R.ok().add(matParam); |
| | | |
| | | } |
| | | |
| | | @RequestMapping(value = "/mat/auth") |
| | |
| | | matParam.setBatch(nccJcQilibcBarcodeflowWms.getVbatchcode()); |
| | | matParam.setAnfme(nccJcQilibcBarcodeflowWms.getAsnnum() == null ? 0.0D : nccJcQilibcBarcodeflowWms.getAsnnum().doubleValue()); |
| | | matParam.setAnfme2(nccJcQilibcBarcodeflowWms.getNastnum() == null ? 0.0D : nccJcQilibcBarcodeflowWms.getNastnum().doubleValue()); |
| | | matParam.setTiaoma(nccJcQilibcBarcodeflowWms.getVbarcode()); |
| | | return R.ok().add(matParam); |
| | | } |
| | | |
| | | @RequestMapping(value = "/mat/back") |
| | | @ManagerAuth |
| | | public R pdaSearchBack(@RequestParam String matnr) { |
| | | EntityWrapper<NccXsckmxTkWms> wrapper = new EntityWrapper<>(); |
| | | wrapper.like("VBATCHCODE", matnr); |
| | | List<NccXsckmxTkWms> nccXsckmxTkWmsList = nccXsckmxTkWmsService.selectList(wrapper); |
| | | if (nccXsckmxTkWmsList.isEmpty()) { |
| | | return R.error("未找到此条码"); |
| | | } |
| | | |
| | | List<String> orderNos = new ArrayList<>(); |
| | | List<HashMap<String, Object>> list = new ArrayList<>(); |
| | | for (NccXsckmxTkWms nccXsckmxTkWms : nccXsckmxTkWmsList) { |
| | | if (orderNos.contains(nccXsckmxTkWms.getVsourcebillcode())) { |
| | | continue; |
| | | } |
| | | orderNos.add(nccXsckmxTkWms.getVsourcebillcode()); |
| | | HashMap<String, Object> map = new HashMap<>(); |
| | | |
| | | Mat mat = matService.selectByMatnr(nccXsckmxTkWms.getWlbm()); |
| | | if (mat == null) { |
| | | continue; |
| | | } |
| | | MatParam matParam = new MatParam(); |
| | | Synchro.Copy(mat, matParam); |
| | | matParam.setBatch(nccXsckmxTkWms.getVbatchcode()); |
| | | matParam.setAnfme(0.0D); |
| | | matParam.setAnfme2(0.0D); |
| | | matParam.setTiaoma(matnr); |
| | | |
| | | map.put("orderNo", nccXsckmxTkWms.getVsourcebillcode()); |
| | | map.put("matData", matParam); |
| | | list.add(map); |
| | | } |
| | | return R.ok().add(list); |
| | | } |
| | | |
| | | @RequestMapping("/comb/auth") |
| | | @ManagerAuth(memo = "组托") |
| | | public R comb(@RequestBody CombParam combParam) { |