Merge remote-tracking branch 'origin/master'
# Conflicts: # acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/instruction/service/impl/InstructionServiceImpl.java
This commit is contained in:
@@ -251,6 +251,10 @@ public class IndoorManipulatorDeviceDriver extends AbstractOpcDeviceDriver imple
|
||||
inst = null;
|
||||
message = null;
|
||||
}
|
||||
if(mode == 2 && requireSucess){
|
||||
this.setRequireSucess(false);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "再次信号复位requireSuccess:" + requireSucess);
|
||||
}
|
||||
logServer.deviceItemValue(this.device_code, "mode", String.valueOf(mode));
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号mode:" + last_mode + "->" + mode);
|
||||
}
|
||||
|
||||
@@ -279,7 +279,15 @@ public class TaskServiceImpl implements TaskService, ApplicationAutoInitial {
|
||||
map.put("point_code", point_code);
|
||||
}
|
||||
if (!StrUtil.isEmpty(create_time) && !StrUtil.isEmpty(end_time)) {
|
||||
// 将字符串时间解析为日期对象
|
||||
Date date = DateUtil.parse(create_time.replace("Z", " UTC"), "yyyy-MM-dd'T'HH:mm:ss.SSS Z");
|
||||
// 将日期对象加上8小时
|
||||
/*Date newDate = DateUtil.offsetHour(date, 8);*/
|
||||
// 将新日期对象格式化为字符串时间
|
||||
create_time = DateUtil.formatDateTime(date);
|
||||
map.put("create_time", create_time);
|
||||
Date date1 = DateUtil.parse(end_time.replace("Z", " UTC"), "yyyy-MM-dd'T'HH:mm:ss.SSS Z");
|
||||
end_time = DateUtil.formatDateTime(date1);
|
||||
map.put("end_time", end_time);
|
||||
}
|
||||
JSONObject jsonObject1 =
|
||||
|
||||
@@ -30,7 +30,6 @@ import java.io.IOException;
|
||||
import java.net.InetSocketAddress;
|
||||
import java.net.Socket;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import static org.nl.acs.agv.server.impl.NDCAgvServiceImpl.Bytes2HexString;
|
||||
|
||||
@@ -233,13 +232,14 @@ public class TwoNDCSocketConnectionAutoRun extends AbstractAutoRunnable {
|
||||
if (device.getDeviceDriver() instanceof StandardAutodoorDeviceDriver) {
|
||||
standardAutodoorDeviceDriver = (StandardAutodoorDeviceDriver) device.getDeviceDriver();
|
||||
try {
|
||||
standardAutodoorDeviceDriver.writing("to_command", 1);
|
||||
standardAutodoorDeviceDriver.writing("to_open", "1");
|
||||
standardAutodoorDeviceDriver.writing("to_close", "0");
|
||||
} catch (Exception e) {
|
||||
log.info("下发电气信号失败:" + e.getMessage());
|
||||
e.printStackTrace();
|
||||
}
|
||||
if (standardAutodoorDeviceDriver.getAction() == 1 && standardAutodoorDeviceDriver.getTo_command() == 1) {
|
||||
log.info("下发开门信号值为:{}", standardAutodoorDeviceDriver.getTo_command());
|
||||
if (standardAutodoorDeviceDriver.getOpen() == 1 && standardAutodoorDeviceDriver.getToOpen() == 1 ) {
|
||||
log.info("下发开门信号值为:{},下发关门信号值为:{}", standardAutodoorDeviceDriver.getToOpen(), standardAutodoorDeviceDriver.getToClose());
|
||||
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package org.nl.acs.device_driver.autodoor.standard_autodoor;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.acs.device.device_driver.standard_inspect.ItemDto;
|
||||
|
||||
@@ -8,13 +9,10 @@ import java.util.List;
|
||||
|
||||
@Slf4j
|
||||
public class ItemProtocol {
|
||||
public static String item_heartbeat = "heartbeat";
|
||||
public static String item_mode = "mode";
|
||||
public static String item_state = "state";
|
||||
public static String item_action = "action";
|
||||
public static String item_error = "error";
|
||||
public static String item_to_command = "to_command";
|
||||
public static String item_to_state = "to_state";
|
||||
public static String item_open = "open";
|
||||
public static String item_close = "close";
|
||||
public static String item_to_open = "to_open";
|
||||
public static String item_to_close = "to_close";
|
||||
|
||||
|
||||
private StandardAutodoorDeviceDriver driver;
|
||||
@@ -23,35 +21,27 @@ public class ItemProtocol {
|
||||
this.driver = driver;
|
||||
}
|
||||
|
||||
public int getHeartbeat() {
|
||||
return this.getOpcIntegerValue(item_heartbeat);
|
||||
public int getOpen() {
|
||||
return this.getOpcIntegerValue(item_open);
|
||||
}
|
||||
|
||||
public int getMode() {
|
||||
return this.getOpcIntegerValue(item_mode);
|
||||
public int getClose() {
|
||||
return this.getOpcIntegerValue(item_close);
|
||||
}
|
||||
|
||||
public int getAction() {
|
||||
return this.getOpcIntegerValue(item_action);
|
||||
|
||||
public int getToOpen() {
|
||||
return this.getOpcIntegerValue(item_to_open);
|
||||
}
|
||||
|
||||
public int getError() {
|
||||
return this.getOpcIntegerValue(item_error);
|
||||
public int getToClose() {
|
||||
return this.getOpcIntegerValue(item_to_close);
|
||||
}
|
||||
|
||||
public int getToCommand() {
|
||||
return this.getOpcIntegerValue(item_to_command);
|
||||
}
|
||||
|
||||
public int getToState() {
|
||||
return this.getOpcIntegerValue(item_to_state);
|
||||
}
|
||||
|
||||
|
||||
public int getOpcIntegerValue(String protocol) {
|
||||
Integer value = this.driver.getIntegeregerValue(protocol);
|
||||
if (value == null) {
|
||||
// log.error("读取错误!");
|
||||
// log.error(this.getDriver().getDeviceCode() + ":protocol " + protocol + " 信号同步异常!");
|
||||
} else {
|
||||
return value;
|
||||
}
|
||||
@@ -59,22 +49,34 @@ public class ItemProtocol {
|
||||
|
||||
}
|
||||
|
||||
public String getOpcStringValue(String protocol) {
|
||||
String value = this.driver.getStringValue(protocol);
|
||||
if (StrUtil.isEmpty(value)) {
|
||||
|
||||
} else {
|
||||
return value;
|
||||
}
|
||||
return "0";
|
||||
}
|
||||
|
||||
public static List<ItemDto> getReadableItemDtos() {
|
||||
ArrayList list = new ArrayList();
|
||||
list.add(new ItemDto(item_heartbeat, "心跳", "DB600.B0"));
|
||||
list.add(new ItemDto(item_mode, "工作模式", "DB600.B1", Boolean.valueOf(true)));
|
||||
list.add(new ItemDto(item_state, "工作状态", "DB600.B2"));
|
||||
list.add(new ItemDto(item_action, "动作信号", "DB600.B3"));
|
||||
list.add(new ItemDto(item_error, "报警信号", "DB600.B4"));
|
||||
list.add(new ItemDto(item_open, "开到位", "10001"));
|
||||
list.add(new ItemDto(item_close, "关到位", "10002"));
|
||||
return list;
|
||||
}
|
||||
|
||||
public static List<ItemDto> getWriteableItemDtos() {
|
||||
ArrayList list = new ArrayList();
|
||||
list.add(new ItemDto(item_to_command, "作业命令", "DB601.W2", Boolean.valueOf(true)));
|
||||
list.add(new ItemDto(item_to_state, "下发状态", "DB601.W3", Boolean.valueOf(true)));
|
||||
list.add(new ItemDto(item_to_open, "下发开门", "00001" ));
|
||||
list.add(new ItemDto(item_to_close, "下发关门", "00002"));
|
||||
return list;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2,12 +2,11 @@ package org.nl.acs.device_driver.autodoor.standard_autodoor;
|
||||
|
||||
import org.nl.acs.device.device_driver.standard_inspect.ItemDto;
|
||||
import org.nl.acs.device.domain.Device;
|
||||
import org.nl.acs.device.enums.DeviceType;
|
||||
import org.nl.acs.device_driver.DeviceDriver;
|
||||
import org.nl.acs.device_driver.defination.OpcDeviceDriverDefination;
|
||||
import org.nl.acs.device.enums.DeviceType;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
@@ -31,6 +30,7 @@ public class StandardAutodoorDefination implements OpcDeviceDriverDefination {
|
||||
return "标准版-自动门";
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public DeviceDriver getDriverInstance(Device device) {
|
||||
return (new StandardAutodoorDeviceDriver()).setDevice(device).setDriverDefination(this);
|
||||
@@ -49,18 +49,10 @@ public class StandardAutodoorDefination implements OpcDeviceDriverDefination {
|
||||
return types;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public List<ItemDto> getReadableItemDtos() {
|
||||
return getReadableItemDtos2();
|
||||
}
|
||||
|
||||
public static List<ItemDto> getReadableItemDtos2() {
|
||||
List<ItemDto> list = new ArrayList();
|
||||
list.add(new ItemDto(ItemProtocol.item_heartbeat, "心跳", "DB600.B0"));
|
||||
list.add(new ItemDto(ItemProtocol.item_mode, "工作状态", "DB600.B1", true));
|
||||
list.add(new ItemDto(ItemProtocol.item_action, "动作信号", "DB600.B2"));
|
||||
list.add(new ItemDto(ItemProtocol.item_error, "报警信号", "DB600.B4"));
|
||||
return list;
|
||||
return ItemProtocol.getReadableItemDtos();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -4,98 +4,41 @@ import com.alibaba.fastjson.JSONObject;
|
||||
import lombok.Data;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.acs.common.base.CommonFinalParam;
|
||||
import org.nl.acs.device.domain.Device;
|
||||
import org.nl.acs.ext.wms.data.one.feedBackTaskStatus.FeedBackTaskStatusRequest;
|
||||
import org.nl.acs.ext.wms.service.AcsToWmsService;
|
||||
import org.nl.acs.utils.ReadUtil;
|
||||
import org.nl.acs.device.service.DeviceService;
|
||||
import org.nl.acs.device_driver.DeviceDriver;
|
||||
import org.nl.acs.device_driver.driver.AbstractOpcDeviceDriver;
|
||||
import org.nl.acs.device_driver.driver.ExecutableDeviceDriver;
|
||||
import org.nl.acs.instruction.service.InstructionService;
|
||||
import org.nl.acs.route.service.RouteLineService;
|
||||
import org.nl.acs.task.service.TaskService;
|
||||
import org.nl.acs.log.service.DeviceExecuteLogService;
|
||||
import org.nl.acs.monitor.DeviceStageMonitor;
|
||||
import org.nl.acs.utils.ReadUtil;
|
||||
import org.nl.config.SpringContextHolder;
|
||||
import org.openscada.opc.lib.da.Server;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
/**
|
||||
* 自动门驱动
|
||||
*/
|
||||
@Slf4j
|
||||
@Data
|
||||
@RequiredArgsConstructor
|
||||
public class StandardAutodoorDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDriver, ExecutableDeviceDriver {
|
||||
public class StandardAutodoorDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDriver, ExecutableDeviceDriver, DeviceStageMonitor {
|
||||
protected ItemProtocol itemProtocol = new ItemProtocol(this);
|
||||
DeviceExecuteLogService logServer = SpringContextHolder.getBean("deviceExecuteLogServiceImpl");
|
||||
|
||||
InstructionService instructionService = SpringContextHolder.getBean("instructionServiceImpl");
|
||||
int open = 0;
|
||||
int close = 0;
|
||||
|
||||
DeviceService deviceservice = SpringContextHolder.getBean("deviceServiceImpl");
|
||||
int last_open = 0;
|
||||
int last_close = 0;
|
||||
|
||||
RouteLineService routelineserver = SpringContextHolder.getBean("routeLineServiceImpl");
|
||||
|
||||
TaskService taskserver = SpringContextHolder.getBean("taskServiceImpl");
|
||||
|
||||
AcsToWmsService acsToWmsService = SpringContextHolder.getBean("acsToWmsServiceImpl");
|
||||
String container;
|
||||
String container_type_desc;
|
||||
String last_container_type_desc;
|
||||
String last_container;
|
||||
//放货准备锁
|
||||
String putReadyLock = null;
|
||||
//有货标记
|
||||
protected boolean has_goods_tag = false;
|
||||
String devicecode;
|
||||
int mode = 0;
|
||||
int action = 0;
|
||||
int error = 0;
|
||||
Boolean iserror = false;
|
||||
|
||||
int move = 0;
|
||||
int task = 0;
|
||||
int state = 0;
|
||||
int last_state = 0;
|
||||
int last_action = 0;
|
||||
int last_mode = 0;
|
||||
int last_error = 0;
|
||||
int last_move = 0;
|
||||
int last_task = 0;
|
||||
|
||||
boolean hasVehicle = false;
|
||||
boolean isReady = false;
|
||||
protected int instruction_num = 0;
|
||||
protected int instruction_num_truth = 0;
|
||||
protected boolean hasGoods = false;
|
||||
boolean isFold = false;
|
||||
private String assemble_check_tag;
|
||||
private Boolean sampleMode0;
|
||||
private Boolean sampleMode3;
|
||||
private Integer sampleError;
|
||||
private Boolean sampleOnline;
|
||||
protected String displayMessage = null;
|
||||
public int display_message_time_out = 30000;
|
||||
public Date display_message_time;
|
||||
protected String current_stage_instruction_message;
|
||||
protected String last_stage_instruction_message;
|
||||
Integer heartbeat_tag;
|
||||
private Date instruction_require_time = new Date();
|
||||
private Date instruction_finished_time = new Date();
|
||||
|
||||
int to_command = 0;
|
||||
int last_to_command = 0;
|
||||
|
||||
|
||||
|
||||
private int instruction_require_time_out;
|
||||
boolean requireSucess = false;
|
||||
|
||||
private int instruction_finished_time_out;
|
||||
|
||||
int branchProtocol = 0;
|
||||
int toOpen = 0;
|
||||
int last_toOpen = 0;
|
||||
int toClose = 0;
|
||||
int last_toClose = 0;
|
||||
String device_code = null;
|
||||
|
||||
@Override
|
||||
public Device getDevice() {
|
||||
@@ -107,55 +50,44 @@ public class StandardAutodoorDeviceDriver extends AbstractOpcDeviceDriver implem
|
||||
public void execute() {
|
||||
String message = null;
|
||||
|
||||
String device_code = this.getDevice().getDevice_code();
|
||||
mode = this.itemProtocol.getMode();
|
||||
action = this.itemProtocol.getAction();
|
||||
error = this.itemProtocol.getError();
|
||||
to_command = this.itemProtocol.getToCommand();
|
||||
if (mode != last_mode) {
|
||||
device_code = this.getDevice().getDevice_code();
|
||||
open = this.itemProtocol.getOpen();
|
||||
close = this.itemProtocol.getClose();
|
||||
toOpen = this.itemProtocol.getToOpen();
|
||||
toClose = this.itemProtocol.getToClose();
|
||||
if (open != last_open) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号open:" + last_open + "->" + open);
|
||||
}
|
||||
if (action != last_action) {
|
||||
if (close != last_close) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号close:" + last_close + "->" + close);
|
||||
if(close ==1 ){
|
||||
this.writing("to_close","0");
|
||||
}
|
||||
}
|
||||
if (error != last_error) {
|
||||
}
|
||||
if (state != last_state) {
|
||||
//固化室状态变更后通知lms更新固化室状态
|
||||
FeedBackTaskStatusRequest request = new FeedBackTaskStatusRequest();
|
||||
request.setState(String.valueOf(state));
|
||||
request.setDevice_code(this.devicecode);
|
||||
request.setType(CommonFinalParam.ONE);
|
||||
acsToWmsService.notify(request);
|
||||
}
|
||||
last_action = action;
|
||||
last_mode = mode;
|
||||
last_error = error;
|
||||
last_state = state;
|
||||
last_to_command = to_command;
|
||||
//message = StringFormatUtl.format("设备报警:{}", new Object[]{});
|
||||
|
||||
// String manual_create_task = this.getDevice().getExtraValue().get("manual_create_task").toString();
|
||||
if (toClose != last_toClose) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号toClose:" + last_toClose + "->" + toClose);
|
||||
|
||||
}
|
||||
if (toOpen != last_toOpen) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号toOpen:" + last_toOpen + "->" + toOpen);
|
||||
}
|
||||
last_open = open;
|
||||
last_close = close;
|
||||
last_toClose = toClose;
|
||||
last_toOpen = toOpen;
|
||||
}
|
||||
|
||||
public synchronized String getStatus() {
|
||||
JSONObject jo = new JSONObject();
|
||||
|
||||
if (action == 1) {
|
||||
jo.put("name", this.getDevice().getDevice_code());
|
||||
jo.put("status", "OPEN");
|
||||
public void writing(String param, String value) {
|
||||
String to_param = this.getDevice().getOpc_server_code() + "." + this.getDevice().getOpc_plc_code() + "." + this.getDevice().getDevice_code()
|
||||
+ "." + param;
|
||||
Map<String, Object> itemMap = new HashMap<String, Object>();
|
||||
itemMap.put(to_param, Integer.parseInt(value));
|
||||
|
||||
} else if (action == 2) {
|
||||
jo.put("name", this.getDevice().getDevice_code());
|
||||
jo.put("status", "CLOSE");
|
||||
|
||||
} else {
|
||||
jo.put("name", this.getDevice().getDevice_code());
|
||||
jo.put("status", "ERROR");
|
||||
}
|
||||
return jo.toString();
|
||||
this.control(itemMap);
|
||||
logServer.deviceExecuteLog(device_code, "", "", "下发电气信号设备号:" + device_code + ",下发电气:" + to_param + ",下发电气值:" + value);
|
||||
}
|
||||
|
||||
|
||||
public void writing(String param, int command) {
|
||||
String to_command = String.format("%s.%s.%s.%s", this.getDevice().getOpc_server_code(), this.getDevice().getOpc_plc_code(), this.getDevice().getDevice_code(), param);
|
||||
|
||||
@@ -165,19 +97,37 @@ public class StandardAutodoorDeviceDriver extends AbstractOpcDeviceDriver implem
|
||||
itemMap.put(to_command, command);
|
||||
ReadUtil.write(itemMap, server);
|
||||
log.info("下发PLC信号:{},{}", to_command, command);
|
||||
System.out.println("设备:" + devicecode + ",下发PLC信号:" + to_command + ",value:" + command);
|
||||
System.out.println("设备:" + this.device_code + ",下发PLC信号:" + to_command + ",value:" + command);
|
||||
|
||||
}
|
||||
|
||||
public synchronized void OpenOrClose(String type) {
|
||||
|
||||
//开门
|
||||
if (CommonFinalParam.ONE.equals(type)) {
|
||||
writing(ItemProtocol.item_to_command, 1);
|
||||
} else {
|
||||
writing(ItemProtocol.item_to_command, 2);
|
||||
@Override
|
||||
public JSONObject getDeviceStatusName() {
|
||||
JSONObject jo = new JSONObject();
|
||||
String open = "";
|
||||
String close = "";
|
||||
if (this.getOpen() == 0) {
|
||||
open = "未知";
|
||||
} else if (this.getOpen() == 1) {
|
||||
open = "开到位";
|
||||
}
|
||||
if (this.getClose() == 0) {
|
||||
open = "未知";
|
||||
} else if (this.getClose() == 1) {
|
||||
open = "关到位";
|
||||
}
|
||||
jo.put("device_name", this.getDevice().getDevice_name());
|
||||
jo.put("open", open);
|
||||
jo.put("close", close);
|
||||
jo.put("isOnline", true);
|
||||
|
||||
return jo;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setDeviceStatus(JSONObject data) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package org.nl.acs.instruction.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.collection.ListUtil;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
@@ -368,6 +370,15 @@ public class InstructionServiceImpl extends CommonServiceImpl<InstructionMapper,
|
||||
throw new BadRequestException(LangProcess.msg("error_regional_max"));
|
||||
}
|
||||
|
||||
String start_device_code = dto.getStart_device_code();
|
||||
if(StrUtil.isNotEmpty(dto.getTask_code())){
|
||||
List<InstructionMybatis> instructionMybatis = instructionMapper.selectList(Wrappers.lambdaQuery(InstructionMybatis.class)
|
||||
.eq(InstructionMybatis::getTask_code, dto.getTask_code()));
|
||||
if(CollUtil.isNotEmpty(instructionMybatis) && instructionMybatis.stream().anyMatch(inst -> inst.getStart_device_code()
|
||||
.equals(start_device_code))){
|
||||
return;
|
||||
}
|
||||
}
|
||||
String currentUsername = SecurityUtils.getCurrentNickName();
|
||||
String now = DateUtil.now();
|
||||
if (StrUtil.isEmpty(dto.getRoute_plan_code())) {
|
||||
@@ -430,7 +441,7 @@ public class InstructionServiceImpl extends CommonServiceImpl<InstructionMapper,
|
||||
StandardCoveyorControlWithScannerDeviceDriver standardCoveyorControlWithScannerDeviceDriver;
|
||||
|
||||
try {
|
||||
String start_device_code = dto.getStart_device_code();
|
||||
/*String start_device_code = dto.getStart_device_code();*/
|
||||
String next_device_code = dto.getNext_device_code();
|
||||
String route_plan_code = task.getRoute_plan_code();
|
||||
List<RouteLineDto> shortPathsList =
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
package org.nl.wms.autotask;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.modules.wql.core.bean.WQLObject;
|
||||
import org.nl.system.service.param.ISysParamService;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* 自动清除日志(操作日志、异常日志)数据
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
@RequiredArgsConstructor
|
||||
public class CleanTask {
|
||||
private final ISysParamService paramService;
|
||||
|
||||
public void run() {
|
||||
//delete from sys_log where DATE(create_time) <= DATE(DATE_SUB(NOW(),INTERVAL 30 day)) limit 10;
|
||||
WQLObject taskTab = WQLObject.getWQLObject("sch_base_task");
|
||||
int days = Integer.parseInt(paramService.findByCode("task_day").getValue());
|
||||
taskTab.delete("DATE(create_time) <= DATE(DATE_SUB(NOW(),INTERVAL " + days + " day))");
|
||||
|
||||
log.info("自动清理任务执行成功...!");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -83,15 +83,6 @@ public class MaterialbaseController {
|
||||
return new ResponseEntity<>(MaterOptTypeEnum.getObj(materOpt_code), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/synchronize")
|
||||
@Log("物料同步")
|
||||
|
||||
//@PreAuthorize("@el.check('materialtype:list')")
|
||||
public ResponseEntity<Object> synchronize(@RequestBody Map whereJson) {
|
||||
materialBaseService.synchronize(whereJson);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
|
||||
@Log("查询产品系列类型")
|
||||
|
||||
@GetMapping("/getProductSeries")
|
||||
|
||||
@@ -88,8 +88,6 @@ public interface MaterialbaseService {
|
||||
*/
|
||||
JSONObject getMaterOptType(String materOpt_code);
|
||||
|
||||
void synchronize(Map whereJson);
|
||||
|
||||
JSONArray getProductSeries(String parent_class_id);
|
||||
|
||||
|
||||
|
||||
@@ -39,7 +39,6 @@ import java.util.Set;
|
||||
@Slf4j
|
||||
public class MaterialbaseServiceImpl implements MaterialbaseService {
|
||||
private final ClassstandardService classstandardService;
|
||||
//private final WmsToErpService wmsToErpService;
|
||||
|
||||
@Override
|
||||
public Map<String, Object> queryAll(Map whereJson, Pageable page) {
|
||||
@@ -214,12 +213,6 @@ public class MaterialbaseServiceImpl implements MaterialbaseService {
|
||||
return MaterOptTypeEnum.getObj(materOpt_code);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void synchronize(Map whereJson) {
|
||||
/* wmsToErpService.getClassInfo(null);
|
||||
wmsToErpService.getMaterialInfo(null);*/
|
||||
}
|
||||
|
||||
@Override
|
||||
public JSONArray getProductSeries(String parent_class_id) {
|
||||
WQLObject wo = WQLObject.getWQLObject("MD_PB_ClassStandard");
|
||||
|
||||
@@ -39,6 +39,7 @@ public class StructivtController {
|
||||
//@PreAuthorize("@el.check('structivt:list')")
|
||||
public ResponseEntity<Object> query(@RequestParam Map whereJson, Pageable page, String[] product_area, String[] ivt_flag) {
|
||||
return new ResponseEntity<>(structivtService.queryAll(whereJson, page, product_area, ivt_flag), HttpStatus.OK);
|
||||
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
|
||||
@@ -28,10 +28,7 @@ import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.*;
|
||||
import java.util.function.BiConsumer;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@@ -541,8 +538,9 @@ public class StructattrServiceImpl implements StructattrService {
|
||||
int createNum = whereJson.getIntValue("num");
|
||||
// 开始生成数
|
||||
int createNum_start = 1;
|
||||
|
||||
// 前缀
|
||||
String prefix = whereJson.getString("prefix");
|
||||
String prefix = "";
|
||||
|
||||
if (ObjectUtil.isNotEmpty(jsonAttr)) {
|
||||
String struct_code = jsonAttr.getString("struct_code");
|
||||
@@ -559,6 +557,21 @@ public class StructattrServiceImpl implements StructattrService {
|
||||
createNum_start += Integer.parseInt(result);
|
||||
|
||||
prefix = struct_code.substring(0, firstIndex);
|
||||
} else {
|
||||
// 截取第一个 - 之前的数据集合
|
||||
|
||||
List<JSONObject> attrList = WQL.getWO("QST_STRUCT_ATTR").addParam("flag", "2").process()
|
||||
.getResultJSONArray(0).toJavaList(JSONObject.class);
|
||||
|
||||
List<String> subStringList = attrList.stream()
|
||||
.filter(row -> row.getString("struct_code").contains("-"))
|
||||
.map(row -> row.getString("struct_code").substring(0, row.getString("struct_code").indexOf("-")))
|
||||
.distinct()
|
||||
.sorted()
|
||||
.filter(row -> row.matches("-?\\d+(\\.\\d+)?"))
|
||||
.collect(Collectors.toList());
|
||||
|
||||
prefix = String.valueOf(Integer.parseInt(subStringList.get(subStringList.size() - 1)) + 1);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -651,13 +664,16 @@ public class StructattrServiceImpl implements StructattrService {
|
||||
/*
|
||||
* 判断前缀是否存在
|
||||
*/
|
||||
List<JSONObject> attrList = attrTab.query("1 = 1").getResultJSONArray(0).toJavaList(JSONObject.class);
|
||||
List<JSONObject> attrList = WQL.getWO("QST_STRUCT_ATTR").addParam("flag", "2").process()
|
||||
.getResultJSONArray(0).toJavaList(JSONObject.class);
|
||||
|
||||
// 截取第一个 - 之前的数据集合
|
||||
List<String> subStringList = attrList.stream()
|
||||
.filter(row -> row.getString("struct_code").contains("-"))
|
||||
.map(row -> row.getString("struct_code").substring(0, row.getString("struct_code").indexOf("-")))
|
||||
.distinct()
|
||||
.sorted()
|
||||
.filter(row -> row.matches("-?\\d+(\\.\\d+)?"))
|
||||
.collect(Collectors.toList());
|
||||
|
||||
// 判断是否有相同的前缀
|
||||
|
||||
@@ -86,5 +86,19 @@
|
||||
ENDPAGEQUERY
|
||||
ENDIF
|
||||
|
||||
IF 输入.flag = "2"
|
||||
QUERY
|
||||
SELECT
|
||||
struct.*
|
||||
FROM
|
||||
st_ivt_structattr struct
|
||||
LEFT JOIN st_ivt_sectattr sect ON sect.sect_id = struct.sect_id
|
||||
WHERE
|
||||
sect.sect_type_attr = '09'
|
||||
|
||||
ENDSELECT
|
||||
ENDQUERY
|
||||
ENDIF
|
||||
|
||||
|
||||
|
||||
|
||||
Binary file not shown.
@@ -55,11 +55,13 @@
|
||||
SELECT
|
||||
task.*,
|
||||
md.class_name task_type_name,
|
||||
user.person_name AS create_name1,
|
||||
dict.label task_status_name,
|
||||
case when task.task_type like '0105%' then 'LK' ELSE task.product_area end AS final_product_area
|
||||
FROM
|
||||
sch_base_task task
|
||||
LEFT JOIN md_pb_classstandard md ON task.task_type = md.class_code
|
||||
LEFT JOIN sys_user user ON user.username = task.create_name
|
||||
LEFT JOIN sys_dict dict ON dict.`value` = task.task_status AND dict.`code` = 'task_status'
|
||||
WHERE
|
||||
1=1
|
||||
|
||||
@@ -295,4 +295,12 @@ public interface CheckOutBillService {
|
||||
* @throws IOException /
|
||||
*/
|
||||
void download(Map map, HttpServletResponse response, String[] stor_id, String[] bill_status, String[] bill_type) throws IOException;
|
||||
|
||||
/**
|
||||
* 更新是否超期
|
||||
* @param whereJson {
|
||||
* 主表数据
|
||||
* }
|
||||
*/
|
||||
JSONObject updataIsOverdue(JSONObject whereJson);
|
||||
}
|
||||
|
||||
@@ -340,57 +340,6 @@
|
||||
ENDQUERY
|
||||
ENDIF
|
||||
|
||||
IF 输入.flag = "8"
|
||||
PAGEQUERY
|
||||
SELECT
|
||||
pp.CREATE_DATE AS receive_date,
|
||||
pp.VBILLCODE AS source_bill_code,
|
||||
mb.material_code,
|
||||
mb.material_name,
|
||||
class.class_desc,
|
||||
mb.material_id,
|
||||
pp.QTY AS receive_qty,
|
||||
( CASE WHEN a.real_qty IS NULL THEN pp.QTY ELSE ( pp.QTY - a.real_qty ) END ) AS need_qty,
|
||||
mu.unit_name AS qty_unit_name,
|
||||
'采购订单' AS source_type_name,
|
||||
mu.measure_unit_id AS qty_unit_id,
|
||||
pp.id AS source_billdtl_id,
|
||||
'PO' AS source_bill_type,
|
||||
'PCS_IF_PurchaseOrderProc' AS source_bill_table,
|
||||
pp.id AS base_billdtl_id,
|
||||
'PO' AS base_bill_type,
|
||||
'' AS base_bill_code,
|
||||
'PCS_IF_PurchaseOrderProc' AS base_bill_table
|
||||
FROM
|
||||
pcs_if_purchaseorderproc pp
|
||||
LEFT JOIN md_me_materialbase mb ON mb.ext_id = pp.ITEM_ID
|
||||
INNER JOIN md_pb_classstandard class ON class.class_id = mb.material_type_id
|
||||
INNER JOIN md_pb_measureunit mu ON mu.ext_id = pp.M_UNIT_ID
|
||||
LEFT JOIN ( SELECT dtl.source_billdtl_id, SUM( dtl.real_qty ) AS real_qty FROM st_ivt_iostorinvdtl dtl GROUP BY source_billdtl_id ) a ON a.source_billdtl_id = pp.id
|
||||
WHERE
|
||||
pp.proc_status IN ( '01', '02' )
|
||||
AND
|
||||
pp.DR='0'
|
||||
AND
|
||||
mb.material_type_id IN 输入.clsss_ids
|
||||
OPTION 输入.material_search <> ""
|
||||
(mb.material_code like 输入.material_search
|
||||
OR
|
||||
mb.material_name like 输入.material_search)
|
||||
ENDOPTION
|
||||
OPTION 输入.bill_code <> ""
|
||||
pp.VBILLCODE like 输入.bill_code
|
||||
ENDOPTION
|
||||
OPTION 输入.begin_time <> ""
|
||||
pp.CREATE_DATE >= 输入.begin_time
|
||||
ENDOPTION
|
||||
OPTION 输入.end_time <> ""
|
||||
pp.CREATE_DATE <= 输入.end_time
|
||||
ENDOPTION
|
||||
ENDSELECT
|
||||
ENDPAGEQUERY
|
||||
ENDIF
|
||||
|
||||
IF 输入.flag = "9"
|
||||
PAGEQUERY
|
||||
SELECT
|
||||
|
||||
@@ -479,6 +479,10 @@ public class ProductScrapServiceImpl implements ProductScrapService {
|
||||
.addParam("flag", "3").addParam("stor_id", stor_id).addParam("in_stor_id",in_stor_id)
|
||||
.process().getResultJSONArray(0).toJavaList(JSONObject.class);
|
||||
|
||||
// 查询不合格品来源字典
|
||||
List<JSONObject> dictList = WQL.getWO("QST_IVT_PRODUCTSCRAP").addParam("flag", "3")
|
||||
.process().getResultJSONArray(0).toJavaList(JSONObject.class);
|
||||
|
||||
// 循环获取的数据
|
||||
ArrayList<JSONObject> resultList = new ArrayList<>();
|
||||
for (int i = 0; i < read.size(); i++) {
|
||||
@@ -488,10 +492,14 @@ public class ProductScrapServiceImpl implements ProductScrapService {
|
||||
String pcsn = list.get(0).toString();
|
||||
// sap批次号
|
||||
String sap_pcsn = list.get(1).toString();
|
||||
// 木箱号
|
||||
/* // 木箱号
|
||||
String box_no = list.get(2).toString();
|
||||
// 重量
|
||||
String qty = list.get(3).toString();
|
||||
String qty = list.get(3).toString();*/
|
||||
// 不合格品来源
|
||||
String fail_source = list.get(4).toString();
|
||||
// 不合格描述
|
||||
String remark = list.get(5).toString();
|
||||
|
||||
// 子卷号和批次号必须有一个不为空
|
||||
if (ObjectUtil.isEmpty(pcsn) && ObjectUtil.isEmpty(sap_pcsn)) {
|
||||
@@ -513,6 +521,23 @@ public class ProductScrapServiceImpl implements ProductScrapService {
|
||||
.filter(row -> row.getString("storagevehicle_code").equals(json.getString("storagevehicle_code")))
|
||||
.collect(Collectors.toList());
|
||||
|
||||
// 匹配不合格品来源
|
||||
String value = "";
|
||||
List<JSONObject> label = dictList.stream()
|
||||
.filter(row -> row.getString("label").equals(fail_source))
|
||||
.collect(Collectors.toList());
|
||||
|
||||
if (ObjectUtil.isNotEmpty(label)) {
|
||||
value = label.get(0).getString("value");
|
||||
}
|
||||
|
||||
// 插入不合格品来源、不合格品描述
|
||||
String finalValue = value;
|
||||
boxList.forEach(row -> {
|
||||
row.put("fail_source", finalValue);
|
||||
row.put("remark",remark);
|
||||
});
|
||||
|
||||
resultList.addAll(boxList);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -110,3 +110,15 @@
|
||||
ENDSELECT
|
||||
ENDQUERY
|
||||
ENDIF
|
||||
|
||||
IF 输入.flag = "3"
|
||||
QUERY
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
sys_dict
|
||||
WHERE
|
||||
code = 'FAIL_SOURCE'
|
||||
ENDSELECT
|
||||
ENDQUERY
|
||||
ENDIF
|
||||
@@ -312,4 +312,11 @@ public class CheckOutBillController {
|
||||
public void download(@RequestParam Map map, HttpServletResponse response, String[] stor_id, String[] bill_status, String[] bill_type) throws IOException {
|
||||
checkOutBillService.download(map, response, stor_id, bill_status, bill_type);
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/updataIsOverdue")
|
||||
@Log("更新是否超期")
|
||||
public ResponseEntity<Object> updataIsOverdue(@RequestBody JSONObject whereJson) {
|
||||
return new ResponseEntity<>(checkOutBillService.updataIsOverdue(whereJson),HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1022,6 +1022,32 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
||||
FileUtil.downloadExcel(list, response);
|
||||
}
|
||||
|
||||
@Override
|
||||
public JSONObject updataIsOverdue(JSONObject whereJson) {
|
||||
// 出入库主表
|
||||
WQLObject mstTab = WQLObject.getWQLObject("st_ivt_iostorinv");
|
||||
// 出入库分配明细表
|
||||
WQLObject disTab = WQLObject.getWQLObject("st_ivt_iostorinvdis");
|
||||
|
||||
// 更新主表
|
||||
JSONObject jsonMst = mstTab.query("iostorinv_id = '" + whereJson.getString("iostorinv_id") + "'").uniqueResult(0);
|
||||
jsonMst.put("is_overdue", whereJson.getString("is_overdue"));
|
||||
mstTab.update(jsonMst);
|
||||
|
||||
// 计算超期数量
|
||||
List<JSONObject> disList = disTab.query("iostorinvdtl_id = '" + whereJson.getString("iostorinvdtl_id") + "' AND is_overdue = '1'")
|
||||
.getResultJSONArray(0).toJavaList(JSONObject.class);
|
||||
|
||||
double overdue_qyt = disList.stream()
|
||||
.map(row -> row.getDoubleValue("plan_qty"))
|
||||
.reduce(Double::sum).orElse(0.00);
|
||||
|
||||
JSONObject result = new JSONObject();
|
||||
result.put("overdue_qyt",overdue_qyt);
|
||||
result.put("mst", jsonMst);
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void update(JSONObject whereJson) {
|
||||
@@ -1290,11 +1316,12 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
||||
dtl.put("work_status", "00");
|
||||
}
|
||||
|
||||
// 判断是否超期
|
||||
if (ivt2.getString("is_overdue").equals("1")) {
|
||||
dtl.put("work_status", "01");
|
||||
if (jo_mst.getString("is_overdue").equals("1")) {
|
||||
// 判断是否超期
|
||||
if (ivt2.getString("is_overdue").equals("1")) {
|
||||
dtl.put("work_status", "01");
|
||||
}
|
||||
}
|
||||
|
||||
wo_dis.insert(dtl);
|
||||
}
|
||||
//记录需锁定的仓位
|
||||
@@ -1358,9 +1385,12 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
||||
}
|
||||
|
||||
// 判断是否超期
|
||||
if (jsonIvt.getString("is_overdue").equals("1")) {
|
||||
dtl.put("work_status", "01");
|
||||
if (jo_mst.getString("is_overdue").equals("1")) {
|
||||
if (jsonIvt.getString("is_overdue").equals("1")) {
|
||||
dtl.put("work_status", "01");
|
||||
}
|
||||
}
|
||||
|
||||
wo_dis.insert(dtl);
|
||||
|
||||
//记录需锁定的仓位 (如果此明细有相同物料的且子卷号不能为空的则在最后一个明细分配完成后锁定仓位)
|
||||
@@ -1534,6 +1564,7 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
||||
dtl.put("is_issued", "0");
|
||||
dtl.put("plan_qty", ivt2.getDoubleValue("change_qty"));
|
||||
dtl.put("real_qty", ivt2.getDoubleValue("change_qty"));
|
||||
dtl.put("is_overdue", ivt2.getString("is_overdue"));
|
||||
dtl.put("instorage_time", ivt2.getString("instorage_time"));
|
||||
// 如果所属仓位是虚拟区 则将分配明细状态变为生成
|
||||
JSONObject jsonSect = wo_sect.query("sect_id = '" + ivt2.getString("sect_id") + "'").uniqueResult(0);
|
||||
@@ -1542,6 +1573,14 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
||||
} else {
|
||||
dtl.put("work_status", "00");
|
||||
}
|
||||
|
||||
if (jo_mst.getString("is_overdue").equals("1")) {
|
||||
// 判断是否超期
|
||||
if (ivt2.getString("is_overdue").equals("1")) {
|
||||
dtl.put("work_status", "01");
|
||||
}
|
||||
}
|
||||
|
||||
wo_dis.insert(dtl);
|
||||
}
|
||||
//记录需锁定的仓位
|
||||
@@ -1594,6 +1633,7 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
||||
dtl.put("is_issued", "0");
|
||||
dtl.put("plan_qty", jsonIvt.getDoubleValue("change_qty"));
|
||||
dtl.put("real_qty", jsonIvt.getDoubleValue("change_qty"));
|
||||
dtl.put("is_overdue", jsonIvt.getString("is_overdue"));
|
||||
dtl.put("instorage_time", jsonIvt.getString("instorage_time"));
|
||||
// 如果所属仓位是虚拟区 则将分配明细状态变为生成
|
||||
JSONObject jsonSect = wo_sect.query("sect_id = '" + jsonIvt.getString("sect_id") + "'").uniqueResult(0);
|
||||
@@ -1602,6 +1642,14 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
||||
} else {
|
||||
dtl.put("work_status", "00");
|
||||
}
|
||||
|
||||
if (jo_mst.getString("is_overdue").equals("1")) {
|
||||
// 判断是否超期
|
||||
if (jsonIvt.getString("is_overdue").equals("1")) {
|
||||
dtl.put("work_status", "01");
|
||||
}
|
||||
}
|
||||
|
||||
wo_dis.insert(dtl);
|
||||
//记录需锁定的仓位
|
||||
Struct_map.put(jsonIvt.getString("struct_id"), jsonIvt);
|
||||
@@ -1658,6 +1706,8 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
||||
json.put("is_issued", "0");
|
||||
json.put("plan_qty", ivt.getDoubleValue("change_qty"));
|
||||
json.put("real_qty", ivt.getDoubleValue("change_qty"));
|
||||
json.put("is_overdue", ivt.getString("is_overdue"));
|
||||
json.put("instorage_time", ivt.getString("instorage_time"));
|
||||
// 如果所属仓位是虚拟区 则将分配明细状态变为生成
|
||||
JSONObject jsonSect = wo_sect.query("sect_id = '" + ivt.getString("sect_id") + "'").uniqueResult(0);
|
||||
if (StrUtil.equals(jsonSect.getString("sect_type_attr"), "09")) {
|
||||
@@ -1665,6 +1715,14 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
||||
} else {
|
||||
json.put("work_status", "00");
|
||||
}
|
||||
|
||||
// 判断是否超期
|
||||
if (jo_mst.getString("is_overdue").equals("1")) {
|
||||
if (ivt.getString("is_overdue").equals("1")) {
|
||||
json.put("work_status", "01");
|
||||
}
|
||||
}
|
||||
|
||||
wo_dis.insert(json);
|
||||
|
||||
// 更新明细
|
||||
@@ -4384,6 +4442,7 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
||||
dtl.put("is_issued", "0");
|
||||
dtl.put("plan_qty", ivt.getDoubleValue("change_qty"));
|
||||
dtl.put("real_qty", ivt.getDoubleValue("change_qty"));
|
||||
dtl.put("is_overdue", ivt.getString("is_overdue"));
|
||||
dtl.put("instorage_time", ivt.getString("instorage_time"));
|
||||
// 如果所属仓位是虚拟区 则将分配明细状态变为生成
|
||||
JSONObject jsonSect = wo_sect.query("sect_id = '" + ivt.getString("sect_id") + "'").uniqueResult(0);
|
||||
@@ -4392,6 +4451,14 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
||||
} else {
|
||||
dtl.put("work_status", "00");
|
||||
}
|
||||
|
||||
// 判断是否超期
|
||||
if (jo_mst.getString("is_overdue").equals("1")) {
|
||||
if (ivt.getString("is_overdue").equals("1")) {
|
||||
dtl.put("work_status", "01");
|
||||
}
|
||||
}
|
||||
|
||||
wo_dis.insert(dtl);
|
||||
//记录需锁定的仓位
|
||||
Struct_map.put(ivt.getString("struct_id"), ivt);
|
||||
@@ -4453,6 +4520,7 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
||||
json.put("is_issued", "0");
|
||||
json.put("plan_qty", ivt.getDoubleValue("change_qty"));
|
||||
json.put("real_qty", ivt.getDoubleValue("change_qty"));
|
||||
json.put("is_overdue", ivt.getString("is_overdue"));
|
||||
json.put("instorage_time", ivt.getString("instorage_time"));
|
||||
// 如果所属仓位是虚拟区 则将分配明细状态变为生成
|
||||
JSONObject jsonSect = wo_sect.query("sect_id = '" + ivt.getString("sect_id") + "'").uniqueResult(0);
|
||||
@@ -4461,6 +4529,14 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
||||
} else {
|
||||
json.put("work_status", "00");
|
||||
}
|
||||
|
||||
// 判断是否超期
|
||||
if (jo_mst.getString("is_overdue").equals("1")) {
|
||||
if (ivt.getString("is_overdue").equals("1")) {
|
||||
json.put("work_status", "01");
|
||||
}
|
||||
}
|
||||
|
||||
wo_dis.insert(json);
|
||||
|
||||
// 更新明细
|
||||
@@ -4585,8 +4661,12 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
||||
dis.put("bill_code", jo_mst.getString("bill_code"));
|
||||
dis.put("bill_table", "ST_IVT_IOStorInv");
|
||||
|
||||
if (dis.getString("is_overdue").equals("1")) {
|
||||
storPublicService.IOStor(dis, "12");
|
||||
if (jo_mst.getString("is_overdue").equals("1")) {
|
||||
if (dis.getString("is_overdue").equals("1")) {
|
||||
storPublicService.IOStor(dis, "12");
|
||||
} else {
|
||||
storPublicService.IOStor(dis, "21");
|
||||
}
|
||||
} else {
|
||||
storPublicService.IOStor(dis, "21");
|
||||
}
|
||||
@@ -4596,15 +4676,23 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
||||
from_start.put("struct_id", dis.getString("struct_id"));
|
||||
from_start.put("lock_type", "1");
|
||||
from_start.put("is_overdue", dis.getString("is_overdue"));
|
||||
if (dis.getString("is_overdue").equals("1")) {
|
||||
from_start.put("storagevehicle_code", dis.getString("box_no"));
|
||||
|
||||
if (jo_mst.getString("is_overdue").equals("1")) {
|
||||
if (dis.getString("is_overdue").equals("1")) {
|
||||
from_start.put("storagevehicle_code", dis.getString("box_no"));
|
||||
} else {
|
||||
from_start.put("storagevehicle_code", "");
|
||||
}
|
||||
} else {
|
||||
from_start.put("storagevehicle_code", "");
|
||||
}
|
||||
|
||||
storPublicService.updateStructAndPoint(from_start);
|
||||
|
||||
if (dis.getString("is_overdue").equals("1")) {
|
||||
continue;
|
||||
if (jo_mst.getString("is_overdue").equals("1")) {
|
||||
if (dis.getString("is_overdue").equals("1")) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
//查询对应明细
|
||||
@@ -4664,7 +4752,14 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
||||
}
|
||||
|
||||
JSONObject mst_row = mst_wql.query("iostorinv_id = '" + iostorinv_id + "'").uniqueResult(0);
|
||||
JSONArray dis_rows = dis_wql.query("iostorinv_id = '" + iostorinv_id + "' and is_overdue = '0'").getResultJSONArray(0);
|
||||
|
||||
JSONArray dis_rows = new JSONArray();
|
||||
|
||||
if (jo_mst.getString("is_overdue").equals("1")) {
|
||||
dis_rows = dis_wql.query("iostorinv_id = '" + iostorinv_id + "' and is_overdue = '0'").getResultJSONArray(0);
|
||||
} else {
|
||||
dis_rows = dis_wql.query("iostorinv_id = '" + iostorinv_id + "'").getResultJSONArray(0);
|
||||
}
|
||||
|
||||
//生成手工入库单
|
||||
String new_iostorinv_id = IdUtil.getSnowflake(1, 1).nextId() + "";
|
||||
@@ -4767,7 +4862,13 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
||||
|
||||
if ("1003".equals(out_jo.getString("bill_type")) || "1006".equals(out_jo.getString("bill_type"))) {
|
||||
//如果为返检出库或者改切出库删除对应的包装关系
|
||||
JSONArray dis_rows = WQLObject.getWQLObject("ST_IVT_IOStorInvDis").query("iostorinv_id = '" + iostorinv_id + "' and is_overdue = '0'").getResultJSONArray(0);
|
||||
JSONArray dis_rows = new JSONArray();
|
||||
if (jo_mst.getString("is_overdue").equals("1")) {
|
||||
dis_rows = WQLObject.getWQLObject("ST_IVT_IOStorInvDis").query("iostorinv_id = '" + iostorinv_id + "' and is_overdue = '0'").getResultJSONArray(0);
|
||||
} else {
|
||||
dis_rows = WQLObject.getWQLObject("ST_IVT_IOStorInvDis").query("iostorinv_id = '" + iostorinv_id + "'").getResultJSONArray(0);
|
||||
}
|
||||
|
||||
for (int i = 0; i < dis_rows.size(); i++) {
|
||||
JSONObject dis_row = dis_rows.getJSONObject(i);
|
||||
String sect_code = dis_row.getString("sect_code");
|
||||
@@ -5329,12 +5430,15 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
||||
// 回传sap
|
||||
JSONObject jsonMst = mstTab.query("iostorinv_id = '" + whereJson.getString("iostorinv_id") + "'").uniqueResult(0);
|
||||
|
||||
JSONArray jsonArr = new JSONArray();
|
||||
jsonArr.add(jsonMst);
|
||||
// 判断单据是否是完成状态:只回传完成状态的单据
|
||||
if (jsonMst.getString("bill_status").equals("99")) {
|
||||
JSONArray jsonArr = new JSONArray();
|
||||
jsonArr.add(jsonMst);
|
||||
|
||||
JSONObject param = new JSONObject();
|
||||
param.put("rows", jsonArr);
|
||||
inAndOutReturnService.uploadSAP(param);
|
||||
JSONObject param = new JSONObject();
|
||||
param.put("rows", jsonArr);
|
||||
inAndOutReturnService.uploadSAP(param);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -97,6 +97,7 @@
|
||||
cu.cust_simple_name,
|
||||
a.plan_qty,
|
||||
attr.stor_name AS out_stor_name
|
||||
|
||||
FROM
|
||||
ST_IVT_IOStorInv ios
|
||||
LEFT JOIN md_cs_customerbase cu ON ios.cust_code = cu.cust_code
|
||||
@@ -106,15 +107,32 @@
|
||||
LEFT JOIN pdm_bi_subpackagerelationrecord sub ON sub.container_name = dis.pcsn AND dis.box_no = sub.package_box_sn AND sub.bill_code = ios.bill_code
|
||||
LEFT JOIN (
|
||||
SELECT
|
||||
SUM(a.assign_qty) AS plan_qty,
|
||||
SUM(a.plan_qty) AS plan_qty,
|
||||
a.iostorinv_id
|
||||
FROM
|
||||
st_ivt_iostorinvdtl a
|
||||
st_ivt_iostorinvdis a
|
||||
LEFT JOIN ST_IVT_IOStorInv b ON a.iostorinv_id = b.iostorinv_id
|
||||
WHERE
|
||||
b.io_type = '1'
|
||||
and b.is_delete='0'
|
||||
and a.is_overdue = '0'
|
||||
and b.is_overdue = '1'
|
||||
GROUP BY a.iostorinv_id
|
||||
|
||||
UNION
|
||||
|
||||
SELECT
|
||||
SUM(a.plan_qty) AS plan_qty,
|
||||
a.iostorinv_id
|
||||
FROM
|
||||
st_ivt_iostorinvdis a
|
||||
LEFT JOIN ST_IVT_IOStorInv b ON a.iostorinv_id = b.iostorinv_id
|
||||
WHERE
|
||||
b.io_type = '1'
|
||||
and b.is_delete='0'
|
||||
and b.is_overdue = '0'
|
||||
GROUP BY a.iostorinv_id
|
||||
|
||||
) a ON a.iostorinv_id = ios.iostorinv_id
|
||||
WHERE
|
||||
ios.io_type = '1'
|
||||
@@ -369,7 +387,14 @@
|
||||
struct.storagevehicle_id,
|
||||
struct.storagevehicle_code,
|
||||
point.point_id,
|
||||
sub.sap_pcsn
|
||||
sub.sap_pcsn,
|
||||
CASE
|
||||
WHEN SUBSTRING(sub.container_name,1,1) = 'B' AND DATEDIFF( NOW(), sub.date_of_production ) > '180'
|
||||
THEN '1'
|
||||
WHEN SUBSTRING(sub.container_name,1,1) != 'B' AND DATEDIFF( NOW(), sub.date_of_production ) > '90'
|
||||
THEN '1'
|
||||
ELSE '0'
|
||||
END AS is_overdue
|
||||
FROM
|
||||
ST_IVT_StructIvt ivt
|
||||
LEFT JOIN st_ivt_structattr struct ON struct.struct_id = ivt.struct_id
|
||||
@@ -437,7 +462,14 @@
|
||||
struct.storagevehicle_id,
|
||||
struct.storagevehicle_code,
|
||||
point.point_id,
|
||||
sub.sap_pcsn
|
||||
sub.sap_pcsn,
|
||||
CASE
|
||||
WHEN SUBSTRING(sub.container_name,1,1) = 'B' AND DATEDIFF( NOW(), sub.date_of_production ) > '180'
|
||||
THEN '1'
|
||||
WHEN SUBSTRING(sub.container_name,1,1) != 'B' AND DATEDIFF( NOW(), sub.date_of_production ) > '90'
|
||||
THEN '1'
|
||||
ELSE '0'
|
||||
END AS is_overdue
|
||||
FROM
|
||||
ST_IVT_StructIvt ivt2
|
||||
LEFT JOIN st_ivt_structattr struct ON struct.struct_id = ivt2.struct_id
|
||||
|
||||
@@ -62,7 +62,11 @@
|
||||
attr.struct_name,
|
||||
attr.struct_code,
|
||||
CASE
|
||||
WHEN DATEDIFF( NOW(), sub.date_of_production ) > '90' THEN '1' ELSE '0'
|
||||
WHEN SUBSTRING(sub.container_name,1,1) = 'B' AND DATEDIFF( NOW(), sub.date_of_production ) > '180'
|
||||
THEN '1'
|
||||
WHEN SUBSTRING(sub.container_name,1,1) != 'B' AND DATEDIFF( NOW(), sub.date_of_production ) > '90'
|
||||
THEN '1'
|
||||
ELSE '0'
|
||||
END AS is_overdue
|
||||
FROM
|
||||
ST_IVT_StructIvt ivt
|
||||
@@ -164,7 +168,11 @@
|
||||
attr.struct_name,
|
||||
attr.struct_code,
|
||||
CASE
|
||||
WHEN DATEDIFF( NOW(), sub.date_of_production ) > '90' THEN '1' ELSE '0'
|
||||
WHEN SUBSTRING(sub.container_name,1,1) = 'B' AND DATEDIFF( NOW(), sub.date_of_production ) > '180'
|
||||
THEN '1'
|
||||
WHEN SUBSTRING(sub.container_name,1,1) != 'B' AND DATEDIFF( NOW(), sub.date_of_production ) > '90'
|
||||
THEN '1'
|
||||
ELSE '0'
|
||||
END AS is_overdue
|
||||
FROM
|
||||
ST_IVT_StructIvt ivt
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
输入.begin_time TYPEAS s_string
|
||||
输入.end_time TYPEAS s_string
|
||||
输入.material_code TYPEAS s_string
|
||||
输入.classIds TYPEAS f_string
|
||||
输入.pcsn TYPEAS s_string
|
||||
输入.sap_pcsn TYPEAS s_string
|
||||
输入.package_box_sn TYPEAS s_string
|
||||
@@ -53,14 +52,9 @@
|
||||
stor.stor_name,
|
||||
da.sect_date,
|
||||
da.pcsn,
|
||||
da.quality_scode,
|
||||
class.class_name,
|
||||
class.class_code,
|
||||
mater.material_id,
|
||||
mater.material_code,
|
||||
mater.material_name,
|
||||
mater.material_model,
|
||||
unit.unit_name,
|
||||
da.start_num,
|
||||
da.in_num,
|
||||
da.out_num,
|
||||
@@ -77,22 +71,17 @@
|
||||
sum(end_num) AS end_num,
|
||||
sum(more_num) AS more_num,
|
||||
sum(less_num) AS less_num,
|
||||
max(material_id) AS material_id,
|
||||
max( material_id ) AS material_id,
|
||||
max(stor_id) AS stor_id,
|
||||
max(sect_date) AS sect_date,
|
||||
max(quality_scode) AS quality_scode,
|
||||
max(pcsn) AS pcsn
|
||||
sect_date,
|
||||
pcsn
|
||||
FROM
|
||||
ST_IVT_IOStorDaily a
|
||||
GROUP BY
|
||||
a.material_id,
|
||||
a.quality_scode,
|
||||
a.pcsn,
|
||||
a.sect_date
|
||||
) AS da
|
||||
LEFT JOIN MD_ME_MaterialBase mater ON da.material_id = mater.material_id
|
||||
LEFT JOIN md_pb_classstandard class ON mater.material_type_id = class.class_id
|
||||
LEFT JOIN md_pb_measureunit unit ON unit.measure_unit_id = mater.base_unit_id
|
||||
LEFT JOIN st_ivt_bsrealstorattr stor ON stor.stor_id = da.stor_id
|
||||
LEFT JOIN pdm_bi_subpackagerelation sub ON sub.container_name = da.pcsn
|
||||
WHERE 1=1
|
||||
@@ -127,10 +116,6 @@
|
||||
sub.package_box_sn like 输入.package_box_sn
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.classIds <> ""
|
||||
class.class_id in 输入.classIds
|
||||
ENDOPTION
|
||||
|
||||
ENDSELECT
|
||||
ENDPAGEQUERY
|
||||
ENDIF
|
||||
|
||||
@@ -56,7 +56,7 @@ export default {
|
||||
cookiePass: '',
|
||||
loginForm: {
|
||||
username: 'admin',
|
||||
password: '123456',
|
||||
password: '',
|
||||
rememberMe: false,
|
||||
code: '',
|
||||
uuid: ''
|
||||
|
||||
@@ -36,18 +36,7 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<crudOperation :permission="permission">
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="success"
|
||||
icon="el-icon-position"
|
||||
size="mini"
|
||||
@click="synchronize()"
|
||||
>
|
||||
同步
|
||||
</el-button>
|
||||
</crudOperation>
|
||||
<crudOperation/>
|
||||
<!--表单组件-->
|
||||
<el-dialog
|
||||
:close-on-click-modal="false"
|
||||
@@ -349,15 +338,6 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
synchronize() {
|
||||
this.fullscreenLoading = true
|
||||
crudMaterialbase.synchronize(this.crud.query).then(res => {
|
||||
this.fullscreenLoading = false
|
||||
this.crud.notify('同步成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
}).catch(() => {
|
||||
this.fullscreenLoading = false
|
||||
})
|
||||
},
|
||||
queryClassId() {
|
||||
const param = {
|
||||
'class_idStr': this.class_idStr
|
||||
|
||||
@@ -40,14 +40,6 @@ export function isAlongMaterType(data) {
|
||||
})
|
||||
}
|
||||
|
||||
export function synchronize(data) {
|
||||
return request({
|
||||
url: 'api/Materialbase/synchronize',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function getProductSeries() {
|
||||
return request({
|
||||
url: 'api/Materialbase/getProductSeries',
|
||||
@@ -55,4 +47,4 @@ export function getProductSeries() {
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, getMaterOptType, isAlongMaterType, synchronize, getProductSeries }
|
||||
export default { add, edit, del, getMaterOptType, isAlongMaterType, getProductSeries }
|
||||
|
||||
@@ -241,7 +241,7 @@
|
||||
<el-table-column prop="unit_name" label="计量单位"/>
|
||||
<el-table-column prop="instorage_time" label="入库时间" min-width="150"/>
|
||||
<el-table-column prop="sub_type" label="子卷状态" min-width="150" :formatter="formatSubType"/>
|
||||
<el-table-column prop="stock_age" label="库龄" min-width="100" />
|
||||
<el-table-column prop="stock_age" label="生产时长(天)" min-width="120" />
|
||||
<el-table-column prop="paper_type" label="管件类型" min-width="150"/>
|
||||
<el-table-column prop="paper_code" label="管件编码" min-width="150"/>
|
||||
<el-table-column prop="paper_name" label="管件描述" min-width="250"/>
|
||||
|
||||
@@ -25,11 +25,11 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<!-- <el-col :span="8">
|
||||
<el-form-item label="仓位前缀:">
|
||||
<el-input v-model="formMst.prefix" placeholder="如:91、B21、C31等" size="mini" style="width: 210px" @blur="blurQuery" />
|
||||
<el-input v-model="formMst.prefix" placeholder="如:91、B21、C31等" size="mini" style="width: 210px" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-col>-->
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="生成数量:">
|
||||
@@ -126,10 +126,6 @@ export default {
|
||||
return this.crud.notify('库区不能为空', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
}
|
||||
|
||||
if (this.formMst.prefix === '') {
|
||||
return this.crud.notify('前缀不能为空', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
}
|
||||
|
||||
if (this.formMst.num === '') {
|
||||
return this.crud.notify('数量不能为空', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
}
|
||||
|
||||
@@ -175,7 +175,7 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="remark" label="备注" />
|
||||
<el-table-column prop="update_time" label="修改时间" min-width="150" show-overflow-tooltip />
|
||||
<el-table-column prop="update_time" label="修改时间" min-width="151" show-overflow-tooltip />
|
||||
<el-table-column v-permission="[]" label="操作" width="120px" align="center" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<udOperation
|
||||
|
||||
@@ -174,7 +174,7 @@
|
||||
{{ dict.label.is_used[scope.row.is_used] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="update_time" label="修改时间" show-overflow-tooltip />
|
||||
<el-table-column prop="update_time" label="修改时间" show-overflow-tooltip width="150px;"/>
|
||||
<el-table-column v-permission="[]" label="操作" width="120px" align="center" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<udOperation
|
||||
|
||||
@@ -467,7 +467,7 @@
|
||||
<el-table-column prop="is_child_tz_ok" label="子卷套轴完成" width="100px" :formatter="formatChildName"/>
|
||||
<el-table-column prop="is_child_ps_ok" label="子卷配送完成" width="100px" :formatter="formatChildPsName"/>
|
||||
<el-table-column prop="is_call" label="是否呼叫" width="100px" :formatter="formatChildCallName"/>
|
||||
<el-table-column prop="qzzno" label="气涨轴编码" width="150px"/>
|
||||
<el-table-column prop="qzzno" label="气涨轴编码" width="160px"/>
|
||||
<el-table-column prop="start_time" label="开始时间" width="150px"/>
|
||||
<el-table-column prop="end_time" label="结束时间" width="150px"/>
|
||||
<!-- <el-table-column v-permission="[]" label="操作" width="120px" align="center" fixed="right">
|
||||
|
||||
@@ -199,7 +199,7 @@
|
||||
>
|
||||
仓位同步
|
||||
</el-button>-->
|
||||
<el-button
|
||||
<!-- <el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="success"
|
||||
@@ -208,7 +208,7 @@
|
||||
@click="downdtl"
|
||||
>
|
||||
导出Excel
|
||||
</el-button>
|
||||
</el-button>-->
|
||||
</crudOperation>
|
||||
<!--表单组件-->
|
||||
<el-dialog
|
||||
@@ -427,6 +427,8 @@ export default {
|
||||
crudPoint.getRegion().then(res => {
|
||||
this.regionList = res
|
||||
})
|
||||
this.$set(this.query, 'region_id', '1582991348217286656')
|
||||
this.crud.toQuery()
|
||||
},
|
||||
methods: {
|
||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||
|
||||
@@ -131,17 +131,6 @@
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="单据日期">
|
||||
<el-date-picker
|
||||
v-model="query.createTime"
|
||||
type="daterange"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
:default-time="['00:00:00', '23:59:59']"
|
||||
@change="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="模糊查询">
|
||||
<el-input
|
||||
v-model="query.bill_code"
|
||||
@@ -168,6 +157,17 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="单据日期">
|
||||
<el-date-picker
|
||||
v-model="query.createTime"
|
||||
type="daterange"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
:default-time="['00:00:00', '23:59:59']"
|
||||
@change="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<rrOperation />
|
||||
</el-form>
|
||||
</div>
|
||||
|
||||
@@ -176,14 +176,14 @@
|
||||
<el-link type="warning" @click="crud.toView(scope.row)">{{ scope.row.check_code }}</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip :formatter="stateFormat" width="150" prop="status" label="单据状态" />
|
||||
<el-table-column show-overflow-tooltip :formatter="stateFormat" width="110" prop="status" label="单据状态" />
|
||||
<el-table-column prop="stor_name" label="仓库" width="120" />
|
||||
<el-table-column show-overflow-tooltip prop="check_type" :formatter="bill_typeFormat" width="150" label="业务类型" />
|
||||
<el-table-column show-overflow-tooltip prop="is_nok" :formatter="is_nokFormat" width="150" label="盘点状态" />
|
||||
<el-table-column show-overflow-tooltip :formatter="create_modeFormat" prop="create_mode" label="生成方式" width="150" />
|
||||
<el-table-column label="箱数" align="center" prop="dtl_num" width="150" />
|
||||
<el-table-column label="子卷数" align="center" prop="pcsn_num" width="150" />
|
||||
<el-table-column show-overflow-tooltip prop="input_time" width="170" label="创建日期" />
|
||||
<el-table-column show-overflow-tooltip prop="check_type" :formatter="bill_typeFormat" width="110" label="业务类型" />
|
||||
<el-table-column show-overflow-tooltip prop="is_nok" :formatter="is_nokFormat" width="90" label="盘点状态" />
|
||||
<el-table-column show-overflow-tooltip :formatter="create_modeFormat" prop="create_mode" label="生成方式" width="110" />
|
||||
<el-table-column label="箱数" align="center" prop="dtl_num" width="110" />
|
||||
<el-table-column label="子卷数" align="center" prop="pcsn_num" width="110" />
|
||||
<el-table-column show-overflow-tooltip prop="input_time" width="151" label="创建日期" />
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
|
||||
@@ -142,7 +142,7 @@
|
||||
<el-table-column show-overflow-tooltip width="150" prop="product_description" label="物料描述" />
|
||||
<el-table-column show-overflow-tooltip prop="width" label="幅宽" />
|
||||
<el-table-column show-overflow-tooltip prop="thickness" label="产品厚度" />
|
||||
<el-table-column v-if="crud.status.cu > 0" align="center" label="操作" width="170" fixed="right">
|
||||
<el-table-column v-if="crud.status.cu > 0" align="center" label="操作" width="120" fixed="right">
|
||||
<template scope="scope">
|
||||
<el-button
|
||||
type="danger"
|
||||
|
||||
@@ -225,7 +225,7 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip :formatter="stateFormat" prop="bill_status" label="单据状态" />
|
||||
<el-table-column prop="stor_name" label="仓库" />
|
||||
<el-table-column prop="stor_name" label="仓库" width="100px;"/>
|
||||
<el-table-column show-overflow-tooltip prop="bill_type" min-width="120" :formatter="bill_typeFormat" label="业务类型" />
|
||||
<el-table-column show-overflow-tooltip min-width="120" prop="biz_date" label="业务日期" />
|
||||
<el-table-column show-overflow-tooltip prop="create_mode" :formatter="create_modeFormat" label="生成方式" />
|
||||
@@ -237,9 +237,9 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="交货单" align="center" prop="vbeln" width="150px" />
|
||||
<el-table-column label="备注" align="center" prop="remark" />
|
||||
<el-table-column label="制单人" align="center" prop="input_optname" />
|
||||
<el-table-column label="制单人" align="center" prop="input_optname" width="100px;"/>
|
||||
<el-table-column label="制单时间" align="center" prop="input_time" width="150" />
|
||||
<el-table-column label="修改人" align="center" prop="update_optname" />
|
||||
<el-table-column label="修改人" align="center" prop="update_optname" width="100px;"/>
|
||||
<el-table-column label="修改时间" align="center" prop="update_time" width="150" />
|
||||
<el-table-column label="分配人" align="center" prop="dis_optname" width="140px" />
|
||||
<el-table-column label="分配时间" align="center" prop="dis_time" width="150" />
|
||||
|
||||
@@ -243,7 +243,7 @@
|
||||
<span>{{ scope.row.remark }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column v-if="crud.status.cu > 0" align="center" label="操作" width="160" fixed="right">
|
||||
<el-table-column v-if="crud.status.cu > 0" align="center" label="操作" width="120" fixed="right">
|
||||
<template scope="scope">
|
||||
<el-button type="danger" class="filter-item" size="mini" icon="el-icon-delete" @click.native.prevent="deleteRow(scope.$index, form.tableData)" />
|
||||
</template>
|
||||
|
||||
@@ -143,6 +143,7 @@
|
||||
<el-form-item label="待分配" prop="unassign_qty">
|
||||
<el-input-number
|
||||
v-model="form2.unassign_qty"
|
||||
style="width: 100px;"
|
||||
:controls="false"
|
||||
:precision="3"
|
||||
:min="0"
|
||||
@@ -152,6 +153,7 @@
|
||||
<el-form-item label="已分配" prop="assign_qty">
|
||||
<el-input-number
|
||||
v-model="form2.assign_qty"
|
||||
style="width: 100px;"
|
||||
:controls="false"
|
||||
:precision="3"
|
||||
:min="0"
|
||||
@@ -164,7 +166,7 @@
|
||||
clearable
|
||||
placeholder="请选择"
|
||||
class="filter-item"
|
||||
style="width: 200px;"
|
||||
style="width: 150px;"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in pointList"
|
||||
@@ -177,6 +179,20 @@
|
||||
<el-form-item prop="checked">
|
||||
<el-checkbox v-model="checked">是否异常出库</el-checkbox>
|
||||
</el-form-item>
|
||||
<el-form-item label="超期发货:" prop="is_overdue">
|
||||
<el-radio v-model="rowmst.is_overdue" label="1" :disabled="rowmst.bill_status === '40'" @change="updataIsOverdue">是</el-radio>
|
||||
<el-radio v-model="rowmst.is_overdue" label="0" :disabled="rowmst.bill_status === '40'" @change="updataIsOverdue">否</el-radio>
|
||||
</el-form-item>
|
||||
<!--<el-form-item label="超期数量:" prop="assign_qty" v-if="rowmst.is_overdue === '1'">
|
||||
<el-input-number
|
||||
v-model="overdue_qyt"
|
||||
style="width: 100px;"
|
||||
:controls="false"
|
||||
:precision="3"
|
||||
:min="0"
|
||||
disabled
|
||||
/>
|
||||
</el-form-item>-->
|
||||
</el-form>
|
||||
</div>
|
||||
<span class="crud-opts-right2">
|
||||
@@ -227,6 +243,7 @@
|
||||
style="width: 100%;"
|
||||
max-height="400"
|
||||
size="mini"
|
||||
:row-style="rowStyle"
|
||||
border
|
||||
:highlight-current-row="true"
|
||||
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
||||
@@ -256,11 +273,11 @@
|
||||
<el-table-column show-overflow-tooltip prop="plan_qty" label="出库重量" :formatter="crud.formatNum3" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="struct_code" width="150px" label="仓位编码" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="struct_name" width="150px" label="仓位名称" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="is_overdue" width="150px" label="是否超期" align="center" :formatter="formatOverdue"/>
|
||||
<el-table-column show-overflow-tooltip prop="is_overdue" width="150px" label="是否超期" align="center" :formatter="formatOverdue" />
|
||||
<el-table-column show-overflow-tooltip prop="instorage_time" width="150px" label="入库时间" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="task_code" width="150px" label="任务号" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="point_code" width="150px" label="出库点" align="center" />
|
||||
<el-table-column align="center" label="操作" width="160" fixed="right">
|
||||
<el-table-column align="center" label="操作" width="120" fixed="right">
|
||||
<template scope="scope">
|
||||
<el-button :disabled="tabledisabled(scope.row)" type="danger" class="filter-item" size="mini" icon="el-icon-delete" @click.native.prevent="deleteRow(scope.row)" />
|
||||
</template>
|
||||
@@ -268,7 +285,7 @@
|
||||
</el-table>
|
||||
</el-card>
|
||||
<pointDialog ref="child" :dialog-show.sync="pointshow" :dialog-typedisable="typedisable" :dialog-areatype="areatype" @PointChanged="PointChanged" />
|
||||
<StructIvt :dialog-show.sync="structshow" :stor-id="storId" :open-array="openParam" :rowmst="openRow" @StructIvtClosed="queryTableDtl" />
|
||||
<StructIvt :dialog-show.sync="structshow" :stor-id="storId" :open-array="openParam" :rowmst="openRow" @StructIvtClosed="queryTableDtl2" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
@@ -338,7 +355,8 @@ export default {
|
||||
invtypelist: [],
|
||||
pointList: [],
|
||||
rules: {
|
||||
}
|
||||
},
|
||||
overdue_qyt: 0
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@@ -459,6 +477,7 @@ export default {
|
||||
deleteRow(row) {
|
||||
checkoutbill.oneCancel(row).then(res => {
|
||||
this.queryTableDtl()
|
||||
this.updataIsOverdue()
|
||||
})
|
||||
},
|
||||
handleDtlCurrentChange(current) {
|
||||
@@ -517,6 +536,7 @@ export default {
|
||||
checkoutbill.allDiv(this.mstrow).then(res => {
|
||||
this.crud.notify('分配成功!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
this.queryTableDtl()
|
||||
this.updataIsOverdue()
|
||||
this.loadingAlldiv = false
|
||||
}).catch(() => {
|
||||
this.loadingAlldiv = false
|
||||
@@ -532,6 +552,7 @@ export default {
|
||||
this.mstrow.iostorinvdtl_id = this.currentRow.iostorinvdtl_id
|
||||
checkoutbill.allDivOne(this.mstrow).then(res => {
|
||||
this.queryTableDtl()
|
||||
this.updataIsOverdue()
|
||||
this.loadingAutodiv = false
|
||||
}).catch(() => {
|
||||
this.loadingAutodiv = false
|
||||
@@ -542,6 +563,7 @@ export default {
|
||||
this.loadingAlldiv = true
|
||||
checkoutbill.allCancel(this.mstrow).then(res => {
|
||||
this.queryTableDtl()
|
||||
this.updataIsOverdue()
|
||||
this.loadingAlldiv = false
|
||||
}).catch(() => {
|
||||
this.loadingAlldiv = false
|
||||
@@ -553,6 +575,7 @@ export default {
|
||||
checkoutbill.allCancel(this.currentRow).then(res => {
|
||||
this.queryTableDtl()
|
||||
this.loadingAlldiv = false
|
||||
this.updataIsOverdue()
|
||||
}).catch(() => {
|
||||
this.loadingAlldiv = false
|
||||
})
|
||||
@@ -673,6 +696,10 @@ export default {
|
||||
this.tableDtl = res
|
||||
})
|
||||
},
|
||||
queryTableDtl2() {
|
||||
this.queryTableDtl()
|
||||
this.updataIsOverdue()
|
||||
},
|
||||
queryTableDdis(iostorinvdtl_id) {
|
||||
checkoutbill.getOutBillDis2({ 'iostorinvdtl_id': iostorinvdtl_id, 'bill_status': '01' }).then(res => {
|
||||
this.tabledis = res
|
||||
@@ -689,6 +716,23 @@ export default {
|
||||
return 'background: yellow'
|
||||
}
|
||||
}
|
||||
},
|
||||
rowStyle({ row, rowIndex }) {
|
||||
const stylejson = {}
|
||||
|
||||
if (this.rowmst.is_overdue === '1') {
|
||||
if (row.is_overdue === '1') {
|
||||
stylejson.background = '#f3f071'
|
||||
return stylejson
|
||||
}
|
||||
}
|
||||
},
|
||||
updataIsOverdue() {
|
||||
this.rowmst.iostorinvdtl_id = this.currentRow.iostorinvdtl_id
|
||||
checkoutbill.updataIsOverdue(this.rowmst).then(res => {
|
||||
this.overdue_qyt = res.overdue_qyt
|
||||
this.rowmst = res.mst
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -241,4 +241,11 @@ export function outReturn(data) {
|
||||
data
|
||||
})
|
||||
}
|
||||
export default { add, edit, del, allDiv, allCancel, getOutBillDtl, getOutBillDis, getOutBillDis2, setPoint, oneSetPoint, getOutBillTask, getStructIvt, manualDiv, confirm, issueTask, finishTask, cancleTaskfinish, getInvTypes, paramByCodeType, schAreaType, backConfirm, getOutBillDisDtl, getType, allDivOne, moneySubmit, getDisNum, queryBox, getOutBillTask2, oneCancel, cancelTask, allSetPoint, oneSetPoint2, outReturn }
|
||||
export function updataIsOverdue(data) {
|
||||
return request({
|
||||
url: '/api/checkoutbill/updataIsOverdue',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
export default { add, edit, del, allDiv, allCancel, getOutBillDtl, getOutBillDis, getOutBillDis2, setPoint, oneSetPoint, getOutBillTask, getStructIvt, manualDiv, confirm, issueTask, finishTask, cancleTaskfinish, getInvTypes, paramByCodeType, schAreaType, backConfirm, getOutBillDisDtl, getType, allDivOne, moneySubmit, getDisNum, queryBox, getOutBillTask2, oneCancel, cancelTask, allSetPoint, oneSetPoint2, outReturn, updataIsOverdue }
|
||||
|
||||
@@ -319,6 +319,7 @@
|
||||
<el-table-column show-overflow-tooltip label="交货单号" align="center" prop="vbeln" width="100" />
|
||||
<el-table-column show-overflow-tooltip label="是否回传" align="center" prop="is_upload" width="80" :formatter="formatIsUpload" />
|
||||
<el-table-column show-overflow-tooltip :formatter="create_modeFormat" prop="create_mode" label="生成方式" width="100" />
|
||||
<el-table-column show-overflow-tooltip :formatter="isOverdue" prop="is_overdue" label="是否超期发货" width="120" />
|
||||
<el-table-column show-overflow-tooltip label="备注" align="center" prop="remark" width="100" />
|
||||
<el-table-column show-overflow-tooltip label="制单人" align="center" prop="input_optname" />
|
||||
<el-table-column show-overflow-tooltip label="制单时间" align="center" prop="input_time" width="140" />
|
||||
@@ -375,7 +376,7 @@ export default {
|
||||
},
|
||||
mixins: [presenter(), header(), crud()],
|
||||
// 数据字典
|
||||
dicts: ['io_bill_status', 'ST_CREATE_MODE', 'ST_INV_OUT_TYPE', 'is_upload'],
|
||||
dicts: ['io_bill_status', 'ST_CREATE_MODE', 'ST_INV_OUT_TYPE', 'is_upload', 'IS_OR_NOT'],
|
||||
data() {
|
||||
return {
|
||||
height: document.documentElement.clientHeight - 180 + 'px;',
|
||||
@@ -510,6 +511,9 @@ export default {
|
||||
create_modeFormat(row) {
|
||||
return this.dict.label.ST_CREATE_MODE[row.create_mode]
|
||||
},
|
||||
isOverdue(row) {
|
||||
return this.dict.label.IS_OR_NOT[row.is_overdue]
|
||||
},
|
||||
handleCurrentChange(current) {
|
||||
if (current === null) {
|
||||
this.dis_flag = true
|
||||
|
||||
@@ -129,17 +129,6 @@
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="生产日期">
|
||||
<el-date-picker
|
||||
v-model="query.createTime"
|
||||
type="daterange"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
:default-time="['00:00:00', '23:59:59']"
|
||||
@change="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="客户编码">
|
||||
<el-input
|
||||
@@ -153,6 +142,17 @@
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="生产日期">
|
||||
<el-date-picker
|
||||
v-model="query.createTime"
|
||||
type="daterange"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
:default-time="['00:00:00', '23:59:59']"
|
||||
@change="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否超期">
|
||||
<el-switch
|
||||
v-model="query.is_sid"
|
||||
@@ -213,7 +213,7 @@
|
||||
<el-table-column show-overflow-tooltip prop="date_of_fg_inbound" label="入库日期" :min-width="flexWidth('date_of_fg_inbound',crud.data,'入库日期')" />
|
||||
<el-table-column show-overflow-tooltip prop="box_weight" label="木箱自身重量" :min-width="flexWidth('box_weight',crud.data,'木箱自身重量')" />
|
||||
<el-table-column show-overflow-tooltip prop="quality_guaran_period" label="保质期" :min-width="flexWidth('quality_guaran_period',crud.data,'保质期')" />
|
||||
<el-table-column show-overflow-tooltip prop="un_plan_product_property1" label="子卷的悟性值1" :min-width="flexWidth('un_plan_product_property1',crud.data,'子卷的悟性值1')" />
|
||||
<el-table-column show-overflow-tooltip prop="un_plan_product_property1" label="子卷的悟性值1" width="2100px;" />
|
||||
<el-table-column show-overflow-tooltip prop="un_plan_product_property2" label="子卷的悟性值2" :min-width="flexWidth('un_plan_product_property2',crud.data,'子卷的悟性值2')" />
|
||||
<el-table-column show-overflow-tooltip prop="un_plan_product_property3" label="子卷的悟性值3" :min-width="flexWidth('un_plan_product_property3',crud.data,'子卷的悟性值3')" />
|
||||
<el-table-column show-overflow-tooltip prop="box_type" label="木箱料号" :min-width="flexWidth('box_type',crud.data,'木箱料号')" />
|
||||
|
||||
@@ -96,25 +96,15 @@
|
||||
<el-table ref="table" :cell-style="cellStyleMst" show-summary :summary-method="getSum" :max-height="590" v-loading="crud.loading" :data="crud.data" size="mini" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
|
||||
<el-table-column prop="stor_name" label="仓库"/>
|
||||
<el-table-column prop="sect_date" label="日期" width="100px" />
|
||||
<!-- <el-table-column prop="class_code" label="物料分类编码" width="100px" />-->
|
||||
<!-- <el-table-column prop="class_name" label="物料分类名称" width="100px" />-->
|
||||
<el-table-column prop="material_code" label="物料编码" min-width="150" show-overflow-tooltip/>
|
||||
<el-table-column prop="material_name" label="物料名称" min-width="150" show-overflow-tooltip/>
|
||||
<el-table-column prop="material_model" label="规格/型号" min-width="150" show-overflow-tooltip/>
|
||||
<el-table-column prop="unit_name" label="主单位"/>
|
||||
<el-table-column prop="pcsn" label="批次号" min-width="140" show-overflow-tooltip/>
|
||||
<el-table-column prop="sap_pcsn" label="sap批次" min-width="120" show-overflow-tooltip/>
|
||||
<el-table-column prop="package_box_sn" label="木箱号" width="250px" min-width="120" show-overflow-tooltip/>
|
||||
|
||||
<!-- <el-table-column prop="dept_name" label="所属组织" min-width="120" show-overflow-tooltip/>-->
|
||||
<!-- <el-table-column prop="quality_scode" label="品质类型" :formatter="formatQualityName" />-->
|
||||
<!-- <el-table-column prop="ivt_level" label="质量等级" :formatter="formatIvtName" />-->
|
||||
<!-- <el-table-column prop="is_active" label="是否可用" :formatter="formatIsName" />-->
|
||||
<el-table-column prop="start_num" label="期初主数量" :formatter="crud.formatNum3" width="100px" />
|
||||
<el-table-column prop="in_num" label="入库主数量" :formatter="crud.formatNum3" width="100px" />
|
||||
<el-table-column prop="out_num" label="出库主数量" :formatter="crud.formatNum3" width="100px" />
|
||||
<!-- <el-table-column prop="less_num" label="其他出" :formatter="crud.formatNum3"/>-->
|
||||
<!-- <el-table-column prop="more_num" label="其他入" :formatter="crud.formatNum3"/>-->
|
||||
<el-table-column prop="end_num" label="结存主数量" :formatter="crud.formatNum3" width="100px" />
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
|
||||
Reference in New Issue
Block a user