WMS:库位增加层的搜索条件,权限修改
MES:打印托盘码功能;打印原材料条码功能(根据原材料条码模板),每个原材料条码只能打印一次,可以重新生成原材料条码
master
xs 5 months ago
parent 9450afa74c
commit f001200d1d

@ -152,21 +152,12 @@ public class MesBaseBarcodeInfo extends BaseEntity
@Excel(name = "物料名称")
private String materialName;
public String getMaterialCode() {
return materialCode;
}
private String materialSpec;
public void setMaterialCode(String materialCode) {
this.materialCode = materialCode;
}
private String bindFlag;//物料信息中的绑定标识
public String getMaterialName() {
return materialName;
}
private String checkStatus;//质检状态
public void setMaterialName(String materialName) {
this.materialName = materialName;
}
public String getPrintFlag() {
return printFlag;
@ -453,6 +444,46 @@ public class MesBaseBarcodeInfo extends BaseEntity
this.barcodeAmount = barcodeAmount;
}
public String getMaterialCode() {
return materialCode;
}
public void setMaterialCode(String materialCode) {
this.materialCode = materialCode;
}
public String getMaterialName() {
return materialName;
}
public void setMaterialName(String materialName) {
this.materialName = materialName;
}
public String getMaterialSpec() {
return materialSpec;
}
public void setMaterialSpec(String materialSpec) {
this.materialSpec = materialSpec;
}
public String getBindFlag() {
return bindFlag;
}
public void setBindFlag(String bindFlag) {
this.bindFlag = bindFlag;
}
public String getCheckStatus() {
return checkStatus;
}
public void setCheckStatus(String checkStatus) {
this.checkStatus = checkStatus;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)

@ -18,6 +18,10 @@
<dependencies>
<!-- RuoYi Common Core-->
<dependency>
<groupId>com.hw</groupId>
<artifactId>hw-common-core</artifactId>
</dependency>
<dependency>
<groupId>com.hw</groupId>
<artifactId>hw-api-mes</artifactId>

@ -9,6 +9,9 @@ import com.hw.printer.api.factory.RemotePrinterFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;
import java.util.HashMap;
import java.util.List;
@FeignClient(contextId = "remotePrinterService", value = ServiceNameConstants.PRINTER_SERVICE, fallbackFactory = RemotePrinterFallbackFactory.class)
public interface RemotePrinterService {
@ -16,23 +19,23 @@ public interface RemotePrinterService {
/**
*
*
* @param barcodeInfo
* @param printContents
* @param source
* @return
*/
@PostMapping("/printService/printBarCode")
public MesBaseBarcodeInfo printBarCode(@RequestBody MesBaseBarcodeInfo barcodeInfo, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
@PostMapping("/printService/printBarcodes")
public R<?> printBarcodes(@RequestBody List<List<PrintContentVo>> printContents, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
/**
*
*
* @param printContentVo
* @param params
* @param source
* @return
*/
@PostMapping("/printService/printLocationLabel")
public R<?> printLocationLabel(@RequestBody PrintContentVo printContentVo, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
public R<?> printLocationLabel(@RequestBody HashMap<String, String> params, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
}

@ -2,12 +2,29 @@ package com.hw.printer.api.domain.vo;
import lombok.Data;
import java.util.HashMap;
@Data
public class PrintContentVo {
private String templatePath;
public static final int TYPE_TEXT = 1;
public static final int TYPE_CHECKBOX = 2;
public static final int TYPE_QRCODE = 3;
public static final String RAW_MATERIAL_LABEL_KEY_MATERIAL_NAME = "materialName";
public static final String RAW_MATERIAL_LABEL_KEY_MATERIAL_CODE = "materialCode";
public static final String RAW_MATERIAL_LABEL_KEY_PO_NO = "poNo";
public static final String RAW_MATERIAL_LABEL_KEY_MATERIAL_SPEC = "materialSpec";
public static final String RAW_MATERIAL_LABEL_KEY_PRE_MATERIAL_YES = "preMaterialYes";
public static final String RAW_MATERIAL_LABEL_KEY_PRE_MATERIAL_NO = "preMaterialNo";
public static final String RAW_MATERIAL_LABEL_KEY_SALE_ORDER_CODE = "saleOrderCode";
public static final String RAW_MATERIAL_LABEL_KEY_QTY = "qty";
public static final String RAW_MATERIAL_LABEL_KEY_BATCH_CODE = "batchCode";
public static final String RAW_MATERIAL_LABEL_KEY_QC_RESULT_YES = "qcResultYes";
public static final String RAW_MATERIAL_LABEL_KEY_QC_RESULT_NO = "qcResultNo";
public static final String RAW_MATERIAL_LABEL_KEY_QRCODE = "qrcode";
private String key;
private String value;
private HashMap<String,String> params;
private int type;//1:text,2:checkbox,3:qrcode
}

@ -3,14 +3,17 @@ package com.hw.printer.api.factory;
import com.hw.common.core.domain.R;
import com.hw.common.core.exception.ServiceException;
import com.hw.printer.api.RemotePrinterService;
import com.hw.mes.api.domain.MesBaseBarcodeInfo;
import com.hw.printer.api.RemotePrinterService;
import com.hw.printer.api.domain.vo.PrintContentVo;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;
import java.util.HashMap;
import java.util.List;
/**
*
*
@ -25,12 +28,12 @@ public class RemotePrinterFallbackFactory implements FallbackFactory<RemotePrint
log.error("打印条码服务调用失败:{}", throwable.getMessage());
return new RemotePrinterService() {
@Override
public MesBaseBarcodeInfo printBarCode(MesBaseBarcodeInfo barcodeInfo, String source) {
public R<?> printBarcodes(List<List<PrintContentVo>> printContents, String source) {
throw new ServiceException("打印条码服务调用异常:" + throwable.getMessage());
}
@Override
public R<?> printLocationLabel(PrintContentVo printContentVo, String source) {
public R<?> printLocationLabel(HashMap<String, String> params, String source) {
throw new ServiceException("打印库位条码服务调用异常:" + throwable.getMessage());
}
};

@ -1 +1 @@
com.hw.mes.api.factory.RemoteMesFallbackFactory
com.hw.printer.api.factory.RemotePrinterFallbackFactory

@ -106,4 +106,9 @@ public class MesConstants {
/**物料信息绑定标识,是否需要采购订单明细绑定销售订单*/
public static final String MES_MATERIAL_BIND_FLAG_YES = "1";//是
/**物料条码打印标识*/
public static final String MES_BARCODE_PRINT_FLAG_YES = "1";//是
public static final String MES_BARCODE_PRINT_FLAG_NO = "0";//否
}

@ -106,7 +106,7 @@ public class Seq {
private static AtomicInteger mesBatchCodeSeq = new AtomicInteger(1);
// 生产批次代码标识
public static final String mesBatchCodeCode = "PC";
public static final String mesBatchCodeCode = "RP";
// 条码内容记录标识
public static final String mesBarcodeSeqType = "BAR_CODE";
@ -115,7 +115,7 @@ public class Seq {
private static AtomicInteger mesBarcodeSeq = new AtomicInteger(1);
// 条码内容标识
public static final String mesBarcodeCode = "TM";
public static final String mesBarcodeCode = "RB";
// 成品条码内容记录标识
public static final String mesCompBarcodeSeqType = "COMP_BAR_CODE";

@ -133,4 +133,9 @@ public enum BusinessType
*
*/
PRINT,
/**
*
*/
REGENERATE,
}

@ -116,10 +116,10 @@ public class MesBaseBarcodeInfoController extends BaseController
* @param barcodeIds
* @return
*/
@GetMapping(value = "/printBarCode/{barcodeIds}")
public AjaxResult printBarCode(@PathVariable Long[] barcodeIds)
@GetMapping(value = "/printBarcodes/{barcodeIds}")
public AjaxResult printBarcodes(@PathVariable Long[] barcodeIds)
{
return success(mesBaseBarcodeInfoService.printBarCode(barcodeIds));
return success(mesBaseBarcodeInfoService.printBarcodes(barcodeIds));
}
/**
@ -177,5 +177,16 @@ public class MesBaseBarcodeInfoController extends BaseController
/**
* ()
*/
@RequiresPermissions("mes:barcode:regenerate")
@Log(title = "条码信息", businessType = BusinessType.REGENERATE)
@PostMapping(value="/regenerateBarcode")
public AjaxResult regenerateBarcode(@RequestBody MesBaseBarcodeInfo mesBaseBarcodeInfo)
{
return toAjax(mesBaseBarcodeInfoService.regenerateBarcode(mesBaseBarcodeInfo));
}
}

@ -106,4 +106,19 @@ public class MesBasePalletInfoController extends BaseController
{
return toAjax(mesBasePalletInfoService.deleteMesBasePalletInfoByPalletInfoIds(palletInfoIds));
}
/**
* RFID
*
* @param palletInfoCodes
* @return
*/
@RequiresPermissions("mes:basePalletInfo:printPalletInfoCodes")
@Log(title = "托盘信息", businessType = BusinessType.PRINT)
@GetMapping(value = "/printPalletInfoCodes/{palletInfoCodes}")
public AjaxResult printPalletInfoCodes(@PathVariable String[] palletInfoCodes) {
return success(mesBasePalletInfoService.printPalletInfoCodes(palletInfoCodes));
}
}

@ -0,0 +1,67 @@
package com.hw.mes.domain;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.hw.common.core.annotation.Excel;
import com.hw.common.core.web.domain.BaseEntity;
/**
* mes_base_abandon_barcode
*
* @author xins
* @date 2024-06-21
*/
public class MesBaseAbandonBarcode extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 主键标识 */
private Long anandonBarcodeId;
/** 物料条码ID */
@Excel(name = "物料条码ID")
private Long barcodeId;
/** 废弃条码信息 */
@Excel(name = "废弃条码信息")
private String abandonBarcode;
public void setAnandonBarcodeId(Long anandonBarcodeId)
{
this.anandonBarcodeId = anandonBarcodeId;
}
public Long getAnandonBarcodeId()
{
return anandonBarcodeId;
}
public void setBarcodeId(Long barcodeId)
{
this.barcodeId = barcodeId;
}
public Long getBarcodeId()
{
return barcodeId;
}
public void setAbandonBarcode(String abandonBarcode)
{
this.abandonBarcode = abandonBarcode;
}
public String getAbandonBarcode()
{
return abandonBarcode;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("anandonBarcodeId", getAnandonBarcodeId())
.append("barcodeId", getBarcodeId())
.append("abandonBarcode", getAbandonBarcode())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.toString();
}
}

@ -98,11 +98,16 @@ public class MesProductPlan extends BaseEntity
@Excel(name = "单位生产时间(单位s)")
private Long productionTime;
/** 计划数量 */
/** 派工数量 */
@Excel(name = "派工数量")
private BigDecimal dispatchAmount;
/** 使
* dispatch_amount */
@Excel(name = "计划数量")
private BigDecimal planAmount;
/** 完成数量 */
/** 完成数量 四楼激光切割是实际完成的图纸数量,其他工序完成的是计划数量*/
@Excel(name = "完成数量")
private BigDecimal completeAmount;
@ -349,6 +354,15 @@ public class MesProductPlan extends BaseEntity
{
return productionTime;
}
public BigDecimal getDispatchAmount() {
return dispatchAmount;
}
public void setDispatchAmount(BigDecimal dispatchAmount) {
this.dispatchAmount = dispatchAmount;
}
public void setPlanAmount(BigDecimal planAmount)
{
this.planAmount = planAmount;

@ -0,0 +1,61 @@
package com.hw.mes.mapper;
import java.util.List;
import com.hw.mes.domain.MesBaseAbandonBarcode;
/**
* Mapper
*
* @author xins
* @date 2024-06-21
*/
public interface MesBaseAbandonBarcodeMapper
{
/**
*
*
* @param anandonBarcodeId
* @return
*/
public MesBaseAbandonBarcode selectMesBaseAbandonBarcodeByAnandonBarcodeId(Long anandonBarcodeId);
/**
*
*
* @param mesBaseAbandonBarcode
* @return
*/
public List<MesBaseAbandonBarcode> selectMesBaseAbandonBarcodeList(MesBaseAbandonBarcode mesBaseAbandonBarcode);
/**
*
*
* @param mesBaseAbandonBarcode
* @return
*/
public int insertMesBaseAbandonBarcode(MesBaseAbandonBarcode mesBaseAbandonBarcode);
/**
*
*
* @param mesBaseAbandonBarcode
* @return
*/
public int updateMesBaseAbandonBarcode(MesBaseAbandonBarcode mesBaseAbandonBarcode);
/**
*
*
* @param anandonBarcodeId
* @return
*/
public int deleteMesBaseAbandonBarcodeByAnandonBarcodeId(Long anandonBarcodeId);
/**
*
*
* @param anandonBarcodeIds
* @return
*/
public int deleteMesBaseAbandonBarcodeByAnandonBarcodeIds(Long[] anandonBarcodeIds);
}

@ -89,4 +89,15 @@ public interface MesBaseBarcodeInfoMapper
public int selectMesBaseBarcodeInfoCount(MesBaseBarcodeInfo mesBaseBarcodeInfo);
/**
* join materialqms_check_result
*
* @param barcodeId
* @return
*/
public MesBaseBarcodeInfo selectMesBaseBarcodeInfoJoinByBarcodeId(Long barcodeId);
}

@ -76,7 +76,7 @@ public interface IMesBaseBarcodeInfoService
* @param barcodeIds
* @return
*/
public int printBarCode(Long[] barcodeIds);
public int printBarcodes(Long[] barcodeIds);
/**
* ()
@ -113,4 +113,12 @@ public interface IMesBaseBarcodeInfoService
* @return
*/
public int insertInternalMesBaseBarcode(MesBaseBarcodeInfo mesBaseBarcodeInfo);
/**
*
* @param mesBaseBarcodeInfo
* @return
*/
public int regenerateBarcode(MesBaseBarcodeInfo mesBaseBarcodeInfo);
}

@ -68,4 +68,14 @@ public interface IMesBasePalletInfoService
* @return
*/
public int bindPalletInfo(MesPalletInfoBindVo mesPalletInfoBindVo);
/**
* RFID
*
* @param palletInfoCodes
* @return
*/
public int printPalletInfoCodes(String[] palletInfoCodes);
}

@ -1,10 +1,13 @@
package com.hw.mes.service.impl;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import com.hw.common.core.constant.Constants;
import com.hw.common.core.constant.MesConstants;
import com.hw.common.core.constant.QmsConstants;
import com.hw.common.core.constant.SecurityConstants;
import com.hw.common.core.domain.R;
import com.hw.common.core.exception.ServiceException;
@ -14,18 +17,22 @@ import com.hw.common.core.utils.uuid.Seq;
import com.hw.common.security.utils.SecurityUtils;
import com.hw.mes.api.domain.MesBaseBarcodeInfo;
import com.hw.mes.api.domain.MesBaseMaterialInfo;
import com.hw.mes.domain.MesBaseAbandonBarcode;
import com.hw.mes.domain.MesBasePalletInfo;
import com.hw.mes.domain.MesOrderBind;
import com.hw.mes.domain.MesProductOrder;
import com.hw.mes.domain.vo.MesBindBarcodeVo;
import com.hw.mes.mapper.*;
import com.hw.mes.service.IMesOrderBindService;
import java.text.DecimalFormat;
import com.hw.printer.api.RemotePrinterService;
import com.hw.printer.api.domain.vo.PrintContentVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.hw.mes.service.IMesBaseBarcodeInfoService;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
/**
* Service
*
@ -37,7 +44,7 @@ public class MesBaseBarcodeInfoServiceImpl implements IMesBaseBarcodeInfoService
@Autowired
private MesBaseBarcodeInfoMapper mesBaseBarcodeInfoMapper;
@Autowired
@Resource
private RemotePrinterService remotePrinterService;
@Autowired
@ -52,6 +59,9 @@ public class MesBaseBarcodeInfoServiceImpl implements IMesBaseBarcodeInfoService
@Autowired
private MesBaseMaterialInfoMapper mesBaseMaterialInfoMapper;
@Autowired
private MesBaseAbandonBarcodeMapper mesBaseAbandonBarcodeMapper;
/**
*
*
@ -255,32 +265,116 @@ public class MesBaseBarcodeInfoServiceImpl implements IMesBaseBarcodeInfoService
* @return
*/
@Override
public int printBarCode(Long[] barcodeIds) {
StringBuilder buffer = new StringBuilder();
@Transactional(rollbackFor = Exception.class)
public int printBarcodes(Long[] barcodeIds) {
//获取条码List
List<List<PrintContentVo>> printContents = new ArrayList<>();
List<MesBaseBarcodeInfo> toUpdatedBaseBarcodeInfos = new ArrayList<>();
for (Long barcodeId : barcodeIds) {
MesBaseBarcodeInfo mesBaseBarcodeInfo = mesBaseBarcodeInfoMapper.selectMesBaseBarcodeInfoByBarcodeId(barcodeId);
try {
//调用的打印接口
MesBaseBarcodeInfo barCodeInfo = remotePrinterService.printBarCode(mesBaseBarcodeInfo, SecurityConstants.INNER);
MesBaseBarcodeInfo baseBarcodeInfo = new MesBaseBarcodeInfo();
baseBarcodeInfo.setBarcodeId(barcodeId);
baseBarcodeInfo.setMachineName(barCodeInfo.getMachineName());
baseBarcodeInfo.setPrintTime(DateUtils.getNowDate());
baseBarcodeInfo.setPrintPerson(SecurityUtils.getUsername());
baseBarcodeInfo.setPrintFlag("1");
baseBarcodeInfo.setPrintNumber(StringUtils.isNull(baseBarcodeInfo.getPrintNumber()) ? 1 : baseBarcodeInfo.getPrintNumber() + 1);
baseBarcodeInfo.setAcceptedDate(DateUtils.getNowDate());
this.updateMesBaseBarcodeInfo(baseBarcodeInfo);
} catch (Exception e) {
buffer.append("打印条码报错——条码内容:").append(mesBaseBarcodeInfo.getBarcodeInfo()).append(e.getMessage());
MesBaseBarcodeInfo mesBaseBarcodeInfo = mesBaseBarcodeInfoMapper.selectMesBaseBarcodeInfoJoinByBarcodeId(barcodeId);
String printFlag = mesBaseBarcodeInfo.getPrintFlag();
if (printFlag.equals(MesConstants.MES_BARCODE_PRINT_FLAG_YES)) {
throw new ServiceException("此物料条码[" + mesBaseBarcodeInfo.getBarcodeInfo() + "]已经打印过,不能重复打印");
}
List<PrintContentVo> printContentVos = new ArrayList<>();
PrintContentVo printMaterialName = new PrintContentVo();
printMaterialName.setKey(PrintContentVo.RAW_MATERIAL_LABEL_KEY_MATERIAL_NAME);
printMaterialName.setValue(mesBaseBarcodeInfo.getMaterialName());
printMaterialName.setType(PrintContentVo.TYPE_TEXT);
PrintContentVo printMaterialCode = new PrintContentVo();
printMaterialCode.setKey(PrintContentVo.RAW_MATERIAL_LABEL_KEY_MATERIAL_CODE);
printMaterialCode.setValue(mesBaseBarcodeInfo.getMaterialCode());
printMaterialCode.setType(PrintContentVo.TYPE_TEXT);
PrintContentVo printPoNo = new PrintContentVo();
printPoNo.setKey(PrintContentVo.RAW_MATERIAL_LABEL_KEY_PO_NO);
printPoNo.setValue(mesBaseBarcodeInfo.getPoNo());
printPoNo.setType(PrintContentVo.TYPE_TEXT);
PrintContentVo printPreMaterial = new PrintContentVo();
// if (mesBaseBarcodeInfo.getBindFlag() == null) {
//
// }
String printPreMaterialKey = mesBaseBarcodeInfo.getBindFlag() != null && mesBaseBarcodeInfo.getBindFlag().equals(MesConstants.MES_MATERIAL_BIND_FLAG_YES)
? PrintContentVo.RAW_MATERIAL_LABEL_KEY_PRE_MATERIAL_YES : PrintContentVo.RAW_MATERIAL_LABEL_KEY_PRE_MATERIAL_NO;
printPreMaterial.setKey(printPreMaterialKey);
printPreMaterial.setType(PrintContentVo.TYPE_CHECKBOX);
PrintContentVo printMaterialSpec = new PrintContentVo();
printMaterialSpec.setKey(PrintContentVo.RAW_MATERIAL_LABEL_KEY_MATERIAL_SPEC);
printMaterialSpec.setValue(mesBaseBarcodeInfo.getMaterialSpec());
printMaterialSpec.setType(PrintContentVo.TYPE_TEXT);
PrintContentVo printSaleOrderCode = new PrintContentVo();
printSaleOrderCode.setKey(PrintContentVo.RAW_MATERIAL_LABEL_KEY_SALE_ORDER_CODE);
printSaleOrderCode.setValue(mesBaseBarcodeInfo.getSaleorderCode());
printSaleOrderCode.setType(PrintContentVo.TYPE_TEXT);
PrintContentVo printQty = new PrintContentVo();
printQty.setKey(PrintContentVo.RAW_MATERIAL_LABEL_KEY_QTY);
DecimalFormat df = new DecimalFormat("#.##");
String formattedNumber = df.format(mesBaseBarcodeInfo.getAmount());
printQty.setValue(formattedNumber);
printQty.setType(PrintContentVo.TYPE_TEXT);
PrintContentVo printBatchCode = new PrintContentVo();
printBatchCode.setKey(PrintContentVo.RAW_MATERIAL_LABEL_KEY_BATCH_CODE);
printBatchCode.setValue(mesBaseBarcodeInfo.getBatchCode());
printBatchCode.setType(PrintContentVo.TYPE_TEXT);
PrintContentVo printBarCode = new PrintContentVo();
printBarCode.setKey(PrintContentVo.RAW_MATERIAL_LABEL_KEY_QRCODE);
printBarCode.setValue(mesBaseBarcodeInfo.getBarcodeInfo());
printBarCode.setType(PrintContentVo.TYPE_QRCODE);
printContentVos.add(printMaterialName);
printContentVos.add(printMaterialCode);
printContentVos.add(printPoNo);
printContentVos.add(printPreMaterial);
printContentVos.add(printMaterialSpec);
printContentVos.add(printSaleOrderCode);
printContentVos.add(printQty);
printContentVos.add(printBatchCode);
printContentVos.add(printBarCode);
String checkStatus = mesBaseBarcodeInfo.getCheckStatus() == null ? "" : mesBaseBarcodeInfo.getCheckStatus();
if (checkStatus.equals(QmsConstants.QMS_CHECK_RESULT_CHECK_STATUS_PASS)) {
PrintContentVo printQcResult = new PrintContentVo();
printQcResult.setKey(PrintContentVo.RAW_MATERIAL_LABEL_KEY_QC_RESULT_YES);
printQcResult.setType(PrintContentVo.TYPE_CHECKBOX);
printContentVos.add(printQcResult);
} else if (checkStatus.equals(QmsConstants.QMS_CHECK_RESULT_CHECK_STATUS_FAIL)) {
PrintContentVo printQcResult = new PrintContentVo();
printQcResult.setKey(PrintContentVo.RAW_MATERIAL_LABEL_KEY_QC_RESULT_NO);
printQcResult.setType(PrintContentVo.TYPE_CHECKBOX);
printContentVos.add(printQcResult);
}
printContents.add(printContentVos);
toUpdatedBaseBarcodeInfos.add(mesBaseBarcodeInfo);
}
if (buffer.length() == 0) {
return 1;
} else {
throw new ServiceException(buffer.toString());
for (MesBaseBarcodeInfo toUpdateMesBaseBarcodeInfo : toUpdatedBaseBarcodeInfos) {
toUpdateMesBaseBarcodeInfo.setPrintTime(DateUtils.getNowDate());
toUpdateMesBaseBarcodeInfo.setPrintPerson(SecurityUtils.getUsername());
toUpdateMesBaseBarcodeInfo.setPrintFlag(MesConstants.MES_BARCODE_PRINT_FLAG_YES);
toUpdateMesBaseBarcodeInfo.setPrintNumber(1L);
toUpdateMesBaseBarcodeInfo.setAcceptedDate(DateUtils.getNowDate());
this.updateMesBaseBarcodeInfo(toUpdateMesBaseBarcodeInfo);
}
//调用的打印接口
R<?> printResultR = remotePrinterService.printBarcodes(printContents, SecurityConstants.INNER);
if (printResultR.getCode() != Constants.SUCCESS) {//抛出异常,回滚事务
throw new RuntimeException(printResultR.getMsg());
}
return toUpdatedBaseBarcodeInfos.size();
}
@ -434,4 +528,36 @@ public class MesBaseBarcodeInfoServiceImpl implements IMesBaseBarcodeInfoService
return mesBaseBarcodeInfoMapper.insertMesBaseBarcodeInfo(mesBaseBarcodeInfo);
}
/**
*
* @param mesBaseBarcodeInfo
* @return
*/
@Transactional(rollbackFor = Exception.class)
@Override
public int regenerateBarcode(MesBaseBarcodeInfo mesBaseBarcodeInfo) {
String oldBarcode = mesBaseBarcodeInfo.getBarcodeInfo();
String newBarcode = Seq.getId(Seq.mesBarcodeSeqType, Seq.mesBarcodeCode);
String userName = SecurityUtils.getUsername();
Date currentDate = new Date();
MesBaseAbandonBarcode mesBaseAbandonBarcode = new MesBaseAbandonBarcode();
mesBaseAbandonBarcode.setBarcodeId(mesBaseBarcodeInfo.getBarcodeId());
mesBaseAbandonBarcode.setAbandonBarcode(oldBarcode);
mesBaseAbandonBarcode.setUpdateBy(userName);
mesBaseAbandonBarcode.setUpdateTime(currentDate);
mesBaseAbandonBarcodeMapper.insertMesBaseAbandonBarcode(mesBaseAbandonBarcode);
mesBaseBarcodeInfo.setBarcodeInfo(newBarcode);
mesBaseBarcodeInfo.setPrintFlag(MesConstants.MES_BARCODE_PRINT_FLAG_NO);
mesBaseBarcodeInfo.setPrintNumber(0L);
mesBaseBarcodeInfo.setUpdateBy(userName);
mesBaseBarcodeInfo.setUpdateTime(currentDate);
return mesBaseBarcodeInfoMapper.updateMesBaseBarcodeInfo(mesBaseBarcodeInfo);
}
}

@ -1,14 +1,19 @@
package com.hw.mes.service.impl;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import com.hw.common.core.constant.SecurityConstants;
import com.hw.common.core.exception.ServiceException;
import com.hw.common.core.utils.DateUtils;
import com.hw.common.core.utils.StringUtils;
import com.hw.common.security.utils.SecurityUtils;
import com.hw.mes.api.domain.MesBaseBarcodeInfo;
import com.hw.mes.domain.vo.MesPalletInfoBindVo;
import com.hw.mes.mapper.MesBaseBarcodeInfoMapper;
import com.hw.printer.api.RemotePrinterService;
import com.hw.printer.api.domain.vo.PrintContentVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.hw.mes.mapper.MesBasePalletInfoMapper;
@ -16,6 +21,8 @@ import com.hw.mes.domain.MesBasePalletInfo;
import com.hw.mes.service.IMesBasePalletInfoService;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
/**
* Service
*
@ -30,6 +37,9 @@ public class MesBasePalletInfoServiceImpl implements IMesBasePalletInfoService {
@Autowired
private MesBaseBarcodeInfoMapper mesBaseBarcodeInfoMapper;
@Resource
private RemotePrinterService remotePrinterService;
/**
*
*
@ -138,4 +148,36 @@ public class MesBasePalletInfoServiceImpl implements IMesBasePalletInfoService {
return mesBasePalletInfoMapper.updateMesBasePalletInfo(mesBasePalletInfo);
}
/**
* RFID
*
* @param palletInfoCodes
* @return
*/
@Override
public int printPalletInfoCodes(String[] palletInfoCodes) {
StringBuilder buffer = new StringBuilder();
for (String palletInfoCode : palletInfoCodes) {
if (StringUtils.isNotEmpty(palletInfoCode)) {
try {
HashMap<String, String> params = new HashMap<>();
params.put("text", palletInfoCode);
params.put("qrCode", palletInfoCode);
//调用的打印接口
remotePrinterService.printLocationLabel(params, SecurityConstants.INNER);
} catch (Exception e) {
buffer.append("打印托盘RFID编码报错——[编码内容:").append(palletInfoCode).append("]").append(e.getMessage());
}
}
}
if (buffer.length() == 0) {
return 1;
} else {
throw new ServiceException(buffer.toString());
}
}
}

@ -93,10 +93,18 @@ public class MesProductPlanServiceImpl implements IMesProductPlanService {
* @param mesProductPlan
* @return
*/
@Transactional
@Transactional(rollbackFor = Exception.class)
@Override
public int insertMesProductPlan(MesProductPlan mesProductPlan) {
if (mesProductPlan.getPlanAmount().compareTo(BigDecimal.ZERO) > 0) {
if (mesProductPlan.getDispatchAmount().compareTo(BigDecimal.ZERO) > 0) {
if (mesProductPlan.getProcessId().equals(42L)) {//折弯工序,计划数量可以跟派工数量不相同
if (mesProductPlan.getPlanAmount() == null) {
throw new ServiceException("四楼折弯工序请输入计划数量");
}
} else {//非折弯工序,计划数量需与派工数量相同
mesProductPlan.setPlanAmount(mesProductPlan.getDispatchAmount());
}
mesProductPlan.setCreateBy(SecurityUtils.getUsername());
mesProductPlan.setCreateTime(DateUtils.getNowDate());
mesProductPlan.setPlanCode(Seq.getId(Seq.planCodeSeqType, Seq.planCodeCode));
@ -192,6 +200,7 @@ public class MesProductPlanServiceImpl implements IMesProductPlanService {
* @return
*/
@Override
@Transactional(rollbackFor = Exception.class)
public int orderAddMesProductPlanList(List<MesProductPlan> mesProductPlanList) {
for (MesProductPlan mesProductPlan : mesProductPlanList) {
this.insertMesProductPlan(mesProductPlan);

@ -0,0 +1,69 @@
<?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.hw.mes.mapper.MesBaseAbandonBarcodeMapper">
<resultMap type="MesBaseAbandonBarcode" id="MesBaseAbandonBarcodeResult">
<result property="anandonBarcodeId" column="anandon_barcode_id" />
<result property="barcodeId" column="barcode_id" />
<result property="abandonBarcode" column="abandon_barcode" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
</resultMap>
<sql id="selectMesBaseAbandonBarcodeVo">
select anandon_barcode_id, barcode_id, abandon_barcode, update_by, update_time from mes_base_abandon_barcode
</sql>
<select id="selectMesBaseAbandonBarcodeList" parameterType="MesBaseAbandonBarcode" resultMap="MesBaseAbandonBarcodeResult">
<include refid="selectMesBaseAbandonBarcodeVo"/>
<where>
<if test="barcodeId != null "> and barcode_id = #{barcodeId}</if>
<if test="abandonBarcode != null and abandonBarcode != ''"> and abandon_barcode = #{abandonBarcode}</if>
</where>
</select>
<select id="selectMesBaseAbandonBarcodeByAnandonBarcodeId" parameterType="Long" resultMap="MesBaseAbandonBarcodeResult">
<include refid="selectMesBaseAbandonBarcodeVo"/>
where anandon_barcode_id = #{anandonBarcodeId}
</select>
<insert id="insertMesBaseAbandonBarcode" parameterType="MesBaseAbandonBarcode" useGeneratedKeys="true" keyProperty="anandonBarcodeId">
insert into mes_base_abandon_barcode
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="barcodeId != null">barcode_id,</if>
<if test="abandonBarcode != null and abandonBarcode != ''">abandon_barcode,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="barcodeId != null">#{barcodeId},</if>
<if test="abandonBarcode != null and abandonBarcode != ''">#{abandonBarcode},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
</trim>
</insert>
<update id="updateMesBaseAbandonBarcode" parameterType="MesBaseAbandonBarcode">
update mes_base_abandon_barcode
<trim prefix="SET" suffixOverrides=",">
<if test="barcodeId != null">barcode_id = #{barcodeId},</if>
<if test="abandonBarcode != null and abandonBarcode != ''">abandon_barcode = #{abandonBarcode},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
</trim>
where anandon_barcode_id = #{anandonBarcodeId}
</update>
<delete id="deleteMesBaseAbandonBarcodeByAnandonBarcodeId" parameterType="Long">
delete from mes_base_abandon_barcode where anandon_barcode_id = #{anandonBarcodeId}
</delete>
<delete id="deleteMesBaseAbandonBarcodeByAnandonBarcodeIds" parameterType="String">
delete from mes_base_abandon_barcode where anandon_barcode_id in
<foreach item="anandonBarcodeId" collection="array" open="(" separator="," close=")">
#{anandonBarcodeId}
</foreach>
</delete>
</mapper>

@ -41,6 +41,9 @@
<result property="updateTime" column="update_time"/>
<result property="materialCode" column="material_code"/>
<result property="materialName" column="material_name"/>
<result property="materialSpec" column="material_spec"/>
<result property="bindFlag" column="bind_flag"/>
<result property="checkStatus" column="checkStatus"/>
</resultMap>
<sql id="selectMesBaseBarcodeInfoVo">
@ -303,4 +306,46 @@
</select>
<select id="selectMesBaseBarcodeInfoJoinByBarcodeId" parameterType="Long" resultMap="MesBaseBarcodeInfoResult">
select bbi.barcode_id,
bbi.print_time,
bbi.print_person,
bbi.batch_flag,
bbi.barcode_type,
bbi.barcode_info,
bbi.batch_code,
bbi.pallet_info_code,
bbi.bind_barcode,
bbi.material_id,
bbi.manufacturer_id,
bbi.product_barcode,
bbi.amount,
bbi.machine_name,
bbi.print_number,
bbi.po_no,
bbi.production_date,
bbi.accepted_date,
bbi.last_outstock_date,
bbi.plan_code,
bbi.plan_detail_code,
bbi.safe_flag,
bbi.sale_order_id,
bbi.saleorder_code,
bbi.project_no,
bbi.print_flag,
bbi.bind_status,
bbi.bind_by,
bbi.bind_time,
bmi.material_code,
bmi.material_name,
bmi.material_spec,
bmi.bind_flag,
qcr.check_status
from mes_base_barcode_info bbi
left join mes_base_material_info bmi on bmi.material_id = bbi.material_id
left join qms_check_result qcr on bbi.batch_code = qcr.material_batch
where bbi.barcode_id = #{barcodeId}
</select>
</mapper>

@ -22,6 +22,7 @@
<result property="stationId" column="station_id"/>
<result property="userId" column="user_id"/>
<result property="productionTime" column="production_time"/>
<result property="dispatchAmount" column="dispatch_amount"/>
<result property="planAmount" column="plan_amount"/>
<result property="completeAmount" column="complete_amount"/>
<result property="planBeginTime" column="plan_begin_time"/>
@ -88,6 +89,7 @@
bsi.station_name,
mpp.user_id,
mpp.production_time,
mpp.dispatch_amount,
mpp.plan_amount,
mpp.complete_amount,
mpp.plan_begin_time,
@ -153,6 +155,7 @@
a.station_id,
a.user_id,
a.production_time,
a.dispatch_amount,
a.plan_amount,
a.complete_amount,
a.plan_begin_time,
@ -204,6 +207,7 @@
<if test="stationId != null">station_id,</if>
<if test="userId != null">user_id,</if>
<if test="productionTime != null">production_time,</if>
<if test="dispatchAmount != null">dispatch_amount,</if>
<if test="planAmount != null">plan_amount,</if>
<if test="completeAmount != null">complete_amount,</if>
<if test="planBeginTime != null">plan_begin_time,</if>
@ -234,6 +238,7 @@
<if test="stationId != null">#{stationId},</if>
<if test="userId != null">#{userId},</if>
<if test="productionTime != null">#{productionTime},</if>
<if test="dispatchAmount != null">#{dispatchAmount},</if>
<if test="planAmount != null">#{planAmount},</if>
<if test="completeAmount != null">#{completeAmount},</if>
<if test="planBeginTime != null">#{planBeginTime},</if>
@ -266,6 +271,7 @@
<if test="stationId != null">station_id = #{stationId},</if>
<if test="userId != null">user_id = #{userId},</if>
<if test="productionTime != null">production_time = #{productionTime},</if>
<if test="dispatchAmount != null">dispatch_amount = #{dispatchAmount},</if>
<if test="planAmount != null">plan_amount = #{planAmount},</if>
<if test="completeAmount != null">complete_amount = #{completeAmount},</if>
<if test="planBeginTime != null">plan_begin_time = #{planBeginTime},</if>
@ -326,7 +332,7 @@
<select id="selectMesProductPlanJoinList" parameterType="MesProductPlan" resultMap="MesProductPlanResult">
select mpp.plan_id, mpp.product_order_id, mpp.sale_order_id,mpp.saleorder_code,mpp.plan_code, mpp.dispatch_code, mpp.material_id,
mpp.material_bom_id, mpp.process_id, mpp.process_order, mpp.last_process_id,
mpp.station_id, mpp.plan_amount, mpp.complete_amount, mpp.plan_begin_time, mpp.plan_end_time,
mpp.station_id, mpp.dispatch_amount, mpp.plan_amount, mpp.complete_amount, mpp.plan_begin_time, mpp.plan_end_time,
mpp.real_begin_time, mpp.real_end_time,
mpp.attach_id, mpp.plan_status, mpo.plan_delivery_date,mbmi.material_code,mbmi.material_name
from mes_product_plan mpp left join mes_product_order mpo on mpp.product_order_id = mpo.product_order_id
@ -352,6 +358,7 @@
a.station_id,
a.user_id,
a.production_time,
a.dispatch_amount,
a.plan_amount,
a.complete_amount,
a.plan_begin_time,

@ -10,6 +10,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.HashMap;
import java.util.List;
/**
*
@ -25,14 +26,15 @@ public class PrinterController {
private IPrinterService printerService;
/**
*
* @param barcodeInfo
*
* @param printContents
* @return
*/
@PostMapping("/printBarCode")
public R<MesBaseBarcodeInfo> printBarCode(@RequestBody MesBaseBarcodeInfo barcodeInfo) {
@PostMapping("/printBarcodes")
public R<MesBaseBarcodeInfo> printBarcodes(@RequestBody List<List<PrintContentVo>> printContents) {
try {
return R.ok(printerService.printBarCode(barcodeInfo));
printerService.printBarcodes(printContents);
return R.ok();
} catch (Exception e) {
log.error("打印条码失败", e);
return R.fail(e.getMessage());
@ -42,13 +44,13 @@ public class PrinterController {
/**
*
* @param printContentVo
* @param params
* @return
*/
@PostMapping("/printLocationLabel")
public R<?> printLocationLabel(@RequestBody PrintContentVo printContentVo) {
public R<?> printLocationLabel(@RequestBody HashMap<String, String> params) {
try {
printerService.printLocationLabel(printContentVo.getParams());
printerService.printLocationLabel(params);
return R.ok();
} catch (Exception e) {
log.error("打印条码失败", e);

@ -1,9 +1,11 @@
package com.hw.printer.service;
import com.hw.mes.api.domain.MesBaseBarcodeInfo;
import com.hw.printer.utils.HwPrintUtil;
import com.hw.printer.api.domain.vo.PrintContentVo;
import java.io.IOException;
import java.util.HashMap;
import java.util.List;
/**
*
@ -14,11 +16,11 @@ public interface IPrinterService {
/**
*
* @param barcodeInfo
* @param printContents
* @return
* @throws Exception
*/
MesBaseBarcodeInfo printBarCode(MesBaseBarcodeInfo barcodeInfo) throws Exception;
public void printBarcodes(List<List<PrintContentVo>> printContents) throws Exception;
/**
@ -26,5 +28,5 @@ public interface IPrinterService {
* @param params
* @return
*/
public void printLocationLabel(HashMap<String, String> params);
public void printLocationLabel(HashMap<String, String> params) throws IOException;
}

@ -1,13 +1,15 @@
package com.hw.printer.service;
import com.hw.common.core.utils.DateUtils;
import com.hw.common.core.utils.StringUtils;
import com.hw.mes.api.domain.MesBaseBarcodeInfo;
import com.hw.printer.api.domain.vo.PrintContentVo;
import com.hw.printer.utils.HwPrintUtil;
import org.springframework.stereotype.Service;
import org.springframework.beans.factory.annotation.Value;
import java.io.IOException;
import java.util.HashMap;
import java.util.List;
/**
* Service
@ -65,35 +67,35 @@ public class PrinterServiceImpl implements IPrinterService {
/**
*
*
* @param barcodeInfo
* @param printContents
* @return
* @throws Exception
*/
@Override
public MesBaseBarcodeInfo printBarCode(MesBaseBarcodeInfo barcodeInfo) throws Exception {
HashMap<String, String> params = new HashMap<>();
params.put("localPrintPath", localPrintPath);
params.put("pdfTemplatePath", pdfTemplatePath);
params.put("generatePath", generatePath);
params.put("barcodeInfo", barcodeInfo.getBarcodeInfo());
params.put("batchCode", barcodeInfo.getBatchCode());
params.put("materialName", barcodeInfo.getMaterialName());
params.put("date", DateUtils.getDate());
String machineName = HwPrintUtil.printBarCode(params);
barcodeInfo.setMachineName(machineName);
return barcodeInfo;
public void printBarcodes(List<List<PrintContentVo>> printContents) throws Exception {
// HashMap<String, String> params = new HashMap<>();
// params.put("localPrintPath", localPrintPath);
// params.put("pdfTemplatePath", pdfTemplatePath);
// params.put("generatePath", generatePath);
// params.put("barcodeInfo", barcodeInfo.getBarcodeInfo());
// params.put("batchCode", barcodeInfo.getBatchCode());
// params.put("materialName", barcodeInfo.getMaterialName());
// params.put("date", DateUtils.getDate());
HwPrintUtil.printBarcodes(localPrintPath, pdfTemplatePath,
generatePath, printContents);
}
/**
*
*
* @param params
* @return
*/
@Override
public void printLocationLabel(HashMap<String, String> params) {
HwPrintUtil.printLocationQRCode(localPrintPath, locationLabelTemplatePath,
generateLocationLabelPath, params);
public void printLocationLabel(HashMap<String, String> params) throws IOException {
HwPrintUtil.printLocationQRCode(localPrintPath, locationLabelTemplatePath,
generateLocationLabelPath, params);
}

@ -1,11 +1,15 @@
package com.hw.printer.utils;
import com.hw.common.core.exception.ServiceException;
import com.hw.printer.api.domain.vo.PrintContentVo;
import com.itextpdf.text.Document;
import com.itextpdf.text.DocumentException;
import com.itextpdf.text.Image;
import com.itextpdf.text.Rectangle;
import com.itextpdf.text.pdf.*;
import org.apache.pdfbox.pdmodel.PDDocument;
import org.apache.pdfbox.pdmodel.interactive.form.PDCheckBox;
import org.apache.pdfbox.printing.PDFPrintable;
import org.apache.pdfbox.printing.Scaling;
@ -15,6 +19,7 @@ import javax.print.*;
import java.awt.print.*;
import java.io.*;
import java.util.HashMap;
import java.util.List;
import java.util.Set;
import org.slf4j.Logger;
@ -79,69 +84,82 @@ public class HwPrintUtil {
}
/**
*
*
*
* @param params
* @return
* @param localPrintPath
* @param rawLabelTemplatePath
* @param generateRawLabelPath
* @param printContents
*/
public static void printBarcodes(String localPrintPath, String rawLabelTemplatePath,
String generateRawLabelPath, List<List<PrintContentVo>> printContents) throws IOException {
for (List<PrintContentVo> printContentVos : printContents) {
printBarCode(localPrintPath, rawLabelTemplatePath,
generateRawLabelPath, printContentVos);
}
}
/**
*
*
* @param localPrintPath
* @param rawLabelTemplatePath
* @param generateRawLabelPath
* @param printContentVos
*/
public static String printBarCode(HashMap<String, String> params) {
public static void printBarCode(String localPrintPath, String rawLabelTemplatePath,
String generateRawLabelPath, List<PrintContentVo> printContentVos) throws IOException {
//解析参数生成打印图片
String localPrintPath = params.get("localPrintPath");
String pdfTemplatePath = params.get("pdfTemplatePath");
String generatePath = params.get("generatePath");
String barcodeInfo = params.get("barcodeInfo");
String batchCode = params.get("batchCode");
String materialName = params.get("materialName");
String date = params.get("date");
// String localPrintPath = params.get("localPrintPath");
// String pdfTemplatePath = params.get("pdfTemplatePath");
// String generatePath = params.get("generatePath");
// String barcodeInfo = params.get("barcodeInfo");
// String batchCode = params.get("batchCode");
// String materialName = params.get("materialName");
// String date = params.get("date");
initPrintService(localPrintPath);
File outputFile = printQRCode(barcodeInfo, batchCode, materialName, date,pdfTemplatePath,generatePath);
try {
printPdf(outputFile);
log.info("打印条码printBarCode方法,条码内容:" + barcodeInfo);
return localPrintPath;
} catch (Exception e) {
log.error("打印条码printPdf异常" + e);
throw new ServiceException("打印条码printPdf异常" + e);
}
File outputFile = printQRCode(rawLabelTemplatePath, generateRawLabelPath, printContentVos);
printPdf(outputFile);
// log.info("打印条码printBarCode方法,条码内容:" + barcodeInfo);
}
/**
* PDF
*
*
* @param barcodeInfo
* @param batchCode
* @param materialName
* @param date
* @return PDF
* @param rawLabelTemplatePath
* @param generateRawLabelPath
* @param printContentVos
* @return
*/
public static File printQRCode(String barcodeInfo, String batchCode, String materialName, String date,String pdfTemplatePath,String generatePath) {
public static File printQRCode(String rawLabelTemplatePath,
String generateRawLabelPath, List<PrintContentVo> printContentVos) {
try {
// 生成PDF文件
File generateFile = new File(generatePath);
File generateFile = new File(generateRawLabelPath);
FileOutputStream out = new FileOutputStream(generateFile);
// 打印模板PDF
PdfReader reader = new PdfReader(pdfTemplatePath);
PdfReader reader = new PdfReader(rawLabelTemplatePath);
ByteArrayOutputStream bos = new ByteArrayOutputStream();
// 修改PDF文档的PdfStamper实例将修改后的内容输出到内存中的字节数组
PdfStamper stamper = new PdfStamper(reader, bos);
// 动态地将变量的值填充到PDF表单相应字段
AcroFields form = stamper.getAcroFields();
form.setField("code", barcodeInfo);
form.setField("name", materialName);
form.setField("spe", batchCode);
form.setField("data", date);
//获取位置(左上右下)
AcroFields.FieldPosition fieldPosition = form.getFieldPositions("qrcode").get(0);
// 绘制二维码
float width = fieldPosition.position.getRight() - fieldPosition.position.getLeft();
BarcodeQRCode pdf417 = new BarcodeQRCode(barcodeInfo, (int) width, (int) width, null);
// 生成二维码图像
Image image128 = pdf417.getImage();
// 条码位置
image128.setAbsolutePosition(fieldPosition.position.getLeft(), fieldPosition.position.getBottom());
// 获取PDF的第一页
PdfContentByte cb = stamper.getOverContent(1);
cb.addImage(image128);
for (PrintContentVo printContentVo : printContentVos) {
if (printContentVo.getType() == PrintContentVo.TYPE_TEXT) {
form.setField(printContentVo.getKey(), printContentVo.getValue());
} else if (printContentVo.getType() == PrintContentVo.TYPE_CHECKBOX) {
setCheckBox(form, stamper, printContentVo.getKey());
} else if (printContentVo.getType() == PrintContentVo.TYPE_QRCODE) {
setImage(form, stamper, printContentVo.getKey(), printContentVo.getValue());
}
}
// form.setField("code", barcodeInfo);
// form.setField("name", "控制柜控制柜控制柜");
// form.setField("spe", batchCode);
// 设置表单不可编辑即将表单字段内容固定到PDF中
stamper.setFormFlattening(true);
// 关闭PdfStamper
@ -165,6 +183,39 @@ public class HwPrintUtil {
return null;
}
private static void setImage(AcroFields form, PdfStamper stamper, String fieldName, String fieldValue) throws DocumentException {
//获取位置(左上右下)
AcroFields.FieldPosition fieldPosition = form.getFieldPositions(fieldName).get(0);
// 绘制二维码
float width = fieldPosition.position.getTop() - fieldPosition.position.getBottom();
BarcodeQRCode pdf417 = new BarcodeQRCode(fieldValue, (int) width, (int) width, null);
// 生成二维码图像
Image image128 = pdf417.getImage();
// 条码位置
image128.setAbsolutePosition(fieldPosition.position.getLeft() + (fieldPosition.position.getRight() - fieldPosition.position.getLeft() - width) / 2
, fieldPosition.position.getBottom());
// 获取PDF的第一页
PdfContentByte cb = stamper.getOverContent(1);
cb.addImage(image128);
}
private static void setCheckBox(AcroFields form, PdfStamper stamper, String fieldName) throws DocumentException, IOException {
// 获取复选框位置以便在旁边绘制勾号
Rectangle boxRect = form.getFieldPositions(fieldName).get(0).position;
float centerX = boxRect.getLeft() + boxRect.getWidth() / 2;
float centerY = boxRect.getBottom() + boxRect.getHeight() / 2;
// 使用字体绘制勾号
BaseFont font = BaseFont.createFont(BaseFont.HELVETICA_BOLD, BaseFont.WINANSI, BaseFont.EMBEDDED);
PdfContentByte canvas = stamper.getOverContent(form.getFieldPositions(fieldName).get(0).page);
canvas.beginText();
canvas.setFontAndSize(font, 16); // 字体大小可能需要调整以适应复选框大小
// 计算勾号的绘制位置,使其居中
canvas.setTextMatrix(centerX - 5, centerY + 5); // 这里的偏移量可能需要根据具体情况调整
canvas.showText("\u2713"); // 勾号的Unicode字符
canvas.endText();
}
/**
* PDF
*
@ -174,7 +225,7 @@ public class HwPrintUtil {
* @param date
* @return PDF
*/
public static File printBarCode(String barcodeInfo, String batchCode, String materialName, String date,String pdfTemplatePath,String generatePath) {
public static File printBarCode(String barcodeInfo, String batchCode, String materialName, String date, String pdfTemplatePath, String generatePath) {
try {
// 生成PDF文件
File generateFile = new File(generatePath);
@ -271,7 +322,6 @@ public class HwPrintUtil {
}
/**
*
*
@ -280,19 +330,14 @@ public class HwPrintUtil {
*/
public static String printLocationQRCode(String localPrintPath, String locationLabelTemplatePath,
String generateLocationLabelPath,
HashMap<String, String> params) {
HashMap<String, String> params) throws IOException {
//解析参数生成打印图片
String qrCode = params.get("qrCode");
initPrintService(localPrintPath);
File outputFile = printLocationLabelContent(params,locationLabelTemplatePath,generateLocationLabelPath);
try {
printQRPdf(outputFile);
log.info("打印条码,条码内容:" + qrCode);
return localPrintPath;
} catch (Exception e) {
log.error("打印条码[" + qrCode + "]异常:" + e);
throw new ServiceException("打印条码[" + qrCode + "]异常:" + e);
}
File outputFile = printLocationLabelContent(params, locationLabelTemplatePath, generateLocationLabelPath);
printQRPdf(outputFile);
return localPrintPath;
}
@ -302,7 +347,7 @@ public class HwPrintUtil {
* @param params
* @return
*/
public static File printLocationLabelContent(HashMap<String, String> params,String locationLabelTemplatePath,String generateLocationLabelPath) {
public static File printLocationLabelContent(HashMap<String, String> params, String locationLabelTemplatePath, String generateLocationLabelPath) {
try {
// 生成PDF文件
File generateFile = new File(generateLocationLabelPath);
@ -337,7 +382,7 @@ public class HwPrintUtil {
// );
// 条码位置
image128.setAbsolutePosition(fieldPosition.position.getLeft(),
fieldPosition.position.getBottom()-15);
fieldPosition.position.getBottom() - 15);
// 获取PDF的第一页
PdfContentByte cb = stamper.getOverContent(1);
cb.addImage(image128);
@ -428,8 +473,4 @@ public class HwPrintUtil {
}
}

@ -140,7 +140,7 @@ public class WmsBaseLocationController extends BaseController {
* @param locationIds
* @return
*/
@RequiresPermissions("wms:wmslocation:printLocationLabel")
@RequiresPermissions("wms:wmslocation:printLocationLabels")
@Log(title = "库位", businessType = BusinessType.PRINT)
@GetMapping(value = "/printLocationLabels/{locationIds}")
public AjaxResult printLocationLabels(@PathVariable Long[] locationIds) {

@ -10,6 +10,7 @@ import com.hw.common.core.exception.ServiceException;
import com.hw.common.core.utils.DateUtils;
import com.hw.common.core.utils.StringUtils;
import com.hw.common.security.utils.SecurityUtils;
import com.hw.mes.api.RemoteMesService;
import com.hw.mes.api.domain.MesBaseBarcodeInfo;
import com.hw.printer.api.RemotePrinterService;
import com.hw.printer.api.domain.vo.PrintContentVo;
@ -192,10 +193,8 @@ public class WmsBaseLocationServiceImpl implements IWmsBaseLocationService {
HashMap<String, String> params = new HashMap<>();
params.put("text", qrCode);
params.put("qrCode", qrCode);
PrintContentVo printContentVo = new PrintContentVo();
printContentVo.setParams(params);
//调用的打印接口
remotePrinterService.printLocationLabel(printContentVo, SecurityConstants.INNER);
remotePrinterService.printLocationLabel(params, SecurityConstants.INNER);
} catch (Exception e) {
buffer.append("打印料箱条码报错——[条码内容:").append(qrCode).append("]").append(e.getMessage());
}

@ -211,8 +211,8 @@ public class WmsRawInstockServiceImpl implements IWmsRawInstockService {
queryRawStock.setLocationCode(locationCode);
BigDecimal totalAmount = wmsRawStockMapper.getRawStockTotalAmount(queryRawStock);
totalAmount = totalAmount == null ? BigDecimal.ZERO : totalAmount;
BigDecimal qtyLimit = baseLocation.getQtyLimit() == null ? BigDecimal.ZERO : baseLocation.getQtyLimit();
if (totalAmount.add(wmsRawInstockVo.getInstockAmount()).compareTo(qtyLimit) > 0) {
BigDecimal qtyLimit = baseLocation.getQtyLimit();
if (qtyLimit!=null && totalAmount.add(wmsRawInstockVo.getInstockAmount()).compareTo(qtyLimit) > 0) {
throw new ServiceException("已超出库位数量限制,请重新选择库位");
}

@ -532,7 +532,7 @@ public class WmsRawOutstockServiceImpl implements IWmsRawOutstockService {
//可出库数量大于0
if (planAmount.compareTo(availableAmount) <= 0) {
//占用数量更改
wmsStockTotal.setOccupyAmount(occupyAmount.add(availableAmount));
wmsStockTotal.setOccupyAmount(occupyAmount.add(planAmount));
wmsStockTotal.setUpdateDate(currentDate);
wmsStockTotal.setUpdateBy(userName);
wmsStockTotalMapper.updateWmsStockTotal(wmsStockTotal);

@ -44,9 +44,9 @@ export function delBarcode(barcodeId) {
}
// 打印条码
export function printBarCode(barcodeId) {
export function printBarcodes(barcodeIds) {
return request({
url: '/mes/barcode/printBarCode/' + barcodeId,
url: '/mes/barcode/printBarcodes/' + barcodeIds,
method: 'get'
})
}
@ -78,3 +78,13 @@ export function addInternalBarcode(data) {
data: data
})
}
// 重新生成条码信息,之前的条码作废
export function regenerateBarcode(data) {
return request({
url: '/mes/barcode/regenerateBarcode',
method: 'post',
data: data
})
}

@ -42,3 +42,13 @@ export function delBasePalletInfo(palletInfoId) {
method: 'delete'
})
}
// 打印托盘RFID编码
export function printPalletInfoCodes(palletInfoCodes) {
return request({
url: '/mes/basePalletInfo/printPalletInfoCodes/' + palletInfoCodes,
method: 'get'
})
}

@ -25,22 +25,22 @@
</el-form-item>
</el-form>
<div style="text-align: center">
<el-button type="success" v-if="(!$route.query || $route.query.id!=='2')" :disabled="form.planDetailStatus === '已完成' || !form.planDetailCode" @click="getMaterials('0')">
<el-button type="success" v-if="(!$route.query || $route.query.id==='2')" :disabled="form.planDetailStatus === '已完成' || !form.planDetailCode" @click="getMaterials('0')">
</el-button>
<el-button type="warning" v-if="(!$route.query || $route.query.id!=='2')" :disabled="form.planDetailStatus === '已完成' || !form.planDetailCode" @click="handleMaterialConfirmForm()">
<el-button type="warning" v-if="(!$route.query || $route.query.id==='2')" :disabled="form.planDetailStatus === '已完成' || !form.planDetailCode" @click="handleMaterialConfirmForm()">
</el-button>
<el-button type="danger" @click="returnMaterial()" v-if="(!$route.query || $route.query.id!=='2')" :disabled="!form.planDetailCode">退
<el-button type="danger" @click="returnMaterial()" v-if="(!$route.query || $route.query.id==='2')" :disabled="!form.planDetailCode">退
</el-button>
<el-button type="primary" v-if="($route.query && $route.query.id) === '2'" :disabled="form.planDetailStatus === '已完成' || !form.planDetailCode" @click="getMaterials('1')">
<el-button type="primary" v-if="($route.query && $route.query.id) !== '2'" :disabled="form.planDetailStatus === '已完成' || !form.planDetailCode" @click="getMaterials('1')">
领柜体
</el-button>
<el-button v-if="($route.query && $route.query.id) === '2'" type="info" :disabled="form.planDetailStatus === '已完成' || !form.planDetailCode" @click="handleBindBarcode">
<el-button v-if="($route.query && $route.query.id) !== '2'" type="info" :disabled="form.planDetailStatus === '已完成' || !form.planDetailCode" @click="handleBindBarcode">
</el-button>
<el-button v-if="($route.query && $route.query.id) === '2'" type="warning" :disabled="form.planDetailStatus === '已完成' || !form.planDetailCode" @click="handleRawBack">
<el-button v-if="($route.query && $route.query.id) !== '2'" type="warning" :disabled="form.planDetailStatus === '已完成' || !form.planDetailCode" @click="handleRawBack">
</el-button>
<el-button :disabled="form.planDetailStatus === '已完成' || !form.planDetailCode" type="primary" @click="finish"></el-button>
<el-popover
v-if="($route.query && $route.query.id) === '2'"
v-if="($route.query && $route.query.id) !== '2'"
v-model="assignModel"
placement="top"
style="margin-left: 10px"
@ -161,7 +161,7 @@
SOP预览
</el-button>
<el-button
v-if="($route.query && $route.query.id) === '2'"
v-if="($route.query && $route.query.id) !== '2'"
size="small"
style="margin-right: 12px"
type="text"
@ -177,7 +177,7 @@
<!-- </el-button>-->
<el-popconfirm
v-if="($route.query && $route.query.id) === '2'"
v-if="($route.query && $route.query.id) !== '2'"
cancel-button-text='否'
confirm-button-text='是'
icon="el-icon-info"
@ -196,7 +196,7 @@
placement="top"
width="400"
ref="popoverRef"
v-if="($route.query && $route.query.id) !== '2'"
v-if="($route.query && $route.query.id) === '2'"
trigger="click">
<div>
<div style="margin: 15px 0;">
@ -334,7 +334,7 @@
</el-table-column>
</el-table>
<div style="text-align: center;margin-top: 12px">
<el-button type="primary" @click="receiveMaterial"></el-button>
<el-button type="primary" @click="receiveMaterial"></el-button>
</div>
</el-dialog>

@ -74,27 +74,16 @@
<!-- >修改-->
<!-- </el-button>-->
<!-- </el-col>-->
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['mes:barcode:remove']"
>删除
</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
icon="el-icon-printer"
size="mini"
@click="handleExport"
v-hasPermi="['mes:barcode:export']"
>导出
@click="handlePrintBarcodes"
v-hasPermi="['mes:barcode:print']"
>打印
</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
@ -118,14 +107,21 @@
<el-table-column label="批次代码" align="center" prop="batchCode" v-if="columns[6].visible" width="100"/>
<el-table-column label="条码内容" align="center" prop="barcodeInfo" v-if="columns[5].visible" width="100"/>
<el-table-column label="物料名称" align="center" prop="materialName" v-if="columns[8].visible" width="100"/>
<el-table-column label="批次标识" align="center" prop="batchFlag" v-if="columns[3].visible">
<template slot-scope="scope">
<dict-tag :options="dict.type.active_flag" :value="scope.row.batchFlag"/>
</template>
</el-table-column>
<el-table-column label="物料名称" align="center" prop="materialName" v-if="columns[8].visible" width="100"/>
<el-table-column label="供应商ID" align="center" prop="manufacturerId" v-if="columns[9].visible"/>
<el-table-column label="批次数量" align="center" prop="amount" v-if="columns[10].visible"/>
<el-table-column label="打印标识" align="center" prop="printFlag" v-if="columns[12].visible">
<template slot-scope="scope">
<dict-tag :options="dict.type.mes_print_flag" :value="scope.row.printFlag"/>
</template>
</el-table-column>
<el-table-column label="生产日期" align="center" prop="productionDate" width="180" v-if="columns[14].visible">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.productionDate, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
@ -136,6 +132,13 @@
<span>{{ parseTime(scope.row.acceptedDate, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template>
</el-table-column>
<el-table-column label="打印人" align="center" prop="printPerson" v-if="columns[2].visible"/>
<el-table-column label="打印时间" align="center" prop="printTime" width="180" v-if="columns[1].visible">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.printTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template>
</el-table-column>
<el-table-column label="最晚出库日期" align="center" prop="lastOutstockDate" width="180"
v-if="columns[16].visible">
<template slot-scope="scope">
@ -143,14 +146,7 @@
</template>
</el-table-column>
<el-table-column label="托盘RFID代码" align="center" prop="palletInfoCode" v-if="columns[7].visible" width="110"/>
<el-table-column label="打印机台名称" align="center" prop="machineName" v-if="columns[11].visible" width="110"/>
<el-table-column label="打印次数" align="center" prop="printNumber" v-if="columns[12].visible"/>
<el-table-column label="打印人" align="center" prop="printPerson" v-if="columns[2].visible"/>
<el-table-column label="打印时间" align="center" prop="printTime" width="180" v-if="columns[1].visible">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.printTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template>
</el-table-column>
<el-table-column label="生产计划编号" align="center" prop="planCode" v-if="columns[17].visible"/>
<el-table-column label="生产计划明细编号" align="center" prop="planDetailCode" v-if="columns[18].visible"/>
<el-table-column label="销售订单ID" align="center" prop="saleOrderId" v-if="columns[19].visible"/>
@ -181,14 +177,18 @@
size="mini"
type="text"
icon="el-icon-refresh"
@click="handlePrintBarCode(scope.row)"
@click="regenerateBarcode(scope.row)"
v-if="scope.row.printFlag ==='1'"
v-hasPermi="['mes:barcode:print']"
>重新生成
</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-printer"
@click="handlePrintBarCode(scope.row)"
@click="handlePrintBarcodes(scope.row)"
v-if="scope.row.printFlag ==='0'"
v-hasPermi="['mes:barcode:print']"
>打印
</el-button>
<!-- <el-button-->
@ -407,14 +407,14 @@
<script>
import {
listBarcode, getBarcode, delBarcode, addBarcode, updateBarcode,
printBarCode, getMaterialInfoByErpId, selectProductBarcodeInfoByBarcodeInfo,
addInternalBarcode
printBarcodes, getMaterialInfoByErpId, selectProductBarcodeInfoByBarcodeInfo,
addInternalBarcode,regenerateBarcode
} from "@/api/mes/barcode";
import addPurchaseOrder from '@//views/mes/purchaseOrder/addPurchaseOrder.vue';
export default {
name: "Barcode",
dicts: ['bind_status', 'active_flag', 'barcode_type','mes_safe_flag'],
dicts: ['bind_status', 'active_flag', 'barcode_type','mes_safe_flag','mes_print_flag'],
components: {
'add-purchaseOrder': addPurchaseOrder
},
@ -508,7 +508,7 @@ export default {
{key: 9, label: `供应商ID`, visible: false},
{key: 10, label: `数量`, visible: true},
{key: 11, label: `打印机台名称`, visible: true},
{key: 12, label: `打印次数`, visible: true},
{key: 12, label: `打印标识`, visible: true},
{key: 13, label: `采购订单号`, visible: true},
{key: 14, label: `生产日期`, visible: true},
{key: 15, label: `接受日期`, visible: true},
@ -685,14 +685,32 @@ export default {
},
/** 打印条码按钮操作 */
handlePrintBarCode(row) {
handlePrintBarcodes(row) {
const barcodeIds = row.barcodeId || this.ids;
printBarCode(barcodeIds).then(response => {
printBarcodes(barcodeIds).then(response => {
this.$modal.msgSuccess("打印条码成功");
this.getList();
}).catch(() => {
});
},
//
regenerateBarcode(row) {
const barcodeId = row.barcodeId;
const barcodeInfo = row.barcodeInfo;
this.$modal.confirm('重新生成后之前的条码将会作废,是否确认重新生成条码内容为"' + barcodeInfo + '"的数据项?').then(function () {
return regenerateBarcode({"barcodeId":barcodeId,"barcodeInfo":barcodeInfo});
}).then(() => {
this.getList();
this.$modal.msgSuccess("重新生成成功");
}).catch(() => {
});
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
@ -800,7 +818,6 @@ export default {
this.$set(this.internalForm,"productionDate",response.data.productionDate);
this.$set(this.internalForm,"saleOrderId",response.data.saleOrderId);
this.$set(this.internalForm,"saleorderCode",response.data.saleorderCode);
alert(response.data.saleorderCode)
});

@ -9,6 +9,7 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
@ -16,52 +17,19 @@
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['mes:basePalletInfo:add']"
>新增
</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['mes:basePalletInfo:edit']"
>修改
</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['mes:basePalletInfo:remove']"
>删除
</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
icon="el-icon-print"
size="mini"
@click="handleExport"
v-hasPermi="['mes:basePalletInfo:export']"
>导出
:disabled="multiple"
@click="handlePrintPalletInfoCodes"
v-hasPermi="['mes:basePalletInfo:printPalletInfoCodes']"
>打印托盘RFID编码
</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
</el-row>
@ -69,39 +37,7 @@
<el-table-column type="selection" width="55" align="center"/>
<el-table-column label="托盘ID" align="center" prop="palletInfoId" v-if="columns[0].visible"/>
<el-table-column label="RFID编码" align="center" prop="palletInfoCode" v-if="columns[1].visible"/>
<el-table-column label="备注" align="center" prop="remark" v-if="columns[2].visible"/>
<el-table-column label="创建人" align="center" prop="createBy" v-if="columns[3].visible"/>
<el-table-column label="创建时间" align="center" prop="createTime" width="180" v-if="columns[4].visible">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template>
</el-table-column>
<el-table-column label="更新人" align="center" prop="updateBy" v-if="columns[5].visible"/>
<el-table-column label="更新时间" align="center" prop="updateTime" width="180" v-if="columns[6].visible">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.updateTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['mes:basePalletInfo:edit']"
>修改
</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['mes:basePalletInfo:remove']"
>删除
</el-button>
</template>
</el-table-column>
</el-table>
<pagination
@ -136,7 +72,8 @@ import {
getBasePalletInfo,
delBasePalletInfo,
addBasePalletInfo,
updateBasePalletInfo
updateBasePalletInfo,
printPalletInfoCodes
} from "@/api/mes/basePalletInfo";
export default {
@ -292,7 +229,20 @@ export default {
this.download('mes/basePalletInfo/export', {
...this.queryParams
}, `basePalletInfo_${new Date().getTime()}.xlsx`)
}
},
/** 打印托盘RFID编码按钮操作 */
handlePrintPalletInfoCodes(row) {
const palletInfoCodes = row.palletInfoCode || this.idNames;
this.$modal.confirm('是否确认打印托盘RFID编码为"' + palletInfoCodes + '"的标签?').then(function () {
return printPalletInfoCodes(palletInfoCodes);
}).then(() => {
this.getList();
this.$modal.msgSuccess("打印成功");
}).catch(() => {
});
},
}
};
</script>

@ -42,15 +42,6 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="层" prop="layerNum">
<el-input
v-model="queryParams.layerNum"
placeholder="请输入层"
style="width: 100px"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="排" prop="locRow">
<el-input
@ -72,6 +63,16 @@
/>
</el-form-item>
<el-form-item label="层" prop="layerNum">
<el-input
v-model="queryParams.layerNum"
placeholder="请输入层"
style="width: 100px"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="人工处理标识" prop="manualFlag" label-width="98px">
<el-select
v-model="queryParams.manualFlag"
@ -238,9 +239,9 @@
<el-table-column label="库位编号" align="center" prop="locationCode"/>
<el-table-column label="料箱编号" align="center" prop="containerCode"/>
<el-table-column label="仓库" align="center" prop="warehouseName"/>
<el-table-column label="层" align="center" prop="layerNum"/>
<el-table-column label="排" align="center" prop="locRow"/>
<el-table-column label="列" align="center" prop="locColumn"/>
<el-table-column label="层" align="center" prop="layerNum"/>
<el-table-column label="数量限制" align="center" prop="qtyLimit"/>
<el-table-column label="人工处理标识" align="center" prop="manualFlag">
<template slot-scope="scope">

Loading…
Cancel
Save