Browse Source

add: 记录分拣托盘对应关联

master
李永德 1 year ago
parent
commit
fb3130e2e6
  1. BIN
      lms/nladmin-system/doc/wms.xls
  2. 14
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/common/exception/handler/GlobalExceptionHandler.java
  3. 48
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/acs/service/dto/to/wms/FeedBackSplitPalletStationRequest.java
  4. 55
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/acs/service/impl/AcsToWmsServiceImpl.java
  5. 66
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pdm/vehiclebiding/controller/PdmBdVehicleBindingController.java
  6. 43
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pdm/vehiclebiding/service/IPdmBdVehicleBindingService.java
  7. 58
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pdm/vehiclebiding/service/dao/PdmBdVehicleBinding.java
  8. 12
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pdm/vehiclebiding/service/dao/mapper/PdmBdVehicleBindingMapper.java
  9. 5
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pdm/vehiclebiding/service/dao/mapper/PdmBdVehicleBindingMapper.xml
  10. 46
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pdm/vehiclebiding/service/dto/PdmBdVehicleBindingDto.java
  11. 12
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pdm/vehiclebiding/service/dto/PdmBdVehicleBindingQuery.java
  12. 67
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pdm/vehiclebiding/service/impl/PdmBdVehicleBindingServiceImpl.java
  13. 8
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/report/controller/ReportController.java
  14. 2
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task/service/impl/SchBaseTaskServiceImpl.java
  15. 20
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/hn/HNMLTask.java
  16. 2
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/hn/mapper/HNMapper.java
  17. 2
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/hn/mapper/HNMapper.xml
  18. 4
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/yz/YZQKTask.java
  19. 126
      lms/nladmin-ui/src/views/wms/pdm/vehiclebiding/index.vue
  20. 27
      lms/nladmin-ui/src/views/wms/pdm/vehiclebiding/pdmBdVehicleBinding.js

BIN
lms/nladmin-system/doc/wms.xls

Binary file not shown.

14
lms/nladmin-system/nlsso-server/src/main/java/org/nl/common/exception/handler/GlobalExceptionHandler.java

@ -21,6 +21,9 @@ import org.nl.common.exception.BadRequestException;
import org.nl.common.exception.EntityExistException; import org.nl.common.exception.EntityExistException;
import org.nl.common.exception.EntityNotFoundException; import org.nl.common.exception.EntityNotFoundException;
import org.nl.common.utils.ThrowableUtil; import org.nl.common.utils.ThrowableUtil;
import org.nl.system.service.notice.ISysNoticeService;
import org.nl.wms.sch.task_manage.enums.NoticeTypeEnum;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.MethodArgumentNotValidException; import org.springframework.web.bind.MethodArgumentNotValidException;
@ -39,6 +42,17 @@ import static org.springframework.http.HttpStatus.NOT_FOUND;
@RestControllerAdvice @RestControllerAdvice
public class GlobalExceptionHandler { public class GlobalExceptionHandler {
@Autowired
private ISysNoticeService noticeService;
@ExceptionHandler(NullPointerException.class)
public ResponseEntity<String> handleNullPointerException(NullPointerException ex) {
// 在这里处理空指针异常
noticeService.createNotice("异常信息:" + ex.getMessage(), "空指针异常发",
NoticeTypeEnum.EXCEPTION.getCode());
return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body("空指针异常发生了");
}
/** /**
* 处理所有不可知的异常 * 处理所有不可知的异常
*/ */

48
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/acs/service/dto/to/wms/FeedBackSplitPalletStationRequest.java

@ -0,0 +1,48 @@
package org.nl.wms.ext.acs.service.dto.to.wms;
import lombok.Data;
import org.nl.wms.ext.acs.service.dto.to.BaseRequest;
/**
* @Author: lyd
* @Description: 分拣反馈记录木托盘与钢托盘的绑定
* @Date: 2023/7/31
*/
@Data
public class FeedBackSplitPalletStationRequest extends BaseRequest {
/**
* 取货点位
*/
private String get_station;
/**
* 放货点位
*/
private String put_station;
/**
* 取货点位载具号
*/
private String get_station_vehicle_code;
/**
* 放货点位载具号
*/
private String put_station_vehicle_code;
/**
* 取货点当前数量
*/
private String get_station_qty;
/**
* 放货点当前数量
*/
private String put_station_qty;
}

55
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/acs/service/impl/AcsToWmsServiceImpl.java

@ -18,6 +18,7 @@ import org.nl.wms.database.material.service.dao.MdBaseMaterial;
import org.nl.wms.ext.acs.service.dto.*; import org.nl.wms.ext.acs.service.dto.*;
import org.nl.wms.ext.acs.service.dto.to.acs.PutActionRequest; import org.nl.wms.ext.acs.service.dto.to.acs.PutActionRequest;
import org.nl.wms.ext.acs.service.dto.to.wms.ApplyTaskRequest; import org.nl.wms.ext.acs.service.dto.to.wms.ApplyTaskRequest;
import org.nl.wms.ext.acs.service.dto.to.wms.FeedBackSplitPalletStationRequest;
import org.nl.wms.ext.acs.service.dto.to.wms.FeedBackTaskStatusRequest; import org.nl.wms.ext.acs.service.dto.to.wms.FeedBackTaskStatusRequest;
import org.nl.wms.ext.acs.service.dto.to.wms.GetPalletizeRequest; import org.nl.wms.ext.acs.service.dto.to.wms.GetPalletizeRequest;
import org.nl.wms.ext.acs.service.dto.to.BaseResponse; import org.nl.wms.ext.acs.service.dto.to.BaseResponse;
@ -30,6 +31,8 @@ import org.nl.wms.pdm.record.service.dao.PdmBdRequestMaterialRecord;
import org.nl.wms.pdm.residue.service.IPdmBdMaterialResidueService; import org.nl.wms.pdm.residue.service.IPdmBdMaterialResidueService;
import org.nl.wms.pdm.track.service.IPdmBdProductionProcessTrackingService; import org.nl.wms.pdm.track.service.IPdmBdProductionProcessTrackingService;
import org.nl.wms.pdm.track.service.dao.PdmBdProductionProcessTracking; import org.nl.wms.pdm.track.service.dao.PdmBdProductionProcessTracking;
import org.nl.wms.pdm.vehiclebiding.service.IPdmBdVehicleBindingService;
import org.nl.wms.pdm.vehiclebiding.service.dao.PdmBdVehicleBinding;
import org.nl.wms.pdm.workorder.service.IPdmBdWorkorderService; import org.nl.wms.pdm.workorder.service.IPdmBdWorkorderService;
import org.nl.wms.pdm.workorder.service.dao.PdmBdWorkorder; import org.nl.wms.pdm.workorder.service.dao.PdmBdWorkorder;
import org.nl.wms.sch.group.service.ISchBaseVehiclematerialgroupService; import org.nl.wms.sch.group.service.ISchBaseVehiclematerialgroupService;
@ -96,6 +99,8 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
private RedissonClient redissonClient; private RedissonClient redissonClient;
@Autowired @Autowired
private IPdmBdMaterialResidueService materialResidueService; private IPdmBdMaterialResidueService materialResidueService;
@Autowired
private IPdmBdVehicleBindingService vehicleBindingService;
@Override @Override
public BaseResponse acsApply(JSONObject param) { public BaseResponse acsApply(JSONObject param) {
@ -311,6 +316,38 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
return requestNo; return requestNo;
} }
/** 分拣 - 记录钢托与木托的绑定 */
public BaseResponse recordVehicleBiding(JSONObject param) {
FeedBackSplitPalletStationRequest request = param.toJavaObject(FeedBackSplitPalletStationRequest.class);
String getStation = request.getGet_station(); // 取货点
String putStation = request.getPut_station(); // 放货点
// 查找当前点位中的信息,如果acs没有提供,就获取点位上的数据,如果点位没有,则数据失效
SchBasePoint pickupPoint = pointService.getById(getStation);
SchBasePoint putPoint = pointService.getById(putStation);
if (request.getGet_station_vehicle_code() == null) {
request.setGet_station_vehicle_code(pickupPoint.getVehicle_code());
}
if (request.getPut_station_vehicle_code() == null) {
request.setPut_station_vehicle_code(putPoint.getVehicle_code());
}
// 获取工单
PdmBdWorkorder productionTask = workorderService.getDeviceProductionTask(pickupPoint.getParent_point_code());
// 插入数据
PdmBdVehicleBinding vehicleBinding = new PdmBdVehicleBinding();
vehicleBinding.setOrigin_vehicle_code(request.getGet_station_vehicle_code());
vehicleBinding.setOrigin_vehicle_type(pickupPoint.getVehicle_type());
vehicleBinding.setOrigin_qty(request.getGet_station_qty());
vehicleBinding.setTarget_vehicle_code(request.getPut_station_vehicle_code());
vehicleBinding.setTarget_vehicle_type(putPoint.getVehicle_type());
vehicleBinding.setTarget_qty(request.getPut_station_qty());
if (productionTask != null) {
vehicleBinding.setOrder_code(productionTask.getWorkorder_code());
}
vehicleBindingService.create(vehicleBinding);
return BaseResponse.responseOk(request.getRequestNo());
}
/** 反馈压机残留重量*/ /** 反馈压机残留重量*/
public BaseResponse applyFeedbackWeight(JSONObject param) { public BaseResponse applyFeedbackWeight(JSONObject param) {
ApplyTaskRequest applyTaskRequest = param.toJavaObject(ApplyTaskRequest.class); ApplyTaskRequest applyTaskRequest = param.toJavaObject(ApplyTaskRequest.class);
@ -351,34 +388,36 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
/** 人工排产确认 */ /** 人工排产确认 */
public BaseResponse orderVerify(JSONObject param) { // 执行中 public BaseResponse orderVerify(JSONObject param) { // 执行中
String requestNo = param.getString("requestNo"); String requestNo = param.getString("requestNo");
String workorderId = param.getString("workorder_id"); String workorderCode = param.getString("order_code");
if (workorderId == null) { if (workorderCode == null) {
return BaseResponse.responseError(requestNo, "工单标识不能为空!"); return BaseResponse.responseError(requestNo, "工单标识不能为空!");
} }
PdmBdWorkorder bdWorkorder = workorderService.getById(workorderId); PdmBdWorkorder bdWorkorder = workorderService.getByCode(workorderCode);
if (bdWorkorder == null) { if (bdWorkorder == null) {
return BaseResponse.responseError(requestNo, "物料信息为空!"); return BaseResponse.responseError(requestNo, "物料信息为空!");
} }
bdWorkorder.setWorkorder_status(WorkOrderStatusEnum.PRODUCING.getCode()); bdWorkorder.setWorkorder_status(WorkOrderStatusEnum.PRODUCING.getCode());
bdWorkorder.setRealproducestart_date(DateUtil.now()); bdWorkorder.setRealproducestart_date(DateUtil.now());
workorderService.update(bdWorkorder); TaskUtils.setWorkOrderUpdateByAcs(bdWorkorder);
workorderService.updateById(bdWorkorder);
return BaseResponse.responseOk(requestNo); return BaseResponse.responseOk(requestNo);
} }
/** 工单完成 */ /** 工单完成 */
public BaseResponse orderFinish(JSONObject param) { // 完成 public BaseResponse orderFinish(JSONObject param) { // 完成
String requestNo = param.getString("requestNo"); String requestNo = param.getString("requestNo");
String workorderId = param.getString("workorder_id"); String workorderCode = param.getString("order_code");
if (workorderId == null) { if (workorderCode == null) {
return BaseResponse.responseError(requestNo, "工单标识不能为空!"); return BaseResponse.responseError(requestNo, "工单标识不能为空!");
} }
PdmBdWorkorder bdWorkorder = workorderService.getById(workorderId); PdmBdWorkorder bdWorkorder = workorderService.getByCode(workorderCode);
if (bdWorkorder == null) { if (bdWorkorder == null) {
return BaseResponse.responseError(requestNo, "物料信息为空!"); return BaseResponse.responseError(requestNo, "物料信息为空!");
} }
bdWorkorder.setWorkorder_status(WorkOrderStatusEnum.COMPLETE.getCode()); bdWorkorder.setWorkorder_status(WorkOrderStatusEnum.COMPLETE.getCode());
bdWorkorder.setRealproduceend_date(DateUtil.now()); bdWorkorder.setRealproduceend_date(DateUtil.now());
workorderService.update(bdWorkorder); TaskUtils.setWorkOrderUpdateByAcs(bdWorkorder);
workorderService.updateById(bdWorkorder);
return BaseResponse.responseOk(requestNo); return BaseResponse.responseOk(requestNo);
} }

66
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pdm/vehiclebiding/controller/PdmBdVehicleBindingController.java

@ -0,0 +1,66 @@
package org.nl.wms.pdm.vehiclebiding.controller;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.nl.common.base.TableDataInfo;
import org.nl.common.domain.query.PageQuery;
import org.nl.common.logging.annotation.Log;
import org.nl.wms.pdm.vehiclebiding.service.IPdmBdVehicleBindingService;
import org.nl.wms.pdm.vehiclebiding.service.dao.PdmBdVehicleBinding;
import org.springframework.beans.factory.annotation.Autowired;
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;
import java.util.Set;
/**
* @author lyd
* @date 2023-07-31
**/
@Slf4j
@RestController
@Api(tags = "分拣载具关联记录管理")
@RequestMapping("/api/pdmBdVehicleBinding")
public class PdmBdVehicleBindingController {
@Autowired
private IPdmBdVehicleBindingService pdmBdVehicleBindingService;
@GetMapping
@Log("查询分拣载具关联记录")
@ApiOperation("查询分拣载具关联记录")
//@SaCheckPermission("@el.check('pdmBdVehicleBinding:list')")
public ResponseEntity<Object> query(@RequestParam Map whereJson, PageQuery page){
return new ResponseEntity<>(TableDataInfo.build(pdmBdVehicleBindingService.queryAll(whereJson,page)),HttpStatus.OK);
}
@PostMapping
@Log("新增分拣载具关联记录")
@ApiOperation("新增分拣载具关联记录")
//@SaCheckPermission("@el.check('pdmBdVehicleBinding:add')")
public ResponseEntity<Object> create(@Validated @RequestBody PdmBdVehicleBinding entity){
pdmBdVehicleBindingService.create(entity);
return new ResponseEntity<>(HttpStatus.CREATED);
}
@PutMapping
@Log("修改分拣载具关联记录")
@ApiOperation("修改分拣载具关联记录")
//@SaCheckPermission("@el.check('pdmBdVehicleBinding:edit')")
public ResponseEntity<Object> update(@Validated @RequestBody PdmBdVehicleBinding entity){
pdmBdVehicleBindingService.update(entity);
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
}
@Log("删除分拣载具关联记录")
@ApiOperation("删除分拣载具关联记录")
//@SaCheckPermission("@el.check('pdmBdVehicleBinding:del')")
@DeleteMapping
public ResponseEntity<Object> delete(@RequestBody Set<String> ids) {
pdmBdVehicleBindingService.deleteAll(ids);
return new ResponseEntity<>(HttpStatus.OK);
}
}

43
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pdm/vehiclebiding/service/IPdmBdVehicleBindingService.java

@ -0,0 +1,43 @@
package org.nl.wms.pdm.vehiclebiding.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.nl.common.domain.query.PageQuery;
import com.baomidou.mybatisplus.extension.service.IService;
import org.nl.wms.pdm.vehiclebiding.service.dao.PdmBdVehicleBinding;
import java.util.Map;
import java.util.Set;
/**
* @description 服务接口
* @author lyd
* @date 2023-07-31
**/
public interface IPdmBdVehicleBindingService extends IService<PdmBdVehicleBinding> {
/**
* 查询数据分页
* @param whereJson 条件
* @param pageable 分页参数
* @return IPage<PdmBdVehicleBinding>
*/
IPage<PdmBdVehicleBinding> queryAll(Map whereJson, PageQuery pageable);
/**
* 创建
* @param entity /
*/
void create(PdmBdVehicleBinding entity);
/**
* 编辑
* @param entity /
*/
void update(PdmBdVehicleBinding entity);
/**
* 多选删除
* @param ids /
*/
void deleteAll(Set<String> ids);
}

58
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pdm/vehiclebiding/service/dao/PdmBdVehicleBinding.java

@ -0,0 +1,58 @@
package org.nl.wms.pdm.vehiclebiding.service.dao;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
/**
* @description /
* @author lyd
* @date 2023-07-31
**/
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("pdm_bd_vehicle_binding")
public class PdmBdVehicleBinding implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(value = "associate_id", type = IdType.NONE)
@ApiModelProperty(value = "对应标识")
private String associate_id;
@ApiModelProperty(value = "源载具编码")
private String origin_vehicle_code;
@ApiModelProperty(value = "源载具类型")
private String origin_vehicle_type;
@ApiModelProperty(value = "目标载具编码")
private String target_vehicle_code;
@ApiModelProperty(value = "目标载具类型")
private String target_vehicle_type;
@ApiModelProperty(value = "源当前物料数量")
private String origin_qty;
@ApiModelProperty(value = "目标当前物料数量")
private String target_qty;
@ApiModelProperty(value = "取货点")
private String get_station;
@ApiModelProperty(value = "放货点")
private String put_station;
@ApiModelProperty(value = "工单号")
private String order_code;
@ApiModelProperty(value = "记录时间")
private String record_time;
}

12
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pdm/vehiclebiding/service/dao/mapper/PdmBdVehicleBindingMapper.java

@ -0,0 +1,12 @@
package org.nl.wms.pdm.vehiclebiding.service.dao.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.nl.wms.pdm.vehiclebiding.service.dao.PdmBdVehicleBinding;
/**
* @author lyd
* @date 2023-07-31
**/
public interface PdmBdVehicleBindingMapper extends BaseMapper<PdmBdVehicleBinding> {
}

5
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pdm/vehiclebiding/service/dao/mapper/PdmBdVehicleBindingMapper.xml

@ -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.pdm.vehiclebiding.service.dao.mapper.PdmBdVehicleBindingMapper">
</mapper>

46
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pdm/vehiclebiding/service/dto/PdmBdVehicleBindingDto.java

@ -0,0 +1,46 @@
package org.nl.wms.pdm.vehiclebiding.service.dto;
import lombok.Data;
import java.io.Serializable;
/**
* @description /
* @author lyd
* @date 2023-07-31
**/
@Data
public class PdmBdVehicleBindingDto implements Serializable {
/** 对应标识 */
private String associate_id;
/** 源载具编码 */
private String origin_vehicle_code;
/** 源载具类型 */
private String origin_vehicle_type;
/** 目标载具编码 */
private String target_vehicle_code;
/** 目标载具类型 */
private String target_vehicle_type;
/** 源当前物料数量 */
private String origin_qty;
/** 目标当前物料数量 */
private String target_qty;
/** 取货点 */
private String get_station;
/** 放货点 */
private String put_station;
/** 工单号 */
private String order_code;
/** 记录时间 */
private String record_time;
}

12
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pdm/vehiclebiding/service/dto/PdmBdVehicleBindingQuery.java

@ -0,0 +1,12 @@
package org.nl.wms.pdm.vehiclebiding.service.dto;
import org.nl.common.domain.query.BaseQuery;
import org.nl.wms.pdm.vehiclebiding.service.dao.PdmBdVehicleBinding;
/**
* @author lyd
* @date 2023-07-31
**/
public class PdmBdVehicleBindingQuery extends BaseQuery<PdmBdVehicleBinding> {
}

67
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pdm/vehiclebiding/service/impl/PdmBdVehicleBindingServiceImpl.java

@ -0,0 +1,67 @@
package org.nl.wms.pdm.vehiclebiding.service.impl;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.IdUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.nl.common.domain.query.PageQuery;
import org.nl.common.exception.BadRequestException;
import org.nl.common.utils.SecurityUtils;
import org.nl.wms.pdm.vehiclebiding.service.IPdmBdVehicleBindingService;
import org.nl.wms.pdm.vehiclebiding.service.dao.mapper.PdmBdVehicleBindingMapper;
import org.nl.wms.pdm.vehiclebiding.service.dao.PdmBdVehicleBinding;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Map;
import java.util.Set;
/**
* @description 服务实现
* @author lyd
* @date 2023-07-31
**/
@Slf4j
@Service
public class PdmBdVehicleBindingServiceImpl extends ServiceImpl<PdmBdVehicleBindingMapper, PdmBdVehicleBinding> implements IPdmBdVehicleBindingService {
@Autowired
private PdmBdVehicleBindingMapper pdmBdVehicleBindingMapper;
@Override
public IPage<PdmBdVehicleBinding> queryAll(Map whereJson, PageQuery page){
LambdaQueryWrapper<PdmBdVehicleBinding> lam = new LambdaQueryWrapper<>();
IPage<PdmBdVehicleBinding> pages = new Page<>(page.getPage() + 1, page.getSize());
pdmBdVehicleBindingMapper.selectPage(pages, lam);
return pages;
}
@Override
public void create(PdmBdVehicleBinding entity) {
String now = DateUtil.now();
entity.setAssociate_id(IdUtil.getSnowflake(1, 1).nextIdStr());
entity.setRecord_time(now);
pdmBdVehicleBindingMapper.insert(entity);
}
@Override
public void update(PdmBdVehicleBinding entity) {
PdmBdVehicleBinding dto = pdmBdVehicleBindingMapper.selectById(entity.getAssociate_id());
if (dto == null) throw new BadRequestException("被删除或无权限,操作失败!");
String now = DateUtil.now();
entity.setRecord_time(now);
pdmBdVehicleBindingMapper.updateById(entity);
}
@Override
public void deleteAll(Set<String> ids) {
// 真删除
pdmBdVehicleBindingMapper.deleteBatchIds(ids);
}
}

8
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/report/controller/ReportController.java

@ -36,4 +36,12 @@ public class ReportController {
// return new ResponseEntity<>(TableDataInfo.build(reportService.mudTransfer(json,page)), HttpStatus.OK); // return new ResponseEntity<>(TableDataInfo.build(reportService.mudTransfer(json,page)), HttpStatus.OK);
return null; return null;
} }
@PostMapping("/inventoryAlert")
@Log("库存物料提示记录表")
@ApiOperation("库存物料提示记录表")
public ResponseEntity<Object> inventoryAlert(JSONObject json, PageQuery page){
// return new ResponseEntity<>(TableDataInfo.build(reportService.inventoryAlert(json,page)), HttpStatus.OK);
return null;
}
} }

2
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task/service/impl/SchBaseTaskServiceImpl.java

@ -210,7 +210,7 @@ public class SchBaseTaskServiceImpl extends ServiceImpl<SchBaseTaskMapper, SchBa
throw new BadRequestException("操作失败"); throw new BadRequestException("操作失败");
} }
// 根据标识找到任务 // 根据标识找到任务
SchBaseTask taskOne = schBaseTaskMapper.selectById(task_code); SchBaseTask taskOne = this.getByCode(task_code);
if (Integer.parseInt(taskOne.getTask_status()) >= Integer.parseInt(TaskStatus.FINISHED.getCode())) { if (Integer.parseInt(taskOne.getTask_status()) >= Integer.parseInt(TaskStatus.FINISHED.getCode())) {
throw new BadRequestException("任务已完成或已取消!"); throw new BadRequestException("任务已完成或已取消!");
} }

20
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/hn/HNMLTask.java

@ -124,7 +124,7 @@ public class HNMLTask extends AbstractTask {
task.setRemark(""); task.setRemark("");
task.setVehicle_type(GeneralDefinition.MATERIAL_CUP); task.setVehicle_type(GeneralDefinition.MATERIAL_CUP);
// 告知acs去左边右边 // 告知acs去左边右边
String deviceCode = point.getDevice_code(); String deviceCode = point.getParent_point_code();
int number = Integer.parseInt(deviceCode.replaceAll("[^0-9]", "")); int number = Integer.parseInt(deviceCode.replaceAll("[^0-9]", ""));
// 1左边2右边 // 1左边2右边
number = (number % 2) == 0 ? 2 : (number % 2); number = (number % 2) == 0 ? 2 : (number % 2);
@ -136,7 +136,7 @@ public class HNMLTask extends AbstractTask {
pointService.updateById(point); pointService.updateById(point);
//下发 //下发
this.renotifyAcs(task); // this.renotifyAcs(task);
} }
} }
@ -152,15 +152,13 @@ public class HNMLTask extends AbstractTask {
// *: 混碾无工单 // *: 混碾无工单
String materialCode = requestParam.getString("material_code"); // 混碾编码 String materialCode = requestParam.getString("material_code"); // 混碾编码
Assert.notNull(materialCode, "物料编码不能为空!"); Assert.notNull(materialCode, "物料编码不能为空!");
MdBaseMaterial baseMaterialObj = materialService.findByCode(materialCode);
Assert.notNull(baseMaterialObj, "物料: " + materialCode + "未找到!");
// 根据工单物料标识寻找点位 // 根据工单物料标识寻找点位
List<SchBasePoint> points = hnMapper.findPointForHNMLAndWorkOrder(nextRegionStr, baseMaterialObj.getMaterial_id()); List<SchBasePoint> points = hnMapper.findPointForHNMLAndWorkOrder(nextRegionStr, materialCode);
return ObjectUtil.isNotEmpty(points) ? points.get(0) : null; return ObjectUtil.isNotEmpty(points) ? points.get(0) : null;
} }
@Override @Override
public void forceFinish(String task_code) { public void forceFinish(String task_code) { // 人工完成任务
SchBaseTask taskObj = taskService.getByCode(task_code); SchBaseTask taskObj = taskService.getByCode(task_code);
if (ObjectUtil.isEmpty(taskObj)) { if (ObjectUtil.isEmpty(taskObj)) {
throw new BadRequestException("该任务不存在"); throw new BadRequestException("该任务不存在");
@ -169,12 +167,13 @@ public class HNMLTask extends AbstractTask {
} }
@Override @Override
public void cancel(String task_code) { public void cancel(String task_code) { // 人工取消任务
SchBaseTask taskObj = taskService.getByCode(task_code); SchBaseTask taskObj = taskService.getByCode(task_code);
if (ObjectUtil.isEmpty(taskObj)) { if (ObjectUtil.isEmpty(taskObj)) {
throw new BadRequestException("该任务不存在"); throw new BadRequestException("该任务不存在");
} }
this.cancelTask(taskObj, TaskFinishedTypeEnum.MANUAL_PC); this.cancelTask(taskObj, TaskFinishedTypeEnum.MANUAL_PC);
// todo: 通知acs取消任务
} }
public void finishTask(SchBaseTask taskObj, TaskFinishedTypeEnum taskFinishedType) { public void finishTask(SchBaseTask taskObj, TaskFinishedTypeEnum taskFinishedType) {
@ -211,6 +210,10 @@ public class HNMLTask extends AbstractTask {
// 找到父点位 // 找到父点位
SchBasePoint serviceOne = pointService.getOne(new LambdaQueryWrapper<SchBasePoint>() SchBasePoint serviceOne = pointService.getOne(new LambdaQueryWrapper<SchBasePoint>()
.eq(SchBasePoint::getPoint_code, parentPointCode)); .eq(SchBasePoint::getPoint_code, parentPointCode));
// 父点位(设备)需要切换成非空状态
PointUtils.setUpdateByType(serviceOne, taskFinishedType);
serviceOne.setPoint_status(PointStatusEnum.FULL_POINT.getCode());
pointService.updateById(serviceOne);
// 找压机工单 // 找压机工单
PdmBdWorkorder one = workorderService.getOne(new LambdaQueryWrapper<PdmBdWorkorder>() PdmBdWorkorder one = workorderService.getOne(new LambdaQueryWrapper<PdmBdWorkorder>()
.eq(serviceOne != null, PdmBdWorkorder::getPoint_code, serviceOne.getPoint_code()) .eq(serviceOne != null, PdmBdWorkorder::getPoint_code, serviceOne.getPoint_code())
@ -270,7 +273,7 @@ public class HNMLTask extends AbstractTask {
String vehicleType = param.getString("vehicle_type"); String vehicleType = param.getString("vehicle_type");
// 泥料物料对应不出物料标识 // 泥料物料对应不出物料标识
String materialCode = param.getString("material_code"); // 泥料编码 String materialCode = param.getString("material_code"); // 泥料编码
String mixTimes = param.getString("bag_number"); // 碾次 String mixTimes = param.getString("mix_times"); // 碾次
// 载具类型默认料盅 // 载具类型默认料盅
if (vehicleType == null) { if (vehicleType == null) {
vehicleType = GeneralDefinition.MATERIAL_CUP; vehicleType = GeneralDefinition.MATERIAL_CUP;
@ -292,6 +295,7 @@ public class HNMLTask extends AbstractTask {
// 要把数据存到组盘表 // 要把数据存到组盘表
SchBaseVehiclematerialgroup groupEntity = new SchBaseVehiclematerialgroup(); SchBaseVehiclematerialgroup groupEntity = new SchBaseVehiclematerialgroup();
groupEntity.setGroup_id(IdUtil.getSnowflake(1, 1).nextIdStr()); groupEntity.setGroup_id(IdUtil.getSnowflake(1, 1).nextIdStr());
groupEntity.setMaterial_id("-");
groupEntity.setRedundance_material_code(materialCode); groupEntity.setRedundance_material_code(materialCode);
groupEntity.setCreate_id(GeneralDefinition.ACS_ID); groupEntity.setCreate_id(GeneralDefinition.ACS_ID);
groupEntity.setCreate_name(GeneralDefinition.ACS_NAME); groupEntity.setCreate_name(GeneralDefinition.ACS_NAME);

2
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/hn/mapper/HNMapper.java

@ -13,5 +13,5 @@ import java.util.List;
*/ */
public interface HNMapper extends BaseMapper<JSONObject> { public interface HNMapper extends BaseMapper<JSONObject> {
List<SchBasePoint> findPointForHNML(List<String> regionCode, String materialId); List<SchBasePoint> findPointForHNML(List<String> regionCode, String materialId);
List<SchBasePoint> findPointForHNMLAndWorkOrder(List<String> regionCode, String materialId); List<SchBasePoint> findPointForHNMLAndWorkOrder(List<String> regionCode, String materialCode);
} }

2
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/hn/mapper/HNMapper.xml

@ -33,7 +33,7 @@
AND p.parent_point_code LIKE CONCAT('%', AND p.parent_point_code LIKE CONCAT('%',
(SELECT p2.point_code FROM sch_base_point p2 (SELECT p2.point_code FROM sch_base_point p2
WHERE p2.point_code IN ( WHERE p2.point_code IN (
SELECT w.point_code FROM pdm_bd_workorder w WHERE w.material_id = #{materialId} AND w.workorder_status = '3' SELECT w.point_code FROM pdm_bd_workorder w WHERE w.raw_material_code = #{materialCode} AND w.workorder_status = '3'
) )
AND p2.point_status = '1' AND p2.point_status = '1'
ORDER BY p2.update_time LIMIT 1), '%') ORDER BY p2.update_time LIMIT 1), '%')

4
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/task/tasks/yz/YZQKTask.java

@ -159,10 +159,10 @@ public class YZQKTask extends AbstractTask {
PointUtils.setUpdateByType(startPointObj, taskFinishedType); PointUtils.setUpdateByType(startPointObj, taskFinishedType);
PointUtils.clearPoint(startPointObj); PointUtils.clearPoint(startPointObj);
endPointObj.setPoint_status(PointStatusEnum.EMPTY_VEHICLE.getCode()); endPointObj.setPoint_status(PointStatusEnum.EMPTY_VEHICLE.getCode());
endPointObj.setVehicle_type("2"); endPointObj.setVehicle_type(GeneralDefinition.STEEL_TRAY);
endPointObj.setVehicle_qty(1); endPointObj.setVehicle_qty(1);
PointUtils.setUpdateByType(endPointObj, taskFinishedType); PointUtils.setUpdateByType(endPointObj, taskFinishedType);
pointService.update(endPointObj); pointService.updateById(endPointObj);
} }
// 任务完成 // 任务完成
taskObj.setTask_status(TaskStatus.FINISHED.getCode()); taskObj.setTask_status(TaskStatus.FINISHED.getCode());

126
lms/nladmin-ui/src/views/wms/pdm/vehiclebiding/index.vue

@ -0,0 +1,126 @@
<template>
<div class="app-container">
<!--工具栏-->
<div class="head-container">
<!--如果想在工具栏加入更多按钮可以使用插槽方式 slot = 'left' or 'right'-->
<crudOperation :permission="permission" />
<!--表单组件-->
<el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" :title="crud.status.title" width="500px">
<el-form ref="form" :model="form" :rules="rules" size="mini" label-width="80px">
<el-form-item label="源载具编码">
<el-input v-model="form.origin_vehicle_code" style="width: 370px;" />
</el-form-item>
<el-form-item label="源载具类型">
<el-input v-model="form.origin_vehicle_type" style="width: 370px;" />
</el-form-item>
<el-form-item label="目标载具编码">
<el-input v-model="form.target_vehicle_code" style="width: 370px;" />
</el-form-item>
<el-form-item label="目标载具类型">
<el-input v-model="form.target_vehicle_type" style="width: 370px;" />
</el-form-item>
<el-form-item label="源当前物料数量">
<el-input v-model="form.origin_qty" style="width: 370px;" />
</el-form-item>
<el-form-item label="目标当前物料数量">
<el-input v-model="form.target_qty" style="width: 370px;" />
</el-form-item>
<el-form-item label="取货点">
<el-input v-model="form.get_station" style="width: 370px;" />
</el-form-item>
<el-form-item label="放货点">
<el-input v-model="form.put_station" style="width: 370px;" />
</el-form-item>
<el-form-item label="工单号">
<el-input v-model="form.order_code" style="width: 370px;" />
</el-form-item>
<el-form-item label="记录时间">
<el-input v-model="form.record_time" style="width: 370px;" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="text" @click="crud.cancelCU">取消</el-button>
<el-button :loading="crud.cu === 2" type="primary" @click="crud.submitCU">确认</el-button>
</div>
</el-dialog>
<!--表格渲染-->
<el-table ref="table" v-loading="crud.loading" :data="crud.data" size="mini" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
<el-table-column type="selection" width="55" />
<el-table-column prop="origin_vehicle_code" label="源载具编码" :min-width="flexWidth('origin_vehicle_code',crud.data,'源载具编码')"/>
<el-table-column prop="origin_vehicle_type" label="源载具类型" :min-width="flexWidth('origin_vehicle_type',crud.data,'源载具类型')"/>
<el-table-column prop="target_vehicle_code" label="目标载具编码" :min-width="flexWidth('target_vehicle_code',crud.data,'目标载具编码')"/>
<el-table-column prop="target_vehicle_type" label="目标载具类型" :min-width="flexWidth('target_vehicle_type',crud.data,'目标载具类型')"/>
<el-table-column prop="origin_qty" label="源当前物料数量" :min-width="flexWidth('origin_qty',crud.data,'源当前物料数量')"/>
<el-table-column prop="target_qty" label="目标当前物料数量" :min-width="flexWidth('target_qty',crud.data,'目标当前物料数量')"/>
<el-table-column prop="get_station" label="取货点" :min-width="flexWidth('get_station',crud.data,'取货点')"/>
<el-table-column prop="put_station" label="放货点" :min-width="flexWidth('put_station',crud.data,'放货点')"/>
<el-table-column prop="order_code" label="工单号" :min-width="flexWidth('order_code',crud.data,'工单号')"/>
<el-table-column prop="record_time" label="记录时间" :min-width="flexWidth('record_time',crud.data,'记录时间')"/>
<el-table-column v-permission="[]" label="操作" width="120px" align="center" fixed="right">
<template slot-scope="scope">
<udOperation
:data="scope.row"
:permission="permission"
/>
</template>
</el-table-column>
</el-table>
<!--分页组件-->
<pagination />
</div>
</div>
</template>
<script>
import crudPdmBdVehicleBinding from './pdmBdVehicleBinding'
import CRUD, {crud, form, header, presenter} from '@crud/crud'
import rrOperation from '@crud/RR.operation'
import crudOperation from '@crud/CRUD.operation'
import udOperation from '@crud/UD.operation'
import pagination from '@crud/Pagination'
const defaultForm = {
associate_id: null,
origin_vehicle_code: null,
origin_vehicle_type: null,
target_vehicle_code: null,
target_vehicle_type: null,
origin_qty: null,
target_qty: null,
get_station: null,
put_station: null,
order_code: null,
record_time: null
}
export default {
name: 'PdmBdVehicleBinding',
components: { pagination, crudOperation, rrOperation, udOperation },
mixins: [presenter(), header(), form(defaultForm), crud()],
cruds() {
return CRUD({
title: '分拣载具关联记录',
url: 'api/pdmBdVehicleBinding',
idField: 'associate_id',
sort: 'associate_id,desc',
crudMethod: { ...crudPdmBdVehicleBinding }
})
},
data() {
return {
permission: {
},
rules: {
} }
},
methods: {
// false
[CRUD.HOOK.beforeRefresh]() {
return true
}
}
}
</script>
<style scoped>
</style>

27
lms/nladmin-ui/src/views/wms/pdm/vehiclebiding/pdmBdVehicleBinding.js

@ -0,0 +1,27 @@
import request from '@/utils/request'
export function add(data) {
return request({
url: 'api/pdmBdVehicleBinding',
method: 'post',
data
})
}
export function del(ids) {
return request({
url: 'api/pdmBdVehicleBinding/',
method: 'delete',
data: ids
})
}
export function edit(data) {
return request({
url: 'api/pdmBdVehicleBinding',
method: 'put',
data
})
}
export default { add, edit, del }
Loading…
Cancel
Save