手持人工扫码功能提交

This commit is contained in:
18188916393
2022-10-20 21:56:39 +08:00
parent 31a9215a97
commit 5255d18de4
5 changed files with 140 additions and 1 deletions

View File

@@ -13,6 +13,7 @@ public class SortingUtil {
//记录分拣 木托盘对应钢托盘
public static void record(JSONObject whereJson) {
String device_code = (String) whereJson.get("device_code");
//木托盘编号
String vehicle_code = (String) whereJson.get("vehicle_code");
if (StrUtil.isEmpty(vehicle_code)) {
return;

View File

@@ -0,0 +1,48 @@
package org.nl.wms.pda.group.rest;
import com.alibaba.fastjson.JSONObject;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.nl.annotation.Log;
import org.nl.wms.pda.group.service.GroupService;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.Map;
/**
* @author ldjun
* @date 2021-07-26
**/
@RestController
@RequiredArgsConstructor
@Api(tags = "手持人工组盘")
@RequestMapping("/api/pda/group")
@Slf4j
public class GroupController {
private final GroupService groupService;
@PostMapping("/querytask")
@Log("查询未完成的指令")
@ApiOperation("查询未完成的指令")
public ResponseEntity<Object> querytask(@RequestBody Map<String, String> param) {
return new ResponseEntity<>(groupService.querytask(param), HttpStatus.OK);
}
@PostMapping("/submit")
@Log("组盘确定")
@ApiOperation("组盘确定")
public ResponseEntity<Object> submit(@RequestBody JSONObject param) {
return new ResponseEntity<>(groupService.submit(param), HttpStatus.OK);
}
}

View File

@@ -0,0 +1,16 @@
package org.nl.wms.pda.group.service;
import com.alibaba.fastjson.JSONObject;
import java.util.Map;
public interface GroupService {
Map<String, Object> querytask(Map<String,String> jsonObject);
/**
* 盘点单确认
* @param param 条件
* @return Map<String,Object>
*
*/
Map<String, Object> submit( JSONObject param);
}

View File

@@ -0,0 +1,60 @@
package org.nl.wms.pda.group.service.impl;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.nl.exception.BadRequestException;
import org.nl.modules.system.util.CodeUtil;
import org.nl.utils.SecurityUtils;
import org.nl.wms.WorkProcedureEnum;
import org.nl.wms.ext.acs.service.impl.AcsToWmsServiceImpl;
import org.nl.wms.pda.group.service.GroupService;
import org.nl.wms.sch.manage.AreaEnum;
import org.nl.wms.sch.manage.BillTypeEnum;
import org.nl.wms.sch.manage.buss.FmjToPackIngTask;
import org.nl.wms.st.ivt.IvtChangeTypeEnum;
import org.nl.wms.st.ivt.StoreIvtServiceImpl;
import org.nl.wql.WQL;
import org.nl.wql.core.bean.WQLObject;
import org.springframework.stereotype.Service;
import java.util.Map;
@Service
@RequiredArgsConstructor
@Slf4j
public class GroupServiceImpl implements GroupService {
private final AcsToWmsServiceImpl acsToWmsServiceImpl;
@Override
public Map<String, Object> querytask(Map<String, String> jsonObject) {
JSONArray arr = WQL.getWO("QPADSERVICE").addParam("flag", "20").process().getResultJSONArray(0);
JSONObject returnjo = new JSONObject();
returnjo.put("code", "1");
returnjo.put("desc", "查询成功!");
returnjo.put("result", arr);
return returnjo;
}
@Override
public Map<String, Object> submit(JSONObject param) {
String vehicle_code = param.getString("vehicle_code");
String task_code = param.getString("task_code");
if (StrUtil.isEmpty(vehicle_code)) {
throw new BadRequestException("托盘号不能为空!");
}
if (StrUtil.isEmpty(task_code)) {
throw new BadRequestException("任务号不能为空!");
}
acsToWmsServiceImpl.group(param);
JSONObject returnjo = new JSONObject();
returnjo.put("code", "1");
returnjo.put("desc", "操作成功!");
return returnjo;
}
}

View File

@@ -476,4 +476,18 @@ IF 输入.flag = "19"
ENDOPTION
ENDSELECT
ENDQUERY
ENDIF
ENDIF
IF 输入.flag = "20"
QUERY
SELECT
task.task_code,
task.start_point_code,
task.next_point_code
FROM
sch_base_task task
where task.task_status in ('05','06')
ENDSELECT
ENDQUERY
ENDIF