| | |
| | | import com.zy.asrs.entity.result.MobileAdjustResult; |
| | | import com.zy.asrs.mapper.ManLocDetlMapper; |
| | | import com.zy.asrs.service.*; |
| | | import com.zy.asrs.utils.SaasUtils; |
| | | import com.zy.common.model.WrkDto; |
| | | import com.zy.common.web.BaseController; |
| | | import com.zy.system.entity.User; |
| | |
| | | private ManLocDetlMapper manLocDetlMapper; |
| | | @Autowired |
| | | private PlaService plaService; |
| | | @Autowired |
| | | private NodeService nodeService; |
| | | |
| | | |
| | | // 商品上架 |
| | |
| | | for (Object o : jsonArray){ |
| | | JSONObject jsonObject = (JSONObject)o; |
| | | String batch = jsonObject.get("batch").toString(); |
| | | String packageNo = jsonObject.get("packageNo").toString(); |
| | | Integer packageNo = (Integer) jsonObject.get("packageNo"); |
| | | if(Cools.isEmpty(locNo) || Cools.isEmpty(batch) || Cools.isEmpty(packageNo)){ |
| | | return R.error("有参数为空,无法入库"); |
| | | } |
| | |
| | | public R plaPackOut1(@RequestBody JSONObject json){ |
| | | String locNo = json.get("locNo").toString(); |
| | | String batch = json.get("batch").toString(); |
| | | String packageNo = json.get("packageNo").toString(); |
| | | Integer packageNo = (Integer) json.get("packageNo"); |
| | | String orderNo = json.get("orderNo").toString(); |
| | | String orderDetlId = json.get("orderDetlId").toString(); |
| | | String wrkNo = json.get("wrkNo").toString(); |
| | |
| | | public R plaPackOut(@RequestBody JSONObject json){ |
| | | String locNo = json.get("locNo").toString(); |
| | | String batch = json.get("batch").toString(); |
| | | String packageNo = json.get("packageNo").toString(); |
| | | Integer packageNo = (Integer) json.get("packageNo"); |
| | | String orderNo = json.get("orderNo").toString(); |
| | | String orderDetlId = json.get("orderDetlId").toString(); |
| | | String wrkNo = json.get("wrkNo").toString(); |
| | |
| | | @RequestMapping("/plaDetl/check/v1") |
| | | public R plaDetlCheck(@RequestBody JSONObject json){ |
| | | String batch = json.get("batch").toString(); |
| | | String packageNo = json.get("packageNo").toString(); |
| | | Integer packageNo = (Integer) json.get("packageNo"); |
| | | |
| | | if(Cools.isEmpty(batch) || Cools.isEmpty(packageNo)){ |
| | | return R.error("有参数为空,无法入库"); |
| | |
| | | return R.ok(pla); |
| | | } |
| | | |
| | | /* |
| | | pla移库 |
| | | */ |
| | | @RequestMapping("/plaDetl/move/v1") |
| | | public R plaDetlMove(@RequestBody JSONObject json){ |
| | | |
| | | String batch = json.get("batch").toString(); |
| | | Integer packageNo = (Integer) json.get("packageNo"); |
| | | String locNo = json.get("locNo").toString(); |
| | | |
| | | if(Cools.isEmpty(batch) || Cools.isEmpty(packageNo)){ |
| | | return R.error("有参数为空,无法入库"); |
| | | } |
| | | |
| | | Pla pla = plaService.selectByBatchAndPackageNo(batch, packageNo); |
| | | if ((Cools.isEmpty(pla))){ |
| | | return R.error("该包物料未录入,无法查询到相关信息"); |
| | | } |
| | | |
| | | Node node = nodeService.selectByUuid(locNo); |
| | | if(Cools.isEmpty(node)){ |
| | | throw new CoolException("库位信息不正确"); |
| | | } |
| | | |
| | | String sourceLocNo = pla.getLocNo(); |
| | | |
| | | pla.setLocNo(locNo); |
| | | pla.setStash(node.getParentName()); |
| | | pla.setModifyTime(new Date()); |
| | | |
| | | plaService.updateById(pla); |
| | | |
| | | SaasUtils.insertLog(2,sourceLocNo,pla.getBrand(),pla.getWeightAnfme(),getUser().getUsername(),locNo,pla.getBatch(),pla.getPackageNo()); |
| | | |
| | | return R.ok(); |
| | | } |
| | | |
| | | /* |
| | | 根据拣货单出库 ------> 获取拣货单 |
| | | */ |
| | | @RequestMapping("/manpakout/check/v1") |
| | | public R getManPakout (@RequestBody JSONObject json){ |
| | | |
| | | String orderNo = json.get("orderNo").toString(); |
| | | |
| | | return R.ok(mobileService.getManPakoutByOrderNo(orderNo)); |
| | | } |
| | | |
| | | @RequestMapping("/manpakout/pakout/v1") |
| | | public R pakout(@RequestBody JSONObject json){ |
| | | |
| | | String orderNo = json.get("orderNo").toString(); |
| | | |
| | | return R.ok(); |
| | | } |
| | | |
| | | |
| | | public static void main(String[] args) { |
| | | // String aa = "[{\"batch\":\"2023090304\",\"packageNo\":\"8\"},{\"batch\":\"2023090304\",\"packageNo\":\"8\"}]"; |
| | | // JSONArray jsonArray = JSON.parseArray(aa); |