From d2c06b80a8eb585dc2174c769e7d6d0308eea7dc Mon Sep 17 00:00:00 2001 From: "XI_TENG\\xixi_" <971623072> Date: Fri, 26 Apr 2024 15:49:27 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9D=83=E9=99=90=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/resources/mapper/scm/BomMapper.xml | 42 +++++++++---------- .../mapper/scm/BusinessLineMapper.xml | 11 +++++ .../java/jnpf/mapper/BusinessLineMapper.java | 3 ++ .../jnpf/service/BusinessLineService.java | 4 ++ .../jnpf/service/impl/BomServiceImpl.java | 20 ++++----- .../service/impl/BusinessLineServiceImpl.java | 11 +++++ .../impl/WarehousingInventoryServiceImpl.java | 5 ++- .../service/impl/WorkOrderServiceImpl.java | 4 +- .../controller/BusinessLineController.java | 9 +++- .../ProductWarehouseController.java | 3 ++ .../WarehousingNotificationController.java | 15 ++++++- .../WarehousingReceiveController.java | 1 + .../WarehousingReturnController.java | 18 +++++++- .../views/scm/publicPopup/DriverGoodsBox.vue | 23 ++++++---- .../views/scm/publicPopup/VehicleGoodsBox.vue | 2 + .../warehousing/warehousingreturn/form.vue | 10 +++-- 16 files changed, 131 insertions(+), 50 deletions(-) diff --git a/jnpf-java-boot/jnpf-admin/src/main/resources/mapper/scm/BomMapper.xml b/jnpf-java-boot/jnpf-admin/src/main/resources/mapper/scm/BomMapper.xml index 9ad10ed9..68fe22fa 100644 --- a/jnpf-java-boot/jnpf-admin/src/main/resources/mapper/scm/BomMapper.xml +++ b/jnpf-java-boot/jnpf-admin/src/main/resources/mapper/scm/BomMapper.xml @@ -21,36 +21,36 @@ + + + diff --git a/jnpf-java-boot/jnpf-scm/jnpf-scm-biz/src/main/java/jnpf/mapper/BusinessLineMapper.java b/jnpf-java-boot/jnpf-scm/jnpf-scm-biz/src/main/java/jnpf/mapper/BusinessLineMapper.java index c95d73db..0e402401 100644 --- a/jnpf-java-boot/jnpf-scm/jnpf-scm-biz/src/main/java/jnpf/mapper/BusinessLineMapper.java +++ b/jnpf-java-boot/jnpf-scm/jnpf-scm-biz/src/main/java/jnpf/mapper/BusinessLineMapper.java @@ -28,4 +28,7 @@ public interface BusinessLineMapper extends BaseMapper { //业务组织配置左树 List queryBusinessOrganizeConfigTree(String organize); + + //工厂基地建模左树添加权限 + List queryBusinessFactoryTree(String organize); } diff --git a/jnpf-java-boot/jnpf-scm/jnpf-scm-biz/src/main/java/jnpf/service/BusinessLineService.java b/jnpf-java-boot/jnpf-scm/jnpf-scm-biz/src/main/java/jnpf/service/BusinessLineService.java index ef04ddab..ae4d7878 100644 --- a/jnpf-java-boot/jnpf-scm/jnpf-scm-biz/src/main/java/jnpf/service/BusinessLineService.java +++ b/jnpf-java-boot/jnpf-scm/jnpf-scm-biz/src/main/java/jnpf/service/BusinessLineService.java @@ -51,4 +51,8 @@ public interface BusinessLineService extends IService { int queryUserCountInfo(String id); //业务组织配置左树 List queryBusinessOrganizeConfigTree(); + + + //工厂基地建模左树添加权限 + List queryBusinessFactory(); } diff --git a/jnpf-java-boot/jnpf-scm/jnpf-scm-biz/src/main/java/jnpf/service/impl/BomServiceImpl.java b/jnpf-java-boot/jnpf-scm/jnpf-scm-biz/src/main/java/jnpf/service/impl/BomServiceImpl.java index 0e455412..a761d95e 100644 --- a/jnpf-java-boot/jnpf-scm/jnpf-scm-biz/src/main/java/jnpf/service/impl/BomServiceImpl.java +++ b/jnpf-java-boot/jnpf-scm/jnpf-scm-biz/src/main/java/jnpf/service/impl/BomServiceImpl.java @@ -237,7 +237,7 @@ public class BomServiceImpl extends ServiceImpl implements JsonUtil.getObjectToString(bomPagination.getBomCode()) : String.valueOf(bomPagination.getBomCode()); // bomQueryWrapper.lambda().like(BomEntity::getBomCode,value); - bomQueryWrapper.like("t1.BOM_CODE",value); + bomQueryWrapper.like("a.BOM_CODE",value); } if(ObjectUtil.isNotEmpty(bomPagination.getProductName())){ @@ -246,7 +246,7 @@ public class BomServiceImpl extends ServiceImpl implements JsonUtil.getObjectToString(bomPagination.getProductName()) : String.valueOf(bomPagination.getProductName()); // bomQueryWrapper.lambda().like(BomEntity::getBomCode,value); - bomQueryWrapper.like("t4.NAME",value); + bomQueryWrapper.like("d.NAME",value); } @@ -257,13 +257,13 @@ public class BomServiceImpl extends ServiceImpl implements JsonUtil.getObjectToString(bomPagination.getBomName()) : String.valueOf(bomPagination.getBomName()); // bomQueryWrapper.lambda().like(BomEntity::getBomName,value); - bomQueryWrapper.like("t1.BOM_NAME",value); + bomQueryWrapper.like("a.BOM_NAME",value); } if(ObjectUtil.isNotEmpty(bomPagination.getBomStatus())){ bomNum++; // bomQueryWrapper.lambda().eq(BomEntity::getBomStatus,bomPagination.getBomStatus()); - bomQueryWrapper.eq("t1.BOM_STATUS",bomPagination.getBomStatus()); + bomQueryWrapper.eq("a.BOM_STATUS",bomPagination.getBomStatus()); } @@ -292,7 +292,7 @@ public class BomServiceImpl extends ServiceImpl implements intersection.add("jnpfNullList"); } // bomQueryWrapper.lambda().in(BomEntity::getId, intersection); - bomQueryWrapper.in("t1.id", intersection); + bomQueryWrapper.in("a.id", intersection); } //是否有高级查询 if (StringUtil.isNotEmpty(superOp)){ @@ -300,7 +300,7 @@ public class BomServiceImpl extends ServiceImpl implements allSuperIDlist.add("jnpfNullList"); } List finalAllSuperIDlist = allSuperIDlist; - bomQueryWrapper.and(t->t.in("t1.id", finalAllSuperIDlist)); + bomQueryWrapper.and(t->t.in("a.id", finalAllSuperIDlist)); } //是否有数据过滤查询 @@ -309,15 +309,15 @@ public class BomServiceImpl extends ServiceImpl implements allRuleIDlist.add("jnpfNullList"); } List finalAllRuleIDlist = allRuleIDlist; - bomQueryWrapper.and(t->t.in("t1.id", finalAllRuleIDlist)); + bomQueryWrapper.and(t->t.in("a.id", finalAllRuleIDlist)); } //假删除标志 - bomQueryWrapper.isNull("t1.f_delete_mark"); + bomQueryWrapper.isNull("a.f_delete_mark"); //排序 if(StringUtil.isEmpty(bomPagination.getSidx())){ // bomQueryWrapper.lambda().orderByDesc(BomEntity::getId); - bomPagination.setSidx("t1.f_creator_time"); + bomPagination.setSidx("a.f_creator_time"); bomPagination.setSort("DESC"); }else{ try { @@ -328,7 +328,7 @@ public class BomServiceImpl extends ServiceImpl implements declaredField.setAccessible(true); String value = declaredField.getAnnotation(TableField.class).value(); // bomQueryWrapper="asc".equals(bomPagination.getSort().toLowerCase())?bomQueryWrapper.orderByAsc(value):bomQueryWrapper.orderByDesc(value); - bomPagination.setSidx("t1." + value); + bomPagination.setSidx("a." + value); } catch (NoSuchFieldException e) { e.printStackTrace(); diff --git a/jnpf-java-boot/jnpf-scm/jnpf-scm-biz/src/main/java/jnpf/service/impl/BusinessLineServiceImpl.java b/jnpf-java-boot/jnpf-scm/jnpf-scm-biz/src/main/java/jnpf/service/impl/BusinessLineServiceImpl.java index b87dce52..77a4a97e 100644 --- a/jnpf-java-boot/jnpf-scm/jnpf-scm-biz/src/main/java/jnpf/service/impl/BusinessLineServiceImpl.java +++ b/jnpf-java-boot/jnpf-scm/jnpf-scm-biz/src/main/java/jnpf/service/impl/BusinessLineServiceImpl.java @@ -708,4 +708,15 @@ public class BusinessLineServiceImpl extends ServiceImpl queryBusinessFactory() { + UserInfo userInfo=userProvider.get(); + OrganizeEntity organizeEntity = organizeService.getInfo(userInfo.getOrganizeId()); + List organizeJsonId = Arrays.stream(organizeEntity.getCompanyIdTree().split(",")).collect(Collectors.toList()); + String organize = JSON.toJSONString(organizeJsonId); + organize = organize.replace("[",""); + organize = organize.replace("]",""); + return businessLineMapper.queryBusinessFactoryTree(organize); + } } diff --git a/jnpf-java-boot/jnpf-scm/jnpf-scm-biz/src/main/java/jnpf/service/impl/WarehousingInventoryServiceImpl.java b/jnpf-java-boot/jnpf-scm/jnpf-scm-biz/src/main/java/jnpf/service/impl/WarehousingInventoryServiceImpl.java index 6bd09c76..c9443958 100644 --- a/jnpf-java-boot/jnpf-scm/jnpf-scm-biz/src/main/java/jnpf/service/impl/WarehousingInventoryServiceImpl.java +++ b/jnpf-java-boot/jnpf-scm/jnpf-scm-biz/src/main/java/jnpf/service/impl/WarehousingInventoryServiceImpl.java @@ -30,6 +30,9 @@ import jnpf.util.*; import java.util.*; import jnpf.base.UserInfo; import jnpf.permission.entity.UserEntity; + +import javax.annotation.Resource; + /** * * warehousingInventory @@ -48,7 +51,7 @@ public class WarehousingInventoryServiceImpl extends ServiceImpl getList(WarehousingInventoryPagination warehousingInventoryPagination){ diff --git a/jnpf-java-boot/jnpf-scm/jnpf-scm-biz/src/main/java/jnpf/service/impl/WorkOrderServiceImpl.java b/jnpf-java-boot/jnpf-scm/jnpf-scm-biz/src/main/java/jnpf/service/impl/WorkOrderServiceImpl.java index 3f541775..5d23803b 100644 --- a/jnpf-java-boot/jnpf-scm/jnpf-scm-biz/src/main/java/jnpf/service/impl/WorkOrderServiceImpl.java +++ b/jnpf-java-boot/jnpf-scm/jnpf-scm-biz/src/main/java/jnpf/service/impl/WorkOrderServiceImpl.java @@ -835,8 +835,8 @@ public class WorkOrderServiceImpl extends ServiceImpl> WorkTree() { - List list = businessLineService.list(); + + +// List list = businessLineService.list(); + List list = businessLineService.queryBusinessFactory(); List workTreeList =new ArrayList<>(); for (BusinessLineEntity businessLineEntity:list){ if (businessLineEntity.getDiffFlag().equals("2")||businessLineEntity.getDiffFlag().equals("5")){ diff --git a/jnpf-java-boot/jnpf-scm/jnpf-scm-controller/src/main/java/jnpf/controller/ProductWarehouseController.java b/jnpf-java-boot/jnpf-scm/jnpf-scm-controller/src/main/java/jnpf/controller/ProductWarehouseController.java index d51cc4d4..240ff872 100644 --- a/jnpf-java-boot/jnpf-scm/jnpf-scm-controller/src/main/java/jnpf/controller/ProductWarehouseController.java +++ b/jnpf-java-boot/jnpf-scm/jnpf-scm-controller/src/main/java/jnpf/controller/ProductWarehouseController.java @@ -145,6 +145,7 @@ public class ProductWarehouseController { @Operation(summary = "加工和bom获取商品列表") @PostMapping("/getBomProductlist") public ActionResult bomProductlist(@RequestBody ProductWarehousePagination productWarehousePagination)throws IOException{ + productWarehousePagination.setMenuId("522017337285542021"); List list= productWarehouseService.getProductList(productWarehousePagination); List> realList = new ArrayList<>(); for (ProductWarehouseEntity entity : list) { @@ -224,6 +225,7 @@ public class ProductWarehouseController { @Operation(summary = "盘点单根据库存取商品列表") @PostMapping("/getInventoryLProductlist") public ActionResult inventoryLProductlist(@RequestBody ProductWarehousePagination productWarehousePagination)throws IOException{ + productWarehousePagination.setMenuId("522017337285542021"); List list= productWarehouseService.getProductInventoryList(productWarehousePagination); List> realList=new ArrayList<>(); for (ProductWarehouseEntity entity : list) { @@ -394,6 +396,7 @@ public class ProductWarehouseController { @Operation(summary = "报损单根据库存获取商品") @PostMapping("/postInventoryReportlossProductlist") public ActionResult InventoryReportlossProductlist(@RequestBody ProductWarehousePagination productWarehousePagination) throws IOException{ + productWarehousePagination.setMenuId("522017337285542021"); List list= productWarehouseService.getProductInventoryReportlossList(productWarehousePagination); List> realList=new ArrayList<>(); for (ProductWarehouseEntity entity : list) { diff --git a/jnpf-java-boot/jnpf-scm/jnpf-scm-controller/src/main/java/jnpf/controller/WarehousingNotificationController.java b/jnpf-java-boot/jnpf-scm/jnpf-scm-controller/src/main/java/jnpf/controller/WarehousingNotificationController.java index b56e18e4..7e9fd4bd 100644 --- a/jnpf-java-boot/jnpf-scm/jnpf-scm-controller/src/main/java/jnpf/controller/WarehousingNotificationController.java +++ b/jnpf-java-boot/jnpf-scm/jnpf-scm-controller/src/main/java/jnpf/controller/WarehousingNotificationController.java @@ -1,6 +1,7 @@ package jnpf.controller; import cn.hutool.core.util.ObjectUtil; +import com.alibaba.fastjson.JSON; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; @@ -11,7 +12,9 @@ import jnpf.engine.service.FlowTaskNodeService; import jnpf.engine.service.FlowTaskService; import jnpf.exception.DataException; import jnpf.model.voucher.VoucherPagination; +import jnpf.permission.entity.OrganizeEntity; import jnpf.permission.entity.UserEntity; +import jnpf.permission.service.OrganizeService; import jnpf.service.*; import jnpf.entity.*; import jnpf.util.*; @@ -84,6 +87,8 @@ public class WarehousingNotificationController { private VoucherService voucherService; @Autowired private BusinessCargoService businessCargoService; + @Autowired + private OrganizeService organizeService; @Autowired @@ -678,10 +683,18 @@ public class WarehousingNotificationController { @Operation(summary = "获取Notification选择的凭证和商品列表") @PostMapping("/getNotificationVoucherProductList") public ActionResult queryNotificationVoucherProductList(@RequestBody VoucherPagination voucherPagination) throws IOException{ + UserInfo userInfo=userProvider.get(); + OrganizeEntity organizeEntity = organizeService.getInfo(userInfo.getOrganizeId()); + List organizeJsonId = Arrays.stream(organizeEntity.getCompanyIdTree().split(",")).collect(Collectors.toList()); + String organize = JSON.toJSONString(organizeJsonId); + organize = organize.replace("[",""); + organize = organize.replace("]",""); String id = voucherPagination.getNotid(); QueryWrapper warehousingProductEntityQueryWrapper=new QueryWrapper<>(); warehousingProductEntityQueryWrapper.lambda().eq(WarehousingProductEntity::getWarehousingId,id); - List warehousingProductEntityList = warehousingProductService.list(warehousingProductEntityQueryWrapper); + warehousingProductEntityQueryWrapper.like("organize_json_id",organize); + + List warehousingProductEntityList = warehousingProductService.list(warehousingProductEntityQueryWrapper); List list=new ArrayList<>(); for (WarehousingProductEntity warehousingProductEntity:warehousingProductEntityList){ diff --git a/jnpf-java-boot/jnpf-scm/jnpf-scm-controller/src/main/java/jnpf/controller/WarehousingReceiveController.java b/jnpf-java-boot/jnpf-scm/jnpf-scm-controller/src/main/java/jnpf/controller/WarehousingReceiveController.java index c0fbc1aa..5bd7453e 100644 --- a/jnpf-java-boot/jnpf-scm/jnpf-scm-controller/src/main/java/jnpf/controller/WarehousingReceiveController.java +++ b/jnpf-java-boot/jnpf-scm/jnpf-scm-controller/src/main/java/jnpf/controller/WarehousingReceiveController.java @@ -613,6 +613,7 @@ public class WarehousingReceiveController { WorkOrderPagination workOrderPagination = new WorkOrderPagination(); workOrderPagination.setWarehouseId(warehouseId); + workOrderPagination.setMenuId("523106990231139333"); List list = workOrderService.getReceiveList(workOrderPagination); for (WorkOrderEntity entity : list) { Map workOrderMap = JsonUtil.entityToMap(entity); diff --git a/jnpf-java-boot/jnpf-scm/jnpf-scm-controller/src/main/java/jnpf/controller/WarehousingReturnController.java b/jnpf-java-boot/jnpf-scm/jnpf-scm-controller/src/main/java/jnpf/controller/WarehousingReturnController.java index 8c844838..5a9311f3 100644 --- a/jnpf-java-boot/jnpf-scm/jnpf-scm-controller/src/main/java/jnpf/controller/WarehousingReturnController.java +++ b/jnpf-java-boot/jnpf-scm/jnpf-scm-controller/src/main/java/jnpf/controller/WarehousingReturnController.java @@ -1,6 +1,7 @@ package jnpf.controller; import cn.hutool.core.util.ObjectUtil; +import com.alibaba.fastjson.JSON; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; @@ -13,7 +14,9 @@ import jnpf.exception.DataException; import jnpf.model.warehousingstorage.WarehousingStorageForm; import jnpf.model.warehousingstorage.WarehousingStorageProductModel; import jnpf.model.workorder.WorkOrderPrimaryModel; +import jnpf.permission.entity.OrganizeEntity; import jnpf.permission.entity.UserEntity; +import jnpf.permission.service.OrganizeService; import jnpf.service.*; import jnpf.entity.*; import jnpf.util.*; @@ -98,6 +101,8 @@ public class WarehousingReturnController { private WarehousingStorageService warehousingStorageService; @Autowired private InventoryLogService inventoryLogService; + @Autowired + private OrganizeService organizeService; @Autowired private ConfigValueUtil configValueUtil; @@ -607,8 +612,17 @@ public class WarehousingReturnController { @GetMapping("/getreturnReceiveList") public ActionResult returnReceiveList(@RequestParam("warehouseId") String warehouseId) throws IOException{ // if (businessType.equals("1")){ - QueryWrapper warehousingReturnEntityQueryWrapper =new QueryWrapper<>(); - warehousingReturnEntityQueryWrapper.lambda().eq(WarehousingReceiveEntity::getWarehouseId,warehouseId); + + UserInfo userInfo=userProvider.get(); + OrganizeEntity organizeEntity = organizeService.getInfo(userInfo.getOrganizeId()); + List organizeJsonId = Arrays.stream(organizeEntity.getCompanyIdTree().split(",")).collect(Collectors.toList()); + String organize = JSON.toJSONString(organizeJsonId); + organize = organize.replace("[",""); + organize = organize.replace("]",""); + QueryWrapper warehousingReturnEntityQueryWrapper =new QueryWrapper<>(); + warehousingReturnEntityQueryWrapper.like("organize_json_id",organize); + warehousingReturnEntityQueryWrapper.lambda().eq(WarehousingReceiveEntity::getWarehouseId,warehouseId); + List warehousingReceiveEntityList =warehousingReceiveService.list(warehousingReturnEntityQueryWrapper); for (WarehousingReceiveEntity warehousingReceiveEntity:warehousingReceiveEntityList){ diff --git a/jnpf-java-boot/jnpf-web/src/views/scm/publicPopup/DriverGoodsBox.vue b/jnpf-java-boot/jnpf-web/src/views/scm/publicPopup/DriverGoodsBox.vue index c2511221..f2ea92f1 100644 --- a/jnpf-java-boot/jnpf-web/src/views/scm/publicPopup/DriverGoodsBox.vue +++ b/jnpf-java-boot/jnpf-web/src/views/scm/publicPopup/DriverGoodsBox.vue @@ -1,16 +1,18 @@