Browse Source

测试

master
18188916393 2 years ago
parent
commit
51d6ca3b3c
  1. 14
      wms/hd/nladmin-system/src/main/java/org/nl/wms/ext/acs/rest/AcsToWmsController.java
  2. 12
      wms/hd/nladmin-system/src/main/java/org/nl/wms/ext/acs/service/AcsToWmsService.java
  3. 18
      wms/hd/nladmin-system/src/main/java/org/nl/wms/ext/acs/service/impl/AcsToWmsServiceImpl.java

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

@ -75,12 +75,18 @@ public class AcsToWmsController {
} }
@PostMapping("/getVehicleInfoBycode") @PostMapping("/getVehicleInfoBycode")
@Log("根据编码获取托盘信息") @Log("根据设备编码编码获取托盘信息")
@ApiOperation("根据编码获取托盘信息") @ApiOperation("根据设备编码编码获取托盘信息")
public ResponseEntity<Object> getVehicleInfoBycode(@RequestBody Map whereJson) { public ResponseEntity<Object> getVehicleInfoByDevice_code(@RequestBody Map whereJson) {
return new ResponseEntity<>(acsToWmsService.getVehicleInfoBycode(whereJson), HttpStatus.OK); return new ResponseEntity<>(acsToWmsService.getVehicleInfoByDevice_code(whereJson), HttpStatus.OK);
} }
@PostMapping("/getVehicleInfoByVehiclecode")
@Log("根据托盘编码获取托盘信息")
@ApiOperation("根据托盘编码获取托盘信息")
public ResponseEntity<Object> getVehicleInfoByVehiclecode(@RequestBody Map whereJson) {
return new ResponseEntity<>(acsToWmsService.getVehicleInfoByVehiclecode(whereJson), HttpStatus.OK);
}
@PostMapping("/sureProduceTask") @PostMapping("/sureProduceTask")
@Log("排产单确认") @Log("排产单确认")
@ApiOperation("排产单确认") @ApiOperation("排产单确认")

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

@ -47,13 +47,21 @@ public interface AcsToWmsService {
Map<String, Object> getDevicecodeByVehicle_ype(Map jsonObject); Map<String, Object> getDevicecodeByVehicle_ype(Map jsonObject);
/** /**
* 根据编码获取托盘信息 * 根据设备编码获取托盘信息
* *
* @param jsonObject 条件 * @param jsonObject 条件
* @return Map<String, Object> * @return Map<String, Object>
*/ */
Map<String, Object> getVehicleInfoBycode(Map jsonObject); Map<String, Object> getVehicleInfoByDevice_code(Map jsonObject);
/**
* 根据托盘编码获取托盘信息
*
* @param jsonObject 条件
* @return Map<String, Object>
*/
Map<String, Object> getVehicleInfoByVehiclecode(Map jsonObject);
/** /**
* 排产单确认 * 排产单确认
* *

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

@ -178,7 +178,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
String material_id = (String) produceInfoByCode.get("material_id"); String material_id = (String) produceInfoByCode.get("material_id");
String cust_id = (String) produceInfoByCode.get("cust_id"); String cust_id = (String) produceInfoByCode.get("cust_id");
String producetask_id = (String) produceInfoByCode.get("producetask_id"); String producetask_id = (String) produceInfoByCode.get("producetask_id");
WQLObject.getWQLObject("st_buss_vehiclegroup").delete("vehicle_code ='"+vehicle_code+"'"); WQLObject.getWQLObject("st_buss_vehiclegroup").delete("vehicle_code ='" + vehicle_code + "'");
//如果上报不了,则去点位上取(木托盘情况) //如果上报不了,则去点位上取(木托盘情况)
if (StrUtil.equals("0", vehicle_code)) { if (StrUtil.equals("0", vehicle_code)) {
vehicle_code = produceInfoByCode.getString("vehicle_code"); vehicle_code = produceInfoByCode.getString("vehicle_code");
@ -349,7 +349,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public Map<String, Object> getVehicleInfoBycode(Map jsonObject) { public Map<String, Object> getVehicleInfoByDevice_code(Map jsonObject) {
String device_code = (String) jsonObject.get("device_code"); String device_code = (String) jsonObject.get("device_code");
JSONObject pointObj = WQLObject.getWQLObject("sch_base_point").query("point_code='" + device_code + "'").uniqueResult(0); JSONObject pointObj = WQLObject.getWQLObject("sch_base_point").query("point_code='" + device_code + "'").uniqueResult(0);
String vehicle_code = pointObj.getString("vehicle_code"); String vehicle_code = pointObj.getString("vehicle_code");
@ -371,6 +371,20 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
return result; return result;
} }
@Override
public Map<String, Object> getVehicleInfoByVehiclecode(Map jsonObject) {
String vehicle_code = (String) jsonObject.get("vehicle_code");
JSONObject vehicleObj = WQLObject.getWQLObject("st_buss_vehiclegroup").query("vehicle_code='" + vehicle_code + "' AND is_delete='0'").uniqueResult(0);
if (ObjectUtil.isEmpty(vehicleObj)){
throw new BadRequestException("未找到托盘编码为'"+vehicle_code+"'的组盘信息");
}
JSONObject result = new JSONObject();
result.put("status", HttpStatus.OK.value());
result.put("message", "反馈成功!");
result.put("data", vehicleObj);
return result;
}
@Override @Override
public Map<String, Object> 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");

Loading…
Cancel
Save