Browse Source

提交

master
18188916393 2 years ago
parent
commit
db6b9943bf
  1. BIN
      wms/hd/nladmin-system/src/main/java/org/nl/modules/system/wql/sys.xls
  2. 3
      wms/hd/nladmin-system/src/main/java/org/nl/wms/ext/acs/rest/AcsToWmsController.java
  3. 4
      wms/hd/nladmin-system/src/main/java/org/nl/wms/ext/acs/service/AcsToWmsService.java
  4. 7
      wms/hd/nladmin-system/src/main/java/org/nl/wms/ext/acs/service/impl/AcsToWmsServiceImpl.java
  5. 13
      wms/hd/nladmin-system/src/test/java/org/nl/Test3.java

BIN
wms/hd/nladmin-system/src/main/java/org/nl/modules/system/wql/sys.xls

Binary file not shown.

3
wms/hd/nladmin-system/src/main/java/org/nl/wms/ext/acs/rest/AcsToWmsController.java

@ -78,8 +78,7 @@ public class AcsToWmsController {
@Log("排产单确认") @Log("排产单确认")
@ApiOperation("排产单确认") @ApiOperation("排产单确认")
public ResponseEntity<Object> sureProduceTask(@RequestBody Map whereJson) { public ResponseEntity<Object> sureProduceTask(@RequestBody Map whereJson) {
acsToWmsService.sureProduceTask(whereJson); return new ResponseEntity<>(acsToWmsService.sureProduceTask(whereJson), HttpStatus.OK);
return new ResponseEntity<>(HttpStatus.OK);
} }
@PostMapping("/status") @PostMapping("/status")

4
wms/hd/nladmin-system/src/main/java/org/nl/wms/ext/acs/service/AcsToWmsService.java

@ -5,7 +5,7 @@ import java.util.Map;
public interface AcsToWmsService { public interface AcsToWmsService {
/** /**
* ACS客户端--->WMS服务 * ACS客户端--->WMS服务
* ACS向WMS申请任务 * ACS向WMS申请任务
* *
* @param jsonObject 条件 * @param jsonObject 条件
@ -61,7 +61,7 @@ public interface AcsToWmsService {
* @return Map<String, Object> * @return Map<String, Object>
*/ */
void sureProduceTask(Map jsonObject); Map<String, Object> sureProduceTask(Map jsonObject);
/** /**
* ACS客户端--->WMS服务端 * ACS客户端--->WMS服务端
* ACS向WMS反馈任务状态 * ACS向WMS反馈任务状态

7
wms/hd/nladmin-system/src/main/java/org/nl/wms/ext/acs/service/impl/AcsToWmsServiceImpl.java

@ -310,7 +310,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
} }
@Override @Override
public void sureProduceTask(Map jsonObject) { public Map<String, Object> sureProduceTask(Map jsonObject) {
String producetask_code = (String) jsonObject.get("producetask_code"); String producetask_code = (String) jsonObject.get("producetask_code");
String device_code = (String) jsonObject.get("device_code"); String device_code = (String) jsonObject.get("device_code");
String material_code = (String) jsonObject.get("material_code"); String material_code = (String) jsonObject.get("material_code");
@ -356,6 +356,11 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
taskObj.put("real_qty",qty); taskObj.put("real_qty",qty);
} }
taskTable.update(taskObj); taskTable.update(taskObj);
JSONObject result = new JSONObject();
result.put("status", HttpStatus.OK.value());
result.put("message", "任务状态反馈成功!");
result.put("data", new JSONObject());
return result;
} }
@Override @Override

13
wms/hd/nladmin-system/src/test/java/org/nl/Test3.java

@ -13,6 +13,8 @@ import java.text.ParseException;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.Calendar; import java.util.Calendar;
import java.util.Date; import java.util.Date;
import java.util.Queue;
import java.util.concurrent.ArrayBlockingQueue;
public class Test3 extends BaseTest { public class Test3 extends BaseTest {
@org.junit.Test @org.junit.Test
@ -263,4 +265,15 @@ public class Test3 extends BaseTest {
} }
} }
} }
public static void main(String[] args) {
Queue<String> ma = new ArrayBlockingQueue<>(10);
for (int i = 0; i <5 ; i++) {
ma.offer("pla00"+i);
}
ma.poll();
for (String str:ma){
System.out.println(str);
}
System.out.println(ma.size());
}
} }

Loading…
Cancel
Save