rev:修改状态标识
This commit is contained in:
@@ -22,11 +22,11 @@ public enum StatusEnum {
|
||||
* 流程相关
|
||||
*/
|
||||
MODEL_STATUS(ForkMap.of("发布", "10",null, "未发布", "30",null)),
|
||||
FLOW_STATUS(ForkMap.of("启动", "10",null, "节点完成", "20",null,"暂停", "30",null,"完成", "90",null)),
|
||||
FLOW_STATUS(ForkMap.of("启动", "10",null, "节点完成", "20",null,"暂停", "30",null,"完成", "80",null)),
|
||||
/**
|
||||
* 单据状态
|
||||
*/
|
||||
FORM_STATUS(ForkMap.of("生成", "10",null,"已分配", "13", null,"执行中", "20",null,"暂停", "30",null,"完成", "90",null,"取消", "100",null)),
|
||||
FORM_STATUS(ForkMap.of("生成", "10",null,"已分配", "13", null,"执行中", "20",null,"暂停", "30",null,"完成", "80",null,"取消", "90",null)),
|
||||
|
||||
/**
|
||||
* 出入库单据类型
|
||||
|
||||
@@ -55,7 +55,7 @@ public class EndDecisionChainer extends DecisionerChain<List> {
|
||||
.set("vehicle_code", startParam.getString("vehicle_code"))
|
||||
.set("lock_type", StatusEnum.LOCK.code("入库锁"))
|
||||
.eq("struct_code", structattr.getStruct_code()));
|
||||
System.out.println("货位绑定成功"+structattr.getStruct_code());
|
||||
System.out.println("货位绑定成功"+structattr.getStruct_code()+"_"+startParam.getString("vehicle_code"));
|
||||
structs.add(structattr.getStruct_code());
|
||||
}else {
|
||||
for (StructattrVechielDto vechielDto : ((List<StructattrVechielDto>) transfers)) {
|
||||
|
||||
@@ -52,7 +52,7 @@ public class InStorageTask extends AbstractTask {
|
||||
throw new BadRequestException("创建任务失败:方法请求参数不能为空");
|
||||
}
|
||||
List<SchBaseTask> list = iSchBaseTaskService.list(new QueryWrapper<SchBaseTask>().eq("vehicle_code", vehicle_code)
|
||||
.ne("status", StatusEnum.FORM_STATUS.code("完成")));
|
||||
.lt("status", StatusEnum.FORM_STATUS.code("完成")));
|
||||
if (!CollectionUtils.isEmpty(list)){
|
||||
throw new BadRequestException("当前载具存在任务:"+list.stream().map(SchBaseTask::getTask_code).collect(Collectors.joining(",")));
|
||||
}
|
||||
|
||||
@@ -25,6 +25,7 @@ import org.nl.wms.flow_manage.flow.framework.process.nodeType.TypeHandler;
|
||||
import org.nl.wms.stor_manage.struct.service.dto.StructattrVechielDto;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Isolation;
|
||||
import org.springframework.transaction.annotation.Propagation;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
@@ -70,23 +71,30 @@ public class DecisionHandler extends TypeHandler<JSONObject,ExecutionEntity<JSON
|
||||
if (auxParam!=null){
|
||||
item_json.putAll(auxParam);
|
||||
}
|
||||
Map<String, String> map = SpringContextHolder.getBean(DecisionHandler.class).dispense(params, item_json);
|
||||
Map<String, String> map = this.dispense(params, item_json);
|
||||
//更新仓位,更新数据
|
||||
System.out.println(flow.getForm_type()+"更新明细id"+item_json.getString("id"));
|
||||
item_json.putAll(map);
|
||||
return t;
|
||||
}
|
||||
@Transactional(propagation= Propagation.REQUIRES_NEW)
|
||||
public Map<String,String> dispense(List<String> params, JSONObject iostorinvdtl) {
|
||||
if (StringUtils.isEmpty(iostorinvdtl.getString("stor_code"))){
|
||||
throw new BadRequestException("出入库策略执行异常:单据确认仓库编码");
|
||||
}
|
||||
Map<String, Decisioner> decisionerMap = SpringContextHolder.getBeansOfType(Decisioner.class);
|
||||
Decisioner decisioner = decisionerMap.get(params.get(0));
|
||||
AtomicReference<Map> atomicResult = new AtomicReference<>();
|
||||
System.out.println("---1--"+Thread.currentThread().getName());
|
||||
RedissonUtils.lock(()->{
|
||||
DecisionerChain<List<String>> start = ChainerService.start(params, iostorinvdtl);
|
||||
Map process = start.process(null);
|
||||
System.out.println("---3--"+Thread.currentThread().getName());
|
||||
Map<String, String> process = SpringContextHolder.getBean(DecisionHandler.class).dispenseTransa(params, iostorinvdtl);
|
||||
atomicResult.set(process);
|
||||
},"入"+iostorinvdtl.getString("stor_code"),2);
|
||||
},decisioner.strategyConfig.getStrategy_type()+iostorinvdtl.getString("stor_code"),10);
|
||||
return atomicResult.get();
|
||||
}
|
||||
@Transactional(propagation= Propagation.REQUIRES_NEW)
|
||||
public Map<String,String> dispenseTransa(List<String> params, JSONObject iostorinvdtl) {
|
||||
DecisionerChain<List<String>> start = ChainerService.start(params, iostorinvdtl);
|
||||
return start.process(null);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -71,6 +71,12 @@ public class StIvtStructattrController {
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
|
||||
/**
|
||||
* 库存查看
|
||||
* @param query
|
||||
* @param page
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/getStructIvt")
|
||||
public ResponseEntity<Object> getStructIvt(StructattrQuery query, PageQuery page) {
|
||||
return new ResponseEntity<>(structattrService.getStructIvt(query,page), HttpStatus.OK);
|
||||
|
||||
@@ -108,9 +108,12 @@
|
||||
struct.sect_code,
|
||||
struct.stor_code,
|
||||
struct.vehicle_code,
|
||||
struct.update_time,
|
||||
struct.lock_type,
|
||||
vm.pcsn,
|
||||
vm.qty,
|
||||
vm.frozen_qty,
|
||||
vm.unit_id,
|
||||
vm.parent_vehicle_code,
|
||||
material.material_code,
|
||||
material.material_name
|
||||
|
||||
Reference in New Issue
Block a user