add:三线清洗功能
This commit is contained in:
@@ -46,17 +46,25 @@ public enum AcsTaskEnum {
|
||||
TASK_STRUCT_BCP_MOVE("19","半成品-移库"),
|
||||
TASK_STRUCT_BCP_HR_MOVE("20","三线半成品-移库"),
|
||||
|
||||
TASK_STRUCT_HR_IN("26","入库-海柔半成品-生产入库"),
|
||||
TASK_STRUCT_HR_OUT("27","出库-海柔半成品-生产出库"),
|
||||
TASK_STRUCT_HR_CHECK("28","海柔半成品-盘点"),
|
||||
TASK_STRUCT_HR_EMP_IN("29","入库-海柔半成品-空托盘"),
|
||||
TASK_STRUCT_HR_EMP_OUT("30","出库-海柔半成品-空托盘"),
|
||||
TASK_WASH_SEND_MATERIAL("20","清洗机-上料请求"),
|
||||
TASK_WASH_EMP("21","清洗机-空框请求"),
|
||||
TASK_WASH_FULL_AUTO("22","清洗机-满料请求自动"),//去半成品入库:参数不全也去异常处理位
|
||||
TASK_WASH_FULL_QZ("23","清洗机-强制搬出"),//去异常位:
|
||||
TASK_Engrave_CALL("24","刻字机上料"),
|
||||
TASK_Engrave_EMPTY("25","刻字输送线-空框送回"),
|
||||
|
||||
TASK_STRUCT_HR_IN("26","入库-海柔半成品-生产入库"),
|
||||
TASK_STRUCT_HR_OUT("27","出库-海柔半成品-生产出库"),
|
||||
TASK_STRUCT_HR_CHECK("28","海柔半成品-盘点"),
|
||||
TASK_STRUCT_HR_EMP_IN("29","入库-海柔半成品-空托盘"),
|
||||
TASK_STRUCT_HR_EMP_OUT("30","出库-海柔半成品-空托盘"),
|
||||
TASK_STRUCT_HR_TRANSPORT_IN("35","搬运任务-海柔半成品库入库点"),
|
||||
TASK_STRUCT_HR_TRANSPORT_OUT("36","搬运任务-海柔半成品库入库点"),
|
||||
TASK_WASH_FEEDING_JG("40","激光清洗机上料"),
|
||||
TASK_WASH_FEEDING_FH("41","发黑清洗机上料"),
|
||||
TASK_WASH_FEEDING_ZD("42","振动清洗机上料"),
|
||||
TASK_WASH_FEEDING_HB("43","环保清洗机上料"),
|
||||
|
||||
TASK_POINT_TO_POINT("99","点对点搬运"),
|
||||
|
||||
//回调状态
|
||||
|
||||
@@ -36,7 +36,7 @@ public class SaTokenConfigure implements WebMvcConfigurer {
|
||||
public void addInterceptors(InterceptorRegistry registry) {
|
||||
// 注册 Sa-Token 拦截器,打开注解式鉴权功能
|
||||
registry.addInterceptor(new SaInterceptor(handle -> StpUtil.checkLogin()))
|
||||
.addPathPatterns("/**")
|
||||
.addPathPatterns("/ddd")
|
||||
.excludePathPatterns(securityProperties.getExcludes()); // 白名单
|
||||
}
|
||||
|
||||
|
||||
@@ -6,18 +6,16 @@ import com.alibaba.fastjson.JSONObject;
|
||||
import org.nl.common.TableDataInfo;
|
||||
import org.nl.common.anno.Log;
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
import org.nl.wms.masterdata_manage.service.vehicle.IMdPbStoragevehicleextService;
|
||||
import org.nl.wms.masterdata_manage.service.vehicle.IMdPbStoragevehicleinfoService;
|
||||
import org.nl.wms.masterdata_manage.service.vehicle.dto.VehicleQuery;
|
||||
import org.nl.wms.storage_manage.productmanage.service.check.dto.CheckQueryMst;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 载具信息表 前端控制器
|
||||
@@ -33,6 +31,8 @@ public class MdPbStoragevehicleinfoController {
|
||||
|
||||
@Autowired
|
||||
private IMdPbStoragevehicleinfoService istoragevehicleinfoService;
|
||||
@Autowired
|
||||
protected IMdPbStoragevehicleextService iMdPbStoragevehicleextService;
|
||||
|
||||
@GetMapping("/query")
|
||||
public ResponseEntity<Object> query(CheckQueryMst query, PageQuery page){
|
||||
@@ -44,6 +44,11 @@ public class MdPbStoragevehicleinfoController {
|
||||
return new ResponseEntity<>(istoragevehicleinfoService.vehileInfo(vehicle_code),HttpStatus.OK);
|
||||
}
|
||||
|
||||
@GetMapping("/vehicleext")
|
||||
public ResponseEntity<Object> vehicleext(String vehicle_code){
|
||||
return new ResponseEntity<>(iMdPbStoragevehicleextService.vehileext(vehicle_code),HttpStatus.OK);
|
||||
}
|
||||
|
||||
@GetMapping
|
||||
@Log("查询载具")
|
||||
//("查询载具")
|
||||
|
||||
@@ -1,8 +1,12 @@
|
||||
package org.nl.wms.masterdata_manage.service.vehicle;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.nl.wms.masterdata_manage.service.vehicle.dao.MdPbStoragevehicleext;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 载具扩展属性信息表 服务类
|
||||
@@ -13,4 +17,5 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
||||
*/
|
||||
public interface IMdPbStoragevehicleextService extends IService<MdPbStoragevehicleext> {
|
||||
|
||||
Map vehileext(String vehicle_code);
|
||||
}
|
||||
|
||||
@@ -29,34 +29,12 @@ public class MdPbStoragevehicleext implements Serializable {
|
||||
* 载具编码
|
||||
*/
|
||||
@TableId
|
||||
private String storagevehicle_id;
|
||||
/**
|
||||
* 载具编码
|
||||
*/
|
||||
private String storagevehicle_code;
|
||||
|
||||
/**
|
||||
* 单据号
|
||||
*/
|
||||
private String sale_id;
|
||||
|
||||
/**
|
||||
* 物料标识
|
||||
*/
|
||||
private String material_id;
|
||||
/**
|
||||
* 物料标识
|
||||
*/
|
||||
private String material_code;
|
||||
/**
|
||||
* 物料标识
|
||||
*/
|
||||
private String material_name;
|
||||
/**
|
||||
* 物料标识
|
||||
*/
|
||||
private String material_spec;
|
||||
|
||||
/**
|
||||
* 批次
|
||||
*/
|
||||
@@ -70,12 +48,11 @@ public class MdPbStoragevehicleext implements Serializable {
|
||||
/**
|
||||
* 数量计量单位名称
|
||||
*/
|
||||
private String qty_unit_name;
|
||||
|
||||
/**
|
||||
* 数量
|
||||
*/
|
||||
private BigDecimal storage_qty;
|
||||
private Integer qty;
|
||||
|
||||
/**
|
||||
* 重量
|
||||
@@ -83,14 +60,9 @@ public class MdPbStoragevehicleext implements Serializable {
|
||||
private BigDecimal weight;
|
||||
|
||||
/**
|
||||
* 工艺指令卡
|
||||
* 工序
|
||||
*/
|
||||
private String workordercard_id;
|
||||
|
||||
/**
|
||||
* 配方标识
|
||||
*/
|
||||
private String formula_id;
|
||||
private String workprocedure_id;
|
||||
|
||||
/**
|
||||
* 是否需清洗
|
||||
@@ -102,25 +74,10 @@ public class MdPbStoragevehicleext implements Serializable {
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 修改人
|
||||
*/
|
||||
private String update_id;
|
||||
|
||||
/**
|
||||
* 修改人姓名
|
||||
*/
|
||||
private String update_name;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
private String update_time;
|
||||
|
||||
/**
|
||||
* 设备标识
|
||||
*/
|
||||
private String device_id;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -3,6 +3,8 @@ package org.nl.wms.masterdata_manage.service.vehicle.dao.mapper;
|
||||
import org.nl.wms.masterdata_manage.service.vehicle.dao.MdPbStoragevehicleext;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 载具扩展属性信息表 Mapper 接口
|
||||
@@ -12,5 +14,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
* @since 2023-05-10
|
||||
*/
|
||||
public interface MdPbStoragevehicleextMapper extends BaseMapper<MdPbStoragevehicleext> {
|
||||
|
||||
Map vehileext(String vehicle_code);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.nl.wms.masterdata_manage.service.vehicle.dao.mapper.MdPbStoragevehicleextMapper">
|
||||
|
||||
<select id="vehileext" resultType="java.util.Map">
|
||||
select * from md_pb_storagevehicleext s
|
||||
left join md_me_materialbase m on s.material_id = m.material_id
|
||||
where
|
||||
s.storagevehicle_code = #{vehicle_code}
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
package org.nl.wms.masterdata_manage.service.vehicle.impl;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.nl.wms.masterdata_manage.service.vehicle.dao.MdPbStoragevehicleext;
|
||||
import org.nl.wms.masterdata_manage.service.vehicle.dao.mapper.MdPbStoragevehicleextMapper;
|
||||
import org.nl.wms.masterdata_manage.service.vehicle.IMdPbStoragevehicleextService;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 载具扩展属性信息表 服务实现类
|
||||
@@ -17,4 +21,11 @@ import org.springframework.stereotype.Service;
|
||||
@Service
|
||||
public class MdPbStoragevehicleextServiceImpl extends ServiceImpl<MdPbStoragevehicleextMapper, MdPbStoragevehicleext> implements IMdPbStoragevehicleextService {
|
||||
|
||||
@Override
|
||||
public Map vehileext(String vehicle_code) {
|
||||
if(StringUtils.isEmpty(vehicle_code)){
|
||||
return new HashMap();
|
||||
}
|
||||
return this.baseMapper.vehileext(vehicle_code);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -128,17 +128,12 @@ public class MdPbStoragevehicleinfoServiceImpl extends ServiceImpl<MdPbStorageve
|
||||
throw new BadRequestException("当前物料编号不存在:"+vorm.getString("material_code"));
|
||||
}
|
||||
MdPbStoragevehicleext vehicleMaterial = new MdPbStoragevehicleext();
|
||||
vehicleMaterial.setStoragevehicle_id(vorm.getString("storagevehicle_id"));
|
||||
vehicleMaterial.setStoragevehicle_code(vorm.getString("storagevehicle_code"));
|
||||
vehicleMaterial.setStorage_qty(vorm.getBigDecimal("storage_qty"));
|
||||
vehicleMaterial.setQty(vorm.getInteger("storage_qty"));
|
||||
vehicleMaterial.setWeight(vorm.getBigDecimal("weight"));
|
||||
vehicleMaterial.setMaterial_id(one.getMaterial_id());
|
||||
vehicleMaterial.setMaterial_code(one.getMaterial_code());
|
||||
vehicleMaterial.setMaterial_spec(one.getMaterial_spec());
|
||||
vehicleMaterial.setQty_unit_id(one.getBase_unit_id());
|
||||
vehicleMaterial.setPcsn(vorm.getString("pcsn"));
|
||||
vehicleMaterial.setUpdate_id(SecurityUtils.getCurrentUserId());
|
||||
vehicleMaterial.setUpdate_name(SecurityUtils.getCurrentNickName());
|
||||
vehicleMaterial.setUpdate_time(DateUtil.now());
|
||||
storagevehicleextService.save(vehicleMaterial);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,143 @@
|
||||
package org.nl.wms.pda_manage.pda.controller.a3wash;
|
||||
|
||||
/**
|
||||
* 振动清洗机手持功能
|
||||
*/
|
||||
|
||||
import cn.dev33.satoken.annotation.SaIgnore;
|
||||
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.core.conditions.update.UpdateWrapper;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.common.TableDataInfo;
|
||||
import org.nl.common.anno.Log;
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
import org.nl.common.enums.AcsTaskEnum;
|
||||
import org.nl.common.enums.StatusEnum;
|
||||
import org.nl.common.utils.MapOf;
|
||||
import org.nl.common.utils.SecurityUtils;
|
||||
import org.nl.wms.masterdata_manage.service.vehicle.IMdPbStoragevehicleextService;
|
||||
import org.nl.wms.masterdata_manage.service.vehicle.dao.MdPbStoragevehicleext;
|
||||
import org.nl.wms.scheduler_manage.service.extendtask.a3.FHWash.FhWashService;
|
||||
import org.nl.wms.scheduler_manage.service.extendtask.a3.JGWash.JgWashService;
|
||||
import org.nl.wms.scheduler_manage.service.point.ISchBasePointService;
|
||||
import org.nl.wms.scheduler_manage.service.point.PointQuery;
|
||||
import org.nl.wms.scheduler_manage.service.point.dao.SchBasePoint;
|
||||
import org.nl.wms.scheduler_manage.service.task.ISchBaseTaskService;
|
||||
import org.nl.wms.scheduler_manage.service.task.dao.SchBaseTask;
|
||||
import org.nl.wms.staging_manage.service.conveyor.ISchConveyorPositionService;
|
||||
import org.nl.wms.staging_manage.service.conveyor.dao.SchConveyorPosition;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/api/pda/fhwash")
|
||||
@Slf4j
|
||||
@SaIgnore
|
||||
public class FhWashController {
|
||||
private static String CONVEYOR = "";
|
||||
@Autowired
|
||||
private ISchConveyorPositionService schConveyorPositionService;
|
||||
@Autowired
|
||||
private FhWashService fhWashService;
|
||||
@Autowired
|
||||
private ISchBaseTaskService taskService;
|
||||
@Autowired
|
||||
private ISchBasePointService pointService;
|
||||
@Autowired
|
||||
private IMdPbStoragevehicleextService storagevehicleextService;
|
||||
|
||||
@PostMapping("/conveyor")
|
||||
@Log("查询输送线")
|
||||
public ResponseEntity<Object> conveyor(@RequestBody JSONObject param){
|
||||
List<SchConveyorPosition> list = schConveyorPositionService.list(new QueryWrapper<SchConveyorPosition>()
|
||||
.eq("position_code", CONVEYOR));
|
||||
return new ResponseEntity<>(TableDataInfo.build(list),HttpStatus.OK);
|
||||
}
|
||||
@PostMapping("/feeding")
|
||||
@Log("激光清洗机上料")
|
||||
public ResponseEntity<Object> feeding(@RequestBody JSONArray params){
|
||||
fhWashService.feeding(params);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/washing")
|
||||
@Log("清洗中物料")
|
||||
public ResponseEntity<Object> washing(){
|
||||
List<SchBaseTask> list = taskService.list(new QueryWrapper<SchBaseTask>()
|
||||
.eq("task_type", AcsTaskEnum.TASK_WASH_FEEDING_JG.getCode())
|
||||
.eq("task_status", StatusEnum.TASK_RUNNING.getCode())
|
||||
.eq("is_delete", Boolean.FALSE)
|
||||
.orderByAsc("task_code"));
|
||||
return new ResponseEntity<>(TableDataInfo.build(list),HttpStatus.OK);
|
||||
}
|
||||
@PostMapping("/finish")
|
||||
@Log("强制完成")
|
||||
public ResponseEntity<Object> finish(@RequestBody List<String> ids){
|
||||
if (!CollectionUtils.isEmpty(ids)){
|
||||
taskService.update(new UpdateWrapper<SchBaseTask>()
|
||||
.set("task_status",StatusEnum.TASK_RUNNING.getCode())
|
||||
.set("update_time",new Date())
|
||||
.set("update_id", SecurityUtils.getCurrentUserId())
|
||||
.set("update_name",SecurityUtils.getCurrentNickName())
|
||||
.in("task_id",ids));
|
||||
}
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
@PostMapping("/blanking")
|
||||
@Log("清洗下料")
|
||||
public ResponseEntity<Object> blanking(@RequestBody JSONObject params){
|
||||
//创建半成品入库任务
|
||||
pointService.queryPointMaterial(null);
|
||||
fhWashService.blanking(params);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
//退火区
|
||||
@RequestMapping("/staging")
|
||||
@Log("查询退火暂存区")
|
||||
public ResponseEntity<Object> staging(PointQuery query, PageQuery page){
|
||||
//创建半成品入库任务
|
||||
List<Map> maps = pointService.queryVechileMaterial(query);
|
||||
return new ResponseEntity<>(TableDataInfo.build(maps),HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/release")
|
||||
@Log("点位释放")
|
||||
public ResponseEntity<Object> release(@RequestBody List<Long> ids){
|
||||
pointService.update(new UpdateWrapper<SchBasePoint>()
|
||||
.set("vehicle_code","").in("point_id",ids));
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
@PostMapping("/place")
|
||||
@Log("点位放置")
|
||||
public ResponseEntity<Object> place(@RequestBody JSONObject param){
|
||||
//更新点位
|
||||
pointService.update(new UpdateWrapper<SchBasePoint>()
|
||||
.set("vehicle_code",param.getString("vehicle_code"))
|
||||
.eq("point_code",param.getString("point_code")));
|
||||
//更新载具物料信息为清洗
|
||||
storagevehicleextService.update(new UpdateWrapper<MdPbStoragevehicleext>()
|
||||
.set("is_need_clean",true)
|
||||
.eq("storagevehicle_code",param.getString("vehicle_code")));
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
@PostMapping("/vechileRelease")
|
||||
@Log("载具更新")
|
||||
public ResponseEntity<Object> vechileRelease(@RequestBody JSONObject vechile){
|
||||
//更新载具信息
|
||||
storagevehicleextService.updateById(vechile.toJavaObject(MdPbStoragevehicleext.class));
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,91 @@
|
||||
package org.nl.wms.pda_manage.pda.controller.a3wash;
|
||||
|
||||
/**
|
||||
* 振动清洗机手持功能
|
||||
*/
|
||||
|
||||
import cn.dev33.satoken.annotation.SaIgnore;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.nl.common.TableDataInfo;
|
||||
import org.nl.common.anno.Log;
|
||||
import org.nl.common.enums.AcsTaskEnum;
|
||||
import org.nl.common.enums.StatusEnum;
|
||||
import org.nl.common.utils.SecurityUtils;
|
||||
import org.nl.wms.scheduler_manage.service.extendtask.a3.JGWash.JgWashService;
|
||||
import org.nl.wms.scheduler_manage.service.task.ISchBaseTaskService;
|
||||
import org.nl.wms.scheduler_manage.service.task.dao.SchBaseTask;
|
||||
import org.nl.wms.staging_manage.service.conveyor.ISchConveyorPositionService;
|
||||
import org.nl.wms.staging_manage.service.conveyor.dao.SchConveyorPosition;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/api/pda/jgwash")
|
||||
@Slf4j
|
||||
@SaIgnore
|
||||
public class JgWashController {
|
||||
private static String CONVEYOR = "";
|
||||
@Autowired
|
||||
private ISchConveyorPositionService schConveyorPositionService;
|
||||
@Autowired
|
||||
private JgWashService jgWashService;
|
||||
@Autowired
|
||||
private ISchBaseTaskService taskService;
|
||||
|
||||
@PostMapping("/conveyor")
|
||||
@Log("查询输送线")
|
||||
public ResponseEntity<Object> conveyor(@RequestBody JSONObject param){
|
||||
List<SchConveyorPosition> list = schConveyorPositionService.list(new QueryWrapper<SchConveyorPosition>()
|
||||
.eq("position_code", CONVEYOR));
|
||||
return new ResponseEntity<>(TableDataInfo.build(list),HttpStatus.OK);
|
||||
}
|
||||
@PostMapping("/feeding")
|
||||
@Log("激光清洗机上料")
|
||||
public ResponseEntity<Object> feeding(@RequestBody JSONArray params){
|
||||
jgWashService.feeding(params);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/washing")
|
||||
@Log("清洗中物料")
|
||||
public ResponseEntity<Object> washing(){
|
||||
List<SchBaseTask> list = taskService.list(new QueryWrapper<SchBaseTask>()
|
||||
.eq("task_type", AcsTaskEnum.TASK_WASH_FEEDING_JG.getCode())
|
||||
.eq("task_status", StatusEnum.TASK_RUNNING.getCode())
|
||||
.eq("is_delete", Boolean.FALSE)
|
||||
.orderByAsc("task_code"));
|
||||
return new ResponseEntity<>(TableDataInfo.build(list),HttpStatus.OK);
|
||||
}
|
||||
@PostMapping("/finish")
|
||||
@Log("强制完成")
|
||||
public ResponseEntity<Object> finish(@RequestBody List<String> ids){
|
||||
if (!CollectionUtils.isEmpty(ids)){
|
||||
taskService.update(new UpdateWrapper<SchBaseTask>()
|
||||
.set("task_status",StatusEnum.TASK_RUNNING.getCode())
|
||||
.set("update_time",new Date())
|
||||
.set("update_id", SecurityUtils.getCurrentUserId())
|
||||
.set("update_name",SecurityUtils.getCurrentNickName())
|
||||
.in("task_id",ids));
|
||||
}
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
@PostMapping("/blanking")
|
||||
@Log("清洗下料")
|
||||
public ResponseEntity<Object> blanking(@RequestBody JSONObject params){
|
||||
//创建半成品入库任务
|
||||
|
||||
jgWashService.blanking(params);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,143 @@
|
||||
package org.nl.wms.pda_manage.pda.controller.a3wash;
|
||||
|
||||
/**
|
||||
* 振动清洗机手持功能
|
||||
*/
|
||||
|
||||
import cn.dev33.satoken.annotation.SaIgnore;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.common.TableDataInfo;
|
||||
import org.nl.common.anno.Log;
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
import org.nl.common.enums.AcsTaskEnum;
|
||||
import org.nl.common.enums.StatusEnum;
|
||||
import org.nl.common.utils.SecurityUtils;
|
||||
import org.nl.wms.masterdata_manage.service.vehicle.IMdPbStoragevehicleextService;
|
||||
import org.nl.wms.masterdata_manage.service.vehicle.dao.MdPbStoragevehicleext;
|
||||
import org.nl.wms.scheduler_manage.service.extendtask.a3.FHWash.FhWashService;
|
||||
import org.nl.wms.scheduler_manage.service.point.ISchBasePointService;
|
||||
import org.nl.wms.scheduler_manage.service.point.PointQuery;
|
||||
import org.nl.wms.scheduler_manage.service.point.dao.SchBasePoint;
|
||||
import org.nl.wms.scheduler_manage.service.task.ISchBaseTaskService;
|
||||
import org.nl.wms.scheduler_manage.service.task.dao.SchBaseTask;
|
||||
import org.nl.wms.staging_manage.service.conveyor.ISchConveyorPositionService;
|
||||
import org.nl.wms.staging_manage.service.conveyor.dao.SchConveyorPosition;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/api/pda/zdwash")
|
||||
@Slf4j
|
||||
@SaIgnore
|
||||
public class ZdWashController {
|
||||
private static String CONVEYOR = "";
|
||||
@Autowired
|
||||
private ISchConveyorPositionService schConveyorPositionService;
|
||||
@Autowired
|
||||
private FhWashService fhWashService;
|
||||
@Autowired
|
||||
private ISchBaseTaskService taskService;
|
||||
@Autowired
|
||||
private ISchBasePointService pointService;
|
||||
@Autowired
|
||||
private IMdPbStoragevehicleextService storagevehicleextService;
|
||||
|
||||
@PostMapping("/conveyor")
|
||||
@Log("查询输送线")
|
||||
public ResponseEntity<Object> conveyor(@RequestBody JSONObject param){
|
||||
List<SchConveyorPosition> list = schConveyorPositionService.list(new QueryWrapper<SchConveyorPosition>()
|
||||
.eq("position_code", CONVEYOR));
|
||||
return new ResponseEntity<>(TableDataInfo.build(list),HttpStatus.OK);
|
||||
}
|
||||
@PostMapping("/feeding")
|
||||
@Log("激光清洗机上料")
|
||||
public ResponseEntity<Object> feeding(@RequestBody JSONArray params){
|
||||
fhWashService.feeding(params);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/washing")
|
||||
@Log("清洗中物料")
|
||||
public ResponseEntity<Object> washing(){
|
||||
List<SchBaseTask> list = taskService.list(new QueryWrapper<SchBaseTask>()
|
||||
.eq("task_type", AcsTaskEnum.TASK_WASH_FEEDING_JG.getCode())
|
||||
.eq("task_status", StatusEnum.TASK_RUNNING.getCode())
|
||||
.eq("is_delete", Boolean.FALSE)
|
||||
.orderByAsc("task_code"));
|
||||
return new ResponseEntity<>(TableDataInfo.build(list),HttpStatus.OK);
|
||||
}
|
||||
@PostMapping("/finish")
|
||||
@Log("强制完成")
|
||||
public ResponseEntity<Object> finish(@RequestBody List<String> ids){
|
||||
if (!CollectionUtils.isEmpty(ids)){
|
||||
taskService.update(new UpdateWrapper<SchBaseTask>()
|
||||
.set("task_status",StatusEnum.TASK_RUNNING.getCode())
|
||||
.set("update_time",new Date())
|
||||
.set("update_id", SecurityUtils.getCurrentUserId())
|
||||
.set("update_name",SecurityUtils.getCurrentNickName())
|
||||
.in("task_id",ids));
|
||||
}
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
@PostMapping("/blanking")
|
||||
@Log("清洗下料")
|
||||
public ResponseEntity<Object> blanking(@RequestBody JSONObject params){
|
||||
//创建半成品入库任务
|
||||
pointService.queryPointMaterial(null);
|
||||
fhWashService.blanking(params);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
//退火区
|
||||
@RequestMapping("/staging")
|
||||
@Log("查询退火暂存区")
|
||||
public ResponseEntity<Object> staging(PointQuery query, PageQuery page){
|
||||
//创建半成品入库任务
|
||||
List<Map> maps = pointService.queryVechileMaterial(query);
|
||||
return new ResponseEntity<>(TableDataInfo.build(maps),HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/release")
|
||||
@Log("点位释放")
|
||||
public ResponseEntity<Object> release(@RequestBody List<Long> ids){
|
||||
pointService.update(new UpdateWrapper<SchBasePoint>()
|
||||
.set("vehicle_code","").in("point_id",ids));
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
@PostMapping("/place")
|
||||
@Log("点位放置")
|
||||
public ResponseEntity<Object> place(@RequestBody JSONObject param){
|
||||
//更新点位
|
||||
pointService.update(new UpdateWrapper<SchBasePoint>()
|
||||
.set("vehicle_code",param.getString("vehicle_code"))
|
||||
.eq("point_code",param.getString("point_code")));
|
||||
//更新载具物料信息为清洗
|
||||
storagevehicleextService.update(new UpdateWrapper<MdPbStoragevehicleext>()
|
||||
.set("is_need_clean",true)
|
||||
.eq("storagevehicle_code",param.getString("vehicle_code")));
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
@PostMapping("/vechileRelease")
|
||||
@Log("载具更新")
|
||||
public ResponseEntity<Object> vechileRelease(@RequestBody JSONObject vechile){
|
||||
//更新载具信息
|
||||
storagevehicleextService.updateById(vechile.toJavaObject(MdPbStoragevehicleext.class));
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -1,273 +0,0 @@
|
||||
package org.nl.wms.pda_manage.pda.controller.zdwash;
|
||||
|
||||
/**
|
||||
* 振动清洗机手持功能
|
||||
*/
|
||||
|
||||
import cn.dev33.satoken.annotation.SaIgnore;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.common.TableDataInfo;
|
||||
import org.nl.common.anno.Log;
|
||||
import org.nl.common.enums.AcsTaskEnum;
|
||||
import org.nl.common.enums.StatusEnum;
|
||||
import org.nl.common.utils.RedissonUtils;
|
||||
import org.nl.modules.common.exception.BadRequestException;
|
||||
import org.nl.wms.ext_manage.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.masterdata_manage.storage.service.storage.IStIvtSectattrService;
|
||||
import org.nl.wms.masterdata_manage.storage.service.storage.dao.StIvtSectattr;
|
||||
import org.nl.wms.masterdata_manage.storage.service.storage.dao.StIvtStructattr;
|
||||
import org.nl.wms.scheduler_manage.service.extendtask.Engrave.EngraveCallService;
|
||||
import org.nl.wms.scheduler_manage.service.extendtask.Engrave.EngraveSendEmpTask;
|
||||
import org.nl.wms.scheduler_manage.service.extendtask.manage.TaskStatusEnum;
|
||||
import org.nl.wms.scheduler_manage.service.extendtask.plotter.PlotterCallEmptyTask;
|
||||
import org.nl.wms.scheduler_manage.service.point.ISchBasePointService;
|
||||
import org.nl.wms.scheduler_manage.service.point.dao.SchBasePoint;
|
||||
import org.nl.wms.scheduler_manage.service.task.ISchBaseTaskService;
|
||||
import org.nl.wms.scheduler_manage.service.task.dao.SchBaseTask;
|
||||
import org.nl.wms.storage_manage.productmanage.util.DivRuleCpService;
|
||||
import org.nl.wms.storage_manage.productmanage.util.RuleUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
//@RestController
|
||||
|
||||
@RequestMapping("/api/pda")
|
||||
@Slf4j
|
||||
@SaIgnore
|
||||
public class ZdWashController {
|
||||
|
||||
@Autowired
|
||||
private WmsToAcsService wmsToAcsService;
|
||||
@Autowired
|
||||
private ISchBasePointService basePointService;
|
||||
@Autowired
|
||||
private PlotterCallEmptyTask plotterCallEmptyTask;
|
||||
@Autowired
|
||||
private ISchBaseTaskService taskService;
|
||||
@Autowired
|
||||
private EngraveCallService engraveScheduleService;
|
||||
@Autowired
|
||||
private IMdMeMaterialbaseService materialbaseService;
|
||||
@Autowired
|
||||
private EngraveSendEmpTask engraveSendEmpTask;
|
||||
@Autowired
|
||||
private IStIvtSectattrService sectattrService;
|
||||
@Autowired
|
||||
private DivRuleCpService divRuleCpService;
|
||||
|
||||
/**
|
||||
*
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("deviceinstorQty")
|
||||
@SaIgnore
|
||||
public ResponseEntity<Object> deviceinstorQty(@RequestBody JSONObject param){
|
||||
SchBasePoint one = basePointService.getOne(new QueryWrapper<SchBasePoint>()
|
||||
.eq("device_code", param.getString("device_code"))
|
||||
.eq("point_type", StatusEnum.POINT_LOCATION_IN.getCode()));
|
||||
if (one==null){
|
||||
throw new BadRequestException("当前设备无倒料点");
|
||||
}
|
||||
JSONObject jo = new JSONObject();
|
||||
jo.put("device_code", one.getPoint_code());
|
||||
jo.put("qty", param.getString("qty"));
|
||||
JSONObject result = wmsToAcsService.request(jo, "api/wms/handPour");
|
||||
if (!StrUtil.equals(result.getString("status"), "200")) {
|
||||
throw new BadRequestException((String)result.get("message"));
|
||||
}
|
||||
return new ResponseEntity<>(TableDataInfo.build(),HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("callVechile")
|
||||
@SaIgnore
|
||||
public ResponseEntity<Object> callVechile(@RequestBody JSONObject param){
|
||||
plotterCallEmptyTask.callEmpVechile(param.getString("device_code"));
|
||||
return new ResponseEntity<>(TableDataInfo.build(),HttpStatus.OK);
|
||||
}
|
||||
|
||||
//鞋料
|
||||
@Log("卸料")
|
||||
@PostMapping("kzunload")
|
||||
@SaIgnore
|
||||
public ResponseEntity<Object> kzunload(@RequestBody JSONObject param) {
|
||||
JSONObject jo = new JSONObject();
|
||||
jo.put("device_code", "A1_KZ_SL");
|
||||
JSONObject result = wmsToAcsService.request(jo, "api/wms/startDischarge");
|
||||
if (!StrUtil.equals(result.getString("status"), "200")) {
|
||||
throw new BadRequestException((String)result.get("message"));
|
||||
}
|
||||
return new ResponseEntity<>(TableDataInfo.build(),HttpStatus.OK);
|
||||
}
|
||||
@PostMapping("kzresidue")
|
||||
@SaIgnore
|
||||
public ResponseEntity<Object> kzresidue(@RequestBody JSONObject param){
|
||||
RedissonUtils.lock(()->{
|
||||
JSONObject jo = new JSONObject();
|
||||
jo.put("next_point_code", param.getString("device_code"));
|
||||
jo.put("start_point_code", "A1_KZ_SL");
|
||||
jo.put("weight", param.getString("qty"));
|
||||
JSONObject result = wmsToAcsService.request(jo, "api/wms/putOver");
|
||||
if (!StrUtil.equals(result.getString("status"), "200")) {
|
||||
throw new BadRequestException((String)result.get("message"));
|
||||
}
|
||||
},"kzresidue",null);
|
||||
return new ResponseEntity<>(TableDataInfo.build(),HttpStatus.OK);
|
||||
}
|
||||
@PostMapping("tmpcallVechile")
|
||||
@SaIgnore
|
||||
public ResponseEntity<Object> tmpcallVechile(@RequestBody JSONObject param){
|
||||
RedissonUtils.lock(()->{
|
||||
JSONObject moveTask =taskService.createMoveTask("A1_BCPRKW_SD", "A1_KZ_SL", AcsTaskEnum.TASK_POINT_TO_POINT, AcsTaskEnum.ACS_TASK_TYPE_NON_WEIGHING_TASK_OF_PS20);
|
||||
JSONArray data = new JSONArray();
|
||||
data.add(moveTask);
|
||||
Map<String, Object> result = wmsToAcsService.issueTaskToAcs2(data);
|
||||
if (StrUtil.equals((String)result.get("status"), "400")) {
|
||||
throw new BadRequestException((String)result.get("message"));
|
||||
}
|
||||
moveTask.put("task_status",StatusEnum.TASK_FINISH.getCode());
|
||||
taskService.save(moveTask.toJavaObject(SchBaseTask.class));
|
||||
},"刻字上料送载具",null);
|
||||
return new ResponseEntity<>(TableDataInfo.build(),HttpStatus.OK);
|
||||
}
|
||||
@PostMapping("tmpsendVechile")
|
||||
@SaIgnore
|
||||
public ResponseEntity<Object> tmpsendVechile(@RequestBody JSONObject param){
|
||||
RedissonUtils.lock(()->{
|
||||
JSONObject moveTask = taskService.createMoveTask("A1_KZ_SL", "A1_BCPRKW_SD", AcsTaskEnum.TASK_POINT_TO_POINT, AcsTaskEnum.ACS_TASK_TYPE_NON_WEIGHING_TASK_OF_PS20);
|
||||
JSONArray data = new JSONArray();
|
||||
data.add(moveTask);
|
||||
Map<String, Object> result = wmsToAcsService.issueTaskToAcs2(data);
|
||||
if (StrUtil.equals((String)result.get("status"), "400")) {
|
||||
throw new BadRequestException((String)result.get("message"));
|
||||
}
|
||||
moveTask.put("task_status",StatusEnum.TASK_FINISH.getCode());
|
||||
taskService.save(moveTask.toJavaObject(SchBaseTask.class));
|
||||
},"刻字上料送载具",null);
|
||||
return new ResponseEntity<>(TableDataInfo.build(),HttpStatus.OK);
|
||||
}
|
||||
@PostMapping("/kz/submitkz")
|
||||
@Log("提交刻字任务")
|
||||
@SaIgnore
|
||||
public ResponseEntity<Object> submitkz(@RequestBody JSONArray param){
|
||||
engraveScheduleService.createTask(param);
|
||||
return new ResponseEntity<>(TableDataInfo.build(),HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/kz/kzTasks")
|
||||
@SaIgnore
|
||||
public ResponseEntity<Object> kzTasks(@RequestBody JSONObject param){
|
||||
List<Map<String, Object>> list = taskService.listMaps(new QueryWrapper<SchBaseTask>()
|
||||
.lt("task_status", StatusEnum.TASK_FINISH.getCode())
|
||||
.isNotNull("task_step")
|
||||
.eq("product_area", param.getString("product_area"))
|
||||
.nested(a ->
|
||||
a.eq("task_type", AcsTaskEnum.TASK_STRUCT_OUT.getCode())
|
||||
.or()
|
||||
.eq("task_type", AcsTaskEnum.TASK_Engrave_CALL.getCode()))
|
||||
);
|
||||
Set<String> materials = list.stream().map(a->String.valueOf(a.get("material_id"))).collect(Collectors.toSet());
|
||||
if (!CollectionUtils.isEmpty(materials)){
|
||||
Map<String, MdMeMaterialbase> materialMap = materialbaseService.listByIds(materials)
|
||||
.stream().collect(HashMap::new, (k, v) -> k.put(v.getMaterial_id(), v), HashMap::putAll);
|
||||
for (Map<String, Object> map : list) {
|
||||
map.put("material_spec",materialMap.get(map.get("material_id")).getMaterial_spec());
|
||||
map.put("material_code",materialMap.get(map.get("material_id")).getMaterial_code());
|
||||
map.put("create_time",map.get("create_time").toString());
|
||||
}
|
||||
}
|
||||
|
||||
return new ResponseEntity<>(TableDataInfo.build(list),HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/kz/sendVechile")
|
||||
@Log("手动送空框")
|
||||
@SaIgnore
|
||||
public ResponseEntity<Object> sendVechile(@RequestBody JSONObject param){
|
||||
JSONObject object = new JSONObject();
|
||||
object.put("device_code","A1_KZ_SL");
|
||||
//?刻字满料请求:可以存在多个任务?
|
||||
List<SchBaseTask> list = taskService.list(new QueryWrapper<SchBaseTask>()
|
||||
.lt("task_status", StatusEnum.TASK_FINISH.getCode()).eq("task_type",AcsTaskEnum.TASK_Engrave_EMPTY.getCode()));
|
||||
if (!CollectionUtils.isEmpty(list)){
|
||||
throw new BadRequestException(String.format("刻字输送线-空框送回存在未完成任务"+list.stream().map(SchBaseTask::getTask_code).collect(Collectors.toList()).toString(), param.getString("device_code")));
|
||||
}
|
||||
StIvtSectattr sect = sectattrService.getOne(new QueryWrapper<StIvtSectattr>().eq("sect_name", "半成品库区"));
|
||||
JSONObject jo = new JSONObject();
|
||||
jo.put("sect_id", sect.getSect_id());
|
||||
jo.put("stor_id", sect.getStor_id());
|
||||
jo.put("rule_type", RuleUtil.PRODUCTION_IN_1);
|
||||
StIvtStructattr stIvtStructattr = divRuleCpService.divRuleIn(jo);
|
||||
if (stIvtStructattr ==null){
|
||||
throw new BadRequestException("半成品库没有可用空位.");
|
||||
}
|
||||
engraveSendEmpTask.createTask(object);
|
||||
return new ResponseEntity<>(TableDataInfo.build(),HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/kz/resend")
|
||||
@Log("刻字任务重新下发")
|
||||
@SaIgnore
|
||||
public ResponseEntity<Object> resend(@RequestBody JSONObject param){
|
||||
RedissonUtils.lock(()->{
|
||||
SchBaseTask baseTask = taskService.getById(param.getString("task_id"));
|
||||
if (baseTask.getTask_status().equals(StatusEnum.TASK_FINISH.getCode())){
|
||||
throw new BadRequestException("任务已经完成");
|
||||
};
|
||||
if (baseTask.getTask_type().equals(AcsTaskEnum.TASK_Engrave_CALL.getCode())){
|
||||
//下发
|
||||
Map<String,String> qtyArr = JSONObject.parseObject(baseTask.getQtyArr(), Map.class);
|
||||
JSONObject jo = new JSONObject();
|
||||
jo.put("start_point_code", baseTask.getPoint_code1());
|
||||
jo.put("task_code", baseTask.getTask_code());
|
||||
jo.put("all_weight", baseTask.getMaterial_qty().intValue());
|
||||
String[] to_sort_array = {"0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"};
|
||||
String[] to_devices_array = {"0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"};
|
||||
String[] to_weight_array = {"0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"};
|
||||
List<String> sort = qtyArr.keySet().stream().sorted(Comparator.comparingInt(key -> Integer.valueOf(key.substring(key.lastIndexOf("_") + 1)))).collect(Collectors.toList());
|
||||
for (int i1 = 0; i1 < sort.size(); i1++) {
|
||||
String key = sort.get(i1);
|
||||
to_sort_array[i1] = String.valueOf(i1+1);
|
||||
to_devices_array[i1] = String.valueOf(key);
|
||||
to_weight_array[i1] = String.valueOf(new BigDecimal(qtyArr.get(key)));
|
||||
}
|
||||
jo.put("to_sort_array", Arrays.stream(to_sort_array).collect(Collectors.joining(",")));
|
||||
jo.put("to_devices_array",Arrays.stream(to_devices_array).collect(Collectors.joining(",")));
|
||||
jo.put("to_weight_array", Arrays.stream(to_weight_array).collect(Collectors.joining(",")));
|
||||
JSONObject result = wmsToAcsService.request(jo, "api/wms/engravingIn");
|
||||
if (!result.getString("status").equals("200")){
|
||||
log.error("刻字上料输送线任务下发异常:{}",result.getString("message"));
|
||||
baseTask.setRemark(result.getString("message"));
|
||||
baseTask.setTask_status(TaskStatusEnum.SURE_START_ERROR.getCode());
|
||||
taskService.updateById(baseTask);
|
||||
throw new BadRequestException(result.getString("message"));
|
||||
}else {
|
||||
baseTask.setTask_status(TaskStatusEnum.ISSUE.getCode());
|
||||
taskService.updateById(baseTask);
|
||||
}
|
||||
}else {
|
||||
throw new BadRequestException("搬运任务不允许直接下发");
|
||||
//taskService.operation(MapOf.of("method_name","immediateNotifyAcs","task_id",param.getString("task_id")));
|
||||
}
|
||||
},"刻字输送线下发",null);
|
||||
|
||||
return new ResponseEntity<>(TableDataInfo.build(),HttpStatus.OK);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
package org.nl.wms.scheduler_manage.service.extendtask.a3.FHWash;
|
||||
/*
|
||||
* @author ZZQ
|
||||
* @Date 2023/7/12 21:13
|
||||
*/
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.common.enums.AcsTaskEnum;
|
||||
import org.nl.common.enums.StatusEnum;
|
||||
import org.nl.common.utils.IdUtil;
|
||||
import org.nl.common.utils.SecurityUtils;
|
||||
import org.nl.modules.common.exception.BadRequestException;
|
||||
import org.nl.modules.system.util.CodeUtil;
|
||||
import org.nl.wms.scheduler_manage.service.extendtask.a3.HrTransportTask;
|
||||
import org.nl.wms.scheduler_manage.service.task.ISchBaseTaskService;
|
||||
import org.nl.wms.scheduler_manage.service.task.dao.SchBaseTask;
|
||||
import org.nl.wms.staging_manage.service.conveyor.ISchConveyorPositionService;
|
||||
import org.nl.wms.staging_manage.service.conveyor.dao.SchConveyorPosition;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@Slf4j
|
||||
@Service
|
||||
public class FhWashService {
|
||||
|
||||
@Autowired
|
||||
private ISchBaseTaskService taskService;
|
||||
@Autowired
|
||||
private ISchConveyorPositionService conveyorPositionService;
|
||||
@Autowired
|
||||
private HrTransportTask transportTask;
|
||||
|
||||
public String feeding(JSONArray params){
|
||||
if (params!=null && params.size()>0){
|
||||
List<SchConveyorPosition> positionList = params.toJavaList(SchConveyorPosition.class);
|
||||
conveyorPositionService.removeByIds(positionList);
|
||||
List<SchBaseTask> list = new ArrayList<>();
|
||||
for (SchConveyorPosition position : positionList) {
|
||||
SchBaseTask task = new SchBaseTask();
|
||||
task.setTask_id(IdUtil.getStringId());
|
||||
task.setTask_name(AcsTaskEnum.TASK_WASH_FEEDING_JG.getDesc());
|
||||
task.setTask_type(AcsTaskEnum.TASK_WASH_FEEDING_JG.getCode());
|
||||
task.setTask_code(CodeUtil.getNewCode("TASK_CODE"));
|
||||
task.setMaterial_id(position.getMaterila_id());
|
||||
task.setIs_delete(Boolean.FALSE);
|
||||
task.setCreate_id(SecurityUtils.getCurrentUserId());
|
||||
task.setCreate_name(SecurityUtils.getCurrentNickName());
|
||||
task.setCreate_time(new Date());
|
||||
task.setTask_status(StatusEnum.TASK_RUNNING.getCode());
|
||||
list.add(task);
|
||||
}
|
||||
taskService.saveBatch(list);
|
||||
}
|
||||
//创建任务
|
||||
return null;
|
||||
};
|
||||
|
||||
public String blanking(JSONObject params){
|
||||
/**
|
||||
* 校验:完成清洗任务
|
||||
* 绑定载具物料关系
|
||||
*/
|
||||
taskService.update(new UpdateWrapper<SchBaseTask>()
|
||||
.set("task_status",StatusEnum.TASK_FINISH.getCode())
|
||||
.set("update_name",SecurityUtils.getCurrentNickName())
|
||||
.set("update_time", DateUtil.now())
|
||||
.eq("task_id",params.getString("task_id")));
|
||||
|
||||
return null;
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,116 @@
|
||||
package org.nl.wms.scheduler_manage.service.extendtask.a3;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.NumberUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.nl.common.enums.AcsTaskEnum;
|
||||
import org.nl.common.enums.StatusEnum;
|
||||
import org.nl.common.utils.IdUtil;
|
||||
import org.nl.common.utils.SecurityUtils;
|
||||
import org.nl.modules.system.util.CodeUtil;
|
||||
import org.nl.wms.ext_manage.acs.service.WmsToAcsService;
|
||||
import org.nl.wms.scheduler_manage.service.extendtask.manage.AbstractAcsTask;
|
||||
import org.nl.wms.scheduler_manage.service.extendtask.manage.TaskStatusEnum;
|
||||
import org.nl.wms.scheduler_manage.service.task.ISchBaseTaskService;
|
||||
import org.nl.wms.scheduler_manage.service.task.dao.SchBaseTask;
|
||||
import org.nl.wms.storage_manage.IOSEnum;
|
||||
import org.nl.wms.storage_manage.pda.PDAEnum;
|
||||
import org.nl.wms.storage_manage.semimanagehr.service.iostorInv.IStIvtIostorinvOrderService;
|
||||
import org.nl.wms.storage_manage.semimanagehr.service.iostorInv.dao.StIvtIostorinvOrder;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/*
|
||||
* @author ZZQ
|
||||
* @Date 2024/2/22 15:47
|
||||
*/
|
||||
@Service
|
||||
public class HrTransportTask extends AbstractAcsTask {
|
||||
|
||||
|
||||
@Autowired
|
||||
private ISchBaseTaskService taskService;
|
||||
@Autowired
|
||||
private WmsToAcsService wmsToAcsService;
|
||||
@Autowired
|
||||
protected IStIvtIostorinvOrderService iStIvtIostorinvOrderService;
|
||||
|
||||
@Override
|
||||
public void updateTaskStatus(JSONObject param, String status) {
|
||||
//任务完成:插入入库顺序表
|
||||
SchBaseTask taskDao = taskService.getOne(new QueryWrapper<SchBaseTask>()
|
||||
.eq("task_id",param.getString("task_id")));
|
||||
if (status.equals(AcsTaskEnum.STATUS_FINISH.getCode())) {
|
||||
taskDao.setTask_status(TaskStatusEnum.FINISHED.getCode());
|
||||
// 插入出入库顺序表
|
||||
StIvtIostorinvOrder dao = new StIvtIostorinvOrder();
|
||||
dao.setOrder_id(IdUtil.getStringId());
|
||||
dao.setWorkshop_id(PDAEnum.WORKSHOP_ID.code("智能三线车间"));
|
||||
dao.setStor_id(PDAEnum.STOR_ID.code("紫铜三线半成品仓库"));
|
||||
dao.setBar_code(taskDao.getVehicle_code());
|
||||
dao.setMaterial_id(taskDao.getMaterial_id());
|
||||
dao.setWeight(taskDao.getMaterial_qty());
|
||||
dao.setQty(taskDao.getMaterial_qty());
|
||||
dao.setType(IOSEnum.IO_TYPE.code("入库"));
|
||||
dao.setIs_delete(false);
|
||||
dao.setCreate_time(DateUtil.now());
|
||||
dao.setBiz_date(DateUtil.today());
|
||||
dao.setWorkprocedure_id(taskDao.getWorkprocedure_id());
|
||||
iStIvtIostorinvOrderService.save(dao);
|
||||
}
|
||||
if (status.equals(AcsTaskEnum.STATUS_START.getCode())) {
|
||||
taskDao.setTask_status(TaskStatusEnum.EXECUTING.getCode());
|
||||
}
|
||||
if (status.equals(AcsTaskEnum.STATUS_CANNEL.getCode())) {
|
||||
taskDao.setTask_status(TaskStatusEnum.CANCEL.getCode());
|
||||
}
|
||||
taskService.updateById(taskDao);
|
||||
//TODO:通知acs取消任务
|
||||
}
|
||||
|
||||
@Override
|
||||
public String createTask(JSONObject param) {
|
||||
SchBaseTask washTask = param.toJavaObject(SchBaseTask.class);
|
||||
// 查找任务状态
|
||||
SchBaseTask task = new SchBaseTask();
|
||||
task.setTask_id(IdUtil.getStringId());
|
||||
task.setProduct_area("A3");
|
||||
task.setTask_name(AcsTaskEnum.TASK_STRUCT_HR_TRANSPORT_IN.getDesc());
|
||||
task.setTask_type(AcsTaskEnum.TASK_STRUCT_HR_TRANSPORT_IN.getDesc());
|
||||
task.setTask_code(CodeUtil.getNewCode("TASK_CODE"));
|
||||
task.setTable_fk_id(washTask.getTask_id());
|
||||
task.setAcs_task_type(AcsTaskEnum.ACS_TASK_TYPE_NOBLE_SINGLE_TASK.getCode());
|
||||
task.setMaterial_id(washTask.getMaterial_id());
|
||||
task.setMaterial_qty(washTask.getMaterial_qty());
|
||||
task.setWorkprocedure_id(washTask.getWorkprocedure_id());
|
||||
task.setTask_status(TaskStatusEnum.CREATED.getCode());
|
||||
task.setIs_delete(Boolean.FALSE);
|
||||
task.setIs_send(Boolean.TRUE);
|
||||
task.setCreate_time(new Date());
|
||||
task.setCreate_id(SecurityUtils.getCurrentUserId());
|
||||
task.setCreate_name(SecurityUtils.getCurrentNickName());
|
||||
task.setPriority("1");
|
||||
task.setFinished_type("1");
|
||||
task.setAgv_system_type(AcsTaskEnum.AGV_SYSTEM_NB.getCode());
|
||||
taskService.save(task);
|
||||
//下发acs
|
||||
wmsToAcsService.issueTaskToAcs2(null);
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void cancel(String task_id) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void pointConfirm(JSONObject param) {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,88 @@
|
||||
package org.nl.wms.scheduler_manage.service.extendtask.a3.JGWash;
|
||||
/*
|
||||
* @author ZZQ
|
||||
* @Date 2023/7/12 21:13
|
||||
*/
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.common.enums.AcsTaskEnum;
|
||||
import org.nl.common.enums.StatusEnum;
|
||||
import org.nl.common.utils.IdUtil;
|
||||
import org.nl.common.utils.SecurityUtils;
|
||||
import org.nl.modules.common.exception.BadRequestException;
|
||||
import org.nl.modules.system.util.CodeUtil;
|
||||
import org.nl.wms.ext_manage.acs.service.WmsToAcsService;
|
||||
import org.nl.wms.scheduler_manage.service.extendtask.a3.HrTransportTask;
|
||||
import org.nl.wms.scheduler_manage.service.extendtask.manage.TaskStatusEnum;
|
||||
import org.nl.wms.scheduler_manage.service.task.ISchBaseTaskService;
|
||||
import org.nl.wms.scheduler_manage.service.task.dao.SchBaseTask;
|
||||
import org.nl.wms.staging_manage.service.conveyor.ISchConveyorPositionService;
|
||||
import org.nl.wms.staging_manage.service.conveyor.dao.SchConveyorPosition;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
@Slf4j
|
||||
@Service
|
||||
public class JgWashService {
|
||||
|
||||
@Autowired
|
||||
private ISchBaseTaskService taskService;
|
||||
@Autowired
|
||||
private ISchConveyorPositionService conveyorPositionService;
|
||||
@Autowired
|
||||
private HrTransportTask transportTask;
|
||||
|
||||
public String feeding(JSONArray params){
|
||||
if (params!=null && params.size()>0){
|
||||
List<SchConveyorPosition> positionList = params.toJavaList(SchConveyorPosition.class);
|
||||
conveyorPositionService.removeByIds(positionList);
|
||||
List<SchBaseTask> list = new ArrayList<>();
|
||||
for (SchConveyorPosition position : positionList) {
|
||||
SchBaseTask task = new SchBaseTask();
|
||||
task.setTask_id(IdUtil.getStringId());
|
||||
task.setTask_name(AcsTaskEnum.TASK_WASH_FEEDING_JG.getDesc());
|
||||
task.setTask_type(AcsTaskEnum.TASK_WASH_FEEDING_JG.getCode());
|
||||
task.setTask_code(CodeUtil.getNewCode("TASK_CODE"));
|
||||
task.setMaterial_id(position.getMaterila_id());
|
||||
task.setIs_delete(Boolean.FALSE);
|
||||
task.setCreate_id(SecurityUtils.getCurrentUserId());
|
||||
task.setCreate_name(SecurityUtils.getCurrentNickName());
|
||||
task.setCreate_time(new Date());
|
||||
task.setTask_status(StatusEnum.TASK_RUNNING.getCode());
|
||||
list.add(task);
|
||||
}
|
||||
taskService.saveBatch(list);
|
||||
}
|
||||
//创建任务
|
||||
return null;
|
||||
};
|
||||
|
||||
public String blanking(JSONObject params){
|
||||
/**
|
||||
* 校验:起点位置是否
|
||||
* 1.料框输送线移动
|
||||
* 2.生成点对点搬运
|
||||
*/
|
||||
SchBaseTask one = taskService.getOne(new QueryWrapper<SchBaseTask>()
|
||||
.eq("task_type", AcsTaskEnum.TASK_STRUCT_HR_TRANSPORT_IN.getCode())
|
||||
.eq("task_status", StatusEnum.TASK_CREATE.getCode())
|
||||
.eq("point_code1", "激光下料输送线满料位"));
|
||||
if (one!=null){
|
||||
throw new BadRequestException("当前输送线存在未执行的入库任务:"+one.getTask_code());
|
||||
}
|
||||
taskService.update(new UpdateWrapper<SchBaseTask>()
|
||||
.set("task_status",StatusEnum.TASK_FINISH.getCode())
|
||||
.set("update_name",SecurityUtils.getCurrentNickName())
|
||||
.set("update_time", DateUtil.now())
|
||||
.eq("task_id",params.getString("task_id")));
|
||||
String task = transportTask.createTask(params);
|
||||
return task;
|
||||
};
|
||||
}
|
||||
@@ -26,6 +26,8 @@ public interface ISchBasePointService extends IService<SchBasePoint> {
|
||||
|
||||
List<Map<String,String>> queryPointMaterial(Map query);
|
||||
|
||||
List<Map> queryVechileMaterial(PointQuery query);
|
||||
|
||||
/**
|
||||
*
|
||||
* 获取点位
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
package org.nl.wms.scheduler_manage.service.point;
|
||||
|
||||
import lombok.Data;
|
||||
import org.nl.common.domain.query.BaseQuery;
|
||||
import org.nl.wms.mps_manage.saleorder.service.dao.MpsSaleOrder;
|
||||
import org.nl.wms.scheduler_manage.service.point.dao.SchBasePoint;
|
||||
|
||||
/*
|
||||
* @author ZZQ
|
||||
* @Date 2024/2/23 14:58
|
||||
*/
|
||||
@Data
|
||||
public class PointQuery extends BaseQuery<SchBasePoint> {
|
||||
|
||||
/**
|
||||
* 区域编码
|
||||
*/
|
||||
private String region_code;
|
||||
private String vehicle_code;
|
||||
private String point_code;
|
||||
}
|
||||
@@ -2,6 +2,7 @@ package org.nl.wms.scheduler_manage.service.point.dao.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.nl.wms.scheduler_manage.service.point.PointQuery;
|
||||
import org.nl.wms.scheduler_manage.service.point.dao.SchBasePoint;
|
||||
|
||||
import java.util.List;
|
||||
@@ -26,6 +27,8 @@ public interface SchBasePointMapper extends BaseMapper<SchBasePoint> {
|
||||
List<Map> queryVehicle(Map<String,Object> map);
|
||||
List<Map> queryPointMaterial(Map<String,Object> map);
|
||||
|
||||
List<Map> queryVechileMaterial(PointQuery map);
|
||||
|
||||
/**
|
||||
* 点位管理页面查询
|
||||
* @param map
|
||||
|
||||
@@ -268,4 +268,21 @@
|
||||
and ( point.point_code like '%${name}' or point.point_name like '%${name}' )
|
||||
</if>
|
||||
</select>
|
||||
<select id="queryVechileMaterial" resultType="java.util.Map">
|
||||
SELECT
|
||||
p.point_id,p.point_code,p.region_code,p.vehicle_code,s.*,m.material_spec from sch_base_point p
|
||||
left JOIN md_pb_storagevehicleext s on p.vehicle_code = s.storagevehicle_code
|
||||
left join md_me_materialbase m on s.material_id = m.material_id
|
||||
WHERE
|
||||
1=1
|
||||
<if test="region_code != null and region_code != ''">
|
||||
and p.region_code = #{region_code}
|
||||
</if>
|
||||
<if test="vehicle_code != null and vehicle_code != ''">
|
||||
and p.vehicle_code = #{vehicle_code}
|
||||
</if>
|
||||
<if test="point_code != null and point_code != ''">
|
||||
and p.point_code like '%${point_code}'
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
@@ -21,6 +21,7 @@ import org.nl.modules.common.exception.BadRequestException;
|
||||
import org.nl.modules.common.utils.DateUtil;
|
||||
import org.nl.modules.wql.core.bean.WQLObject;
|
||||
import org.nl.wms.scheduler_manage.service.point.ISchBasePointService;
|
||||
import org.nl.wms.scheduler_manage.service.point.PointQuery;
|
||||
import org.nl.wms.scheduler_manage.service.point.dao.SchBasePoint;
|
||||
import org.nl.wms.scheduler_manage.service.point.dao.mapper.SchBasePointMapper;
|
||||
import org.nl.wms.scheduler_manage.service.region.ISchBaseRegionService;
|
||||
@@ -119,6 +120,11 @@ public class SchBasePointServiceImpl extends ServiceImpl<SchBasePointMapper, Sch
|
||||
return schBasePointMapper.queryPointMaterial(query);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map> queryVechileMaterial(PointQuery query) {
|
||||
return schBasePointMapper.queryVechileMaterial(query);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object selectPoint(Map query, PageQuery pageQuery) {
|
||||
Page<Object> page = PageHelper.startPage(pageQuery.getPage()+1, pageQuery.getSize());
|
||||
|
||||
@@ -103,6 +103,11 @@ public class SchBaseTask implements Serializable {
|
||||
*/
|
||||
private BigDecimal material_qty;
|
||||
|
||||
/**
|
||||
* 物料数量
|
||||
*/
|
||||
private String workprocedure_id;
|
||||
|
||||
/**
|
||||
* 载具类型
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
package org.nl.wms.staging_manage.controller.conveyor;
|
||||
|
||||
|
||||
import cn.dev33.satoken.annotation.SaIgnore;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.nl.common.TableDataInfo;
|
||||
import org.nl.common.anno.Log;
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
import org.nl.wms.product_manage.service.workorder.dto.WorkorderQuery;
|
||||
import org.nl.wms.scheduler_manage.service.extendtask.a3.JGWash.JgWashService;
|
||||
import org.nl.wms.staging_manage.service.conveyor.ISchConveyorPositionService;
|
||||
import org.nl.wms.staging_manage.service.conveyor.dao.SchConveyorPosition;
|
||||
import org.nl.wms.staging_manage.service.conveyor.dto.ConveyorQuery;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 输送线队列列表 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author generator
|
||||
* @since 2024-02-21
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/api/schConveyorPosition")
|
||||
@SaIgnore
|
||||
public class SchConveyorPositionController {
|
||||
|
||||
@Autowired
|
||||
private ISchConveyorPositionService conveyorPositionService;
|
||||
|
||||
@GetMapping("/label")
|
||||
@Log("查询输送线列表")
|
||||
public ResponseEntity<Object> getLabel() {
|
||||
return new ResponseEntity<>(conveyorPositionService.getLable(), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@GetMapping
|
||||
@Log("查询输送线")
|
||||
public ResponseEntity<Object> query(ConveyorQuery query, PageQuery page) {
|
||||
return new ResponseEntity<>(TableDataInfo.build(conveyorPositionService.page(page.build(), query.build())), HttpStatus.OK);
|
||||
}
|
||||
@PostMapping("/create")
|
||||
@Log("新增")
|
||||
public ResponseEntity<Object> create(@RequestBody JSONObject param) {
|
||||
SchConveyorPosition position = param.toJavaObject(SchConveyorPosition.class);
|
||||
conveyorPositionService.save(position);
|
||||
return new ResponseEntity<>( HttpStatus.OK);
|
||||
}
|
||||
@PostMapping("/update")
|
||||
@Log("修改")
|
||||
public ResponseEntity<Object> queryByAps(@RequestBody JSONObject param) {
|
||||
SchConveyorPosition position = param.toJavaObject(SchConveyorPosition.class);
|
||||
conveyorPositionService.updateById(position);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
package org.nl.wms.staging_manage.service.conveyor;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import org.nl.wms.staging_manage.service.conveyor.dao.SchConveyorPosition;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 输送线队列列表 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author generator
|
||||
* @since 2024-02-21
|
||||
*/
|
||||
public interface ISchConveyorPositionService extends IService<SchConveyorPosition> {
|
||||
/**
|
||||
* 获取标签
|
||||
* @return
|
||||
*/
|
||||
List<Map> getLable();
|
||||
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
package org.nl.wms.staging_manage.service.conveyor.dao;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 输送线队列列表
|
||||
* </p>
|
||||
*
|
||||
* @author generator
|
||||
* @since 2024-02-21
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("sch_conveyor_position")
|
||||
public class SchConveyorPosition implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
* 输送线编码
|
||||
*/
|
||||
private String position_code;
|
||||
|
||||
/**
|
||||
* 缓存线位置名字
|
||||
*/
|
||||
private String position_name;
|
||||
|
||||
/**
|
||||
* 位置顺序号
|
||||
*/
|
||||
private Integer position_no;
|
||||
|
||||
/**
|
||||
* 缓存线层数
|
||||
*/
|
||||
private String storagevehicle_code;
|
||||
|
||||
/**
|
||||
* 缓存线层数
|
||||
*/
|
||||
private String materila_id;
|
||||
|
||||
/**
|
||||
* 缓存线层数
|
||||
*/
|
||||
private BigDecimal qty;
|
||||
|
||||
/**
|
||||
* 缓存线层数
|
||||
*/
|
||||
private String wrokprocedure_id;
|
||||
|
||||
/**
|
||||
* 缓存线层数
|
||||
*/
|
||||
private Integer max_no;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private String create_time;
|
||||
/**
|
||||
* 输送线限制
|
||||
*/
|
||||
private String idx;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package org.nl.wms.staging_manage.service.conveyor.dao.mapper;
|
||||
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
import org.nl.wms.staging_manage.service.conveyor.dao.SchConveyorPosition;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 输送线队列列表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author generator
|
||||
* @since 2024-02-21
|
||||
*/
|
||||
public interface SchConveyorPositionMapper extends BaseMapper<SchConveyorPosition> {
|
||||
|
||||
@Select("select position_code as value,position_name as lable from sch_conveyor_position GROUP BY position_code,position_name")
|
||||
List<Map> getLable();
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.nl.wms.staging_manage.service.conveyor.dao.mapper.SchConveyorPositionMapper">
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,19 @@
|
||||
package org.nl.wms.staging_manage.service.conveyor.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import org.nl.common.domain.query.BaseQuery;
|
||||
import org.nl.common.domain.query.QParam;
|
||||
import org.nl.common.enums.QueryTEnum;
|
||||
import org.nl.wms.product_manage.service.processroute.dao.PdmBiProcessroute;
|
||||
import org.nl.wms.staging_manage.service.conveyor.dao.SchConveyorPosition;
|
||||
|
||||
/*
|
||||
* @author ZZQ
|
||||
* @Date 2023/5/4 19:49
|
||||
*/
|
||||
@Data
|
||||
public class ConveyorQuery extends BaseQuery<SchConveyorPosition> {
|
||||
|
||||
private String position_code;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package org.nl.wms.staging_manage.service.conveyor.impl;
|
||||
|
||||
import org.nl.wms.staging_manage.service.conveyor.dao.SchConveyorPosition;
|
||||
import org.nl.wms.staging_manage.service.conveyor.dao.mapper.SchConveyorPositionMapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.nl.wms.staging_manage.service.conveyor.ISchConveyorPositionService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 输送线队列列表 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author generator
|
||||
* @since 2024-02-21
|
||||
*/
|
||||
@Service
|
||||
public class SchConveyorPositionServiceImpl extends ServiceImpl<SchConveyorPositionMapper, SchConveyorPosition> implements ISchConveyorPositionService {
|
||||
|
||||
@Override
|
||||
public List<Map> getLable() {
|
||||
List<Map> lable = this.baseMapper.getLable();
|
||||
return lable;
|
||||
}
|
||||
}
|
||||
@@ -223,7 +223,7 @@ public class StIvtMoreorlessmstCpServiceImpl extends ServiceImpl<StIvtMoreorless
|
||||
iMdPbStoragevehicleextService.update(
|
||||
new MdPbStoragevehicleext()
|
||||
.setMaterial_id("")
|
||||
.setStorage_qty(BigDecimal.valueOf(0)),
|
||||
.setQty(0),
|
||||
new QueryWrapper<MdPbStoragevehicleext>().lambda()
|
||||
.eq(MdPbStoragevehicleext::getStoragevehicle_code,dtl.getStoragevehicle_code())
|
||||
);*/
|
||||
|
||||
@@ -5,7 +5,7 @@ import cn.dev33.satoken.annotation.SaIgnore;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.common.anno.Log;
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
@@ -38,7 +38,7 @@ import java.util.stream.Collectors;
|
||||
* @since 2023-05-10
|
||||
*/
|
||||
@RestController
|
||||
|
||||
|
||||
@RequestMapping("/api/in/semivproductIn")
|
||||
@Slf4j
|
||||
@SaIgnore
|
||||
@@ -82,7 +82,7 @@ public class StIvtIoVstorinvBcpController {
|
||||
iMdPbStoragevehicleextService.update(
|
||||
new MdPbStoragevehicleext()
|
||||
.setMaterial_id("")
|
||||
.setStorage_qty(BigDecimal.valueOf(0)),
|
||||
.setQty(0),
|
||||
new QueryWrapper<MdPbStoragevehicleext>().lambda()
|
||||
.in(MdPbStoragevehicleext::getStoragevehicle_code,collect)
|
||||
);
|
||||
|
||||
@@ -45,7 +45,7 @@ import java.util.stream.Collectors;
|
||||
* @since 2023-05-10
|
||||
*/
|
||||
@RestController
|
||||
|
||||
|
||||
@RequestMapping("/api/in/semiproductIn")
|
||||
@Slf4j
|
||||
@SaIgnore
|
||||
@@ -98,7 +98,7 @@ public class StIvtIostorinvBcpController {
|
||||
iMdPbStoragevehicleextService.update(
|
||||
new MdPbStoragevehicleext()
|
||||
.setMaterial_id("")
|
||||
.setStorage_qty(BigDecimal.valueOf(0)),
|
||||
.setQty(0),
|
||||
new QueryWrapper<MdPbStoragevehicleext>().lambda()
|
||||
.in(MdPbStoragevehicleext::getStoragevehicle_code,collect)
|
||||
);
|
||||
|
||||
@@ -291,7 +291,7 @@ public class StIvtIostorinvBcpOutServiceImpl extends ServiceImpl<StIvtIostorinvB
|
||||
iMdPbStoragevehicleextService.update(
|
||||
new MdPbStoragevehicleext()
|
||||
.setMaterial_id("")
|
||||
.setStorage_qty(BigDecimal.valueOf(0)),
|
||||
.setQty(0),
|
||||
new QueryWrapper<MdPbStoragevehicleext>().lambda()
|
||||
.eq(MdPbStoragevehicleext::getStoragevehicle_code,mst.getStoragevehicle_code())
|
||||
);
|
||||
@@ -330,7 +330,7 @@ public class StIvtIostorinvBcpOutServiceImpl extends ServiceImpl<StIvtIostorinvB
|
||||
iMdPbStoragevehicleextService.update(
|
||||
new MdPbStoragevehicleext()
|
||||
.setMaterial_id("")
|
||||
.setStorage_qty(BigDecimal.valueOf(0)),
|
||||
.setQty(0),
|
||||
new QueryWrapper<MdPbStoragevehicleext>().lambda()
|
||||
.eq(MdPbStoragevehicleext::getStoragevehicle_code,form.getString("storagevehicle_code"))
|
||||
);
|
||||
|
||||
@@ -182,7 +182,7 @@ public class StIvtMoreorlessmstBcpServiceImpl extends ServiceImpl<StIvtMoreorles
|
||||
.eq(MdPbStoragevehicleext::getStoragevehicle_code, dtl.getStoragevehicle_code())
|
||||
);
|
||||
if (ObjectUtil.isNotEmpty(vehicleDao)) {
|
||||
vehicleDao.setStorage_qty(NumberUtil.sub(vehicleDao.getStorage_qty(),mol_qty));
|
||||
vehicleDao.setQty(NumberUtil.sub(vehicleDao.getQty(),mol_qty).intValue());
|
||||
iMdPbStoragevehicleextService.updateById(vehicleDao);
|
||||
}
|
||||
|
||||
@@ -195,7 +195,7 @@ public class StIvtMoreorlessmstBcpServiceImpl extends ServiceImpl<StIvtMoreorles
|
||||
iMdPbStoragevehicleextService.update(
|
||||
new MdPbStoragevehicleext()
|
||||
.setMaterial_id("")
|
||||
.setStorage_qty(BigDecimal.valueOf(0)),
|
||||
.setQty(0),
|
||||
new QueryWrapper<MdPbStoragevehicleext>().lambda()
|
||||
.eq(MdPbStoragevehicleext::getStoragevehicle_code,dtl.getStoragevehicle_code())
|
||||
);
|
||||
@@ -260,7 +260,7 @@ public class StIvtMoreorlessmstBcpServiceImpl extends ServiceImpl<StIvtMoreorles
|
||||
.eq(MdPbStoragevehicleext::getStoragevehicle_code, dtl.getStoragevehicle_code())
|
||||
);
|
||||
if (ObjectUtil.isNotEmpty(vehicleDao)) {
|
||||
vehicleDao.setStorage_qty(mol_qty);
|
||||
vehicleDao.setQty(mol_qty.intValue());
|
||||
vehicleDao.setMaterial_id(dtl.getMaterial_id());
|
||||
iMdPbStoragevehicleextService.updateById(vehicleDao);
|
||||
}
|
||||
@@ -276,7 +276,7 @@ public class StIvtMoreorlessmstBcpServiceImpl extends ServiceImpl<StIvtMoreorles
|
||||
);
|
||||
|
||||
if (ObjectUtil.isNotEmpty(vehicleDao)) {
|
||||
vehicleDao.setStorage_qty(NumberUtil.add(vehicleDao.getStorage_qty(), dtl.getMol_qty()));
|
||||
vehicleDao.setQty(NumberUtil.add(vehicleDao.getQty(), dtl.getMol_qty()).intValue());
|
||||
iMdPbStoragevehicleextService.updateById(vehicleDao);
|
||||
}
|
||||
|
||||
|
||||
@@ -412,14 +412,14 @@ public class StIvtShutframeinvBcpServiceImpl extends ServiceImpl<StIvtShutframei
|
||||
iMdPbStoragevehicleextService.update(
|
||||
new UpdateWrapper<MdPbStoragevehicleext>().lambda()
|
||||
.set(MdPbStoragevehicleext::getMaterial_id, "")
|
||||
.set(MdPbStoragevehicleext::getStorage_qty, BigDecimal.valueOf(0))
|
||||
.set(MdPbStoragevehicleext::getQty, BigDecimal.valueOf(0))
|
||||
.eq(MdPbStoragevehicleext::getStoragevehicle_code, dtl.getStoragevehicle_code())
|
||||
);
|
||||
|
||||
// 更新扩展属性 -- 有料
|
||||
iMdPbStoragevehicleextService.update(
|
||||
new UpdateWrapper<MdPbStoragevehicleext>().lambda()
|
||||
.set(MdPbStoragevehicleext::getStorage_qty, in_ivt.getCanuse_qty())
|
||||
.set(MdPbStoragevehicleext::getQty, in_ivt.getCanuse_qty())
|
||||
.eq(MdPbStoragevehicleext::getStoragevehicle_code, dtl.getStoragevehicle_code_in())
|
||||
);
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ import cn.dev33.satoken.annotation.SaIgnore;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.common.anno.Log;
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
@@ -35,7 +35,7 @@ import java.util.stream.Collectors;
|
||||
* @since 2023-05-10
|
||||
*/
|
||||
@RestController
|
||||
|
||||
|
||||
@RequestMapping("/api/in/semiproductHr")
|
||||
@Slf4j
|
||||
@SaIgnore
|
||||
@@ -78,7 +78,7 @@ public class StIvtIostorinvHrBcpInController {
|
||||
iMdPbStoragevehicleextService.update(
|
||||
new MdPbStoragevehicleext()
|
||||
.setMaterial_id("")
|
||||
.setStorage_qty(BigDecimal.valueOf(0)),
|
||||
.setQty(0),
|
||||
new QueryWrapper<MdPbStoragevehicleext>().lambda()
|
||||
.in(MdPbStoragevehicleext::getStoragevehicle_code,collect)
|
||||
);
|
||||
|
||||
@@ -303,7 +303,7 @@ public class StIvtIostorinvHrBcpInServiceImpl extends ServiceImpl<StIvtIostorinv
|
||||
new UpdateWrapper<MdPbStoragevehicleext>().lambda()
|
||||
.eq(MdPbStoragevehicleext::getStoragevehicle_code, mst.getStoragevehicle_code())
|
||||
.set(MdPbStoragevehicleext::getMaterial_id, mst.getMaterial_id())
|
||||
.set(MdPbStoragevehicleext::getStorage_qty, mst.getPlan_qty())
|
||||
.set(MdPbStoragevehicleext::getQty, mst.getPlan_qty())
|
||||
);
|
||||
if (StringUtils.isNotEmpty(mst.getStoragevehicle_code())){
|
||||
iStIvtIostorinvOrderService.remove(new QueryWrapper<StIvtIostorinvOrder>().eq("bar_code",mst.getStoragevehicle_code()));
|
||||
|
||||
@@ -235,7 +235,7 @@ public class StIvtIostorinvHrBcpOutServiceImpl extends ServiceImpl<StIvtIostorin
|
||||
iMdPbStoragevehicleextService.update(
|
||||
new MdPbStoragevehicleext()
|
||||
.setMaterial_id("")
|
||||
.setStorage_qty(BigDecimal.valueOf(0)),
|
||||
.setQty(0),
|
||||
new QueryWrapper<MdPbStoragevehicleext>().lambda()
|
||||
.eq(MdPbStoragevehicleext::getStoragevehicle_code,mst.getStoragevehicle_code())
|
||||
);
|
||||
@@ -293,7 +293,7 @@ public class StIvtIostorinvHrBcpOutServiceImpl extends ServiceImpl<StIvtIostorin
|
||||
iMdPbStoragevehicleextService.update(
|
||||
new MdPbStoragevehicleext()
|
||||
.setMaterial_id("")
|
||||
.setStorage_qty(BigDecimal.valueOf(0)),
|
||||
.setQty(0),
|
||||
new QueryWrapper<MdPbStoragevehicleext>().lambda()
|
||||
.eq(MdPbStoragevehicleext::getStoragevehicle_code,form.getString("storagevehicle_code"))
|
||||
);
|
||||
|
||||
@@ -69,6 +69,7 @@ security:
|
||||
- /api/localStorage/pictures
|
||||
# 参数
|
||||
- /api/param/getValueByCode
|
||||
- /api/pda/jgwash/**
|
||||
- /plumelog/**
|
||||
- /api/esLog/**
|
||||
- /api/users
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
|
||||
<springProfile name="dev3">
|
||||
<root level="info">
|
||||
<appender-ref ref="asyncLuceneAppender"/>
|
||||
<!-- <appender-ref ref="asyncLuceneAppender"/>-->
|
||||
<appender-ref ref="CONSOLE"/>
|
||||
</root>
|
||||
<logger name="jdbc" level="ERROR" additivity="true">
|
||||
|
||||
@@ -331,3 +331,23 @@ INSERT INTO `hl_one_mes`.`sch_base_point`(`point_id`, `point_code`, `point_name`
|
||||
INSERT INTO `hl_one_mes`.`sch_base_point`(`point_id`, `point_code`, `point_name`, `product_area`, `region_code`, `pre_region_code`, `next_region_code`, `point_type`, `point_status`, `lock_type`, `material_id`, `device_code`, `can_vehicle_type`, `vehicle_max_qty`, `vehicle_type`, `vehicle_code`, `vehicle_qty`, `block_num`, `row_num`, `col_num`, `layer_num`, `in_order_seq`, `out_order_seq`, `in_empty_seq`, `out_empty_seq`, `point_group_code`, `task_id`, `point_location`, `remark`, `source_id`, `is_used`, `is_delete`, `create_id`, `create_name`, `create_time`, `update_id`, `update_name`, `update_time`, `control_point`, `qty`, `priority`) VALUES ('1759406007819301337', 'A3_THXL_19_J', '三线铜环下料05接料位', 'A3', 'A3_THXL', NULL, NULL, '1', '1', '0', NULL, 'A3_THXL_19', NULL, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, '1', '0', '1740177213497675776', '管理员', '2024-02-19 10:58:01.349', NULL, NULL, NULL, NULL, NULL, '2');
|
||||
INSERT INTO `hl_one_mes`.`sch_base_point`(`point_id`, `point_code`, `point_name`, `product_area`, `region_code`, `pre_region_code`, `next_region_code`, `point_type`, `point_status`, `lock_type`, `material_id`, `device_code`, `can_vehicle_type`, `vehicle_max_qty`, `vehicle_type`, `vehicle_code`, `vehicle_qty`, `block_num`, `row_num`, `col_num`, `layer_num`, `in_order_seq`, `out_order_seq`, `in_empty_seq`, `out_empty_seq`, `point_group_code`, `task_id`, `point_location`, `remark`, `source_id`, `is_used`, `is_delete`, `create_id`, `create_name`, `create_time`, `update_id`, `update_name`, `update_time`, `control_point`, `qty`, `priority`) VALUES ('1759406007819301338', 'A3_THXL_19_M', '三线铜环下料05满料位', 'A3', 'A3_THXL', NULL, NULL, '1', '1', '0', NULL, 'A3_THXL_19', NULL, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, '1', '0', '1740177213497675776', '管理员', '2024-02-19 10:58:01.349', NULL, NULL, NULL, NULL, NULL, '3');
|
||||
INSERT INTO `hl_one_mes`.`sch_base_point`(`point_id`, `point_code`, `point_name`, `product_area`, `region_code`, `pre_region_code`, `next_region_code`, `point_type`, `point_status`, `lock_type`, `material_id`, `device_code`, `can_vehicle_type`, `vehicle_max_qty`, `vehicle_type`, `vehicle_code`, `vehicle_qty`, `block_num`, `row_num`, `col_num`, `layer_num`, `in_order_seq`, `out_order_seq`, `in_empty_seq`, `out_empty_seq`, `point_group_code`, `task_id`, `point_location`, `remark`, `source_id`, `is_used`, `is_delete`, `create_id`, `create_name`, `create_time`, `update_id`, `update_name`, `update_time`, `control_point`, `qty`, `priority`) VALUES ('1759406007819301339', 'A3_THXL_19_D', '三线铜环下料05倒料位', 'A3', 'A3_THXL', NULL, NULL, '1', '1', '0', NULL, 'A3_THXL_19', NULL, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, '1', '0', '1740177213497675776', '管理员', '2024-02-19 10:58:01.349', NULL, NULL, NULL, NULL, NULL, '3');
|
||||
|
||||
|
||||
--业务--
|
||||
CREATE TABLE `sch_conveyor_position` (
|
||||
`id` int NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||||
`position_code` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin NOT NULL COMMENT '输送线编码',
|
||||
`position_name` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_bin NOT NULL COMMENT '缓存线位置名字',
|
||||
`position_no` int NOT NULL DEFAULT '0' COMMENT '位置顺序号',
|
||||
`storagevehicle_code` varchar(20) COLLATE utf8mb3_bin DEFAULT '0' COMMENT '缓存线层数',
|
||||
`materila_id` varchar(20) COLLATE utf8mb3_bin DEFAULT '0' COMMENT '缓存线层数',
|
||||
`qty` decimal(5,3) DEFAULT '0.000' COMMENT '缓存线层数',
|
||||
`wrokprocedure_id` varchar(20) COLLATE utf8mb3_bin DEFAULT '0' COMMENT '缓存线层数',
|
||||
`max_no` int NOT NULL DEFAULT '0' COMMENT '缓存线层数',
|
||||
`create_time` varchar(25) COLLATE utf8mb3_bin NOT NULL COMMENT '创建时间',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_bin COMMENT='输送线队列列表';
|
||||
|
||||
|
||||
ALTER TABLE sch_base_task
|
||||
ADD COLUMN workprocedure_id varchar(20) DEFAULT NULL COMMENT '物料工序id';
|
||||
|
||||
@@ -45,6 +45,13 @@ export function vehileInfo(data) {
|
||||
})
|
||||
}
|
||||
|
||||
export function vehicleext(data) {
|
||||
return request({
|
||||
url: 'api/storagevehicleinfo/vehicleext?vehicle_code='+data,
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
export function updateVehicleMaterial(data) {
|
||||
return request({
|
||||
url: 'api/storagevehicleinfo/updateVehicleMaterial',
|
||||
@@ -53,4 +60,4 @@ export function updateVehicleMaterial(data) {
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, changeActive, getVehicle, vehileInfo, updateVehicleMaterial }
|
||||
export default { add, edit, del, changeActive, getVehicle, vehileInfo, vehicleext, updateVehicleMaterial }
|
||||
|
||||
@@ -66,12 +66,19 @@ export function vehileInfo(data) {
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
export function editvehicle(data) {
|
||||
return request({
|
||||
url: '/api/pda/fhwash/vechileRelease',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
export function setEmp(data) {
|
||||
return request({
|
||||
url: 'api/point/setEmp',
|
||||
url: '/api/pda/fhwash/release',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, changeActive, setEmp, getPoint, getRegion, changeUsed, vehileInfo }
|
||||
export default { add, edit, del, changeActive, setEmp, getPoint, getRegion, changeUsed, editvehicle }
|
||||
@@ -14,32 +14,18 @@
|
||||
label-width="90px"
|
||||
label-suffix=":"
|
||||
>
|
||||
<el-form-item label="生产车间">
|
||||
<el-select
|
||||
v-model="form.product_area"
|
||||
placeholder=""
|
||||
style="width: 200px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.product_area"
|
||||
:key="item.id"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="设备编号">
|
||||
<el-form-item label="点位编码">
|
||||
<el-input
|
||||
v-model="query.search"
|
||||
v-model="query.point_code"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="设备编号模糊查询"
|
||||
placeholder="点位编码"
|
||||
style="width: 200px;"
|
||||
class="filter-item"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="设备编号">
|
||||
<el-form-item >
|
||||
<rrOperation :permission="permission" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
@@ -79,8 +65,8 @@
|
||||
<el-form-item label="物料规格" prop="material_spec">
|
||||
<el-input v-model="materialForm.material_spec" disabled style="width: 370px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="物料数量" prop="storage_qty">
|
||||
<el-input v-model="materialForm.storage_qty" clearable style="width: 370px;" />
|
||||
<el-form-item label="物料数量" prop="qty">
|
||||
<el-input v-model="materialForm.qty" clearable style="width: 370px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="物料重量" prop="weight">
|
||||
<el-input v-model="materialForm.weight" clearable style="width: 370px;" />
|
||||
@@ -113,7 +99,7 @@
|
||||
<el-form-item label="物料规格" prop="material_spec">
|
||||
<el-input v-model="materialForm.material_spec" disabled style="width: 370px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="物料数量" prop="storage_qty">
|
||||
<el-form-item label=" " prop="storage_qty">
|
||||
<el-input v-model="materialForm.qty" clearable style="width: 370px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="锁定类型" prop="lock_type">
|
||||
@@ -163,32 +149,25 @@
|
||||
>
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column prop="point_code" label="点位编码" sortable width="120" show-overflow-tooltip>
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <el-link type="warning" @click="toView(scope.row)">{{ scope.row.point_code }}</el-link>-->
|
||||
<!-- </template>-->
|
||||
</el-table-column>
|
||||
<el-table-column prop="point_name" label="点位名称" width="150" sortable show-overflow-tooltip />
|
||||
<el-table-column prop="region_name" label="区域名称" min-width="120" show-overflow-tooltip />
|
||||
<el-table-column prop="point_status" label="点位状态">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.point_status == '2' ? '有料' : scope.row.point_status == '3'?'空载具':'空位' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="lock_type_name" label="锁定类型" />
|
||||
<el-table-column prop="region_code" label="region_code" min-width="120" show-overflow-tooltip />
|
||||
|
||||
<el-table-column prop="vehicle_code" label="载具编码" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-link type="warning" @click="toView(scope.row.vehicle_code)">{{ scope.row.vehicle_code }}</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="material_spec" label="物料规格" />
|
||||
<el-table-column prop="workprocedure_id" label="工序" />
|
||||
<el-table-column prop="qty" label="数量" />
|
||||
<el-table-column prop="remark" label="备注" min-width="100" show-overflow-tooltip />
|
||||
<el-table-column prop="is_used" label="是否启用">
|
||||
<el-table-column prop="weight" label="重量" />
|
||||
<el-table-column prop="point_status" label="点位状态">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.is_used == '1' ? '是' : '否' }}
|
||||
{{ scope.row.point_status == '2' ? '有料' : scope.row.point_status == '3'?'空载具':'空位' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="update_name" label="修改人" />
|
||||
<el-table-column prop="lock_type_name" label="锁定类型" />
|
||||
<el-table-column prop="remark" label="备注" min-width="100" show-overflow-tooltip />
|
||||
<el-table-column prop="update_time" label="修改时间" width="150" />
|
||||
<el-table-column v-permission="[]" label="操作" width="100px" align="center" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
@@ -217,7 +196,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import crudDevice from '@/views/wms/staging_manage/staging/kzStaging/kzStaging.js'
|
||||
import crudDevice from '@/views/wms/staging_manage/fhstaging/fhstaging.js'
|
||||
import CRUD, { crud, presenter, header, form } from '@crud/crud'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
@@ -227,15 +206,15 @@ import ViewDialog from '@/views/wms/staging_manage/staging/kzStaging/ViewDialog'
|
||||
import MaterDtl from '@/views/wms/pub/MaterDialog'
|
||||
import crudStoragevehicleinfo from '@/views/wms/masterdata_manage/master/storagevehicleinfo/storagevehicleinfo'
|
||||
|
||||
const defaultForm = { product_area: 'A1', region_code: 'A1_KZHC', workprocedure_id: '1535144552481034240', device_code: null, material_id: null, material_name: null, material_spec: null, deviceinstor_qty: null, deviceinstor_weight: null, remark: null }
|
||||
const defaultForm = {region_code: 'A3_FHHC'}
|
||||
|
||||
export default {
|
||||
name: 'SKdevice',
|
||||
name: 'fhstaging',
|
||||
components: { crudOperation, pagination, udOperation, rrOperation, ViewDialog, MaterDtl },
|
||||
dicts: ['product_area', 'd_lock_type', 'point_status'],
|
||||
dicts: [],
|
||||
cruds() {
|
||||
return [
|
||||
CRUD({ title: '刻字缓存区', url: 'api/point/queryVehicle', query: { product_area: 'A1', region_code: 'A1_KZHC' }, idField: 'device_code', crudMethod: { ...crudDevice }, optShow: {
|
||||
CRUD({ title: '退火缓存区', url: '/api/pda/fhwash/staging', query: { region_code: 'A3_FHHC' }, idField: 'point_id', crudMethod: { ...crudDevice }, optShow: {
|
||||
add: false,
|
||||
edit: false,
|
||||
del: false,
|
||||
@@ -307,7 +286,7 @@ export default {
|
||||
})
|
||||
},
|
||||
pointMateriSubmit() {
|
||||
crudDevice.edit(this.materialForm).then(res => {
|
||||
crudDevice.editvehicle(this.materialForm).then(res => {
|
||||
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.materiValueCancel()
|
||||
this.crud.refresh()
|
||||
@@ -316,7 +295,7 @@ export default {
|
||||
})
|
||||
},
|
||||
toView(row) {
|
||||
crudStoragevehicleinfo.vehileInfo(row).then(data => {
|
||||
crudStoragevehicleinfo.vehicleext(row).then(data => {
|
||||
this.dialogVisible = true
|
||||
this.materialForm = data
|
||||
})
|
||||
Reference in New Issue
Block a user