Merge branch 'master' of http://121.40.234.130:8899/root/hl_one
This commit is contained in:
@@ -86,4 +86,40 @@ public class AcsUtil {
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public static JSONObject notifyAcs(String api, JSONObject list) {
|
||||
log.info("下发ACS参数----------------------------------------+"+api+",---"+list.toString());
|
||||
//判断是否连接ACS系统
|
||||
String isConnect = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("IS_CONNECT_ACS").getValue();
|
||||
JSONObject result = new JSONObject();
|
||||
if (StrUtil.equals(StatusEnum.STATUS_FLASE.getCode(), isConnect)) {
|
||||
result.put("status", HttpStatus.OK.value());
|
||||
result.put("message", "下发成功,但未连接ACS!");
|
||||
result.put("data", new JSONObject());
|
||||
return result;
|
||||
}
|
||||
|
||||
//ACS地址:127.0.0.1:8010
|
||||
String acsUrl = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("acs_url").getValue();
|
||||
|
||||
String url = acsUrl + api;
|
||||
try {
|
||||
String resultMsg = HttpRequest.post(url)
|
||||
.body(String.valueOf(list))
|
||||
.execute().body();
|
||||
result = JSONObject.parseObject(resultMsg);
|
||||
log.info("ACS相应参数----------------------------------------+"+api+",---"+result.toString());
|
||||
|
||||
} catch (Exception e) {
|
||||
log.info("ACS反馈异常----------------------------------------+"+api+",---"+e.getMessage());
|
||||
String msg = e.getMessage();
|
||||
//ConnectException: Connection refused: connect
|
||||
//网络不通
|
||||
result.put("status", HttpStatus.BAD_REQUEST);
|
||||
result.put("message", "网络不通,操作失败!");
|
||||
result.put("data", new JSONObject());
|
||||
result.put("error", msg);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -103,7 +103,7 @@ public class AcsToWmsController {
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/feedcachelineVe")
|
||||
@PostMapping("/feedCacheLineBarcodes")
|
||||
@Log("向wms反馈缓存载具信息")
|
||||
@ApiOperation("向wms反馈缓存载具信息")
|
||||
@SaIgnore
|
||||
|
||||
@@ -57,4 +57,11 @@ public interface WmsToAcsService {
|
||||
* @return
|
||||
*/
|
||||
Map<String, Object> replaceDevice(JSONArray arr);
|
||||
|
||||
/**
|
||||
* 变更设备电气信号
|
||||
* @param arr
|
||||
* @return
|
||||
*/
|
||||
Map<String, Object> action(JSONArray arr);
|
||||
}
|
||||
|
||||
@@ -283,7 +283,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService{
|
||||
String vehicleCode = collect[i];
|
||||
cachePosition.put("vehicle_code",vehicleCode.equals("0")?"": vehicleCode);
|
||||
if (vehicleCode.equals("99999")){
|
||||
cachePosition.put("err_type", StatusEnum.CACHE_POINT_SCAN_ERROR.getCode());
|
||||
cachePosition.put("err_type", StatusEnum.CACHE_POINT_ERROR.getCode());
|
||||
}
|
||||
positionTab.update(cachePosition,"position_code = '"+cachePosition.getString("position_code")+"'");
|
||||
}
|
||||
|
||||
@@ -97,4 +97,10 @@ public class WmsToAcsServiceImpl implements WmsToAcsService{
|
||||
return AcsUtil.notifyAcs(api, arr);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> action(JSONArray arr) {
|
||||
String api = "api/wms/action";
|
||||
return AcsUtil.notifyAcs(api, arr);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -145,7 +145,7 @@ public class CacheLineHandController {
|
||||
@PostMapping("/cacheLineOutBoxExceptionQuery")
|
||||
@Log("缓存线出箱异常-查询")
|
||||
@ApiOperation("缓存线出箱异常-查询")
|
||||
public ResponseEntity<JSONArray> cacheLineOutBoxExceptionQuery(@RequestBody JSONObject param) {
|
||||
public ResponseEntity<Object> cacheLineOutBoxExceptionQuery(@RequestBody JSONObject param) {
|
||||
log.info("海亮缓存线手持服务 [缓存线出箱异常-查询] 接口被请求, 请求参数-{}", param);
|
||||
//参数校验
|
||||
if (StringUtils.isBlank(param.getString("wcsdevice_code"))) {
|
||||
@@ -240,6 +240,15 @@ public class CacheLineHandController {
|
||||
return new ResponseEntity<>(cacheLineHandService.deleteBox(param), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/check")
|
||||
@Log("修改缓存线盘点状态")
|
||||
@ApiOperation("修改缓存线盘点状态")
|
||||
public ResponseEntity<Object> check(@RequestBody JSONObject param) {
|
||||
log.info("海亮缓存线手持服务 [盘点] 接口被请求, 请求参数-{}", param);
|
||||
cacheLineHandService.check(param);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/agvInBoxExceptionQuery")
|
||||
@Log("AGV入箱异常-查询")
|
||||
@ApiOperation("AGV入箱异常-查询")
|
||||
@@ -274,15 +283,6 @@ public class CacheLineHandController {
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/setBlankPos")
|
||||
@Log("设置缓存线货位为空位置")
|
||||
@ApiOperation("设置缓存线货位为空位置")
|
||||
public ResponseEntity<Object> setBlankPos(@RequestBody JSONObject param) {
|
||||
log.info("海亮缓存线手持服务 [设置缓存线货位为空位置] 接口被请求, 请求参数-{}", param);
|
||||
cacheLineHandService.setBlankPos(param);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/cacheLineExcepOpt")
|
||||
@Log("缓存线异常处理")
|
||||
@ApiOperation("缓存线异常处理")
|
||||
|
||||
@@ -164,7 +164,7 @@ public interface CacheLineHandService{
|
||||
* @author gbx
|
||||
* @date 2023/3/24
|
||||
*/
|
||||
CommonResult<Integer> cacheLineOutBoxExceptionConfirm(JSONObject param);
|
||||
JSONObject cacheLineOutBoxExceptionConfirm(JSONObject param);
|
||||
|
||||
/**
|
||||
* 空箱初始化--出入空箱
|
||||
@@ -184,7 +184,7 @@ public interface CacheLineHandService{
|
||||
* @author gbx
|
||||
* @date 2023/3/24
|
||||
*/
|
||||
CommonResult<Integer> setfullBox(JSONObject param);
|
||||
JSONObject setfullBox(JSONObject param);
|
||||
|
||||
/**
|
||||
* 设置空框
|
||||
@@ -233,15 +233,6 @@ public interface CacheLineHandService{
|
||||
*/
|
||||
void agvOutBoxExceptionConfirm(JSONObject param);
|
||||
|
||||
/**
|
||||
* 设置缓存线货位为空位置
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @author gbx
|
||||
* @date 2023/3/24
|
||||
*/
|
||||
void setBlankPos(JSONObject param);
|
||||
|
||||
/**
|
||||
* 缓存线出箱异常-查询
|
||||
*
|
||||
@@ -250,7 +241,7 @@ public interface CacheLineHandService{
|
||||
* @author gbx
|
||||
* @date 2023/3/24
|
||||
*/
|
||||
JSONArray cacheLineOutBoxExceptionQuery(JSONObject param);
|
||||
List<Map> cacheLineOutBoxExceptionQuery(JSONObject param);
|
||||
|
||||
/**
|
||||
* 缓存线异常处理
|
||||
@@ -260,7 +251,7 @@ public interface CacheLineHandService{
|
||||
* @author gbx
|
||||
* @date 2023/3/24
|
||||
*/
|
||||
CommonResult<JSONObject> cacheLineExcepOpt(JSONObject param);
|
||||
JSONObject cacheLineExcepOpt(JSONObject param);
|
||||
|
||||
/**
|
||||
* 倒料操作
|
||||
@@ -301,4 +292,11 @@ public interface CacheLineHandService{
|
||||
* @param param
|
||||
*/
|
||||
JSONObject deleteBox(JSONObject param);
|
||||
|
||||
/**
|
||||
* 删除箱子
|
||||
*
|
||||
* @param param
|
||||
*/
|
||||
void check(JSONObject param);
|
||||
}
|
||||
|
||||
@@ -24,12 +24,21 @@ import org.nl.modules.wql.WQL;
|
||||
import org.nl.modules.wql.core.bean.WQLObject;
|
||||
import org.nl.modules.wql.util.WqlUtil;
|
||||
import org.nl.wms.ext.acs.service.WmsToAcsService;
|
||||
import org.nl.wms.masterdata_manage.service.material.IMdMeMaterialbaseService;
|
||||
import org.nl.wms.masterdata_manage.service.material.dao.MdMeMaterialbase;
|
||||
import org.nl.wms.pda_manage.pda.dto.MaterialDto;
|
||||
import org.nl.wms.pda_manage.pda.service.CacheLineHandService;
|
||||
import org.nl.wms.product_manage.service.device.IPdmBiDeviceService;
|
||||
import org.nl.wms.product_manage.service.device.dao.PdmBiDevice;
|
||||
import org.nl.wms.scheduler_manage.service.cacheline.ISchCachelinePositionService;
|
||||
import org.nl.wms.scheduler_manage.service.cacheline.ISchCachelineVehilematerialService;
|
||||
import org.nl.wms.scheduler_manage.service.cacheline.dao.SchCachelinePosition;
|
||||
import org.nl.wms.scheduler_manage.service.cacheline.dao.SchCachelineVehilematerial;
|
||||
import org.nl.wms.scheduler_manage.service.cacheline.dao.mapper.SchCachelinePositionMapper;
|
||||
import org.nl.wms.scheduler_manage.service.cacheline.dao.mapper.SchCachelineVehilematerialMapper;
|
||||
import org.nl.wms.scheduler_manage.service.task.ISchBaseTaskService;
|
||||
import org.nl.wms.scheduler_manage.service.task.dao.SchBaseTask;
|
||||
import org.nl.wms.scheduler_manage.service.task.dao.mapper.SchBaseTaskMapper;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.scheduling.annotation.Async;
|
||||
@@ -37,8 +46,8 @@ import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.concurrent.*;
|
||||
import java.util.concurrent.atomic.AtomicReference;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
import java.util.concurrent.ThreadPoolExecutor;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
@@ -64,6 +73,16 @@ public class CacheLineHandServiceImpl implements CacheLineHandService {
|
||||
private SchCachelineVehilematerialMapper vehilematerialMapper;
|
||||
@Autowired
|
||||
private SchCachelinePositionMapper positionMapper;
|
||||
@Autowired
|
||||
private SchBaseTaskMapper taskMapper;
|
||||
@Autowired
|
||||
private ISchCachelinePositionService positionService;
|
||||
@Autowired
|
||||
private ISchCachelineVehilematerialService vehilematerialService;
|
||||
@Autowired
|
||||
private IMdMeMaterialbaseService materialbaseService;
|
||||
@Autowired
|
||||
private ISchBaseTaskService taskService;
|
||||
|
||||
@Override
|
||||
public JSONArray dropdownListQuery(String param, String type) {
|
||||
@@ -76,6 +95,7 @@ public class CacheLineHandServiceImpl implements CacheLineHandService {
|
||||
return WQL.getWO("PDA_QUERY").addParam("flag", "6").addParam("condition", param).process().getResultJSONArray(0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public JSONArray appUpdate() {
|
||||
return WQL.getWO("PDA_QUERY").addParam("flag", "11").process().getResultJSONArray(0);
|
||||
}
|
||||
@@ -371,64 +391,56 @@ public class CacheLineHandServiceImpl implements CacheLineHandService {
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public CommonResult<Integer> setfullBox(JSONObject param) {
|
||||
public JSONObject setfullBox(JSONObject param) {
|
||||
//物料ID
|
||||
String semimanufactures_uuid = param.getString("material_uuid");
|
||||
// 缓存线位置编码
|
||||
String position_code = param.getString("position_code");
|
||||
// 料箱码
|
||||
String vehicle_code = param.getString("vehicle_code");
|
||||
//工序
|
||||
// String workprocedure_code = param.getString("workprocedure_code");
|
||||
// 缓存线
|
||||
String cacheLine_code = param.getString("wcsdevice_code");
|
||||
String weight = param.getString("weight");
|
||||
String quantity = param.getString("quantity");
|
||||
|
||||
if (StringUtils.isBlank(quantity) || param.getInteger("quantity") <= 0) {
|
||||
throw new BadRequestException("数量必须大于0!");
|
||||
}
|
||||
//缓存线位置表
|
||||
WQLObject positionTab = WQLObject.getWQLObject("sch_cacheline_position");
|
||||
// 缓存线位置
|
||||
JSONObject vehiobj = positionTab.query("position_code = '" + position_code + "'").uniqueResult(0);
|
||||
if (vehiobj == null) {
|
||||
|
||||
SchCachelinePosition vehiobj = positionService.getOne(new QueryWrapper<SchCachelinePosition>().eq("position_code", position_code));
|
||||
|
||||
if (ObjectUtil.isEmpty(vehiobj)) {
|
||||
throw new BadRequestException("位置不存在,设置有误!");
|
||||
}
|
||||
//工序表
|
||||
//WQLObject wpTab = WQLObject.getWQLObject("pdm_bi_workprocedure");
|
||||
//物料表
|
||||
WQLObject meTab = WQLObject.getWQLObject("md_me_materialbase");
|
||||
// 查询工序信息
|
||||
// JSONObject wpObj = wpTab.query("workprocedure_code = '" + workprocedure_code + "'").uniqueResult(0);
|
||||
// if(ObjectUtil.isEmpty(wpObj)) {
|
||||
// throw new BadRequestException("工序查询错误,请检查工序");
|
||||
// }
|
||||
JSONObject meObj = meTab.query("material_id = '" + semimanufactures_uuid + "'").uniqueResult(0);
|
||||
if (ObjectUtil.isEmpty(meObj)) {
|
||||
|
||||
MdMeMaterialbase mater = materialbaseService.getOne(new QueryWrapper<MdMeMaterialbase>().eq("material_id", semimanufactures_uuid));
|
||||
if (ObjectUtil.isEmpty(mater)) {
|
||||
throw new BadRequestException("物料查询错误,请检查物料");
|
||||
}
|
||||
vehiobj.put("vehicle_code", vehicle_code);
|
||||
|
||||
//2.缓存线位置通过扫码绑定料箱条码
|
||||
positionTab.update(vehiobj, "position_code = '" + position_code + "'");
|
||||
// 缓存线载具物料表
|
||||
WQLObject ivtTab = WQLObject.getWQLObject("sch_cacheline_vehilematerial");
|
||||
vehiobj.setVehicle_code(vehicle_code);
|
||||
positionService.updateById(vehiobj);
|
||||
|
||||
//3.先删除料箱的所有关联信息,包括物料,工序,生产区域
|
||||
ivtTab.delete("vehicle_code = '" + vehicle_code + "'");
|
||||
// 物料信息
|
||||
HashMap<String, String> json = new HashMap<>();
|
||||
vehilematerialService.removeByMap(MapOf.of("vehicle_code", vehicle_code));
|
||||
|
||||
JSONObject json = new JSONObject();
|
||||
json.put("vehmaterial_id", IdUtil.getStringId());
|
||||
json.put("vehicle_code", vehicle_code);
|
||||
json.put("cacheLine_code", cacheLine_code);
|
||||
json.put("material_id", meObj.getString("material_id"));
|
||||
json.put("material_id", mater.getMaterial_id());
|
||||
json.put("weight", weight);
|
||||
json.put("quantity", quantity);
|
||||
// json.put("workprocedure_code", wpObj.getString("workprocedure_code"));
|
||||
// json.put("workprocedure_name", wpObj.getString("workprocedure_name"));
|
||||
//有箱有料
|
||||
json.put("vehicle_status", StatusEnum.CACHE_VEL_FULL.getCode());
|
||||
json.put("create_time", DateUtil.now());
|
||||
//4.重新新建该缓存线位置上的料箱为满箱及所属工序,生产区域等信息
|
||||
return RestBusinessTemplate.execute(() -> ivtTab.insert(json).getSucess());
|
||||
vehilematerialService.save(json.toJavaObject(SchCachelineVehilematerial.class));
|
||||
|
||||
JSONObject res = new JSONObject();
|
||||
res.put("message", "设置成功");
|
||||
return res;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -440,19 +452,23 @@ public class CacheLineHandServiceImpl implements CacheLineHandService {
|
||||
String vehicle_code = param.getString("vehicle_code");
|
||||
// 缓存线
|
||||
String wcsdevice_code = param.getString("wcsdevice_code");
|
||||
// 缓存线载具物料表
|
||||
WQLObject ivtTab = WQLObject.getWQLObject("sch_cacheline_vehilematerial");
|
||||
// 缓存线位置表
|
||||
WQLObject positionTab = WQLObject.getWQLObject("sch_cacheline_position");
|
||||
JSONObject vehiobj = positionTab.query("position_code = '" + position_code + "'").uniqueResult(0);
|
||||
if (vehiobj == null) {
|
||||
|
||||
|
||||
SchCachelinePosition vehiobj = positionService.getOne(new QueryWrapper<SchCachelinePosition>().eq("position_code", position_code));
|
||||
if (ObjectUtil.isEmpty(vehiobj)) {
|
||||
throw new BadRequestException("位置不存在,设置有误!");
|
||||
}
|
||||
|
||||
//1.缓存线位置通过扫码绑定料箱条码
|
||||
vehiobj.put("vehicle_code", vehicle_code);
|
||||
positionTab.update(vehiobj, "position_code = '" + position_code + "'");
|
||||
vehiobj.setVehicle_code(vehicle_code);
|
||||
positionService.updateById(vehiobj);
|
||||
|
||||
|
||||
//2.先删除料箱的所有关联信息,包括物料,工序,生产区域
|
||||
ivtTab.delete("vehicle_code = '" + vehicle_code + "'");
|
||||
vehilematerialService.removeByMap(MapOf.of("vehicle_code", vehicle_code));
|
||||
|
||||
|
||||
// 3.重新新建该缓存线位置上的料箱为空箱子,是空料箱没有放物料等其他信息
|
||||
JSONObject json = new JSONObject();
|
||||
json.put("vehmaterial_id", IdUtil.getStringId());
|
||||
json.put("vehicle_code", vehicle_code);
|
||||
@@ -464,30 +480,13 @@ public class CacheLineHandServiceImpl implements CacheLineHandService {
|
||||
json.put("workprocedure_code", "");
|
||||
json.put("workprocedure_name", "");
|
||||
json.put("create_time", DateUtil.now());
|
||||
// 3.重新新建该缓存线位置上的料箱为空箱子,是空料箱没有放物料等其他信息
|
||||
ivtTab.insert(json);
|
||||
vehilematerialService.save(json.toJavaObject(SchCachelineVehilematerial.class));
|
||||
|
||||
JSONObject res = new JSONObject();
|
||||
res.put("message", "设置成功");
|
||||
return res;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setBlankPos(JSONObject param) {
|
||||
// 层数
|
||||
String layer_num = param.getString("layer_num");
|
||||
// 顺序号
|
||||
String seat_order_num = param.getString("seat_order_num");
|
||||
// 缓存线编码
|
||||
String wcsdevice_code = param.getString("wcsdevice_code");
|
||||
// 缓存线位置表
|
||||
WQLObject positionTab = WQLObject.getWQLObject("sch_cacheline_position");
|
||||
JSONObject json = positionTab.query("order_no = " + seat_order_num + " and layer_num = " + layer_num + " and cacheLine_code like '%" + wcsdevice_code + "%'").uniqueResult(0);
|
||||
// 状态设置为空位
|
||||
json.put("is_empty", "1");
|
||||
json.put("vehicle_code", "");
|
||||
positionTab.update(json);
|
||||
}
|
||||
|
||||
/**
|
||||
* 出入空箱,出入类型 inOut_type 1 入空箱 2 出空箱 缓存线编码 wcsdevice_code 料箱码 vehicle_code
|
||||
*
|
||||
@@ -546,26 +545,27 @@ public class CacheLineHandServiceImpl implements CacheLineHandService {
|
||||
* 缓存线位置编码 position_code
|
||||
*/
|
||||
@Override
|
||||
public JSONArray cacheLineOutBoxExceptionQuery(JSONObject param) {
|
||||
public List<Map> cacheLineOutBoxExceptionQuery(JSONObject param) {
|
||||
String wcsdevice_code = param.getString("wcsdevice_code");
|
||||
String position_code = param.getString("position_code");
|
||||
//根据缓存线编码和缓存线点位查找任务ID
|
||||
JSONObject posiObj = WQLObject.getWQLObject("sch_cacheline_position").query("cacheLine_code = '" + wcsdevice_code + "' and position_code = '" + position_code + "'").uniqueResult(0);
|
||||
|
||||
SchCachelinePosition cachelinePosition = positionService.getOne(new QueryWrapper<SchCachelinePosition>().eq("cacheLine_code", wcsdevice_code).eq("position_code", position_code));
|
||||
//查不到点位信息
|
||||
if (null == posiObj) {
|
||||
if (ObjectUtil.isEmpty(cachelinePosition)) {
|
||||
throw new BadRequestException("未找到该缓存线的点位信息!");
|
||||
}
|
||||
//查不到任务信息
|
||||
if (StringUtils.isBlank(posiObj.getString("task_code"))) {
|
||||
if (StrUtil.isEmpty(cachelinePosition.getTask_code())) {
|
||||
throw new BadRequestException("未找到该缓存线的点位的任务信息!");
|
||||
}
|
||||
JSONArray jsonArray = WQL.getWO("PDA_QUERY").addParam("flag", "10").addParam("task_code", posiObj.getString("task_code")).process().getResultJSONArray(0);
|
||||
//JSONArray jsonArray = WQL.getWO("PDA_QUERY").addParam("flag", "10").addParam("task_code", posiObj.getString("task_code")).process().getResultJSONArray(0);
|
||||
List<Map> task_list = taskMapper.getTaskInfo(MapOf.of("task_code", cachelinePosition.getTask_code()));
|
||||
//缓存线编码
|
||||
for (int i = 0; i < jsonArray.size(); i++) {
|
||||
JSONObject row = jsonArray.getJSONObject(i);
|
||||
row.put("wcsdevice_code", wcsdevice_code);
|
||||
}
|
||||
return jsonArray;
|
||||
task_list.forEach(task -> {
|
||||
task.put("wcsdevice_code", wcsdevice_code);
|
||||
});
|
||||
return task_list;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -576,54 +576,53 @@ public class CacheLineHandServiceImpl implements CacheLineHandService {
|
||||
* 料箱码 vehicle_code
|
||||
*/
|
||||
@Override
|
||||
public CommonResult<Integer> cacheLineOutBoxExceptionConfirm(JSONObject param) {
|
||||
public JSONObject cacheLineOutBoxExceptionConfirm(JSONObject param) {
|
||||
String inOut_type = param.getString("inOut_type");
|
||||
String cacheLine_code = param.getString("wcsdevice_code");
|
||||
String position_code = param.getString("position_code");
|
||||
String vehicle_code = param.getString("vehicle_code");
|
||||
//缓存线位置表
|
||||
WQLObject positionTab = WQLObject.getWQLObject("sch_cacheline_position");
|
||||
// 缓存线载具物料表
|
||||
WQLObject ivtTab = WQLObject.getWQLObject("sch_cacheline_vehilematerial");
|
||||
|
||||
//1.确定缓存线点位
|
||||
JSONObject vehiobj = positionTab.query("position_code = '" + position_code + "' and cacheLine_code = '" + cacheLine_code + "'").uniqueResult(0);
|
||||
SchCachelinePosition vehiobj = positionService.getOne(new QueryWrapper<SchCachelinePosition>().eq("position_code", position_code));
|
||||
|
||||
//2.绑定新料箱条码(入满箱或者入空箱),设置缓存线点位不为空
|
||||
vehiobj.put("vehicle_code", vehicle_code);
|
||||
vehiobj.put("is_empty", "0");
|
||||
//非雪花算法生产的ID为主键数据更新下需要拼接条件
|
||||
positionTab.update(vehiobj, "position_code = '" + position_code + "'");
|
||||
vehiobj.setVehicle_code(vehicle_code);
|
||||
vehiobj.setIs_empty("0");
|
||||
positionService.updateById(vehiobj);
|
||||
|
||||
//3.删除入料箱之前的所有关联信息,包括物料,工序,生产区域
|
||||
ivtTab.delete("vehicle_code = '" + vehicle_code + "'");
|
||||
vehilematerialService.removeByMap(MapOf.of("vehicle_code", vehicle_code));
|
||||
|
||||
//4.初始化料箱
|
||||
HashMap<String, String> json = new HashMap<>();
|
||||
JSONObject json = new JSONObject();
|
||||
json.put("vehicle_code", vehicle_code);
|
||||
json.put("cacheLine_code", cacheLine_code);
|
||||
json.put("vehmaterial_id", IdUtil.getStringId());
|
||||
json.put("create_time", DateUtil.now());
|
||||
|
||||
// 出空箱入满箱扫码异常
|
||||
if (StatusEnum.OUT_VEHICLE.getCode().equals(inOut_type)) {
|
||||
//5.通过缓存线位置表当前执行任务id,获取任务信息中的物料信息
|
||||
JSONObject positionInfo = positionTab.query("vehicle_code = '" + vehicle_code + "'").uniqueResult(0);
|
||||
SchCachelinePosition positionInfo = positionService.getOne(new QueryWrapper<SchCachelinePosition>().eq("vehicle_code", vehicle_code));
|
||||
//查不到点位信息
|
||||
if (null == positionInfo) {
|
||||
if (ObjectUtil.isEmpty(positionInfo)) {
|
||||
throw new BadRequestException("未找到该缓存线的点位信息!");
|
||||
}
|
||||
//获取当前任务信息
|
||||
JSONObject instructObj = WQLObject.getWQLObject("sch_base_task").query("task_code = '" + positionInfo.getString("task_code") + "'").uniqueResult(0);
|
||||
SchBaseTask instructObj = taskService.getOne(new QueryWrapper<SchBaseTask>().eq("task_code", positionInfo.getTask_code()));
|
||||
//查不到点位信息
|
||||
if (null == instructObj) {
|
||||
if (ObjectUtil.isEmpty(instructObj)) {
|
||||
throw new BadRequestException("未找到该任务信息!");
|
||||
}
|
||||
//获取物料信息
|
||||
JSONObject meObj = WQLObject.getWQLObject("md_me_materialbase").query("material_id = '" + instructObj.get("material_id") + "'").uniqueResult(0);
|
||||
//查不到点位信息
|
||||
if (null == meObj) {
|
||||
throw new BadRequestException("未找到该物料信息!");
|
||||
MdMeMaterialbase mater = materialbaseService.getOne(new QueryWrapper<MdMeMaterialbase>().eq("material_id", instructObj.getMaterial_id()));
|
||||
if (ObjectUtil.isEmpty(mater)) {
|
||||
throw new BadRequestException("物料查询错误,请检查物料");
|
||||
}
|
||||
//6.重新新建该缓存线位置上的料箱为满箱及所属工序,生产区域等信息
|
||||
json.put("material_id", meObj.getString("material_id"));
|
||||
json.put("quantity", instructObj.getString("material_qty"));
|
||||
json.put("product_area", instructObj.getString("product_area"));
|
||||
json.put("material_id", mater.getMaterial_id());
|
||||
json.put("quantity", instructObj.getMaterial_qty());
|
||||
json.put("product_area", instructObj.getProduct_area());
|
||||
json.put("vehicle_status", StatusEnum.CACHE_VEL_EMT.getCode());
|
||||
}
|
||||
// 出满箱入空箱
|
||||
@@ -638,7 +637,12 @@ public class CacheLineHandServiceImpl implements CacheLineHandService {
|
||||
json.put("workprocedure_name", "");
|
||||
json.put("product_area", "");
|
||||
}
|
||||
return RestBusinessTemplate.execute(() -> ivtTab.insert(json).getSucess());
|
||||
|
||||
vehilematerialService.save(json.toJavaObject(SchCachelineVehilematerial.class));
|
||||
|
||||
JSONObject res = new JSONObject();
|
||||
res.put("message", "设置成功");
|
||||
return res;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -673,12 +677,11 @@ public class CacheLineHandServiceImpl implements CacheLineHandService {
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
// 1 扫码异常-入箱扫码 2 出箱扫码
|
||||
jsonObject.put("type", type);
|
||||
jsonObject.put("position_code", position_code);
|
||||
// jsonObject.put("position_code", position_code);
|
||||
jsonObject.put("device_code", device_code);
|
||||
jsonObject.put("vehicle_code", vehicle_code);
|
||||
jsonArray.add(jsonObject);
|
||||
try {
|
||||
return RestBusinessTemplate.execute(() -> AcsUtil.notifyAcs("api/wms/issuedBarcode", jsonArray));
|
||||
return RestBusinessTemplate.execute(() -> AcsUtil.notifyAcs("api/wms/issuedBarcode", jsonObject));
|
||||
} catch (NullPointerException e) {
|
||||
throw new BadRequestException(e.toString());
|
||||
}
|
||||
@@ -689,27 +692,19 @@ public class CacheLineHandServiceImpl implements CacheLineHandService {
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public CommonResult<JSONObject> cacheLineExcepOpt(JSONObject param) {
|
||||
public JSONObject cacheLineExcepOpt(JSONObject param) {
|
||||
// 缓存线编码
|
||||
String wcsdevice_code = param.getString("wcsdevice_code");
|
||||
// opt_type 1-暂停、2-启动,默认为1暂停
|
||||
String type = StatusEnum.PAUSE_CACHELINE.getCode();
|
||||
String opt_type = param.getString("opt_type");
|
||||
if (StatusEnum.START_CACHELINE.getCode().equals(opt_type)) {
|
||||
type = "0";
|
||||
}
|
||||
JSONArray jsonArray = new JSONArray();
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
//下发接收的,恢复是0,暂停是1
|
||||
jsonObject.put("type", type);
|
||||
jsonObject.put("type", opt_type);
|
||||
//缓存线编码
|
||||
jsonObject.put("wcsdevice_code", wcsdevice_code);
|
||||
jsonArray.add(jsonObject);
|
||||
try {
|
||||
return RestBusinessTemplate.execute(() -> AcsUtil.notifyAcs("api/wms/puaseCacheLine", jsonArray));
|
||||
} catch (NullPointerException e) {
|
||||
throw new BadRequestException(e.toString());
|
||||
}
|
||||
jsonObject.put("device_code", wcsdevice_code);
|
||||
AcsUtil.notifyAcs("api/wms/puaseCacheLine", jsonObject);
|
||||
JSONObject result = new JSONObject();
|
||||
result.put("message", "操作成功!");
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -873,12 +868,50 @@ public class CacheLineHandServiceImpl implements CacheLineHandService {
|
||||
public JSONObject deleteBox(JSONObject param) {
|
||||
JSONObject res = new JSONObject();
|
||||
res.put("message", "删除失败");
|
||||
WQLObject cvTab = WQLObject.getWQLObject("SCH_CacheLine_VehileMaterial");
|
||||
String vehicleCode = param.getString("vehicle_code");
|
||||
String position_code = param.getString("position_code");
|
||||
if (ObjectUtil.isNotEmpty(vehicleCode)) {
|
||||
cvTab.delete("vehicle_code = '" + vehicleCode + "'");
|
||||
//删除载具物料表
|
||||
vehilematerialService.removeByMap(MapOf.of("vehicle_code", vehicleCode));
|
||||
|
||||
//维护点位的载具字段
|
||||
SchCachelinePosition vehiobj = positionService.getOne(new QueryWrapper<SchCachelinePosition>().eq("position_code", position_code));
|
||||
if (ObjectUtil.isEmpty(vehiobj)) {
|
||||
throw new BadRequestException("位置不存在,设置有误!");
|
||||
}
|
||||
//缓存线位置通过扫码绑定料箱条码
|
||||
vehiobj.setVehicle_code("");
|
||||
positionService.updateById(vehiobj);
|
||||
|
||||
res.put("message", "删除成功");
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void check(JSONObject param) {
|
||||
String option = param.getString("option");
|
||||
if (StrUtil.isEmpty(option)) {
|
||||
throw new BadRequestException("缺少关键参数option");
|
||||
}
|
||||
|
||||
String device_code = param.getString("device_code");
|
||||
String code = "";
|
||||
if (option.equals("0")) {
|
||||
code = "to_start_checking";
|
||||
}
|
||||
if (option.equals("1")) {
|
||||
code = "to_check_finish";
|
||||
}
|
||||
String value = "1";
|
||||
JSONObject jo = new JSONObject();
|
||||
jo.put("device_code", device_code);
|
||||
jo.put("code", code);
|
||||
jo.put("value", value);
|
||||
|
||||
JSONArray ja = new JSONArray();
|
||||
ja.add(jo);
|
||||
wmsToAcsService.action(ja);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Binary file not shown.
@@ -519,7 +519,7 @@ public class IPdmProduceWorkorderServiceImpl extends ServiceImpl<PdmProduceWorko
|
||||
JSONObject order = packageForm(result);
|
||||
array.add(order);
|
||||
//下发acs
|
||||
result.setWorkorder_status(WorkerOrderEnum.SEND.getCode());
|
||||
result.setWorkorder_status(WorkerOrderEnum.PRODUCTING.getCode());
|
||||
Map<String,Object> resp = wmsToAcsService.order(array);
|
||||
if (((int)resp.get("status")) == (HttpStatus.BAD_REQUEST.value())){
|
||||
throw new BadRequestException(String.valueOf(resp.get("message")));
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
package org.nl.wms.scheduler_manage.controller.scheduler;
|
||||
|
||||
/*
|
||||
* @author ZZQ
|
||||
* @Date 2023/5/22 14:27
|
||||
*/
|
||||
|
||||
import cn.dev33.satoken.annotation.SaIgnore;
|
||||
import org.nl.wms.scheduler_manage.service.scheduler.SchedulerService;
|
||||
import org.nl.wms.scheduler_manage.service.scheduler.labelConverter.impl.FlowElement;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/api/shceduler")
|
||||
@SaIgnore
|
||||
public class SchedulerController {
|
||||
|
||||
@Autowired
|
||||
SchedulerService schedulerService;
|
||||
|
||||
@GetMapping("/all")
|
||||
public ResponseEntity<Object> allprocess(){
|
||||
return new ResponseEntity<>(schedulerService.all(), HttpStatus.OK);
|
||||
}
|
||||
@GetMapping("/process")
|
||||
public ResponseEntity<Object> allprocess(String process){
|
||||
return new ResponseEntity<>(schedulerService.getProcess(process), HttpStatus.OK);
|
||||
}
|
||||
@GetMapping("/processFlow")
|
||||
public ResponseEntity<Object> allprocess(String process,String flow){
|
||||
FlowElement element = schedulerService.currentFlow(process, flow);
|
||||
return new ResponseEntity<>(element, HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,8 @@
|
||||
package org.nl.wms.scheduler_manage.service.cacheline.dao;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
@@ -24,6 +26,7 @@ public class SchCachelinePosition implements Serializable {
|
||||
/**
|
||||
* 缓存线位置表-位置编码
|
||||
*/
|
||||
@TableId(value = "position_code")
|
||||
private String position_code;
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package org.nl.wms.scheduler_manage.service.cacheline.dao;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
@@ -24,6 +26,7 @@ public class SchCachelineVehicle implements Serializable {
|
||||
/**
|
||||
* 缓存线载具表-编码
|
||||
*/
|
||||
@TableId(value = "vehicle_code")
|
||||
private String vehicle_code;
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package org.nl.wms.scheduler_manage.service.cacheline.dao;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
@@ -24,6 +26,7 @@ public class SchCachelineVehilematerial implements Serializable {
|
||||
/**
|
||||
* 载具物料表-物料标识
|
||||
*/
|
||||
@TableId(value = "vehmaterial_id")
|
||||
private String vehmaterial_id;
|
||||
|
||||
/**
|
||||
|
||||
@@ -30,6 +30,6 @@
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY
|
||||
scp.cacheline_code, scp.layer_num, scp.positionorder_no, scp.cache_line_no
|
||||
scp.cacheline_code, scp.layer_num desc, scp.positionorder_no, scp.cache_line_no
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
@@ -1,28 +1,21 @@
|
||||
package org.nl.wms.scheduler_manage.service.region.impl;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.map.MapUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.github.pagehelper.Page;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.nl.common.TableDataInfo;
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
import org.nl.common.utils.SecurityUtils;
|
||||
import org.nl.modules.common.exception.BadRequestException;
|
||||
import org.nl.modules.wql.WQL;
|
||||
import org.nl.modules.wql.core.bean.WQLObject;
|
||||
import org.nl.modules.wql.util.WqlUtil;
|
||||
import org.nl.wms.product_manage.sch.service.dto.RegionDto;
|
||||
import org.nl.wms.scheduler_manage.service.point.dao.SchBasePoint;
|
||||
import org.nl.wms.scheduler_manage.service.region.ISchBaseRegionService;
|
||||
import org.nl.wms.scheduler_manage.service.region.dao.SchBaseRegion;
|
||||
import org.nl.wms.scheduler_manage.service.region.dao.mapper.SchBaseRegionMapper;
|
||||
import org.nl.wms.scheduler_manage.service.scheduler.labelConverter.impl.ProcessElement;
|
||||
import org.nl.wms.system_manage.service.dict.ISysDictService;
|
||||
import org.nl.wms.system_manage.service.dict.dao.Dict;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -31,7 +24,6 @@ import org.springframework.util.Assert;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -169,4 +161,9 @@ public class SchBaseRegionServiceImpl extends ServiceImpl<SchBaseRegionMapper, S
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
ProcessElement element = new ProcessElement();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,140 @@
|
||||
package org.nl.wms.scheduler_manage.service.scheduler;
|
||||
|
||||
import lombok.SneakyThrows;
|
||||
import org.apache.poi.ss.formula.functions.T;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.nl.common.publish.AbstraceListener;
|
||||
import org.nl.modules.common.exception.BadRequestException;
|
||||
import org.nl.wms.scheduler_manage.service.scheduler.labelConverter.BaseConverter;
|
||||
import org.nl.wms.scheduler_manage.service.scheduler.labelConverter.BaseElement;
|
||||
import org.nl.wms.scheduler_manage.service.scheduler.labelConverter.impl.FlowElement;
|
||||
import org.nl.wms.scheduler_manage.service.scheduler.labelConverter.impl.ProcessElement;
|
||||
import org.springframework.beans.BeansException;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.beans.factory.config.BeanPostProcessor;
|
||||
import org.springframework.core.io.FileSystemResourceLoader;
|
||||
import org.springframework.core.io.Resource;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.xml.stream.XMLInputFactory;
|
||||
import javax.xml.stream.XMLStreamConstants;
|
||||
import javax.xml.stream.XMLStreamException;
|
||||
import javax.xml.stream.XMLStreamReader;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.function.Function;
|
||||
|
||||
/*
|
||||
* @author ZZQ
|
||||
* @Date 2023/5/22 13:38
|
||||
*/
|
||||
@Service
|
||||
public class SchedulerService implements BeanPostProcessor {
|
||||
@Value("${schedulerFile}")
|
||||
|
||||
private static Map<String,BaseConverter> converterMap =new HashMap<>();
|
||||
|
||||
|
||||
public List<BaseElement> all(){
|
||||
List<BaseElement> readall = XmlReadUtil.readall();
|
||||
return readall;
|
||||
}
|
||||
|
||||
public ProcessElement getProcess(String processId){
|
||||
ProcessElement processElement = XmlReadUtil.readProcess(processId);
|
||||
return processElement;
|
||||
}
|
||||
|
||||
public FlowElement currentFlow(String processId,String flowId){
|
||||
ProcessElement processElement = XmlReadUtil.readProcess(processId);
|
||||
if (processElement!=null){
|
||||
return processElement.flowId(flowId);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
static class XmlReadUtil{
|
||||
|
||||
static FileSystemResourceLoader loader = new FileSystemResourceLoader();
|
||||
|
||||
@SneakyThrows
|
||||
public static ProcessElement readProcess(String processId){//生成参数:
|
||||
Function<XMLStreamReader, ProcessElement> function = xtr -> {
|
||||
try {
|
||||
while (xtr.hasNext()){
|
||||
if (XMLStreamConstants.START_ELEMENT == xtr.next()){
|
||||
System.out.println(xtr.getLocalName()+"___"+processId);
|
||||
if (xtr.getLocalName().equals("process") && xtr.getAttributeValue(0).equals(processId)){
|
||||
BaseConverter converter = converterMap.get(xtr.getLocalName());
|
||||
return (ProcessElement)converter.process(xtr);
|
||||
}
|
||||
}
|
||||
}
|
||||
}catch (Exception ex){
|
||||
throw new BadRequestException(ex.getMessage());
|
||||
}
|
||||
return null;
|
||||
};
|
||||
ProcessElement processElement = readXml("classpath:/scheduler.xml", function);
|
||||
return processElement;
|
||||
}
|
||||
|
||||
@SneakyThrows
|
||||
public static List<BaseElement> readall() {
|
||||
//生成参数:
|
||||
Function<XMLStreamReader, List> function = xtr -> {
|
||||
List<BaseElement> list = new ArrayList<>();
|
||||
try {
|
||||
while (xtr.hasNext()) {
|
||||
if (XMLStreamConstants.START_ELEMENT == xtr.next()) {
|
||||
System.out.println(xtr.getLocalName());
|
||||
BaseConverter converter = converterMap.get(xtr.getLocalName());
|
||||
if (converter != null) {
|
||||
list.add(converter.process(xtr));
|
||||
}
|
||||
}
|
||||
}
|
||||
}catch (Exception ex){
|
||||
throw new BadRequestException(ex.getMessage());
|
||||
}
|
||||
return list;
|
||||
};
|
||||
List<BaseElement> baseElements = readXml("classpath:/scheduler.xml", function);
|
||||
return baseElements;
|
||||
}
|
||||
private static<T> T readXml(String path, Function<XMLStreamReader, T> function) throws IOException, XMLStreamException {
|
||||
FileInputStream inputStream = null;
|
||||
InputStreamReader streamReader = null;
|
||||
Resource resource = loader.getResource(path);
|
||||
try {
|
||||
inputStream = new FileInputStream(resource.getFile());
|
||||
streamReader = new InputStreamReader(inputStream, "UTF-8");
|
||||
//TODO:schama校验
|
||||
XMLStreamReader reader = XMLInputFactory.newInstance().createXMLStreamReader(streamReader);
|
||||
return function.apply(reader);
|
||||
}finally {
|
||||
if (streamReader!=null){
|
||||
streamReader.close();
|
||||
}
|
||||
if (inputStream!=null){
|
||||
inputStream.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Object postProcessAfterInitialization(@NotNull Object bean, String beanName) throws BeansException {
|
||||
if (bean instanceof BaseConverter){
|
||||
converterMap.put(beanName,(BaseConverter)bean);
|
||||
}
|
||||
return bean;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package org.nl.wms.scheduler_manage.service.scheduler.labelConverter;
|
||||
|
||||
import javax.xml.stream.XMLStreamException;
|
||||
import javax.xml.stream.XMLStreamReader;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/*
|
||||
* @author ZZQ
|
||||
* @Date 2023/5/19 11:00
|
||||
*/
|
||||
public interface BaseConverter {
|
||||
BaseElement process(XMLStreamReader xtr) throws XMLStreamException;
|
||||
|
||||
default void setBaseLabel(BaseElement element,XMLStreamReader xtr,String...labels){
|
||||
Map<String, String> map = new HashMap<>();
|
||||
for (String label : labels) {
|
||||
map.put(label,xtr.getAttributeValue(null,label));
|
||||
}
|
||||
element.setAttributeValue(map);
|
||||
element.setId(xtr.getAttributeValue(null,"id"));
|
||||
element.setName(xtr.getAttributeValue(null,"name"));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package org.nl.wms.scheduler_manage.service.scheduler.labelConverter;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import javax.xml.stream.XMLStreamReader;
|
||||
import java.io.Serializable;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/*
|
||||
* @author ZZQ
|
||||
* @Date 2023/5/21 18:03
|
||||
*/
|
||||
public class BaseElement implements Serializable {
|
||||
private String id;
|
||||
private String name;
|
||||
private int xmlRowNumber;
|
||||
private int xmlColumnNumber;
|
||||
private Map<String,String> attributeValue;
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public int getXmlRowNumber() {
|
||||
return xmlRowNumber;
|
||||
}
|
||||
|
||||
public void setXmlRowNumber(int xmlRowNumber) {
|
||||
this.xmlRowNumber = xmlRowNumber;
|
||||
}
|
||||
|
||||
public int getXmlColumnNumber() {
|
||||
return xmlColumnNumber;
|
||||
}
|
||||
|
||||
public void setXmlColumnNumber(int xmlColumnNumber) {
|
||||
this.xmlColumnNumber = xmlColumnNumber;
|
||||
}
|
||||
|
||||
public Map<String, String> getAttributeValue() {
|
||||
return attributeValue;
|
||||
}
|
||||
|
||||
public void setAttributeValue(Map<String, String> attributeValue) {
|
||||
this.attributeValue = attributeValue;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package org.nl.wms.scheduler_manage.service.scheduler.labelConverter.impl;
|
||||
|
||||
import org.nl.wms.scheduler_manage.service.scheduler.labelConverter.BaseConverter;
|
||||
import org.nl.wms.scheduler_manage.service.scheduler.labelConverter.BaseElement;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.xml.stream.XMLStreamReader;
|
||||
|
||||
/*
|
||||
* @author ZZQ
|
||||
* @Date 2023/5/19 11:00
|
||||
*/
|
||||
@Service("end")
|
||||
public class EndConverter implements BaseConverter {
|
||||
String[] labels = new String[]{"id","name","sourceRef"};
|
||||
@Override
|
||||
public BaseElement process(XMLStreamReader xtr) {
|
||||
EndElement element = new EndElement();
|
||||
setBaseLabel(element,xtr,labels);
|
||||
element.setSourceRefId(xtr.getAttributeValue(null,"sourceRef"));
|
||||
element.setTargetRefId(xtr.getAttributeValue(null,"targetRef"));
|
||||
return element;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package org.nl.wms.scheduler_manage.service.scheduler.labelConverter.impl;
|
||||
|
||||
/*
|
||||
* @author ZZQ
|
||||
* @Date 2023/5/21 18:03
|
||||
*/
|
||||
public class EndElement extends FlowElement {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package org.nl.wms.scheduler_manage.service.scheduler.labelConverter.impl;
|
||||
|
||||
import lombok.SneakyThrows;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.nl.wms.scheduler_manage.service.scheduler.labelConverter.BaseConverter;
|
||||
import org.nl.wms.scheduler_manage.service.scheduler.labelConverter.BaseElement;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.xml.stream.XMLStreamConstants;
|
||||
import javax.xml.stream.XMLStreamReader;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/*
|
||||
* @author ZZQ
|
||||
* @Date 2023/5/19 11:00
|
||||
*/
|
||||
@Service("flow")
|
||||
public class FlowConverter implements BaseConverter {
|
||||
String[] labels = new String[]{"id","name","sourceRef","targetRef"};
|
||||
@Override
|
||||
@SneakyThrows
|
||||
public BaseElement process(XMLStreamReader xtr) {
|
||||
FlowElement element = new FlowElement();
|
||||
setBaseLabel(element,xtr,labels);
|
||||
element.setSourceRefId(xtr.getAttributeValue(null,"sourceRef"));
|
||||
element.setTargetRefId(xtr.getAttributeValue(null,"targetRef"));
|
||||
String has = xtr.getAttributeValue(null, "has");
|
||||
if (StringUtils.isNotEmpty(has)){
|
||||
int i = 0;
|
||||
while (true){
|
||||
if (i == Integer.valueOf(has)){
|
||||
break;
|
||||
}
|
||||
if (XMLStreamConstants.START_ELEMENT == xtr.next()){
|
||||
System.out.println(xtr.getLocalName());
|
||||
Map<String, String> param = new HashMap();
|
||||
param.put(xtr.getAttributeValue(null,"id"),xtr.getAttributeValue(null,"value"));
|
||||
element.getParams().add(param);
|
||||
i++;
|
||||
}
|
||||
}
|
||||
}
|
||||
return element;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
package org.nl.wms.scheduler_manage.service.scheduler.labelConverter.impl;
|
||||
|
||||
import org.nl.wms.scheduler_manage.service.scheduler.labelConverter.BaseElement;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/*
|
||||
* @author ZZQ
|
||||
* @Date 2023/5/21 18:03
|
||||
*/
|
||||
public class FlowElement extends BaseElement {
|
||||
|
||||
private FlowElement sourceRef;
|
||||
private FlowElement targetRef;
|
||||
private String sourceRefId;
|
||||
private String targetRefId;
|
||||
private List<Map<String,String>> params = new ArrayList<>();
|
||||
|
||||
|
||||
|
||||
public FlowElement pre() {
|
||||
return sourceRef;
|
||||
}
|
||||
|
||||
public FlowElement next() {
|
||||
return targetRef;
|
||||
}
|
||||
|
||||
|
||||
protected void setSourceRef(FlowElement sourceRef) {
|
||||
this.sourceRef = sourceRef;
|
||||
}
|
||||
|
||||
|
||||
protected void setTargetRef(FlowElement targetRef) {
|
||||
this.targetRef = targetRef;
|
||||
}
|
||||
|
||||
protected String getSourceRefId() {
|
||||
return sourceRefId;
|
||||
}
|
||||
|
||||
protected void setSourceRefId(String sourceRefId) {
|
||||
this.sourceRefId = sourceRefId;
|
||||
}
|
||||
|
||||
protected String getTargetRefId() {
|
||||
return targetRefId;
|
||||
}
|
||||
|
||||
protected void setTargetRefId(String targetRefId) {
|
||||
this.targetRefId = targetRefId;
|
||||
}
|
||||
|
||||
public List<Map<String, String>> getParams() {
|
||||
return params;
|
||||
}
|
||||
|
||||
public void setParams(List<Map<String, String>> params) {
|
||||
this.params = params;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package org.nl.wms.scheduler_manage.service.scheduler.labelConverter.impl;
|
||||
|
||||
import org.nl.wms.scheduler_manage.service.scheduler.labelConverter.BaseConverter;
|
||||
import org.nl.wms.scheduler_manage.service.scheduler.labelConverter.BaseElement;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.xml.stream.XMLStreamReader;
|
||||
|
||||
/*
|
||||
* @author ZZQ
|
||||
* @Date 2023/5/19 11:00
|
||||
*/
|
||||
@Service("gatway")
|
||||
public class GatwayConverter implements BaseConverter {
|
||||
|
||||
@Override
|
||||
public BaseElement process(XMLStreamReader xtr) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
package org.nl.wms.scheduler_manage.service.scheduler.labelConverter.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import org.nl.wms.scheduler_manage.service.scheduler.labelConverter.BaseConverter;
|
||||
import org.nl.wms.scheduler_manage.service.scheduler.labelConverter.BaseElement;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.xml.stream.XMLStreamConstants;
|
||||
import javax.xml.stream.XMLStreamException;
|
||||
import javax.xml.stream.XMLStreamReader;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/*
|
||||
* @author ZZQ
|
||||
* @Date 2023/5/19 11:00
|
||||
*/
|
||||
@Service("process")
|
||||
public class ProcessConverter implements BaseConverter {
|
||||
String[] labels = new String[]{"id","name"};
|
||||
@Autowired
|
||||
private Map<String,BaseConverter> converterMap;
|
||||
|
||||
@Override
|
||||
public BaseElement process(XMLStreamReader xtr) throws XMLStreamException {
|
||||
ProcessElement element = new ProcessElement();
|
||||
setBaseLabel(element,xtr,labels);
|
||||
while (xtr.hasNext()){
|
||||
if (XMLStreamConstants.START_ELEMENT == xtr.next()){
|
||||
String localName = xtr.getLocalName();
|
||||
element.getFlowElements().add((FlowElement) converterMap.get(localName).process(xtr));
|
||||
if (localName.equals("end")){
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
Map<String, FlowElement> eleMap = element.getFlowElements().stream().collect(HashMap::new, (k, v) -> k.put(v.getId(), v), HashMap::putAll);
|
||||
for (FlowElement flowElement : element.getFlowElements()) {
|
||||
flowElement.setTargetRef(eleMap.get(flowElement.getTargetRefId()));
|
||||
flowElement.setSourceRef(eleMap.get(flowElement.getSourceRefId()));
|
||||
}
|
||||
element.setStartElement(eleMap.get("start"));
|
||||
return element;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
package org.nl.wms.scheduler_manage.service.scheduler.labelConverter.impl;
|
||||
|
||||
import org.nl.wms.scheduler_manage.service.scheduler.labelConverter.BaseElement;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/*
|
||||
* @author ZZQ
|
||||
* @Date 2023/5/21 18:03
|
||||
*/
|
||||
public class ProcessElement extends BaseElement {
|
||||
|
||||
private StartElement startElement;
|
||||
|
||||
private List<FlowElement> flowElements = new ArrayList<>();
|
||||
|
||||
public List<FlowElement> getFlowElements() {
|
||||
return flowElements;
|
||||
}
|
||||
|
||||
public FlowElement flowId(String flowId){
|
||||
for (FlowElement flowElement : flowElements) {
|
||||
if (flowElement.getId().equals(flowId)){
|
||||
return flowElement;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public void setFlowElements(List<FlowElement> flowElements) {
|
||||
this.flowElements = flowElements;
|
||||
}
|
||||
|
||||
public StartElement getStartElement() {
|
||||
return startElement;
|
||||
}
|
||||
|
||||
|
||||
public void setStartElement(BaseElement startElement) {
|
||||
this.startElement = (StartElement)startElement;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package org.nl.wms.scheduler_manage.service.scheduler.labelConverter.impl;
|
||||
|
||||
import org.nl.wms.scheduler_manage.service.scheduler.labelConverter.BaseConverter;
|
||||
import org.nl.wms.scheduler_manage.service.scheduler.labelConverter.BaseElement;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.xml.stream.XMLStreamReader;
|
||||
|
||||
/*
|
||||
* @author ZZQ
|
||||
* @Date 2023/5/19 11:00
|
||||
*/
|
||||
@Service("start")
|
||||
public class StartConverter implements BaseConverter {
|
||||
String[] labels = new String[]{"id","name","targetRef"};
|
||||
@Override
|
||||
public BaseElement process(XMLStreamReader xtr) {
|
||||
StartElement element = new StartElement();
|
||||
setBaseLabel(element,xtr,labels);
|
||||
element.setSourceRefId(xtr.getAttributeValue(null,"sourceRef"));
|
||||
element.setTargetRefId(xtr.getAttributeValue(null,"targetRef"));
|
||||
return element;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
package org.nl.wms.scheduler_manage.service.scheduler.labelConverter.impl;
|
||||
|
||||
/*
|
||||
* @author ZZQ
|
||||
* @Date 2023/5/21 18:03
|
||||
*/
|
||||
public class StartElement extends FlowElement {
|
||||
|
||||
}
|
||||
@@ -1,8 +1,12 @@
|
||||
package org.nl.wms.scheduler_manage.service.task.dao.mapper;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.nl.wms.scheduler_manage.service.task.dao.SchBaseTask;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 任务表 Mapper 接口
|
||||
@@ -13,4 +17,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
*/
|
||||
public interface SchBaseTaskMapper extends BaseMapper<SchBaseTask> {
|
||||
|
||||
List<Map> getTaskInfo (@Param("map") Map map);
|
||||
}
|
||||
|
||||
@@ -2,4 +2,33 @@
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.nl.wms.scheduler_manage.service.task.dao.mapper.SchBaseTaskMapper">
|
||||
|
||||
<select id="getTaskInfo" resultType="java.util.Map">
|
||||
SELECT
|
||||
task.task_id AS instruct_uuid,
|
||||
task.task_code AS instructoperate_num,
|
||||
task.task_name,
|
||||
task.product_area,
|
||||
class.class_name task_type,
|
||||
task.vehicle_code,
|
||||
task.vehicle_code2 AS outvehicle_code,
|
||||
task.create_time,
|
||||
dict.label AS status_name,
|
||||
mater.material_code AS processmaterial_code,
|
||||
point1.point_name AS startpoint_code,
|
||||
point2.point_name AS nextpoint_code
|
||||
FROM
|
||||
sch_base_task task
|
||||
LEFT JOIN sch_base_point point1 ON task.point_code1 = point1.point_code
|
||||
LEFT JOIN sch_base_point point2 ON task.point_code2 = point2.point_code
|
||||
LEFT JOIN md_me_materialbase mater ON task.material_id = mater.material_id
|
||||
LEFT JOIN md_pb_classstandard class ON task.task_type = class.class_id
|
||||
LEFT JOIN sys_dict dict ON dict.`value` = task.task_status AND dict.`code` = 'task_status'
|
||||
<where>
|
||||
task.is_delete = '0'
|
||||
<if test="map.task_code != null and map.task_code != ''">
|
||||
task.task_code = #{map.task_code}
|
||||
</if>
|
||||
</where>
|
||||
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
@@ -321,6 +321,7 @@ public class StIvtIostorinvCpServiceImpl extends ServiceImpl<StIvtIostorinvCpMap
|
||||
6.更新库存、日物流表等、
|
||||
*/
|
||||
|
||||
|
||||
String struct_id = whereJson.getString("struct_id");
|
||||
StIvtStructattr attrDao = new StIvtStructattr();
|
||||
|
||||
@@ -335,10 +336,7 @@ public class StIvtIostorinvCpServiceImpl extends ServiceImpl<StIvtIostorinvCpMap
|
||||
/* 手动分配 */
|
||||
|
||||
// 查出对应仓位
|
||||
attrDao = iStIvtStructattrService.getOne(
|
||||
new QueryWrapper<StIvtStructattr>().lambda()
|
||||
.eq(StIvtStructattr::getStruct_id,struct_id)
|
||||
);
|
||||
attrDao = iStIvtStructattrService.getById(struct_id);
|
||||
}
|
||||
|
||||
if (ObjectUtil.isEmpty(attrDao.getStruct_code())) throw new BadRequestException("未找到仓位!");
|
||||
@@ -346,7 +344,18 @@ public class StIvtIostorinvCpServiceImpl extends ServiceImpl<StIvtIostorinvCpMap
|
||||
// 2.更新分配明细、分配、明细、主表
|
||||
updateDivIos(attrDao,whereJson);
|
||||
|
||||
// TODO 更新点位
|
||||
// 3.更新仓位状态 - 锁定
|
||||
StIvtIostorinvCp mstDao = this.getById(whereJson.getString("iostorinv_id"));
|
||||
|
||||
attrDao.setLock_type("01"); // TODO 暂时写死
|
||||
attrDao.setUpdate_id(SecurityUtils.getCurrentUserId());
|
||||
attrDao.setUpdate_name(SecurityUtils.getCurrentNickName());
|
||||
attrDao.setUpdate_time(new Date());
|
||||
attrDao.setInv_type(IOSEnum.IO_TYPE.code("入库"));
|
||||
attrDao.setInv_id(mstDao.getIostorinv_id());
|
||||
attrDao.setInv_code(mstDao.getBill_code());
|
||||
iStIvtStructattrService.updateById(attrDao);
|
||||
|
||||
// TODO 更新库存、物流等
|
||||
}
|
||||
|
||||
|
||||
@@ -8,16 +8,16 @@ spring:
|
||||
enabled: true
|
||||
client:
|
||||
reactive:
|
||||
#endpoints: 172.31.185.110:9200,172.31.154.9:9200 #内网
|
||||
# endpoints: 192.168.46.225:8200 #外网
|
||||
endpoints: http://192.168.46.225:8200 #外网
|
||||
#endpoints: 172.31.185.110:8200,172.31.154.9:8200 #内网
|
||||
# endpoints: 47.96.133.178:8200 #外网
|
||||
endpoints: http://47.96.133.178:8200 #外网
|
||||
elasticsearch:
|
||||
rest:
|
||||
#uris: 172.31.185.110:9200,172.31.154.9:9200 #内网
|
||||
# uris: 192.168.46.225:8200 #外网
|
||||
uris: http://192.168.46.225:9200 #外网
|
||||
# username: elastic
|
||||
# password: 123456
|
||||
#uris: 172.31.185.110:8200,172.31.154.9:8200 #内网
|
||||
# uris: 47.96.133.178:8200 #外网
|
||||
uris: http://47.96.133.178:8200 #外网
|
||||
username: elastic
|
||||
password: 123456
|
||||
datasource:
|
||||
druid:
|
||||
db-type: com.alibaba.druid.pool.DruidDataSource
|
||||
|
||||
@@ -8,14 +8,14 @@ spring:
|
||||
enabled: true
|
||||
client:
|
||||
reactive:
|
||||
#endpoints: 172.31.185.110:9200,172.31.154.9:9200 #内网
|
||||
# endpoints: 192.168.46.225:8200 #外网
|
||||
endpoints: http://192.168.46.225:8200 #外网
|
||||
#endpoints: 172.31.185.110:8200,172.31.154.9:8200 #内网
|
||||
# endpoints: 47.96.133.1785:8200 #外网
|
||||
endpoints: http://47.96.133.1785:8200 #外网
|
||||
elasticsearch:
|
||||
rest:
|
||||
#uris: 172.31.185.110:9200,172.31.154.9:9200 #内网
|
||||
# uris: 192.168.46.225:8200 #外网
|
||||
uris: http://192.168.46.225:8200 #外网
|
||||
#uris: 172.31.185.110:8200,172.31.154.9:8200 #内网
|
||||
# uris: 47.96.133.1785:8200 #外网
|
||||
uris: http://47.96.133.1785:8200 #外网
|
||||
username: elastic
|
||||
password: 123456
|
||||
datasource:
|
||||
|
||||
@@ -9,13 +9,13 @@ spring:
|
||||
client:
|
||||
reactive:
|
||||
#endpoints: 172.31.185.110:9200,172.31.154.9:9200 #内网
|
||||
# endpoints: 192.168.46.225:8200 #外网
|
||||
endpoints: http://192.168.46.225:8200 #外网
|
||||
# endpoints: 192.168.46.2255:8200 #外网
|
||||
endpoints: http://192.168.46.2255:9200 #外网
|
||||
elasticsearch:
|
||||
rest:
|
||||
#uris: 172.31.185.110:9200,172.31.154.9:9200 #内网
|
||||
# uris: 192.168.46.225:8200 #外网
|
||||
uris: http://192.168.46.225:8200 #外网
|
||||
# uris: 192.168.46.2255:8200 #外网
|
||||
uris: http://192.168.46.2255:8200 #外网
|
||||
username: elastic
|
||||
password: 123456
|
||||
datasource:
|
||||
|
||||
@@ -92,3 +92,4 @@ mybatis-plus:
|
||||
db-config:
|
||||
id-type: INPUT
|
||||
banner: false
|
||||
schedulerFile: classpath:/scheduler.xml
|
||||
|
||||
@@ -18,7 +18,7 @@ https://juejin.cn/post/6844903775631572999
|
||||
<!--引入默认的一些设置-->
|
||||
<!-- <include resource="log/AutoCreateInst.xml"/>-->
|
||||
<!-- <appender name="esLogAppender" class="com.internetitem.logback.elasticsearch.ElasticsearchAppender">
|
||||
<url>http://192.168.46.225:8200/_bulk</url>
|
||||
<url>http://47.96.133.1785:8200/_bulk</url>
|
||||
<index>${esIndex}</index>
|
||||
<type>mes_log</type>
|
||||
<loggerName>es-logger</loggerName> <!– optional –>
|
||||
|
||||
22
mes/hd/nladmin-system/src/main/resources/scheduler.xml
Normal file
22
mes/hd/nladmin-system/src/main/resources/scheduler.xml
Normal file
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<definitions>
|
||||
<process id="JGXJ" name="机关下料">
|
||||
<start id="start" name="Starter" targetRef="A1_JGXJ"></start>
|
||||
<flow id="A1_JGXJ" name="机关下料工序" sourceRef="start" targetRef="A1_TWYTJ"></flow>
|
||||
<flow id="A1_TWYTJ" name="推弯工序" sourceRef="A1_JGXJ" targetRef="A1_SKQX"></flow>
|
||||
<flow id="A1_SKQX" name="深坑清洗" sourceRef="A1_TWYTJ" targetRef="end"></flow>
|
||||
<end id="end" name="Junior Reject End" sourceRef="A1_SKQX"></end>
|
||||
</process>
|
||||
<process id="WXXL" name="直管无屑下料">
|
||||
<start id="start" name="Starter" targetRef="A1_WXXL"></start>
|
||||
<flow id="A1_WXXL" name="无屑下料工序" has="3" sourceRef="starter" targetRef="A1_STLS">
|
||||
<param id="param1" value="param1"/>
|
||||
<param id="param2" value="param2"/>
|
||||
<param id="param3" value="param3"/>
|
||||
</flow>
|
||||
<flow id="A1_STLS" name="三通拉伸工序" sourceRef="A1_WXXL" targetRef="A1_TK"></flow>
|
||||
<flow id="A1_TK" name="镗孔" sourceRef="A1_TK" targetRef="end"></flow>
|
||||
<flow id="A1_SKQX" name="深坑清洗" sourceRef="A1_TK" targetRef="end"></flow>
|
||||
<end id="end" name="Junior Reject End" sourceRef="A1_SKQX"></end>
|
||||
</process>
|
||||
</definitions>
|
||||
56
mes/hd/nladmin-system/src/test/java/Test3.java
Normal file
56
mes/hd/nladmin-system/src/test/java/Test3.java
Normal file
@@ -0,0 +1,56 @@
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
public class Test3 {
|
||||
public static void main(String[] args) {
|
||||
JSONArray array = new JSONArray();
|
||||
|
||||
JSONObject jsonObject1 = new JSONObject();
|
||||
jsonObject1.put("name", "小三");
|
||||
jsonObject1.put("age", "12");
|
||||
array.add(jsonObject1);
|
||||
|
||||
JSONObject jsonObject2 = new JSONObject();
|
||||
jsonObject2.put("name", "小二");
|
||||
jsonObject2.put("age", "17");
|
||||
array.add(jsonObject2);
|
||||
|
||||
JSONObject jsonObject3 = new JSONObject();
|
||||
jsonObject3.put("name", "小二");
|
||||
jsonObject3.put("age", "17");
|
||||
array.add(jsonObject3);
|
||||
|
||||
Set<JSONObject> name = array.stream().map(row -> ((JSONObject) row)).collect(Collectors.toSet());
|
||||
HashMap<String, JSONObject> name1 = array.stream().collect(HashMap::new, (k, v) -> k.put(((JSONObject) v).getString("name"), (JSONObject) v), HashMap::putAll);
|
||||
HashSet<JSONObject> collect = array.stream().collect(HashSet::new, (k, v) -> k.add((JSONObject) v), HashSet::addAll);
|
||||
collect.stream().forEach(json -> a(json.getString("name")));
|
||||
|
||||
List<Map> maps = new ArrayList<>();
|
||||
|
||||
HashMap<String, String> map = new HashMap<>();
|
||||
map.put("storagevehicle_code","1");
|
||||
map.put("storagevehicle_name","sadfs");
|
||||
maps.add(map);
|
||||
HashMap<String, String> map2 = new HashMap<>();
|
||||
map2.put("storagevehicle_code","2");
|
||||
map2.put("storagevehicle_name","sdfd");
|
||||
maps.add(map2);
|
||||
|
||||
boolean age = array.stream().filter(row -> ((JSONObject) row).getString("age").equals("18")).findAny().isPresent();
|
||||
System.out.println(age);
|
||||
|
||||
|
||||
}
|
||||
|
||||
public static void a(String name) {
|
||||
}
|
||||
|
||||
public static void b(String name) {
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ import request from '@/utils/request'
|
||||
|
||||
export function add(data) {
|
||||
return request({
|
||||
url: '/api/stIvtBsrealstorattr',
|
||||
url: '/api/Storattr',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
@@ -10,7 +10,7 @@ export function add(data) {
|
||||
|
||||
export function del(ids) {
|
||||
return request({
|
||||
url: '/api/stIvtBsrealstorattr',
|
||||
url: '/api/Storattr',
|
||||
method: 'delete',
|
||||
data: ids
|
||||
})
|
||||
@@ -18,7 +18,7 @@ export function del(ids) {
|
||||
|
||||
export function edit(data) {
|
||||
return request({
|
||||
url: '/api/stIvtBsrealstorattr',
|
||||
url: '/api/Storattr',
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
@@ -26,7 +26,7 @@ export function edit(data) {
|
||||
|
||||
export function getStor(params) {
|
||||
return request({
|
||||
url: '/api/stIvtBsrealstorattr/getStor',
|
||||
url: '/api/Storattr/getStor',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
@@ -34,7 +34,7 @@ export function getStor(params) {
|
||||
|
||||
export function changeActive(data) {
|
||||
return request({
|
||||
url: '/api/stIvtBsrealstorattr/changeActive',
|
||||
url: '/api/Storattr/changeActive',
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
@@ -42,7 +42,7 @@ export function changeActive(data) {
|
||||
|
||||
export function queryStor(data) {
|
||||
return request({
|
||||
url: '/api/stIvtBsrealstorattr/queryStor',
|
||||
url: '/api/Storattr/queryStor',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
|
||||
459
mes/qd/src/views/wms/old_manage/old_package/index.vue
Normal file
459
mes/qd/src/views/wms/old_manage/old_package/index.vue
Normal file
@@ -0,0 +1,459 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<div class="head-container">
|
||||
<div v-if="crud.props.searchToggle">
|
||||
<el-form
|
||||
:inline="true"
|
||||
class="demo-form-inline"
|
||||
label-position="right"
|
||||
label-width="80px"
|
||||
label-suffix=":"
|
||||
>
|
||||
<el-form-item label="所属库区">
|
||||
<el-cascader
|
||||
placeholder="所属库区"
|
||||
:options="sects"
|
||||
:props="{ checkStrictly: true }"
|
||||
clearable
|
||||
class="filter-item"
|
||||
@change="sectQueryChange"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="锁定类型">
|
||||
<el-select
|
||||
v-model="query.lock_type"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="锁定类型"
|
||||
class="filter-item"
|
||||
@change="crud.toQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.d_lock_type"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="模糊搜索">
|
||||
<el-input
|
||||
v-model="query.search"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="仓位编码、名称"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<rrOperation />
|
||||
</el-form>
|
||||
</div>
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<crudOperation :permission="permission" />
|
||||
|
||||
<!--表单组件-->
|
||||
<el-dialog
|
||||
:close-on-click-modal="false"
|
||||
:before-close="crud.cancelCU"
|
||||
:visible.sync="crud.status.cu > 0"
|
||||
:title="crud.status.title"
|
||||
width="700px"
|
||||
>
|
||||
<el-form ref="form" :model="form" :rules="rules" size="mini" label-suffix=":" label-width="90px">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="仓位编码" prop="struct_code">
|
||||
<el-input v-model="form.struct_code" style="width: 200px;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="仓位名称" prop="struct_name">
|
||||
<el-input v-model="form.struct_name" style="width: 200px;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="仓位简称">
|
||||
<el-input v-model="form.simple_name" style="width: 200px;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="归属库区" prop="sect_id">
|
||||
<el-cascader
|
||||
v-model="form.cascader"
|
||||
style="width: 200px;"
|
||||
:options="sects"
|
||||
clearable
|
||||
@change="sectChange"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="载具号">
|
||||
<label slot="label">载 具 号:</label>
|
||||
<el-input v-model="form.storagevehicle_code" style="width: 200px;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="锁定类型" prop="lock_type">
|
||||
<el-select
|
||||
v-model="form.lock_type"
|
||||
style="width: 200px;"
|
||||
placeholder=""
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.d_lock_type"
|
||||
:key="item.id"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="容量" prop="capacity">
|
||||
<label slot="label">容 量:</label>
|
||||
<el-input v-model="form.capacity" style="width: 200px;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="承受重量" prop="weight">
|
||||
<el-input v-model="form.weight" style="width: 200px;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="宽度" prop="width">
|
||||
<label slot="label">宽 度:</label>
|
||||
<el-input v-model="form.width" style="width: 200px;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="深度" prop="zdepth">
|
||||
<label slot="label">深 度:</label>
|
||||
<el-input v-model="form.zdepth" style="width: 200px;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="高度" prop="height">
|
||||
<label slot="label">高 度:</label>
|
||||
<el-input v-model="form.height" style="width: 200px;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="高度类型" prop="material_height_type">
|
||||
<el-select
|
||||
v-model="form.material_height_type"
|
||||
placeholder=""
|
||||
style="width: 200px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.ST_HEIGHT_TYPE"
|
||||
:key="item.id"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="是否临时" prop="is_tempstruct">
|
||||
<el-radio v-model="form.is_tempstruct" label="1">是</el-radio>
|
||||
<el-radio v-model="form.is_tempstruct" label="0">否</el-radio>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="备注">
|
||||
<label slot="label">备 注:</label>
|
||||
<el-input v-model="form.remark" style="width: 550px;" rows="2" type="textarea" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="text" @click="crud.cancelCU">取消</el-button>
|
||||
<el-button :loading="crud.cu === 2" type="primary" @click="crud.submitCU">确认</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
ref="table"
|
||||
v-loading="crud.loading"
|
||||
:data="crud.data"
|
||||
size="mini"
|
||||
style="width: 100%;"
|
||||
@selection-change="crud.selectionChangeHandler"
|
||||
>
|
||||
<!--
|
||||
<el-table-column type="selection" width="55" />
|
||||
-->
|
||||
<el-table-column prop="struct_code" label="仓位编码" width="120" show-overflow-tooltip />
|
||||
<el-table-column prop="struct_name" label="仓位名称" width="150" show-overflow-tooltip />
|
||||
<el-table-column prop="simple_name" label="仓位简称" width="100" />
|
||||
<el-table-column prop="sect_name" label="所属库区" width="150" />
|
||||
<el-table-column prop="stor_name" label="所属仓库" width="150" />
|
||||
<el-table-column prop="storagevehicle_code" label="载具号" min-width="120" show-overflow-tooltip />
|
||||
<el-table-column prop="lock_type" label="锁定类型" min-width="120" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ dict.label.d_lock_type[scope.row.lock_type] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="sect_name" label="库区名称" />
|
||||
<el-table-column label="是否启用" align="center" prop="is_used">
|
||||
<template slot-scope="scope">
|
||||
<el-switch
|
||||
:value="format_is_used(scope.row.is_used)"
|
||||
active-color="#409EFF"
|
||||
inactive-color="#F56C6C"
|
||||
@change="changeEnabled(scope.row)"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="taskdtl_type" label="锁定任务类型" width="150" :formatter="taskdtl_typeFormat" />
|
||||
<el-table-column prop="task_code" label="锁定任务编码" width="150" />
|
||||
<el-table-column prop="inv_code" label="锁定单据编码" width="150" />
|
||||
<el-table-column prop="inv_type" label="锁定单据类型" width="150" :formatter="invtypeFormat" />
|
||||
<el-table-column prop="remark" label="备注" show-overflow-tooltip />
|
||||
<el-table-column
|
||||
v-permission="['admin','structattr:edit','structattr:del']"
|
||||
label="操作"
|
||||
fixed="right"
|
||||
width="120px"
|
||||
align="center"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<udOperation
|
||||
:data="scope.row"
|
||||
:permission="permission"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import crudStructattr from '@/api/wms/basedata/st/structattr'
|
||||
import CRUD, { crud, form, header, presenter } from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import udOperation from '@crud/UD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import crudSectattr from '@/api/wms/basedata/st/sectattr'
|
||||
/* import checkoutbill from "@/api/wms/st/core/outbill/checkoutbill";*/
|
||||
|
||||
const defaultForm = {
|
||||
struct_id: null,
|
||||
cascader: null,
|
||||
struct_code: null,
|
||||
struct_name: null,
|
||||
simple_name: null,
|
||||
sect_id: null,
|
||||
sect_code: null,
|
||||
sect_name: null,
|
||||
stor_id: null,
|
||||
stor_code: null,
|
||||
stor_name: null,
|
||||
stor_type: null,
|
||||
capacity: null,
|
||||
width: null,
|
||||
height: null,
|
||||
zdepth: null,
|
||||
weight: null,
|
||||
xqty: null,
|
||||
yqty: null,
|
||||
zqty: null,
|
||||
is_tempstruct: '0',
|
||||
create_id: null,
|
||||
create_name: null,
|
||||
create_time: null,
|
||||
update_optid: null,
|
||||
update_optname: null,
|
||||
update_time: null,
|
||||
is_delete: null,
|
||||
back_ground_color: null,
|
||||
front_ground_color: null,
|
||||
back_ground_pic: null,
|
||||
font_direction_scode: null,
|
||||
is_used: true,
|
||||
is_zdepth: null,
|
||||
storagevehicle_id: null,
|
||||
storagevehicle_code: null,
|
||||
storagevehicle_type: null,
|
||||
is_emptyvehicle: null,
|
||||
storagevehicle_qty: null,
|
||||
lock_type: null,
|
||||
material_height_type: null,
|
||||
ext_id: null,
|
||||
remark: null
|
||||
}
|
||||
export default {
|
||||
name: 'Structattr',
|
||||
dicts: ['ST_HEIGHT_TYPE', 'd_lock_type', 'SCH_TASK_TYPE_DTL'],
|
||||
components: { pagination, crudOperation, rrOperation, udOperation },
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '仓位',
|
||||
optShow: { add: true, reset: true },
|
||||
url: 'api/structattr',
|
||||
idField: 'struct_id',
|
||||
crudMethod: { ...crudStructattr }
|
||||
})
|
||||
},
|
||||
data() {
|
||||
const numberOne = (rule, value, callback) => {
|
||||
const numReg = /^[+]{0,1}(\d+)$|^[+]{0,1}(\d+\.\d+)$/
|
||||
const numRe = new RegExp(numReg)
|
||||
if (value) {
|
||||
if (!numRe.test(value)) {
|
||||
callback(new Error('只能输入数字'))
|
||||
} else {
|
||||
callback()
|
||||
}
|
||||
} else {
|
||||
callback()
|
||||
}
|
||||
}
|
||||
return {
|
||||
sects: [],
|
||||
invtypelist: [],
|
||||
permission: {},
|
||||
rules: {
|
||||
struct_id: [
|
||||
{ required: true, message: '仓位标识不能为空', trigger: 'blur' }
|
||||
],
|
||||
struct_code: [
|
||||
{ required: true, message: '仓位编码不能为空', trigger: 'blur' }
|
||||
],
|
||||
struct_name: [
|
||||
{ required: true, message: '仓位名称不能为空', trigger: 'blur' }
|
||||
],
|
||||
sect_id: [
|
||||
{ required: true, message: '库区标识不能为空', trigger: 'blur' }
|
||||
],
|
||||
stor_id: [
|
||||
{ required: true, message: '仓库标识不能为空', trigger: 'blur' }
|
||||
],
|
||||
capacity: [
|
||||
{ required: false, message: '不能为空', trigger: 'blur' },
|
||||
{ validator: numberOne }
|
||||
],
|
||||
weight: [
|
||||
{ required: false, message: '不能为空', trigger: 'blur' },
|
||||
{ validator: numberOne }
|
||||
],
|
||||
width: [
|
||||
{ required: false, message: '不能为空', trigger: 'blur' },
|
||||
{ validator: numberOne }
|
||||
],
|
||||
height: [
|
||||
{ required: false, message: '不能为空', trigger: 'blur' },
|
||||
{ validator: numberOne }
|
||||
],
|
||||
zdepth: [
|
||||
{ required: false, message: '不能为空', trigger: 'blur' },
|
||||
{ validator: numberOne }
|
||||
],
|
||||
material_height_type: [
|
||||
{ required: true, message: '物料高度类型不能为空', trigger: 'blur' }
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
crudSectattr.getSect({}).then(res => {
|
||||
this.sects = res.content
|
||||
})
|
||||
/* checkoutbill.getInvTypes().then(res => {
|
||||
this.invtypelist = res
|
||||
})*/
|
||||
},
|
||||
methods: {
|
||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
return true
|
||||
},
|
||||
[CRUD.HOOK.afterToEdit](crud, form) {
|
||||
const val = []
|
||||
val[0] = form.stor_id
|
||||
val[1] = form.sect_id
|
||||
form.cascader = val
|
||||
},
|
||||
sectChange(val) {
|
||||
this.form.sect_id = val[1]
|
||||
},
|
||||
invtypeFormat(row) {
|
||||
for (const item of this.invtypelist) {
|
||||
if (item.code === row.inv_type) {
|
||||
return item.name
|
||||
}
|
||||
}
|
||||
},
|
||||
taskdtl_typeFormat(row) {
|
||||
return this.dict.label.SCH_TASK_TYPE_DTL[row.taskdtl_type]
|
||||
},
|
||||
sectQueryChange(val) {
|
||||
if (val.length === 1) {
|
||||
this.query.stor_id = val[0]
|
||||
this.query.sect_id = ''
|
||||
}
|
||||
if (val.length === 0) {
|
||||
this.query.sect_id = ''
|
||||
this.query.stor_id = ''
|
||||
}
|
||||
if (val.length === 2) {
|
||||
this.query.stor_id = val[0]
|
||||
this.query.sect_id = val[1]
|
||||
}
|
||||
this.crud.toQuery()
|
||||
},
|
||||
// 改变状态
|
||||
format_is_used(is_used) {
|
||||
return is_used === true
|
||||
},
|
||||
changeEnabled(data) {
|
||||
let msg = '此操作将停用,是否继续2!'
|
||||
if (data.is_used === false) {
|
||||
msg = '此操作将启用,是否继续2!'
|
||||
}
|
||||
|
||||
this.$confirm(msg, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
data.is_used = !data.is_used
|
||||
crudStructattr.changeActive(data).then(res => {
|
||||
this.crud.toQuery()
|
||||
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
}).catch(() => {
|
||||
data.is_used = !data.is_used
|
||||
})
|
||||
}).catch(() => {
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -223,6 +223,7 @@ import StructDiv from '@/views/wms/pub/StructDialog'
|
||||
import crudProductIn from '@/views/wms/storage_manage/product/productIn/productin'
|
||||
import crudPoint from '@/views/wms/scheduler_manage/point/point'
|
||||
import AddBox from '@/views/wms/storage_manage/product/productIn/AddBox'
|
||||
import crudSectattr from '@/api/wms/basedata/st/sectattr'
|
||||
|
||||
export default {
|
||||
name: 'DivDialog',
|
||||
@@ -285,7 +286,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
open() {
|
||||
crudProductIn.getSect({ 'stor_id': this.storId }).then(res => {
|
||||
crudSectattr.getSect({ 'stor_id': this.storId }).then(res => {
|
||||
this.sects = res.content
|
||||
})
|
||||
const area_type = 'A1_RK01'
|
||||
|
||||
Reference in New Issue
Block a user