自测fix
This commit is contained in:
@@ -77,8 +77,12 @@ public class SsxSiteDeviceDriver extends AbstractOpcDeviceDriver implements Devi
|
||||
|
||||
int io_action = 0;
|
||||
int last_io_action = 0;
|
||||
int tier = 0;
|
||||
int last_tier = 0;
|
||||
double weight = 0;
|
||||
double last_weight = 0;
|
||||
int material_type = 0;
|
||||
int last_material_type =0;
|
||||
int barcode = 0;
|
||||
int last_barcode =0;
|
||||
|
||||
|
||||
boolean hasVehicle = false;
|
||||
@@ -142,33 +146,17 @@ public class SsxSiteDeviceDriver extends AbstractOpcDeviceDriver implements Devi
|
||||
move = this.itemProtocol.getMove();
|
||||
hasGoods = this.itemProtocol.getMove();
|
||||
action = this.itemProtocol.getAction();
|
||||
tier = this.itemProtocol.getTier();
|
||||
weight = this.itemProtocol.getWeight();
|
||||
material_type = this.itemProtocol.getMaterialType();
|
||||
barcode = this.itemProtocol.getBarcode();
|
||||
if (mode != last_mode) {
|
||||
this.setRequireSucess(false);
|
||||
if(mode==2){
|
||||
this.writing(0);
|
||||
}
|
||||
}
|
||||
if (move !=last_move||tier!=last_tier){
|
||||
resultSucess=false;
|
||||
}
|
||||
if (tier != last_tier&&move!=0 && this.getDeviceCode().endsWith("0101")||this.getDeviceCode().endsWith("0201") &&!resultSucess) {
|
||||
//高度数量变更后通知lms
|
||||
FeedBackTaskStatusRequest request = new FeedBackTaskStatusRequest();
|
||||
request.setState(String.valueOf(tier));
|
||||
request.setDevice_code(this.getDeviceCode());
|
||||
request.setType("2");
|
||||
acsToWmsService.notify(request);
|
||||
resultSucess=true;
|
||||
}else if (move ==1 && this.getDeviceCode().startsWith("ZJBDJW") &&!resultSucess) {
|
||||
//点位数量变更后通知lms
|
||||
FeedBackTaskStatusRequest request = new FeedBackTaskStatusRequest();
|
||||
request.setState("3");
|
||||
request.setDevice_code(this.getDeviceCode());
|
||||
request.setType("2");
|
||||
acsToWmsService.notify(request);
|
||||
resultSucess=true;
|
||||
}
|
||||
|
||||
|
||||
if (error != last_error) {
|
||||
}
|
||||
if (mode != last_mode) {
|
||||
@@ -230,7 +218,9 @@ public class SsxSiteDeviceDriver extends AbstractOpcDeviceDriver implements Devi
|
||||
last_error = error;
|
||||
last_move = move;
|
||||
last_task = task;
|
||||
last_tier = tier;
|
||||
last_weight = weight;
|
||||
last_material_type = material_type;
|
||||
last_barcode = barcode;
|
||||
last_action = action;
|
||||
|
||||
}
|
||||
|
||||
@@ -450,22 +450,22 @@ public class StandardInspectSiteDeviceDriver extends AbstractOpcDeviceDriver imp
|
||||
request.setDevice_code(devicecode);
|
||||
request.setMaterial_type(String.valueOf(material_type));
|
||||
request.setVehicle_code(String.valueOf(barcode));
|
||||
if (devicecode.startsWith("TBX")&&type==5&&barcode>0) {
|
||||
//满架下料
|
||||
request.setRequest_medthod_code(RequestMethodEnum.apply_mjxl.getCode());
|
||||
request.setRequest_medthod_name(RequestMethodEnum.apply_mjxl.getName());
|
||||
}else if (devicecode.startsWith("TBX")&&type==6) {
|
||||
//补空架
|
||||
request.setRequest_medthod_code(RequestMethodEnum.apply_tbxbkj.getCode());
|
||||
request.setRequest_medthod_name(RequestMethodEnum.apply_tbxbkj.getName());
|
||||
}else if (type==7) {
|
||||
//空托盘出库,包片机和销售出库空位都可以
|
||||
request.setRequest_medthod_code(RequestMethodEnum.apply_kghjrk.getCode());
|
||||
request.setRequest_medthod_name(RequestMethodEnum.apply_kghjrk.getName());
|
||||
}else if(devicecode.startsWith("BP")&&material_type>0){
|
||||
request.setRequest_medthod_code(RequestMethodEnum.apply_bpsl.getCode());
|
||||
request.setRequest_medthod_name(RequestMethodEnum.apply_bpsl.getName());
|
||||
}
|
||||
// if (devicecode.startsWith("TBX")&&type==5&&barcode>0) {
|
||||
// //满架下料
|
||||
// request.setRequest_medthod_code(RequestMethodEnum.apply_mjxl.getCode());
|
||||
// request.setRequest_medthod_name(RequestMethodEnum.apply_mjxl.getName());
|
||||
// }else if (devicecode.startsWith("TBX")&&type==6) {
|
||||
// //补空架
|
||||
// request.setRequest_medthod_code(RequestMethodEnum.apply_tbxbkj.getCode());
|
||||
// request.setRequest_medthod_name(RequestMethodEnum.apply_tbxbkj.getName());
|
||||
// }else if (type==7) {
|
||||
// //空托盘出库,包片机和销售出库空位都可以
|
||||
// request.setRequest_medthod_code(RequestMethodEnum.apply_kghjrk.getCode());
|
||||
// request.setRequest_medthod_name(RequestMethodEnum.apply_kghjrk.getName());
|
||||
// }else if(devicecode.startsWith("BP")&&material_type>0){
|
||||
// request.setRequest_medthod_code(RequestMethodEnum.apply_bpsl.getCode());
|
||||
// request.setRequest_medthod_name(RequestMethodEnum.apply_bpsl.getName());
|
||||
// }
|
||||
String resp = acsToWmsService.applyTask(request);
|
||||
JSONObject res_jo = JSONObject.parseObject(resp);
|
||||
if (StrUtil.equals(res_jo.getString("code"), "200")) {
|
||||
|
||||
@@ -53,6 +53,7 @@ public class PdaServiceImpl implements PdaService {
|
||||
public PdaResponseVo yclrk(JSONObject param) {
|
||||
param.put("request_medthod_code", "YCLRKTask");
|
||||
param.put("request_medthod_name", "原材料入库");
|
||||
param.put("device_code",param.getString("start_point"));
|
||||
acsToWmsService.acsApply(param);
|
||||
return PdaResponseVo.pdaResultOk("原材料入库成功");
|
||||
}
|
||||
@@ -60,6 +61,7 @@ public class PdaServiceImpl implements PdaService {
|
||||
public PdaResponseVo yclck(JSONObject param) {
|
||||
param.put("request_medthod_code", "YCLCKTask");
|
||||
param.put("request_medthod_name", "原材料出库");
|
||||
param.put("device_code",param.getString("start_point"));
|
||||
acsToWmsService.acsApply(param);
|
||||
return PdaResponseVo.pdaResultOk("原材料出库成功");
|
||||
}
|
||||
|
||||
@@ -94,6 +94,7 @@ public class YCLRKTask extends AbstractTask {
|
||||
// 设置终点并修改创建成功状态
|
||||
task.setPoint_code2(point.getPoint_code());
|
||||
task.setTask_status(TaskStatus.CREATED.getCode());
|
||||
task.setVehicle_code(jsonObject.getString("mother_tray"));
|
||||
task.setRemark("");
|
||||
taskService.update(task);
|
||||
|
||||
@@ -114,9 +115,9 @@ public class YCLRKTask extends AbstractTask {
|
||||
*/
|
||||
private SchBasePoint findNextPoint() {
|
||||
String regionCode = "YL";
|
||||
List<SchBasePoint> schBasePointList = pointMapper.findPointByRegion(regionCode, "2");
|
||||
List<SchBasePoint> schBasePointList = pointMapper.findPointByRegion(regionCode, "0");
|
||||
for (SchBasePoint schBasePoint : schBasePointList) {
|
||||
if ("2".equals(schBasePoint.getPoint_status())
|
||||
if ("0".equals(schBasePoint.getPoint_status())
|
||||
&& schBasePoint.getVehicle_qty() ==0) {
|
||||
log.info("原材料入库找到当前符合条件的点位{}", schBasePoint.getPoint_code());
|
||||
return schBasePoint;
|
||||
@@ -152,7 +153,7 @@ public class YCLRKTask extends AbstractTask {
|
||||
: null;
|
||||
}
|
||||
String startPoint = taskObj.getPoint_code1(); // 获取起点
|
||||
String endPoint = ObjectUtil.isNotEmpty(taskObj.getPoint_code2())?taskObj.getPoint_code2().substring(0,taskObj.getPoint_code2().length()-2):"0"; // 获取终点
|
||||
String endPoint = taskObj.getPoint_code2(); // 获取终点
|
||||
SchBasePoint startPointObj = pointService.getById(startPoint);
|
||||
SchBasePoint endPointObj = pointService.getById(endPoint);
|
||||
// 根据传来的类型去对任务进行操作
|
||||
|
||||
Reference in New Issue
Block a user