Commit 83b056b6 authored by tank.li@mushiny.com's avatar tank.li@mushiny.com

拣货任务完善,出库单与系统绑定 完成后反馈

parent 8f71bebc
package com.mushiny.heli.xnr.controller;
import com.mushiny.heli.xnr.comm.CommonUtils;
import com.mushiny.heli.xnr.comm.JsonUtils;
import com.mushiny.heli.xnr.dto.MessageDTO;
import com.mushiny.heli.xnr.service.ICQAService;
import com.mushiny.heli.xnr.service.InboundService;
import com.mushiny.heli.xnr.service.WMSService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
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;
/**
* Created by Lisi on 2019-11-30.
*/
@RestController
@RequestMapping("/icqa")
public class ICQAController {
private final static Logger logger = LoggerFactory.getLogger(ICQAController.class);
@Autowired
private WMSService wmsService;
@Autowired
private ICQAService icqaService;
@Autowired
private InboundService inboundService;
@PostMapping(value = "/check", produces = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<MessageDTO> check(
@RequestBody String json){
Map data = JsonUtils.json2Map(json);
int stored = CommonUtils.parseInteger("counted",data);
String skuId = CommonUtils.parseString("skuId",data);
String factory = CommonUtils.parseString("factory",data);
String section = CommonUtils.parseString("section",data);
String entryId = CommonUtils.parseString("taskId",data);
//货架的货位 P0000008AA01
String containerId = CommonUtils.parseString("containerId",data);
MessageDTO dto = this.icqaService.check(skuId,stored,containerId,factory,section,entryId);
return ResponseEntity.ok(dto);
}
/**
* 当前任务
* @param json
* @return
*/
@PostMapping(value = "/currentPodTask", produces = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<String> currentPodTask(
@RequestBody String json){
Map station = JsonUtils.json2Map(json);
//工作站号码
Map dto = this.icqaService.currentPodTask(CommonUtils.parseString("stationName",station));
return ResponseEntity.ok(JsonUtils.map2Json(dto));
}
@PostMapping(value = "/createICQAOrder", produces = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<MessageDTO> createICQAOrder(
@RequestBody String json){
Map data = JsonUtils.json2Map(json);
logger.debug("收到创建盘点任务指令:" + json);
MessageDTO dto = MessageDTO.success();
try {
this.wmsService.createICQAOrder(data);
} catch (Exception e) {
dto.setMESSAGE(e.getMessage());
dto.setCODE(1);
}
return ResponseEntity.ok(dto);
}
@PostMapping(value = "/searchIcqa", produces = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<String> searchIcqa(@RequestBody String json){
Map data = JsonUtils.json2Map(json);
Map resData = this.icqaService.searchIcqa(data);
return ResponseEntity.ok(JsonUtils.map2Json(resData));
}
/**
* 查找明细
* @param json
* @return
*/
@PostMapping(value = "/searchIcqaInfo", produces = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<String> searchIcqaInfo(@RequestBody String json){
Map data = JsonUtils.json2Map(json);
Map resData = this.icqaService.searchIcqaInfo(data);
return ResponseEntity.ok(JsonUtils.map2Json(resData));
}
@PostMapping(value = "/startTasks", produces = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<MessageDTO> startTasks(@RequestBody String json){
Map data = JsonUtils.json2Map(json);
MessageDTO resData = this.icqaService.startTasks(data);
return ResponseEntity.ok(resData);
}
/**
* 终止盘点任务
* @param json
* @return
*/
@PostMapping(value = "/taskFinish", produces = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<MessageDTO> taskFinish(@RequestBody String json){
Map data = JsonUtils.json2Map(json);
MessageDTO dto = this.icqaService.taskFinish(data);
return ResponseEntity.ok(dto);
}
/**
* 退出盘点 如果stowpod任务还在 就提示并强制退出
* @param json
* @return
*/
@PostMapping(value = "/endICQA", produces = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<MessageDTO> endICQA(
@RequestBody String json){
Map station = JsonUtils.json2Map(json);
//用跟上架 同一个代码
MessageDTO dto = this.inboundService.endInbound(CommonUtils.parseString("stationName",station));
return ResponseEntity.ok(dto);
}
}
......@@ -28,22 +28,6 @@ public class WMSController {
@Autowired
private WMSService wmsService;
@PostMapping(value = "/createICQAOrder", produces = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<MessageDTO> createICQAOrder(
@RequestBody String json){
Map data = JsonUtils.json2Map(json);
logger.debug("收到创建盘点任务指令:" + json);
MessageDTO dto = MessageDTO.success();
try {
this.wmsService.createICQAOrder(data);
} catch (Exception e) {
dto.setMESSAGE(e.getMessage());
dto.setCODE(1);
}
return ResponseEntity.ok(dto);
}
@PostMapping(value = "/syncItem", produces = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<MessageDTO> syncItem(
@RequestBody String json){
......@@ -88,4 +72,19 @@ public class WMSController {
}
return ResponseEntity.ok(dto);
}
@PostMapping(value = "/podRelease", produces = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<MessageDTO> podRelease(
@RequestBody String json){
Map req = JsonUtils.json2Map(json);
logger.debug("收到出库单下发指令:" + json);
MessageDTO dto = MessageDTO.success();
try {
this.wmsService.podRelease(req);
} catch (Exception e) {
dto.setMESSAGE(e.getMessage());
dto.setCODE(1);
}
return ResponseEntity.ok(dto);
}
}
This diff is collapsed.
......@@ -20,13 +20,8 @@ import java.util.*;
@Service
@Transactional
public class InboundService {
public static final String SQL_SEARCHINBOUND_FACTORY = " AND WAREHOUSE_ID=? ";
public static final String SQL_SEARCHINBOUND_SECTION = " AND SECTION_ID=? ";
public static final String SQL_SEARCHINBOUNDINFO =
"SELECT SKUID,AMOUNT,IFNULL(STORED,0) AS STORED,STATE FROM WMS_INBOUND_ORDERPOSITION WHERE ENTRYID = ?";
private final static Logger logger = LoggerFactory.getLogger(InboundService.class);
private static final String SQL_SEARCHINBOUND_ENTRYID = " AND ENTRYID like ? ";
@Autowired
......@@ -35,27 +30,22 @@ public class InboundService {
@Autowired
private SystemPropertiesManager systemPropertiesManager;
public static final String SQL_SEARCHINBOUND =
"SELECT ENTRYID,STATE,DATE_FORMAT(CREATED_DATE,'%Y-%m-%d %H:%i:%s') as CREATED_DATE" +
",WAREHOUSE_ID FACTORY,SECTION_ID as SECTION " +
"FROM WMS_INBOUND_ORDER WHERE 1=1 ";
public List<Map> searchInbound(String entryId, String warehouseId, String sectionId) {
List params = new ArrayList();
StringBuilder sql = new StringBuilder();
sql.append(SQL_SEARCHINBOUND);
sql.append(Sql_Table.SQL_SEARCHINBOUND);
if(!CommonUtils.isEmpty(warehouseId)){
sql.append(SQL_SEARCHINBOUND_ENTRYID);
sql.append(Sql_Table.SQL_SEARCHINBOUND_ENTRYID);
params.add(entryId);
}
if(!CommonUtils.isEmpty(warehouseId)){
sql.append(SQL_SEARCHINBOUND_FACTORY);
sql.append(Sql_Table.SQL_SEARCHINBOUND_FACTORY);
params.add(warehouseId);
}
if(!CommonUtils.isEmpty(sectionId)){
sql.append(SQL_SEARCHINBOUND_SECTION);
sql.append(Sql_Table.SQL_SEARCHINBOUND_SECTION);
params.add(warehouseId);
}
......@@ -65,7 +55,7 @@ public class InboundService {
public List<Map> searchInboundInfo(String entryId) {
List params = new ArrayList();
StringBuilder sql = new StringBuilder();
sql.append(SQL_SEARCHINBOUNDINFO);
sql.append(Sql_Table.SQL_SEARCHINBOUNDINFO);
params.add(entryId);
List<Map> data = this.jdbcRepository.queryBySql(sql.toString(),params);
return data;
......@@ -87,12 +77,6 @@ public class InboundService {
return messageDTO;
}
public static final String SQL_INV_UNITLOADID =
"SELECT INV_UNITLOAD.ID FROM INV_UNITLOAD,MD_STORAGELOCATION WHERE MD_STORAGELOCATION.NAME=? " +
"AND MD_STORAGELOCATION.ID=INV_UNITLOAD.STORAGELOCATION_ID";
public static final String SQL_MD_ITEMDATA =
"SELECT ID FROM MD_ITEMDATA WHERE SKUID=?";
/**
* 上架到货位
* @param skuId
......@@ -106,7 +90,7 @@ public class InboundService {
public MessageDTO store(String skuId, int stored, String containerId,
String factory, String section, String entryId) {
MessageDTO messageDTO = MessageDTO.success();
List<Map> invs = this.jdbcRepository.queryBySql(SQL_INV_UNITLOADID,containerId);
List<Map> invs = this.jdbcRepository.queryBySql(Sql_Table.SQL_INV_UNITLOADID,containerId);
if(invs.isEmpty()){
messageDTO.setCODE(1);
messageDTO.setMESSAGE("没有找到该容器:"+containerId);
......@@ -225,12 +209,6 @@ public class InboundService {
}
public static final String STATION_ID = "6db9c7c0-4f93-4fa1-82c0-fb6435af7aae";//NTYH01S1-S001-1
public static final String STOW_OPERATOR_ID = "stowPod_user";//NTYH01S1-S001-1
public static final String ICQA_OPERATOR_ID = "icqaPod_user";//NTYH01S1-S001-1
public static final String STATION_NAME_STOWPOD = "STOWPOD_STATION";//NTYH01S1-S001-1
public static final String STATION_NAME_ICQAPOD = "ICQAPOD_STATION";//NTYH01S1-S001-1
/**
* 批量生成上架任务
......@@ -305,7 +283,6 @@ public class InboundService {
return dto;
}
public static final String WAREHOUSE = "456e94fe-127d-4861-9948-cc38760801b4";
/**
* 定时启动任务
*/
......@@ -318,8 +295,9 @@ public class InboundService {
}
//TODO 根据工作站查找
String pods = this.systemPropertiesManager.getProperty("StowPodStationMaxPod", WAREHOUSE);
List<Map> runningPods = this.jdbcRepository.queryBySql(Sql_Table.SQL_QUERY_RUNNINGPODS, "StowPod", Sql_Table.AVAILABLE);
String pods = this.systemPropertiesManager.getProperty("StowPodStationMaxPod", Sql_Table.WAREHOUSE);
List<Map> runningPods = this.jdbcRepository.queryBySql(Sql_Table.SQL_QUERY_RUNNINGPODS,
"StowPod", Sql_Table.AVAILABLE,Sql_Table.PROCESS);
Integer limit = Integer.parseInt(pods) - runningPods.size(); //TODO 按工作站区分
//先找这么多货架 然后加载所有任务
List<Map> podIds = this.jdbcRepository.queryBySql(Sql_Table.SQL_QUERY_PODS, "StowPod", Sql_Table.AVAILABLE);
......@@ -348,7 +326,7 @@ public class InboundService {
String needFace = CommonUtils.parseString("POD_FACE",map);
//int sameFaceIndex = index.get(needFace);
String tripPositionID;
List<Map> tripPositions = existTripPosition(workStation, podId, needFace);
List<Map> tripPositions = existTripPosition(workStation, podId, needFace,"StowPod");
if (tripPositions.isEmpty()) {
BaseBpo baseBpo2 = new BaseBpo();
baseBpo2.setTable("RCS_TRIPPOSITION");
......@@ -388,20 +366,14 @@ public class InboundService {
return map;
}
private List<Map> existTripPosition(String workStation, String podId, String needFace) {
public List<Map> existTripPosition(String workStation, String podId, String needFace,String type) {
List<Map> datas = this.jdbcRepository.queryBySql(Sql_Table.SQL_QUERY_TRIPPOSITION,
needFace,workStation,podId);
needFace,workStation,type,podId);
return datas;
}
public static final String SQL_NEWSTORAGELOCATION = "SELECT MD_STORAGELOCATION.* FROM MD_STORAGELOCATION,INV_UNITLOAD \n" +
"WHERE MD_STORAGELOCATION.ID=INV_UNITLOAD.STORAGELOCATION_ID \n" +
"AND MD_STORAGELOCATION.POD_ID IS NOT NULL AND INV_UNITLOAD.ID NOT IN \n" +
"(SELECT UNITLOAD_ID from \n" +
"(SELECT sum(AMOUNT) as SUMALL,UNITLOAD_ID \n" +
"FROM INV_STOCKUNIT group by UNITLOAD_ID )UNITLOAD WHERE UNITLOAD.SUMALL>0) limit 1";
private StorageLocation newStorageLocation() {
List<Map> list = this.jdbcRepository.queryBySql(SQL_NEWSTORAGELOCATION);
List<Map> list = this.jdbcRepository.queryBySql(Sql_Table.SQL_NEWSTORAGELOCATION);
if(list.isEmpty()){
return null;
}
......@@ -411,7 +383,7 @@ public class InboundService {
return storageLocation;
}
private StorageLocation findStorageLocation(String skuId) {
public StorageLocation findStorageLocation(String skuId) {
StorageLocation storageLocation = new StorageLocation();
List<Map> data = this.jdbcRepository.queryBySql(Sql_Table.SQL_QUERYSTORAGELOCATION_BYSKU,skuId);
if(data.isEmpty()){
......@@ -437,7 +409,7 @@ public class InboundService {
storageLocation.setpName(pName);
}
private synchronized boolean lockStowStation(String stationId) {
public synchronized boolean lockStowStation(String stationId) {
List<Map> stations = this.jdbcRepository.queryBySql(Sql_Table.SQL_QUERY_WORKSTATION,stationId);
if(stations.isEmpty()){
......@@ -466,8 +438,10 @@ public class InboundService {
}
Map data = rows.get(0);
String operator_id = CommonUtils.parseString("OPERATOR_ID",data);
String station_name = CommonUtils.parseString("STATION_NAME",data);
if(!CommonUtils.isEmpty(operator_id)
&& !Objects.equals(operator_id,"LISI")){
&& !Objects.equals(operator_id,"LISI")
&& !Objects.equals(station_name,"StowPod")){
return true;
}
return false;
......@@ -475,9 +449,29 @@ public class InboundService {
public MessageDTO endInbound(String stationName) {
MessageDTO messageDTO = MessageDTO.success();
/*if(){
List<Map> stations = this.jdbcRepository.queryBySql(Sql_Table.SQL_QUERY_WORKSTATION, stationName);
if(stations.isEmpty()){
messageDTO.setMESSAGE(" 没有这个工作站: stationName:"+stationName);
messageDTO.setCODE(1);
return messageDTO;
}
Map data = stations.get(0);
Integer version = CommonUtils.parseInteger("VERSION",data);
Map newValue = new HashMap();
newValue.put("VERSION",version+1);
newValue.put("ISCALLPOD",Boolean.FALSE);
newValue.put("OPERATOR_ID","");
newValue.put("STATION_NAME","");
Map con = new HashMap();
con.put("ID",stationName);
con.put("VERSION",version);
}*/
int count = this.jdbcRepository.updateRecords(Sql_Table.TABLE_MD_WORKSTATION, newValue ,con);
if(count!=1){
messageDTO.setMESSAGE("解锁工作站失败: stationName:" + stationName);
messageDTO.setCODE(1);
}
return messageDTO;
}
......@@ -537,7 +531,7 @@ public class InboundService {
return data;
}
//ABCD 从上往下看
private static String getFace(Integer wsFace, Integer pod_toward) {
public static String getFace(Integer wsFace, Integer pod_toward) {
if(wsFace%90!=0 || pod_toward%90!=0){
return "A";//默认A面
}
......
......@@ -24,7 +24,7 @@ public class OutboundService {
@Scheduled (fixedDelay = 10*1000L)
public void checkAndResponse(){
List<Map> finishedObps =
this.jdbcRepository.queryBySql(Sql_Table.SQL_QUERY_OBORDER, Sql_Table.FINISH);
this.jdbcRepository.queryBySql(Sql_Table.SQL_QUERY_OBORDER);
for (int i = 0; i < finishedObps.size(); i++) {
Map obs = finishedObps.get(i);
Map newValue = new HashMap();
......
......@@ -58,8 +58,12 @@ public interface Sql_Table {
" FROM WMS_INBOUND_PODORDER" +
" WHERE POD_ID NOT IN (SELECT POD_ID FROM RCS_TRIP WHERE TRIP_TYPE=? AND TRIP_STATE=?) " +
" LIMIT 10";
String SQL_QUERY_ICQAPODS = "SELECT DISTINCT POD_ID,WORKSTATION_ID,WAREHOUSE_ID,SECTION_ID " +
" FROM WMS_ICQA_PODORDER" +
" WHERE POD_ID NOT IN (SELECT POD_ID FROM RCS_TRIP WHERE TRIP_TYPE=? AND TRIP_STATE=?) " +
" LIMIT 10";
String SQL_QUERY_RUNNINGPODS = "SELECT DISTINCT POD_ID " +
"FROM RCS_TRIP WHERE TRIP_TYPE=? AND TRIP_STATE=? " +
"FROM RCS_TRIP WHERE TRIP_TYPE=? AND (TRIP_STATE=? OR TRIP_STATE=?)" +
" LIMIT 10";
String SQL_QUERY_PODORDERS = "SELECT * FROM WMS_INBOUND_PODORDER WHERE POD_ID=? AND STATE=? ";
String TABLE_MD_WORKSTATION = "MD_WORKSTATION";
......@@ -69,11 +73,16 @@ public interface Sql_Table {
String WMS_OUTBOUND_ORDERPOSITION = "WMS_OUTBOUND_ORDERPOSITION";
String SQL_QUERY_INBOUNDORDERPOSITION = "SELECT * FROM WMS_INBOUND_ORDERPOSITION " +
"WHERE ENTRYID=? AND SKUID=?";
String SQL_QUERY_INBOUNDORDERPOSITION_ICQA = "SELECT * FROM WMS_ICQA_ORDERPOSITION " +
"WHERE TASKID=? AND SKUID=?";
String SQL_QUERY_TRIPPOSITION = "SELECT RCS_TRIPPOSITION.ID FROM RCS_TRIP,RCS_TRIPPOSITION \n" +
"WHERE RCS_TRIP.ID=RCS_TRIPPOSITION.TRIP_ID \n" +
"AND RCS_TRIPPOSITION.TRIPPOSITION_STATE='Available'\n" +
"AND RCS_TRIPPOSITION.POD_USING_FACE=?\n" +
"AND RCS_TRIP.WORKSTATION_ID=? " +
"AND RCS_TRIP.TRIP_TYPE=? " +
"AND RCS_TRIP.POD_ID=? limit 1";
String SQL_QUERY_CURRENTPOD = "SELECT MD_POD.ID, MD_POD.POD_INDEX, MD_POD.TOWARD, \n" +
......@@ -87,7 +96,14 @@ public interface Sql_Table {
" where WMS_INBOUND_PODORDER.ENTRYPOSITIONID = WMS_INBOUND_ORDERPOSITION.ID\n" +
" and WMS_INBOUND_PODORDER.STATE = 'Available' \n" +
" and WMS_INBOUND_PODORDER.POD_ID=? and WMS_INBOUND_PODORDER.POD_FACE=?\n" +
" OrDER BY WMS_INBOUND_PODORDER.CREATED_DATE DESC limit 1";
" ORDER BY WMS_INBOUND_PODORDER.CREATED_DATE DESC limit 1";
String SQL_QUERY_PODORDRTASK_ICQA = "select WMS_ICQA_PODORDER.* from WMS_ICQA_PODORDER, WMS_ICQA_ORDERPOSITION \n" +
" where WMS_ICQA_PODORDER.TASKID = WMS_ICQA_ORDERPOSITION.ID\n" +
" and WMS_ICQA_PODORDER.STATE = 'Available' \n" +
" and WMS_ICQA_PODORDER.POD_ID=? and WMS_ICQA_PODORDER.POD_FACE=?\n" +
" ORDER BY WMS_ICQA_PODORDER.CREATED_DATE DESC limit 1";
String NEW = "New";
String TABLE_OB_CUSTOMERSHIPMENT = "OB_CUSTOMERSHIPMENT";
String TABLE_OB_CUSTOMERSHIPMENTPOSITION = "OB_CUSTOMERSHIPMENTPOSITION";
......@@ -99,4 +115,35 @@ public interface Sql_Table {
"AND NOT EXISTS (SELECT 1 FROM WMS_OUTBOUND_ORDERPOSITION \n" +
"WHERE WMS_OUTBOUND_ORDERPOSITION.ORDERID=WMS_OUTBOUND_ORDER.ORDERID \n" +
"AND WMS_OUTBOUND_ORDERPOSITION.STATE<>'Finish')";
String SQL_QUERY_ICQA = "SELECT * FROM WMS_ICQA_ORDER WHERE 1=1 ";
String ALL_TYPE = "all";
String SKU_TYPE = "sku";
String SQL_QUERY_ICQA_BY_ID = "SELECT * FROM WMS_ICQA_ORDER WHERE TASKID=? AND STATE=?";
String SQL_QUERY_ICQAPOSITIONS = "SELECT * FROM WMS_ICQA_ORDERPOSITION WHERE TASKID=?";
String SQL_SEARCHINBOUND_FACTORY = " AND WAREHOUSE_ID=? ";
String SQL_SEARCHINBOUND_SECTION = " AND SECTION_ID=? ";
String SQL_SEARCHINBOUNDINFO =
"SELECT SKUID,AMOUNT,IFNULL(STORED,0) AS STORED,STATE FROM WMS_INBOUND_ORDERPOSITION WHERE ENTRYID = ?";
String SQL_SEARCHINBOUND_ENTRYID = " AND ENTRYID like ? ";
String SQL_SEARCHINBOUND =
"SELECT ENTRYID,STATE,DATE_FORMAT(CREATED_DATE,'%Y-%m-%d %H:%i:%s') as CREATED_DATE" +
",WAREHOUSE_ID FACTORY,SECTION_ID as SECTION " +
"FROM WMS_INBOUND_ORDER WHERE 1=1 ";
String SQL_INV_UNITLOADID =
"SELECT INV_UNITLOAD.ID FROM INV_UNITLOAD,MD_STORAGELOCATION WHERE MD_STORAGELOCATION.NAME=? " +
"AND MD_STORAGELOCATION.ID=INV_UNITLOAD.STORAGELOCATION_ID";
String SQL_MD_ITEMDATA =
"SELECT ID FROM MD_ITEMDATA WHERE SKUID=?";
String STATION_ID = "6db9c7c0-4f93-4fa1-82c0-fb6435af7aae";//NTYH01S1-S001-1
String STOW_OPERATOR_ID = "stowPod_user";//NTYH01S1-S001-1
String ICQA_OPERATOR_ID = "icqaPod_user";//NTYH01S1-S001-1
String STATION_NAME_STOWPOD = "STOWPOD_STATION";//NTYH01S1-S001-1
String STATION_NAME_ICQAPOD = "ICQAPOD_STATION";//NTYH01S1-S001-1
String WAREHOUSE = "456e94fe-127d-4861-9948-cc38760801b4";
String SQL_NEWSTORAGELOCATION = "SELECT MD_STORAGELOCATION.* FROM MD_STORAGELOCATION,INV_UNITLOAD \n" +
"WHERE MD_STORAGELOCATION.ID=INV_UNITLOAD.STORAGELOCATION_ID \n" +
"AND MD_STORAGELOCATION.POD_ID IS NOT NULL AND INV_UNITLOAD.ID NOT IN \n" +
"(SELECT UNITLOAD_ID from \n" +
"(SELECT sum(AMOUNT) as SUMALL,UNITLOAD_ID \n" +
"FROM INV_STOCKUNIT group by UNITLOAD_ID )UNITLOAD WHERE UNITLOAD.SUMALL>0) limit 1";
}
......@@ -208,14 +208,14 @@ public class WMSService {
BaseBpo order = new BaseBpo();
order.setTable(Sql_Table.WMS_ICQA_ORDER);
String orderId = CommonUtils.genUUID();
order.addKV("ICQAID", orderId);
order.addKV("TASKID", orderId);
order.addKV("CREATED_DATE",new Date(System.currentTimeMillis()));
order.addKV("FACTORY",CommonUtils.parseString("FACTORY",data));
order.addKV("SECTION",CommonUtils.parseString("SECTION",data));
order.addKV("SECTION",CommonUtils.parseString("SECTION",data));
if(CommonUtils.parseInteger("ALL",data)==1){
//"type":"all"
if(Objects.equals(CommonUtils.parseString("type", data), Sql_Table.ALL_TYPE)){
order.addKV("TYPE",Sql_Table.ALL_TYPE);
//检查是否有全盘在执行 如果没完成不能再生成
List<Map> rows = this.jdbcRepository.queryBySql(Sql_Table.SQL_QUERY_ICQA_BY_TYPE,"Finish");
if(rows!=null && rows.size()>0){
......@@ -239,6 +239,7 @@ public class WMSService {
}else{
//从 DATA选sku
order.addKV("TYPE",Sql_Table.SKU_TYPE);//两种类型
List<Map> skus = (List<Map>) data.get("DATA");
//查找所有存在盘点任务的SKU过滤
List<Map> allTaskingSKU = this.jdbcRepository.queryBySql(Sql_Table.SQL_ALL_TASKING_SKU,"Finish");
......@@ -285,4 +286,9 @@ public class WMSService {
}
return set;
}
//TODO
public void podRelease(Map req) {
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment