add:手持功能
This commit is contained in:
@@ -75,4 +75,11 @@ public class PdaGeneralPublicController {
|
||||
return new ResponseEntity<>(PdaResponse.requestParamOk(pdaGeneralPublicService.queryBomInfo(whereJson)), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/queryVehicleType")
|
||||
@Log("查询载具类型")
|
||||
@SaIgnore
|
||||
public ResponseEntity<Object> queryVehicleType() {
|
||||
return new ResponseEntity<>(PdaResponse.requestParamOk(pdaGeneralPublicService.queryVehicleType()), HttpStatus.OK);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
package org.nl.wms.pda.general_management.controller;
|
||||
|
||||
|
||||
import cn.dev33.satoken.annotation.SaIgnore;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.common.logging.annotation.Log;
|
||||
import org.nl.wms.pda.general_management.service.PdaPickUpConfirmService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
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;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 平板确认取放货
|
||||
* </p>
|
||||
*
|
||||
* @author Liuxy
|
||||
* @since 2025-09-04
|
||||
*/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("/api/pdaPickUp")
|
||||
@Slf4j
|
||||
public class PdaPickUpConfirmController {
|
||||
|
||||
@Autowired
|
||||
private PdaPickUpConfirmService pdaPickUpConfirmService;
|
||||
|
||||
@PostMapping("/queryPointInfo")
|
||||
@Log("查询点位物料信息")
|
||||
@SaIgnore
|
||||
public ResponseEntity<Object> createTask(@RequestBody JSONObject whereJson) {
|
||||
return new ResponseEntity<>(pdaPickUpConfirmService.queryPointInfo(whereJson), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/confirmGet")
|
||||
@Log("确认取货")
|
||||
@SaIgnore
|
||||
public ResponseEntity<Object> confirmGet(@RequestBody JSONObject whereJson) {
|
||||
return new ResponseEntity<>(pdaPickUpConfirmService.confirmGet(whereJson), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/confirmPut")
|
||||
@Log("确认放货")
|
||||
@SaIgnore
|
||||
public ResponseEntity<Object> confirmPut(@RequestBody JSONObject whereJson) {
|
||||
return new ResponseEntity<>(pdaPickUpConfirmService.confirmPut(whereJson), HttpStatus.OK);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
package org.nl.wms.pda.general_management.controller;
|
||||
|
||||
|
||||
import cn.dev33.satoken.annotation.SaIgnore;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.common.logging.annotation.Log;
|
||||
import org.nl.wms.pda.general_management.service.PdaInGroupBoxService;
|
||||
import org.nl.wms.pda.general_management.service.PdaPointAndPointBoxService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
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;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 平板点对点送货
|
||||
* </p>
|
||||
*
|
||||
* @author Liuxy
|
||||
* @since 2025-09-04
|
||||
*/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("/api/pdaPointAndPoint")
|
||||
@Slf4j
|
||||
public class PdaPointAndPointController {
|
||||
|
||||
@Autowired
|
||||
private PdaPointAndPointBoxService pdaPointAndPointBoxService;
|
||||
|
||||
@PostMapping("/createTask")
|
||||
@Log("生成任务")
|
||||
@SaIgnore
|
||||
public ResponseEntity<Object> createTask(@RequestBody JSONObject whereJson) {
|
||||
return new ResponseEntity<>(pdaPointAndPointBoxService.createTask(whereJson), HttpStatus.OK);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package org.nl.wms.pda.general_management.controller;
|
||||
|
||||
|
||||
import cn.dev33.satoken.annotation.SaIgnore;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.common.logging.annotation.Log;
|
||||
import org.nl.wms.pda.general_management.service.PdaUpdatePointService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
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;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 平板点位更新
|
||||
* </p>
|
||||
*
|
||||
* @author Liuxy
|
||||
* @since 2025-09-04
|
||||
*/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("/api/pdaUpdatePoint")
|
||||
@Slf4j
|
||||
public class PdaUpdatePointController {
|
||||
|
||||
@Autowired
|
||||
private PdaUpdatePointService pdaUpdatePointService;
|
||||
|
||||
@PostMapping("/queryPointInfo")
|
||||
@Log("查询点位物料信息")
|
||||
@SaIgnore
|
||||
public ResponseEntity<Object> createTask(@RequestBody JSONObject whereJson) {
|
||||
return new ResponseEntity<>(pdaUpdatePointService.queryPointInfo(whereJson), HttpStatus.OK);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -59,6 +59,7 @@ public interface PdaGeneralPublicService {
|
||||
|
||||
/**
|
||||
* 查询工单信息
|
||||
*
|
||||
* @param whereJson {
|
||||
* start_time: 日期
|
||||
* search: 工单编码/机台编码
|
||||
@@ -66,4 +67,11 @@ public interface PdaGeneralPublicService {
|
||||
* @return PdaResponse
|
||||
*/
|
||||
PdaResponse queryBomInfo(JSONObject whereJson);
|
||||
|
||||
/**
|
||||
* 查询载具类型
|
||||
*
|
||||
* @return PdaResponse
|
||||
*/
|
||||
PdaResponse queryVehicleType();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
package org.nl.wms.pda.general_management.service;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import org.nl.wms.pda.util.PdaResponse;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 平板确认取放货 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author Liuxy
|
||||
* @since 2025-09-03
|
||||
*/
|
||||
public interface PdaPickUpConfirmService {
|
||||
|
||||
/**
|
||||
* 查询点位物料信息
|
||||
* @param whereJson {
|
||||
* search: 点位编码/载具编码
|
||||
* }
|
||||
* @return PdaResponse
|
||||
*/
|
||||
PdaResponse queryPointInfo(JSONObject whereJson);
|
||||
|
||||
/**
|
||||
* 确认取货
|
||||
* @param whereJson {
|
||||
* point_code: 当前站点
|
||||
* }
|
||||
* @return PdaResponse
|
||||
*/
|
||||
PdaResponse confirmGet(JSONObject whereJson);
|
||||
|
||||
/**
|
||||
* 确认放货
|
||||
* @param whereJson {
|
||||
* point_code: 当前站点
|
||||
* }
|
||||
* @return PdaResponse
|
||||
*/
|
||||
PdaResponse confirmPut(JSONObject whereJson);
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package org.nl.wms.pda.general_management.service;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import org.nl.wms.pda.util.PdaResponse;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 平板点对点送货 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author Liuxy
|
||||
* @since 2025-09-04
|
||||
*/
|
||||
public interface PdaPointAndPointBoxService {
|
||||
|
||||
/**
|
||||
* 生成任务
|
||||
*
|
||||
* @param whereJson {
|
||||
* storagevehicle_code: 载具编码
|
||||
* point_code1: 起点
|
||||
* point_code2: 终点
|
||||
* task_type: 载具类型
|
||||
* }
|
||||
* @return PdaResponse
|
||||
*/
|
||||
PdaResponse createTask(JSONObject whereJson);
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package org.nl.wms.pda.general_management.service;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import org.nl.wms.pda.util.PdaResponse;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 平板点位更新 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author Liuxy
|
||||
* @since 2025-09-03
|
||||
*/
|
||||
public interface PdaUpdatePointService {
|
||||
|
||||
/**
|
||||
* 查询点位物料信息
|
||||
* @param whereJson {
|
||||
* point_code: 点位编码
|
||||
* storagevehicle_code: 载具编码
|
||||
* }
|
||||
* @return PdaResponse
|
||||
*/
|
||||
PdaResponse queryPointInfo(JSONObject whereJson);
|
||||
}
|
||||
@@ -105,4 +105,9 @@ public class PdaGeneralPublicServiceImpl implements PdaGeneralPublicService {
|
||||
public PdaResponse queryBomInfo(JSONObject whereJson) {
|
||||
return PdaResponse.requestParamOk(pdmBomCallMaterialMapper.queryBomInfo(whereJson));
|
||||
}
|
||||
|
||||
@Override
|
||||
public PdaResponse queryVehicleType() {
|
||||
return PdaResponse.requestParamOk(PDAEnum.TASK_TYPE.getDict());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,95 @@
|
||||
package org.nl.wms.pda.general_management.service.impl;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import org.nl.common.exception.BadRequestException;
|
||||
import org.nl.wms.pda.general_management.service.PdaPickUpConfirmService;
|
||||
import org.nl.wms.pda.util.PdaResponse;
|
||||
import org.nl.wms.sch_manage.service.ISchBasePointService;
|
||||
import org.nl.wms.sch_manage.service.ISchBaseTaskService;
|
||||
import org.nl.wms.sch_manage.service.dao.SchBasePoint;
|
||||
import org.nl.wms.sch_manage.service.dao.SchBaseTask;
|
||||
import org.nl.wms.sch_manage.service.dao.mapper.SchBasePointMapper;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 平板确认取放货 实现类
|
||||
* </p>
|
||||
*
|
||||
* @author Liuxy
|
||||
* @since 2025-09-03
|
||||
*/
|
||||
@Service
|
||||
public class PdaPickUpConfirmServiceImpl implements PdaPickUpConfirmService {
|
||||
|
||||
/**
|
||||
* 点位服务
|
||||
*/
|
||||
@Autowired
|
||||
private ISchBasePointService iSchBasePointService;
|
||||
|
||||
/**
|
||||
* 任务服务
|
||||
*/
|
||||
@Autowired
|
||||
private ISchBaseTaskService iSchBaseTaskService;
|
||||
|
||||
/**
|
||||
* 带你为mapper
|
||||
*/
|
||||
@Autowired
|
||||
private SchBasePointMapper schBasePointMapper;
|
||||
|
||||
@Override
|
||||
public PdaResponse queryPointInfo(JSONObject whereJson) {
|
||||
String search = whereJson.getString("search");
|
||||
if (ObjectUtil.isEmpty(search)) {
|
||||
throw new BadRequestException("搜索条件不能为空!");
|
||||
}
|
||||
|
||||
LambdaQueryWrapper<SchBasePoint> lambda = new QueryWrapper<SchBasePoint>().lambda();
|
||||
lambda.eq(SchBasePoint::getPoint_code, search)
|
||||
.or(qw -> qw.eq(SchBasePoint::getVehicle_code, search));
|
||||
SchBasePoint pointDao = iSchBasePointService.getOne(lambda);
|
||||
JSONObject result = JSONObject.parseObject(JSON.toJSONString(pointDao), JSONObject.class);
|
||||
|
||||
if (ObjectUtil.isEmpty(result)) {
|
||||
throw new BadRequestException("未查询到当前信息!");
|
||||
}
|
||||
|
||||
SchBaseTask taskDao = iSchBaseTaskService.getById(pointDao.getIng_task_code());
|
||||
if (ObjectUtil.isNotEmpty(taskDao)) {
|
||||
result.put("task_code", taskDao.getTask_code());
|
||||
result.put("car_no", taskDao.getCar_no());
|
||||
result.put("point_code1", taskDao.getPoint_code1());
|
||||
result.put("point_code2", taskDao.getPoint_code2());
|
||||
}
|
||||
|
||||
// 查询明细
|
||||
List<JSONObject> rows = schBasePointMapper.getPointDtl(whereJson);
|
||||
result.put("rows", rows);
|
||||
return PdaResponse.requestParamOk(result);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public PdaResponse confirmGet(JSONObject whereJson) {
|
||||
iSchBasePointService.getConfirm(whereJson);
|
||||
return PdaResponse.requestOk();
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public PdaResponse confirmPut(JSONObject whereJson) {
|
||||
iSchBasePointService.putConfirm(whereJson);
|
||||
return PdaResponse.requestOk();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package org.nl.wms.pda.general_management.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import org.nl.wms.pda.general_management.service.PdaPointAndPointBoxService;
|
||||
import org.nl.wms.pda.util.PdaResponse;
|
||||
import org.nl.wms.sch_manage.service.PointToPointService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 平板点对点送货 实现类
|
||||
* </p>
|
||||
*
|
||||
* @author Liuxy
|
||||
* @since 2025-09-04
|
||||
*/
|
||||
@Service
|
||||
public class PdaPointAndPointServiceImpl implements PdaPointAndPointBoxService {
|
||||
|
||||
/**
|
||||
* PC点对点送货服务
|
||||
*/
|
||||
@Autowired
|
||||
private PointToPointService pointToPointService;
|
||||
|
||||
@Override
|
||||
public PdaResponse createTask(JSONObject whereJson) {
|
||||
pointToPointService.create(whereJson);
|
||||
return PdaResponse.requestOk();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
package org.nl.wms.pda.general_management.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import org.nl.wms.pda.general_management.service.PdaUpdatePointService;
|
||||
import org.nl.wms.pda.util.PdaResponse;
|
||||
import org.nl.wms.sch_manage.service.ISchBaseTaskService;
|
||||
import org.nl.wms.sch_manage.service.dao.mapper.SchBasePointMapper;
|
||||
import org.nl.wms.warehouse_management.service.dao.mapper.MdPbGroupplateMapper;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 平板点位更新 实现类
|
||||
* </p>
|
||||
*
|
||||
* @author Liuxy
|
||||
* @since 2025-09-03
|
||||
*/
|
||||
@Service
|
||||
public class PdaUpdatePointServiceImpl implements PdaUpdatePointService {
|
||||
|
||||
/**
|
||||
* 组盘mapper
|
||||
*/
|
||||
@Autowired
|
||||
private MdPbGroupplateMapper mdPbGroupplateMapper;
|
||||
|
||||
/**
|
||||
* 任务服务
|
||||
*/
|
||||
@Autowired
|
||||
private ISchBaseTaskService iSchBaseTaskService;
|
||||
|
||||
/**
|
||||
* 点位mapper
|
||||
*/
|
||||
@Autowired
|
||||
private SchBasePointMapper schBasePointMapper;
|
||||
|
||||
@Override
|
||||
public PdaResponse queryPointInfo(JSONObject whereJson) {
|
||||
return PdaResponse.requestParamOk(mdPbGroupplateMapper.pdaGetPointDtl(whereJson));
|
||||
}
|
||||
}
|
||||
@@ -89,4 +89,10 @@ public class SchBasePointController {
|
||||
schBasePointService.putConfirm(whereJson);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
|
||||
@Log("获取点位物料信息")
|
||||
@PostMapping("/getPointDtl")
|
||||
public ResponseEntity<Object> getPointDtl(@RequestBody JSONObject whereJson) {
|
||||
return new ResponseEntity<>(schBasePointService.getPointDtl(whereJson),HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -102,4 +102,14 @@ public interface ISchBasePointService extends IService<SchBasePoint> {
|
||||
* @param whereJson 点位实体
|
||||
*/
|
||||
void putConfirm(JSONObject whereJson);
|
||||
|
||||
/**
|
||||
*
|
||||
* @param whereJson {
|
||||
* point_code:点位编码
|
||||
* storagevehicle_code:载具编码
|
||||
* }
|
||||
* @return
|
||||
*/
|
||||
JSONObject getPointDtl(JSONObject whereJson);
|
||||
}
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
package org.nl.wms.sch_manage.service.dao.mapper;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.nl.wms.sch_manage.service.dao.SchBasePoint;
|
||||
import org.nl.wms.sch_manage.service.dto.SchBasePointQuery;
|
||||
|
||||
@@ -44,4 +46,14 @@ public interface SchBasePointMapper extends BaseMapper<SchBasePoint> {
|
||||
* @return IPage<SchBasePoint>
|
||||
*/
|
||||
IPage<SchBasePoint> selectPageLeftJoin(IPage<SchBasePoint> pages, SchBasePointQuery whereJson);
|
||||
|
||||
/**
|
||||
* 查询点位物料明细
|
||||
* @param whereJson {
|
||||
* point_code:点位编码
|
||||
* storagevehicle_code:载具编码
|
||||
* }
|
||||
* @return List<JSONObject>
|
||||
*/
|
||||
List<JSONObject> getPointDtl(@Param("param") JSONObject whereJson);
|
||||
}
|
||||
|
||||
@@ -63,4 +63,51 @@
|
||||
</where>
|
||||
ORDER BY p.region_code, p.point_code, p.point_type
|
||||
</select>
|
||||
|
||||
<select id="getPointDtl" resultType="com.alibaba.fastjson.JSONObject">
|
||||
SELECT
|
||||
point.*,
|
||||
task.task_code,
|
||||
task.point_code1,
|
||||
task.point_code2,
|
||||
task.car_no,
|
||||
mater.material_code,
|
||||
mater.material_name,
|
||||
late.pcsn,
|
||||
late.qty,
|
||||
late.produce_time,
|
||||
late.quality_type,
|
||||
supp.supp_code,
|
||||
supp.supp_name,
|
||||
late.bake_num,
|
||||
bom.device_code,
|
||||
bom.bom_code,
|
||||
late.qty_unit_name
|
||||
FROM
|
||||
sch_base_point point
|
||||
LEFT JOIN sch_base_task task ON point.ing_task_code = task.task_id
|
||||
LEFT JOIN md_pb_groupplate late ON late.storagevehicle_code = point.vehicle_code
|
||||
LEFT JOIN md_me_materialbase mater ON late.material_id = mater.material_id
|
||||
LEFT JOIN md_cs_supplierbase supp ON late.supp_code = supp.supp_code
|
||||
LEFT JOIN pdm_bom_callmaterial bom ON bom.bom_id = late.bom_id
|
||||
<where>
|
||||
1 = 1
|
||||
<if test="param.point_code != null and param.point_code != ''">
|
||||
AND
|
||||
point.point_code = #{param.point_code}
|
||||
</if>
|
||||
|
||||
<if test="param.storagevehicle_code != null and param.storagevehicle_code != ''">
|
||||
AND
|
||||
point.vehicle_code = #{param.storagevehicle_code}
|
||||
</if>
|
||||
|
||||
<if test="param.search != null and param.search != ''">
|
||||
AND
|
||||
(point.vehicle_code = #{param.search} or
|
||||
point.point_code = #{param.search})
|
||||
</if>
|
||||
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
@@ -216,9 +216,11 @@ public class SchBasePointServiceImpl extends ServiceImpl<SchBasePointMapper, Sch
|
||||
@Transactional
|
||||
public void putConfirm(JSONObject whereJson) {
|
||||
SchBasePoint pointDao = this.getById(whereJson.getString("point_code"));
|
||||
pointDao.setPoint_status(IOSEnum.POINT_STATUS.code("有箱有料"));
|
||||
pointDao.setVehicle_code(whereJson.getString("vehicle_code"));
|
||||
this.updateById(pointDao);
|
||||
// TODO 通知ACS可以离开
|
||||
}
|
||||
|
||||
@Override
|
||||
public JSONObject getPointDtl(JSONObject whereJson) {
|
||||
return pointMapper.getPointDtl(whereJson).get(0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -117,6 +117,7 @@ public class PdaPointTask extends AbstractTask {
|
||||
// 根据传来的类型去对任务进行操作
|
||||
if (status.equals(TaskStatus.EXECUTING)) {
|
||||
// 更新明细状态
|
||||
this.executing(taskObj);
|
||||
taskObj.setTask_status(TaskStatus.EXECUTING.getCode());
|
||||
taskObj.setRemark("执行中");
|
||||
taskService.updateById(taskObj);
|
||||
@@ -222,4 +223,19 @@ public class PdaPointTask extends AbstractTask {
|
||||
taskObj.setTask_status(TaskStatus.CANCELED.getCode());
|
||||
taskService.updateById(taskObj);
|
||||
}
|
||||
|
||||
private void executing(SchBaseTask taskObj) {
|
||||
// 更新起点
|
||||
iSchBasePointService.update(
|
||||
new UpdateWrapper<SchBasePoint>().lambda()
|
||||
.eq(SchBasePoint::getPoint_code, taskObj.getPoint_code1())
|
||||
.set(SchBasePoint::getIng_task_code, taskObj.getTask_id())
|
||||
);
|
||||
// 更新终点
|
||||
iSchBasePointService.update(
|
||||
new UpdateWrapper<SchBasePoint>().lambda()
|
||||
.eq(SchBasePoint::getPoint_code, taskObj.getPoint_code2())
|
||||
.set(SchBasePoint::getIng_task_code, taskObj.getTask_id())
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,4 +54,13 @@ public interface MdPbGroupplateMapper extends BaseMapper<GroupPlate> {
|
||||
* @return List<JSONObject>
|
||||
*/
|
||||
List<JSONObject> pdaQueryGeneralGroupInfo(@Param("param") JSONObject whereJson);
|
||||
|
||||
/**
|
||||
* 手持根据点位载具查询
|
||||
* @param whereJson {
|
||||
* storagevehicle_code: 载具编码
|
||||
* }
|
||||
* @return List<JSONObject>
|
||||
*/
|
||||
List<JSONObject> pdaGetPointDtl(@Param("param") JSONObject whereJson);
|
||||
}
|
||||
|
||||
@@ -105,4 +105,28 @@
|
||||
|
||||
ORDER BY late.create_time Desc
|
||||
</select>
|
||||
|
||||
<select id="pdaGetPointDtl" resultType="com.alibaba.fastjson.JSONObject">
|
||||
SELECT
|
||||
late.*,
|
||||
mater.material_code,
|
||||
mater.material_name
|
||||
FROM
|
||||
md_pb_groupplate late
|
||||
LEFT JOIN md_me_materialbase mater ON mater.material_id = late.material_id
|
||||
LEFT JOIN sch_base_point point ON point.vehicle_code = late.storagevehicle_code
|
||||
<where>
|
||||
late.status != '2'
|
||||
<if test="param.point_code != null and param.point_code != ''">
|
||||
AND
|
||||
point.point_code = #{param.point_code}
|
||||
</if>
|
||||
|
||||
<if test="param.storagevehicle_code != null and param.storagevehicle_code != ''">
|
||||
AND
|
||||
late.storagevehicle_code = #{param.storagevehicle_code}
|
||||
</if>
|
||||
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
@@ -1,30 +1,136 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
title="填写载具"
|
||||
title="点位物料信息"
|
||||
append-to-body
|
||||
:visible.sync="dialogVisible"
|
||||
:before-close="handleClose"
|
||||
width="600px"
|
||||
width="1100px"
|
||||
destroy-on-close
|
||||
@close="close"
|
||||
@open="open"
|
||||
>
|
||||
<el-form ref="form2" :model="formMst" :rules="rules" size="mini" label-width="130px">
|
||||
<el-form ref="form2" disabled :model="formMst" :rules="rules" size="mini" label-width="130px">
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="当前站点:">
|
||||
<el-input v-model="formMst.point_code" size="mini" style="width: 200px" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="载具编码:">
|
||||
<el-input v-model="formMst.vehicle_code" size="mini" style="width: 200px" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="任务号:">
|
||||
<el-input v-model="formMst.task_code" size="mini" style="width: 200px" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="任务起点:">
|
||||
<el-input v-model="formMst.point_code1" size="mini" style="width: 200px" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="任务终点:">
|
||||
<el-input v-model="formMst.point_code2" size="mini" style="width: 200px" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="AGV车号:">
|
||||
<el-input v-model="formMst.car_no" size="mini" style="width: 200px" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="物料编码:">
|
||||
<el-input v-model="formMst.material_code" size="mini" style="width: 200px" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="物料名称:">
|
||||
<el-input v-model="formMst.material_name" size="mini" style="width: 200px" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="批次号:">
|
||||
<el-input v-model="formMst.pcsn" size="mini" style="width: 200px" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="物料重量:">
|
||||
<el-input v-model="formMst.qty" size="mini" style="width: 200px" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="生产日期:">
|
||||
<el-input v-model="formMst.produce_time" size="mini" style="width: 200px" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="品质类型:">
|
||||
<el-select
|
||||
v-model="formMst.quality_type"
|
||||
size="mini"
|
||||
style="width: 200px;"
|
||||
class="filter-item"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.QUALITY_TYPE"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="供应商编码:">
|
||||
<el-input v-model="formMst.supp_code" size="mini" style="width: 200px" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="供应商名称:">
|
||||
<el-input v-model="formMst.supp_name" size="mini" style="width: 200px" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="烘干次数:">
|
||||
<el-input v-model="formMst.bake_num" size="mini" style="width: 200px" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="机台编码:">
|
||||
<el-input v-model="formMst.device_code" size="mini" style="width: 200px" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="工单编码:">
|
||||
<el-input v-model="formMst.bom_code" size="mini" style="width: 200px" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="16" style="border: 1px solid white">
|
||||
<el-col :span="20" style="border: 1px solid white">
|
||||
<span />
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-col :span="4">
|
||||
<span>
|
||||
<el-button icon="el-icon-check" size="mini" type="primary" @click="putConfirm">确认</el-button>
|
||||
<el-button icon="el-icon-close" size="mini" type="info" @click="close">关闭</el-button>
|
||||
</span>
|
||||
</el-col>
|
||||
@@ -45,6 +151,7 @@ import crudSchBasePoint from '@/views/wms/sch/point/schBasePoint'
|
||||
export default {
|
||||
name: 'WeighDialog',
|
||||
mixins: [crud()],
|
||||
dicts: ['QUALITY_TYPE'],
|
||||
props: {
|
||||
dialogShow: {
|
||||
type: Boolean,
|
||||
@@ -58,7 +165,6 @@ export default {
|
||||
dialogShow: {
|
||||
handler(newValue, oldValue) {
|
||||
this.dialogVisible = newValue
|
||||
this.formMst = this.openParam
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -83,16 +189,9 @@ export default {
|
||||
this.$refs['form2'].resetFields()
|
||||
this.$emit('update:dialogShow', false)
|
||||
},
|
||||
putConfirm() {
|
||||
// 校验称重信息不能为0或者空
|
||||
if (this.formMst.vehicle_code === '') {
|
||||
this.crud.notify('载具编码不能为空!', CRUD.NOTIFICATION_TYPE.ERROR)
|
||||
return
|
||||
}
|
||||
crudSchBasePoint.putConfirm(this.formMst).then(res => {
|
||||
this.crud.notify('操作成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.close()
|
||||
this.crud.toQuery()
|
||||
open() {
|
||||
crudSchBasePoint.getPointDtl(this.openParam).then(res => {
|
||||
this.formMst = res
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,16 +66,17 @@
|
||||
>
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column prop="workshop_code" label="车间编码" :min-width="flexWidth('workshop_code',crud.data,'车间编码')" />
|
||||
<el-table-column prop="point_code" label="点位编码" :min-width="flexWidth('point_code',crud.data,'点位编码')" />
|
||||
<el-table-column prop="point_code" label="点位编码" :min-width="flexWidth('point_code',crud.data,'点位编码')">
|
||||
<template slot-scope="scope">
|
||||
<el-link type="warning" @click="toView(scope.$index, scope.row)">{{ scope.row.point_code }}</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="point_name" label="点位名称" :min-width="flexWidth('point_name',crud.data,'点位名称')" />
|
||||
<el-table-column prop="region_code" label="区域编码" :min-width="flexWidth('region_code',crud.data,'区域编码')" />
|
||||
<el-table-column prop="region_name" label="区域名称" :min-width="flexWidth('region_name',crud.data,'区域名称')" />
|
||||
<el-table-column prop="point_type_name" label="点位类型" :min-width="flexWidth('point_type_name',crud.data,'点位类型')"/>
|
||||
<el-table-column prop="point_status_name" label="点位状态" :min-width="flexWidth('point_status_name',crud.data,'点位类型')"/>
|
||||
<el-table-column prop="vehicle_code" label="载具编码" :min-width="flexWidth('vehicle_code',crud.data,'载具编码')" />
|
||||
<el-table-column prop="material_code" label="物料编码" :min-width="flexWidth('material_code',crud.data,'载具数量')" />
|
||||
<el-table-column prop="material_name" label="物料名称" :min-width="flexWidth('material_name',crud.data,'载具数量')" />
|
||||
<el-table-column prop="material_qty" label="物料重量" :min-width="flexWidth('material_qty',crud.data,'载具数量')" />
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
@@ -129,6 +130,14 @@ export default {
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
return true
|
||||
},
|
||||
putConfirm() {
|
||||
// 校验称重信息不能为0或者空
|
||||
const data = this.$refs.table.selection[0]
|
||||
crudSchBasePoint.putConfirm(data).then(res => {
|
||||
this.crud.notify('操作成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.crud.toQuery()
|
||||
})
|
||||
},
|
||||
getConfirm() {
|
||||
const data = this.$refs.table.selection[0]
|
||||
crudSchBasePoint.getConfirm(data).then(res => {
|
||||
@@ -136,8 +145,8 @@ export default {
|
||||
this.crud.toQuery()
|
||||
})
|
||||
},
|
||||
putConfirm() {
|
||||
this.openParam = this.$refs.table.selection[0]
|
||||
toView(index, row) {
|
||||
this.openParam = row
|
||||
this.openParamDialog = true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,4 +64,12 @@ export function putConfirm(data) {
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, changeUsed, getPointList, changeLock, getConfirm, putConfirm }
|
||||
export function getPointDtl(data) {
|
||||
return request({
|
||||
url: 'api/schBasePoint/getPointDtl',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, changeUsed, getPointList, changeLock, getConfirm, putConfirm, getPointDtl }
|
||||
|
||||
Reference in New Issue
Block a user