Compare commits
3 Commits
3d8352cb63
...
5f0f7f616f
| Author | SHA1 | Date |
|---|---|---|
|
|
5f0f7f616f | |
|
|
6c1cdb8d0e | |
|
|
3fccb47858 |
|
|
@ -2,19 +2,23 @@ package com.nflg.wms.admin.controller;
|
|||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.convert.Convert;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.nflg.wms.common.constant.BarCodeProcessStage;
|
||||
import com.nflg.wms.common.pojo.ApiResult;
|
||||
import com.nflg.wms.common.pojo.PageData;
|
||||
import com.nflg.wms.common.pojo.dto.InventoryInDTO;
|
||||
import com.nflg.wms.common.pojo.dto.InventoryOutDTO;
|
||||
import com.nflg.wms.common.pojo.qo.*;
|
||||
import com.nflg.wms.common.pojo.qo.LocationTransferItemQO;
|
||||
import com.nflg.wms.common.pojo.qo.LocationTransferQO;
|
||||
import com.nflg.wms.common.pojo.qo.PackingPDASearchQO;
|
||||
import com.nflg.wms.common.pojo.qo.TransferOrderSearchQO;
|
||||
import com.nflg.wms.common.pojo.vo.QrCodeVO;
|
||||
import com.nflg.wms.common.pojo.vo.TransferOrderVO;
|
||||
import com.nflg.wms.common.util.UserUtil;
|
||||
import com.nflg.wms.common.util.VUtil;
|
||||
import com.nflg.wms.repository.entity.*;
|
||||
import com.nflg.wms.repository.entity.WmsBin;
|
||||
import com.nflg.wms.repository.entity.WmsQrCodeMaster;
|
||||
import com.nflg.wms.repository.entity.WmsTransferOrders;
|
||||
import com.nflg.wms.repository.service.*;
|
||||
import com.nflg.wms.starter.BaseController;
|
||||
import com.nflg.wms.starter.annotation.ApiMark;
|
||||
|
|
@ -77,6 +81,7 @@ public class LocationTransferController extends BaseController {
|
|||
.size() != request.getItems().size();
|
||||
VUtil.trueThrowBusinessError(hasDuplicates).throwMessage("存在重复或是无效的二维码");
|
||||
|
||||
List<WmsTransferOrders> transferOrders = new ArrayList<>();
|
||||
List<WmsQrCodeMaster> allQcMasters = new ArrayList<>();
|
||||
//查找箱码,并将箱码下的物料进行标记
|
||||
List<String> barcodes = request.getItems().stream()
|
||||
|
|
@ -97,6 +102,25 @@ public class LocationTransferController extends BaseController {
|
|||
if (CollectionUtil.isNotEmpty(smallQrCodeMasters)) {
|
||||
allQcMasters.addAll(smallQrCodeMasters);
|
||||
}
|
||||
parentQrCodeMasters.forEach(p->{
|
||||
transferOrders.add(
|
||||
new WmsTransferOrders()
|
||||
.setBarcodeCode(p.getBarcodeCode())
|
||||
.setTransferNum(p.getQuantity())
|
||||
.setFromBinLocation(p.getBinLocation())
|
||||
.setStorageLocation(p.getStorageLocation())
|
||||
.setMaterialCode(p.getMaterialCode())
|
||||
.setMaterialDescription(p.getMaterialDescription())
|
||||
.setUnit(p.getUnit())
|
||||
.setBatchNo(p.getBatchNo())
|
||||
.setSerialNo(p.getSerialNo())
|
||||
.setFactoryCode(p.getFactoryCode())
|
||||
.setToBinLocation(request.getBinLocation())
|
||||
.setCreateUserId(UserUtil.getUserId())
|
||||
.setCreateUserName(UserUtil.getUserName())
|
||||
.setCreateTime(LocalDateTime.now())
|
||||
);
|
||||
});
|
||||
}
|
||||
}
|
||||
// 处理物料二维码
|
||||
|
|
@ -110,6 +134,25 @@ public class LocationTransferController extends BaseController {
|
|||
if (CollectionUtil.isNotEmpty(materialQrCodeMasters)) {
|
||||
//添加物料码
|
||||
allQcMasters.addAll(materialQrCodeMasters);
|
||||
materialQrCodeMasters.forEach(p->{
|
||||
transferOrders.add(
|
||||
new WmsTransferOrders()
|
||||
.setBarcodeCode(p.getBarcodeCode())
|
||||
.setTransferNum(p.getQuantity())
|
||||
.setFromBinLocation(p.getBinLocation())
|
||||
.setStorageLocation(p.getStorageLocation())
|
||||
.setMaterialCode(p.getMaterialCode())
|
||||
.setMaterialDescription(p.getMaterialDescription())
|
||||
.setUnit(p.getUnit())
|
||||
.setBatchNo(p.getBatchNo())
|
||||
.setSerialNo(p.getSerialNo())
|
||||
.setFactoryCode(p.getFactoryCode())
|
||||
.setToBinLocation(request.getBinLocation())
|
||||
.setCreateUserId(UserUtil.getUserId())
|
||||
.setCreateUserName(UserUtil.getUserName())
|
||||
.setCreateTime(LocalDateTime.now())
|
||||
);
|
||||
});
|
||||
}
|
||||
}
|
||||
Integer count11 = allQcMasters.stream().filter(
|
||||
|
|
@ -156,7 +199,6 @@ public class LocationTransferController extends BaseController {
|
|||
// .size() != request.getItems().size();
|
||||
// VUtil.trueThrowBusinessError(!hasDuplicates1).throwMessage("存在同时扫箱码和箱中物料码的情况");
|
||||
|
||||
List<WmsTransferOrders> transferOrders = new ArrayList<>();
|
||||
List<InventoryOutDTO> outBoundInventory = new ArrayList<>();
|
||||
List<InventoryInDTO> inBoundInventory = new ArrayList<>();
|
||||
for (WmsQrCodeMaster smallQrCodeMaster : allQcMasters) {
|
||||
|
|
@ -166,23 +208,23 @@ public class LocationTransferController extends BaseController {
|
|||
smallQrCodeMaster.setLastScanByname(UserUtil.getUserName());
|
||||
// 只有当储位发生变化的时候才会触发这个出库和入库的逻辑
|
||||
if (!smallQrCodeMaster.getPackagingType().equals((short) 0)) {
|
||||
WmsTransferOrders transferOrder = new WmsTransferOrders();
|
||||
transferOrder.setId(IdUtil.getSnowflakeNextId())
|
||||
.setBarcodeCode(smallQrCodeMaster.getBarcodeCode())
|
||||
.setTransferNum(smallQrCodeMaster.getQuantity())
|
||||
.setFromBinLocation(smallQrCodeMaster.getBinLocation())
|
||||
.setStorageLocation(smallQrCodeMaster.getStorageLocation())
|
||||
.setMaterialCode(smallQrCodeMaster.getMaterialCode())
|
||||
.setMaterialDescription(smallQrCodeMaster.getMaterialDescription())
|
||||
.setUnit(smallQrCodeMaster.getUnit())
|
||||
.setBatchNo(smallQrCodeMaster.getBatchNo())
|
||||
.setSerialNo(smallQrCodeMaster.getSerialNo())
|
||||
.setFactoryCode(smallQrCodeMaster.getFactoryCode())
|
||||
.setToBinLocation(request.getBinLocation())
|
||||
.setCreateUserId(UserUtil.getUserId())
|
||||
.setCreateUserName(UserUtil.getUserName())
|
||||
.setCreateTime(LocalDateTime.now());
|
||||
transferOrders.add(transferOrder);
|
||||
// WmsTransferOrders transferOrder = new WmsTransferOrders();
|
||||
// transferOrder.setId(IdUtil.getSnowflakeNextId())
|
||||
// .setBarcodeCode(smallQrCodeMaster.getBarcodeCode())
|
||||
// .setTransferNum(smallQrCodeMaster.getQuantity())
|
||||
// .setFromBinLocation(smallQrCodeMaster.getBinLocation())
|
||||
// .setStorageLocation(smallQrCodeMaster.getStorageLocation())
|
||||
// .setMaterialCode(smallQrCodeMaster.getMaterialCode())
|
||||
// .setMaterialDescription(smallQrCodeMaster.getMaterialDescription())
|
||||
// .setUnit(smallQrCodeMaster.getUnit())
|
||||
// .setBatchNo(smallQrCodeMaster.getBatchNo())
|
||||
// .setSerialNo(smallQrCodeMaster.getSerialNo())
|
||||
// .setFactoryCode(smallQrCodeMaster.getFactoryCode())
|
||||
// .setToBinLocation(request.getBinLocation())
|
||||
// .setCreateUserId(UserUtil.getUserId())
|
||||
// .setCreateUserName(UserUtil.getUserName())
|
||||
// .setCreateTime(LocalDateTime.now());
|
||||
// transferOrders.add(transferOrder);
|
||||
|
||||
InventoryOutDTO outItem = new InventoryOutDTO();
|
||||
outItem.setMaterialNo(smallQrCodeMaster.getMaterialCode())
|
||||
|
|
|
|||
|
|
@ -36,7 +36,6 @@ import jakarta.validation.constraints.NotNull;
|
|||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import software.amazon.awssdk.services.s3.endpoints.internal.Value;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
|
@ -202,8 +201,8 @@ public class PurchaseReturnController extends BaseController {
|
|||
User user = userService.getById(UserUtil.getUserId());
|
||||
VUtil.trueThrowBusinessError(StrUtil.equals(user.getPurchasingGroup(), returnRequest.getPurchaseGroup()))
|
||||
.throwMessage("无权限审核此单");
|
||||
// VUtil.trueThrowBusinessError(returnRequest.getApprovalStatus() == 1)
|
||||
// .throwMessage("此单已审核通过,不可以再此审核");
|
||||
VUtil.trueThrowBusinessError(returnRequest.getApprovalStatus() == 1)
|
||||
.throwMessage("此单已审核通过,不可以再此审核");
|
||||
|
||||
if (request.getApprovalStatus().equals(2)) {
|
||||
VUtil.trueThrowBusinessError(returnRequest.getApprovalStatus() == 2)
|
||||
|
|
@ -230,6 +229,7 @@ public class PurchaseReturnController extends BaseController {
|
|||
itemDTO25.setLgort(item.getStorageLocation());
|
||||
itemDTO25.setMatnr(item.getMaterialCode());
|
||||
itemDTO25.setEbelp_old(Integer.parseInt(item.getPoLineNumber()));
|
||||
// itemDTO25.setEbelp_old("0080");
|
||||
//itemDTO25.setEbelpNew(item.getDeliveryLineNo());
|
||||
itemDTOList25.add(itemDTO25);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -53,6 +53,7 @@ import org.springframework.transaction.annotation.Transactional;
|
|||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.ttzero.excel.entity.ListMapSheet;
|
||||
import org.ttzero.excel.entity.ListSheet;
|
||||
import org.ttzero.excel.entity.Workbook;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
|
|
@ -132,6 +133,7 @@ public class StructuralPackageOrderController extends BaseController {
|
|||
|
||||
/**
|
||||
* 搜索SAP订单
|
||||
*
|
||||
* @param request 请求参数
|
||||
*/
|
||||
@PostMapping("searchSAPOrder")
|
||||
|
|
@ -349,6 +351,7 @@ public class StructuralPackageOrderController extends BaseController {
|
|||
|
||||
/**
|
||||
* 搜索
|
||||
*
|
||||
* @param request 请求参数
|
||||
*/
|
||||
@PostMapping("search")
|
||||
|
|
@ -358,6 +361,7 @@ public class StructuralPackageOrderController extends BaseController {
|
|||
|
||||
/**
|
||||
* 根据单据号获取列表
|
||||
*
|
||||
* @param orderNo 单据号
|
||||
*/
|
||||
@GetMapping("getList")
|
||||
|
|
@ -367,6 +371,7 @@ public class StructuralPackageOrderController extends BaseController {
|
|||
|
||||
/**
|
||||
* 获取订单托盘详情
|
||||
*
|
||||
* @param id 订单id
|
||||
*/
|
||||
@GetMapping("getTrayInfo")
|
||||
|
|
@ -399,6 +404,7 @@ public class StructuralPackageOrderController extends BaseController {
|
|||
|
||||
/**
|
||||
* 删除
|
||||
*
|
||||
* @param ids 要删除的id列表
|
||||
*/
|
||||
@PostMapping("delete")
|
||||
|
|
@ -409,6 +415,7 @@ public class StructuralPackageOrderController extends BaseController {
|
|||
|
||||
/**
|
||||
* 根据订单状态搜索
|
||||
*
|
||||
* @param request 请求参数
|
||||
*/
|
||||
@PostMapping("searchByState")
|
||||
|
|
@ -418,6 +425,7 @@ public class StructuralPackageOrderController extends BaseController {
|
|||
|
||||
/**
|
||||
* 导出选中的id列表
|
||||
*
|
||||
* @param ids id列表
|
||||
*/
|
||||
@PostMapping("exportByIds")
|
||||
|
|
@ -428,6 +436,7 @@ public class StructuralPackageOrderController extends BaseController {
|
|||
|
||||
/**
|
||||
* 导出搜索结果
|
||||
*
|
||||
* @param request 搜索参数
|
||||
*/
|
||||
@PostMapping("exportSearchByState")
|
||||
|
|
@ -441,6 +450,7 @@ public class StructuralPackageOrderController extends BaseController {
|
|||
|
||||
/**
|
||||
* 获取托盘零件列表
|
||||
*
|
||||
* @param id 托盘id
|
||||
*/
|
||||
@GetMapping("getItems")
|
||||
|
|
@ -450,6 +460,7 @@ public class StructuralPackageOrderController extends BaseController {
|
|||
|
||||
/**
|
||||
* 导出托盘零件列表
|
||||
*
|
||||
* @param id 托盘id
|
||||
*/
|
||||
@PostMapping("exportItems")
|
||||
|
|
@ -460,6 +471,7 @@ public class StructuralPackageOrderController extends BaseController {
|
|||
|
||||
/**
|
||||
* 导出老鼠图PDF
|
||||
*
|
||||
* @param id 托盘id
|
||||
*/
|
||||
@GetMapping("exportPdf")
|
||||
|
|
@ -502,6 +514,7 @@ public class StructuralPackageOrderController extends BaseController {
|
|||
|
||||
/**
|
||||
* 导出零件标签PDF
|
||||
*
|
||||
* @param id 托盘id
|
||||
*/
|
||||
@GetMapping("exportItemPdf")
|
||||
|
|
@ -537,6 +550,7 @@ public class StructuralPackageOrderController extends BaseController {
|
|||
|
||||
/**
|
||||
* 导出零件标签图片ZIP
|
||||
*
|
||||
* @param id 托盘id
|
||||
*/
|
||||
@GetMapping(value = "exportItemImageZip", produces = "application/zip")
|
||||
|
|
@ -586,6 +600,7 @@ public class StructuralPackageOrderController extends BaseController {
|
|||
|
||||
/**
|
||||
* 导出托盘标签PDF
|
||||
*
|
||||
* @param id 托盘id
|
||||
*/
|
||||
@GetMapping("exportTrayPdf")
|
||||
|
|
@ -602,6 +617,7 @@ public class StructuralPackageOrderController extends BaseController {
|
|||
|
||||
/**
|
||||
* 导出托盘标签图片
|
||||
*
|
||||
* @param id 托盘id
|
||||
*/
|
||||
@GetMapping(value = "exportTrayImage", produces = MediaType.IMAGE_PNG_VALUE)
|
||||
|
|
@ -621,6 +637,7 @@ public class StructuralPackageOrderController extends BaseController {
|
|||
|
||||
/**
|
||||
* 导出齐套标签PDF
|
||||
*
|
||||
* @param id 托盘id
|
||||
*/
|
||||
@GetMapping("exportQiTaoPdf")
|
||||
|
|
@ -639,6 +656,7 @@ public class StructuralPackageOrderController extends BaseController {
|
|||
|
||||
/**
|
||||
* 导出齐套标签图片
|
||||
*
|
||||
* @param id 托盘id
|
||||
*/
|
||||
@GetMapping(value = "exportQiTaoImage", produces = MediaType.IMAGE_PNG_VALUE)
|
||||
|
|
@ -672,6 +690,7 @@ public class StructuralPackageOrderController extends BaseController {
|
|||
|
||||
/**
|
||||
* 打包托盘(PDA使用)
|
||||
*
|
||||
* @param request 请求参数
|
||||
*/
|
||||
@Transactional
|
||||
|
|
@ -729,6 +748,7 @@ public class StructuralPackageOrderController extends BaseController {
|
|||
|
||||
/**
|
||||
* 保存物料二维码扫描记录
|
||||
*
|
||||
* @param qrCodes 二维码列表
|
||||
* @param type 类型
|
||||
*/
|
||||
|
|
@ -755,6 +775,7 @@ public class StructuralPackageOrderController extends BaseController {
|
|||
|
||||
/**
|
||||
* 退回到未打包
|
||||
*
|
||||
* @param id 托盘id
|
||||
*/
|
||||
@GetMapping("backToUnpackaged")
|
||||
|
|
@ -776,6 +797,7 @@ public class StructuralPackageOrderController extends BaseController {
|
|||
|
||||
/**
|
||||
* 创建送货单
|
||||
*
|
||||
* @param ids 托盘id
|
||||
*/
|
||||
@Transactional
|
||||
|
|
@ -809,6 +831,7 @@ public class StructuralPackageOrderController extends BaseController {
|
|||
|
||||
/**
|
||||
* 搜索送货单
|
||||
*
|
||||
* @param request 查询参数
|
||||
*/
|
||||
@PostMapping("searchDeliverOrder")
|
||||
|
|
@ -818,6 +841,7 @@ public class StructuralPackageOrderController extends BaseController {
|
|||
|
||||
/**
|
||||
* 获取送货单详情信息
|
||||
*
|
||||
* @param id 送货单ID
|
||||
*/
|
||||
@GetMapping("getDeliverOrderInfo")
|
||||
|
|
@ -827,6 +851,7 @@ public class StructuralPackageOrderController extends BaseController {
|
|||
|
||||
/**
|
||||
* 导出送货单
|
||||
*
|
||||
* @param id 送货单id
|
||||
*/
|
||||
@GetMapping("exportDeliverOrder")
|
||||
|
|
@ -873,6 +898,7 @@ public class StructuralPackageOrderController extends BaseController {
|
|||
|
||||
/**
|
||||
* 根据送货单号查询订单信息(PDA使用)
|
||||
*
|
||||
* @param orderNo 送货单号
|
||||
*/
|
||||
@GetMapping("getInfoByDeliverOrderNo")
|
||||
|
|
@ -915,6 +941,7 @@ public class StructuralPackageOrderController extends BaseController {
|
|||
|
||||
/**
|
||||
* 线下收货
|
||||
*
|
||||
* @param itemIds 零件项id列表
|
||||
*/
|
||||
@Transactional
|
||||
|
|
@ -943,6 +970,7 @@ public class StructuralPackageOrderController extends BaseController {
|
|||
|
||||
/**
|
||||
* 收货(PDA使用)
|
||||
*
|
||||
* @param request 请求参数
|
||||
*/
|
||||
@Transactional
|
||||
|
|
@ -1145,12 +1173,12 @@ public class StructuralPackageOrderController extends BaseController {
|
|||
*/
|
||||
@PostMapping("exportTemplate")
|
||||
public void exportTemplate(HttpServletResponse response) throws IOException {
|
||||
Map<String, Object> datas = new LinkedHashMap<>();
|
||||
Map<String, String> datas = new LinkedHashMap<>();
|
||||
datas.put("供应商编码*", "必填");
|
||||
datas.put("机型*", "必填");
|
||||
datas.put("机台序号*", "必填");
|
||||
datas.put("钢构包物料*", "必填");
|
||||
datas.put("期望交期", "不填为今天,格式2025/10/05");
|
||||
datas.put("期望交期", "不填为今天,格式2025-03-05");
|
||||
datas.put("采购订单号*", "必填");
|
||||
datas.put("行项目*", "0010");
|
||||
datas.put("数量*", "必填");
|
||||
|
|
@ -1163,12 +1191,12 @@ public class StructuralPackageOrderController extends BaseController {
|
|||
*/
|
||||
@PostMapping("importOrder")
|
||||
public ApiResult importOrder(MultipartFile file) throws IOException {
|
||||
List<Map<String, Object>> datas = EecExcelUtil.handlerExcel(file.getInputStream());
|
||||
List<StructuralPackageOrderExportDTO> datas = EecExcelUtil.getExcelContext(file.getInputStream(), StructuralPackageOrderExportDTO.class);
|
||||
List<StructuralPackageOrderImportDTO> list = new ArrayList<>();
|
||||
StringBuilder sb = new StringBuilder();
|
||||
datas.forEach(data -> {
|
||||
sb.setLength(0);
|
||||
String supplierCode = StrUtil.trim(data.get("供应商编码*").toString());
|
||||
String supplierCode = StrUtil.trim(data.getSupplierCode()); //StrUtil.trim(data.get("供应商编码*").toString());
|
||||
Long supplierId = null;
|
||||
if (StrUtil.isBlank(supplierCode)) {
|
||||
sb.append("供应商编码不能为空;");
|
||||
|
|
@ -1180,7 +1208,7 @@ public class StructuralPackageOrderController extends BaseController {
|
|||
supplierId = supplier.getId();
|
||||
}
|
||||
}
|
||||
String modelNo = StrUtil.trim(data.get("机型*").toString());
|
||||
String modelNo = StrUtil.trim(data.getModelNo()); //StrUtil.trim(data.get("机型*").toString());
|
||||
Long modelId = null;
|
||||
if (StrUtil.isBlank(modelNo)) {
|
||||
sb.append("机型不能为空;");
|
||||
|
|
@ -1195,7 +1223,7 @@ public class StructuralPackageOrderController extends BaseController {
|
|||
modelId = model.getId();
|
||||
}
|
||||
}
|
||||
String workbenchNo = StrUtil.trim(data.get("机台序号*").toString());
|
||||
String workbenchNo = StrUtil.trim(data.getWorkbenchNo()); //StrUtil.trim(data.get("机台序号*").toString());
|
||||
Long workbenchId = null;
|
||||
if (StrUtil.isBlank(workbenchNo)) {
|
||||
sb.append("机台序号不能为空;");
|
||||
|
|
@ -1210,7 +1238,7 @@ public class StructuralPackageOrderController extends BaseController {
|
|||
workbenchId = workbench.getId();
|
||||
}
|
||||
}
|
||||
String materialNo = StrUtil.trim(data.get("钢构包物料*").toString());
|
||||
String materialNo = StrUtil.trim(data.getMaterialNo()); //StrUtil.trim(data.get("钢构包物料*").toString());
|
||||
PackageVO packageVO = null;
|
||||
if (StrUtil.isBlank(materialNo)) {
|
||||
sb.append("钢构包物料不能为空;");
|
||||
|
|
@ -1220,13 +1248,13 @@ public class StructuralPackageOrderController extends BaseController {
|
|||
sb.append("钢构包物料无效;");
|
||||
}
|
||||
}
|
||||
String expectDeliveryDate = StrUtil.trim(data.get("期望交期").toString());
|
||||
String expectDeliveryDate = StrUtil.trim(data.getExpectDeliveryDate()); //StrUtil.trim(data.get("期望交期").toString());
|
||||
if (StrUtil.isBlank(expectDeliveryDate)) {
|
||||
expectDeliveryDate = DateTimeUtil.format(LocalDate.now(), "yyyy/MM/dd");
|
||||
expectDeliveryDate = DateTimeUtil.format(LocalDate.now(), "yyyy-MM-dd");
|
||||
} else if (!DateTimeUtil.isValidDate(expectDeliveryDate)) {
|
||||
sb.append("期望交期无效;");
|
||||
sb.append("期望交期格式不正确,应为2026-03-30;");
|
||||
}
|
||||
String snum = StrUtil.trim(data.get("数量*").toString());
|
||||
String snum = StrUtil.trim(data.getNum()); //StrUtil.trim(data.get("数量*").toString());
|
||||
BigDecimal num = null;
|
||||
if (StrUtil.isBlank(snum)) {
|
||||
sb.append("数量不能为空;");
|
||||
|
|
@ -1238,8 +1266,8 @@ public class StructuralPackageOrderController extends BaseController {
|
|||
sb.append("数量必须大于0;");
|
||||
}
|
||||
}
|
||||
String poNum = StrUtil.trim(data.get("采购订单号*").toString());
|
||||
String rowNo = StrUtil.trim(data.get("行项目*").toString());
|
||||
String poNum = StrUtil.trim(data.getPoNum()); //StrUtil.trim(data.get("采购订单号*").toString());
|
||||
String rowNo = StrUtil.trim(data.getRowNo()); // StrUtil.trim(data.get("行项目*").toString());
|
||||
BigDecimal transportNum = num;
|
||||
if (StrUtil.isBlank(poNum)) {
|
||||
sb.append("采购订单号不能为空;");
|
||||
|
|
@ -1290,13 +1318,13 @@ public class StructuralPackageOrderController extends BaseController {
|
|||
.setTransportNum(transportNum)
|
||||
);
|
||||
} else {
|
||||
data.put("错误信息", sb.toString());
|
||||
data.setError(sb.toString());
|
||||
}
|
||||
});
|
||||
if (list.size() != datas.size()) {
|
||||
try (ByteArrayOutputStream osOut = new ByteArrayOutputStream()) {
|
||||
new Workbook()
|
||||
.addSheet(new ListMapSheet<>(datas))
|
||||
.addSheet(new ListSheet<>(datas))
|
||||
.writeTo(osOut);
|
||||
try (ByteArrayInputStream isIn = new ByteArrayInputStream(osOut.toByteArray())) {
|
||||
return ApiResult.error(STATE.DataNoCheckPass, "导入文件失败", fileUploadService.upload("temp/" + DateTimeUtil.format(LocalDate.now(), "yyyyMMdd") + "/" + IdUtil.fastUUID() + ".xlsx", isIn, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"));
|
||||
|
|
@ -1315,6 +1343,7 @@ public class StructuralPackageOrderController extends BaseController {
|
|||
|
||||
/**
|
||||
* 添加备注
|
||||
*
|
||||
* @param request 请求参数
|
||||
*/
|
||||
@PostMapping("itemRemark")
|
||||
|
|
|
|||
|
|
@ -0,0 +1,35 @@
|
|||
package com.nflg.wms.admin.pojo.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import org.ttzero.excel.annotation.ExcelColumn;
|
||||
|
||||
@Data
|
||||
public class StructuralPackageOrderExportDTO {
|
||||
|
||||
@ExcelColumn(value = "供应商编码*")
|
||||
private String supplierCode;
|
||||
|
||||
@ExcelColumn(value = "机型*")
|
||||
private String modelNo;
|
||||
|
||||
@ExcelColumn(value = "机台序号*")
|
||||
private String workbenchNo;
|
||||
|
||||
@ExcelColumn(value = "钢构包物料*")
|
||||
private String materialNo;
|
||||
|
||||
@ExcelColumn(value = "期望交期")
|
||||
private String expectDeliveryDate;
|
||||
|
||||
@ExcelColumn(value = "采购订单号*")
|
||||
private String poNum;
|
||||
|
||||
@ExcelColumn(value = "行项目*")
|
||||
private String rowNo;
|
||||
|
||||
@ExcelColumn(value = "数量*")
|
||||
private String num;
|
||||
|
||||
@ExcelColumn(value = "错误信息")
|
||||
private String error;
|
||||
}
|
||||
|
|
@ -3,7 +3,7 @@
|
|||
<head>
|
||||
<meta charset="UTF-8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||
<title>成本中心领料单</title>
|
||||
<title th:text="${base.title}">成本中心领料单</title>
|
||||
<style>
|
||||
@page {
|
||||
size: A4 landscape; /* 横向 A4 */
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
<head>
|
||||
<meta charset="UTF-8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||
<title>成品订单入库单</title>
|
||||
<title th:text="${base.title}">成品订单入库单</title>
|
||||
<style>
|
||||
@page {
|
||||
size: A4 landscape; /* 横向 A4 */
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
<head>
|
||||
<meta charset="UTF-8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||
<title>生产补料单</title>
|
||||
<title th:text="${base.title}">生产补料单</title>
|
||||
<style>
|
||||
@page {
|
||||
size: A4 landscape; /* 横向 A4 */
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
<head>
|
||||
<meta charset="UTF-8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||
<title>返修退料单</title>
|
||||
<title th:text="${base.title}">生产退料单</title>
|
||||
<style>
|
||||
@page {
|
||||
size: A4 landscape; /* 横向 A4 */
|
||||
|
|
@ -166,7 +166,7 @@
|
|||
<div class="qrcode"><img th:src="${base.qrcode}" src="../img/qrcode.png"/></div>
|
||||
<div>
|
||||
<div class="company-name">福建南方路面机械股份有限公司</div>
|
||||
<div class="title" th:text="${base.title}">返修退料单</div>
|
||||
<div class="title" th:text="${base.title}">生产退料单</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-desc">
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
<head>
|
||||
<meta charset="UTF-8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||
<title>生产领料出库单</title>
|
||||
<title th:text="${base.title}">生产领料出库单</title>
|
||||
<style>
|
||||
@page {
|
||||
size: A4 landscape; /* 横向 A4 */
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
<head>
|
||||
<meta charset="UTF-8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||
<title>成品发货领料单</title>
|
||||
<title th:text="${base.title}">成品发货领料单</title>
|
||||
<style>
|
||||
@media print {
|
||||
@page {
|
||||
|
|
|
|||
|
|
@ -36,4 +36,9 @@ public class TransferOrderSearchQO extends SearchBaseQO {
|
|||
* 仓库
|
||||
*/
|
||||
private String storageLocation;
|
||||
|
||||
/**
|
||||
* 工厂
|
||||
*/
|
||||
private String factoryCode;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
|
|
@ -26,6 +27,9 @@ public class WmsComponentPackingServiceImpl extends ServiceImpl<WmsComponentPack
|
|||
|
||||
@Override
|
||||
public IPage<ComponentPackingVO> search(ComponentPackingQO request) {
|
||||
if (Objects.nonNull(request.getStartDate())){
|
||||
request.setStartDate(request.getStartDate().minusDays(1));
|
||||
}
|
||||
return baseMapper.search(request, new Page<>(request.getPage(), request.getPageSize()));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -6,11 +6,8 @@
|
|||
select
|
||||
a.id,a.barcode_code,a.transfer_num,a.create_time,a.create_user_name,a.material_code,
|
||||
a.material_description,a.unit,a.batch_no,a.serial_no,a.factory_code,
|
||||
b."name" as from_bin_location,c."name" as to_bin_location,d.name as storage_location
|
||||
a.from_bin_location,a.to_bin_location,a.storage_location
|
||||
from wms_transfer_orders a
|
||||
left join wms_bin b on a.from_bin_location=b."no"
|
||||
left join wms_bin c on a.to_bin_location=c."no"
|
||||
left join wms_warehouse d on a.storage_location=d."no"
|
||||
<where>
|
||||
<if test="request.barcodeCode !=null and request.barcodeCode !=''">
|
||||
and a.package_code ilike concat('%', #{request.barcodeCode}, '%')
|
||||
|
|
@ -21,6 +18,9 @@
|
|||
<if test="request.materialCode !=null and request.materialCode !=''">
|
||||
and a.material_code ilike concat('%', #{request.materialCode}, '%')
|
||||
</if>
|
||||
<if test="request.factoryCode !=null and request.factoryCode !=''">
|
||||
and a.factory_code = #{request.factoryCode}
|
||||
</if>
|
||||
<if test="request.fromBinLocation !=null and request.fromBinLocation !=''">
|
||||
and a.from_bin_location = #{request.fromBinLocation}
|
||||
</if>
|
||||
|
|
@ -37,6 +37,6 @@
|
|||
and a.create_time <= #{request.endDate}
|
||||
</if>
|
||||
</where>
|
||||
order by a.create_time DESC
|
||||
order by a.id DESC
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
|||
Loading…
Reference in New Issue