连涂线异常时手持下料上空
This commit is contained in:
@@ -62,6 +62,21 @@ public class PdaController {
|
|||||||
return new ResponseEntity<>(pdaService.coatedWireIntoStorageTask(sendMaterialDto), HttpStatus.OK);
|
return new ResponseEntity<>(pdaService.coatedWireIntoStorageTask(sendMaterialDto), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PostMapping("/manualSorting/ltxTask")
|
||||||
|
@Log("连涂线入库-动作")
|
||||||
|
@ApiOperation("连涂线入库-动作")
|
||||||
|
public ResponseEntity<PdaResponseVo> ltxTask(@Validated @RequestBody SendMaterialDto sendMaterialDto){
|
||||||
|
return new ResponseEntity<>(pdaService.ltxTask(sendMaterialDto), HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/getLtxPointList")
|
||||||
|
@Log("连涂线入库-获取涂板线列表")
|
||||||
|
@ApiOperation("连涂线入库-获取涂板线列表")
|
||||||
|
public ResponseEntity<Object> getLtxPointList(){
|
||||||
|
return new ResponseEntity<>(pdaService.getLtxPointList(), HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@PostMapping("/manualSorting/coatedWireIntoStorageTaskShow")
|
@PostMapping("/manualSorting/coatedWireIntoStorageTaskShow")
|
||||||
@Log("涂板线入库-显示任务信息")
|
@Log("涂板线入库-显示任务信息")
|
||||||
@ApiOperation("涂板线入库-显示任务信息")
|
@ApiOperation("涂板线入库-显示任务信息")
|
||||||
|
|||||||
@@ -40,6 +40,13 @@ public interface PdaService {
|
|||||||
*/
|
*/
|
||||||
PdaResponseVo coatedWireIntoStorageTask(SendMaterialDto sendMaterialDto);
|
PdaResponseVo coatedWireIntoStorageTask(SendMaterialDto sendMaterialDto);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 涂板线送料
|
||||||
|
* @param sendMaterialDto 送料实体
|
||||||
|
* @return 手持统一VO
|
||||||
|
*/
|
||||||
|
PdaResponseVo ltxTask(SendMaterialDto sendMaterialDto);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取任务数据
|
* 获取任务数据
|
||||||
* @return 任务数据
|
* @return 任务数据
|
||||||
@@ -49,6 +56,8 @@ public interface PdaService {
|
|||||||
|
|
||||||
List<SchBasePointDto> getPointList();
|
List<SchBasePointDto> getPointList();
|
||||||
|
|
||||||
|
List<SchBasePointDto> getLtxPointList();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据物料编码获取物料库存信息
|
* 根据物料编码获取物料库存信息
|
||||||
* @param materialCode /
|
* @param materialCode /
|
||||||
|
|||||||
@@ -18,5 +18,10 @@ public class SendMaterialDto {
|
|||||||
*/
|
*/
|
||||||
private Integer qty;
|
private Integer qty;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 方向0-下料,1-上空拖
|
||||||
|
*/
|
||||||
|
private Integer action;
|
||||||
|
|
||||||
private String material_code;
|
private String material_code;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,6 +42,9 @@ public interface PdaMapper {
|
|||||||
|
|
||||||
List<SchBasePointDto> getPointList();
|
List<SchBasePointDto> getPointList();
|
||||||
|
|
||||||
|
List<SchBasePointDto> getLtxPointList();
|
||||||
|
|
||||||
|
|
||||||
List<GhsPointVo> getGhsPointList();
|
List<GhsPointVo> getGhsPointList();
|
||||||
|
|
||||||
void changePointQty(String group_id,int qty);
|
void changePointQty(String group_id,int qty);
|
||||||
|
|||||||
@@ -89,6 +89,15 @@
|
|||||||
WHERE p.point_type = 2 AND p.region_code = 'TBX' AND p.can_vehicle_type = '1'
|
WHERE p.point_type = 2 AND p.region_code = 'TBX' AND p.can_vehicle_type = '1'
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="getLtxPointList" resultType="org.nl.wms.sch.point.service.dto.SchBasePointDto">
|
||||||
|
SELECT
|
||||||
|
p.*
|
||||||
|
FROM
|
||||||
|
`sch_base_point` p
|
||||||
|
LEFT JOIN sch_base_point p1 ON p1.point_code = p.parent_point_code AND p1.point_type = '1' AND p1.region_code = 'TBX'
|
||||||
|
WHERE p.point_type = 2 AND p.region_code = 'TBX' AND p.can_vehicle_type = '2'
|
||||||
|
</select>
|
||||||
|
|
||||||
<select id="getGhsPointList" resultType="org.nl.wms.pda.service.dao.vo.GhsPointVo">
|
<select id="getGhsPointList" resultType="org.nl.wms.pda.service.dao.vo.GhsPointVo">
|
||||||
SELECT
|
SELECT
|
||||||
p.point_code,
|
p.point_code,
|
||||||
|
|||||||
@@ -98,6 +98,33 @@ public class PdaServiceImpl implements PdaService {
|
|||||||
return PdaResponseVo.pdaResultOk("工单:[" + bdWorkorder.getWorkorder_code() + "]完工成功");
|
return PdaResponseVo.pdaResultOk("工单:[" + bdWorkorder.getWorkorder_code() + "]完工成功");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PdaResponseVo ltxTask(SendMaterialDto sendMaterialDto) {
|
||||||
|
// 获取工单
|
||||||
|
PdmBdWorkorder productionTask = workorderService.getDeviceDockingProductionTask(sendMaterialDto.getPoint_code());
|
||||||
|
if (ObjectUtil.isEmpty(productionTask)) {
|
||||||
|
throw new BadRequestException("点位:[" + sendMaterialDto.getPoint_code() + "]的工单不存在");
|
||||||
|
}
|
||||||
|
MdBaseMaterial material = materialService.getById(productionTask.getMaterial_id());
|
||||||
|
AbstractTask tbxmlTask = taskFactory.getTask("TBXMLTask");
|
||||||
|
AbstractTask tbxqkTask = taskFactory.getTask("TBXQKTask");
|
||||||
|
// 准备参数:设备编码
|
||||||
|
JSONObject param = new JSONObject();
|
||||||
|
param.put("device_code", sendMaterialDto.getPoint_code());
|
||||||
|
param.put("create_mode", GeneralDefinition.PDA_CREATION);
|
||||||
|
param.put("qty", ObjectUtil.isNotEmpty(sendMaterialDto.getQty()) ? sendMaterialDto.getQty() : material.getStandard_qty());
|
||||||
|
param.put("user_id", "1");
|
||||||
|
if(sendMaterialDto.getAction()==0) {
|
||||||
|
param.put("config_code", "TBXMLTask");
|
||||||
|
tbxmlTask.apply(param);
|
||||||
|
}else{
|
||||||
|
param.put("config_code", "TBXQKTask");
|
||||||
|
tbxqkTask.apply(param);
|
||||||
|
}
|
||||||
|
|
||||||
|
return PdaResponseVo.pdaResultOk("连涂线入库请求成功");
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PdaResponseVo coatedWireIntoStorageTask(SendMaterialDto sendMaterialDto) {
|
public PdaResponseVo coatedWireIntoStorageTask(SendMaterialDto sendMaterialDto) {
|
||||||
// 获取工单
|
// 获取工单
|
||||||
@@ -122,6 +149,10 @@ public class PdaServiceImpl implements PdaService {
|
|||||||
return pdaMapper.getPointList();
|
return pdaMapper.getPointList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<SchBasePointDto> getLtxPointList(){
|
||||||
|
return pdaMapper.getLtxPointList();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<GhsPointVo> getGhsPointList(){
|
public List<GhsPointVo> getGhsPointList(){
|
||||||
return pdaMapper.getGhsPointList();
|
return pdaMapper.getGhsPointList();
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import cn.hutool.core.util.ObjectUtil;
|
|||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.dromara.dynamictp.common.util.StringUtil;
|
||||||
import org.nl.common.exception.BadRequestException;
|
import org.nl.common.exception.BadRequestException;
|
||||||
import org.nl.system.service.notice.ISysNoticeService;
|
import org.nl.system.service.notice.ISysNoticeService;
|
||||||
import org.nl.system.service.param.ISysParamService;
|
import org.nl.system.service.param.ISysParamService;
|
||||||
@@ -157,7 +158,8 @@ public class GHCMLTask extends AbstractTask {
|
|||||||
if(row_num==schBasePoint.getRow_num()){
|
if(row_num==schBasePoint.getRow_num()){
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if(PointStatusEnum.EMPTY_POINT.getCode().equals(schBasePoint.getPoint_status())){
|
if(PointStatusEnum.EMPTY_POINT.getCode().equals(schBasePoint.getPoint_status())
|
||||||
|
&& StringUtil.isEmpty(schBasePoint.getIng_task_code())){
|
||||||
temp = schBasePoint;
|
temp = schBasePoint;
|
||||||
}else{
|
}else{
|
||||||
row_num=schBasePoint.getRow_num();
|
row_num=schBasePoint.getRow_num();
|
||||||
|
|||||||
Reference in New Issue
Block a user