Browse Source

rev:更新

master
gengby 2 months ago
parent
commit
4c3bb4dfa6
  1. 2
      nladmin-system/nlsso-server/src/main/java/org/nl/AppRun.java
  2. 4
      nladmin-system/nlsso-server/src/main/java/org/nl/acs/device/driver/conveyor/appearance_inspection_scannner_conveyor/AppearanceInspectionScannerConveyorDeviceDriver.java
  3. 2
      nladmin-system/nlsso-server/src/main/java/org/nl/acs/ext/wms/service/GateWayService.java
  4. 8
      nladmin-system/nlsso-server/src/main/java/org/nl/acs/ext/wms/service/WmsToAcsService.java
  5. 21
      nladmin-system/nlsso-server/src/main/java/org/nl/acs/ext/wms/service/impl/WmsToAcsServiceImpl.java
  6. 2
      nladmin-system/nlsso-server/src/main/resources/config/application-prod.yml

2
nladmin-system/nlsso-server/src/main/java/org/nl/AppRun.java

@ -40,7 +40,7 @@ public class AppRun {
public static void main(String[] args) { public static void main(String[] args) {
SpringApplication.run(AppRun.class, args); SpringApplication.run(AppRun.class, args);
new HeartServer(new InetSocketAddress("192.168.8.218", 20889)); new HeartServer(new InetSocketAddress("192.168.18.218", 20889));
System.out.println("项目启动成功"); System.out.println("项目启动成功");
} }

4
nladmin-system/nlsso-server/src/main/java/org/nl/acs/device/driver/conveyor/appearance_inspection_scannner_conveyor/AppearanceInspectionScannerConveyorDeviceDriver.java

@ -372,7 +372,9 @@ public class AppearanceInspectionScannerConveyorDeviceDriver extends AbstractOpc
return; return;
} }
JSONObject param = new JSONObject(); JSONObject param = new JSONObject();
param.put(this.barcode, this.currentDeviceCode); param.put("vehicle_code", this.barcode);
param.put("start_point", this.currentDeviceCode);
param.put("height", this.height);
CommonRequest<JSONObject> request = CommonRequest<JSONObject> request =
CommonRequest.<JSONObject>builder() CommonRequest.<JSONObject>builder()
.service("InStorage") .service("InStorage")

2
nladmin-system/nlsso-server/src/main/java/org/nl/acs/ext/wms/service/GateWayService.java

@ -26,6 +26,8 @@ public class GateWayService {
return wmsToAcsService.pinkStartStop(request.handleObject()); return wmsToAcsService.pinkStartStop(request.handleObject());
} else if ("toCommand".equals(request.getType())) { } else if ("toCommand".equals(request.getType())) {
return wmsToAcsService.toCommand(request.handleObject()); return wmsToAcsService.toCommand(request.handleObject());
} else if ("getWeight".equals(request.getType())){
return wmsToAcsService.getWeight(request.handleObject());
} }
resp.put("code", "400"); resp.put("code", "400");
resp.put("msg", "type有误"); resp.put("msg", "type有误");

8
nladmin-system/nlsso-server/src/main/java/org/nl/acs/ext/wms/service/WmsToAcsService.java

@ -39,4 +39,12 @@ public interface WmsToAcsService {
* @return * @return
*/ */
JSONObject toCommand(JSONObject req); JSONObject toCommand(JSONObject req);
/**
* 获取重量
*
* @param req
* @return
*/
JSONObject getWeight(JSONObject req);
} }

21
nladmin-system/nlsso-server/src/main/java/org/nl/acs/ext/wms/service/impl/WmsToAcsServiceImpl.java

@ -358,4 +358,25 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
return resp; return resp;
} }
@Override
public JSONObject getWeight(JSONObject req) {
log.info("getWeight--------------:输入参数:" + JSON.toJSONString(req));
Assert.notNull(req);
String device_code = req.getString("device_code");
Device device = deviceAppService.findDeviceByCode(device_code);
JSONObject resp = new JSONObject();
JSONObject data = new JSONObject();
if (device != null && device.getDeviceDriver() instanceof AppearanceInspectionScannerConveyorDeviceDriver){
AppearanceInspectionScannerConveyorDeviceDriver appearanceInspectionScannerConveyorDeviceDriver = (AppearanceInspectionScannerConveyorDeviceDriver) device.getDeviceDriver();
data.put("weight",appearanceInspectionScannerConveyorDeviceDriver.getWeight());
} else {
throw new BadRequestException("设备不存在");
}
resp.put("code","200");
resp.put("msg", "获取成功");
resp.put("data",data);
log.info("getWeight--------------:输出参数:" + JSON.toJSONString(resp));
return resp;
}
} }

2
nladmin-system/nlsso-server/src/main/resources/config/application-prod.yml

@ -77,7 +77,7 @@ spring:
active: true active: true
username: root username: root
password: 123456 password: 123456
url: 192.168.8.218 url: 192.168.18.218
clientId: hs_mqtt_prod clientId: hs_mqtt_prod
cleanSession: false cleanSession: false
topics: topics:

Loading…
Cancel
Save