diff --git a/lms/nladmin-system/src/main/java/org/nl/b_lms/pdm/subpackagerelation/dao/mapper/PdmBiSubpackagerelationMapper.xml b/lms/nladmin-system/src/main/java/org/nl/b_lms/pdm/subpackagerelation/dao/mapper/PdmBiSubpackagerelationMapper.xml index 3149a4777..1b25e5058 100644 --- a/lms/nladmin-system/src/main/java/org/nl/b_lms/pdm/subpackagerelation/dao/mapper/PdmBiSubpackagerelationMapper.xml +++ b/lms/nladmin-system/src/main/java/org/nl/b_lms/pdm/subpackagerelation/dao/mapper/PdmBiSubpackagerelationMapper.xml @@ -84,7 +84,7 @@ WHERE b.point_status = '3' AND b.ivt_status = '3' AND a.sale_order_name = #{sale_order_name} - ORDER BY paper_tube_description + ORDER BY box_group diff --git a/lms/nladmin-system/src/main/java/org/nl/b_lms/pdm/subpackagerelation/service/impl/PdmBiSubpackagerelationServiceImpl.java b/lms/nladmin-system/src/main/java/org/nl/b_lms/pdm/subpackagerelation/service/impl/PdmBiSubpackagerelationServiceImpl.java index 7991d78c9..7306f0f6f 100644 --- a/lms/nladmin-system/src/main/java/org/nl/b_lms/pdm/subpackagerelation/service/impl/PdmBiSubpackagerelationServiceImpl.java +++ b/lms/nladmin-system/src/main/java/org/nl/b_lms/pdm/subpackagerelation/service/impl/PdmBiSubpackagerelationServiceImpl.java @@ -295,8 +295,11 @@ public class PdmBiSubpackagerelationServiceImpl extends ServiceImpl containerNameList = packagerelationList.stream() .map(PdmBiSubpackagerelation::getContainer_name) .collect(Collectors.toSet()); - BigDecimal totalWeight; List planList = iPdmBiSlittingproductionplanService.list(new LambdaQueryWrapper().in(PdmBiSlittingproductionplan::getContainer_name, containerNameList)); + if (CollectionUtils.isEmpty(planList)) { + throw new BadRequestException("该箱号不存在分切计划"); + } + BigDecimal totalWeight; totalWeight = planList.stream() .map(PdmBiSlittingproductionplan::getWeight) .filter(Objects::nonNull) diff --git a/lms/nladmin-system/src/main/java/org/nl/b_lms/sch/point/controller/BstIvtPackageinfoivtController.java b/lms/nladmin-system/src/main/java/org/nl/b_lms/sch/point/controller/BstIvtPackageinfoivtController.java index fb0fd0c6a..d9d4325c5 100644 --- a/lms/nladmin-system/src/main/java/org/nl/b_lms/sch/point/controller/BstIvtPackageinfoivtController.java +++ b/lms/nladmin-system/src/main/java/org/nl/b_lms/sch/point/controller/BstIvtPackageinfoivtController.java @@ -1,21 +1,25 @@ package org.nl.b_lms.sch.point.controller; -import java.util.Set; - import cn.dev33.satoken.annotation.SaIgnore; import cn.hutool.core.util.StrUtil; import com.alibaba.fastjson.JSONObject; -import org.nl.b_lms.sch.point.dao.BstIvtPackageinfoivt; -import org.nl.modules.common.exception.BadRequestException; -import org.springframework.web.bind.annotation.*; import lombok.RequiredArgsConstructor; - -import javax.annotation.Resource; - import lombok.extern.slf4j.Slf4j; +import org.nl.b_lms.sch.point.dao.BstIvtPackageinfoivt; +import org.nl.b_lms.sch.point.service.IbstIvtPackageinfoivtService; +import org.nl.common.TableDataInfo; +import org.nl.common.domain.query.PageQuery; +import org.nl.modules.common.exception.BadRequestException; +import org.nl.modules.logging.annotation.Log; +import org.nl.wms.pdm.ivt.service.dto.DeliveryPointIvtDto; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; -import org.nl.b_lms.sch.point.service.IbstIvtPackageinfoivtService; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; +import java.util.Map; +import java.util.Set; /** @@ -35,6 +39,19 @@ public class BstIvtPackageinfoivtController { private IbstIvtPackageinfoivtService bstIvtPackageinfoivtService; + /** + * 分页查询 + * + * @param whereJson 查询条件 + * @param page 分页参数 + */ + @GetMapping + @Log("查询点位库存") + public ResponseEntity query(@RequestParam Map whereJson, PageQuery page) { + return new ResponseEntity<>(TableDataInfo.build(bstIvtPackageinfoivtService.queryAll(whereJson, page)), HttpStatus.OK); + } + + /** * 一楼装箱区点位二次分配 * @@ -53,10 +70,7 @@ public class BstIvtPackageinfoivtController { return new ResponseEntity<>(bstIvtPackageinfoivtService.secondaryAllocationPoint(taskCode, actionType), HttpStatus.OK); } - /** - * agv二次分配类型(1、普通任务 2、取货二次分配 3、防货二次分配 4、取放货二次分配) - */ - private String agv_action_type; + /** * 新增数据 @@ -65,12 +79,28 @@ public class BstIvtPackageinfoivtController { * @return 新增结果 */ @PostMapping + @Log("修改点位库存") public ResponseEntity create(@RequestBody BstIvtPackageinfoivt params) { bstIvtPackageinfoivtService.create(params); return new ResponseEntity<>(HttpStatus.OK); } + /** + * 修改数据 + * @param params 实体对象 + * @return 修改结果 + */ + @PutMapping + @Log("修改点位库存") + //@SaCheckPermission("@el.check('deliverypointivt:edit')") + public ResponseEntity update(@Validated @RequestBody BstIvtPackageinfoivt params) { + bstIvtPackageinfoivtService.update(params); + return new ResponseEntity<>(HttpStatus.NO_CONTENT); + } + + + /** * 删除数据 * diff --git a/lms/nladmin-system/src/main/java/org/nl/b_lms/sch/point/service/IbstIvtPackageinfoivtService.java b/lms/nladmin-system/src/main/java/org/nl/b_lms/sch/point/service/IbstIvtPackageinfoivtService.java index 9b2f475c2..0ccba5603 100644 --- a/lms/nladmin-system/src/main/java/org/nl/b_lms/sch/point/service/IbstIvtPackageinfoivtService.java +++ b/lms/nladmin-system/src/main/java/org/nl/b_lms/sch/point/service/IbstIvtPackageinfoivtService.java @@ -75,6 +75,15 @@ public interface IbstIvtPackageinfoivtService extends IService queryAll(Map whereJson, PageQuery page) { - return bstIvtPackageinfoivtMapper.selectPage(new Page<>(page.getPage() + 1, page.getSize()), new QueryWrapper() - .lambda()); + LambdaQueryWrapper queryWrapper = new QueryWrapper().lambda(); + String isUsed = MapUtil.getStr(whereJson, "is_used"); + String pointCode = MapUtil.getStr(whereJson, "point_code"); + String packageInfoArea = MapUtil.getStr(whereJson, "packageinfo_area"); + String ivtStatus = MapUtil.getStr(whereJson, "ivt_status"); + if (StringUtils.isNotEmpty(isUsed)) { + queryWrapper.eq(BstIvtPackageinfoivt::getIs_used, isUsed); + } + if (StringUtils.isNotEmpty(pointCode)) { + queryWrapper.like(BstIvtPackageinfoivt::getPoint_code, pointCode); + } + if (StringUtils.isNotEmpty(packageInfoArea)) { + queryWrapper.eq(BstIvtPackageinfoivt::getPoint_status, packageInfoArea); + } + if (StringUtils.isNotEmpty(ivtStatus)) { + queryWrapper.eq(BstIvtPackageinfoivt::getIvt_status, ivtStatus); + } + return bstIvtPackageinfoivtMapper.selectPage(new Page<>(page.getPage() + 1, page.getSize()), queryWrapper); } @Override @@ -497,12 +515,27 @@ public class BstIvtPackageinfoivtServiceImpl extends ServiceImpl code; diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/pdm/ivt/rest/DeliveryPointIvtController.java b/lms/nladmin-system/src/main/java/org/nl/wms/pdm/ivt/rest/DeliveryPointIvtController.java index aea178a94..e05427f54 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/pdm/ivt/rest/DeliveryPointIvtController.java +++ b/lms/nladmin-system/src/main/java/org/nl/wms/pdm/ivt/rest/DeliveryPointIvtController.java @@ -46,7 +46,6 @@ public class DeliveryPointIvtController { @PutMapping @Log("修改分切输送线") - //@SaCheckPermission("@el.check('deliverypointivt:edit')") public ResponseEntity update(@Validated @RequestBody DeliveryPointIvtDto dto) { deliverypointivtService.update(dto); diff --git a/lms/nladmin-ui/src/views/wms/pdm/ivt/packageinfoivt/index.vue b/lms/nladmin-ui/src/views/wms/pdm/ivt/packageinfoivt/index.vue new file mode 100644 index 000000000..f6662abeb --- /dev/null +++ b/lms/nladmin-ui/src/views/wms/pdm/ivt/packageinfoivt/index.vue @@ -0,0 +1,248 @@ + + + + + diff --git a/lms/nladmin-ui/src/views/wms/pdm/ivt/packageinfoivt/packageinfoivt.js b/lms/nladmin-ui/src/views/wms/pdm/ivt/packageinfoivt/packageinfoivt.js new file mode 100644 index 000000000..f2ca94964 --- /dev/null +++ b/lms/nladmin-ui/src/views/wms/pdm/ivt/packageinfoivt/packageinfoivt.js @@ -0,0 +1,27 @@ +import request from '@/utils/request' + +export function add(data) { + return request({ + url: 'api/bstIvtPackageInfoIvt', + method: 'post', + data + }) +} + +export function del(ids) { + return request({ + url: 'api/bstIvtPackageInfoIvt', + method: 'delete', + data: ids + }) +} + +export function edit(data) { + return request({ + url: 'api/bstIvtPackageInfoIvt', + method: 'put', + data + }) +} + +export default { add, edit, del } diff --git a/lms/nladmin-ui/src/views/wms/pdm/sub/DivDialog.vue b/lms/nladmin-ui/src/views/wms/pdm/sub/DivDialog.vue index 75fcde62e..43420a03e 100644 --- a/lms/nladmin-ui/src/views/wms/pdm/sub/DivDialog.vue +++ b/lms/nladmin-ui/src/views/wms/pdm/sub/DivDialog.vue @@ -380,6 +380,9 @@ export default { if (this.currentSelection.length > 0 && this.$refs.dis_table.selection.length > 0) { debugger const descriptionList = this.currentSelection.filter(item => item.paper_tube_description !== null && item.paper_tube_description !== '') + if (descriptionList.length === 0) { + this.crud.notify('未查询到该子卷的规格信息,请检查子卷的分切计划信息!', CRUD.NOTIFICATION_TYPE.WARNING) + } const paper_tube_description = descriptionList[0].paper_tube_description const descriptionsAreSame = this.currentSelection.every(item => item.paper_tube_description === paper_tube_description) if (descriptionsAreSame) {