add:库存变动日志
This commit is contained in:
@@ -36,7 +36,10 @@ public abstract class AbstractTask {
|
||||
}
|
||||
|
||||
public abstract void updateStatus(JSONObject data);
|
||||
|
||||
public void abstractFinish(JSONObject data){
|
||||
log.info(this.getClass().getName()+"------执行任务完成方法------");
|
||||
this.finish(data);
|
||||
};
|
||||
public abstract void finish(JSONObject data);
|
||||
|
||||
public abstract void cancel(JSONObject data);
|
||||
|
||||
@@ -2,6 +2,7 @@ package org.nl.wms.flow_manage.flow.service.classprocessimpl;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import lombok.SneakyThrows;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.nl.common.domain.exception.BadRequestException;
|
||||
|
||||
@@ -32,6 +33,7 @@ import java.util.Map;
|
||||
* 如果没change_qty则取载具当前qty,start:为负,end为正
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class StorageChangesProcessHandler implements ClassProcess {
|
||||
|
||||
private static List<String> Base_Fields = ListOf.of("start_struct_code","end_struct_code","change_qty");
|
||||
@@ -48,10 +50,11 @@ public class StorageChangesProcessHandler implements ClassProcess {
|
||||
if (StringUtils.isEmpty(vehicle_code)){
|
||||
throw new BadRequestException("库存变动失败:请求参数载具编码不能为空");
|
||||
}
|
||||
log.info("执行库存变动:form_type:{}",form_type);
|
||||
if (form_type.equals("sch_base_task")){
|
||||
String handleClass = from.getString("handle_class");
|
||||
AbstractTask bean = (AbstractTask)SpringContextHolder.getBean(Class.forName(handleClass));
|
||||
bean.finish(from);
|
||||
bean.abstractFinish(from);
|
||||
}else {
|
||||
if (StringUtils.isEmpty(param.getString("task_type"))){
|
||||
throw new BadRequestException("库存变动失败:单据变动库存时需要配置task_type");
|
||||
|
||||
Reference in New Issue
Block a user