Merge branch 'master' of http://121.40.234.130:8899/root/lanzhouhailiang_one
This commit is contained in:
@@ -133,10 +133,10 @@ public class NDCAgvServiceImpl implements NDCAgvService {
|
|||||||
if (type == 1) {
|
if (type == 1) {
|
||||||
b = new byte[]{(byte) 0X87, (byte) 0XCD,
|
b = new byte[]{(byte) 0X87, (byte) 0XCD,
|
||||||
(byte) 0X00, (byte) 0X08,
|
(byte) 0X00, (byte) 0X08,
|
||||||
(byte) 0X00, (byte) 0X1A,
|
(byte) 0X00, (byte) 0X16,
|
||||||
(byte) 0X00, (byte) 0X01,
|
(byte) 0X00, (byte) 0X01,
|
||||||
(byte) 0X00, (byte) 0X71,
|
(byte) 0X00, (byte) 0X71,
|
||||||
(byte) 0X00, (byte) 0X16,
|
(byte) 0X00, (byte) 0X12,
|
||||||
(byte) 0X01, prioritylow,
|
(byte) 0X01, prioritylow,
|
||||||
(byte) 0X00, (byte) 0X01,
|
(byte) 0X00, (byte) 0X01,
|
||||||
(byte) ikeyhigh, (byte) ikeylow,
|
(byte) ikeyhigh, (byte) ikeylow,
|
||||||
@@ -145,17 +145,15 @@ public class NDCAgvServiceImpl implements NDCAgvService {
|
|||||||
(byte) qhdhigh, (byte) qhdlow,
|
(byte) qhdhigh, (byte) qhdlow,
|
||||||
(byte) qhdhigh2, (byte) qhdlow2,
|
(byte) qhdhigh2, (byte) qhdlow2,
|
||||||
(byte) fhdhigh, (byte) fhdlow,
|
(byte) fhdhigh, (byte) fhdlow,
|
||||||
(byte) fhdhigh2, (byte) fhdlow2,
|
(byte) fhdhigh2, (byte) fhdlow2
|
||||||
(byte) 0X00, (byte) 0X00,
|
|
||||||
(byte) 0X00, (byte) 0X00
|
|
||||||
};
|
};
|
||||||
} else if (type == 2) {
|
} else if (type == 2) {
|
||||||
b = new byte[]{(byte) 0X87, (byte) 0XCD,
|
b = new byte[]{(byte) 0X87, (byte) 0XCD,
|
||||||
(byte) 0X00, (byte) 0X08,
|
(byte) 0X00, (byte) 0X08,
|
||||||
(byte) 0X00, (byte) 0X1A,
|
(byte) 0X00, (byte) 0X16,
|
||||||
(byte) 0X00, (byte) 0X01,
|
(byte) 0X00, (byte) 0X01,
|
||||||
(byte) 0X00, (byte) 0X71,
|
(byte) 0X00, (byte) 0X71,
|
||||||
(byte) 0X00, (byte) 0X16,
|
(byte) 0X00, (byte) 0X12,
|
||||||
(byte) 0X01, prioritylow,
|
(byte) 0X01, prioritylow,
|
||||||
(byte) 0X00, (byte) 0X01,
|
(byte) 0X00, (byte) 0X01,
|
||||||
(byte) ikeyhigh, (byte) ikeylow,
|
(byte) ikeyhigh, (byte) ikeylow,
|
||||||
@@ -164,27 +162,23 @@ public class NDCAgvServiceImpl implements NDCAgvService {
|
|||||||
(byte) qhdhigh, (byte) qhdlow,
|
(byte) qhdhigh, (byte) qhdlow,
|
||||||
(byte) 0X00, (byte) 0X00,
|
(byte) 0X00, (byte) 0X00,
|
||||||
(byte) fhdhigh, (byte) fhdlow,
|
(byte) fhdhigh, (byte) fhdlow,
|
||||||
(byte) 0X00, (byte) 0X00,
|
|
||||||
(byte) 0X00, (byte) 0X00,
|
|
||||||
(byte) 0X00, (byte) 0X00
|
(byte) 0X00, (byte) 0X00
|
||||||
};
|
};
|
||||||
} else if (type == 3) {
|
} else if (type == 3) {
|
||||||
b = new byte[]{(byte) 0X87, (byte) 0XCD,
|
b = new byte[]{(byte) 0X87, (byte) 0XCD,
|
||||||
(byte) 0X00, (byte) 0X08,
|
(byte) 0X00, (byte) 0X08,
|
||||||
(byte) 0X00, (byte) 0X1A,
|
(byte) 0X00, (byte) 0X16,
|
||||||
(byte) 0X00, (byte) 0X01,
|
(byte) 0X00, (byte) 0X01,
|
||||||
(byte) 0X00, (byte) 0X71,
|
(byte) 0X00, (byte) 0X71,
|
||||||
(byte) 0X00, (byte) 0X16,
|
(byte) 0X00, (byte) 0X12,
|
||||||
(byte) 0X01, prioritylow,
|
(byte) 0X01, prioritylow,
|
||||||
(byte) 0X00, (byte) 0X01,
|
(byte) 0X00, (byte) 0X01,
|
||||||
(byte) ikeyhigh, (byte) ikeylow,
|
(byte) ikeyhigh, (byte) ikeylow,
|
||||||
(byte) ikeyhigh, (byte) ikeylow,
|
(byte) ikeyhigh, (byte) ikeylow,
|
||||||
(byte) typehigh, (byte) typelow,
|
(byte) typehigh, (byte) typelow,
|
||||||
(byte) qhdhigh, (byte) qhdlow,
|
(byte) qhdhigh, (byte) qhdlow,
|
||||||
(byte) 0X00, (byte) 0X00,
|
|
||||||
(byte) fhdhigh, (byte) fhdlow,
|
|
||||||
(byte) 0X00, (byte) 0X00,
|
|
||||||
(byte) qhdhigh2, (byte) qhdlow2,
|
(byte) qhdhigh2, (byte) qhdlow2,
|
||||||
|
(byte) fhdhigh, (byte) fhdlow,
|
||||||
(byte) fhdhigh2, (byte) fhdlow2
|
(byte) fhdhigh2, (byte) fhdlow2
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -129,8 +129,16 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
|
|||||||
//判断普通站点驱动是否开启等待
|
//判断普通站点驱动是否开启等待
|
||||||
if (device.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) {
|
if (device.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) {
|
||||||
standardOrdinarySiteDeviceDriver = (StandardOrdinarySiteDeviceDriver) device.getDeviceDriver();
|
standardOrdinarySiteDeviceDriver = (StandardOrdinarySiteDeviceDriver) device.getDeviceDriver();
|
||||||
if (standardOrdinarySiteDeviceDriver.getHasGoods() != 0) {
|
if(StrUtil.equals("true",this.getDevice().getExtraValue().get("max_emptypalletnum").toString())){
|
||||||
|
if(standardOrdinarySiteDeviceDriver.getStatus() == 1){
|
||||||
|
data = NDCAgvService.sendAgvTwoModeInst(phase, index, 0);
|
||||||
|
logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + phase + "反馈:" + data);
|
||||||
|
} else {
|
||||||
|
logServer.deviceExecuteLog(this.device_code, "", "", "上位系统未允许取货");
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
data = NDCAgvService.sendAgvTwoModeInst(phase, index, 0);
|
||||||
|
logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + phase + "反馈:" + data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -143,7 +151,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
|
|||||||
|
|
||||||
logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + phase + "反馈:" + data);
|
logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + phase + "反馈:" + data);
|
||||||
|
|
||||||
//取货完毕/取满框完毕1/点对点取货完毕
|
|
||||||
} else if (phase == 0x64) {//param,agv货位id待定
|
} else if (phase == 0x64) {//param,agv货位id待定
|
||||||
|
|
||||||
//取货完毕
|
//取货完毕
|
||||||
|
|||||||
@@ -83,31 +83,34 @@ public class ItemProtocol {
|
|||||||
|
|
||||||
public static List<ItemDto> getReadableItemDtos() {
|
public static List<ItemDto> getReadableItemDtos() {
|
||||||
ArrayList list = new ArrayList();
|
ArrayList list = new ArrayList();
|
||||||
list.add(new ItemDto(item_heartbeat, "心跳", "VW0"));
|
list.add(new ItemDto(item_heartbeat, "心跳", "251"));
|
||||||
list.add(new ItemDto(item_mode, "工作模式", "VW2"));
|
list.add(new ItemDto(item_mode, "工作模式", "7990"));
|
||||||
list.add(new ItemDto(item_move, "光电信号", "VW4"));
|
list.add(new ItemDto(item_move, "光电信号", "550"));
|
||||||
list.add(new ItemDto(item_action, "取放信号", "VW6"));
|
list.add(new ItemDto(item_action, "取放信号", "450"));
|
||||||
list.add(new ItemDto(item_error, "故障", "VW8"));
|
list.add(new ItemDto(item_error, "故障", "8055"));
|
||||||
list.add(new ItemDto(item_error1, "故障1", "VW8"));
|
list.add(new ItemDto(item_error1, "故障1", "216"));
|
||||||
list.add(new ItemDto(item_door, "门状态", "VW8"));
|
list.add(new ItemDto(item_door, "门状态", "450"));
|
||||||
list.add(new ItemDto(item_temperature, "工位温度", "VW8"));
|
list.add(new ItemDto(item_temperature, "工位温度", "7991"));
|
||||||
list.add(new ItemDto(item_countdown, "恒温倒计时", "VW8"));
|
list.add(new ItemDto(item_countdown, "恒温倒计时", "200"));
|
||||||
list.add(new ItemDto(item_finish, "烘干完成", "VW8"));
|
list.add(new ItemDto(item_finish, "烘干完成", "8025"));
|
||||||
list.add(new ItemDto(item_consumption, "电能耗", "VD10"));
|
list.add(new ItemDto(item_consumption, "电能耗", "8092"));
|
||||||
list.add(new ItemDto(item_voltage, "电压", "VD10"));
|
list.add(new ItemDto(item_voltage, "电压", "8086"));
|
||||||
list.add(new ItemDto(item_current, "电流", "VD10"));
|
list.add(new ItemDto(item_current, "电流", "8080"));
|
||||||
|
list.add(new ItemDto(item_task, "任务号", "220"));
|
||||||
|
list.add(new ItemDto(item_material, "物料", "223"));
|
||||||
|
|
||||||
|
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static List<ItemDto> getWriteableItemDtos() {
|
public static List<ItemDto> getWriteableItemDtos() {
|
||||||
ArrayList list = new ArrayList();
|
ArrayList list = new ArrayList();
|
||||||
list.add(new ItemDto(item_to_command, "下发命令", "VW102"));
|
list.add(new ItemDto(item_to_command, "下发命令", "226"));
|
||||||
list.add(new ItemDto(item_to_door, "开关门", "VD108"));
|
list.add(new ItemDto(item_to_door, "开关门", "8030"));
|
||||||
list.add(new ItemDto(item_to_temperature, "生产温度", "VD108"));
|
list.add(new ItemDto(item_to_temperature, "生产温度", "8100"));
|
||||||
list.add(new ItemDto(item_to_material, "生产物料", "VD108"));
|
list.add(new ItemDto(item_to_material, "生产物料", "229"));
|
||||||
list.add(new ItemDto(item_to_time, "生产时间", "VD108"));
|
list.add(new ItemDto(item_to_time, "生产时间", "210"));
|
||||||
list.add(new ItemDto(item_to_task, "任务号", "VD108"));
|
list.add(new ItemDto(item_to_task, "任务号", "232"));
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -106,6 +106,8 @@ public class StandardOrdinarySiteDeviceDriver extends AbstractDeviceDriver imple
|
|||||||
|
|
||||||
String message;
|
String message;
|
||||||
|
|
||||||
|
// 1 上位系统允许进入 2 上位系统允许离开
|
||||||
|
int status = 0;
|
||||||
|
|
||||||
int agvphase = 0;
|
int agvphase = 0;
|
||||||
int index = 0;
|
int index = 0;
|
||||||
|
|||||||
@@ -1,9 +1,11 @@
|
|||||||
package org.nl.acs.ext.wms.data;
|
package org.nl.acs.ext.wms.data;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
@Data
|
||||||
public class BaseRequest {
|
public class BaseRequest {
|
||||||
private Map<String, String> parameters = new HashMap();
|
private Map<String, String> parameters = new HashMap();
|
||||||
private String systemCode;
|
private String systemCode;
|
||||||
|
|||||||
@@ -1,12 +1,17 @@
|
|||||||
package org.nl.acs.ext.wms.data;
|
package org.nl.acs.ext.wms.data;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONArray;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
@Data
|
||||||
public class BaseResponse {
|
public class BaseResponse {
|
||||||
|
|
||||||
private Integer status = 0;
|
private Integer status = 0;
|
||||||
private String message;
|
private String message;
|
||||||
|
private JSONArray errArr = new JSONArray();
|
||||||
private Map<String, String> parameters = new HashMap();
|
private Map<String, String> parameters = new HashMap();
|
||||||
|
|
||||||
public BaseResponse() {
|
public BaseResponse() {
|
||||||
|
|||||||
@@ -2,17 +2,80 @@ package org.nl.acs.ext.wms.data;
|
|||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
public class CreateTaskRequest extends BaseRequest {
|
public class CreateTaskRequest extends BaseRequest {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 设备号
|
* 任务标识
|
||||||
*/
|
*/
|
||||||
private String deviceCode;
|
private String ext_task_id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 容器码
|
* 任务编号
|
||||||
*/
|
*/
|
||||||
private String containerCode;
|
private String task_code;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 取货点1
|
||||||
|
*/
|
||||||
|
String start_point_code;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 放货点1
|
||||||
|
*/
|
||||||
|
String next_point_code;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 取货点2
|
||||||
|
*/
|
||||||
|
String start_point_code2;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 放货点2
|
||||||
|
*/
|
||||||
|
String next_point_code2;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 烘箱对接位
|
||||||
|
*/
|
||||||
|
String put_point_code;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 优先级
|
||||||
|
*/
|
||||||
|
String priority;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 载具号
|
||||||
|
*/
|
||||||
|
String vehicle_code;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 载具类型
|
||||||
|
*/
|
||||||
|
String vehicle_type;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 路由方案
|
||||||
|
*/
|
||||||
|
String route_plan_code;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 任务类型
|
||||||
|
*/
|
||||||
|
String task_type;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
String remark;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 扩展属性
|
||||||
|
*/
|
||||||
|
Map<String,String> params;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -63,6 +63,11 @@ public interface WmsToAcsService {
|
|||||||
*/
|
*/
|
||||||
Map<String, Object> queryDeviceDBValue(String whereJson);
|
Map<String, Object> queryDeviceDBValue(String whereJson);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建任务
|
||||||
|
* @param whereJson
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
CreateTaskResponse crateTask(String whereJson);
|
CreateTaskResponse crateTask(String whereJson);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -375,14 +375,161 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CreateTaskResponse crateTask(String json) {
|
public CreateTaskResponse crateTask(String param) {
|
||||||
JSONArray datas = JSONArray.parseArray(json);
|
JSONArray datas = JSONArray.parseArray(param);
|
||||||
|
|
||||||
CreateTaskResponse response = new CreateTaskResponse();
|
CreateTaskResponse response = new CreateTaskResponse();
|
||||||
CreateTaskRequest request = JsonUtl.format(json, CreateTaskRequest.class);
|
JSONArray errArr = new JSONArray();
|
||||||
String containerCode = request.getContainerCode();
|
for (int i = 0; i < datas.size(); i++) {
|
||||||
response.setStatus(200);
|
String data = datas.get(i).toString();
|
||||||
|
CreateTaskRequest request = JsonUtl.format(data, CreateTaskRequest.class);
|
||||||
|
String ext_task_id = request.getExt_task_id();
|
||||||
|
String task_code = request.getTask_code();
|
||||||
|
String start_point_code = request.getStart_point_code();
|
||||||
|
String start_point_code2 = request.getStart_point_code2();
|
||||||
|
String next_point_code = request.getNext_point_code();
|
||||||
|
String next_point_code2 = request.getNext_point_code2();
|
||||||
|
String put_point_code = request.getPut_point_code();
|
||||||
|
String priority = request.getPriority();
|
||||||
|
String vehicle_code = request.getVehicle_code();
|
||||||
|
String vehicle_type = request.getVehicle_type();
|
||||||
|
String route_plan_code = request.getRoute_plan_code();
|
||||||
|
String task_type = request.getTask_type();
|
||||||
|
String remark = request.getRemark();
|
||||||
|
String params = request.getParams().toString();
|
||||||
|
|
||||||
|
String start_device_code = "";
|
||||||
|
String start_device_code2 = "";
|
||||||
|
String next_device_code = "";
|
||||||
|
String next_device_code2 = "";
|
||||||
|
String put_device_code = "";
|
||||||
|
if (StrUtil.isEmpty(task_code)) {
|
||||||
|
throw new WDKException("任务号不能为空");
|
||||||
|
}
|
||||||
|
if (StrUtil.isEmpty(start_point_code)) {
|
||||||
|
throw new WDKException("起点不能为空");
|
||||||
|
}
|
||||||
|
if (StrUtil.isEmpty(next_point_code)) {
|
||||||
|
throw new WDKException("终点不能为空");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
JSONObject start_device_json = WQLObject.getWQLObject("acs_storage_cell").query("parent_storage_code ='" + start_point_code + "'").uniqueResult(0);
|
||||||
|
if (!ObjectUtil.isEmpty(start_device_json)) {
|
||||||
|
start_point_code = (String) start_device_json.get("parent_storage_code") == null ? start_point_code : (String) start_device_json.get("storage_code");
|
||||||
|
}
|
||||||
|
JSONObject next_device_json = WQLObject.getWQLObject("acs_storage_cell").query("parent_storage_code ='" + next_point_code + "'").uniqueResult(0);
|
||||||
|
if (!ObjectUtil.isEmpty(next_device_json)) {
|
||||||
|
next_point_code = (String) next_device_json.get("parent_storage_code") == null ? next_point_code : (String) next_device_json.get("storage_code");
|
||||||
|
}
|
||||||
|
JSONObject start_device_json2 = WQLObject.getWQLObject("acs_storage_cell").query("parent_storage_code ='" + start_point_code2 + "'").uniqueResult(0);
|
||||||
|
if (!ObjectUtil.isEmpty(start_device_json2)) {
|
||||||
|
start_point_code2 = (String) start_device_json2.get("parent_storage_code") == null ? start_point_code2 : (String) start_device_json.get("storage_code");
|
||||||
|
}
|
||||||
|
JSONObject next_device_json2 = WQLObject.getWQLObject("acs_storage_cell").query("parent_storage_code ='" + next_point_code2 + "'").uniqueResult(0);
|
||||||
|
if (!ObjectUtil.isEmpty(next_device_json)) {
|
||||||
|
next_point_code2 = (String) next_device_json2.get("parent_storage_code") == null ? next_point_code2 : (String) next_device_json.get("storage_code");
|
||||||
|
}
|
||||||
|
JSONObject put_device_json = WQLObject.getWQLObject("acs_storage_cell").query("parent_storage_code ='" + put_point_code + "'").uniqueResult(0);
|
||||||
|
if (!ObjectUtil.isEmpty(put_device_json)) {
|
||||||
|
put_point_code = (String) put_device_json.get("parent_storage_code") == null ? put_point_code : (String) next_device_json.get("storage_code");
|
||||||
|
}
|
||||||
|
if (start_point_code.indexOf("-") > 0) {
|
||||||
|
String str[] = start_point_code.split("-");
|
||||||
|
start_device_code = str[0];
|
||||||
|
} else {
|
||||||
|
start_device_code = start_point_code;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (next_point_code.indexOf("-") > 0) {
|
||||||
|
String str[] = next_point_code.split("-");
|
||||||
|
next_device_code = str[0];
|
||||||
|
} else {
|
||||||
|
next_device_code = next_point_code;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (start_point_code2.indexOf("-") > 0) {
|
||||||
|
String str[] = start_point_code2.split("-");
|
||||||
|
start_device_code2 = str[0];
|
||||||
|
} else {
|
||||||
|
start_device_code2 = start_point_code2;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (next_point_code2.indexOf("-") > 0) {
|
||||||
|
String str[] = next_point_code2.split("-");
|
||||||
|
next_device_code2 = str[0];
|
||||||
|
} else {
|
||||||
|
next_device_code2 = next_point_code2;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (put_point_code.indexOf("-") > 0) {
|
||||||
|
String str[] = put_point_code.split("-");
|
||||||
|
put_device_code = str[0];
|
||||||
|
} else {
|
||||||
|
put_device_code = put_point_code;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (StrUtil.isEmpty(route_plan_code)) {
|
||||||
|
route_plan_code = "normal";
|
||||||
|
}
|
||||||
|
|
||||||
|
TaskDto taskDto = taskService.findByCodeFromCache(task_code);
|
||||||
|
if (taskDto != null) {
|
||||||
|
throw new WDKException("不能存在相同的任务号!");
|
||||||
|
}
|
||||||
|
if (!StrUtil.isEmpty(vehicle_code)) {
|
||||||
|
TaskDto vehicle_dto = taskService.findByContainer(vehicle_code);
|
||||||
|
if (vehicle_dto != null) {
|
||||||
|
throw new WDKException("已存在该载具号的任务!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
JSONObject jo = new JSONObject();
|
||||||
|
jo.put("task_code", task_code);
|
||||||
|
jo.put("task_id", ext_task_id);
|
||||||
|
jo.put("start_point_code", start_point_code);
|
||||||
|
jo.put("next_point_code", next_point_code);
|
||||||
|
jo.put("start_point_code2", start_point_code2);
|
||||||
|
jo.put("next_point_code2", next_point_code2);
|
||||||
|
jo.put("put_point_code", put_point_code);
|
||||||
|
jo.put("start_parent_code", start_point_code);
|
||||||
|
jo.put("next_parent_code", next_point_code);
|
||||||
|
jo.put("start_device_code", start_device_code);
|
||||||
|
jo.put("next_device_code", next_device_code);
|
||||||
|
jo.put("start_device_code2", start_device_code2);
|
||||||
|
jo.put("next_device_code2", next_device_code2);
|
||||||
|
jo.put("put_device_code", put_device_code);
|
||||||
|
jo.put("priority", priority);
|
||||||
|
jo.put("vehicle_code", vehicle_code);
|
||||||
|
jo.put("vehicle_type", vehicle_type);
|
||||||
|
jo.put("remark", remark);
|
||||||
|
jo.put("params", params);
|
||||||
|
jo.put("task_type", StrUtil.isEmpty(task_type) ? 1 : Integer.parseInt(task_type));
|
||||||
|
|
||||||
|
if (!StrUtil.isEmpty(ext_task_id)) {
|
||||||
|
jo.put("ext_task_id", ext_task_id);
|
||||||
|
}
|
||||||
|
|
||||||
|
TaskDto task_dto = jo.toJavaObject(TaskDto.class);
|
||||||
|
try {
|
||||||
|
taskService.create(task_dto);
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
JSONObject json = new JSONObject();
|
||||||
|
json.put("task_code", task_code);
|
||||||
|
json.put("ext_task_id", ext_task_id);
|
||||||
|
json.put("message", e.getMessage());
|
||||||
|
errArr.add(json);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (ObjectUtil.isEmpty(errArr)) {
|
||||||
|
response.setStatus(200);
|
||||||
|
} else {
|
||||||
|
response.setStatus(400);
|
||||||
|
}
|
||||||
response.setMessage("success");
|
response.setMessage("success");
|
||||||
|
response.setErrArr(errArr);
|
||||||
|
log.info("createFromWms--------------:输出参数:" + response);
|
||||||
|
|
||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.4 MiB After Width: | Height: | Size: 128 KiB |
@@ -92,6 +92,9 @@ public class AuthorizationController {
|
|||||||
throw new BadRequestException("账号或密码错误");
|
throw new BadRequestException("账号或密码错误");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 判断是否被锁
|
||||||
|
if (!userDto.getEnabled()) throw new BadRequestException("账号未激活");
|
||||||
|
|
||||||
// 获取权限列表 - 登录查找权限
|
// 获取权限列表 - 登录查找权限
|
||||||
List<String> permissionList = roleService.getPermissionList(userDto);
|
List<String> permissionList = roleService.getPermissionList(userDto);
|
||||||
|
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ import cn.dev33.satoken.annotation.SaCheckPermission;
|
|||||||
import cn.dev33.satoken.secure.SaSecureUtil;
|
import cn.dev33.satoken.secure.SaSecureUtil;
|
||||||
import cn.dev33.satoken.stp.StpUtil;
|
import cn.dev33.satoken.stp.StpUtil;
|
||||||
import cn.hutool.core.collection.CollectionUtil;
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
@@ -109,7 +110,10 @@ public class UserController {
|
|||||||
public ResponseEntity<Object> create(@Validated @RequestBody User resources){
|
public ResponseEntity<Object> create(@Validated @RequestBody User resources){
|
||||||
checkLevel(resources);
|
checkLevel(resources);
|
||||||
// 默认密码 123456
|
// 默认密码 123456
|
||||||
resources.setPassword(SaSecureUtil.md5BySalt("123456", "salt"));
|
if (ObjectUtil.isEmpty(resources.getPassword()))
|
||||||
|
resources.setPassword(SaSecureUtil.md5BySalt("123456", "salt"));
|
||||||
|
else
|
||||||
|
resources.setPassword(SaSecureUtil.md5BySalt(resources.getPassword(), "salt"));
|
||||||
userService.create(resources);
|
userService.create(resources);
|
||||||
return new ResponseEntity<>(HttpStatus.CREATED);
|
return new ResponseEntity<>(HttpStatus.CREATED);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,6 +15,8 @@
|
|||||||
*/
|
*/
|
||||||
package org.nl.modules.system.service.impl;
|
package org.nl.modules.system.service.impl;
|
||||||
|
|
||||||
|
import cn.dev33.satoken.secure.SaSecureUtil;
|
||||||
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.nl.modules.common.config.FileProperties;
|
import org.nl.modules.common.config.FileProperties;
|
||||||
@@ -89,9 +91,6 @@ public class UserServiceImpl implements UserService {
|
|||||||
if (userRepository.findByUsername(resources.getUsername()) != null) {
|
if (userRepository.findByUsername(resources.getUsername()) != null) {
|
||||||
throw new EntityExistException(User.class, "username", resources.getUsername());
|
throw new EntityExistException(User.class, "username", resources.getUsername());
|
||||||
}
|
}
|
||||||
if (userRepository.findByEmail(resources.getEmail()) != null) {
|
|
||||||
throw new EntityExistException(User.class, "email", resources.getEmail());
|
|
||||||
}
|
|
||||||
resources.setCreateBy(SecurityUtils.getCurrentUsername());
|
resources.setCreateBy(SecurityUtils.getCurrentUsername());
|
||||||
userRepository.save(resources);
|
userRepository.save(resources);
|
||||||
}
|
}
|
||||||
@@ -102,45 +101,37 @@ public class UserServiceImpl implements UserService {
|
|||||||
User user = userRepository.findById(resources.getId()).orElseGet(User::new);
|
User user = userRepository.findById(resources.getId()).orElseGet(User::new);
|
||||||
ValidationUtil.isNull(user.getId(), "User", "id", resources.getId());
|
ValidationUtil.isNull(user.getId(), "User", "id", resources.getId());
|
||||||
User user1 = userRepository.findByUsername(resources.getUsername());
|
User user1 = userRepository.findByUsername(resources.getUsername());
|
||||||
User user2 = userRepository.findByEmail(resources.getEmail());
|
|
||||||
|
|
||||||
if (user1 != null && !user.getId().equals(user1.getId())) {
|
if (user1 != null && !user.getId().equals(user1.getId())) {
|
||||||
throw new EntityExistException(User.class, "username", resources.getUsername());
|
throw new EntityExistException(User.class, "username", resources.getUsername());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (user2 != null && !user.getId().equals(user2.getId())) {
|
|
||||||
throw new EntityExistException(User.class, "email", resources.getEmail());
|
|
||||||
}
|
|
||||||
// 如果用户的角色改变
|
// 如果用户的角色改变
|
||||||
if (!resources.getRoles().equals(user.getRoles())) {
|
if (!resources.getRoles().equals(user.getRoles())) {
|
||||||
redisUtils.del(CacheKey.DATA_USER + resources.getId());
|
redisUtils.del(CacheKey.DATA_USER + resources.getId());
|
||||||
redisUtils.del(CacheKey.MENU_USER + resources.getId());
|
redisUtils.del(CacheKey.MENU_USER + resources.getId());
|
||||||
redisUtils.del(CacheKey.ROLE_AUTH + resources.getId());
|
redisUtils.del(CacheKey.ROLE_AUTH + resources.getId());
|
||||||
}
|
}
|
||||||
// 如果用户名称修改
|
// 如果用户名称或者状态修改
|
||||||
if(!resources.getUsername().equals(user.getUsername())){
|
redisUtils.del("user::username:" + user.getUsername());
|
||||||
redisUtils.del("user::username:" + user.getUsername());
|
|
||||||
}
|
|
||||||
// 如果用户被禁用,则清除用户登录信息
|
// 如果用户被禁用,则清除用户登录信息
|
||||||
if(!resources.getEnabled()){
|
if(!resources.getEnabled()){
|
||||||
onlineUserService.kickOutForUsername(resources.getUsername());
|
onlineUserService.kickOutForUsername(resources.getUsername());
|
||||||
}
|
}
|
||||||
User clone = new User(); // jpa 多表问题,需要用新的类来进行修改
|
user.setId(resources.getId());
|
||||||
clone.setId(resources.getId());
|
user.setUsername(resources.getUsername());
|
||||||
clone.setUsername(resources.getUsername());
|
user.setEmail(resources.getEmail());
|
||||||
clone.setEmail(resources.getEmail());
|
user.setEnabled(resources.getEnabled());
|
||||||
clone.setEnabled(resources.getEnabled());
|
user.setRoles(resources.getRoles());
|
||||||
clone.setRoles(resources.getRoles());
|
user.setDept(resources.getDept());
|
||||||
clone.setDept(resources.getDept());
|
user.setPhone(resources.getPhone());
|
||||||
clone.setPhone(resources.getPhone());
|
user.setNickName(resources.getNickName());
|
||||||
clone.setNickName(resources.getNickName());
|
user.setGender(resources.getGender());
|
||||||
clone.setGender(resources.getGender());
|
if (ObjectUtil.isNotEmpty(resources.getPassword()))
|
||||||
|
user.setPassword(SaSecureUtil.md5BySalt(resources.getPassword(), "salt"));
|
||||||
|
|
||||||
userRepository.save(clone);
|
userRepository.save(user);
|
||||||
// 清除缓存
|
// 清除缓存
|
||||||
delCaches(user.getId(), user.getUsername());
|
delCaches(user.getId(), user.getUsername());
|
||||||
// 修改session
|
|
||||||
// flushSession(user);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -153,8 +144,6 @@ public class UserServiceImpl implements UserService {
|
|||||||
userRepository.save(user);
|
userRepository.save(user);
|
||||||
// 清理缓存
|
// 清理缓存
|
||||||
delCaches(user.getId(), user.getUsername());
|
delCaches(user.getId(), user.getUsername());
|
||||||
// 修改session
|
|
||||||
// flushSession(user);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -184,7 +173,6 @@ public class UserServiceImpl implements UserService {
|
|||||||
public void updatePass(String username, String pass) {
|
public void updatePass(String username, String pass) {
|
||||||
userRepository.updatePass(username, pass, new Date());
|
userRepository.updatePass(username, pass, new Date());
|
||||||
redisUtils.del("user::username:" + username);
|
redisUtils.del("user::username:" + username);
|
||||||
// flushSession(userRepository.findByUsername(username));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -200,7 +188,6 @@ public class UserServiceImpl implements UserService {
|
|||||||
FileUtil.del(oldPath);
|
FileUtil.del(oldPath);
|
||||||
}
|
}
|
||||||
@NotBlank String username = user.getUsername();
|
@NotBlank String username = user.getUsername();
|
||||||
// flushSession(user);
|
|
||||||
return new HashMap<String, String>(1) {{
|
return new HashMap<String, String>(1) {{
|
||||||
put("avatar", file.getName());
|
put("avatar", file.getName());
|
||||||
}};
|
}};
|
||||||
@@ -210,7 +197,6 @@ public class UserServiceImpl implements UserService {
|
|||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void updateEmail(String username, String email) {
|
public void updateEmail(String username, String email) {
|
||||||
userRepository.updateEmail(username, email);
|
userRepository.updateEmail(username, email);
|
||||||
// flushSession(userRepository.findByUsername(username));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -239,17 +225,6 @@ public class UserServiceImpl implements UserService {
|
|||||||
*/
|
*/
|
||||||
public void delCaches(Long id, String username) {
|
public void delCaches(Long id, String username) {
|
||||||
redisUtils.del(CacheKey.USER_ID + id);
|
redisUtils.del(CacheKey.USER_ID + id);
|
||||||
// flushCache(username);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 清理 登陆时 用户缓存信息
|
|
||||||
*
|
|
||||||
* @param user /
|
|
||||||
*/
|
|
||||||
// private void flushSession(User user) {
|
|
||||||
// UserDto userDto = this.findByName(user.getUsername());
|
|
||||||
// List<String> permissionList = roleService.getPermissionList(userDto.getId().toString());
|
|
||||||
// flushSessionUtil.flushSessionInfo(userDto, permissionList);
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -63,11 +63,18 @@ public class PdaCheckServiceImpl implements PdaCheckService {
|
|||||||
//明细表
|
//明细表
|
||||||
WQLObject wo_dtl = WQLObject.getWQLObject("ST_IVT_CheckDtl");
|
WQLObject wo_dtl = WQLObject.getWQLObject("ST_IVT_CheckDtl");
|
||||||
|
|
||||||
JSONObject jsonMst = wo_mst.query("check_code = '" + whereJson.getString("check_code") + "'").uniqueResult(0);
|
JSONArray dtlArr = new JSONArray();
|
||||||
JSONArray dtlArr = wo_dtl.query("check_code = '" + whereJson.getString("check_code") + "'").getResultJSONArray(0);
|
|
||||||
|
|
||||||
|
JSONArray check_rows = whereJson.getJSONArray("check_rows");
|
||||||
|
for (int i = 0; i < check_rows.size(); i++) {
|
||||||
|
JSONObject json = check_rows.getJSONObject(i);
|
||||||
|
JSONObject jsonObject = wo_dtl.query("checkdtl_id = '" + json.getString("checkdtl_id") + "'").uniqueResult(0);
|
||||||
|
jsonObject.put("fac_qty",json.getString("fac_qty"));
|
||||||
|
dtlArr.add(jsonObject);
|
||||||
|
}
|
||||||
|
JSONObject jsonMst = wo_mst.query("check_code = '" + whereJson.getString("check_code") + "'").uniqueResult(0);
|
||||||
JSONObject param = new JSONObject();
|
JSONObject param = new JSONObject();
|
||||||
param.put("form",jsonMst);
|
param.put("row",jsonMst);
|
||||||
param.put("rows",dtlArr);
|
param.put("rows",dtlArr);
|
||||||
|
|
||||||
checkService.saveCheck(param);
|
checkService.saveCheck(param);
|
||||||
@@ -83,12 +90,19 @@ public class PdaCheckServiceImpl implements PdaCheckService {
|
|||||||
WQLObject wo_mst = WQLObject.getWQLObject("ST_IVT_CheckMst");
|
WQLObject wo_mst = WQLObject.getWQLObject("ST_IVT_CheckMst");
|
||||||
//明细表
|
//明细表
|
||||||
WQLObject wo_dtl = WQLObject.getWQLObject("ST_IVT_CheckDtl");
|
WQLObject wo_dtl = WQLObject.getWQLObject("ST_IVT_CheckDtl");
|
||||||
|
JSONArray dtlArr = new JSONArray();
|
||||||
|
|
||||||
|
JSONArray check_rows = whereJson.getJSONArray("check_rows");
|
||||||
|
for (int i = 0; i < check_rows.size(); i++) {
|
||||||
|
JSONObject json = check_rows.getJSONObject(i);
|
||||||
|
JSONObject jsonObject = wo_dtl.query("checkdtl_id = '" + json.getString("checkdtl_id") + "'").uniqueResult(0);
|
||||||
|
jsonObject.put("fac_qty",json.getString("fac_qty"));
|
||||||
|
dtlArr.add(jsonObject);
|
||||||
|
}
|
||||||
JSONObject jsonMst = wo_mst.query("check_code = '" + whereJson.getString("check_code") + "'").uniqueResult(0);
|
JSONObject jsonMst = wo_mst.query("check_code = '" + whereJson.getString("check_code") + "'").uniqueResult(0);
|
||||||
JSONArray dtlArr = wo_dtl.query("check_code = '" + whereJson.getString("check_code") + "'").getResultJSONArray(0);
|
|
||||||
|
|
||||||
JSONObject param = new JSONObject();
|
JSONObject param = new JSONObject();
|
||||||
param.put("form",jsonMst);
|
param.put("row",jsonMst);
|
||||||
param.put("rows",dtlArr);
|
param.put("rows",dtlArr);
|
||||||
|
|
||||||
checkService.confirm(param);
|
checkService.confirm(param);
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ public class VirtualOutServiceImpl implements VirtualOutService {
|
|||||||
JSONArray resultJSONArray = WQL.getWO("PDA_VIRTUALOUT").addParam("flag", "3").process().getResultJSONArray(0);
|
JSONArray resultJSONArray = WQL.getWO("PDA_VIRTUALOUT").addParam("flag", "3").process().getResultJSONArray(0);
|
||||||
|
|
||||||
JSONObject jo = new JSONObject();
|
JSONObject jo = new JSONObject();
|
||||||
jo.put("rows", resultJSONArray);
|
jo.put("data", resultJSONArray);
|
||||||
jo.put("message", "查询成功!");
|
jo.put("message", "查询成功!");
|
||||||
return jo;
|
return jo;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -67,7 +67,7 @@
|
|||||||
WHEN '0' THEN '正常'
|
WHEN '0' THEN '正常'
|
||||||
WHEN '1' THEN '异常'
|
WHEN '1' THEN '异常'
|
||||||
END
|
END
|
||||||
) AS status,
|
) AS is_nok,
|
||||||
input_optname,
|
input_optname,
|
||||||
input_time,
|
input_time,
|
||||||
confirm_optname,
|
confirm_optname,
|
||||||
@@ -108,8 +108,8 @@
|
|||||||
dtl.storagevehicle_code,
|
dtl.storagevehicle_code,
|
||||||
mater.material_code,
|
mater.material_code,
|
||||||
mater.material_name,
|
mater.material_name,
|
||||||
dtl.base_qty,
|
ROUND(dtl.base_qty) AS base_qty,
|
||||||
dtl.fac_qty,
|
ROUND(dtl.fac_qty) AS fac_qty,
|
||||||
dtl.qty_unit_name,
|
dtl.qty_unit_name,
|
||||||
(
|
(
|
||||||
CASE
|
CASE
|
||||||
|
|||||||
@@ -138,7 +138,7 @@
|
|||||||
IF 输入.flag = "3"
|
IF 输入.flag = "3"
|
||||||
QUERY
|
QUERY
|
||||||
SELECT
|
SELECT
|
||||||
label,
|
label AS text,
|
||||||
value
|
value
|
||||||
FROM
|
FROM
|
||||||
sys_dict_detail
|
sys_dict_detail
|
||||||
|
|||||||
@@ -260,6 +260,8 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
|||||||
jsonDtl.put("source_bill_code", row.getString("source_bill_code"));
|
jsonDtl.put("source_bill_code", row.getString("source_bill_code"));
|
||||||
jsonDtl.put("assign_qty", "0");
|
jsonDtl.put("assign_qty", "0");
|
||||||
jsonDtl.put("unassign_qty", row.get("plan_qty"));
|
jsonDtl.put("unassign_qty", row.get("plan_qty"));
|
||||||
|
jsonDtl.put("vbeln", row.getString("vbeln"));
|
||||||
|
jsonDtl.put("posnr", row.getString("posnr"));
|
||||||
WQLObject.getWQLObject("ST_IVT_IOStorInvDtl").insert(jsonDtl);
|
WQLObject.getWQLObject("ST_IVT_IOStorInvDtl").insert(jsonDtl);
|
||||||
qty += jsonDtl.getDoubleValue("plan_qty");
|
qty += jsonDtl.getDoubleValue("plan_qty");
|
||||||
|
|
||||||
@@ -1351,6 +1353,8 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
|||||||
.addParam("iostorinv_id", map.get("iostorinv_id"))
|
.addParam("iostorinv_id", map.get("iostorinv_id"))
|
||||||
.addParam("stor_id", map.get("stor_id"))
|
.addParam("stor_id", map.get("stor_id"))
|
||||||
.addParam("sect_id", map.get("sect_id"))
|
.addParam("sect_id", map.get("sect_id"))
|
||||||
|
.addParam("remark", map.get("remark"))
|
||||||
|
.addParam("sale_order_name", map.get("source_bill_code"))
|
||||||
.process()
|
.process()
|
||||||
.getResultJSONArray(0);
|
.getResultJSONArray(0);
|
||||||
return jo;
|
return jo;
|
||||||
@@ -1677,7 +1681,7 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
JSONObject jsonSub = subTab.query("container_name = '" + json2.getString("pcsn") + "'").uniqueResult(0);
|
JSONObject jsonSub = subTab.query("container_name = '" + json2.getString("pcsn") + "'").uniqueResult(0);
|
||||||
if (ObjectUtil.isNotEmpty(jsonSect)) {
|
if (ObjectUtil.isNotEmpty(jsonSub)) {
|
||||||
jsonDis.put("CHARG", jsonSub.getString("sap_pcsn")); // sap批次
|
jsonDis.put("CHARG", jsonSub.getString("sap_pcsn")); // sap批次
|
||||||
}
|
}
|
||||||
jsonDis.put("VBELN", json.getString("vbeln")); // 交货
|
jsonDis.put("VBELN", json.getString("vbeln")); // 交货
|
||||||
@@ -1734,10 +1738,14 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
|||||||
JSONObject paramMst = new JSONObject();
|
JSONObject paramMst = new JSONObject();
|
||||||
JSONArray paramArr = new JSONArray();
|
JSONArray paramArr = new JSONArray();
|
||||||
|
|
||||||
paramMst.put("BLDAT", jo_mst.getString("biz_date"));
|
// 去除日期中的横杠、冒号、空格
|
||||||
paramMst.put("BUDAT", jo_mst.getString("biz_date"));
|
String biz_date = jo_mst.getString("biz_date");
|
||||||
paramMst.put("BKTXT", ""); // 凭证抬头文本
|
String response = biz_date.replaceAll("[[\\s-:punct:]]","");
|
||||||
paramMst.put("XBLNR", ""); // 参考
|
|
||||||
|
paramMst.put("BLDAT", response); // 去掉-
|
||||||
|
paramMst.put("BUDAT", response); // 去掉-
|
||||||
|
paramMst.put("BKTXT", jo_mst.getString("bill_code")); // 凭证抬头文本: 出库主表单据号
|
||||||
|
paramMst.put("XBLNR", jo_mst.getString("input_optname")); // 参考:出库单创建人name
|
||||||
|
|
||||||
JSONArray disArr = wo_dis.query("iostorinv_id = '" + jo_mst.getString("iostorinv_id") + "'").getResultJSONArray(0);
|
JSONArray disArr = wo_dis.query("iostorinv_id = '" + jo_mst.getString("iostorinv_id") + "'").getResultJSONArray(0);
|
||||||
for (int i = 0; i < disArr.size(); i++) {
|
for (int i = 0; i < disArr.size(); i++) {
|
||||||
@@ -1750,12 +1758,25 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
|||||||
jsonDtl.put("BWART", "311");
|
jsonDtl.put("BWART", "311");
|
||||||
jsonDtl.put("MENGE", json.getDoubleValue("plan_qty"));
|
jsonDtl.put("MENGE", json.getDoubleValue("plan_qty"));
|
||||||
jsonDtl.put("MEINS", json.getString("qty_unit_id"));
|
jsonDtl.put("MEINS", json.getString("qty_unit_id"));
|
||||||
jsonDtl.put("LGORT", ""); // 库存地点
|
|
||||||
|
JSONObject jsonSect = sectTab.query("sect_id = '" + json.getString("sect_id") + "'").uniqueResult(0);
|
||||||
|
if (ObjectUtil.isNotEmpty(jsonSect)) {
|
||||||
|
jsonDtl.put("LGORT", jsonSect.getString("ext_id")); // 库存地点:库区外部标识
|
||||||
|
}
|
||||||
|
|
||||||
|
JSONObject jsonSub = subTab.query("container_name = '" + json.getString("pcsn") + "'").uniqueResult(0);
|
||||||
|
if (ObjectUtil.isNotEmpty(jsonSub)) {
|
||||||
|
String sale_order_name = jsonSub.getString("sale_order_name");
|
||||||
|
|
||||||
|
// 销售订单:子卷包装关系 - 前内容
|
||||||
|
jsonDtl.put("KDAUF", sale_order_name.substring(0, sale_order_name.indexOf("-")));
|
||||||
|
// 销售订单行项目:子卷包装关系 - 后内容
|
||||||
|
jsonDtl.put("KDPOS", sale_order_name.substring(sale_order_name.indexOf("-")+1, sale_order_name.length()));
|
||||||
|
}
|
||||||
|
|
||||||
jsonDtl.put("CHARG", json.getString("pcsn"));
|
jsonDtl.put("CHARG", json.getString("pcsn"));
|
||||||
jsonDtl.put("UMLGO", ""); // 收货库存地点
|
jsonDtl.put("UMLGO", ""); // 收货库存地点:线边库外部标识
|
||||||
jsonDtl.put("UMCHA", json.getString("pcsn"));
|
jsonDtl.put("UMCHA", json.getString("pcsn"));
|
||||||
jsonDtl.put("KDAUF", ""); // 销售订单
|
|
||||||
jsonDtl.put("KDPOS", ""); // 销售订单行项目
|
|
||||||
paramArr.add(jsonDtl);
|
paramArr.add(jsonDtl);
|
||||||
}
|
}
|
||||||
paramMst.put("item", paramArr);
|
paramMst.put("item", paramArr);
|
||||||
|
|||||||
@@ -42,6 +42,7 @@
|
|||||||
输入.task_id TYPEAS s_string
|
输入.task_id TYPEAS s_string
|
||||||
输入.task_status TYPEAS s_string
|
输入.task_status TYPEAS s_string
|
||||||
输入.deptIds TYPEAS f_string
|
输入.deptIds TYPEAS f_string
|
||||||
|
输入.sale_order_name TYPEAS s_string
|
||||||
[临时表]
|
[临时表]
|
||||||
--这边列出来的临时表就会在运行期动态创建
|
--这边列出来的临时表就会在运行期动态创建
|
||||||
|
|
||||||
@@ -161,6 +162,7 @@
|
|||||||
LEFT JOIN st_ivt_structattr struct ON struct.struct_id = ivt.struct_id
|
LEFT JOIN st_ivt_structattr struct ON struct.struct_id = ivt.struct_id
|
||||||
LEFT JOIN md_me_materialbase mb ON mb.material_id = ivt.material_id
|
LEFT JOIN md_me_materialbase mb ON mb.material_id = ivt.material_id
|
||||||
LEFT JOIN SCH_BASE_Point point ON struct.struct_id = point.source_id
|
LEFT JOIN SCH_BASE_Point point ON struct.struct_id = point.source_id
|
||||||
|
LEFT JOIN pdm_bi_subpackagerelation sub ON struct.storagevehicle_code = sub.package_box_sn
|
||||||
WHERE
|
WHERE
|
||||||
1 = 1 and struct.lock_type='1'
|
1 = 1 and struct.lock_type='1'
|
||||||
and struct.struct_id in (
|
and struct.struct_id in (
|
||||||
@@ -177,6 +179,9 @@
|
|||||||
OPTION 输入.material_id <> ""
|
OPTION 输入.material_id <> ""
|
||||||
ivt.material_id = 输入.material_id
|
ivt.material_id = 输入.material_id
|
||||||
ENDOPTION
|
ENDOPTION
|
||||||
|
OPTION 输入.sale_order_name <> ""
|
||||||
|
sub.sale_order_name = 输入.sale_order_name
|
||||||
|
ENDOPTION
|
||||||
OPTION 输入.quality_scode <> ""
|
OPTION 输入.quality_scode <> ""
|
||||||
ivt.quality_scode = 输入.quality_scode
|
ivt.quality_scode = 输入.quality_scode
|
||||||
ENDOPTION
|
ENDOPTION
|
||||||
@@ -184,7 +189,7 @@
|
|||||||
ivt.pcsn = 输入.pcsn
|
ivt.pcsn = 输入.pcsn
|
||||||
ENDOPTION
|
ENDOPTION
|
||||||
OPTION 输入.remark <> ""
|
OPTION 输入.remark <> ""
|
||||||
(mb.material_code like 输入.remark or mb.material_name like 输入.remark or struct.storagevehicle_code like 输入.remark)
|
struct.struct_code like 输入.remark
|
||||||
ENDOPTION
|
ENDOPTION
|
||||||
OPTION 输入.ivt_level <> ""
|
OPTION 输入.ivt_level <> ""
|
||||||
ivt.ivt_level = 输入.ivt_level
|
ivt.ivt_level = 输入.ivt_level
|
||||||
@@ -192,9 +197,6 @@
|
|||||||
OPTION 输入.is_active <> ""
|
OPTION 输入.is_active <> ""
|
||||||
ivt.is_active = 输入.is_active
|
ivt.is_active = 输入.is_active
|
||||||
ENDOPTION
|
ENDOPTION
|
||||||
OPTION 输入.stor_id <> ""
|
|
||||||
ivt.stor_id = 输入.stor_id
|
|
||||||
ENDOPTION
|
|
||||||
OPTION 输入.sect_id <> ""
|
OPTION 输入.sect_id <> ""
|
||||||
struct.sect_id = 输入.sect_id
|
struct.sect_id = 输入.sect_id
|
||||||
ENDOPTION
|
ENDOPTION
|
||||||
@@ -218,11 +220,15 @@
|
|||||||
LEFT JOIN st_ivt_structattr struct ON struct.struct_id = ivt2.struct_id
|
LEFT JOIN st_ivt_structattr struct ON struct.struct_id = ivt2.struct_id
|
||||||
LEFT JOIN md_me_materialbase mb ON mb.material_id = ivt2.material_id
|
LEFT JOIN md_me_materialbase mb ON mb.material_id = ivt2.material_id
|
||||||
LEFT JOIN SCH_BASE_Point point ON struct.struct_id = point.source_id
|
LEFT JOIN SCH_BASE_Point point ON struct.struct_id = point.source_id
|
||||||
|
LEFT JOIN pdm_bi_subpackagerelation sub ON struct.storagevehicle_code = sub.package_box_sn
|
||||||
WHERE
|
WHERE
|
||||||
1 = 1 and struct.lock_type='1'
|
1 = 1 and struct.lock_type='1'
|
||||||
OPTION 输入.material_id <> ""
|
OPTION 输入.material_id <> ""
|
||||||
ivt2.material_id = 输入.material_id
|
ivt2.material_id = 输入.material_id
|
||||||
ENDOPTION
|
ENDOPTION
|
||||||
|
OPTION 输入.sale_order_name <> ""
|
||||||
|
sub.sale_order_name = 输入.sale_order_name
|
||||||
|
ENDOPTION
|
||||||
OPTION 输入.quality_scode <> ""
|
OPTION 输入.quality_scode <> ""
|
||||||
ivt2.quality_scode = 输入.quality_scode
|
ivt2.quality_scode = 输入.quality_scode
|
||||||
ENDOPTION
|
ENDOPTION
|
||||||
@@ -230,7 +236,7 @@
|
|||||||
ivt2.pcsn = 输入.pcsn
|
ivt2.pcsn = 输入.pcsn
|
||||||
ENDOPTION
|
ENDOPTION
|
||||||
OPTION 输入.remark <> ""
|
OPTION 输入.remark <> ""
|
||||||
(mb.material_code like 输入.remark or mb.material_name like 输入.remark or struct.storagevehicle_code like 输入.remark)
|
struct.struct_code like 输入.remark
|
||||||
ENDOPTION
|
ENDOPTION
|
||||||
OPTION 输入.ivt_level <> ""
|
OPTION 输入.ivt_level <> ""
|
||||||
ivt2.ivt_level = 输入.ivt_level
|
ivt2.ivt_level = 输入.ivt_level
|
||||||
@@ -238,9 +244,6 @@
|
|||||||
OPTION 输入.is_active <> ""
|
OPTION 输入.is_active <> ""
|
||||||
ivt2.is_active = 输入.is_active
|
ivt2.is_active = 输入.is_active
|
||||||
ENDOPTION
|
ENDOPTION
|
||||||
OPTION 输入.stor_id <> ""
|
|
||||||
ivt2.stor_id = 输入.stor_id
|
|
||||||
ENDOPTION
|
|
||||||
OPTION 输入.sect_id <> ""
|
OPTION 输入.sect_id <> ""
|
||||||
struct.sect_id = 输入.sect_id
|
struct.sect_id = 输入.sect_id
|
||||||
ENDOPTION
|
ENDOPTION
|
||||||
|
|||||||
@@ -318,7 +318,7 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
|
|||||||
|
|
||||||
JSONObject param = new JSONObject();
|
JSONObject param = new JSONObject();
|
||||||
param.put("HEAD", paramSapMstArr);
|
param.put("HEAD", paramSapMstArr);
|
||||||
// System.out.println(param.toString());
|
System.out.println(param.toString());
|
||||||
|
|
||||||
// 调用接口回传
|
// 调用接口回传
|
||||||
new LmsToSapServiceImpl().returnDelivery(param);
|
new LmsToSapServiceImpl().returnDelivery(param);
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.4 MiB After Width: | Height: | Size: 128 KiB |
@@ -80,7 +80,7 @@
|
|||||||
<el-form-item label="邮箱" prop="email">
|
<el-form-item label="邮箱" prop="email">
|
||||||
<el-input v-model="form.email" style="width: 200px;" />
|
<el-input v-model="form.email" style="width: 200px;" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="部门" prop="dept.id">
|
<el-form-item label="部门" prop="dept.id" :rules="[{ required: true, message: '请选择部门', trigger: 'change' }]">
|
||||||
<treeselect
|
<treeselect
|
||||||
v-model="form.dept.id"
|
v-model="form.dept.id"
|
||||||
:options="depts"
|
:options="depts"
|
||||||
@@ -89,7 +89,10 @@
|
|||||||
placeholder="选择部门"
|
placeholder="选择部门"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<br v-if="!crud.status.add">
|
||||||
|
<el-form-item label="密码" prop="password" v-if="crud.status.add">
|
||||||
|
<el-input v-model="form.password" style="width: 200px;" show-password auto-complete="new-password"/>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="性别">
|
<el-form-item label="性别">
|
||||||
<el-radio-group v-model="form.gender" style="width: 178px">
|
<el-radio-group v-model="form.gender" style="width: 178px">
|
||||||
<el-radio label="男">男</el-radio>
|
<el-radio label="男">男</el-radio>
|
||||||
@@ -168,16 +171,26 @@
|
|||||||
<el-table-column
|
<el-table-column
|
||||||
v-permission="['admin','user:edit','user:del']"
|
v-permission="['admin','user:edit','user:del']"
|
||||||
label="操作"
|
label="操作"
|
||||||
width="115"
|
width="200"
|
||||||
align="center"
|
align="center"
|
||||||
fixed="right"
|
fixed="right"
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<udOperation
|
<udOperation
|
||||||
|
style="display: inline"
|
||||||
:data="scope.row"
|
:data="scope.row"
|
||||||
:permission="permission"
|
:permission="permission"
|
||||||
:disabled-dle="scope.row.id === user.id"
|
:disabled-dle="scope.row.id === user.id"
|
||||||
/>
|
/>
|
||||||
|
<el-button
|
||||||
|
v-permission="permission.edit"
|
||||||
|
type="text"
|
||||||
|
slot="left"
|
||||||
|
icon="el-icon-refresh-left"
|
||||||
|
@click="resetPassword(scope.row)"
|
||||||
|
>
|
||||||
|
重置密码
|
||||||
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@@ -212,7 +225,8 @@ const defaultForm = {
|
|||||||
enabled: 'true',
|
enabled: 'true',
|
||||||
roles: [],
|
roles: [],
|
||||||
dept: { id: null },
|
dept: { id: null },
|
||||||
phone: null
|
phone: null,
|
||||||
|
password: null
|
||||||
}
|
}
|
||||||
export default {
|
export default {
|
||||||
name: 'User',
|
name: 'User',
|
||||||
@@ -256,7 +270,7 @@ export default {
|
|||||||
])
|
])
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.crud.msg.add = '新增成功,默认密码:123456'
|
this.crud.msg.add = '新增成功'
|
||||||
},
|
},
|
||||||
mounted: function() {
|
mounted: function() {
|
||||||
const that = this
|
const that = this
|
||||||
@@ -292,6 +306,7 @@ export default {
|
|||||||
},
|
},
|
||||||
// 新增前将多选的值设置为空
|
// 新增前将多选的值设置为空
|
||||||
[CRUD.HOOK.beforeToAdd]() {
|
[CRUD.HOOK.beforeToAdd]() {
|
||||||
|
this.form.password = '123456'
|
||||||
this.roleDatas = []
|
this.roleDatas = []
|
||||||
},
|
},
|
||||||
// 初始化编辑时候的角色与岗位
|
// 初始化编辑时候的角色与岗位
|
||||||
@@ -435,6 +450,28 @@ export default {
|
|||||||
},
|
},
|
||||||
checkboxT(row, rowIndex) {
|
checkboxT(row, rowIndex) {
|
||||||
return row.id !== this.user.id
|
return row.id !== this.user.id
|
||||||
|
},
|
||||||
|
resetPassword(row) {
|
||||||
|
row.password = null
|
||||||
|
this.$prompt('', '重置密码', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
inputPlaceholder: '请输入新的密码',
|
||||||
|
inputPattern: /^[A-Z|a-z|0-9|(._~!@#$^&*)]{6,20}$/,
|
||||||
|
inputErrorMessage: '密码格式不正确,只能是6-20位密码',
|
||||||
|
closeOnClickModal: false
|
||||||
|
}).then(({ value }) => {
|
||||||
|
row.password = value
|
||||||
|
crudUser.edit(row).then(res => {
|
||||||
|
this.crud.toQuery()
|
||||||
|
this.crud.notify('密码重置成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||||
|
})
|
||||||
|
}).catch(() => {
|
||||||
|
this.$message({
|
||||||
|
type: 'info',
|
||||||
|
message: '取消输入'
|
||||||
|
})
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -56,7 +56,7 @@
|
|||||||
clearable
|
clearable
|
||||||
style="width: 220px"
|
style="width: 220px"
|
||||||
size="mini"
|
size="mini"
|
||||||
placeholder="货位编码、名称或载具号"
|
placeholder="货位编码"
|
||||||
prefix-icon="el-icon-search"
|
prefix-icon="el-icon-search"
|
||||||
class="filter-item"
|
class="filter-item"
|
||||||
/>
|
/>
|
||||||
@@ -150,9 +150,12 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
open() {
|
open() {
|
||||||
crudSectattr.getSect({ is_materialstore: '1' }).then(res => {
|
crudSectattr.getSect({ is_productstore: '1' }).then(res => {
|
||||||
|
debugger
|
||||||
this.sects = res.content
|
this.sects = res.content
|
||||||
})
|
})
|
||||||
|
this.query.source_bill_code = this.queryrow.source_bill_code
|
||||||
|
this.query.material_id = this.queryrow.material_id
|
||||||
},
|
},
|
||||||
queryStruct() {
|
queryStruct() {
|
||||||
this.queryrow.unassign_qty = parseFloat(this.queryrow.unassign_qty) + parseFloat(this.queryrow.assign_qty)
|
this.queryrow.unassign_qty = parseFloat(this.queryrow.unassign_qty) + parseFloat(this.queryrow.assign_qty)
|
||||||
|
|||||||
Reference in New Issue
Block a user