| | |
| | | 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.mybatis.spring.annotation.MapperScannerRegistrar; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | private ManLocDetlMapper manLocDetlMapper; |
| | | @Autowired |
| | | private WrkDetlLogService wrkDetlLogService; |
| | | @Autowired |
| | | private WrkMastLogService wrkMastLogService; |
| | | |
| | | @Autowired |
| | | private MatService matService; |
| | |
| | | |
| | | @Autowired |
| | | private OrderDetlPakinService orderDetlPakinService; |
| | | |
| | | @Autowired |
| | | private NccXsckmxTkWmsService nccXsckmxTkWmsService; |
| | | @Autowired |
| | | private MapperScannerRegistrar mapperScannerRegistrar; |
| | | |
| | | @RequestMapping("/pda/WarehouseOut/v1") |
| | | @ManagerAuth(memo = "并板途中拣料-参考念初") |
| | |
| | | |
| | | @RequestMapping(value = "/mat/back") |
| | | @ManagerAuth |
| | | public R pdaSearchBack(@RequestParam String matnr) { |
| | | EntityWrapper<NccXsckmxTkWms> wrapper = new EntityWrapper<>(); |
| | | wrapper.like("VBATCHCODE", matnr); |
| | | NccXsckmxTkWms nccXsckmxTkWms = nccXsckmxTkWmsService.selectOne(wrapper); |
| | | if (null == nccXsckmxTkWms) { |
| | | return R.error("未找到此条码"); |
| | | public R pdaSearchBack(@RequestParam String barcode) { |
| | | WrkMastLog wrkMastLog = wrkMastLogService.selectOne(new EntityWrapper<WrkMastLog>() |
| | | .eq("barcode", barcode) |
| | | .in("io_type", 101, 103, 107) |
| | | .orderBy("appe_time", false) |
| | | ); |
| | | |
| | | if(null == wrkMastLog) { |
| | | return R.error("未找到此托盘码出库记录"); |
| | | } |
| | | Mat mat = matService.selectByMatnr(nccXsckmxTkWms.getWlbm()); |
| | | |
| | | List<WrkDetlLog> wrkDetlLogs = wrkDetlLogService.selectList(new EntityWrapper<WrkDetlLog>() |
| | | .eq("wrk_no", wrkMastLog.getWrkNo()) |
| | | .eq("zpallet", barcode) |
| | | .orderBy("io_time", false) |
| | | ); |
| | | if (wrkDetlLogs.isEmpty()) { |
| | | return R.error("未找到此托盘码出库记录明细"); |
| | | } |
| | | |
| | | WrkDetlLog wrkDetlLog = wrkDetlLogs.get(0); |
| | | String batch = wrkDetlLog.getBatch(); |
| | | |
| | | HashMap<String, Object> map = new HashMap<>(); |
| | | Mat mat = matService.selectByMatnr(wrkDetlLog.getMatnr()); |
| | | if (mat == null) { |
| | | return R.error("未找到物料明细"); |
| | | } |
| | | MatParam matParam = new MatParam(); |
| | | Synchro.Copy(mat, matParam); |
| | | matParam.setBatch(nccXsckmxTkWms.getVbatchcode()); |
| | | matParam.setBatch(batch); |
| | | matParam.setAnfme(0.0D); |
| | | matParam.setAnfme2(0.0D); |
| | | matParam.setTiaoma(matnr); |
| | | return R.ok().add(matParam); |
| | | matParam.setTiaoma(batch); |
| | | |
| | | String[] split = wrkDetlLog.getOrderNo().split("-"); |
| | | map.put("orderNo", split[0]); |
| | | map.put("matData", matParam); |
| | | return R.ok().add(map); |
| | | } |
| | | |
| | | @RequestMapping("/comb/auth") |