parent
e326e5ac14
commit
fc3e06863a
|
|
@ -0,0 +1,235 @@
|
|||
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.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.nflg.wms.admin.util.PdfGeneratorUtil;
|
||||
import com.nflg.wms.admin.util.QRCodeUtil;
|
||||
import com.nflg.wms.admin.util.ThymeleafUtil;
|
||||
import com.nflg.wms.common.constant.STATE;
|
||||
import com.nflg.wms.common.pojo.ApiResult;
|
||||
import com.nflg.wms.common.pojo.PageData;
|
||||
import com.nflg.wms.common.pojo.dto.BarcodePrintingAddDTO;
|
||||
import com.nflg.wms.common.pojo.dto.DeliverNormalOrderItemDTO;
|
||||
import com.nflg.wms.common.pojo.dto.GongZhuangTaiZhangExcelCheckDTO;
|
||||
import com.nflg.wms.common.pojo.qo.BarcodePrintingEditQO;
|
||||
import com.nflg.wms.common.pojo.qo.BarcodePrintingIdsQO;
|
||||
import com.nflg.wms.common.pojo.qo.BarcodePrintingQO;
|
||||
import com.nflg.wms.common.pojo.qo.SRMOrderSearchQO;
|
||||
import com.nflg.wms.common.pojo.vo.BarcodePrintingVO;
|
||||
import com.nflg.wms.common.pojo.vo.SrmOrderVO;
|
||||
import com.nflg.wms.common.util.DateTimeUtil;
|
||||
import com.nflg.wms.common.util.EecExcelUtil;
|
||||
import com.nflg.wms.common.util.VUtil;
|
||||
import com.nflg.wms.repository.entity.WmsInProduceOrder;
|
||||
import com.nflg.wms.repository.entity.WmsInProduceOrderItem;
|
||||
import com.nflg.wms.repository.entity.WmsInventoryBarcodePrinting;
|
||||
import com.nflg.wms.repository.service.IWmsInventoryBarcodePrintingService;
|
||||
import com.nflg.wms.starter.BaseController;
|
||||
import com.nflg.wms.starter.annotation.ApiMark;
|
||||
import com.nflg.wms.starter.service.FileUploadService;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.Valid;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.core.io.ClassPathResource;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.ttzero.excel.entity.ListSheet;
|
||||
import org.ttzero.excel.entity.Workbook;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.net.URL;
|
||||
import java.text.DecimalFormat;
|
||||
import java.time.LocalDate;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 库存物料条码打印
|
||||
* @author nflg
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/barcode")
|
||||
public class BarcodePrintingController extends BaseController {
|
||||
@Resource
|
||||
private IWmsInventoryBarcodePrintingService printingService;
|
||||
|
||||
@Resource
|
||||
private FileUploadService fileUploadService;
|
||||
|
||||
private static final DecimalFormat DF = new DecimalFormat("0.00");
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
@PostMapping("search")
|
||||
@ApiMark(moduleName = "仓储物流打印", apiName = "打印记录")
|
||||
public ApiResult<PageData<BarcodePrintingVO>> search(@Valid @RequestBody BarcodePrintingQO request) {
|
||||
return ApiResult.success(printingService.search(request));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量获取编辑内容,可多选
|
||||
*/
|
||||
@PostMapping("items")
|
||||
@ApiMark(moduleName = "仓储物流打印", apiName = "获取编辑记录")
|
||||
public ApiResult<List<BarcodePrintingVO>> getItems(@Valid @RequestBody BarcodePrintingIdsQO request) {
|
||||
List<WmsInventoryBarcodePrinting> items = printingService.listByIds(request.getIds());
|
||||
List<BarcodePrintingVO> vos = new ArrayList<>();
|
||||
if (CollectionUtil.isNotEmpty(items)) {
|
||||
vos = Convert.toList(BarcodePrintingVO.class, items);
|
||||
}
|
||||
return ApiResult.success(vos);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除物料
|
||||
*/
|
||||
@PostMapping("delete")
|
||||
@ApiMark(moduleName = "仓储物流打印", apiName = "批量删除记录")
|
||||
public ApiResult<Void> deleteBarcodes(@Valid @RequestBody BarcodePrintingIdsQO request) {
|
||||
if (CollectionUtil.isEmpty(request.getIds())) {
|
||||
VUtil.trueThrowBusinessError(true).throwMessage("没有需要删除的数据");
|
||||
}
|
||||
printingService.removeByIds(request.getIds());
|
||||
return ApiResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*/
|
||||
@PostMapping("save")
|
||||
@ApiMark(moduleName = "仓储物流打印", apiName = "保存记录")
|
||||
public ApiResult<Void> saveBarcodes(@Valid @RequestBody List<BarcodePrintingEditQO> request) {
|
||||
//修改
|
||||
if (CollectionUtil.isEmpty(request)) {
|
||||
VUtil.trueThrowBusinessError(true).throwMessage("没有需要保存的数据");
|
||||
}
|
||||
List<WmsInventoryBarcodePrinting> items = Convert.toList(WmsInventoryBarcodePrinting.class, request);
|
||||
printingService.saveOrUpdateBatch(items);
|
||||
return ApiResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入物料清单
|
||||
* @param file 文件
|
||||
*/
|
||||
@Transactional
|
||||
@PostMapping("import")
|
||||
public ApiResult importFromExcel(@RequestParam(value = "file") MultipartFile file) throws IOException {
|
||||
List<BarcodePrintingAddDTO> data = EecExcelUtil.getExcelContext(file.getInputStream(), BarcodePrintingAddDTO.class);
|
||||
VUtil.trueThrowBusinessError(CollectionUtil.isEmpty(data)).throwMessage("导入文件内容为空");
|
||||
// 检查
|
||||
List<WmsInventoryBarcodePrinting> codes = new ArrayList<>();
|
||||
|
||||
for (BarcodePrintingAddDTO item : data) {
|
||||
StringBuilder errorBuild = new StringBuilder();
|
||||
if (StrUtil.isBlank(item.getMaterialNo())) {
|
||||
errorBuild.append("物料编号必填");
|
||||
}
|
||||
if (StrUtil.isBlank(item.getMaterialDes())) {
|
||||
errorBuild.append("物料描述必填");
|
||||
}
|
||||
if (StrUtil.isBlank(item.getUnit())) {
|
||||
errorBuild.append("单位必填");
|
||||
}
|
||||
if (item.getQty() == null || item.getQty().compareTo(BigDecimal.ZERO) <= 0) {
|
||||
errorBuild.append("数量必填");
|
||||
}
|
||||
if (item.getPackingNum() == null || item.getPackingNum().compareTo(BigDecimal.ZERO) <= 0) {
|
||||
errorBuild.append("最小包装量必填");
|
||||
}
|
||||
if (errorBuild.length() > 0) {
|
||||
item.setError(errorBuild.toString());
|
||||
} else {
|
||||
codes.add(Convert.convert(WmsInventoryBarcodePrinting.class, item));
|
||||
}
|
||||
}
|
||||
if (data.stream().noneMatch(it -> StrUtil.isNotBlank(it.getError()))
|
||||
&& CollectionUtil.isNotEmpty(codes)
|
||||
) {
|
||||
printingService.saveBatch(codes);
|
||||
return ApiResult.success();
|
||||
} else {
|
||||
try (ByteArrayOutputStream osOut = new ByteArrayOutputStream()) {
|
||||
new Workbook()
|
||||
.addSheet(new ListSheet<>(data))
|
||||
.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"));
|
||||
}
|
||||
} catch (Exception e) {
|
||||
return ApiResult.error(STATE.BusinessError, "保存文件出错");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private String generateQRContent(DeliverNormalOrderItemDTO order, String indexNo) {
|
||||
String content = StrUtil.format("{}${}${}${}${}${}${}${}"
|
||||
, order.getPrintNo(), order.getExternalOrderNo(), order.getRowNo(), order.getMaterialNo(), order.getPrintNum()
|
||||
, order.getMaterialDesc(), order.getBatchNo(), Optional.ofNullable(indexNo).orElse(""));
|
||||
log.debug("二维码内容:" + content);
|
||||
return content;
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出物料条码pdf(整张或者一张一个)
|
||||
* @param request 打印IDs
|
||||
* @param type 1:逐个,2:一页
|
||||
*/
|
||||
@PostMapping("exportMaterialsPdf")
|
||||
public void exportMaterials(HttpServletResponse response, @Valid @RequestParam @NotNull BarcodePrintingIdsQO request, @Valid @RequestParam @NotNull Integer type) throws Exception {
|
||||
List<WmsInventoryBarcodePrinting> codelist = printingService.listByIds(request.getIds());
|
||||
VUtil.trueThrowBusinessError(Objects.isNull(codelist)).throwMessage("订单不存在");
|
||||
List<DeliverNormalOrderItemDTO> datas = new ArrayList<>();
|
||||
// Integer i = 1;
|
||||
for (WmsInventoryBarcodePrinting item : codelist) {
|
||||
DeliverNormalOrderItemDTO dto = new DeliverNormalOrderItemDTO();
|
||||
dto.setMaterialNo(item.getMaterialNo());
|
||||
dto.setMaterialDesc(item.getMaterialDes());
|
||||
dto.setBatchNo(StrUtil.isBlank(item.getBatchNumber()) ? "" : item.getBatchNumber());
|
||||
dto.setExternalOrderNo("");
|
||||
dto.setRowNo("");
|
||||
if (StrUtil.isNotBlank(item.getSerialNumbers())) {
|
||||
List<String> serialNumbers = StrUtil.split(item.getSerialNumbers(), ",");
|
||||
for (String serialNumber : serialNumbers) {
|
||||
dto.setPrintNo(IdUtil.getSnowflakeNextIdStr());
|
||||
dto.setPrintNum("1");
|
||||
String qCode = QRCodeUtil.generateQRCodeBase64(generateQRContent(dto, serialNumber), 100, 100);
|
||||
dto.setQrCode(qCode);
|
||||
//i += 1;
|
||||
}
|
||||
} else {
|
||||
Integer codeNum = item.getQty().divide(item.getPackingNum(), 0, RoundingMode.UP).intValue();
|
||||
for (int j = 0; j < codeNum; j++) {
|
||||
dto.setPrintNo(IdUtil.getSnowflakeNextIdStr());
|
||||
dto.setPrintNum(item.getPackingNum().toString());
|
||||
String qCode = QRCodeUtil.generateQRCodeBase64(generateQRContent(dto, ""), 100, 100);
|
||||
dto.setQrCode(qCode);
|
||||
}
|
||||
|
||||
}
|
||||
datas.add(dto);
|
||||
}
|
||||
Map<String, Object> variables = new HashMap<>();
|
||||
variables.put("list", datas);
|
||||
if (Objects.equals(type, 1)) {
|
||||
String html = ThymeleafUtil.generator("/template/qrcode/", "Inv-1", ".html", variables);
|
||||
URL baseUrl = new ClassPathResource("template/qrcode/").getURL();
|
||||
PdfGeneratorUtil.generatePdf("库存物料条码(逐个)", html, baseUrl.toString(), response);
|
||||
} else {
|
||||
String html = ThymeleafUtil.generator("/template/qrcode/", "Inv-2", ".html", variables);
|
||||
URL baseUrl = new ClassPathResource("template/qrcode/").getURL();
|
||||
PdfGeneratorUtil.generatePdf("库存物料条码(整张)", html, baseUrl.toString(), response);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -100,7 +100,7 @@ public class InProduceOrderController extends BaseController {
|
|||
* @return 订单信息
|
||||
*/
|
||||
@GetMapping("searchFromSAP")
|
||||
public ApiResult<ZWM00MB007DTO> searchFromSAP(@Valid @RequestParam @NotBlank String no){
|
||||
public ApiResult<ZWM00MB007DTO> searchFromSAP(@Valid @RequestParam @NotBlank String no) {
|
||||
return ApiResult.success(sapService.zwm00Mb007(no));
|
||||
// return ApiResult.success(new ZWM00MB007DTO()
|
||||
// .setAufnr(RandomUtil.randomNumbers(10))
|
||||
|
|
@ -153,8 +153,8 @@ public class InProduceOrderController extends BaseController {
|
|||
@Transactional
|
||||
@PostMapping("save")
|
||||
public ApiResult<Long> save(@Valid @RequestBody InProduceOrderSaveQO request) {
|
||||
if (Objects.isNull(request.getId())){
|
||||
WmsInProduceOrder order=new WmsInProduceOrder()
|
||||
if (Objects.isNull(request.getId())) {
|
||||
WmsInProduceOrder order = new WmsInProduceOrder()
|
||||
.setNo(serialNumberControllerService.generateSerialNumber(8))
|
||||
.setOrderNo(request.getAufnr())
|
||||
.setList(request.getList())
|
||||
|
|
@ -162,17 +162,17 @@ public class InProduceOrderController extends BaseController {
|
|||
.setCreateTime(LocalDateTime.now());
|
||||
produceOrderService.save(order);
|
||||
request.setId(order.getId());
|
||||
}else {
|
||||
WmsInProduceOrder order=produceOrderService.getById(request.getId());
|
||||
} else {
|
||||
WmsInProduceOrder order = produceOrderService.getById(request.getId());
|
||||
VUtil.trueThrowBusinessError(Objects.isNull(order)).throwMessage("订单不存在");
|
||||
VUtil.trueThrowBusinessError(!Objects.equals(order.getState(),(short)0))
|
||||
.throwMessage("保存失败:非待收货状态");
|
||||
VUtil.trueThrowBusinessError(!Objects.equals(order.getState(), (short) 0))
|
||||
.throwMessage("保存失败:非待收货状态");
|
||||
order.setUpdateBy(UserUtil.getUserName());
|
||||
order.setUpdateTime(LocalDateTime.now());
|
||||
produceOrderService.updateById(order);
|
||||
produceOrderItemService.deleteByOrderId(order.getId());
|
||||
}
|
||||
WmsInProduceOrderItem parent=new WmsInProduceOrderItem()
|
||||
WmsInProduceOrderItem parent = new WmsInProduceOrderItem()
|
||||
.setOrderId(request.getId())
|
||||
.setParentId(0L)
|
||||
.setNum(request.getNum())
|
||||
|
|
@ -184,7 +184,7 @@ public class InProduceOrderController extends BaseController {
|
|||
.setOrderNum(request.getPsmng());
|
||||
// .setBatchNo(NoUtil.getBatchNo(""));
|
||||
produceOrderItemService.save(parent);
|
||||
if (request.getList()){
|
||||
if (request.getList()) {
|
||||
List<WmsBom> children = bomService.getChildren(request.getMatnr());
|
||||
VUtil.trueThrowBusinessError(CollectionUtil.isEmpty(children)).throwMessage("请先添加齐套信息");
|
||||
produceOrderItemService.saveBatch(children.stream().map(it -> new WmsInProduceOrderItem()
|
||||
|
|
@ -210,7 +210,7 @@ public class InProduceOrderController extends BaseController {
|
|||
* @return 搜索结果
|
||||
*/
|
||||
@PostMapping("search")
|
||||
public ApiResult<PageData<WmsInProduceOrder>> search(@Valid @RequestBody InProduceOrderSearchQO request){
|
||||
public ApiResult<PageData<WmsInProduceOrder>> search(@Valid @RequestBody InProduceOrderSearchQO request) {
|
||||
return ApiResult.success(produceOrderService.search(request));
|
||||
}
|
||||
|
||||
|
|
@ -220,9 +220,9 @@ public class InProduceOrderController extends BaseController {
|
|||
* @return 列表
|
||||
*/
|
||||
@GetMapping("getList")
|
||||
public ApiResult<InProduceOrderMaterialVO> getList(@Valid @RequestParam @NotNull Long id){
|
||||
List<WmsInProduceOrderItem> list=produceOrderItemService.getByOrderId(id);
|
||||
WmsInProduceOrderItem parent=list.stream().filter(item -> Objects.equals(item.getParentId(), 0L)).findFirst().get();
|
||||
public ApiResult<InProduceOrderMaterialVO> getList(@Valid @RequestParam @NotNull Long id) {
|
||||
List<WmsInProduceOrderItem> list = produceOrderItemService.getByOrderId(id);
|
||||
WmsInProduceOrderItem parent = list.stream().filter(item -> Objects.equals(item.getParentId(), 0L)).findFirst().get();
|
||||
InProduceOrderMaterialVO vo = Convert.convert(InProduceOrderMaterialVO.class, parent);
|
||||
vo.setChildren(list.stream()
|
||||
.filter(item -> Objects.equals(item.getParentId(), parent.getId()))
|
||||
|
|
@ -238,10 +238,10 @@ public class InProduceOrderController extends BaseController {
|
|||
*/
|
||||
@Transactional
|
||||
@GetMapping("delete")
|
||||
public ApiResult<Void> delete(@Valid @RequestParam @NotNull Long id){
|
||||
WmsInProduceOrder order=produceOrderService.getById(id);
|
||||
public ApiResult<Void> delete(@Valid @RequestParam @NotNull Long id) {
|
||||
WmsInProduceOrder order = produceOrderService.getById(id);
|
||||
VUtil.trueThrowBusinessError(Objects.isNull(order)).throwMessage("订单不存在");
|
||||
VUtil.trueThrowBusinessError(!Objects.equals(order.getState(),(short)0))
|
||||
VUtil.trueThrowBusinessError(!Objects.equals(order.getState(), (short) 0))
|
||||
.throwMessage("删除失败:非待收货状态");
|
||||
produceOrderService.removeById(id);
|
||||
produceOrderItemService.deleteByOrderId(id);
|
||||
|
|
@ -254,7 +254,7 @@ public class InProduceOrderController extends BaseController {
|
|||
* @param type 1:逐个,2:一页
|
||||
*/
|
||||
@GetMapping("exportMaterialsPdf")
|
||||
public void exportMaterials(HttpServletResponse response, @Valid @RequestParam @NotNull Long id,@Valid @RequestParam @NotNull Integer type) throws Exception {
|
||||
public void exportMaterials(HttpServletResponse response, @Valid @RequestParam @NotNull Long id, @Valid @RequestParam @NotNull Integer type) throws Exception {
|
||||
WmsInProduceOrder order = produceOrderService.getById(id);
|
||||
VUtil.trueThrowBusinessError(Objects.isNull(order)).throwMessage("订单不存在");
|
||||
List<WmsInProduceOrderItem> list = produceOrderItemService.getByOrderId(id);
|
||||
|
|
@ -284,22 +284,22 @@ public class InProduceOrderController extends BaseController {
|
|||
}
|
||||
Map<String, Object> variables = new HashMap<>();
|
||||
variables.put("list", datas);
|
||||
if (Objects.equals(type,1)) {
|
||||
if (Objects.equals(type, 1)) {
|
||||
String html = ThymeleafUtil.generator("/template/qrcode/", "dp-1", ".html", variables);
|
||||
URL baseUrl = new ClassPathResource("template/qrcode/").getURL();
|
||||
PdfGeneratorUtil.generatePdf("普通物料条码(逐个)", html, baseUrl.toString(), response);
|
||||
}else {
|
||||
} else {
|
||||
String html = ThymeleafUtil.generator("/template/qrcode/", "dp-2", ".html", variables);
|
||||
URL baseUrl = new ClassPathResource("template/qrcode/").getURL();
|
||||
PdfGeneratorUtil.generatePdf("普通物料条码(整张)", html, baseUrl.toString(), response);
|
||||
}
|
||||
}
|
||||
|
||||
private String generateQRContent(DeliverNormalOrderItemDTO order,String indexNo){
|
||||
String content= StrUtil.format("{}${}${}${}${}${}${}${}"
|
||||
, order.getPrintNo(), order.getExternalOrderNo(),order.getRowNo(),order.getMaterialNo(),order.getPrintNum()
|
||||
,order.getMaterialDesc(),order.getBatchNo(),Optional.ofNullable(indexNo).orElse(""));
|
||||
log.debug("二维码内容:"+ content);
|
||||
private String generateQRContent(DeliverNormalOrderItemDTO order, String indexNo) {
|
||||
String content = StrUtil.format("{}${}${}${}${}${}${}${}"
|
||||
, order.getPrintNo(), order.getExternalOrderNo(), order.getRowNo(), order.getMaterialNo(), order.getPrintNum()
|
||||
, order.getMaterialDesc(), order.getBatchNo(), Optional.ofNullable(indexNo).orElse(""));
|
||||
log.debug("二维码内容:" + content);
|
||||
return content;
|
||||
}
|
||||
|
||||
|
|
@ -371,10 +371,10 @@ public class InProduceOrderController extends BaseController {
|
|||
*/
|
||||
@Transactional
|
||||
@PostMapping("receive")
|
||||
public ApiResult<Void> receive(@Valid @RequestBody InProduceOrderReceiveQO request){
|
||||
public ApiResult<Void> receive(@Valid @RequestBody InProduceOrderReceiveQO request) {
|
||||
WmsInProduceOrder order = produceOrderService.getByNo(request.getNo());
|
||||
VUtil.trueThrowBusinessError(Objects.isNull(order)).throwMessage("订单不存在");
|
||||
VUtil.trueThrowBusinessError(!Objects.equals(order.getState(), (short)0))
|
||||
VUtil.trueThrowBusinessError(!Objects.equals(order.getState(), (short) 0))
|
||||
.throwMessage("该订单非待收货状态");
|
||||
List<InProduceOrderItemVO> list = produceOrderItemService.getVOByOrderId(order.getId());
|
||||
if (order.getList()) {
|
||||
|
|
@ -392,7 +392,7 @@ public class InProduceOrderController extends BaseController {
|
|||
List<String> materialNos = new ArrayList<>();
|
||||
List<InMaterialScanRecord> records = new ArrayList<>();
|
||||
List<Zwm00Mb107QO> input1 = new ArrayList<>();
|
||||
list.forEach(it->{
|
||||
list.forEach(it -> {
|
||||
BigDecimal num = BigDecimal.ZERO;
|
||||
InProduceOrderReceiveMaterialQO materialQO = request.getItems().stream().filter(q -> StrUtil.equals(q.getMaterialNo(), it.getMaterialNo())).findFirst().orElse(null);
|
||||
if (Objects.isNull(materialQO)) {
|
||||
|
|
@ -433,11 +433,13 @@ public class InProduceOrderController extends BaseController {
|
|||
materialNos.add(it.getMaterialNo());
|
||||
}
|
||||
//是否更改了储位
|
||||
syncStorage(it, StrUtil.split(materialQO.getBinNos(), "/"));
|
||||
if (Objects.isNull(materialQO.getBinNos())) {
|
||||
syncStorage(it, StrUtil.split(materialQO.getBinNos(), "/"));
|
||||
}
|
||||
}
|
||||
});
|
||||
VUtil.trueThrowBusinessError(CollectionUtil.isNotEmpty(materialNos))
|
||||
.throwMessage("以下物料的扫码数量与收货数量不一致:"+StrUtil.join(",", materialNos));
|
||||
.throwMessage("以下物料的扫码数量与收货数量不一致:" + StrUtil.join(",", materialNos));
|
||||
inventoryService.in(input1.stream().map(it -> new InventoryDTO()
|
||||
.setMaterialNo(request.getItems().get(0).getMaterialNo())
|
||||
.setNum(it.getPSMNG())
|
||||
|
|
@ -450,7 +452,7 @@ public class InProduceOrderController extends BaseController {
|
|||
Zwm00Mb107DTO dto = sapService.zwm00_mb107(order.getOrderNo(), UserUtil.getUserName(), input1, null);
|
||||
order.setMblnr(dto.getE_MBLNR());
|
||||
order.setMjahr(dto.getE_MJAHR());
|
||||
order.setState((short)1);
|
||||
order.setState((short) 1);
|
||||
order.setUpdateBy(UserUtil.getUserName());
|
||||
order.setUpdateTime(LocalDateTime.now());
|
||||
produceOrderService.updateById(order);
|
||||
|
|
@ -458,6 +460,9 @@ public class InProduceOrderController extends BaseController {
|
|||
}
|
||||
|
||||
private void syncStorage(InProduceOrderItemVO it, Collection<String> binNos) {
|
||||
if(CollectionUtil.isEmpty(binNos))
|
||||
return;
|
||||
|
||||
produceOrderItemService.lambdaUpdate()
|
||||
.set(WmsInProduceOrderItem::getBinNos, StrUtil.join(",", binNos))
|
||||
.eq(WmsInProduceOrderItem::getId, it.getId())
|
||||
|
|
|
|||
|
|
@ -942,7 +942,7 @@ public class NormalPGIController extends BaseController {
|
|||
*/
|
||||
@PostMapping("unscan/task/confirm")
|
||||
@ApiMark(moduleName = "送货单管理", apiName = "普通物料任务上架确认")
|
||||
public ApiResult<Void> takeDeliveryConfirm(@Valid @RequestBody ReceiveQO request) {
|
||||
public ApiResult<Void> takeDeliveryConfirm(@Valid @RequestBody NormalReceiveQO request) {
|
||||
WmsPoReceipt wmsPoReceipt = wmsPoReceiptService.getById(request.getId());
|
||||
VUtil.trueThrowBusinessError(Objects.isNull(wmsPoReceipt)).throwMessage("无此任务");
|
||||
VUtil.trueThrowBusinessError(!wmsPoReceipt.getSourceType().equals(1)).throwMessage("不属于无码收货的采购单");
|
||||
|
|
|
|||
|
|
@ -0,0 +1,61 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">
|
||||
<head>
|
||||
<meta charset="UTF-8"/>
|
||||
<title>普通物料标签</title>
|
||||
<meta content="width=device-width, initial-scale=1.0" name="viewport"/>
|
||||
<style>
|
||||
@page {
|
||||
size: A4;
|
||||
margin: 5mm; /* 关键!清除默认页边距 */
|
||||
}
|
||||
@media print {
|
||||
body {
|
||||
font-size: 9pt;
|
||||
}
|
||||
}
|
||||
body {
|
||||
font-family: SimSun, Arial, sans-serif;
|
||||
font-size: 9pt;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
table {
|
||||
margin: 3px;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
table, th, td {
|
||||
border: 1px solid #000;
|
||||
}
|
||||
|
||||
.title {
|
||||
text-align: center;
|
||||
display: table-cell;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.div-with-border {
|
||||
border-bottom: 1px solid #000;
|
||||
padding: 5px;
|
||||
width: 200px;
|
||||
text-align: left;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<table th:each="item, iterStat : ${list}" th:style="${iterStat.index == 0} ? 'page-break-before: auto;' : 'page-break-before: always;'">
|
||||
<tr>
|
||||
<td style="width: 150px;text-align: center;padding: 5px;">
|
||||
<img height="120" th:src="${item.qrCode}" width="120"/>
|
||||
<div th:text="${item.printNo}">20250227100950-0</div>
|
||||
</td>
|
||||
<td style="width: 200px;text-align: left;vertical-align: top">
|
||||
<div class="title div-with-border"><img alt="logo" height="20" src="../../img/logo2.png" style="margin-right: 5px;" /></div>
|
||||
<div class="div-with-border">SAP编码: <span th:text="${item.materialNo}"></span></div>
|
||||
<div class="div-with-border">名称: <span th:text="${item.materialDesc}"></span></div>
|
||||
<div class="div-with-border">数量: <span th:text="${item.printNum}"></span></div>
|
||||
<div style="padding: 5px;">批次号: <span th:text="${item.batchNo}"></span></div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,79 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">
|
||||
<head>
|
||||
<meta charset="UTF-8"/>
|
||||
<title>普通物料标签</title>
|
||||
<meta content="width=device-width, initial-scale=1.0" name="viewport"/>
|
||||
<style>
|
||||
body {
|
||||
font-size: 9px;
|
||||
font-family: SimSun, Arial, sans-serif;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
.container {
|
||||
width: 100%;
|
||||
overflow: hidden; /* 清除浮动 */
|
||||
}
|
||||
|
||||
.item {
|
||||
float: left;
|
||||
width: 23%;
|
||||
box-sizing: border-box;
|
||||
margin: 5px;
|
||||
page-break-inside: avoid;
|
||||
}
|
||||
|
||||
/* 清除浮动 */
|
||||
.container::after {
|
||||
content: "";
|
||||
display: table;
|
||||
clear: both;
|
||||
}
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
table, th, td {
|
||||
border: 1px solid #333;
|
||||
}
|
||||
|
||||
th, td {
|
||||
padding: 5px;
|
||||
text-align: left;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div style="width: 100%">
|
||||
<div style="text-align: center">
|
||||
<img alt="" src="../../img/logo1.png" style="width: 300px;" />
|
||||
</div>
|
||||
<div class="container">
|
||||
<div class="item" th:each="item : ${list}">
|
||||
<table>
|
||||
<tr>
|
||||
<td style="text-align: center;padding: 5px;">
|
||||
<img alt="" style="height: 100px;" th:src="${item.qrCode}"/>
|
||||
<div th:text="${item.printNo}">20250227100950-0</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><span>SAP编码: <span style="display: inline;" th:text="${item.materialNo}"></span></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><span>名称: <span style="display: inline;" th:text="${item.materialDesc}"></span></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><span>数量: <span style="display: inline;" th:text="${item.printNum}"></span></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><span>批次号: <span style="display: inline;" th:text="${item.batchNo}"></span></span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Binary file not shown.
|
|
@ -0,0 +1,20 @@
|
|||
package com.nflg.wms.common.pojo.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.nflg.wms.common.pojo.qo.BarcodePrintingAddQO;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
import org.ttzero.excel.annotation.ExcelColumn;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Data
|
||||
public class BarcodePrintingAddDTO extends BarcodePrintingAddQO {
|
||||
/**
|
||||
* 错误信息
|
||||
*/
|
||||
@JsonIgnore
|
||||
@ExcelColumn("错误信息")
|
||||
private String error;
|
||||
}
|
||||
|
|
@ -0,0 +1,59 @@
|
|||
package com.nflg.wms.common.pojo.qo;
|
||||
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
import org.ttzero.excel.annotation.ExcelColumn;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Data
|
||||
public class BarcodePrintingAddQO {
|
||||
|
||||
/**
|
||||
* 物料编号
|
||||
*/
|
||||
@NotBlank
|
||||
@ExcelColumn("物料编号(*)")
|
||||
private String materialNo;
|
||||
|
||||
/**
|
||||
* 物料描述
|
||||
*/
|
||||
@NotBlank
|
||||
@ExcelColumn("物料描述(*)")
|
||||
private String materialDes;
|
||||
|
||||
/**
|
||||
* 单位
|
||||
*/
|
||||
@NotBlank
|
||||
@ExcelColumn("单位(*)")
|
||||
private String unit;
|
||||
|
||||
/**
|
||||
* 数量
|
||||
*/
|
||||
@NotNull
|
||||
@ExcelColumn("数量(*)")
|
||||
private BigDecimal qty;
|
||||
|
||||
/**
|
||||
* 批次号
|
||||
*/
|
||||
@ExcelColumn("批次号")
|
||||
private String batchNumber;
|
||||
|
||||
/**
|
||||
* 序列号,多个使用,号隔开
|
||||
*/
|
||||
@ExcelColumn("序列号")
|
||||
private String serialNumbers;
|
||||
|
||||
/**
|
||||
* 最小包装量
|
||||
*/
|
||||
@NotNull
|
||||
@ExcelColumn("最小包装量(*)")
|
||||
private BigDecimal packingNum;
|
||||
}
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
package com.nflg.wms.common.pojo.qo;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class BarcodePrintingEditQO {
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 物料编号
|
||||
*/
|
||||
private String materialNo;
|
||||
|
||||
/**
|
||||
* 物料描述
|
||||
*/
|
||||
private String materialDes;
|
||||
|
||||
/**
|
||||
* 单位
|
||||
*/
|
||||
private String unit;
|
||||
|
||||
/**
|
||||
* 数量
|
||||
*/
|
||||
private BigDecimal qty;
|
||||
|
||||
/**
|
||||
* 批次号
|
||||
*/
|
||||
private String batchNumber;
|
||||
|
||||
/**
|
||||
* 序列号,多个使用,号隔开
|
||||
*/
|
||||
private String serialNumbers;
|
||||
|
||||
/**
|
||||
* 最小包装量
|
||||
*/
|
||||
private BigDecimal packingNum;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
package com.nflg.wms.common.pojo.qo;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class BarcodePrintingIdsQO {
|
||||
private List<Long> ids;
|
||||
}
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
package com.nflg.wms.common.pojo.qo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class BarcodePrintingQO extends SearchBaseQO {
|
||||
/**
|
||||
* 物料编号,多个用逗号隔开
|
||||
*/
|
||||
private String materialNos;
|
||||
|
||||
/**
|
||||
* 物料描述
|
||||
*/
|
||||
private String materialDes;
|
||||
|
||||
/**
|
||||
* 批次号 多个用逗号隔开
|
||||
*/
|
||||
private String batchNumbers;
|
||||
|
||||
/**
|
||||
* 序列号,单个输入
|
||||
*/
|
||||
private String serialNumber;
|
||||
}
|
||||
|
|
@ -18,7 +18,6 @@ public class InProduceOrderReceiveMaterialQO {
|
|||
/**
|
||||
* 储位编号列表
|
||||
*/
|
||||
@NotBlank
|
||||
private String binNos;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -0,0 +1,12 @@
|
|||
package com.nflg.wms.common.pojo.qo;
|
||||
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class NormalReceiveQO {
|
||||
@NotNull
|
||||
private Long id;
|
||||
}
|
||||
|
|
@ -10,3 +10,4 @@ public class ReceiveQO {
|
|||
@NotNull
|
||||
private List<Long> ids;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,68 @@
|
|||
package com.nflg.wms.common.pojo.vo;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class BarcodePrintingVO {
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 物料编号
|
||||
*/
|
||||
private String materialNo;
|
||||
|
||||
/**
|
||||
* 物料描述
|
||||
*/
|
||||
private String materialDes;
|
||||
|
||||
/**
|
||||
* 单位
|
||||
*/
|
||||
private String unit;
|
||||
|
||||
/**
|
||||
* 数量
|
||||
*/
|
||||
private BigDecimal qty;
|
||||
|
||||
/**
|
||||
* 批次号
|
||||
*/
|
||||
private String batchNumber;
|
||||
|
||||
/**
|
||||
* 序列号,多个使用,号隔开
|
||||
*/
|
||||
private String serialNumbers;
|
||||
|
||||
/**
|
||||
* 最小包装量
|
||||
*/
|
||||
private BigDecimal packingNum;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
private String createBy;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 最后更新人
|
||||
*/
|
||||
private String updateBy;
|
||||
|
||||
/**
|
||||
* 最后更新时间
|
||||
*/
|
||||
private LocalDateTime updateTime;
|
||||
}
|
||||
|
|
@ -0,0 +1,92 @@
|
|||
package com.nflg.wms.repository.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
*
|
||||
* </p>
|
||||
*
|
||||
* @author 代码生成器生成
|
||||
* @since 2025
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@ToString
|
||||
@Accessors(chain = true)
|
||||
@TableName("wms_inventory_barcode_printing")
|
||||
public class WmsInventoryBarcodePrinting implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 序号
|
||||
*/
|
||||
@TableId(value = "id", type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 物料编号
|
||||
*/
|
||||
private String materialNo;
|
||||
|
||||
/**
|
||||
* 物料描述
|
||||
*/
|
||||
private String materialDes;
|
||||
|
||||
/**
|
||||
* 单位
|
||||
*/
|
||||
private String unit;
|
||||
|
||||
/**
|
||||
* 数量
|
||||
*/
|
||||
private BigDecimal qty;
|
||||
|
||||
/**
|
||||
* 批次号
|
||||
*/
|
||||
private String batchNumber;
|
||||
|
||||
/**
|
||||
* 序列号,多个使用,号隔开
|
||||
*/
|
||||
private String serialNumbers;
|
||||
|
||||
/**
|
||||
* 最小包装量
|
||||
*/
|
||||
private BigDecimal packingNum;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
private String createBy;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 最后更新人
|
||||
*/
|
||||
private String updateBy;
|
||||
|
||||
/**
|
||||
* 最后更新时间
|
||||
*/
|
||||
private LocalDateTime updateTime;
|
||||
}
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
package com.nflg.wms.repository.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.nflg.wms.common.pojo.qo.BarcodePrintingQO;
|
||||
import com.nflg.wms.common.pojo.qo.SRMOrderSearchQO;
|
||||
import com.nflg.wms.common.pojo.vo.BarcodePrintingVO;
|
||||
import com.nflg.wms.common.pojo.vo.SrmOrderVO;
|
||||
import com.nflg.wms.repository.entity.WmsInventoryBarcodePrinting;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author 代码生成器生成
|
||||
* @since 2025
|
||||
*/
|
||||
public interface WmsInventoryBarcodePrintingMapper extends BaseMapper<WmsInventoryBarcodePrinting> {
|
||||
IPage<BarcodePrintingVO> search(BarcodePrintingQO request, Page<?> objectPage);
|
||||
}
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
package com.nflg.wms.repository.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.nflg.wms.common.pojo.qo.BarcodePrintingQO;
|
||||
import com.nflg.wms.common.pojo.vo.BarcodePrintingVO;
|
||||
import com.nflg.wms.repository.entity.WmsInventoryBarcodePrinting;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import jakarta.validation.Valid;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author 代码生成器生成
|
||||
* @since 2025
|
||||
*/
|
||||
public interface IWmsInventoryBarcodePrintingService extends IService<WmsInventoryBarcodePrinting> {
|
||||
|
||||
IPage<BarcodePrintingVO> search(@Valid BarcodePrintingQO request);
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
package com.nflg.wms.repository.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.nflg.wms.common.pojo.qo.BarcodePrintingQO;
|
||||
import com.nflg.wms.common.pojo.vo.BarcodePrintingVO;
|
||||
import com.nflg.wms.repository.entity.WmsInventoryBarcodePrinting;
|
||||
import com.nflg.wms.repository.mapper.WmsInventoryBarcodePrintingMapper;
|
||||
import com.nflg.wms.repository.service.IWmsInventoryBarcodePrintingService;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author 代码生成器生成
|
||||
* @since 2025
|
||||
*/
|
||||
@Service
|
||||
public class WmsInventoryBarcodePrintingServiceImpl extends ServiceImpl<WmsInventoryBarcodePrintingMapper, WmsInventoryBarcodePrinting> implements IWmsInventoryBarcodePrintingService {
|
||||
|
||||
@Override
|
||||
public IPage<BarcodePrintingVO> search(BarcodePrintingQO request) {
|
||||
return baseMapper.search(request, new Page<>(request.getPage(), request.getPageSize()));
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
<?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="com.nflg.wms.repository.mapper.WmsInventoryBarcodePrintingMapper">
|
||||
|
||||
<select id="search" resultType="com.nflg.wms.common.pojo.vo.BarcodePrintingVO">
|
||||
SELECT
|
||||
id,
|
||||
material_no,
|
||||
material_des,
|
||||
unit,
|
||||
qty,
|
||||
batch_number,
|
||||
serial_numbers,
|
||||
packing_num,
|
||||
create_by,
|
||||
create_time,
|
||||
update_by,
|
||||
update_time
|
||||
FROM
|
||||
wms_inventory_barcode_printing
|
||||
<where>
|
||||
<if test="request != null and request.materialNos != null and request.materialNos != ''">
|
||||
AND material_no IN
|
||||
<foreach item="materialNo" index="index" collection="request.materialNos.split(',')"
|
||||
open="(" separator="," close=")">
|
||||
#{materialNo}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="request != null and request.batchNumbers != null and request.batchNumbers != ''">
|
||||
AND batch_number IN
|
||||
<foreach item="batchNo" index="index" collection="request.batchNumbers.split(',')"
|
||||
open="(" separator="," close=")">
|
||||
#{batchNo}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="request != null and request.serialNumber != null and request.serialNumber != ''">
|
||||
AND serial_numbers LIKE CONCAT('%', #{serialNumber}, '%')
|
||||
</if>
|
||||
<if test="request != null and request.materialDes != null and request.materialDes != ''">
|
||||
AND material_des LIKE CONCAT('%', #{request.materialDes}, '%')
|
||||
</if>
|
||||
<if test="request != null and request.startDate != null">
|
||||
AND create_time >= #{request.startDate}
|
||||
</if>
|
||||
<if test="request != null and request.endDate != null">
|
||||
AND create_time <= #{request.endDate}
|
||||
</if>
|
||||
</where>
|
||||
order by
|
||||
id desc
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
@ -33,7 +33,7 @@ public class CodeGeneratorTest {
|
|||
)
|
||||
.strategyConfig(builder -> {
|
||||
builder
|
||||
.addInclude("user_supplier") //只生成指定表
|
||||
.addInclude("wms_inventory_barcode_printing") //只生成指定表
|
||||
.entityBuilder().idType(IdType.ASSIGN_ID)
|
||||
.enableLombok()
|
||||
.enableChainModel()
|
||||
|
|
|
|||
Loading…
Reference in New Issue