diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/database/brick/service/impl/MdBaseBrickInfoServiceImpl.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/database/brick/service/impl/MdBaseBrickInfoServiceImpl.java index 63e855d..9827cb0 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/database/brick/service/impl/MdBaseBrickInfoServiceImpl.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/database/brick/service/impl/MdBaseBrickInfoServiceImpl.java @@ -69,7 +69,9 @@ public class MdBaseBrickInfoServiceImpl extends ServiceImpl lam = new LambdaQueryWrapper<>(); lam.like(ObjectUtil.isNotEmpty(blurry), MdBaseMaterial::getMaterial_code, blurry) .or(ObjectUtil.isNotEmpty(blurry), l -> l.like(ObjectUtil.isNotEmpty(blurry), MdBaseMaterial::getMaterial_name, blurry)) + .like(ObjectUtil.isNotEmpty(material_spec), MdBaseMaterial::getMaterial_spec, material_spec) .eq(ObjectUtil.isNotEmpty(is_used), MdBaseMaterial::getIs_used, is_used) .eq(ObjectUtil.isNotEmpty(workshop_code), MdBaseMaterial::getWorkshop_code, workshop_code); IPage pages = new Page<>(page.getPage() + 1, page.getSize()); diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/acs/service/dto/to/acs/GetPalletizeResponse.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/acs/service/dto/to/acs/GetPalletizeResponse.java index 25da3ff..f5501e4 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/acs/service/dto/to/acs/GetPalletizeResponse.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/acs/service/dto/to/acs/GetPalletizeResponse.java @@ -10,6 +10,7 @@ import org.nl.wms.ext.acs.service.dto.PalletizeDto; public class GetPalletizeResponse extends BaseResponse { private PalletizeDto palletizeDto; + private Integer material_qty; public static GetPalletizeResponse responseOk(String requestNo) { GetPalletizeResponse response = new GetPalletizeResponse(); @@ -29,4 +30,14 @@ public class GetPalletizeResponse extends BaseResponse { response.setResponseDate(DateUtil.now()); return response; } + public static GetPalletizeResponse responseOk(String requestNo, PalletizeDto palletizeDto, Integer material_qty) { + GetPalletizeResponse response = new GetPalletizeResponse(); + response.setRequestNo(requestNo); + response.setCode(HttpStatus.HTTP_OK); + response.setMessage("请求成功"); + response.setPalletizeDto(palletizeDto); + response.setResponseDate(DateUtil.now()); + response.setMaterial_qty(material_qty); + return response; + } } diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/acs/service/impl/AcsToWmsServiceImpl.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/acs/service/impl/AcsToWmsServiceImpl.java index da7b3aa..64c026b 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/acs/service/impl/AcsToWmsServiceImpl.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/acs/service/impl/AcsToWmsServiceImpl.java @@ -5,8 +5,6 @@ import cn.hutool.core.util.IdUtil; import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.StrUtil; import cn.hutool.http.HttpStatus; -import com.alibaba.fastjson.JSON; -import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import lombok.SneakyThrows; @@ -67,7 +65,6 @@ import javax.annotation.PostConstruct; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.math.BigDecimal; -import java.util.List; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.TimeUnit; @@ -833,12 +830,13 @@ public class AcsToWmsServiceImpl implements AcsToWmsService { SchBaseVehiclematerialgroup baseVehiclematerialgroup = vehiclematerialgroupService.getGroupInfo(vehicleCode, vehicleType, GroupBindMaterialStatusEnum.BOUND.getValue()); String extData = baseVehiclematerialgroup.getExt_data(); - if (extData == null) { - return GetPalletizeResponse.responseOk(palletizeRequest.getRequestNo()); + PalletizeDto palletizeDto = new PalletizeDto(); + if (extData == null || extData.equals("null")) { + // 转成实体 + palletizeDto = CommonUtils.toJavaObject(extData, PalletizeDto.class); } - // 转成实体 - PalletizeDto palletizeDto = CommonUtils.toJavaObject(extData, PalletizeDto.class); - return GetPalletizeResponse.responseOk(palletizeRequest.getRequestNo(), palletizeDto); + return GetPalletizeResponse.responseOk(palletizeRequest.getRequestNo(), palletizeDto, + baseVehiclematerialgroup.getMaterial_qty()); } /** diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/mes/service/impl/WmsToMesServiceImpl.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/mes/service/impl/WmsToMesServiceImpl.java index 0f88d5d..b1020cf 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/mes/service/impl/WmsToMesServiceImpl.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/mes/service/impl/WmsToMesServiceImpl.java @@ -8,6 +8,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import lombok.extern.slf4j.Slf4j; +import org.nl.common.exception.BadRequestException; import org.nl.system.service.notice.ISysNoticeService; import org.nl.wms.database.brick.service.dao.MdBaseBrickInfo; import org.nl.wms.database.material.service.IMdBaseMaterialService; @@ -439,6 +440,9 @@ public class WmsToMesServiceImpl implements WmsToMesService { SchBasePoint device = pointService.getById(brickInfo.getGet_station()); // 获取工单 PdmBdWorkorder workorder = pdmBdWorkorderService.getByCode(brickInfo.getWorkorder_code()); + if (ObjectUtil.isEmpty(workorder)) { + throw new BadRequestException("工单不存在,上报MES失败"); + } MdBaseMaterial material = mdBaseMaterialService.getById(workorder.getMaterial_id()); String singleWeight = material.getSingle_weight(); String volume = brickInfo.getVolume(); diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pdm/track/service/dao/mapper/PdmBdProductionProcessTrackingMapper.xml b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pdm/track/service/dao/mapper/PdmBdProductionProcessTrackingMapper.xml index 5b95903..676f341 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pdm/track/service/dao/mapper/PdmBdProductionProcessTrackingMapper.xml +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pdm/track/service/dao/mapper/PdmBdProductionProcessTrackingMapper.xml @@ -19,6 +19,17 @@ LEFT JOIN sch_base_point p ON p.point_code = pt.process_location LEFT JOIN pdm_bd_workorder w ON w.workorder_code = vg.workorder_code LEFT JOIN md_base_material m ON m.material_id = vg.material_id + + + AND pt.buss_move_id = #{query.buss_move_id} + + + AND pt.record_time #{query.end_time} + + + AND pt.record_time =]]> #{query.begin_time} + + ORDER BY pt.buss_move_id, pt.record_time diff --git a/lms/nladmin-ui/src/views/wms/basedata/material/index.vue b/lms/nladmin-ui/src/views/wms/basedata/material/index.vue index c1236ad..6c9b4db 100644 --- a/lms/nladmin-ui/src/views/wms/basedata/material/index.vue +++ b/lms/nladmin-ui/src/views/wms/basedata/material/index.vue @@ -10,21 +10,21 @@ label-width="90px" label-suffix=":" > - - - - - + + + + + + + + + + + + + + + + + + @@ -51,28 +60,101 @@ - - + + - + - + - + - - + + + + + + + + + + + + + + - + + + + + + + + + + + - - + + + + - +