From e1748dbc8018f7f4d857ee13ff8b5c7add8c368b Mon Sep 17 00:00:00 2001 From: xs Date: Wed, 31 Jul 2024 19:46:43 +0800 Subject: [PATCH] =?UTF-8?q?2.7.6=20mes=EF=BC=9A=E6=96=B0=E5=A2=9E=E6=9D=A1?= =?UTF-8?q?=E7=A0=81=E6=97=B6=E9=80=89=E6=8B=A9=E7=89=A9=E6=96=99=E4=BC=98?= =?UTF-8?q?=E5=8C=96=EF=BC=8C=E5=A2=9E=E5=8A=A0=E7=89=A9=E6=96=99=E8=A7=84?= =?UTF-8?q?=E6=A0=BC=E6=90=9C=E7=B4=A2=20=E8=BD=A6=E9=97=B4MES=EF=BC=9A?= =?UTF-8?q?=E5=9B=9B=E6=A5=BC=E6=BF=80=E5=85=89=E5=88=87=E5=89=B2=E5=8F=AF?= =?UTF-8?q?=E4=BB=A5=E6=8C=89=E7=85=A7=E6=97=A0=E5=9B=BE=E7=BA=B8=E5=BC=80?= =?UTF-8?q?=E5=A7=8B=E5=92=8C=E7=BB=93=E6=9D=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hw/mes/api/domain/MesBaseBarcodeInfo.java | 11 +++ .../MesBaseBarcodeInfoController.java | 12 ++- .../com/hw/mes/domain/MesBaseAttachInfo.java | 12 +-- .../mes/mapper/MesBasePalletInfoMapper.java | 9 ++ .../service/IMesBaseBarcodeInfoService.java | 9 ++ .../impl/MesBaseBarcodeInfoServiceImpl.java | 37 +++++++- .../impl/MesBaseMaterialInfoServiceImpl.java | 3 + .../impl/MesProductPlanDetailServiceImpl.java | 7 +- .../impl/MesProductPlanServiceImpl.java | 29 +++++-- .../mapper/mes/MesBaseBarcodeInfoMapper.xml | 9 ++ .../mapper/mes/MesBaseMaterialInfoMapper.xml | 3 +- .../mapper/mes/MesBasePalletInfoMapper.xml | 5 ++ .../mapper/mes/MesProductPlanDetailMapper.xml | 1 + .../impl/WmsBaseLocationServiceImpl.java | 7 +- .../impl/WmsRawOutstockServiceImpl.java | 7 ++ .../service/impl/WmsTransferServiceImpl.java | 10 ++- hw-ui/src/api/mes/barcode.js | 10 +++ .../views/board/fourthFloor/laserLight.vue | 43 +++++++--- hw-ui/src/views/mes/barcode/index.vue | 85 ++++++++++++++----- .../views/mes/materialinfo/selectMaterial.vue | 30 +++---- 20 files changed, 265 insertions(+), 74 deletions(-) diff --git a/hw-api/hw-api-mes/src/main/java/com/hw/mes/api/domain/MesBaseBarcodeInfo.java b/hw-api/hw-api-mes/src/main/java/com/hw/mes/api/domain/MesBaseBarcodeInfo.java index f87f9c5..be51921 100644 --- a/hw-api/hw-api-mes/src/main/java/com/hw/mes/api/domain/MesBaseBarcodeInfo.java +++ b/hw-api/hw-api-mes/src/main/java/com/hw/mes/api/domain/MesBaseBarcodeInfo.java @@ -170,6 +170,9 @@ public class MesBaseBarcodeInfo extends BaseEntity private String barcodeTypeStr;//物料类型多个string,例如 1,9 + private String confirmFlag;//用来二次确认使用 + + public String getPrintFlag() { return printFlag; } @@ -529,6 +532,14 @@ public class MesBaseBarcodeInfo extends BaseEntity this.barcodeTypeStr = barcodeTypeStr; } + public String getConfirmFlag() { + return confirmFlag; + } + + public void setConfirmFlag(String confirmFlag) { + this.confirmFlag = confirmFlag; + } + @Override public String toString() { return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) diff --git a/hw-modules/hw-mes/src/main/java/com/hw/mes/controller/MesBaseBarcodeInfoController.java b/hw-modules/hw-mes/src/main/java/com/hw/mes/controller/MesBaseBarcodeInfoController.java index 5976a94..461f87d 100644 --- a/hw-modules/hw-mes/src/main/java/com/hw/mes/controller/MesBaseBarcodeInfoController.java +++ b/hw-modules/hw-mes/src/main/java/com/hw/mes/controller/MesBaseBarcodeInfoController.java @@ -255,7 +255,17 @@ public class MesBaseBarcodeInfoController extends BaseController @PostMapping(value="/addNoPurchaseBarcode") public AjaxResult addNoPurchaseBarcode(@RequestBody MesBaseBarcodeInfo mesBaseBarcodeInfo) { - return toAjax(mesBaseBarcodeInfoService.generateNoPurchaseRawBarcode(mesBaseBarcodeInfo)); + return success(mesBaseBarcodeInfoService.generateNoPurchaseRawBarcode(mesBaseBarcodeInfo)); + } + + /** + * 校验是否有同样物料是批次的条码 + */ + @RequiresPermissions("mes:barcode:internalAdd") + @PostMapping(value="/checkBarcode") + public AjaxResult checkBarcode(@RequestBody MesBaseBarcodeInfo mesBaseBarcodeInfo) + { + return success(mesBaseBarcodeInfoService.checkBarcode(mesBaseBarcodeInfo)); } diff --git a/hw-modules/hw-mes/src/main/java/com/hw/mes/domain/MesBaseAttachInfo.java b/hw-modules/hw-mes/src/main/java/com/hw/mes/domain/MesBaseAttachInfo.java index 737f4b9..0e18767 100644 --- a/hw-modules/hw-mes/src/main/java/com/hw/mes/domain/MesBaseAttachInfo.java +++ b/hw-modules/hw-mes/src/main/java/com/hw/mes/domain/MesBaseAttachInfo.java @@ -58,8 +58,8 @@ public class MesBaseAttachInfo extends BaseEntity { /**附件ID,多个以,隔开*/ private String attachIdStr; - /** 是否已下发图纸,下发dispatchFlag为true,下发dispatchFlag为true,默认为false*/ - private boolean dispatchFlag = false; + /** 图纸状态*/ + private String planDetailStatus; public void setAttachId(Long attachId) { this.attachId = attachId; @@ -125,12 +125,12 @@ public class MesBaseAttachInfo extends BaseEntity { this.attachIdStr = attachIdStr; } - public boolean isDispatchFlag() { - return dispatchFlag; + public String getPlanDetailStatus() { + return planDetailStatus; } - public void setDispatchFlag(boolean dispatchFlag) { - this.dispatchFlag = dispatchFlag; + public void setPlanDetailStatus(String planDetailStatus) { + this.planDetailStatus = planDetailStatus; } @Override diff --git a/hw-modules/hw-mes/src/main/java/com/hw/mes/mapper/MesBasePalletInfoMapper.java b/hw-modules/hw-mes/src/main/java/com/hw/mes/mapper/MesBasePalletInfoMapper.java index a98e3d0..3025ec0 100644 --- a/hw-modules/hw-mes/src/main/java/com/hw/mes/mapper/MesBasePalletInfoMapper.java +++ b/hw-modules/hw-mes/src/main/java/com/hw/mes/mapper/MesBasePalletInfoMapper.java @@ -68,4 +68,13 @@ public interface MesBasePalletInfoMapper * @return 托盘信息 */ public MesBasePalletInfo selectMesBasePalletInfoByPalletInfoCode(String palletInfoCode); + + /** + * 查询托盘信息 + * + * @param materialBarcode 物料条码 + * @return 托盘信息 + */ + public MesBasePalletInfo selectMesBasePalletInfoByBarcode(String materialBarcode); + } diff --git a/hw-modules/hw-mes/src/main/java/com/hw/mes/service/IMesBaseBarcodeInfoService.java b/hw-modules/hw-mes/src/main/java/com/hw/mes/service/IMesBaseBarcodeInfoService.java index 718efbc..d5d20ea 100644 --- a/hw-modules/hw-mes/src/main/java/com/hw/mes/service/IMesBaseBarcodeInfoService.java +++ b/hw-modules/hw-mes/src/main/java/com/hw/mes/service/IMesBaseBarcodeInfoService.java @@ -47,6 +47,15 @@ public interface IMesBaseBarcodeInfoService */ public int insertMesBaseBarcodeInfo(MesBaseBarcodeInfo mesBaseBarcodeInfo); + + /** + * 校验是否有同样物料是批次的条码 + * + * @param mesBaseBarcodeInfo + */ + public int checkBarcode(MesBaseBarcodeInfo mesBaseBarcodeInfo); + + /** * 无采购订单生成条码信息 * @param mesBaseBarcodeInfo diff --git a/hw-modules/hw-mes/src/main/java/com/hw/mes/service/impl/MesBaseBarcodeInfoServiceImpl.java b/hw-modules/hw-mes/src/main/java/com/hw/mes/service/impl/MesBaseBarcodeInfoServiceImpl.java index d539bfb..b2357db 100644 --- a/hw-modules/hw-mes/src/main/java/com/hw/mes/service/impl/MesBaseBarcodeInfoServiceImpl.java +++ b/hw-modules/hw-mes/src/main/java/com/hw/mes/service/impl/MesBaseBarcodeInfoServiceImpl.java @@ -100,6 +100,8 @@ public class MesBaseBarcodeInfoServiceImpl implements IMesBaseBarcodeInfoService */ @Override public List selectMesBaseBarcodeInfoList(MesBaseBarcodeInfo mesBaseBarcodeInfo) { + mesBaseBarcodeInfo.setMaterialSpec(StringUtils.isNotEmpty(mesBaseBarcodeInfo.getMaterialSpec()) + ? mesBaseBarcodeInfo.getMaterialSpec().replaceAll("\\s+", ""):""); return mesBaseBarcodeInfoMapper.selectMesBaseBarcodeInfoList(mesBaseBarcodeInfo); } @@ -193,6 +195,27 @@ public class MesBaseBarcodeInfoServiceImpl implements IMesBaseBarcodeInfoService } + /** + * 校验是否有同样物料是批次的条码 + * + * @param mesBaseBarcodeInfo + */ + @Override + public int checkBarcode(MesBaseBarcodeInfo mesBaseBarcodeInfo) { + if (mesBaseBarcodeInfo.getConfirmFlag() == null || !mesBaseBarcodeInfo.getConfirmFlag().equals("1")) { + MesBaseBarcodeInfo queryBarcodeInfo = new MesBaseBarcodeInfo(); + queryBarcodeInfo.setMaterialId(mesBaseBarcodeInfo.getMaterialId()); + queryBarcodeInfo.setBatchFlag(MesConstants.IS_BATCH); + List mesBaseBarcodeInfos = mesBaseBarcodeInfoMapper.selectMesBaseBarcodeInfoList(queryBarcodeInfo); + if (mesBaseBarcodeInfos != null && !mesBaseBarcodeInfos.isEmpty()) { + return 2; + } + } + + return 1; + } + + /** * 无采购订单生成条码信息 * @@ -202,7 +225,6 @@ public class MesBaseBarcodeInfoServiceImpl implements IMesBaseBarcodeInfoService public int generateNoPurchaseRawBarcode(MesBaseBarcodeInfo mesBaseBarcodeInfo) { Date currentDate = new Date(); String userName = SecurityUtils.getUsername(); - BigDecimal barcodeAmount = mesBaseBarcodeInfo.getBarcodeAmount(); List toInsertedBarcodeInfos = new ArrayList<>(); @@ -252,6 +274,7 @@ public class MesBaseBarcodeInfoServiceImpl implements IMesBaseBarcodeInfoService Long saleOrderId; String saleOrderCode; Long materialId; + String barcode = Seq.getId(Seq.mesCompBarcodeSeqType, Seq.mesCompBarcodeCode); if (mesBaseBarcodeInfo.getSingleFlag().equals(MesConstants.MES_BARCODE_SINGLE_FLAG_YES)) { String rawMaterialBarcode = mesBaseBarcodeInfo.getProductBarcode(); MesBaseBarcodeInfo rawBarcode = mesBaseBarcodeInfoMapper.selectMesBaseBarcodeInfoByBarcodeInfo(rawMaterialBarcode); @@ -289,6 +312,14 @@ public class MesBaseBarcodeInfoServiceImpl implements IMesBaseBarcodeInfoService mesBaseBarcodeInfo.setPalletInfoCode(rawBarcode.getPalletInfoCode()); + MesBasePalletInfo mesBasePalletInfo = mesBasePalletInfoMapper.selectMesBasePalletInfoByPalletInfoCode(rawBarcode.getPalletInfoCode()); + mesBasePalletInfo.setMaterialBarcode(barcode); + mesBasePalletInfo.setMaterialId(materialId); + mesBasePalletInfoMapper.updateMesBasePalletInfo(mesBasePalletInfo); + + rawBarcode.setPalletInfoCode(""); + mesBaseBarcodeInfoMapper.updateMesBaseBarcodeInfo(rawBarcode); + } else { planCode = mesBaseBarcodeInfo.getPlanCode(); planDetailCode = mesBaseBarcodeInfo.getPlanDetailCode(); @@ -323,7 +354,7 @@ public class MesBaseBarcodeInfoServiceImpl implements IMesBaseBarcodeInfoService Date currentDate = new Date(); - String barcode = Seq.getId(Seq.mesCompBarcodeSeqType, Seq.mesCompBarcodeCode); + mesBaseBarcodeInfo.setBatchCode(barcode);// 成品的批次代码 == 条码内容 mesBaseBarcodeInfo.setBarcodeInfo(barcode); mesBaseBarcodeInfo.setAmount(new BigDecimal(1)); @@ -575,7 +606,7 @@ public class MesBaseBarcodeInfoServiceImpl implements IMesBaseBarcodeInfoService PrintContentVo printQty = new PrintContentVo(); printQty.setKey(PrintContentVo.RAW_MATERIAL_LABEL_KEY_QTY); DecimalFormat df = new DecimalFormat("#.##"); - String formattedNumber = df.format(mesBaseBarcodeInfo.getAmount()); + String formattedNumber = df.format(mesBaseBarcodeInfo.getAmount()==null?BigDecimal.ZERO:mesBaseBarcodeInfo.getAmount()); printQty.setValue(formattedNumber); printQty.setType(PrintContentVo.TYPE_TEXT); diff --git a/hw-modules/hw-mes/src/main/java/com/hw/mes/service/impl/MesBaseMaterialInfoServiceImpl.java b/hw-modules/hw-mes/src/main/java/com/hw/mes/service/impl/MesBaseMaterialInfoServiceImpl.java index 31b6059..83ed832 100644 --- a/hw-modules/hw-mes/src/main/java/com/hw/mes/service/impl/MesBaseMaterialInfoServiceImpl.java +++ b/hw-modules/hw-mes/src/main/java/com/hw/mes/service/impl/MesBaseMaterialInfoServiceImpl.java @@ -6,6 +6,7 @@ import java.util.List; import com.hw.common.core.constant.MesConstants; 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.MesOrderBind; @@ -53,6 +54,8 @@ public class MesBaseMaterialInfoServiceImpl implements IMesBaseMaterialInfoServi */ @Override public List selectMesBaseMaterialInfoList(MesBaseMaterialInfo mesBaseMaterialInfo) { + mesBaseMaterialInfo.setMaterialSpec(StringUtils.isNotEmpty(mesBaseMaterialInfo.getMaterialSpec()) + ? mesBaseMaterialInfo.getMaterialSpec().replaceAll("\\s+", ""):""); return mesBaseMaterialInfoMapper.selectMesBaseMaterialInfoList(mesBaseMaterialInfo); } diff --git a/hw-modules/hw-mes/src/main/java/com/hw/mes/service/impl/MesProductPlanDetailServiceImpl.java b/hw-modules/hw-mes/src/main/java/com/hw/mes/service/impl/MesProductPlanDetailServiceImpl.java index 2124341..14ac71e 100644 --- a/hw-modules/hw-mes/src/main/java/com/hw/mes/service/impl/MesProductPlanDetailServiceImpl.java +++ b/hw-modules/hw-mes/src/main/java/com/hw/mes/service/impl/MesProductPlanDetailServiceImpl.java @@ -240,7 +240,8 @@ public class MesProductPlanDetailServiceImpl implements IMesProductPlanDetailSer } //如果是五楼拆分,校验是否有绑定条码 - if (mesProductPlanDetail.getProcessType().equals(MesConstants.MES_PROCESS_TYPE_FIFTH_SPLIT)) { + if (StringUtils.isNotEmpty(mesProductPlanDetail.getProcessType()) + && mesProductPlanDetail.getProcessType().equals(MesConstants.MES_PROCESS_TYPE_FIFTH_SPLIT)) { MesBaseBarcodeInfo queryBaseBarcodeInfo = new MesBaseBarcodeInfo(); queryBaseBarcodeInfo.setPlanDetailCode(dbProductPlanDetail.getPlanDetailCode()); List mesBaseBarcodeInfos = mesBaseBarcodeInfoMapper.selectMesBaseBarcodeInfoList(queryBaseBarcodeInfo); @@ -283,7 +284,7 @@ public class MesProductPlanDetailServiceImpl implements IMesProductPlanDetailSer dbProductPlan.setPlanStatus(MesConstants.MES_PRODUCT_PLAN_STATUS_FINISH); dbProductPlan.setRealEndTime(currentDate); - //todo:更新生产任务状态、结束时间和完成数量(根据finalprocessFlag更新生产任务) + //todo:更新生产任务(生产工单)状态、结束时间和完成数量(根据finalprocessFlag更新生产任务) } dbProductPlan.setCompleteAmount(newComplementAmount); @@ -430,7 +431,7 @@ public class MesProductPlanDetailServiceImpl implements IMesProductPlanDetailSer mesProductPlanDetail.setIsFlag("1"); mesProductPlanDetail.setUserId(userId); mesProductPlanDetail.setUserName(userName); - mesProductPlan.setRealBeginTime(currentDate); + mesProductPlanDetail.setRealBeginTime(currentDate); mesProductPlanDetail.setCreateTime(currentDate); mesProductPlanDetail.setCreateBy(userName); diff --git a/hw-modules/hw-mes/src/main/java/com/hw/mes/service/impl/MesProductPlanServiceImpl.java b/hw-modules/hw-mes/src/main/java/com/hw/mes/service/impl/MesProductPlanServiceImpl.java index 0431610..8bc50dd 100644 --- a/hw-modules/hw-mes/src/main/java/com/hw/mes/service/impl/MesProductPlanServiceImpl.java +++ b/hw-modules/hw-mes/src/main/java/com/hw/mes/service/impl/MesProductPlanServiceImpl.java @@ -131,6 +131,9 @@ public class MesProductPlanServiceImpl implements IMesProductPlanService { @Override public int insertMesProductPlan(MesProductPlan mesProductPlan) { if (mesProductPlan.getDispatchAmount().compareTo(BigDecimal.ZERO) > 0) { + if (mesProductPlan.getSaleOrderId() == null) { + mesProductPlan.setSaleOrderId(0L); + } mesProductPlan.setPlanAmount(mesProductPlan.getDispatchAmount()); mesProductPlan.setCreateBy(SecurityUtils.getUsername()); mesProductPlan.setCreateTime(DateUtils.getNowDate()); @@ -413,8 +416,9 @@ public class MesProductPlanServiceImpl implements IMesProductPlanService { @Override public List getDrawings(MesProductPlan mesProductPlan) { String attachId = mesProductPlan.getAttachId(); + List baseAttachInfos; - if (attachId != null) { + if (StringUtils.isNotEmpty(attachId)) { MesBaseAttachInfo queryBaseAttachInfo = new MesBaseAttachInfo(); queryBaseAttachInfo.setAttachIdStr(attachId); baseAttachInfos = mesBaseAttachInfoMapper.selectMesBaseAttachInfoList(queryBaseAttachInfo); @@ -425,16 +429,31 @@ public class MesProductPlanServiceImpl implements IMesProductPlanService { productPlanDetails.forEach(productPlanDetail -> { for (MesBaseAttachInfo baseAttachInfo : baseAttachInfos) { if (productPlanDetail.getAttachId() != null && productPlanDetail.getAttachId().equals(baseAttachInfo.getAttachId())) { - baseAttachInfo.setDispatchFlag(true); + baseAttachInfo.setPlanDetailStatus(productPlanDetail.getPlanDetailStatus()); } } }); } - return baseAttachInfos; + } else { + baseAttachInfos = new ArrayList<>(); + MesBaseAttachInfo baseAttachInfo = new MesBaseAttachInfo(); + baseAttachInfo.setAttachId(0L); + baseAttachInfo.setAttachName("无图纸"); + + MesProductPlanDetail queryProductPlanDetail = new MesProductPlanDetail(); + queryProductPlanDetail.setPlanId(mesProductPlan.getPlanId()); + queryProductPlanDetail.setAttachId(0L); + List mesProductPlanDetails = productPlanDetailMapper.selectMesProductPlanDetailList(queryProductPlanDetail); + if (mesProductPlanDetails != null && !mesProductPlanDetails.isEmpty()) { + MesProductPlanDetail mesProductPlanDetail = mesProductPlanDetails.get(0); + baseAttachInfo.setPlanDetailStatus(mesProductPlanDetail.getPlanDetailStatus()); + } + + baseAttachInfos.add(baseAttachInfo); } - return null; + return baseAttachInfos; } @@ -479,7 +498,7 @@ public class MesProductPlanServiceImpl implements IMesProductPlanService { if (!barcodeType.equals(MesConstants.MES_BARCODE_TYPE_RAW)) { throw new ServiceException("此条码为非原材料条码"); } - + String userName = SecurityUtils.getUsername(); Date currentDate = new Date(); MesMaterialCheckResult mesMaterialCheckResult = mesMaterialCheckResultMapper. diff --git a/hw-modules/hw-mes/src/main/resources/mapper/mes/MesBaseBarcodeInfoMapper.xml b/hw-modules/hw-mes/src/main/resources/mapper/mes/MesBaseBarcodeInfoMapper.xml index 95ac1a6..70a4384 100644 --- a/hw-modules/hw-mes/src/main/resources/mapper/mes/MesBaseBarcodeInfoMapper.xml +++ b/hw-modules/hw-mes/src/main/resources/mapper/mes/MesBaseBarcodeInfoMapper.xml @@ -61,6 +61,7 @@ bbi.material_id, bmi.material_code, bmi.material_name, + bmi.material_spec, bbi.manufacturer_id, bbi.product_barcode, bbi.amount, @@ -102,6 +103,14 @@ and bbi.batch_code = #{batchCode} and bbi.pallet_info_code = #{palletInfoCode} and bbi.material_id = #{materialId} + + and bmi.material_code like concat('%', #{materialCode}, + '%') + and bmi.material_name like concat('%', #{materialName}, + '%') + and replace(bmi.material_spec,' ','') like concat('%', #{materialSpec}, + '%') + and bbi.manufacturer_id = #{manufacturerId} and bbi.amount = #{amount} and bbi.machine_name like concat('%', #{machineName}, diff --git a/hw-modules/hw-mes/src/main/resources/mapper/mes/MesBaseMaterialInfoMapper.xml b/hw-modules/hw-mes/src/main/resources/mapper/mes/MesBaseMaterialInfoMapper.xml index eb92165..fa5cd26 100644 --- a/hw-modules/hw-mes/src/main/resources/mapper/mes/MesBaseMaterialInfoMapper.xml +++ b/hw-modules/hw-mes/src/main/resources/mapper/mes/MesBaseMaterialInfoMapper.xml @@ -99,7 +99,8 @@ and bmi.material_unit_id = #{materialUnitId} and bmi.material_unit = #{materialUnit} and bmi.material_matkl = #{materialMatkl} - and bmi.material_spec = #{materialSpec} + and replace(bmi.material_spec,' ','') like concat('%', #{materialSpec}, + '%') and bmi.net_weight = #{netWeight} and bmi.gross_weight = #{grossWeight} and bmi.factory_id = #{factoryId} diff --git a/hw-modules/hw-mes/src/main/resources/mapper/mes/MesBasePalletInfoMapper.xml b/hw-modules/hw-mes/src/main/resources/mapper/mes/MesBasePalletInfoMapper.xml index 9f2ddcf..ce650cb 100644 --- a/hw-modules/hw-mes/src/main/resources/mapper/mes/MesBasePalletInfoMapper.xml +++ b/hw-modules/hw-mes/src/main/resources/mapper/mes/MesBasePalletInfoMapper.xml @@ -105,4 +105,9 @@ where pallet_info_code = #{palletInfoCode} + + diff --git a/hw-modules/hw-mes/src/main/resources/mapper/mes/MesProductPlanDetailMapper.xml b/hw-modules/hw-mes/src/main/resources/mapper/mes/MesProductPlanDetailMapper.xml index 4b68741..cfc331a 100644 --- a/hw-modules/hw-mes/src/main/resources/mapper/mes/MesProductPlanDetailMapper.xml +++ b/hw-modules/hw-mes/src/main/resources/mapper/mes/MesProductPlanDetailMapper.xml @@ -36,6 +36,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and plan_id = #{planId} and plan_code = #{planCode} and user_id = #{userId} + and attach_id = #{attachId} and user_name like concat('%', #{userName}, '%') and real_begin_time = #{realBeginTime} and real_end_time = #{realEndTime} diff --git a/hw-modules/hw-wms/src/main/java/com/hw/wms/service/impl/WmsBaseLocationServiceImpl.java b/hw-modules/hw-wms/src/main/java/com/hw/wms/service/impl/WmsBaseLocationServiceImpl.java index 50cef7d..73664fe 100644 --- a/hw-modules/hw-wms/src/main/java/com/hw/wms/service/impl/WmsBaseLocationServiceImpl.java +++ b/hw-modules/hw-wms/src/main/java/com/hw/wms/service/impl/WmsBaseLocationServiceImpl.java @@ -7,6 +7,7 @@ import com.hw.common.core.utils.DateUtils; import com.hw.common.core.utils.StringUtils; import com.hw.common.security.utils.SecurityUtils; //import com.hw.printer.api.RemotePrinterService; +import com.hw.printer.api.RemotePrinterService; import com.hw.wms.domain.WmsBaseLocation; import com.hw.wms.domain.WmsBaseWarehouse; import com.hw.wms.mapper.WmsBaseLocationMapper; @@ -33,8 +34,8 @@ public class WmsBaseLocationServiceImpl implements IWmsBaseLocationService { @Autowired private WmsBaseWarehouseMapper wmsBaseWarehouseMapper; -// @Resource -// private RemotePrinterService remotePrinterService; + @Resource + private RemotePrinterService remotePrinterService; /** * 查询库位 @@ -189,7 +190,7 @@ public class WmsBaseLocationServiceImpl implements IWmsBaseLocationService { params.put("text", qrCode); params.put("qrCode", qrCode); //调用的打印接口 -// remotePrinterService.printLocationLabel(params, SecurityConstants.INNER); + remotePrinterService.printLocationLabel(params, SecurityConstants.INNER); } catch (Exception e) { buffer.append("打印料箱条码报错——[条码内容:").append(qrCode).append("]").append(e.getMessage()); } diff --git a/hw-modules/hw-wms/src/main/java/com/hw/wms/service/impl/WmsRawOutstockServiceImpl.java b/hw-modules/hw-wms/src/main/java/com/hw/wms/service/impl/WmsRawOutstockServiceImpl.java index e70afe5..e0a99a6 100644 --- a/hw-modules/hw-wms/src/main/java/com/hw/wms/service/impl/WmsRawOutstockServiceImpl.java +++ b/hw-modules/hw-wms/src/main/java/com/hw/wms/service/impl/WmsRawOutstockServiceImpl.java @@ -8,6 +8,7 @@ import com.hw.common.core.domain.R; import com.hw.common.core.exception.ServiceException; import com.hw.common.core.utils.StringUtils; import com.hw.common.core.utils.uuid.Seq; +import com.hw.common.security.service.TokenService; import com.hw.common.security.utils.SecurityUtils; import com.hw.mes.api.RemoteMesService; import com.hw.mes.api.domain.MesBaseBarcodeInfo; @@ -18,6 +19,8 @@ import com.hw.wms.domain.*; import com.hw.wms.domain.vo.*; import com.hw.wms.mapper.*; import com.hw.wms.service.IWmsRawOutstockService; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpEntity; import org.springframework.http.HttpHeaders; @@ -39,6 +42,9 @@ import java.util.stream.Collectors; */ @Service public class WmsRawOutstockServiceImpl implements IWmsRawOutstockService { + private static final Logger log = LoggerFactory.getLogger(WmsRawOutstockServiceImpl.class); + + @Autowired private WmsRawOutstockMapper wmsRawOutstockMapper; @@ -624,6 +630,7 @@ public class WmsRawOutstockServiceImpl implements IWmsRawOutstockService { toInsertedRawOutstock.setApplyBy(userName); toInsertedRawOutstock.setApplyReason(wmsRawOutstockParam.getApplyReason()); toInsertedRawOutstock.setApplyDate(currentDate); + log.info("taskType:"+wmsRawOutstockParam.getTaskType()+",stationcode:"+wmsConfig.getFifthSplitStationCode()); if (wmsRawOutstockParam.getTaskType().equals(WmsConstants.WMS_RAW_OUTSTOCK_TASK_TYPE_PRODUCTION_PICKING)) { toInsertedRawOutstock.setEndStationCode(wmsRawOutstockParam.getEndStationCode()); diff --git a/hw-modules/hw-wms/src/main/java/com/hw/wms/service/impl/WmsTransferServiceImpl.java b/hw-modules/hw-wms/src/main/java/com/hw/wms/service/impl/WmsTransferServiceImpl.java index 69fe2e5..60f9bab 100644 --- a/hw-modules/hw-wms/src/main/java/com/hw/wms/service/impl/WmsTransferServiceImpl.java +++ b/hw-modules/hw-wms/src/main/java/com/hw/wms/service/impl/WmsTransferServiceImpl.java @@ -4,6 +4,7 @@ import java.math.BigDecimal; import java.util.Date; import java.util.List; +import com.hw.common.core.constant.MesConstants; import com.hw.common.core.constant.SecurityConstants; import com.hw.common.core.constant.WmsConstants; import com.hw.common.core.domain.R; @@ -321,8 +322,13 @@ public class WmsTransferServiceImpl implements IWmsTransferService { throw new ServiceException("请打印成品条码入成品库"); } + + if(!mesBaseBarcodeInfo.getPrintFlag().equals(MesConstants.MES_BARCODE_PRINT_FLAG_YES)){ + throw new ServiceException("请先打印条码后进行入库操作"); + } + //如果是成品条码,则只能入成品库 - if (StringUtils.isEmpty(mesBaseBarcodeInfo.getBindBarcode())) { + if (StringUtils.isEmpty(mesBaseBarcodeInfo.getProductBarcode())) { throw new ServiceException("物料条码有误,没有绑定"); } if (!targetWarehouse.getWarehouseFloor().equals(5L) || @@ -330,7 +336,7 @@ public class WmsTransferServiceImpl implements IWmsTransferService { throw new ServiceException("请入5楼成品库"); } - queryTransfer.setProductBatch(mesBaseBarcodeInfo.getBindBarcode()); + queryTransfer.setProductBatch(mesBaseBarcodeInfo.getProductBarcode()); /**判断有没有已出库的转库记录*/ List wmsTransfers = wmsTransferMapper.selectWmsTransferList(queryTransfer); diff --git a/hw-ui/src/api/mes/barcode.js b/hw-ui/src/api/mes/barcode.js index 6604474..c3da48d 100644 --- a/hw-ui/src/api/mes/barcode.js +++ b/hw-ui/src/api/mes/barcode.js @@ -130,6 +130,16 @@ export function addProductBarcode(data) { +// 无采购订单新增原材料条码信息 +export function checkBarcode(data) { + return request({ + url: '/mes/barcode/checkBarcode', + method: 'post', + data: data + }) +} + + // 无采购订单新增原材料条码信息 export function addNoPurchaseBarcode(data) { return request({ diff --git a/hw-ui/src/views/board/fourthFloor/laserLight.vue b/hw-ui/src/views/board/fourthFloor/laserLight.vue index 2924bea..08e9ec6 100644 --- a/hw-ui/src/views/board/fourthFloor/laserLight.vue +++ b/hw-ui/src/views/board/fourthFloor/laserLight.vue @@ -3,7 +3,7 @@
京源环保生产管理系统
-
计划明细
+
生产明细
@@ -33,9 +33,12 @@
- 板材领料 - 下发图纸 - 完成 + 板材领料 + + 完成 +
@@ -92,11 +95,12 @@ title="确定开始计划吗?" @confirm="startNextProduction(props.row,i)" > + 开始 + type="text">{{ !i.planDetailStatus ? "开始" : PLAN_DETAIL_STATUS_STR[i.planDetailStatus]}}
@@ -126,7 +130,7 @@ width="80" > - + - +