手持调整
This commit is contained in:
@@ -0,0 +1,17 @@
|
|||||||
|
package org.nl.wms.mes.controller;
|
||||||
|
|
||||||
|
import cn.dev33.satoken.annotation.SaIgnore;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.context.annotation.Lazy;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
@Slf4j
|
||||||
|
@RestController
|
||||||
|
@Api(tags = "MES交互接口")
|
||||||
|
@RequestMapping("/api/mes")
|
||||||
|
@SaIgnore
|
||||||
|
@Lazy
|
||||||
|
public class MesController {
|
||||||
|
}
|
||||||
@@ -35,6 +35,20 @@ public class PdaController {
|
|||||||
@Resource
|
@Resource
|
||||||
private PdaService pdaService;
|
private PdaService pdaService;
|
||||||
|
|
||||||
|
@PostMapping("/yclrk")
|
||||||
|
@Log("原材料入库")
|
||||||
|
@ApiOperation("原材料入库")
|
||||||
|
public ResponseEntity<Object> yclrk(@RequestBody JSONObject param){
|
||||||
|
return new ResponseEntity<>(pdaService.yclrk(param), HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/dwzt")
|
||||||
|
@Log("点位状态")
|
||||||
|
@ApiOperation("点位状态")
|
||||||
|
public ResponseEntity<Object> dwzt(@RequestBody JSONObject param){
|
||||||
|
return new ResponseEntity<>(pdaService.dwzt(param), HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@PostMapping("/yclck")
|
@PostMapping("/yclck")
|
||||||
@Log("原材料出库")
|
@Log("原材料出库")
|
||||||
@@ -43,32 +57,11 @@ public class PdaController {
|
|||||||
return new ResponseEntity<>(pdaService.yclck(param), HttpStatus.OK);
|
return new ResponseEntity<>(pdaService.yclck(param), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/hwcl")
|
@PostMapping("/task")
|
||||||
@Log("回温出料")
|
@Log("点对点任务")
|
||||||
@ApiOperation("回温出料")
|
@ApiOperation("点对点任务")
|
||||||
public ResponseEntity<Object> hwcl(@RequestBody JSONObject param){
|
public ResponseEntity<Object> task(@RequestBody JSONObject param){
|
||||||
return new ResponseEntity<>(pdaService.hwcl(param), HttpStatus.OK);
|
return new ResponseEntity<>(pdaService.task(param), HttpStatus.OK);
|
||||||
}
|
|
||||||
|
|
||||||
@PostMapping("/fbccl")
|
|
||||||
@Log("废包材处理")
|
|
||||||
@ApiOperation("废包材处理")
|
|
||||||
public ResponseEntity<Object> fbccl(@RequestBody JSONObject param){
|
|
||||||
return new ResponseEntity<>(pdaService.fbccl(param), HttpStatus.OK);
|
|
||||||
}
|
|
||||||
|
|
||||||
@PostMapping("/ktphs")
|
|
||||||
@Log("空托盘回收")
|
|
||||||
@ApiOperation("空托盘回收")
|
|
||||||
public ResponseEntity<Object> ktphs(@RequestBody JSONObject param){
|
|
||||||
return new ResponseEntity<>(pdaService.ktphs(param), HttpStatus.OK);
|
|
||||||
}
|
|
||||||
|
|
||||||
@PostMapping("/ktpck")
|
|
||||||
@Log("空托盘出库")
|
|
||||||
@ApiOperation("空托盘出库")
|
|
||||||
public ResponseEntity<Object> ktpck(@RequestBody JSONObject param){
|
|
||||||
return new ResponseEntity<>(pdaService.ktpck(param), HttpStatus.OK);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/zpjb")
|
@PostMapping("/zpjb")
|
||||||
|
|||||||
@@ -9,15 +9,14 @@ import org.nl.wms.pda.service.dao.vo.PdaResponseVo;
|
|||||||
* @Date: 2023/8/1
|
* @Date: 2023/8/1
|
||||||
*/
|
*/
|
||||||
public interface PdaService {
|
public interface PdaService {
|
||||||
|
|
||||||
|
PdaResponseVo dwzt(JSONObject param);
|
||||||
|
|
||||||
|
PdaResponseVo yclrk(JSONObject param);
|
||||||
PdaResponseVo yclck(JSONObject param);
|
PdaResponseVo yclck(JSONObject param);
|
||||||
|
|
||||||
PdaResponseVo hwcl(JSONObject param);
|
PdaResponseVo task(JSONObject param);
|
||||||
|
|
||||||
PdaResponseVo fbccl(JSONObject param);
|
|
||||||
|
|
||||||
PdaResponseVo ktphs(JSONObject param);
|
|
||||||
|
|
||||||
PdaResponseVo ktpck(JSONObject param);
|
|
||||||
|
|
||||||
PdaResponseVo zpjb(JSONObject param);
|
PdaResponseVo zpjb(JSONObject param);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,6 +43,19 @@ public class PdaServiceImpl implements PdaService {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private AcsToWmsService acsToWmsService;
|
private AcsToWmsService acsToWmsService;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PdaResponseVo dwzt(JSONObject param) {
|
||||||
|
acsToWmsService.notify(param);
|
||||||
|
return PdaResponseVo.pdaResultOk("回温状态查询成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PdaResponseVo yclrk(JSONObject param) {
|
||||||
|
param.put("request_medthod_code", "YCLRKTask");
|
||||||
|
param.put("request_medthod_name", "原材料入库");
|
||||||
|
acsToWmsService.acsApply(param);
|
||||||
|
return PdaResponseVo.pdaResultOk("原材料入库成功");
|
||||||
|
}
|
||||||
@Override
|
@Override
|
||||||
public PdaResponseVo yclck(JSONObject param) {
|
public PdaResponseVo yclck(JSONObject param) {
|
||||||
param.put("request_medthod_code", "YCLCKTask");
|
param.put("request_medthod_code", "YCLCKTask");
|
||||||
@@ -52,73 +65,19 @@ public class PdaServiceImpl implements PdaService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PdaResponseVo hwcl(JSONObject param) {
|
public PdaResponseVo task(JSONObject param) {
|
||||||
param.put("device_code",param.getString("point_code"));
|
param.put("request_medthod_code", "PONITTask");
|
||||||
if(!param.getString("point_code").startsWith("TBX")){
|
param.put("request_medthod_name", "点对点任务");
|
||||||
throw new BadRequestException("非涂板线禁止补空架!");
|
|
||||||
}
|
|
||||||
param.put("request_medthod_code","TBXBKJTask");
|
|
||||||
param.put("request_medthod_name","涂板线补空架");
|
|
||||||
acsToWmsService.acsApply(param);
|
acsToWmsService.acsApply(param);
|
||||||
return PdaResponseVo.pdaResultOk("涂板线补空架");
|
return PdaResponseVo.pdaResultOk("任务生成成功");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public PdaResponseVo fbccl(JSONObject param) {
|
|
||||||
//根据载具编码寻找点位,并且将它更新掉
|
|
||||||
String vehicleCode=param.getString("vehicle_code");
|
|
||||||
SchBaseVehiclematerialgroup groupEntity = vehiclematerialgroupService.getOne(new LambdaQueryWrapper<SchBaseVehiclematerialgroup>()
|
|
||||||
.eq(SchBaseVehiclematerialgroup::getVehicle_code, vehicleCode)
|
|
||||||
.eq(SchBaseVehiclematerialgroup::getGroup_bind_material_status,
|
|
||||||
GroupBindMaterialStatusEnum.BOUND.getValue()));
|
|
||||||
groupEntity.setGroup_bind_material_status(GroupBindMaterialStatusEnum.UNBOUND.getValue());
|
|
||||||
groupEntity.setUpdate_id(GeneralDefinition.ACS_ID);
|
|
||||||
groupEntity.setUpdate_name(GeneralDefinition.ACS_NAME);
|
|
||||||
groupEntity.setUpdate_time(DateUtil.now());
|
|
||||||
vehiclematerialgroupService.update(groupEntity);
|
|
||||||
SchBasePoint pointObj=pointService.getById(groupEntity.getPoint_code());
|
|
||||||
if(pointObj.getVehicle_code().contains(",")){
|
|
||||||
vehicleCode+=',';
|
|
||||||
}
|
|
||||||
pointObj.setVehicle_code(pointObj.getVehicle_code().replace(vehicleCode,""));
|
|
||||||
pointObj.setVehicle_qty(pointObj.getVehicle_qty()-1);
|
|
||||||
pointService.update(pointObj);
|
|
||||||
//清空组盘表的信息
|
|
||||||
return PdaResponseVo.pdaResultOk("清空物料信息请求成功");
|
|
||||||
}
|
|
||||||
@Override
|
|
||||||
public PdaResponseVo ktphs(JSONObject param) {
|
|
||||||
if(!param.getString("point_code").startsWith("BP")){
|
|
||||||
throw new BadRequestException("非包片机禁止叫料!");
|
|
||||||
}
|
|
||||||
param.put("device_code",param.getString("point_code"));
|
|
||||||
param.put("request_medthod_code","BPSLTask");
|
|
||||||
param.put("request_medthod_name","包片上料");
|
|
||||||
acsToWmsService.acsApply(param);
|
|
||||||
return PdaResponseVo.pdaResultOk("呼叫物料请求成功");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public PdaResponseVo ktpck(JSONObject param) {
|
|
||||||
if(!param.getString("point_code").startsWith("BP")){
|
|
||||||
throw new BadRequestException("非包片机禁止叫料!");
|
|
||||||
}
|
|
||||||
param.put("device_code",param.getString("point_code"));
|
|
||||||
param.put("request_medthod_code","BPSLTask");
|
|
||||||
param.put("request_medthod_name","包片上料");
|
|
||||||
acsToWmsService.acsApply(param);
|
|
||||||
return PdaResponseVo.pdaResultOk("呼叫物料请求成功");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PdaResponseVo zpjb(JSONObject param) {
|
public PdaResponseVo zpjb(JSONObject param) {
|
||||||
if(!param.getString("point_code").startsWith("BP")){
|
param.put("request_medthod_code", "PONITTask");
|
||||||
throw new BadRequestException("非包片机禁止叫料!");
|
param.put("request_medthod_name", "点对点任务");
|
||||||
}
|
|
||||||
param.put("device_code",param.getString("point_code"));
|
|
||||||
param.put("request_medthod_code","BPSLTask");
|
|
||||||
param.put("request_medthod_name","包片上料");
|
|
||||||
acsToWmsService.acsApply(param);
|
acsToWmsService.acsApply(param);
|
||||||
return PdaResponseVo.pdaResultOk("呼叫物料请求成功");
|
return PdaResponseVo.pdaResultOk("组盘解绑成功");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user