add:增加退料入库
This commit is contained in:
@@ -1,11 +1,14 @@
|
|||||||
package org.nl.common.base;
|
package org.nl.common.base;
|
||||||
|
|
||||||
|
import cn.hutool.core.date.DateUtil;
|
||||||
import cn.hutool.http.HttpStatus;
|
import cn.hutool.http.HttpStatus;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -28,8 +31,9 @@ public class TableDataInfo<T> implements Serializable {
|
|||||||
/**
|
/**
|
||||||
* 列表数据
|
* 列表数据
|
||||||
*/
|
*/
|
||||||
private List<T> content = new ArrayList<>();
|
private Object content = new ArrayList<>();
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private LocalDateTime timestamp = LocalDateTime.now();
|
||||||
/**
|
/**
|
||||||
* 消息状态码
|
* 消息状态码
|
||||||
*/
|
*/
|
||||||
@@ -38,11 +42,9 @@ public class TableDataInfo<T> implements Serializable {
|
|||||||
/**
|
/**
|
||||||
* 消息内容
|
* 消息内容
|
||||||
*/
|
*/
|
||||||
private String msg;
|
private String message;
|
||||||
/**
|
private Integer respCode;
|
||||||
* 反馈数据
|
private String respMsg;
|
||||||
*/
|
|
||||||
private Object data;
|
|
||||||
/**
|
/**
|
||||||
* 分页
|
* 分页
|
||||||
*
|
*
|
||||||
@@ -57,34 +59,30 @@ public class TableDataInfo<T> implements Serializable {
|
|||||||
public static <T> TableDataInfo<T> build(IPage<T> page) {
|
public static <T> TableDataInfo<T> build(IPage<T> page) {
|
||||||
TableDataInfo<T> rspData = new TableDataInfo<>();
|
TableDataInfo<T> rspData = new TableDataInfo<>();
|
||||||
rspData.setCode(String.valueOf(HttpStatus.HTTP_OK));
|
rspData.setCode(String.valueOf(HttpStatus.HTTP_OK));
|
||||||
rspData.setMsg("操作成功");
|
rspData.setMessage("操作成功");
|
||||||
|
rspData.setRespMsg("操作成功");
|
||||||
|
rspData.setRespCode(0);
|
||||||
rspData.setContent(page.getRecords());
|
rspData.setContent(page.getRecords());
|
||||||
rspData.setTotalElements(page.getTotal());
|
rspData.setTotalElements(page.getTotal());
|
||||||
return rspData;
|
return rspData;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static <T> TableDataInfo<T> build(List<T> list) {
|
public static <T> TableDataInfo<T> build(Object list) {
|
||||||
TableDataInfo<T> rspData = new TableDataInfo<>();
|
TableDataInfo<T> rspData = new TableDataInfo<>();
|
||||||
rspData.setCode(String.valueOf(HttpStatus.HTTP_OK));
|
rspData.setCode(String.valueOf(HttpStatus.HTTP_OK));
|
||||||
rspData.setMsg("操作成功");
|
rspData.setMessage("操作成功");
|
||||||
rspData.setContent(list);
|
rspData.setContent(list);
|
||||||
rspData.setTotalElements(list.size());
|
rspData.setRespMsg("操作成功");
|
||||||
|
rspData.setRespCode(0);
|
||||||
return rspData;
|
return rspData;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static <T> TableDataInfo<T> build() {
|
public static <T> TableDataInfo<T> build() {
|
||||||
TableDataInfo<T> rspData = new TableDataInfo<>();
|
TableDataInfo<T> rspData = new TableDataInfo<>();
|
||||||
rspData.setCode(String.valueOf(HttpStatus.HTTP_OK));
|
rspData.setCode(String.valueOf(HttpStatus.HTTP_OK));
|
||||||
rspData.setMsg("操作成功");
|
rspData.setMessage("操作成功");
|
||||||
|
rspData.setRespMsg("操作成功");
|
||||||
|
rspData.setRespCode(0);
|
||||||
return rspData;
|
return rspData;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static <T> TableDataInfo<T> buildJson(Object result) {
|
|
||||||
TableDataInfo<T> rspData = new TableDataInfo<>();
|
|
||||||
rspData.setCode(String.valueOf(HttpStatus.HTTP_OK));
|
|
||||||
rspData.setData(result);
|
|
||||||
rspData.setMsg("操作成功");
|
|
||||||
return rspData;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ import static org.springframework.http.HttpStatus.BAD_REQUEST;
|
|||||||
@Getter
|
@Getter
|
||||||
public class BadRequestException extends RuntimeException{
|
public class BadRequestException extends RuntimeException{
|
||||||
|
|
||||||
private Integer status = BAD_REQUEST.value();
|
private String code = "400";
|
||||||
|
|
||||||
public BadRequestException(String msg){
|
public BadRequestException(String msg){
|
||||||
super(msg);
|
super(msg);
|
||||||
@@ -40,6 +40,6 @@ public class BadRequestException extends RuntimeException{
|
|||||||
|
|
||||||
public BadRequestException(HttpStatus status,String msg){
|
public BadRequestException(HttpStatus status,String msg){
|
||||||
super(msg);
|
super(msg);
|
||||||
this.status = status.value();
|
this.code = String.valueOf(status.value());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ import com.fasterxml.jackson.annotation.JsonFormat;
|
|||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Zheng Jie
|
* @author Zheng Jie
|
||||||
@@ -27,9 +28,26 @@ import java.time.LocalDateTime;
|
|||||||
@Data
|
@Data
|
||||||
class ApiError {
|
class ApiError {
|
||||||
|
|
||||||
private Integer status = 400;
|
/**
|
||||||
|
* 总记录数
|
||||||
|
*/
|
||||||
|
private long totalElements = 0;
|
||||||
|
/**
|
||||||
|
* 列表数据
|
||||||
|
*/
|
||||||
|
private Object content = new ArrayList<>();
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
private LocalDateTime timestamp;
|
private LocalDateTime timestamp;
|
||||||
|
/**
|
||||||
|
* 消息状态码
|
||||||
|
*/
|
||||||
|
private String code;
|
||||||
|
private Integer respCode;
|
||||||
|
private String respMsg;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 消息内容
|
||||||
|
*/
|
||||||
private String message;
|
private String message;
|
||||||
|
|
||||||
private ApiError() {
|
private ApiError() {
|
||||||
@@ -38,14 +56,19 @@ class ApiError {
|
|||||||
|
|
||||||
public static ApiError error(String message) {
|
public static ApiError error(String message) {
|
||||||
ApiError apiError = new ApiError();
|
ApiError apiError = new ApiError();
|
||||||
|
apiError.setCode("400");
|
||||||
|
apiError.setRespCode(1);
|
||||||
apiError.setMessage(message);
|
apiError.setMessage(message);
|
||||||
|
apiError.setRespMsg(message);
|
||||||
return apiError;
|
return apiError;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static ApiError error(Integer status, String message) {
|
public static ApiError error(String status, String message) {
|
||||||
ApiError apiError = new ApiError();
|
ApiError apiError = new ApiError();
|
||||||
apiError.setStatus(status);
|
apiError.setCode(status);
|
||||||
apiError.setMessage(message);
|
apiError.setMessage(message);
|
||||||
|
apiError.setMessage(message);
|
||||||
|
apiError.setRespMsg(message);
|
||||||
return apiError;
|
return apiError;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ public class GlobalExceptionHandler {
|
|||||||
@ExceptionHandler(value = NotLoginException.class)
|
@ExceptionHandler(value = NotLoginException.class)
|
||||||
public ResponseEntity<ApiError> notLoginException(Exception e) {
|
public ResponseEntity<ApiError> notLoginException(Exception e) {
|
||||||
log.error(ThrowableUtil.getStackTrace(e));
|
log.error(ThrowableUtil.getStackTrace(e));
|
||||||
return buildResponseEntity(ApiError.error(401, "token 失效"));
|
return buildResponseEntity(ApiError.error("401", "token 失效"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -69,7 +69,7 @@ public class GlobalExceptionHandler {
|
|||||||
public ResponseEntity<ApiError> badRequestException(BadRequestException e) {
|
public ResponseEntity<ApiError> badRequestException(BadRequestException e) {
|
||||||
// 打印堆栈信息
|
// 打印堆栈信息
|
||||||
log.error(ThrowableUtil.getStackTrace(e));
|
log.error(ThrowableUtil.getStackTrace(e));
|
||||||
return buildResponseEntity(ApiError.error(e.getStatus(), e.getMessage()));
|
return buildResponseEntity(ApiError.error(e.getCode(), e.getMessage()));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -89,7 +89,7 @@ public class GlobalExceptionHandler {
|
|||||||
public ResponseEntity<ApiError> entityNotFoundException(EntityNotFoundException e) {
|
public ResponseEntity<ApiError> entityNotFoundException(EntityNotFoundException e) {
|
||||||
// 打印堆栈信息
|
// 打印堆栈信息
|
||||||
log.error(ThrowableUtil.getStackTrace(e));
|
log.error(ThrowableUtil.getStackTrace(e));
|
||||||
return buildResponseEntity(ApiError.error(NOT_FOUND.value(), e.getMessage()));
|
return buildResponseEntity(ApiError.error("404", e.getMessage()));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -112,6 +112,6 @@ public class GlobalExceptionHandler {
|
|||||||
* 统一返回
|
* 统一返回
|
||||||
*/
|
*/
|
||||||
private ResponseEntity<ApiError> buildResponseEntity(ApiError apiError) {
|
private ResponseEntity<ApiError> buildResponseEntity(ApiError apiError) {
|
||||||
return new ResponseEntity<>(apiError, HttpStatus.valueOf(apiError.getStatus()));
|
return new ResponseEntity<>(apiError, HttpStatus.OK);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,6 +31,6 @@ public class GateWayController {
|
|||||||
@SaIgnore
|
@SaIgnore
|
||||||
@Log("外层服务请求wms")
|
@Log("外层服务请求wms")
|
||||||
public ResponseEntity<Object> apply(@RequestBody InteracteDto form) {
|
public ResponseEntity<Object> apply(@RequestBody InteracteDto form) {
|
||||||
return new ResponseEntity<>(TableDataInfo.buildJson(gateWayService.apply(form)),HttpStatus.OK);
|
return new ResponseEntity<>(TableDataInfo.build(gateWayService.apply(form)),HttpStatus.OK);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,64 @@
|
|||||||
|
package org.nl.wms.ext_manage.api;
|
||||||
|
|
||||||
|
import cn.hutool.http.HttpRequest;
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.nl.common.exception.BadRequestException;
|
||||||
|
import org.nl.config.SpringContextHolder;
|
||||||
|
import org.nl.wms.ext_manage.enums.EXTConstant;
|
||||||
|
import org.nl.wms.ext_manage.util.AcsUtil;
|
||||||
|
import org.nl.wms.pm_manage.demand.service.dao.PmDemand;
|
||||||
|
import org.nl.wms.system_manage.enums.SysParamConstant;
|
||||||
|
import org.nl.wms.system_manage.service.param.impl.SysParamServiceImpl;
|
||||||
|
import org.springframework.http.HttpStatus;
|
||||||
|
import org.springframework.http.ResponseEntity;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
@Slf4j
|
||||||
|
public class MesApi {
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class PmDemandCall {
|
||||||
|
private String Id;
|
||||||
|
private String ReqId;
|
||||||
|
private String CreatedOn;
|
||||||
|
private String TargetLocNo;
|
||||||
|
private Integer DeliveryMethod;
|
||||||
|
private String ContainerCode;
|
||||||
|
private String Qty;
|
||||||
|
public PmDemandCall(String id, String reqId, String createdOn, String targetLocNo, Integer deliveryMethod, String containerCode, String qty) {
|
||||||
|
Id = id;
|
||||||
|
ReqId = reqId;
|
||||||
|
CreatedOn = createdOn;
|
||||||
|
TargetLocNo = targetLocNo;
|
||||||
|
DeliveryMethod = deliveryMethod;
|
||||||
|
ContainerCode = containerCode;
|
||||||
|
Qty = qty;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public <T> ResponseEntity pmDemandCallback(List<PmDemandCall> pmDemands) {
|
||||||
|
final String param = JSON.toJSONString(pmDemands);
|
||||||
|
log.info("pmDemandCallback需求单回传参数:-------------------" + param);
|
||||||
|
String url = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode(SysParamConstant.MES_URL_DEMAND_CALL).getValue();
|
||||||
|
try {
|
||||||
|
String resultMsg = HttpRequest.post(url)
|
||||||
|
.body(param)
|
||||||
|
.execute().body();
|
||||||
|
JSONObject result = JSONObject.parseObject(resultMsg);
|
||||||
|
Integer respCode = result.getInteger("ResultCode");
|
||||||
|
log.info("pmDemandCallback需求单回传参数:-------------------" + result.toString());
|
||||||
|
if (respCode == null || respCode != 0) {
|
||||||
|
throw new BadRequestException("中鼎单据下推失败:" + result.getString("Message"));
|
||||||
|
}
|
||||||
|
return new ResponseEntity<>(result, HttpStatus.OK);
|
||||||
|
} catch (Exception e) {
|
||||||
|
throw new BadRequestException("中鼎单据下推失败:" + e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -19,9 +19,7 @@ import org.springframework.web.bind.annotation.RequestBody;
|
|||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
/**
|
|
||||||
* MES需求单同步接口
|
|
||||||
*/
|
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("api/mes/structLine")
|
@RequestMapping("api/mes/structLine")
|
||||||
|
|||||||
@@ -2,13 +2,20 @@ package org.nl.wms.ext_manage.controller;
|
|||||||
|
|
||||||
import cn.dev33.satoken.annotation.SaIgnore;
|
import cn.dev33.satoken.annotation.SaIgnore;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.nl.common.base.TableDataInfo;
|
||||||
|
import org.nl.common.exception.BadRequestException;
|
||||||
|
import org.nl.common.logging.annotation.Log;
|
||||||
import org.nl.wms.ext_manage.service.MesToWmsService;
|
import org.nl.wms.ext_manage.service.MesToWmsService;
|
||||||
import org.nl.wms.ext_manage.service.dto.MesTaskParams;
|
import org.nl.wms.ext_manage.service.dto.MesTaskParams;
|
||||||
|
import org.nl.wms.pm_manage.pmreturn.service.IPmReturnService;
|
||||||
|
import org.nl.wms.pm_manage.pmreturn.service.dao.PmReturn;
|
||||||
|
import org.nl.wms.pm_manage.pmreturn.service.dto.PmReturnParam;
|
||||||
import org.nl.wms.welding_manage.service.work_order.IWorkOrderService;
|
import org.nl.wms.welding_manage.service.work_order.IWorkOrderService;
|
||||||
import org.nl.wms.welding_manage.service.work_order.dto.WorkOrderDto;
|
import org.nl.wms.welding_manage.service.work_order.dto.WorkOrderDto;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
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.util.CollectionUtils;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
@@ -16,9 +23,10 @@ import org.springframework.web.bind.annotation.RestController;
|
|||||||
|
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/api/mes")
|
@RequestMapping("/")
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class MesToWmsController {
|
public class MesToWmsController {
|
||||||
|
|
||||||
@@ -27,20 +35,47 @@ public class MesToWmsController {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private IWorkOrderService iWorkOrderService;
|
private IWorkOrderService iWorkOrderService;
|
||||||
|
|
||||||
@PostMapping("/lineLackMat")
|
@Autowired
|
||||||
|
private IPmReturnService iPmReturnService;
|
||||||
|
|
||||||
|
@PostMapping("api/mes/lineLackMat")
|
||||||
@SaIgnore
|
@SaIgnore
|
||||||
public ResponseEntity task(@Valid @RequestBody MesTaskParams mesTaskParams){
|
public ResponseEntity task(@Valid @RequestBody MesTaskParams mesTaskParams){
|
||||||
mesToWmsService.task(mesTaskParams);
|
mesToWmsService.task(mesTaskParams);
|
||||||
return new ResponseEntity<>(HttpStatus.OK);
|
return new ResponseEntity<>(HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/subWorkOrder")
|
/**
|
||||||
|
* 工单同步
|
||||||
|
* @param dtos
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PostMapping("app/restful/api/v3/wms/mesRequisitionSync")
|
||||||
@SaIgnore
|
@SaIgnore
|
||||||
public ResponseEntity subWorkOrder(@RequestBody List<WorkOrderDto.WorkOrderDataDto> dtos){
|
public ResponseEntity subWorkOrder(@RequestBody List<WorkOrderDto.WorkOrderDataDto> dtos){
|
||||||
for (WorkOrderDto.WorkOrderDataDto dto : dtos) {
|
for (WorkOrderDto.WorkOrderDataDto dto : dtos) {
|
||||||
iWorkOrderService.insert(dto);
|
iWorkOrderService.insert(dto);
|
||||||
}
|
}
|
||||||
|
|
||||||
return new ResponseEntity<>(HttpStatus.OK);
|
return new ResponseEntity<>(HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 退料单同步
|
||||||
|
* @param dtos
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PostMapping("app/restful/api/v3/wms/mesReturnSync")
|
||||||
|
@SaIgnore
|
||||||
|
@Log("新增生产退料单")
|
||||||
|
public ResponseEntity<Object> create(@Valid @RequestBody List<PmReturnParam> param) {
|
||||||
|
final List<PmReturn> pmReturns = iPmReturnService.listByIds(param.stream().map(PmReturnParam::getId).collect(Collectors.toList()));
|
||||||
|
if (!CollectionUtils.isEmpty(pmReturns)){
|
||||||
|
throw new BadRequestException("当前退料单已存在");
|
||||||
|
}
|
||||||
|
for (PmReturnParam pmReturnParam : param) {
|
||||||
|
iPmReturnService.create(pmReturnParam);
|
||||||
|
}
|
||||||
|
return new ResponseEntity<>(TableDataInfo.build(),HttpStatus.OK);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ public class PdaResponse<T> {
|
|||||||
public static <T> TableDataInfo<T> build(IPage<T> page) {
|
public static <T> TableDataInfo<T> build(IPage<T> page) {
|
||||||
TableDataInfo<T> rspData = new TableDataInfo<>();
|
TableDataInfo<T> rspData = new TableDataInfo<>();
|
||||||
rspData.setCode(String.valueOf(HttpStatus.HTTP_OK));
|
rspData.setCode(String.valueOf(HttpStatus.HTTP_OK));
|
||||||
rspData.setMsg("查询成功");
|
rspData.setMessage("查询成功");
|
||||||
rspData.setContent(page.getRecords());
|
rspData.setContent(page.getRecords());
|
||||||
rspData.setTotalElements(page.getTotal());
|
rspData.setTotalElements(page.getTotal());
|
||||||
return rspData;
|
return rspData;
|
||||||
|
|||||||
@@ -1,43 +0,0 @@
|
|||||||
package org.nl.wms.pm_manage.demand.listenerHandler;
|
|
||||||
|
|
||||||
import cn.hutool.core.date.DateUtil;
|
|
||||||
import com.alibaba.fastjson.JSON;
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
|
||||||
import org.nl.wms.pm_manage.demand.service.IPmDemandService;
|
|
||||||
import org.nl.wms.pm_manage.demand.service.dao.PmDemand;
|
|
||||||
import org.nl.wms.pm_manage.demand.service.enums.DemandStatus;
|
|
||||||
import org.nl.wms.pm_manage.listener.core.BaseFormListenerHandler;
|
|
||||||
import org.nl.wms.warehouse_manage.enums.IOSEnum;
|
|
||||||
import org.nl.wms.warehouse_manage.stockReturn.service.IPmStockReturnService;
|
|
||||||
import org.nl.wms.warehouse_manage.stockReturn.service.dao.PmStockReturn;
|
|
||||||
import org.nl.wms.warehouse_manage.stockReturn.service.enums.StockReturnStatusEnum;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Component;
|
|
||||||
|
|
||||||
@Component("pm_demand")
|
|
||||||
public class DemandFormListenerHandler extends BaseFormListenerHandler<DemandListenerParams> {
|
|
||||||
@Autowired
|
|
||||||
IPmDemandService iPmDemandService;
|
|
||||||
@Autowired
|
|
||||||
IPmStockReturnService iPmStockReturnService;
|
|
||||||
@Override
|
|
||||||
public void onApplicationEvent(DemandListenerParams params) {
|
|
||||||
iPmDemandService.update(new LambdaUpdateWrapper<PmDemand>()
|
|
||||||
.set(PmDemand::getAssign_qty,params.getQty())
|
|
||||||
.set(PmDemand::getStatus, DemandStatus.FINISH.getValue())
|
|
||||||
.eq(PmDemand::getId,params.getBillCode())
|
|
||||||
);
|
|
||||||
PmDemand one = iPmDemandService.getOne(new LambdaQueryWrapper<PmDemand>()
|
|
||||||
.eq(PmDemand::getId, params.getBillCode()));
|
|
||||||
if (one!=null){
|
|
||||||
final PmStockReturn stockReturn = new PmStockReturn();
|
|
||||||
stockReturn.setCreate_time(DateUtil.now());
|
|
||||||
stockReturn.setRequest_type(IOSEnum.BILL_TYPE.code("调拨出库"));
|
|
||||||
stockReturn.setStatus(StockReturnStatusEnum.TODO.getCode());
|
|
||||||
stockReturn.setRequest_data(JSON.toJSONString(one));
|
|
||||||
iPmStockReturnService.save(stockReturn);
|
|
||||||
}
|
|
||||||
//需求单昨晚,执行调拨流程
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
package org.nl.wms.pm_manage.demand.listenerHandler;
|
|
||||||
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
public class DemandListenerParams {
|
|
||||||
private String billCode;
|
|
||||||
private BigDecimal qty;
|
|
||||||
private String materialCode;
|
|
||||||
|
|
||||||
public DemandListenerParams(String billCode, BigDecimal qty, String materialCode) {
|
|
||||||
this.billCode = billCode;
|
|
||||||
this.qty = qty;
|
|
||||||
this.materialCode = materialCode;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -7,12 +7,12 @@ import lombok.Getter;
|
|||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public enum DemandStatus {
|
public enum DemandStatus {
|
||||||
CREATE("0","生成"),
|
CREATE("0","生成"),
|
||||||
DIS("01","分配"),
|
|
||||||
SEND("10","下发"),
|
SEND("10","下发"),
|
||||||
RUN("20","执行"),
|
RUN("20","执行"),
|
||||||
|
FINISH("80","完成"),
|
||||||
|
DIS("01","分配"),
|
||||||
DORETURN("50","待回传"),
|
DORETURN("50","待回传"),
|
||||||
RETURN_FAIL("70","回传失败"),
|
RETURN_FAIL("70","回传失败"),
|
||||||
FINISH("80","完成"),
|
|
||||||
CANCEL("90","取消"),
|
CANCEL("90","取消"),
|
||||||
;
|
;
|
||||||
private String value;
|
private String value;
|
||||||
|
|||||||
@@ -262,7 +262,8 @@ public class PmDemandServiceImpl extends ServiceImpl<PmDemandMapper, PmDemand> i
|
|||||||
detailRow.put("qty_unit_id", codeToIdMap.get(demand.getSkuCode()).getQty_unit_id());
|
detailRow.put("qty_unit_id", codeToIdMap.get(demand.getSkuCode()).getQty_unit_id());
|
||||||
detailRow.put("qty", demand.getQty());
|
detailRow.put("qty", demand.getQty());
|
||||||
detailRow.put("source_bill_code", demand.getId());
|
detailRow.put("source_bill_code", demand.getId());
|
||||||
detailRow.put("source_bill_type", "pm_demand");
|
//走调拨回传
|
||||||
|
detailRow.put("source_bill_type", "DealLLDBBillPmDeamndCallBack");
|
||||||
detailRow.put("source_billdtl_id", demand.getId());
|
detailRow.put("source_billdtl_id", demand.getId());
|
||||||
detailRow.put("remark", "关联工单:" + demand.getWorkOrder());
|
detailRow.put("remark", "关联工单:" + demand.getWorkOrder());
|
||||||
detailRow.put("load_port", demand.getTargetArea());
|
detailRow.put("load_port", demand.getTargetArea());
|
||||||
|
|||||||
@@ -0,0 +1,64 @@
|
|||||||
|
package org.nl.wms.pm_manage.pmreturn.controller;
|
||||||
|
|
||||||
|
import cn.dev33.satoken.annotation.SaIgnore;
|
||||||
|
import org.nl.common.base.TableDataInfo;
|
||||||
|
import org.nl.common.domain.query.PageQuery;
|
||||||
|
import org.nl.common.logging.annotation.Log;
|
||||||
|
import org.nl.wms.pm_manage.pmreturn.service.IPmReturnService;
|
||||||
|
import org.nl.wms.pm_manage.pmreturn.service.dto.PmReturnDto;
|
||||||
|
import org.nl.wms.pm_manage.pmreturn.service.dto.PmReturnParam;
|
||||||
|
import org.nl.wms.pm_manage.pmreturn.service.dto.PmReturnQuery;
|
||||||
|
import org.springframework.http.HttpStatus;
|
||||||
|
import org.springframework.http.ResponseEntity;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import javax.validation.Valid;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/api/pmReturn")
|
||||||
|
@SaIgnore
|
||||||
|
public class PmReturnController {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private IPmReturnService pmReturnService;
|
||||||
|
|
||||||
|
@GetMapping
|
||||||
|
@Log("查询生产退料单")
|
||||||
|
public ResponseEntity<Object> queryAll(PmReturnQuery query, PageQuery page) {
|
||||||
|
return new ResponseEntity<>(TableDataInfo.build(pmReturnService.queryPage(query, page)), HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
@Log("查询生产退料单详情")
|
||||||
|
public ResponseEntity<Object> getById(@PathVariable String id) {
|
||||||
|
return new ResponseEntity<>(pmReturnService.getDtoById(id), HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping
|
||||||
|
@Log("新增生产退料单")
|
||||||
|
public ResponseEntity<Object> create(@Valid @RequestBody PmReturnParam param) {
|
||||||
|
pmReturnService.create(param);
|
||||||
|
return new ResponseEntity<>(HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PutMapping
|
||||||
|
@Log("修改生产退料单")
|
||||||
|
public ResponseEntity<Object> update(@Validated @RequestBody PmReturnDto param) {
|
||||||
|
pmReturnService.update(param);
|
||||||
|
return new ResponseEntity<>(HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
@DeleteMapping
|
||||||
|
@Log("删除生产退料单")
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public ResponseEntity<Object> delete(@RequestBody String[] ids) {
|
||||||
|
List<String> idList = Arrays.asList(ids);
|
||||||
|
pmReturnService.deleteByIds(idList);
|
||||||
|
return new ResponseEntity<>(HttpStatus.OK);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
package org.nl.wms.pm_manage.pmreturn.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import org.nl.common.domain.query.PageQuery;
|
||||||
|
import org.nl.wms.pm_manage.pmreturn.service.dao.PmReturn;
|
||||||
|
import org.nl.wms.pm_manage.pmreturn.service.dto.PmReturnDto;
|
||||||
|
import org.nl.wms.pm_manage.pmreturn.service.dto.PmReturnParam;
|
||||||
|
import org.nl.wms.pm_manage.pmreturn.service.dto.PmReturnQuery;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface IPmReturnService extends IService<PmReturn> {
|
||||||
|
|
||||||
|
Page<PmReturnDto> queryPage(PmReturnQuery query, PageQuery pageQuery);
|
||||||
|
|
||||||
|
PmReturnDto getDtoById(String id);
|
||||||
|
|
||||||
|
void create(PmReturnParam param);
|
||||||
|
|
||||||
|
void update(PmReturnDto param);
|
||||||
|
|
||||||
|
void deleteByIds(List<String> ids);
|
||||||
|
}
|
||||||
@@ -0,0 +1,72 @@
|
|||||||
|
package org.nl.wms.pm_manage.pmreturn.service.dao;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@TableName("pm_return")
|
||||||
|
public class PmReturn extends Model<PmReturn> {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@TableId(value = "id", type = IdType.INPUT)
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
@TableField("order_code")
|
||||||
|
private String order_code;
|
||||||
|
|
||||||
|
@TableField("serial_no")
|
||||||
|
private String serial_no;
|
||||||
|
|
||||||
|
@TableField("sku_code")
|
||||||
|
private String sku_code;
|
||||||
|
|
||||||
|
@TableField("sku_name")
|
||||||
|
private String sku_name;
|
||||||
|
|
||||||
|
private BigDecimal qty;
|
||||||
|
|
||||||
|
@TableField("assign_qty")
|
||||||
|
private BigDecimal assign_qty;
|
||||||
|
|
||||||
|
private String unit;
|
||||||
|
|
||||||
|
@TableField("target_area")
|
||||||
|
private String target_area;
|
||||||
|
|
||||||
|
@TableField("container_code")
|
||||||
|
private String container_code;
|
||||||
|
|
||||||
|
@TableField("delivery_method")
|
||||||
|
private Integer delivery_method;
|
||||||
|
|
||||||
|
private String creator;
|
||||||
|
|
||||||
|
@TableField("create_time")
|
||||||
|
private String create_time;
|
||||||
|
|
||||||
|
@TableField("source_house_code")
|
||||||
|
private String source_house_code;
|
||||||
|
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
@TableField("update_time")
|
||||||
|
private String update_time;
|
||||||
|
|
||||||
|
@TableField("update_name")
|
||||||
|
private String update_name;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected Serializable pkVal() {
|
||||||
|
return this.id;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
package org.nl.wms.pm_manage.pmreturn.service.dao.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.nl.wms.pm_manage.pmreturn.service.dao.PmReturn;
|
||||||
|
import org.nl.wms.pm_manage.pmreturn.service.dto.PmReturnDto;
|
||||||
|
import org.nl.wms.pm_manage.pmreturn.service.dto.PmReturnQuery;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface PmReturnMapper extends BaseMapper<PmReturn> {
|
||||||
|
|
||||||
|
List<PmReturnDto> queryPage(@Param("query") PmReturnQuery query);
|
||||||
|
}
|
||||||
@@ -0,0 +1,64 @@
|
|||||||
|
<?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.pm_manage.pmreturn.service.dao.mapper.PmReturnMapper">
|
||||||
|
|
||||||
|
<resultMap id="PmReturnDtoMap" type="org.nl.wms.pm_manage.pmreturn.service.dto.PmReturnDto">
|
||||||
|
<result property="id" column="id"/>
|
||||||
|
<result property="orderCode" column="order_code"/>
|
||||||
|
<result property="serialNo" column="serial_no"/>
|
||||||
|
<result property="skuCode" column="sku_code"/>
|
||||||
|
<result property="skuName" column="sku_name"/>
|
||||||
|
<result property="qty" column="qty"/>
|
||||||
|
<result property="assignQty" column="assign_qty"/>
|
||||||
|
<result property="unit" column="unit"/>
|
||||||
|
<result property="targetArea" column="target_area"/>
|
||||||
|
<result property="containerCode" column="container_code"/>
|
||||||
|
<result property="deliveryMethod" column="delivery_method"/>
|
||||||
|
<result property="creator" column="creator"/>
|
||||||
|
<result property="createTime" column="create_time"/>
|
||||||
|
<result property="sourceHouseCode" column="source_house_code"/>
|
||||||
|
<result property="status" column="status"/>
|
||||||
|
<result property="updateTime" column="update_time"/>
|
||||||
|
<result property="updateName" column="update_name"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<select id="queryPage" resultMap="PmReturnDtoMap">
|
||||||
|
select *
|
||||||
|
from pm_return
|
||||||
|
<where>
|
||||||
|
<if test="query.blurry != null and query.blurry != ''">
|
||||||
|
and (
|
||||||
|
order_code like concat('%', #{query.blurry}, '%')
|
||||||
|
or sku_code like concat('%', #{query.blurry}, '%')
|
||||||
|
or sku_name like concat('%', #{query.blurry}, '%')
|
||||||
|
or container_code like concat('%', #{query.blurry}, '%')
|
||||||
|
)
|
||||||
|
</if>
|
||||||
|
<if test="query.orderCode != null and query.orderCode != ''">
|
||||||
|
and order_code like concat('%', #{query.orderCode}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="query.skuCode != null and query.skuCode != ''">
|
||||||
|
and sku_code like concat('%', #{query.skuCode}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="query.skuName != null and query.skuName != ''">
|
||||||
|
and sku_name like concat('%', #{query.skuName}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="query.targetArea != null and query.targetArea != ''">
|
||||||
|
and target_area like concat('%', #{query.targetArea}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="query.sourceHouseCode != null and query.sourceHouseCode != ''">
|
||||||
|
and source_house_code like concat('%', #{query.sourceHouseCode}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="query.status != null">
|
||||||
|
and status = #{query.status}
|
||||||
|
</if>
|
||||||
|
<if test="query.startTime != null and query.startTime != ''">
|
||||||
|
and create_time >= #{query.startTime}
|
||||||
|
</if>
|
||||||
|
<if test="query.endTime != null and query.endTime != ''">
|
||||||
|
and create_time <= #{query.endTime}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
order by create_time desc, update_time desc
|
||||||
|
</select>
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
package org.nl.wms.pm_manage.pmreturn.service.dto;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class PmReturnDto implements Serializable {
|
||||||
|
|
||||||
|
private String id;
|
||||||
|
private String orderCode;
|
||||||
|
private String serialNo;
|
||||||
|
private String skuCode;
|
||||||
|
private String skuName;
|
||||||
|
private BigDecimal qty;
|
||||||
|
private BigDecimal assignQty;
|
||||||
|
private String unit;
|
||||||
|
private String targetArea;
|
||||||
|
private String containerCode;
|
||||||
|
private Integer deliveryMethod;
|
||||||
|
private String creator;
|
||||||
|
private String createTime;
|
||||||
|
private String sourceHouseCode;
|
||||||
|
private Integer status;
|
||||||
|
private String updateTime;
|
||||||
|
private String updateName;
|
||||||
|
}
|
||||||
@@ -0,0 +1,76 @@
|
|||||||
|
package org.nl.wms.pm_manage.pmreturn.service.dto;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.validation.constraints.DecimalMin;
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class PmReturnParam {
|
||||||
|
|
||||||
|
@NotBlank(message = "单据唯一ID不能为空")
|
||||||
|
@JsonProperty(value = "id")
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
@NotBlank(message = "退料单号不能为空")
|
||||||
|
@JsonProperty(value = "orderCode")
|
||||||
|
private String orderCode;
|
||||||
|
|
||||||
|
@NotBlank(message = "序号不能为空")
|
||||||
|
@JsonProperty(value = "serialNo")
|
||||||
|
private String serialNo;
|
||||||
|
|
||||||
|
@NotBlank(message = "物料编码不能为空")
|
||||||
|
@JsonProperty(value = "skuCode")
|
||||||
|
private String skuCode;
|
||||||
|
|
||||||
|
@NotBlank(message = "物料名称不能为空")
|
||||||
|
@JsonProperty(value = "skuName")
|
||||||
|
private String skuName;
|
||||||
|
|
||||||
|
@NotNull(message = "数量不能为空")
|
||||||
|
@DecimalMin(value = "0", inclusive = false, message = "数量必须大于0")
|
||||||
|
@JsonProperty(value = "qty")
|
||||||
|
private BigDecimal qty;
|
||||||
|
|
||||||
|
@JsonProperty(value = "assignQty")
|
||||||
|
private BigDecimal assignQty;
|
||||||
|
|
||||||
|
@NotBlank(message = "单位不能为空")
|
||||||
|
@JsonProperty(value = "unit")
|
||||||
|
private String unit;
|
||||||
|
|
||||||
|
@NotBlank(message = "线边库位不能为空")
|
||||||
|
@JsonProperty(value = "targetArea")
|
||||||
|
private String targetArea;
|
||||||
|
|
||||||
|
@NotBlank(message = "容器编号不能为空")
|
||||||
|
@JsonProperty(value = "containerCode")
|
||||||
|
private String containerCode;
|
||||||
|
|
||||||
|
@NotNull(message = "配送方式不能为空")
|
||||||
|
@JsonProperty(value = "deliveryMethod")
|
||||||
|
private Integer deliveryMethod;
|
||||||
|
|
||||||
|
@NotBlank(message = "操作人工号不能为空")
|
||||||
|
@JsonProperty(value = "creator")
|
||||||
|
private String creator;
|
||||||
|
|
||||||
|
@NotBlank(message = "操作时间不能为空")
|
||||||
|
@JsonProperty(value = "createTime")
|
||||||
|
private String createTime;
|
||||||
|
|
||||||
|
@NotBlank(message = "来源仓别不能为空")
|
||||||
|
@JsonProperty(value = "sourceHouseCode")
|
||||||
|
private String sourceHouseCode;
|
||||||
|
|
||||||
|
@NotNull(message = "状态不能为空")
|
||||||
|
@JsonProperty(value = "status")
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
@JsonProperty(value = "updateName")
|
||||||
|
private String updateName;
|
||||||
|
}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
package org.nl.wms.pm_manage.pmreturn.service.dto;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import org.nl.common.domain.query.BaseQuery;
|
||||||
|
import org.nl.wms.pm_manage.pmreturn.service.dao.PmReturn;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class PmReturnQuery extends BaseQuery<PmReturn> {
|
||||||
|
|
||||||
|
private String blurry;
|
||||||
|
private String orderCode;
|
||||||
|
private String skuCode;
|
||||||
|
private String skuName;
|
||||||
|
private String targetArea;
|
||||||
|
private String sourceHouseCode;
|
||||||
|
private Integer status;
|
||||||
|
private String startTime;
|
||||||
|
private String endTime;
|
||||||
|
}
|
||||||
@@ -0,0 +1,129 @@
|
|||||||
|
package org.nl.wms.pm_manage.pmreturn.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.date.DateUtil;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.github.pagehelper.PageHelper;
|
||||||
|
import org.nl.common.domain.query.PageQuery;
|
||||||
|
import org.nl.common.exception.BadRequestException;
|
||||||
|
import org.nl.wms.pm_manage.pmreturn.service.IPmReturnService;
|
||||||
|
import org.nl.wms.pm_manage.pmreturn.service.dao.PmReturn;
|
||||||
|
import org.nl.wms.pm_manage.pmreturn.service.dao.mapper.PmReturnMapper;
|
||||||
|
import org.nl.wms.pm_manage.pmreturn.service.dto.PmReturnDto;
|
||||||
|
import org.nl.wms.pm_manage.pmreturn.service.dto.PmReturnParam;
|
||||||
|
import org.nl.wms.pm_manage.pmreturn.service.dto.PmReturnQuery;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.util.CollectionUtils;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import static org.nl.common.domain.query.PageQuery.trimStringFields;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class PmReturnServiceImpl extends ServiceImpl<PmReturnMapper, PmReturn> implements IPmReturnService {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Page<PmReturnDto> queryPage(PmReturnQuery query, PageQuery pageQuery) {
|
||||||
|
trimStringFields(query);
|
||||||
|
com.github.pagehelper.Page<Object> page = PageHelper.startPage(pageQuery.getPage() + 1, pageQuery.getSize());
|
||||||
|
page.setOrderBy("create_time desc, update_time desc");
|
||||||
|
List<PmReturnDto> records = this.baseMapper.queryPage(query);
|
||||||
|
Page<PmReturnDto> dtoPage = new Page<>(page.getPageNum(), page.getPageSize(), page.getTotal());
|
||||||
|
dtoPage.setRecords(records);
|
||||||
|
return dtoPage;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PmReturnDto getDtoById(String id) {
|
||||||
|
PmReturn entity = this.getById(id);
|
||||||
|
if (entity == null) {
|
||||||
|
throw new BadRequestException("生产退料单不存在");
|
||||||
|
}
|
||||||
|
return toDto(entity);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void create(PmReturnParam param) {
|
||||||
|
PmReturn entity = new PmReturn();
|
||||||
|
entity.setId(param.getId());
|
||||||
|
entity.setOrder_code(param.getOrderCode());
|
||||||
|
entity.setSerial_no(param.getSerialNo());
|
||||||
|
entity.setSku_code(param.getSkuCode());
|
||||||
|
entity.setSku_name(param.getSkuName());
|
||||||
|
entity.setQty(param.getQty());
|
||||||
|
entity.setAssign_qty(defaultAssignQty(param.getAssignQty()));
|
||||||
|
entity.setUnit(param.getUnit());
|
||||||
|
entity.setTarget_area(param.getTargetArea());
|
||||||
|
entity.setContainer_code(param.getContainerCode());
|
||||||
|
entity.setDelivery_method(param.getDeliveryMethod());
|
||||||
|
entity.setCreator(param.getCreator());
|
||||||
|
entity.setCreate_time(param.getCreateTime());
|
||||||
|
entity.setSource_house_code(param.getSourceHouseCode());
|
||||||
|
entity.setStatus(param.getStatus());
|
||||||
|
entity.setUpdate_name(param.getUpdateName());
|
||||||
|
entity.setUpdate_time(DateUtil.now());
|
||||||
|
this.save(entity);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void update(PmReturnDto param) {
|
||||||
|
PmReturn dbEntity = this.getById(param.getId());
|
||||||
|
if (dbEntity == null) {
|
||||||
|
throw new BadRequestException("生产退料单不存在");
|
||||||
|
}
|
||||||
|
PmReturn entity = new PmReturn();
|
||||||
|
entity.setId(param.getId());
|
||||||
|
entity.setOrder_code(param.getOrderCode());
|
||||||
|
entity.setSerial_no(param.getSerialNo());
|
||||||
|
entity.setSku_code(param.getSkuCode());
|
||||||
|
entity.setSku_name(param.getSkuName());
|
||||||
|
entity.setQty(param.getQty());
|
||||||
|
entity.setAssign_qty(defaultAssignQty(param.getAssignQty()));
|
||||||
|
entity.setUnit(param.getUnit());
|
||||||
|
entity.setTarget_area(param.getTargetArea());
|
||||||
|
entity.setContainer_code(param.getContainerCode());
|
||||||
|
entity.setDelivery_method(param.getDeliveryMethod());
|
||||||
|
entity.setCreator(param.getCreator());
|
||||||
|
entity.setCreate_time(param.getCreateTime());
|
||||||
|
entity.setSource_house_code(param.getSourceHouseCode());
|
||||||
|
entity.setStatus(param.getStatus());
|
||||||
|
entity.setUpdate_name(param.getUpdateName());
|
||||||
|
entity.setUpdate_time(DateUtil.now());
|
||||||
|
this.updateById(entity);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteByIds(List<String> ids) {
|
||||||
|
if (CollectionUtils.isEmpty(ids)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.removeByIds(ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
private BigDecimal defaultAssignQty(BigDecimal assignQty) {
|
||||||
|
return assignQty == null ? BigDecimal.ZERO : assignQty;
|
||||||
|
}
|
||||||
|
|
||||||
|
private PmReturnDto toDto(PmReturn entity) {
|
||||||
|
PmReturnDto dto = new PmReturnDto();
|
||||||
|
dto.setId(entity.getId());
|
||||||
|
dto.setOrderCode(entity.getOrder_code());
|
||||||
|
dto.setSerialNo(entity.getSerial_no());
|
||||||
|
dto.setSkuCode(entity.getSku_code());
|
||||||
|
dto.setSkuName(entity.getSku_name());
|
||||||
|
dto.setQty(entity.getQty());
|
||||||
|
dto.setAssignQty(entity.getAssign_qty());
|
||||||
|
dto.setUnit(entity.getUnit());
|
||||||
|
dto.setTargetArea(entity.getTarget_area());
|
||||||
|
dto.setContainerCode(entity.getContainer_code());
|
||||||
|
dto.setDeliveryMethod(entity.getDelivery_method());
|
||||||
|
dto.setCreator(entity.getCreator());
|
||||||
|
dto.setCreateTime(entity.getCreate_time());
|
||||||
|
dto.setSourceHouseCode(entity.getSource_house_code());
|
||||||
|
dto.setStatus(entity.getStatus());
|
||||||
|
dto.setUpdateTime(entity.getUpdate_time());
|
||||||
|
dto.setUpdateName(entity.getUpdate_name());
|
||||||
|
return dto;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
package org.nl.wms.pm_manage.preceiving.listenerHandler;
|
|
||||||
|
|
||||||
import cn.hutool.core.date.DateUtil;
|
|
||||||
import com.alibaba.fastjson.JSON;
|
|
||||||
import org.nl.wms.pm_manage.demand.service.IPmDemandService;
|
|
||||||
import org.nl.wms.pm_manage.listener.core.BaseFormListenerHandler;
|
|
||||||
import org.nl.wms.warehouse_manage.enums.IOSEnum;
|
|
||||||
import org.nl.wms.warehouse_manage.stockReturn.service.IPmStockReturnService;
|
|
||||||
import org.nl.wms.warehouse_manage.stockReturn.service.dao.PmStockReturn;
|
|
||||||
import org.nl.wms.warehouse_manage.stockReturn.service.enums.StockReturnStatusEnum;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Component;
|
|
||||||
|
|
||||||
@Component("p_receiving")
|
|
||||||
public class PReceivingListenerHandler extends BaseFormListenerHandler<PReceivingParams> {
|
|
||||||
@Autowired
|
|
||||||
IPmDemandService iPmDemandService;
|
|
||||||
@Autowired
|
|
||||||
IPmStockReturnService iPmStockReturnService;
|
|
||||||
@Override
|
|
||||||
public void onApplicationEvent(PReceivingParams params) {
|
|
||||||
final PmStockReturn stockReturn = new PmStockReturn();
|
|
||||||
stockReturn.setCreate_time(DateUtil.now());
|
|
||||||
stockReturn.setRequest_type(IOSEnum.BILL_TYPE.code("生产入库"));
|
|
||||||
stockReturn.setStatus(StockReturnStatusEnum.TODO.getCode());
|
|
||||||
stockReturn.setRequest_data(JSON.toJSONString(params));
|
|
||||||
iPmStockReturnService.save(stockReturn);
|
|
||||||
//需求单昨晚,执行调拨流程
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
package org.nl.wms.pm_manage.preceiving.listenerHandler;
|
|
||||||
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
public class PReceivingParams {
|
|
||||||
private String billCode;
|
|
||||||
private String sectCode;
|
|
||||||
private Map<String,BigDecimal> materialQty;
|
|
||||||
|
|
||||||
public PReceivingParams(String billCode, Map materialQty,String sectCode) {
|
|
||||||
this.billCode = billCode;
|
|
||||||
this.materialQty = materialQty;
|
|
||||||
this.sectCode = sectCode;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -20,10 +20,7 @@ import org.springframework.util.CollectionUtils;
|
|||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Liuxy
|
* @author Liuxy
|
||||||
@@ -101,6 +98,19 @@ public class SchBasePointController {
|
|||||||
result.add(parent);
|
result.add(parent);
|
||||||
return new ResponseEntity<>(TableDataInfo.build(result), HttpStatus.OK);
|
return new ResponseEntity<>(TableDataInfo.build(result), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
@GetMapping("/getRegionPointSet")
|
||||||
|
@Log("获取区域下拉点")
|
||||||
|
public ResponseEntity<Object> getRegionPointSet(String regionCode) {
|
||||||
|
List<SchBasePoint> points = schBasePointService.list(new LambdaQueryWrapper<SchBasePoint>()
|
||||||
|
.eq(SchBasePoint::getRegion_code, regionCode)
|
||||||
|
.eq(SchBasePoint::getIs_used, Boolean.TRUE)
|
||||||
|
.isNull(SchBasePoint::getVehicle_code));
|
||||||
|
List<Map> result = new ArrayList<>();
|
||||||
|
for (SchBasePoint point : points) {
|
||||||
|
result.add(MapOf.of("value",point.getVehicle_code(),"label",point.getVehicle_code()));
|
||||||
|
}
|
||||||
|
return new ResponseEntity<>(TableDataInfo.build(result), HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
@Log("锁定与解锁")
|
@Log("锁定与解锁")
|
||||||
@PostMapping("/changeLock")
|
@PostMapping("/changeLock")
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ public class MobileAuthorizationController {
|
|||||||
result.put("token", StpUtil.getTokenValue());
|
result.put("token", StpUtil.getTokenValue());
|
||||||
result.put("roles", permissionList);
|
result.put("roles", permissionList);
|
||||||
result.put("user", user);
|
result.put("user", user);
|
||||||
return new ResponseEntity<>(TableDataInfo.buildJson(result), HttpStatus.OK);
|
return new ResponseEntity<>(TableDataInfo.build(result), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ public class SysParamConstant {
|
|||||||
* MES URL
|
* MES URL
|
||||||
*/
|
*/
|
||||||
public final static String MES_URL = "mes_url";
|
public final static String MES_URL = "mes_url";
|
||||||
|
public final static String MES_URL_DEMAND_CALL = "MES_URL_DEMAND_CALL";
|
||||||
/**
|
/**
|
||||||
* 打印机ip
|
* 打印机ip
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ public enum IOSEnum {
|
|||||||
BILL_STATUS(MapOf.of("生成","10", "分配中", "20", "分配完", "30", "完成", "99")),
|
BILL_STATUS(MapOf.of("生成","10", "分配中", "20", "分配完", "30", "完成", "99")),
|
||||||
|
|
||||||
// 入库业务类型
|
// 入库业务类型
|
||||||
BILL_TYPE(MapOf.of("生产入库","0001", "采购入库", "0005","生产领料", "0006","库存调拨", "0007", "手工入库", "0009","销售出库","1001","生产出库","1005","调拨出库","1004", "手工出库", "1009")),
|
BILL_TYPE(MapOf.of("生产入库","0001", "采购入库", "0005","生产领料", "0006","库存调拨", "0007", "手工入库", "0009","销售出库","1001","生产出库","1005","调拨出库","1004", "手工出库", "1009","库存调拨", "2001")),
|
||||||
|
|
||||||
//入库分配明细状态
|
//入库分配明细状态
|
||||||
INBILL_DIS_STATUS(MapOf.of("未生成", "00", "生成", "01", "执行中", "02", "完成", "99")),
|
INBILL_DIS_STATUS(MapOf.of("未生成", "00", "生成", "01", "执行中", "02", "完成", "99")),
|
||||||
|
|||||||
@@ -939,8 +939,8 @@ public class OutBillServiceImpl extends ServiceImpl<IOStorInvMapper,IOStorInv> i
|
|||||||
@Transactional
|
@Transactional
|
||||||
public void allSetPoint(JSONObject whereJson) {
|
public void allSetPoint(JSONObject whereJson) {
|
||||||
//出库点
|
//出库点
|
||||||
if (StrUtil.isBlank(whereJson.getString("region_code"))){
|
if (StrUtil.isBlank(whereJson.getString("point_code"))){
|
||||||
throw new BadRequestException("未选择出库区");
|
throw new BadRequestException("未选择出库点");
|
||||||
}
|
}
|
||||||
String pointCode = whereJson.getString("point_code");
|
String pointCode = whereJson.getString("point_code");
|
||||||
//----根据区域找点,特殊业务比如找空点位在这边----
|
//----根据区域找点,特殊业务比如找空点位在这边----
|
||||||
|
|||||||
@@ -0,0 +1,108 @@
|
|||||||
|
package org.nl.wms.warehouse_manage.stockReturn.strategy.core.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.date.DateUtil;
|
||||||
|
import cn.hutool.json.JSONArray;
|
||||||
|
import cn.hutool.json.JSONObject;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import org.nl.common.exception.BadRequestException;
|
||||||
|
import org.nl.common.utils.MapOf;
|
||||||
|
import org.nl.wms.ext_manage.api.MesApi;
|
||||||
|
import org.nl.wms.pm_manage.demand.service.IPmDemandService;
|
||||||
|
import org.nl.wms.pm_manage.demand.service.dao.PmDemand;
|
||||||
|
import org.nl.wms.pm_manage.demand.service.enums.DemandStatus;
|
||||||
|
import org.nl.wms.sch_manage.service.ISchBaseRegionService;
|
||||||
|
import org.nl.wms.sch_manage.service.dao.SchBaseRegion;
|
||||||
|
import org.nl.wms.warehouse_manage.enums.IOSEnum;
|
||||||
|
import org.nl.wms.warehouse_manage.inAndOut.service.dao.IOStorInvDtl;
|
||||||
|
import org.nl.wms.warehouse_manage.inAndOut.service.dao.mapper.IOStorInvDisMapper;
|
||||||
|
import org.nl.wms.warehouse_manage.inAndOut.service.dto.IOStorInvDisDto;
|
||||||
|
import org.nl.wms.warehouse_manage.stockReturn.service.IPmStockReturnService;
|
||||||
|
import org.nl.wms.warehouse_manage.stockReturn.service.dao.PmStockReturn;
|
||||||
|
import org.nl.wms.warehouse_manage.stockReturn.service.enums.StockReturnStatusEnum;
|
||||||
|
import org.nl.wms.warehouse_manage.stockReturn.strategy.core.CallbackStrategy;
|
||||||
|
import org.nl.wms.welding_manage.service.work_order.IWorkOrderService;
|
||||||
|
import org.nl.wms.welding_manage.service.work_order.dao.WorkOrderDao;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 需求单库存调拨回传
|
||||||
|
*/
|
||||||
|
@Service(value = "DealLLDBBillPmDeamndCallBack")
|
||||||
|
public class DealLLDBBillPmDeamndCallBack implements CallbackStrategy {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IPmDemandService iPmDemandService;
|
||||||
|
@Autowired
|
||||||
|
private IPmStockReturnService iPmStockReturnService;
|
||||||
|
@Resource
|
||||||
|
private IOStorInvDisMapper ioStorInvDisMapper;
|
||||||
|
@Autowired
|
||||||
|
private ISchBaseRegionService iSchBaseRegionService;
|
||||||
|
@Autowired
|
||||||
|
private MesApi mesApi;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void buildCallback(IOStorInvDtl param) {
|
||||||
|
final String orderCode = param.getSource_bill_code();
|
||||||
|
PmDemand one = iPmDemandService.getOne(new LambdaQueryWrapper<PmDemand>().eq(PmDemand::getId, orderCode));
|
||||||
|
if (one == null){
|
||||||
|
throw new BadRequestException("需求单不存在");
|
||||||
|
}
|
||||||
|
|
||||||
|
final SchBaseRegion region = iSchBaseRegionService.getOne(new LambdaQueryWrapper<SchBaseRegion>()
|
||||||
|
.eq(SchBaseRegion::getRegion_code, one.getProduction_line())
|
||||||
|
.select(SchBaseRegion::getPoint_type_explain));
|
||||||
|
if (region==null){
|
||||||
|
throw new BadRequestException("当前产线未配置对应仓库编码getPoint_type_explain");
|
||||||
|
}
|
||||||
|
final String now = DateUtil.now();
|
||||||
|
JSONObject callbackData = new JSONObject();
|
||||||
|
callbackData.put("method", "DealLLDBBill");
|
||||||
|
callbackData.put("type", "WMS");
|
||||||
|
// 组装data节点
|
||||||
|
JSONObject data = new JSONObject();
|
||||||
|
data.put("issueStorageOrgUnitNo", "01.09.14"); // 业务状态,可根据实际业务逻辑设置
|
||||||
|
data.put("bizTypeNo", 311); // 业务日期
|
||||||
|
data.put("receiptStorageOrgUnitNo", "01.09.14"); // 创建人编号,从当前登录用户获取
|
||||||
|
data.put("billNo", param.getIostorinv_id()); // 使用工单编号作为MES单号
|
||||||
|
// 组装明细列表
|
||||||
|
JSONArray entrys = new JSONArray();
|
||||||
|
final List<IOStorInvDisDto> disSet = ioStorInvDisMapper.queryOutBillDisDtl(MapOf.of("iostorinvdtl_id", param.getIostorinvdtl_id()));
|
||||||
|
for (IOStorInvDisDto ioStorInvDisDto : disSet) {
|
||||||
|
JSONObject entry = new JSONObject();
|
||||||
|
entry.put("unitNo", "PCS"); // 序号
|
||||||
|
entry.put("qty", ioStorInvDisDto.getPlan_qty()); // 数量
|
||||||
|
entry.put("materialNo", ioStorInvDisDto.getMaterial_code()); // 来源单据标识
|
||||||
|
entry.put("issueWarehouseNo", region.getPoint_type_explain());
|
||||||
|
entry.put("receiptWarehouseNo", ioStorInvDisDto.getSect_code());
|
||||||
|
entrys.add(entry);
|
||||||
|
}
|
||||||
|
data.put("entrys", entrys);
|
||||||
|
callbackData.put("data", data);
|
||||||
|
PmStockReturn stockReturn = new PmStockReturn();
|
||||||
|
stockReturn.setRequest_Id(one.getId());
|
||||||
|
stockReturn.setRequest_type(IOSEnum.BILL_TYPE.code("库存调拨"));
|
||||||
|
stockReturn.setStatus(StockReturnStatusEnum.TODO.getCode()); // 0-处理中
|
||||||
|
stockReturn.setCreate_time(now);
|
||||||
|
stockReturn.setRequest_data(callbackData.toString());
|
||||||
|
|
||||||
|
//回传MES
|
||||||
|
mesApi.pmDemandCallback(Arrays.asList(new MesApi.PmDemandCall(
|
||||||
|
param.getIostorinv_id(),one.getId()
|
||||||
|
,now,one.getTarget_area()
|
||||||
|
,1
|
||||||
|
,disSet.get(0).getStoragevehicle_code(),
|
||||||
|
param.getAssign_qty().toString())));
|
||||||
|
|
||||||
|
iPmStockReturnService.save(stockReturn);
|
||||||
|
one.setAssign_qty(param.getAssign_qty());
|
||||||
|
one.setStatus(DemandStatus.FINISH.getValue());
|
||||||
|
this.iPmDemandService.updateById(one);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -58,3 +58,25 @@ ADD COLUMN `source_load_port` varchar(255) NULL COMMENT '来源单指定上料
|
|||||||
|
|
||||||
ALTER TABLE `st_ivt_iostorinvdtl`
|
ALTER TABLE `st_ivt_iostorinvdtl`
|
||||||
ADD COLUMN `callback_strategy` varchar(64) NULL COMMENT '单据回传策略配置类名' AFTER `source_load_port`;
|
ADD COLUMN `callback_strategy` varchar(64) NULL COMMENT '单据回传策略配置类名' AFTER `source_load_port`;
|
||||||
|
|
||||||
|
|
||||||
|
CREATE TABLE `pm_return` (
|
||||||
|
`id` VARCHAR(64) NOT NULL COMMENT '唯一ID(必填)',
|
||||||
|
`order_code` VARCHAR(64) DEFAULT NULL COMMENT '退料单号',
|
||||||
|
`serial_no` VARCHAR(50) NOT NULL COMMENT '序号(必填)',
|
||||||
|
`sku_code` VARCHAR(50) NOT NULL COMMENT '物料编码(必填)',
|
||||||
|
`sku_name` VARCHAR(200) NOT NULL COMMENT '物料名称(必填)',
|
||||||
|
`qty` DECIMAL(9, 3) NOT NULL DEFAULT 0.000000 COMMENT '数量(必填)',
|
||||||
|
`assign_qty` DECIMAL(9, 3) DEFAULT 0.000000 COMMENT '已分配数量',
|
||||||
|
`unit` VARCHAR(20) NOT NULL COMMENT '单位(必填)',
|
||||||
|
`target_area` VARCHAR(50) NOT NULL COMMENT '线边库位(必填)',
|
||||||
|
`container_code` VARCHAR(50) NOT NULL COMMENT '容器编号(必填)',
|
||||||
|
`delivery_method` TINYINT(4) NOT NULL DEFAULT 1 COMMENT '配送方式(必填)1:人工;2:AGV',
|
||||||
|
`creator` VARCHAR(50) NOT NULL COMMENT '操作人工号(必填)',
|
||||||
|
`create_time` DATETIME NOT NULL COMMENT '操作时间(必填)格式:yyyy-MM-dd HH:mm:ss',
|
||||||
|
`source_house_code` VARCHAR(50) NOT NULL COMMENT '来源仓别(必填)',
|
||||||
|
`status` TINYINT(4) NOT NULL DEFAULT 0 COMMENT '状态(必填)0:生成;1:失效,20执行80完成',
|
||||||
|
`update_time` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '系统更新时间',
|
||||||
|
`update_name` VARCHAR(50) DEFAULT NULL COMMENT '系统更新人',
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='生产退料单表';
|
||||||
|
|||||||
266
nladmin-ui/src/views/wms/pm_manage/pmReturn/index.vue
Normal file
266
nladmin-ui/src/views/wms/pm_manage/pmReturn/index.vue
Normal file
@@ -0,0 +1,266 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<div class="head-container">
|
||||||
|
<div v-if="crud.props.searchToggle">
|
||||||
|
<el-form :inline="true" class="demo-form-inline" label-position="right" label-width="90px" label-suffix=":">
|
||||||
|
<el-form-item label="模糊查询">
|
||||||
|
<el-input v-model="query.blurry" size="mini" clearable placeholder="退料单号/物料编码/物料名称/容器编号" @keyup.enter.native="crud.toQuery" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="退料单号">
|
||||||
|
<el-input v-model="query.orderCode" size="mini" clearable placeholder="退料单号" @keyup.enter.native="crud.toQuery" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="物料编码">
|
||||||
|
<el-input v-model="query.skuCode" size="mini" clearable placeholder="物料编码" @keyup.enter.native="crud.toQuery" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="物料名称">
|
||||||
|
<el-input v-model="query.skuName" size="mini" clearable placeholder="物料名称" @keyup.enter.native="crud.toQuery" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="线边库位">
|
||||||
|
<el-input v-model="query.targetArea" size="mini" clearable placeholder="线边库位" @keyup.enter.native="crud.toQuery" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="来源仓别">
|
||||||
|
<el-input v-model="query.sourceHouseCode" size="mini" clearable placeholder="来源仓别" @keyup.enter.native="crud.toQuery" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="状态">
|
||||||
|
<el-select v-model="query.status" clearable size="mini" placeholder="全部" class="filter-item" @change="crud.toQuery">
|
||||||
|
<el-option v-for="item in statusOptions" :key="item.value" :label="item.label" :value="item.value" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="操作时间">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="query.dateRange"
|
||||||
|
type="daterange"
|
||||||
|
value-format="yyyy-MM-dd HH:mm:ss"
|
||||||
|
range-separator="至"
|
||||||
|
start-placeholder="开始日期"
|
||||||
|
end-placeholder="结束日期"
|
||||||
|
:default-time="['00:00:00', '23:59:59']"
|
||||||
|
@change="crud.toQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<rrOperation />
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
<crudOperation :permission="permission">
|
||||||
|
<el-button slot="right" class="filter-item" type="primary" icon="el-icon-printer" size="mini" :disabled="actionDisabled" @click="printBill">打印</el-button>
|
||||||
|
</crudOperation>
|
||||||
|
<el-table ref="table" v-loading="crud.loading" :data="crud.data" size="mini" highlight-current-row style="width: 100%;" @selection-change="handleSelectionChange" @current-change="handleCurrentChange">
|
||||||
|
<el-table-column type="selection" width="55" />
|
||||||
|
<el-table-column v-permission="['admin','pmReturn:del','pmReturn:edit']" label="操作" width="115" align="center" fixed="right">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<udOperation :data="scope.row" :permission="permission" :disabled-edit="canUd(scope.row)" :disabled-dle="canUd(scope.row)" />
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column show-overflow-tooltip prop="orderCode" width="160" label="退料单号">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-link type="warning" @click="toView(scope.row)">{{ scope.row.orderCode }}</el-link>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column show-overflow-tooltip prop="serialNo" width="90" label="序号" />
|
||||||
|
<el-table-column show-overflow-tooltip prop="skuCode" width="140" label="物料编码" />
|
||||||
|
<el-table-column show-overflow-tooltip prop="skuName" min-width="180" label="物料名称" />
|
||||||
|
<el-table-column prop="qty" width="100" label="数量" align="right" />
|
||||||
|
<el-table-column prop="assignQty" width="100" label="已分配数量" align="right" />
|
||||||
|
<el-table-column show-overflow-tooltip prop="unit" width="80" label="单位" />
|
||||||
|
<el-table-column show-overflow-tooltip prop="targetArea" width="120" label="线边库位" />
|
||||||
|
<el-table-column show-overflow-tooltip prop="containerCode" width="120" label="容器编号" />
|
||||||
|
<el-table-column prop="deliveryMethod" width="100" label="配送方式" :formatter="deliveryMethodFormat" />
|
||||||
|
<el-table-column show-overflow-tooltip prop="creator" width="100" label="操作人工号" />
|
||||||
|
<el-table-column show-overflow-tooltip prop="createTime" width="160" label="操作时间" />
|
||||||
|
<el-table-column show-overflow-tooltip prop="sourceHouseCode" width="120" label="来源仓别" />
|
||||||
|
<el-table-column prop="status" width="100" label="状态" :formatter="statusFormat" />
|
||||||
|
<el-table-column show-overflow-tooltip prop="updateName" width="100" label="更新人" />
|
||||||
|
<el-table-column show-overflow-tooltip prop="updateTime" width="160" label="更新时间" />
|
||||||
|
</el-table>
|
||||||
|
<pagination />
|
||||||
|
</div>
|
||||||
|
<el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" :title="crud.status.title" width="980px">
|
||||||
|
<el-form ref="form" :model="form" :rules="rules" size="mini" label-width="110px" label-suffix=":" style="border: 1px solid #cfe0df;margin-top: 10px;padding: 10px;">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12"><el-form-item label="唯一ID" prop="id"><el-input v-model.trim="form.id" :disabled="crud.status.edit > 0" style="width: 300px;" /></el-form-item></el-col>
|
||||||
|
<el-col :span="12"><el-form-item label="退料单号" prop="orderCode"><el-input v-model.trim="form.orderCode" style="width: 300px;" /></el-form-item></el-col>
|
||||||
|
<el-col :span="12"><el-form-item label="序号" prop="serialNo"><el-input v-model.trim="form.serialNo" style="width: 300px;" /></el-form-item></el-col>
|
||||||
|
<el-col :span="12"><el-form-item label="物料编码" prop="skuCode"><el-input v-model.trim="form.skuCode" style="width: 300px;" /></el-form-item></el-col>
|
||||||
|
<el-col :span="12"><el-form-item label="物料名称" prop="skuName"><el-input v-model.trim="form.skuName" style="width: 300px;" /></el-form-item></el-col>
|
||||||
|
<el-col :span="12"><el-form-item label="数量" prop="qty"><el-input-number v-model="form.qty" :min="0" :precision="3" :step="1" style="width: 300px;" /></el-form-item></el-col>
|
||||||
|
<el-col :span="12"><el-form-item label="已分配数量" prop="assignQty"><el-input-number v-model="form.assignQty" :min="0" :precision="3" :step="1" style="width: 300px;" /></el-form-item></el-col>
|
||||||
|
<el-col :span="12"><el-form-item label="单位" prop="unit"><el-input v-model.trim="form.unit" style="width: 300px;" /></el-form-item></el-col>
|
||||||
|
<el-col :span="12"><el-form-item label="线边库位" prop="targetArea"><el-input v-model.trim="form.targetArea" style="width: 300px;" /></el-form-item></el-col>
|
||||||
|
<el-col :span="12"><el-form-item label="容器编号" prop="containerCode"><el-input v-model.trim="form.containerCode" style="width: 300px;" /></el-form-item></el-col>
|
||||||
|
<el-col :span="12"><el-form-item label="配送方式" prop="deliveryMethod"><el-select v-model="form.deliveryMethod" style="width: 300px;" placeholder="请选择配送方式"><el-option v-for="item in deliveryMethodOptions" :key="item.value" :label="item.label" :value="item.value" /></el-select></el-form-item></el-col>
|
||||||
|
<el-col :span="12"><el-form-item label="操作人工号" prop="creator"><el-input v-model.trim="form.creator" style="width: 300px;" /></el-form-item></el-col>
|
||||||
|
<el-col :span="12"><el-form-item label="操作时间" prop="createTime"><el-date-picker v-model="form.createTime" type="datetime" value-format="yyyy-MM-dd HH:mm:ss" placeholder="请选择操作时间" style="width: 300px;" /></el-form-item></el-col>
|
||||||
|
<el-col :span="12"><el-form-item label="来源仓别" prop="sourceHouseCode"><el-input v-model.trim="form.sourceHouseCode" style="width: 300px;" /></el-form-item></el-col>
|
||||||
|
<el-col :span="12"><el-form-item label="状态" prop="status"><el-select v-model="form.status" style="width: 300px;" placeholder="请选择状态"><el-option v-for="item in statusOptions" :key="item.value" :label="item.label" :value="item.value" /></el-select></el-form-item></el-col>
|
||||||
|
<el-col :span="12"><el-form-item label="更新人" prop="updateName"><el-input v-model.trim="form.updateName" style="width: 300px;" /></el-form-item></el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer"><el-button type="text" @click="crud.cancelCU">取消</el-button><el-button :loading="crud.cu === 2" type="primary" @click="crud.submitCU">确认</el-button></div>
|
||||||
|
</el-dialog>
|
||||||
|
<el-dialog :visible.sync="viewShow" title="生产退料单详情" width="980px" :close-on-click-modal="false">
|
||||||
|
<el-form size="mini" label-width="110px" label-suffix=":" style="border: 1px solid #cfe0df;margin-top: 10px;padding: 10px;">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12"><el-form-item label="唯一ID"><el-input :value="currentRow.id" disabled style="width: 300px;" /></el-form-item></el-col>
|
||||||
|
<el-col :span="12"><el-form-item label="退料单号"><el-input :value="currentRow.orderCode" disabled style="width: 300px;" /></el-form-item></el-col>
|
||||||
|
<el-col :span="12"><el-form-item label="序号"><el-input :value="currentRow.serialNo" disabled style="width: 300px;" /></el-form-item></el-col>
|
||||||
|
<el-col :span="12"><el-form-item label="物料编码"><el-input :value="currentRow.skuCode" disabled style="width: 300px;" /></el-form-item></el-col>
|
||||||
|
<el-col :span="12"><el-form-item label="物料名称"><el-input :value="currentRow.skuName" disabled style="width: 300px;" /></el-form-item></el-col>
|
||||||
|
<el-col :span="12"><el-form-item label="数量"><el-input :value="currentRow.qty" disabled style="width: 300px;" /></el-form-item></el-col>
|
||||||
|
<el-col :span="12"><el-form-item label="已分配数量"><el-input :value="currentRow.assignQty" disabled style="width: 300px;" /></el-form-item></el-col>
|
||||||
|
<el-col :span="12"><el-form-item label="单位"><el-input :value="currentRow.unit" disabled style="width: 300px;" /></el-form-item></el-col>
|
||||||
|
<el-col :span="12"><el-form-item label="线边库位"><el-input :value="currentRow.targetArea" disabled style="width: 300px;" /></el-form-item></el-col>
|
||||||
|
<el-col :span="12"><el-form-item label="容器编号"><el-input :value="currentRow.containerCode" disabled style="width: 300px;" /></el-form-item></el-col>
|
||||||
|
<el-col :span="12"><el-form-item label="配送方式"><el-input :value="deliveryMethodLabel(currentRow.deliveryMethod)" disabled style="width: 300px;" /></el-form-item></el-col>
|
||||||
|
<el-col :span="12"><el-form-item label="操作人工号"><el-input :value="currentRow.creator" disabled style="width: 300px;" /></el-form-item></el-col>
|
||||||
|
<el-col :span="12"><el-form-item label="操作时间"><el-input :value="currentRow.createTime" disabled style="width: 300px;" /></el-form-item></el-col>
|
||||||
|
<el-col :span="12"><el-form-item label="来源仓别"><el-input :value="currentRow.sourceHouseCode" disabled style="width: 300px;" /></el-form-item></el-col>
|
||||||
|
<el-col :span="12"><el-form-item label="状态"><el-input :value="statusLabel(currentRow.status)" disabled style="width: 300px;" /></el-form-item></el-col>
|
||||||
|
<el-col :span="12"><el-form-item label="更新人"><el-input :value="currentRow.updateName" disabled style="width: 300px;" /></el-form-item></el-col>
|
||||||
|
<el-col :span="12"><el-form-item label="更新时间"><el-input :value="currentRow.updateTime" disabled style="width: 300px;" /></el-form-item></el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer"><el-button type="primary" @click="viewShow = false">关闭</el-button></div>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import crudPmReturn from './pmReturn'
|
||||||
|
import CRUD, { crud, form, header, presenter } from '@crud/crud'
|
||||||
|
import rrOperation from '@crud/RR.operation.vue'
|
||||||
|
import crudOperation from '@crud/CRUD.operation.vue'
|
||||||
|
import udOperation from '@crud/UD.operation.vue'
|
||||||
|
import pagination from '@crud/Pagination.vue'
|
||||||
|
|
||||||
|
const createDefaultForm = () => ({
|
||||||
|
id: '',
|
||||||
|
orderCode: '',
|
||||||
|
serialNo: '',
|
||||||
|
skuCode: '',
|
||||||
|
skuName: '',
|
||||||
|
qty: undefined,
|
||||||
|
assignQty: 0,
|
||||||
|
unit: '',
|
||||||
|
targetArea: '',
|
||||||
|
containerCode: '',
|
||||||
|
deliveryMethod: 1,
|
||||||
|
creator: '',
|
||||||
|
createTime: '',
|
||||||
|
sourceHouseCode: '',
|
||||||
|
status: 0,
|
||||||
|
updateTime: '',
|
||||||
|
updateName: ''
|
||||||
|
})
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'PmReturn',
|
||||||
|
components: { crudOperation, rrOperation, udOperation, pagination },
|
||||||
|
mixins: [presenter(), header(), form(createDefaultForm()), crud()],
|
||||||
|
cruds() {
|
||||||
|
return CRUD({
|
||||||
|
title: '生产退料单',
|
||||||
|
url: 'api/pmReturn',
|
||||||
|
idField: 'id',
|
||||||
|
sort: 'create_time,desc',
|
||||||
|
crudMethod: { ...crudPmReturn },
|
||||||
|
optShow: { add: true, reset: true }
|
||||||
|
})
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
viewShow: false,
|
||||||
|
currentRow: {},
|
||||||
|
actionDisabled: true,
|
||||||
|
permission: {
|
||||||
|
add: ['admin', 'pmReturn:add'],
|
||||||
|
edit: ['admin', 'pmReturn:edit'],
|
||||||
|
del: ['admin', 'pmReturn:del']
|
||||||
|
},
|
||||||
|
statusOptions: [
|
||||||
|
{ value: 0, label: '生成' },
|
||||||
|
{ value: 1, label: '失效' },
|
||||||
|
{ value: 20, label: '执行' },
|
||||||
|
{ value: 80, label: '完成' }
|
||||||
|
],
|
||||||
|
deliveryMethodOptions: [
|
||||||
|
{ value: 1, label: '人工' },
|
||||||
|
{ value: 2, label: 'AGV' }
|
||||||
|
],
|
||||||
|
rules: {
|
||||||
|
id: [{ required: true, message: '请输入唯一ID', trigger: 'blur' }],
|
||||||
|
orderCode: [{ required: true, message: '请输入退料单号', trigger: 'blur' }],
|
||||||
|
serialNo: [{ required: true, message: '请输入序号', trigger: 'blur' }],
|
||||||
|
skuCode: [{ required: true, message: '请输入物料编码', trigger: 'blur' }],
|
||||||
|
skuName: [{ required: true, message: '请输入物料名称', trigger: 'blur' }],
|
||||||
|
qty: [{ required: true, message: '请输入数量', trigger: 'change' }],
|
||||||
|
unit: [{ required: true, message: '请输入单位', trigger: 'blur' }],
|
||||||
|
targetArea: [{ required: true, message: '请输入线边库位', trigger: 'blur' }],
|
||||||
|
containerCode: [{ required: true, message: '请输入容器编号', trigger: 'blur' }],
|
||||||
|
deliveryMethod: [{ required: true, message: '请选择配送方式', trigger: 'change' }],
|
||||||
|
creator: [{ required: true, message: '请输入操作人工号', trigger: 'blur' }],
|
||||||
|
createTime: [{ required: true, message: '请选择操作时间', trigger: 'change' }],
|
||||||
|
sourceHouseCode: [{ required: true, message: '请输入来源仓别', trigger: 'blur' }],
|
||||||
|
status: [{ required: true, message: '请选择状态', trigger: 'change' }]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
[CRUD.HOOK.beforeRefresh]() {
|
||||||
|
if (this.query.dateRange) {
|
||||||
|
this.query.startTime = this.query.dateRange[0]
|
||||||
|
this.query.endTime = this.query.dateRange.length > 1 ? this.query.dateRange[1] : this.query.dateRange[0]
|
||||||
|
} else {
|
||||||
|
this.query.startTime = ''
|
||||||
|
this.query.endTime = ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
canUd(row) {
|
||||||
|
return Number(row.status) !== 0
|
||||||
|
},
|
||||||
|
statusLabel(status) {
|
||||||
|
const target = this.statusOptions.find(item => Number(item.value) === Number(status))
|
||||||
|
return target ? target.label : status
|
||||||
|
},
|
||||||
|
statusFormat(row) {
|
||||||
|
return this.statusLabel(row.status)
|
||||||
|
},
|
||||||
|
deliveryMethodLabel(deliveryMethod) {
|
||||||
|
const target = this.deliveryMethodOptions.find(item => Number(item.value) === Number(deliveryMethod))
|
||||||
|
return target ? target.label : deliveryMethod
|
||||||
|
},
|
||||||
|
deliveryMethodFormat(row) {
|
||||||
|
return this.deliveryMethodLabel(row.deliveryMethod)
|
||||||
|
},
|
||||||
|
handleSelectionChange(selection) {
|
||||||
|
this.crud.selectionChangeHandler(selection)
|
||||||
|
this.actionDisabled = !selection || selection.length === 0
|
||||||
|
},
|
||||||
|
handleCurrentChange(currentRow) {
|
||||||
|
this.currentRow = currentRow || {}
|
||||||
|
this.actionDisabled = this.crud.selections.length === 0
|
||||||
|
},
|
||||||
|
toView(row) {
|
||||||
|
this.currentRow = { ...row }
|
||||||
|
this.viewShow = true
|
||||||
|
},
|
||||||
|
printBill() {
|
||||||
|
const selections = this.crud.selections
|
||||||
|
if (!selections || selections.length === 0) {
|
||||||
|
this.crud.notify('请至少选择一条单据', CRUD.NOTIFICATION_TYPE.INFO)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
const billIds = selections.map(item => item.orderCode || item.id).join('、')
|
||||||
|
this.$confirm('确认打印以下生产退料单?\n' + billIds, '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
this.crud.notify('当前项目暂未接入打印接口', CRUD.NOTIFICATION_TYPE.INFO)
|
||||||
|
}).catch(() => {})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
</style>
|
||||||
34
nladmin-ui/src/views/wms/pm_manage/pmReturn/pmReturn.js
Normal file
34
nladmin-ui/src/views/wms/pm_manage/pmReturn/pmReturn.js
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
export function add(data) {
|
||||||
|
return request({
|
||||||
|
url: 'api/pmReturn',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function del(ids) {
|
||||||
|
return request({
|
||||||
|
url: 'api/pmReturn',
|
||||||
|
method: 'delete',
|
||||||
|
data: ids
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function edit(data) {
|
||||||
|
return request({
|
||||||
|
url: 'api/pmReturn',
|
||||||
|
method: 'put',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function get(id) {
|
||||||
|
return request({
|
||||||
|
url: 'api/pmReturn/' + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export default { add, edit, del, get }
|
||||||
@@ -49,7 +49,7 @@ export function changeLock(data) {
|
|||||||
}
|
}
|
||||||
export function getRegionPoints(param) {
|
export function getRegionPoints(param) {
|
||||||
return request({
|
return request({
|
||||||
url: 'api/schBasePoint/getRegionPoints',
|
url: 'api/schBasePoint/getRegionPointSet',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: param
|
params: param
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -367,8 +367,8 @@ export default {
|
|||||||
},
|
},
|
||||||
outBoundChange(val) {
|
outBoundChange(val) {
|
||||||
if (val.length === 1) {
|
if (val.length === 1) {
|
||||||
this.form2.region_code = val[0]
|
this.form2.region_code = ''
|
||||||
this.form2.point_code = ''
|
this.form2.point_code = val[0]
|
||||||
}
|
}
|
||||||
if (val.length === 0) {
|
if (val.length === 0) {
|
||||||
this.form2.region_code = ''
|
this.form2.region_code = ''
|
||||||
@@ -396,6 +396,11 @@ export default {
|
|||||||
this.currentRow = current
|
this.currentRow = current
|
||||||
this.form2.unassign_qty = current.unassign_qty
|
this.form2.unassign_qty = current.unassign_qty
|
||||||
this.form2.assign_qty = current.assign_qty
|
this.form2.assign_qty = current.assign_qty
|
||||||
|
if (current.source_load_port !== null) {
|
||||||
|
this.outBoundRegion = [
|
||||||
|
{ label: current.source_load_port, value: current.source_load_port }
|
||||||
|
];
|
||||||
|
}
|
||||||
this.tabledis = []
|
this.tabledis = []
|
||||||
if (current.bill_status === '10') {
|
if (current.bill_status === '10') {
|
||||||
this.button1 = false
|
this.button1 = false
|
||||||
@@ -499,6 +504,7 @@ export default {
|
|||||||
queryTableDdis(iostorinvdtl_id) {
|
queryTableDdis(iostorinvdtl_id) {
|
||||||
checkoutbill.getOutBillDis({ 'iostorinvdtl_id': iostorinvdtl_id, 'bill_status': '01' }).then(res => {
|
checkoutbill.getOutBillDis({ 'iostorinvdtl_id': iostorinvdtl_id, 'bill_status': '01' }).then(res => {
|
||||||
this.tabledis = res
|
this.tabledis = res
|
||||||
|
this.outBoundRegion
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.tabledis = []
|
this.tabledis = []
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user