fix 压机叫料

This commit is contained in:
张江玮
2023-09-27 09:35:02 +08:00
parent f9e58f9c36
commit c3b3a24f60
6 changed files with 48 additions and 0 deletions

View File

@@ -107,4 +107,12 @@ public class AcsToWmsController {
public ResponseEntity<Object> updateKiln(@RequestBody JSONObject whereJson) {
return new ResponseEntity<>(acsToWmsService.updateKiln(whereJson), HttpStatus.OK);
}
@PostMapping("/deactivatePoint")
@Log("禁用或启用点位")
@ApiOperation("禁用或启用点位")
@SaIgnore
public void deactivatePoint(@RequestBody JSONObject param) {
acsToWmsService.deactivatePoint(param);
}
}

View File

@@ -95,4 +95,6 @@ public interface AcsToWmsService {
*/
JSONObject updateKiln(JSONObject whereJson);
void deactivatePoint(JSONObject param);
}

View File

@@ -631,4 +631,14 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
return resp;
}
public void deactivatePoint(JSONObject param) {
String pointCode = param.getString("device_code");
if (StrUtil.isNotBlank(pointCode)) {
JSONObject update = new JSONObject();
update.put("is_used", param.getBooleanValue("is_used") ? "1" : "0");
update.put("update_time", DateUtil.now());
WQLObject.getWQLObject("sch_base_point").update(update, "point_code = '" + pointCode + "'");
}
}
}