From 3dc308e91378dd44a1bff5ae7319607483ab7a64 Mon Sep 17 00:00:00 2001 From: yinq Date: Tue, 26 Dec 2023 15:16:00 +0800 Subject: [PATCH] =?UTF-8?q?change=20-=20=E5=BC=80=E6=94=BEapi=E9=89=B4?= =?UTF-8?q?=E6=9D=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/BaseCustomDataController.java | 2 +- .../framework/config/SecurityConfig.java | 9 ++++-- .../impl/ProductPlanInfoServiceImpl.java | 28 +++++++++---------- .../production/ProductPlanInfoMapper.xml | 2 +- .../report/ReportRepairMeasuresMapper.xml | 1 + 5 files changed, 23 insertions(+), 19 deletions(-) diff --git a/aucma-base/src/main/java/com/aucma/base/controller/BaseCustomDataController.java b/aucma-base/src/main/java/com/aucma/base/controller/BaseCustomDataController.java index 51bc34b..4856be5 100644 --- a/aucma-base/src/main/java/com/aucma/base/controller/BaseCustomDataController.java +++ b/aucma-base/src/main/java/com/aucma/base/controller/BaseCustomDataController.java @@ -38,7 +38,7 @@ public class BaseCustomDataController extends BaseController { /** * 查询自定义数据维护列表 */ - @PreAuthorize("@ss.hasPermi('base:customData:list')") +// @PreAuthorize("@ss.hasPermi('base:customData:list')") @GetMapping("/list") public TableDataInfo list(BaseCustomData baseCustomData) { startPage(); diff --git a/aucma-framework/src/main/java/com/aucma/framework/config/SecurityConfig.java b/aucma-framework/src/main/java/com/aucma/framework/config/SecurityConfig.java index 5dbb167..2568ee9 100644 --- a/aucma-framework/src/main/java/com/aucma/framework/config/SecurityConfig.java +++ b/aucma-framework/src/main/java/com/aucma/framework/config/SecurityConfig.java @@ -119,8 +119,13 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter .antMatchers(HttpMethod.POST, "/sap/port/**").permitAll() // 开放看板接口 .antMatchers(HttpMethod.POST, "/boardReport/**").permitAll() - .antMatchers(HttpMethod.POST, "/**/**/**").permitAll() - .antMatchers(HttpMethod.GET, "/**/**/**").permitAll() + .antMatchers(HttpMethod.GET, "/base/customData/**").permitAll() + .antMatchers(HttpMethod.GET, "/getInfo/**").permitAll() + .antMatchers(HttpMethod.GET, "/system/dict/data/type/**").permitAll() + .antMatchers(HttpMethod.GET, "/report/pdaRecord/getPdaRecord").permitAll() + .antMatchers(HttpMethod.GET, "/report/repairMeasures/getRepairMeasures").permitAll() +// .antMatchers(HttpMethod.POST, "/**/**/**").permitAll() +// .antMatchers(HttpMethod.GET, "/**/**/**").permitAll() // 除上面外的所有请求全部需要鉴权认证 .anyRequest().authenticated() .and() diff --git a/aucma-production/src/main/java/com/aucma/production/service/impl/ProductPlanInfoServiceImpl.java b/aucma-production/src/main/java/com/aucma/production/service/impl/ProductPlanInfoServiceImpl.java index cc4fa21..e6de127 100644 --- a/aucma-production/src/main/java/com/aucma/production/service/impl/ProductPlanInfoServiceImpl.java +++ b/aucma-production/src/main/java/com/aucma/production/service/impl/ProductPlanInfoServiceImpl.java @@ -114,8 +114,6 @@ public class ProductPlanInfoServiceImpl implements IProductPlanInfoService { */ @Override public Boolean releaseOrderPlan(BaseOrderInfo baseOrderInfo) { - - String orderCode = baseOrderInfo.getOrderCode(); String saleOrderCode = baseOrderInfo.getSaleOrderCode(); String saleOrderLineNumber = baseOrderInfo.getSaleOrderLineNumber(); @@ -133,7 +131,7 @@ public class ProductPlanInfoServiceImpl implements IProductPlanInfoService { throw new ServiceException("生产BOM信息不完整,请先维护生产BOM信息!"); } bomInfo.setIsPlanToStation(null); - List baseBomInfos= baseBomInfoService.selectBaseBomInfoList(bomInfo); + List baseBomInfos = baseBomInfoService.selectBaseBomInfoList(bomInfo); try { for (BaseBomInfo baseBomInfo : baseBomInfos) { if (baseBomInfo.getMaterialType().equals(MaterialConstants.BOX_MATERIAL_TYPE)) { @@ -150,18 +148,18 @@ public class ProductPlanInfoServiceImpl implements IProductPlanInfoService { planInfo.setPlanCode(PlanCodeUtils.getPlanCode()); planInfo.setProductLineCode("1005"); this.insertProductPlanInfo(planInfo); - - if (baseBomInfo.getMaterialType().equals(MaterialConstants.COAMING_MATERIAL_TYPE)) { - planInfo.setPlanCode(PlanCodeUtils.getPlanCode()); - planInfo.setOrderCode(orderCode); - planInfo.setSaleOrderCode(saleOrderCode); - planInfo.setSaleorderLinenumber(saleOrderLineNumber); - planInfo.setMaterialCode(baseBomInfo.getMaterialCode()); - planInfo.setMaterialName(baseBomInfo.getMaterialName()); - planInfo.setProductLineCode("1001"); - planInfo.setPlanAmount(baseBomInfo.getStandardAmount().longValue() * orderAmount.longValue()); - this.insertProductPlanInfo(planInfo); - } + } + if (baseBomInfo.getMaterialType().equals(MaterialConstants.COAMING_MATERIAL_TYPE)) { + ProductPlanInfo plan = new ProductPlanInfo(); + plan.setPlanCode(PlanCodeUtils.getPlanCode()); + plan.setProductLineCode("1001"); + plan.setOrderCode(orderCode); + plan.setSaleOrderCode(saleOrderCode); + plan.setSaleorderLinenumber(saleOrderLineNumber); + plan.setMaterialCode(baseBomInfo.getMaterialCode()); + plan.setMaterialName(baseBomInfo.getMaterialName()); + plan.setPlanAmount(baseBomInfo.getStandardAmount().longValue() * orderAmount.longValue()); + this.insertProductPlanInfo(plan); } } baseOrderInfo.setIsRelease(0L); diff --git a/aucma-production/src/main/resources/mapper/production/ProductPlanInfoMapper.xml b/aucma-production/src/main/resources/mapper/production/ProductPlanInfoMapper.xml index e1b9592..6fd0663 100644 --- a/aucma-production/src/main/resources/mapper/production/ProductPlanInfoMapper.xml +++ b/aucma-production/src/main/resources/mapper/production/ProductPlanInfoMapper.xml @@ -79,7 +79,7 @@ and pp.updated_by = #{updatedBy} and pp.updated_time = #{updatedTime} - order by pp.plan_code desc + order by pp.order_code desc, pp.plan_code