| | |
| | | package com.zy.asrs.controller; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.core.annotations.AppAuth; |
| | | import com.core.common.*; |
| | | import com.core.exception.CoolException; |
| | | import com.zy.asrs.entity.WaitPakin; |
| | | import com.zy.asrs.entity.param.*; |
| | | import com.zy.asrs.service.OpenService; |
| | | import com.zy.asrs.service.WaitPakinService; |
| | | import com.zy.common.model.DetlDto; |
| | | import com.zy.common.web.BaseController; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | |
| | | @Autowired |
| | | private OpenService openService; |
| | | @Autowired |
| | | private WaitPakinService waitPakinService; |
| | | |
| | | @PostMapping("/order/matSync/default/v1") |
| | | @AppAuth(memo = "response.mat_sync_interface") |
| | |
| | | return r; |
| | | } |
| | | |
| | | /** |
| | | * PDA检索盘点数量 |
| | | */ |
| | | @PostMapping("/pick/v1/getPickList") |
| | | @AppAuth(memo = "PDA Inventory Count Lookup") |
| | | public synchronized R getPickList(@RequestHeader(required = false) String appkey, |
| | | @RequestBody PdaPickListParam param, |
| | | HttpServletRequest request) { |
| | | // auth(appkey, param, request); |
| | | |
| | | List<PickWrkDetlListParam> list = openService.getPickList(param); |
| | | if (!list.isEmpty()) { |
| | | return R.ok(list); |
| | | } |
| | | return R.error("Location does not exist or has no details."); |
| | | } |
| | | |
| | | /** |
| | | * PDA检索组托数据 |
| | | */ |
| | | @PostMapping("/comb/v1/getCombList") |
| | | @AppAuth(memo = "PDA Get Comb List") |
| | | public synchronized R getCombList(@RequestHeader(required = false) String appkey, |
| | | @RequestBody PdaPickListParam param, |
| | | HttpServletRequest request) { |
| | | // auth(appkey, param, request); |
| | | |
| | | List<WaitPakin> list = waitPakinService.selectList(new EntityWrapper<WaitPakin>().eq("zpallet",param.getBarcode())); |
| | | if (!list.isEmpty()) { |
| | | return R.ok(list); |
| | | } |
| | | return R.error("Combs does not exist or has no details."); |
| | | } |
| | | |
| | | /** |
| | | * PDA检索组托数据 |
| | | */ |
| | | @PostMapping("/comb/v1/deleteComb") |
| | | @AppAuth(memo = "PDA Delete Comb") |
| | | public synchronized R deleteComb(@RequestHeader(required = false) String appkey, |
| | | @RequestBody PdaPickListParam param, |
| | | HttpServletRequest request) { |
| | | boolean result = waitPakinService.delete(new EntityWrapper<WaitPakin>().eq("zpallet",param.getBarcode())); |
| | | if(result) { |
| | | return R.ok(); |
| | | } |
| | | return R.error("Combs does not exist or has no details."); |
| | | } |
| | | |
| | | private void auth(String appkey, Object obj, HttpServletRequest request) { |
| | | log.info("{}接口被访问;appkey:{};请求数据:{}", "open/sensorType/list/auth/v1", appkey, JSON.toJSONString(obj)); |
| | | request.setAttribute("cache", obj); |
| | |
| | | @ApiModelProperty(value= "备注") |
| | | private String memo; |
| | | |
| | | @ApiModelProperty(value= "组合键") |
| | | private String mixNumber; |
| | | |
| | | public String getLocNo$(){ |
| | | LocMastService service = SpringUtils.getBean(LocMastService.class); |
| | | LocMast locMast = service.selectById(this.locNo); |
| | |
| | | @TableField("area_id") |
| | | private String areaId; |
| | | |
| | | |
| | | |
| | | public Mat() {} |
| | | |
| | | public Mat(String uuid,Long tagId,String matnr,String maktx,String name,String specs,String model,String color,String brand,String unit,Double price,String sku,Double units,String barcode,String origin,String manu,String manuDate,String itemNum,Double safeQty,Double weight,Double length,Double volume,String threeCode,String supp,String suppCode,Integer beBatch,String deadTime,Integer deadWarn,Integer source,Integer inspect,Integer danger,Integer status,Long createBy,Date createTime,Long updateBy,Date updateTime,String memo,String areaId) { |
| New file |
| | |
| | | package com.zy.asrs.entity.param; |
| | | |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class PdaPickListParam { |
| | | String barcode; |
| | | } |
| New file |
| | |
| | | package com.zy.asrs.entity.param; |
| | | |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class PickWrkDetlListParam { |
| | | |
| | | // 物料编号 |
| | | private String matnr; |
| | | |
| | | // 物料名称 |
| | | private String maknx; |
| | | |
| | | //单据编号 |
| | | private String orderNo; |
| | | //采购单号 |
| | | private String boxType3; |
| | | |
| | | //客户PO |
| | | private String standby1; |
| | | |
| | | //条码UPC |
| | | private String standby2; |
| | | |
| | | //客户sku |
| | | private String standby3; |
| | | |
| | | // 客户信息 |
| | | private String manu; |
| | | |
| | | // 备注 |
| | | private String memo; |
| | | |
| | | // 物料数量 |
| | | private Double count; |
| | | |
| | | private Double total; |
| | | |
| | | } |
| | |
| | | |
| | | int updateIoTime(@Param("workNo") Integer workNo, @Param("ioTime") Date ioTime); |
| | | List<WrkDetl> findByWorkNo(Integer workNo); |
| | | List<WrkDetl> findByBarcode(String barcode); |
| | | |
| | | } |
| | |
| | | * @param param |
| | | */ |
| | | void syncMat(MatSyncParam param); |
| | | List<PickWrkDetlListParam> getPickList(PdaPickListParam param); |
| | | |
| | | } |
| | |
| | | boolean updateAnfme(Double anfme, Integer wrkNo, String matnr, String batch); |
| | | |
| | | List<WrkDetl> selectAndLogByOrderNo(String orderNo); |
| | | List<WrkDetl> findByBarcode(String barcode); |
| | | |
| | | boolean updateInspect(Integer wrkNo, String matnr, String batch); |
| | | |
| | |
| | | if (Cools.isEmpty(param.getBarcode(), param.getCombMats())) { |
| | | throw new CoolException(BaseRes.PARAM); |
| | | } |
| | | if(param.getCombMats().size()>1){ |
| | | throw new CoolException("response.extract_one_product_or_refresh"); |
| | | } |
| | | // if(param.getCombMats().size()>1){ |
| | | // throw new CoolException("response.extract_one_product_or_refresh"); |
| | | // } |
| | | // 判断是否有相同条码的数据 |
| | | if (waitPakinService.selectCount(new EntityWrapper<WaitPakin>(). |
| | | eq("zpallet", param.getBarcode()).eq("io_status", "N")) > 0) { |
| | |
| | | private TagService tagService; |
| | | @Autowired |
| | | private TagMapper tagMapper; |
| | | |
| | | @Autowired |
| | | private WrkDetlService wrkDetlService; |
| | | @Override |
| | | @Transactional |
| | | public void pakinOrderCreate(OpenOrderPakinParam param) { |
| | |
| | | } |
| | | |
| | | } |
| | | @Override |
| | | @Transactional |
| | | public List<PickWrkDetlListParam> getPickList(PdaPickListParam param) { |
| | | List<WrkDetl> wrkDetls = wrkDetlService.findByBarcode(param.getBarcode()); |
| | | List<PickWrkDetlListParam> result = new ArrayList<>(); |
| | | wrkDetls.forEach(wrkDetl -> { |
| | | Double total; |
| | | EntityWrapper<LocDetl> wrapper = new EntityWrapper<>(); |
| | | LocDetl locDetl = locDetlService.selectOne( |
| | | wrapper.eq("zpallet", wrkDetl.getZpallet()) |
| | | .eq("matnr", wrkDetl.getMatnr()) |
| | | ); |
| | | // 可拣总量:优先取库存表,否则取作业数量 |
| | | if (Cools.isEmpty(locDetl)) { |
| | | total = wrkDetl.getAnfme(); |
| | | } else { |
| | | total = locDetl.getAnfme(); |
| | | } |
| | | // ===== 组装返回对象 ===== |
| | | PickWrkDetlListParam dto = new PickWrkDetlListParam(); |
| | | dto.setMatnr(wrkDetl.getMatnr()); |
| | | dto.setMaknx(wrkDetl.getMaktx()); |
| | | dto.setOrderNo(wrkDetl.getOrderNo()); |
| | | // dto.setBoxType3(wrkDetl.getBoxType3()); |
| | | // dto.setStandby1(wrkDetl.getStandby1()); |
| | | // dto.setStandby2(wrkDetl.getStandby2()); |
| | | // dto.setStandby3(wrkDetl.getStandby3()); |
| | | dto.setManu(wrkDetl.getManu()); |
| | | dto.setMemo(wrkDetl.getMemo()); |
| | | // 当前拣货数量 |
| | | dto.setCount(wrkDetl.getAnfme()); |
| | | // 可拣总数量 |
| | | dto.setTotal(total); |
| | | result.add(dto); |
| | | }); |
| | | |
| | | return result; |
| | | } |
| | | |
| | | } |
| | |
| | | public boolean updateIoTime(Integer workNo, Date ioTime) { |
| | | return this.baseMapper.updateIoTime(workNo, ioTime) > 0; |
| | | } |
| | | @Override |
| | | public List<WrkDetl> findByBarcode(String barcode) { |
| | | return this.baseMapper.findByBarcode(barcode); |
| | | } |
| | | } |
| | |
| | | @Slf4j |
| | | public class LedWebsocket { |
| | | |
| | | private static final String[] WEEK = {"response.week_sun","response.week_mon","response.week_tue","response.week_wed","response.week_thu","response.week_fri","response.week_sat"}; |
| | | private static final String[] WEEK = {"Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"}; |
| | | |
| | | @Autowired |
| | | private ReportQueryMapper reportQueryMapper; |
| | |
| | | LocChartPie locUseRate = reportQueryMapper.getLocUseRate(); |
| | | if(locUseRate!=null) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("name", "response.loc_in_store"); |
| | | map.put("name", "In Stock Location"); |
| | | map.put("value", locUseRate.getFqty()); |
| | | pie.add(map); |
| | | |
| | | Map<String, Object> map1 = new HashMap<>(); |
| | | map1.put("name", "response.loc_empty"); |
| | | map1.put("name", "Empty Location"); |
| | | map1.put("value", locUseRate.getOqty()); |
| | | pie.add(map1); |
| | | |
| | | Map<String, Object> map2 = new HashMap<>(); |
| | | map2.put("name", "response.loc_used"); |
| | | map2.put("name", "Used Location"); |
| | | map2.put("value", locUseRate.getUqty()); |
| | | pie.add(map2); |
| | | |
| | | Map<String, Object> map3 = new HashMap<>(); |
| | | map3.put("name", "response.loc_disabled"); |
| | | map3.put("name", "Disabled Location"); |
| | | map3.put("value", locUseRate.getXqty()); |
| | | pie.add(map3); |
| | | } |
| | |
| | | } |
| | | } |
| | | AxisBean inqty = new AxisBean(); |
| | | inqty.setName("response.in_qty"); |
| | | inqty.setName("Inbound Qty"); |
| | | Integer[] array1 = new Integer[data1.size()]; |
| | | inqty.setData(data1.toArray(array1)); |
| | | list.add(inqty); |
| | | AxisBean outqty = new AxisBean(); |
| | | outqty.setName("response.out_qty"); |
| | | outqty.setName("Outbound Qty"); |
| | | Integer[] array2 = new Integer[data2.size()]; |
| | | outqty.setData(data2.toArray(array2)); |
| | | list.add(outqty); |
| | |
| | | return; |
| | | } |
| | | if (basDevp.getDevMk().equals("O")){ |
| | | basDevp = basDevpService.selectOne(new EntityWrapper<BasDevp>().eq("dev_no", 1001)); |
| | | basDevp = basDevpService.selectOne(new EntityWrapper<BasDevp>().eq("dev_no", 100)); |
| | | } |
| | | |
| | | |
| | |
| | | licensePath: license.lic |
| | | publicKeysStorePath: publicCerts.keystore |
| | | led: |
| | | ip: locLHOST |
| | | ip: localhost |
| | | url: arydasrs |
| | | port: 8080 |
| | | id: 1001 |
| | | id: 100 |
| | | # 下位机配置 |
| | | wcs-slave: |
| | | # 双深 |
| | |
| | | <select id="findByWorkNo" resultMap="BaseResultMap"> |
| | | select wrk_no, matnr, maktx, anfme ,specs,batch from asr_wrk_detl where 1=1 and wrk_no = #{workNo} |
| | | </select> |
| | | |
| | | <select id="findByBarcode" resultMap="BaseResultMap"> |
| | | select * from asr_wrk_detl where 1=1 and zpallet = #{barcode} |
| | | </select> |
| | | </mapper> |
| | |
| | | "complete": "Complete", |
| | | "configuration": "Configuration", |
| | | "confirm": "OK", |
| | | "confirm_adjust_location_detail": "Are you sure to adjust details for location {val}?", |
| | | "confirm_adjust_location_detail": "Are you sure to adjust details for location?", |
| | | "confirm_cancel_erp_order": "Current task linked to ERP sales order. Cancellation will regenerate outbound task. Continue?", |
| | | "confirm_cancel_work_order": "Confirm cancel this work order?", |
| | | "confirm_complete_work_order": "Confirm complete this work order?", |
| | |
| | | "color_updated": "颜色已更新", |
| | | "complete": "完成", |
| | | "confirm": "确定", |
| | | "confirm_adjust_location_detail": "确定调整{val}库位的明细吗?", |
| | | "confirm_adjust_location_detail": "确定调整库位的明细吗?", |
| | | "confirm_cancel_erp_order": "当前任务关联ERP销售单,取消将重新生成出库作业,是否继续?", |
| | | "confirm_cancel_work_order": "确认取消该笔工作档?", |
| | | "confirm_complete_work_order": "确认完成该笔工作档?", |
| | |
| | | "confirm_pick_work_order": "拣料入库该笔工作档?", |
| | | "confirm_pre_existing_exception": "任务发生先入品异常。如需重新入库,请确保货物已放至堆垛机出库站!", |
| | | "confirm_save_change": "保存修改?", |
| | | "confirm_sync_file": "确认同步 [{{filename}}] 文件吗?", |
| | | "confirm_sync_file": "确认同步文件吗?", |
| | | "count": "盘", |
| | | "crane": "堆垛机", |
| | | "crane_amount": "堆垛机数量", |
| | |
| | | "response.cancel_transfer_failed_target_not_exist": "取消库位转移失败,目标库位不存在,{0}", |
| | | "response.cancel_work_master_failed": "取消工作档失败", |
| | | "response.cancel_work_master_failed_loc_not_exist": "取消工作档失败,库位不存在,{0}", |
| | | "response.change_loc_status_failed": "Change库位状态失败", |
| | | "response.change_location_status_failed": "Change库位状态失败", |
| | | "response.change_loc_status_failed": "修改库位状态失败", |
| | | "response.change_location_status_failed": "修改库位状态失败", |
| | | "response.china_grid": "国网", |
| | | "response.clear_order_detail_failed": "清空订单明细失败", |
| | | "response.code_exists": "编码已存在", |
| | | "response.code_or_name_exists": "编码或名称已存在", |
| | | "response.comb_success": "Comb成功", |
| | | "response.confirm_complete": "确认Complete", |
| | | "response.confirm_picking_outbound_failed": "确认Picking出库失败", |
| | | "response.comb_success": "组托成功", |
| | | "response.confirm_complete": "确认完成", |
| | | "response.confirm_picking_outbound_failed": "确认拣料出库失败", |
| | | "response.crane_add": "堆垛机新增", |
| | | "response.crane_delete": "堆垛机删除", |
| | | "response.crane_error_add": "堆垛机异常添加", |
| | |
| | | "response.data_error": "数据错误", |
| | | "response.data_exists": "数据已存在", |
| | | "response.data_not_found": "未找到数据", |
| | | "response.data_processing_inbound": "数据Processing入库", |
| | | "response.data_processing_inbound": "条码重复", |
| | | "response.db_update_error": "对数据库修改出错!", |
| | | "response.delete_failed_contact_admin": "删除失败ContactAdmin", |
| | | "response.delete_failed_contact_admin": "删除失败", |
| | | "response.delete_stock_detail_failed": "删除库存详情失败", |
| | | "response.delete_stocktake_detail_failed": "删除Stocktake详情失败", |
| | | "response.delete_stocktake_detail_failed": "删除详情失败", |
| | | "response.delete_success": "删除成功", |
| | | "response.empty_pallet_inbound": "空板入库", |
| | | "response.empty_pallet_outbound": "空板出库", |
| | | "response.empty_plate_inbound_task_exists": "为空Plate入库任务已存在", |
| | | "response.empty_plate_outbound_forbidden_inbound": "为空Plate出库Forbidden入库", |
| | | "response.empty_plate_inbound_task_exists": "空板入库任务已存在", |
| | | "response.empty_plate_outbound_forbidden_inbound": "空板出库禁止入库", |
| | | "response.enter_activation_code": "EnterActivation编码", |
| | | "response.existing_working_data_cannot_complete": "存在作业中数据,不能完结", |
| | | "response.export_daily_inbound_detail": "日入库明细统计导出", |
| | |
| | | "response.fetch_outbound_station_failed": "获取出库口失败", |
| | | "response.fifo_handling": "先入品处理", |
| | | "response.friday": "星期五", |
| | | "response.front_loc_has_goods_forbid_out": "Front库位HasGoodsForbid出库", |
| | | "response.front_loc_has_in_task_forbid_out": "Front库位Has在任务ForbidOut", |
| | | "response.front_loc_has_goods_forbid_out": "浅库位有物禁止出库", |
| | | "response.front_loc_has_in_task_forbid_out": "浅库位在执行任务禁止出库", |
| | | "response.full_pallet_inbound": "全板入库", |
| | | "response.full_pallet_out": "整托出库", |
| | | "response.full_pallet_outbound": "全板出库", |
| | |
| | | "response.loc_mast_export": "库位导出", |
| | | "response.loc_mast_init": "初始化库位", |
| | | "response.loc_mast_update": "库位修改", |
| | | "response.loc_material_not_exist": "库位Material不存在", |
| | | "response.loc_not_adjustable": "库位不Adjustable", |
| | | "response.loc_material_not_exist": "库存明细不存在", |
| | | "response.loc_not_adjustable": "盘点库位状态异常", |
| | | "response.loc_not_exist": "库位不存在", |
| | | "response.loc_not_exist_simple": "库位不存在简单", |
| | | "response.loc_not_found": "库位不找到", |
| | | "response.loc_not_in_stock_status": "库位不在库存状态", |
| | | "response.loc_not_in_store": "库位不在Store", |
| | | "response.loc_not_in_store": "库存明细不存在", |
| | | "response.loc_not_in_store_status": "{0}库位不是在库状态", |
| | | "response.loc_status_add": "库位状态新增", |
| | | "response.loc_status_changed": "库位状态Changed", |
| | | "response.loc_status_changed": "库位状态异常", |
| | | "response.loc_status_delete": "库位状态删除", |
| | | "response.loc_status_error_not_empty": "库位状态异常,非空板状态:{0}", |
| | | "response.loc_status_export": "库位状态导出", |
| | |
| | | "response.location_transfer": "库位移转", |
| | | "response.login": "登录", |
| | | "response.manu_cancel": "手动取消", |
| | | "response.manu_complete": "ManuComplete", |
| | | "response.manu_complete": "手动完成", |
| | | "response.manual_add_order": "手动添加订单", |
| | | "response.manual_delete_order": "手动删除订单", |
| | | "response.manual_modify_order": "手动修改订单", |
| | |
| | | "response.mat_sync_interface": "商品信息同步接口", |
| | | "response.mat_update": "物料修改", |
| | | "response.material_data_error": "物料数据错误,请联系管理员", |
| | | "response.material_not_exist": "Material不存在", |
| | | "response.material_not_exist": "物料不存在", |
| | | "response.material_not_found": "物料: {{matnr}} 在库位中不存在", |
| | | "response.material_not_in_stock": "Material不在库存", |
| | | "response.material_qty_error": "Material数量错误", |
| | | "response.memo_auto_empty_pallet_out": "备注Auto为空Pallet出库", |
| | | "response.material_not_in_stock": "物料不在库存", |
| | | "response.material_qty_error": "物料数量错误", |
| | | "response.memo_auto_empty_pallet_out": "自动空板出库", |
| | | "response.menu_add": "添加菜单", |
| | | "response.menu_delete": "删除菜单", |
| | | "response.menu_edit": "编辑菜单", |
| | |
| | | "response.no_empty_pallet": "没有空托盘", |
| | | "response.no_such_product": "不存在该库位物料", |
| | | "response.no_valid_empty_pallet_loc": "合并分组库位失败", |
| | | "response.no_valid_out_loc": "否Valid出库库位", |
| | | "response.no_valid_out_loc": "合并时未找到出库库位", |
| | | "response.node_add": "货位新增", |
| | | "response.node_delete": "货位删除", |
| | | "response.node_detail": "货位详情", |