From 795de11eadcc6428bb3109803279a0a91e8cf242 Mon Sep 17 00:00:00 2001 From: mzr <1562242162@qq.com> Date: Tue, 24 Dec 2024 19:30:15 +0800 Subject: [PATCH] =?UTF-8?q?=E5=87=BA=E5=BA=93=E7=94=B3=E8=AF=B7-=E5=A4=87?= =?UTF-8?q?=E6=96=99=E8=AE=A1=E5=88=92=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../action/Query422XFor4455Action.java | 102 --------------- .../action/QueryBljhXFor4455Action.java | 102 --------------- .../action/QueryPickmFor4455Action.java | 116 ++++++++++++++++++ .../ic/outbound/config/action/sapplybill.xml | 88 +++++++++++++ .../config/authorize/sapplybill_authorize.xml | 24 ++++ .../m422x/ic/m4455/Query422XFor4455Impl.java | 39 ++++++ .../vo/mmpac/pickm/entity/PickmAppVOMeta.java | 19 +++ .../m422x/query/Abstract422XRefQueryBP1.java | 88 +++++++++++++ .../nc/bs/pu/m422x/query/QueryFor4455BP1.java | 45 +++++++ .../pu/m422x/ic/m4455/IQuery422XFor4455.java | 16 +++ .../nc/vo/pu/m422x/entity/PickmReqAppVO.java | 49 ++++++++ 11 files changed, 484 insertions(+), 204 deletions(-) delete mode 100644 ic/src/client/nccloud/web/ic/outbound/sapplybill/action/Query422XFor4455Action.java delete mode 100644 ic/src/client/nccloud/web/ic/outbound/sapplybill/action/QueryBljhXFor4455Action.java create mode 100644 ic/src/client/nccloud/web/ic/outbound/sapplybill/action/QueryPickmFor4455Action.java create mode 100644 ic/src/client/yyconfig/modules/ic/outbound/config/action/sapplybill.xml create mode 100644 ic/src/client/yyconfig/modules/ic/outbound/config/authorize/sapplybill_authorize.xml create mode 100644 ic/src/private/nc/pubimpl/pu/m422x/ic/m4455/Query422XFor4455Impl.java create mode 100644 mmpac/src/public/nc/vo/mmpac/pickm/entity/PickmAppVOMeta.java create mode 100644 pu/src/private/nc/bs/pu/m422x/query/Abstract422XRefQueryBP1.java create mode 100644 pu/src/private/nc/bs/pu/m422x/query/QueryFor4455BP1.java create mode 100644 pu/src/public/nc/pubitf/pu/m422x/ic/m4455/IQuery422XFor4455.java create mode 100644 pu/src/public/nc/vo/pu/m422x/entity/PickmReqAppVO.java diff --git a/ic/src/client/nccloud/web/ic/outbound/sapplybill/action/Query422XFor4455Action.java b/ic/src/client/nccloud/web/ic/outbound/sapplybill/action/Query422XFor4455Action.java deleted file mode 100644 index facdbe2..0000000 --- a/ic/src/client/nccloud/web/ic/outbound/sapplybill/action/Query422XFor4455Action.java +++ /dev/null @@ -1,102 +0,0 @@ -package nccloud.web.ic.outbound.sapplybill.action; - -import java.util.List; -import nc.pub.templet.converter.util.helper.ExceptionUtils; -import nc.pubitf.pu.m422x.ic.m4455.IQuery422XFor4455; -import nc.ui.querytemplate.querytree.IQueryScheme; -import nc.vo.ic.pub.util.StringUtil; -import nc.vo.ic.pub.util.ValueCheckUtil; -import nc.vo.pu.m422x.entity.StoreReqAppVO; -import nc.vo.pub.BusinessException; -import nc.vo.scmpub.res.billtype.ICBillType; -import nccloud.dto.scmpub.page.entity.SCMQueryTreeFormatVO; -import nccloud.framework.core.json.IJson; -import nccloud.framework.service.ServiceLocator; -import nccloud.framework.web.action.itf.ICommonAction; -import nccloud.framework.web.container.ClientInfo; -import nccloud.framework.web.container.IRequest; -import nccloud.framework.web.container.SessionContext; -import nccloud.framework.web.json.JsonFactory; -import nccloud.framework.web.ui.pattern.billgrid.BillGrid; -import nccloud.framework.web.ui.pattern.billgrid.BillGridOperator; -import nccloud.nc.vo.pub.pf.PullBillInfoVO; -import nccloud.pubitf.ic.pub.service.IICPubQueryService; -import nccloud.pubitf.platform.query.INCCloudQueryService; -import nccloud.pubitf.riart.businesstype.IPFBusinessTypeService; -import nccloud.web.pu.storereq.util.StoreReqScaleUtil; - -public class Query422XFor4455Action implements ICommonAction { - public Object doAction(IRequest request) { - String read = request.read(); - IJson json = JsonFactory.create(); - SCMQueryTreeFormatVO info = (SCMQueryTreeFormatVO) json.fromJson(read, SCMQueryTreeFormatVO.class); - - INCCloudQueryService queryutil = (INCCloudQueryService) ServiceLocator.find(INCCloudQueryService.class); - IQueryScheme scheme = queryutil.convertCondition(info.getQueryInfo()); - - Object transtype = info.getQueryInfo().getUserdefObj().get("transtype"); - PullBillInfoVO[] refbillinfos = queryRefPara(transtype); - appendRefWhr(scheme, refbillinfos); - - IICPubQueryService schemeservice = (IICPubQueryService) ServiceLocator.find(IICPubQueryService.class); - - scheme = schemeservice.appendOrgPermission(scheme); - - StoreReqAppVO[] vos = null; - - IQuery422XFor4455 queryService = (IQuery422XFor4455) ServiceLocator.find(IQuery422XFor4455.class); - try { - vos = queryService.queryStoreReqAppsFor4455(scheme); - } catch (BusinessException e) { - ExceptionUtils.wrapException(e); - } - if (null == vos) { - return null; - } - BillGridOperator operator = new BillGridOperator(info.getTempletid(), info.getPageCode()); - BillGrid[] grids = operator.toBillGrids(vos); - if (grids != null) { - StoreReqScaleUtil util = new StoreReqScaleUtil(); - for (BillGrid billGrid : grids) { - util.processGrid(billGrid, false); - } - } - return grids; - } - - private void appendRefWhr(IQueryScheme scheme, PullBillInfoVO[] refbillinfos) { - if (null == refbillinfos || refbillinfos.length == 0) { - return; - } - - for (PullBillInfoVO info : refbillinfos) { - if ("422X".equals(info.getSrc_billtype())) { - List busitypes = info.getBusitypes(); - if (!ValueCheckUtil.isNullORZeroLength(busitypes)) { - scheme.put("busitypearray", busitypes.toArray(new String[0])); - List tranList = info.getTranstypes(); - if (!ValueCheckUtil.isNullORZeroLength(tranList) - && !StringUtil.isSEmptyOrNull((String) tranList.get(0))) { - scheme.put("transtypearray", tranList.toArray(new String[0])); - } - } - } - } - } - - private PullBillInfoVO[] queryRefPara(Object transtype) { - ClientInfo clientinfo = SessionContext.getInstance().getClientInfo(); - String groupId = clientinfo.getPk_group(); - String userId = clientinfo.getUserid(); - - IPFBusinessTypeService pfservice = (IPFBusinessTypeService) ServiceLocator.find(IPFBusinessTypeService.class); - PullBillInfoVO[] refbillinfos = null; - try { - refbillinfos = pfservice.getPullBillInfo(ICBillType.SapplyBill.getCode(), - (null == transtype) ? null : (String) transtype, groupId, userId); - } catch (BusinessException e) { - ExceptionUtils.wrapException(e); - } - return refbillinfos; - } -} \ No newline at end of file diff --git a/ic/src/client/nccloud/web/ic/outbound/sapplybill/action/QueryBljhXFor4455Action.java b/ic/src/client/nccloud/web/ic/outbound/sapplybill/action/QueryBljhXFor4455Action.java deleted file mode 100644 index 646528c..0000000 --- a/ic/src/client/nccloud/web/ic/outbound/sapplybill/action/QueryBljhXFor4455Action.java +++ /dev/null @@ -1,102 +0,0 @@ -package nccloud.web.ic.outbound.sapplybill.action; - -import java.util.List; -import nc.pub.templet.converter.util.helper.ExceptionUtils; -import nc.pubitf.pu.m422x.ic.m4455.IQuery422XFor4455; -import nc.ui.querytemplate.querytree.IQueryScheme; -import nc.vo.ic.pub.util.StringUtil; -import nc.vo.ic.pub.util.ValueCheckUtil; -import nc.vo.pu.m422x.entity.StoreReqAppVO; -import nc.vo.pub.BusinessException; -import nc.vo.scmpub.res.billtype.ICBillType; -import nccloud.dto.scmpub.page.entity.SCMQueryTreeFormatVO; -import nccloud.framework.core.json.IJson; -import nccloud.framework.service.ServiceLocator; -import nccloud.framework.web.action.itf.ICommonAction; -import nccloud.framework.web.container.ClientInfo; -import nccloud.framework.web.container.IRequest; -import nccloud.framework.web.container.SessionContext; -import nccloud.framework.web.json.JsonFactory; -import nccloud.framework.web.ui.pattern.billgrid.BillGrid; -import nccloud.framework.web.ui.pattern.billgrid.BillGridOperator; -import nccloud.nc.vo.pub.pf.PullBillInfoVO; -import nccloud.pubitf.ic.pub.service.IICPubQueryService; -import nccloud.pubitf.platform.query.INCCloudQueryService; -import nccloud.pubitf.riart.businesstype.IPFBusinessTypeService; -import nccloud.web.pu.storereq.util.StoreReqScaleUtil; - -public class QueryBljhXFor4455Action implements ICommonAction { - public Object doAction(IRequest request) { - String read = request.read(); - IJson json = JsonFactory.create(); - SCMQueryTreeFormatVO info = (SCMQueryTreeFormatVO) json.fromJson(read, SCMQueryTreeFormatVO.class); - - INCCloudQueryService queryutil = (INCCloudQueryService) ServiceLocator.find(INCCloudQueryService.class); - IQueryScheme scheme = queryutil.convertCondition(info.getQueryInfo()); - - Object transtype = info.getQueryInfo().getUserdefObj().get("transtype"); - PullBillInfoVO[] refbillinfos = queryRefPara(transtype); - appendRefWhr(scheme, refbillinfos); - - IICPubQueryService schemeservice = (IICPubQueryService) ServiceLocator.find(IICPubQueryService.class); - - scheme = schemeservice.appendOrgPermission(scheme); - - StoreReqAppVO[] vos = null; - - IQuery422XFor4455 queryService = (IQuery422XFor4455) ServiceLocator.find(IQuery422XFor4455.class); - try { - vos = queryService.queryStoreReqAppsFor4455(scheme); - } catch (BusinessException e) { - ExceptionUtils.wrapException(e); - } - if (null == vos) { - return null; - } - BillGridOperator operator = new BillGridOperator(info.getTempletid(), info.getPageCode()); - BillGrid[] grids = operator.toBillGrids(vos); - if (grids != null) { - StoreReqScaleUtil util = new StoreReqScaleUtil(); - for (BillGrid billGrid : grids) { - util.processGrid(billGrid, false); - } - } - return grids; - } - - private void appendRefWhr(IQueryScheme scheme, PullBillInfoVO[] refbillinfos) { - if (null == refbillinfos || refbillinfos.length == 0) { - return; - } - - for (PullBillInfoVO info : refbillinfos) { - if ("422X".equals(info.getSrc_billtype())) { - List busitypes = info.getBusitypes(); - if (!ValueCheckUtil.isNullORZeroLength(busitypes)) { - scheme.put("busitypearray", busitypes.toArray(new String[0])); - List tranList = info.getTranstypes(); - if (!ValueCheckUtil.isNullORZeroLength(tranList) - && !StringUtil.isSEmptyOrNull((String) tranList.get(0))) { - scheme.put("transtypearray", tranList.toArray(new String[0])); - } - } - } - } - } - - private PullBillInfoVO[] queryRefPara(Object transtype) { - ClientInfo clientinfo = SessionContext.getInstance().getClientInfo(); - String groupId = clientinfo.getPk_group(); - String userId = clientinfo.getUserid(); - - IPFBusinessTypeService pfservice = (IPFBusinessTypeService) ServiceLocator.find(IPFBusinessTypeService.class); - PullBillInfoVO[] refbillinfos = null; - try { - refbillinfos = pfservice.getPullBillInfo(ICBillType.SapplyBill.getCode(), - (null == transtype) ? null : (String) transtype, groupId, userId); - } catch (BusinessException e) { - ExceptionUtils.wrapException(e); - } - return refbillinfos; - } -} \ No newline at end of file diff --git a/ic/src/client/nccloud/web/ic/outbound/sapplybill/action/QueryPickmFor4455Action.java b/ic/src/client/nccloud/web/ic/outbound/sapplybill/action/QueryPickmFor4455Action.java new file mode 100644 index 0000000..5ef1767 --- /dev/null +++ b/ic/src/client/nccloud/web/ic/outbound/sapplybill/action/QueryPickmFor4455Action.java @@ -0,0 +1,116 @@ +package nccloud.web.ic.outbound.sapplybill.action; + +import nc.pub.templet.converter.util.helper.ExceptionUtils; +import nc.pubitf.pu.m422x.ic.m4455.IQuery422XFor4455; +import nc.ui.querytemplate.querytree.IQueryScheme; +import nc.vo.ic.pub.util.StringUtil; +import nc.vo.ic.pub.util.ValueCheckUtil; +import nc.vo.pu.m422x.entity.PickmReqAppVO; +import nc.vo.pub.BusinessException; +import nc.vo.scmpub.res.billtype.ICBillType; +import nccloud.dto.scmpub.page.entity.SCMQueryTreeFormatVO; +import nccloud.framework.core.json.IJson; +import nccloud.framework.service.ServiceLocator; +import nccloud.framework.web.action.itf.ICommonAction; +import nccloud.framework.web.container.ClientInfo; +import nccloud.framework.web.container.IRequest; +import nccloud.framework.web.container.SessionContext; +import nccloud.framework.web.json.JsonFactory; +import nccloud.framework.web.ui.pattern.billgrid.BillGrid; +import nccloud.framework.web.ui.pattern.billgrid.BillGridOperator; +import nccloud.nc.vo.pub.pf.PullBillInfoVO; +import nccloud.pubitf.ic.pub.service.IICPubQueryService; +import nccloud.pubitf.platform.query.INCCloudQueryService; +import nccloud.pubitf.riart.businesstype.IPFBusinessTypeService; +import nccloud.web.pu.storereq.util.StoreReqScaleUtil; + +import java.util.List; + +/** + * 查询备料计划的数据-出库申请单拉单使用 + * + * @author mzr + * @date 2024/12/21 + */ +public class QueryPickmFor4455Action implements ICommonAction { + public Object doAction(IRequest request) { + String read = request.read(); + IJson json = JsonFactory.create(); + SCMQueryTreeFormatVO info = (SCMQueryTreeFormatVO) json.fromJson(read, SCMQueryTreeFormatVO.class); + + INCCloudQueryService queryutil = (INCCloudQueryService) ServiceLocator.find(INCCloudQueryService.class); + IQueryScheme scheme = queryutil.convertCondition(info.getQueryInfo()); + + /*Object transtype = info.getQueryInfo().getUserdefObj().get("transtype"); + PullBillInfoVO[] refbillinfos = queryRefPara(transtype); + appendRefWhr(scheme, refbillinfos);*/ + + IICPubQueryService schemeservice = (IICPubQueryService) ServiceLocator.find(IICPubQueryService.class); + + scheme = schemeservice.appendOrgPermission(scheme); + + PickmReqAppVO[] vos = null; + + IQuery422XFor4455 queryService = (IQuery422XFor4455) ServiceLocator.find(IQuery422XFor4455.class); + try { + vos = queryService.queryPickmAppsFor4455(scheme); + } catch (BusinessException e) { + ExceptionUtils.wrapException(e); + } + if (null == vos) { + return null; + } + // VO与UI数据格式转换 卡片列表:BillGridOperator + BillGrid[] grids = new BillGrid[0]; + try { + BillGridOperator operator = new BillGridOperator(info.getTempletid(), info.getPageCode()); + grids = operator.toBillGrids(vos); + if (grids != null) { + StoreReqScaleUtil util = new StoreReqScaleUtil(); + for (BillGrid billGrid : grids) { + util.processGrid(billGrid, false); + } + } + } catch (Exception e) { + e.printStackTrace(); + throw new RuntimeException(e); + } + return grids; + } + + private void appendRefWhr(IQueryScheme scheme, PullBillInfoVO[] refbillinfos) { + if (null == refbillinfos || refbillinfos.length == 0) { + return; + } + + for (PullBillInfoVO info : refbillinfos) { + if ("422X".equals(info.getSrc_billtype())) { + List busitypes = info.getBusitypes(); + if (!ValueCheckUtil.isNullORZeroLength(busitypes)) { + scheme.put("busitypearray", busitypes.toArray(new String[0])); + List tranList = info.getTranstypes(); + if (!ValueCheckUtil.isNullORZeroLength(tranList) + && !StringUtil.isSEmptyOrNull((String) tranList.get(0))) { + scheme.put("transtypearray", tranList.toArray(new String[0])); + } + } + } + } + } + + private PullBillInfoVO[] queryRefPara(Object transtype) { + ClientInfo clientinfo = SessionContext.getInstance().getClientInfo(); + String groupId = clientinfo.getPk_group(); + String userId = clientinfo.getUserid(); + + IPFBusinessTypeService pfservice = (IPFBusinessTypeService) ServiceLocator.find(IPFBusinessTypeService.class); + PullBillInfoVO[] refbillinfos = null; + try { + refbillinfos = pfservice.getPullBillInfo(ICBillType.SapplyBill.getCode(), + (null == transtype) ? null : (String) transtype, groupId, userId); + } catch (BusinessException e) { + ExceptionUtils.wrapException(e); + } + return refbillinfos; + } +} \ No newline at end of file diff --git a/ic/src/client/yyconfig/modules/ic/outbound/config/action/sapplybill.xml b/ic/src/client/yyconfig/modules/ic/outbound/config/action/sapplybill.xml new file mode 100644 index 0000000..585c6d9 --- /dev/null +++ b/ic/src/client/yyconfig/modules/ic/outbound/config/action/sapplybill.xml @@ -0,0 +1,88 @@ + + + + ic.sapplybill.query + + nccloud.web.ic.outbound.sapplybill.action.SapplyBillQueryAction + + + ic.sapplybill.queryPage + + nccloud.web.ic.outbound.sapplybill.action.SapplyBillPageQueryAction + + + ic.sapplybill.maintain + + nccloud.web.ic.outbound.sapplybill.action.SapplyBillMaintainAction + + + ic.sapplybill.save + + nccloud.web.ic.outbound.sapplybill.action.SapplyBillSaveAction + + + ic.sapplybill.saveAndCommit + + nccloud.web.ic.outbound.sapplybill.action.SapplyBillSaveCommitAction + + + ic.sapplybill.canbecopy + + nccloud.web.ic.outbound.sapplybill.action.SapplyBillBeforeCopyAction + + + ic.sapplybill.copy + + nccloud.web.ic.outbound.sapplybill.action.SapplyBillCopyAction + + + ic.sapplybill.cardquery + + nccloud.web.ic.outbound.sapplybill.action.SapplyBillQueryCardAction + + + ic.sapplybill.query422x + + nccloud.web.ic.outbound.sapplybill.action.Query422XFor4455Action + + + ic.sapplybill.transfervo + + nccloud.web.ic.outbound.sapplybill.action.TransToSapplyBillAction + + + ic.sapplybill.queryPickm + + nccloud.web.ic.outbound.sapplybill.action.QueryPickmFor4455Action + + + ic.sapplybill.print + + nccloud.web.ic.outbound.sapplybill.action.SapplyBillPrintAction + + + ic.sapplybill.combine + + nccloud.web.ic.outbound.sapplybill.action.SapplyBillCombineAction + + + ic.sapplybill.checkprem + + nccloud.web.ic.outbound.sapplybill.action.SapplyBillDataPermissionAction + + + ic.sapplybill.headAfterEdit + + nccloud.web.ic.outbound.sapplybill.events.SapplyBillHeadAfterEventAction + + + ic.sapplybill.bodyAfterEdit + + nccloud.web.ic.outbound.sapplybill.events.SapplyBillBodyAfterEditAction + + + ic.sapplybill.rowOpenClose + + nccloud.web.ic.outbound.sapplybill.action.SapplyBillRowOpenCloseAction + + \ No newline at end of file diff --git a/ic/src/client/yyconfig/modules/ic/outbound/config/authorize/sapplybill_authorize.xml b/ic/src/client/yyconfig/modules/ic/outbound/config/authorize/sapplybill_authorize.xml new file mode 100644 index 0000000..bf5b922 --- /dev/null +++ b/ic/src/client/yyconfig/modules/ic/outbound/config/authorize/sapplybill_authorize.xml @@ -0,0 +1,24 @@ + + + 400801200,400801204 + + ic.sapplybill.query + ic.sapplybill.queryPage + ic.sapplybill.maintain + ic.sapplybill.save + ic.sapplybill.saveAndCommit + ic.sapplybill.canbecopy + ic.sapplybill.copy + ic.sapplybill.cardquery + ic.sapplybill.query422x + ic.sapplybill.transfervo + ic.sapplybill.queryPickm + ic.sapplybill.print + ic.sapplybill.combine + ic.sapplybill.checkprem + ic.sapplybill.headAfterEdit + ic.sapplybill.bodyAfterEdit + ic.sapplybill.rowOpenClose + + + diff --git a/ic/src/private/nc/pubimpl/pu/m422x/ic/m4455/Query422XFor4455Impl.java b/ic/src/private/nc/pubimpl/pu/m422x/ic/m4455/Query422XFor4455Impl.java new file mode 100644 index 0000000..de91824 --- /dev/null +++ b/ic/src/private/nc/pubimpl/pu/m422x/ic/m4455/Query422XFor4455Impl.java @@ -0,0 +1,39 @@ +// +// Source code recreated from a .class file by IntelliJ IDEA +// (powered by FernFlower decompiler) +// + +package nc.pubimpl.pu.m422x.ic.m4455; + +import nc.bs.pu.m422x.query.QueryFor4455BP; +import nc.bs.pu.m422x.query.QueryFor4455BP1; +import nc.pubitf.pu.m422x.ic.m4455.IQuery422XFor4455; +import nc.ui.querytemplate.querytree.IQueryScheme; +import nc.vo.pu.m422x.entity.PickmReqAppVO; +import nc.vo.pu.m422x.entity.StoreReqAppVO; +import nc.vo.pub.BusinessException; +import nc.vo.pubapp.pattern.exception.ExceptionUtils; + +public class Query422XFor4455Impl implements IQuery422XFor4455 { + public Query422XFor4455Impl() { + } + + public StoreReqAppVO[] queryStoreReqAppsFor4455(IQueryScheme queryScheme) throws BusinessException { + try { + return (new QueryFor4455BP(queryScheme)).queryStoreReqVOs(); + } catch (Exception e) { + ExceptionUtils.marsh(e); + return null; + } + } + + @Override + public PickmReqAppVO[] queryPickmAppsFor4455(IQueryScheme queryScheme) throws BusinessException { + try { + return (new QueryFor4455BP1(queryScheme)).queryPickmReqVOs(); + } catch (Exception e) { + ExceptionUtils.marsh(e); + return null; + } + } +} diff --git a/mmpac/src/public/nc/vo/mmpac/pickm/entity/PickmAppVOMeta.java b/mmpac/src/public/nc/vo/mmpac/pickm/entity/PickmAppVOMeta.java new file mode 100644 index 0000000..766086b --- /dev/null +++ b/mmpac/src/public/nc/vo/mmpac/pickm/entity/PickmAppVOMeta.java @@ -0,0 +1,19 @@ +// +// Source code recreated from a .class file by IntelliJ IDEA +// (powered by FernFlower decompiler) +// + +package nc.vo.mmpac.pickm.entity; + +import nc.vo.pubapp.pattern.model.meta.entity.bill.AbstractBillMeta; + +public class PickmAppVOMeta extends AbstractBillMeta { + public PickmAppVOMeta() { + this.init(); + } + + public void init() { + this.setParent(PickmHeadVO.class); + this.addChildren(PickmItemVO.class); + } +} diff --git a/pu/src/private/nc/bs/pu/m422x/query/Abstract422XRefQueryBP1.java b/pu/src/private/nc/bs/pu/m422x/query/Abstract422XRefQueryBP1.java new file mode 100644 index 0000000..429f7b8 --- /dev/null +++ b/pu/src/private/nc/bs/pu/m422x/query/Abstract422XRefQueryBP1.java @@ -0,0 +1,88 @@ +// +// Source code recreated from a .class file by IntelliJ IDEA +// (powered by FernFlower decompiler) +// + +package nc.bs.pu.m422x.query; + +import nc.bs.scmpub.util.SCMDataAccessUtils; +import nc.impl.pubapp.pattern.data.vo.VOQuery; +import nc.ui.querytemplate.querytree.IQueryScheme; +import nc.vo.mmpac.pickm.entity.PickmHeadVO; +import nc.vo.mmpac.pickm.entity.PickmItemVO; +import nc.vo.pu.m422x.entity.PickmReqAppVO; +import nc.vo.pubapp.pattern.model.tool.BillComposite; +import nc.vo.pubapp.query2.sql.process.QuerySchemeProcessor; + +import java.util.HashSet; +import java.util.Set; + +public abstract class Abstract422XRefQueryBP1 { + protected String headtb; + protected String itemtb; + protected QuerySchemeProcessor psor; + + public Abstract422XRefQueryBP1(IQueryScheme queryScheme) { + this.psor = new QuerySchemeProcessor(queryScheme); + this.headtb = this.psor.getMainTableAlias(); + // this.itemtb = this.psor.getTableAliasOfAttribute("pk_storereq_b.pk_storereq_b"); + } + + public String getHeadtb() { + return this.headtb; + } + + public String getItemtb() { + return this.itemtb; + } + + public QuerySchemeProcessor getPsor() { + return this.psor; + } + + public abstract StringBuilder makeGetPKSql(); + + public PickmReqAppVO[] queryPickmReqVOs() { + SCMDataAccessUtils utils = new SCMDataAccessUtils(10000); + this.psor.appendCurrentGroup(); + StringBuilder sql = this.makeGetPKSql(); + String[][] pks = utils.query(sql.toString()).toTwoDimensionStringArray(); + if (null != pks && pks.length != 0) { + Set headPks = new HashSet(); + String[] itemPks = new String[pks.length]; + + for (int i = 0; i < pks.length; ++i) { + headPks.add(pks[i][0]); + itemPks[i] = pks[i][1]; + } + + PickmHeadVO[] headers = (PickmHeadVO[]) (new VOQuery(PickmHeadVO.class)).query((String[]) headPks.toArray(new String[headPks.size()])); + PickmItemVO[] items = (PickmItemVO[]) (new VOQuery(PickmItemVO.class)).query(itemPks); + BillComposite bc = new BillComposite(PickmReqAppVO.class); + PickmReqAppVO tempVO = new PickmReqAppVO(); + bc.append(tempVO.getMetaData().getParent(), headers); + bc.append(tempVO.getMetaData().getVOMeta(PickmItemVO.class), items); + PickmReqAppVO[] queryResult = (PickmReqAppVO[]) bc.composite(); + // return this.processQueryResult(queryResult); + return queryResult; + } else { + return null; + } + } + + public void setHeadtb(String headtb) { + this.headtb = headtb; + } + + public void setItemtb(String itemtb) { + this.itemtb = itemtb; + } + + public void setPsor(QuerySchemeProcessor psor) { + this.psor = psor; + } + + protected PickmReqAppVO[] processQueryResult(PickmReqAppVO[] queryResult) { + return queryResult; + } +} diff --git a/pu/src/private/nc/bs/pu/m422x/query/QueryFor4455BP1.java b/pu/src/private/nc/bs/pu/m422x/query/QueryFor4455BP1.java new file mode 100644 index 0000000..a7c07ab --- /dev/null +++ b/pu/src/private/nc/bs/pu/m422x/query/QueryFor4455BP1.java @@ -0,0 +1,45 @@ +// +// Source code recreated from a .class file by IntelliJ IDEA +// (powered by FernFlower decompiler) +// + +package nc.bs.pu.m422x.query; + +import nc.bs.pu.m422x.plugin.StoreReqAppPluginPoint; +import nc.bs.pu.m422x.query.rule.CanOutreqNumCalcRule; +import nc.impl.pubapp.pattern.rule.IFilterRule; +import nc.impl.pubapp.pattern.rule.processer.AroundProcesser; +import nc.ui.querytemplate.querytree.IQueryScheme; +import nc.vo.pu.m422x.entity.PickmReqAppVO; +import nccloud.commons.lang.ArrayUtils; + +public class QueryFor4455BP1 extends Abstract422XRefQueryBP1 { + public QueryFor4455BP1(IQueryScheme queryScheme) { + super(queryScheme); + } + + private void addRule(AroundProcesser processer) { + processer.addAfterRule((IFilterRule) new CanOutreqNumCalcRule()); + } + + public StringBuilder makeGetPKSql() { + StringBuilder wholeSql = new StringBuilder(); + wholeSql.append(" SELECT DISTINCT a.cpickmid,b.cpickm_bid" + + " FROM" + + " mm_pickm a" + + " INNER JOIN mm_pickm_b b ON b.cpickmid = a.cpickmid" + + " WHERE" + + " a.dr = 0 AND b.dr = 0 and a.APPROVERTIME > '2024-10-01'"); + return wholeSql; + } + + protected PickmReqAppVO[] processQueryResult(PickmReqAppVO[] queryResult) { + if (ArrayUtils.isEmpty(queryResult)) { + return null; + } else { + AroundProcesser processer = new AroundProcesser(StoreReqAppPluginPoint.PULL_4455); + this.addRule(processer); + return (PickmReqAppVO[]) processer.after(queryResult); + } + } +} diff --git a/pu/src/public/nc/pubitf/pu/m422x/ic/m4455/IQuery422XFor4455.java b/pu/src/public/nc/pubitf/pu/m422x/ic/m4455/IQuery422XFor4455.java new file mode 100644 index 0000000..3b602df --- /dev/null +++ b/pu/src/public/nc/pubitf/pu/m422x/ic/m4455/IQuery422XFor4455.java @@ -0,0 +1,16 @@ +// +// Source code recreated from a .class file by IntelliJ IDEA +// (powered by FernFlower decompiler) +// + +package nc.pubitf.pu.m422x.ic.m4455; + +import nc.ui.querytemplate.querytree.IQueryScheme; +import nc.vo.pu.m422x.entity.PickmReqAppVO; +import nc.vo.pu.m422x.entity.StoreReqAppVO; +import nc.vo.pub.BusinessException; + +public interface IQuery422XFor4455 { + StoreReqAppVO[] queryStoreReqAppsFor4455(IQueryScheme queryScheme) throws BusinessException; + PickmReqAppVO[] queryPickmAppsFor4455(IQueryScheme queryScheme) throws BusinessException; +} diff --git a/pu/src/public/nc/vo/pu/m422x/entity/PickmReqAppVO.java b/pu/src/public/nc/vo/pu/m422x/entity/PickmReqAppVO.java new file mode 100644 index 0000000..767cb86 --- /dev/null +++ b/pu/src/public/nc/vo/pu/m422x/entity/PickmReqAppVO.java @@ -0,0 +1,49 @@ +// +// Source code recreated from a .class file by IntelliJ IDEA +// (powered by FernFlower decompiler) +// + +package nc.vo.pu.m422x.entity; + +import nc.vo.annotation.AggVoInfo; +import nc.vo.mmpac.pickm.entity.PickmHeadVO; +import nc.vo.mmpac.pickm.entity.PickmItemVO; +import nc.vo.mmpac.pickm.entity.PickmAppVOMeta; +import nc.vo.pubapp.pattern.model.entity.bill.AbstractBill; +import nc.vo.pubapp.pattern.model.meta.entity.bill.BillMetaFactory; +import nc.vo.pubapp.pattern.model.meta.entity.bill.IBillMeta; + +@AggVoInfo( + parentVO = "nc.vo.mmpac.pickm.entity.PickmHeadVO" +) +public class PickmReqAppVO extends AbstractBill { + private static final long serialVersionUID = -3077249229044777149L; + + public PickmReqAppVO() { + } + + /*public static StoreReqAppCloseVO[] getCloseVO(PickmReqAppVO[] vos) { + return (StoreReqAppCloseVO[]) (new BillToViewConvertor(StoreReqAppCloseVO.class)).convert(vos); + }*/ + + public PickmItemVO[] getBVO() { + return (PickmItemVO[]) ((PickmItemVO[]) this.getChildrenVO()); + } + + public PickmHeadVO getHVO() { + return (PickmHeadVO) this.getParent(); + } + + public IBillMeta getMetaData() { + IBillMeta billMeta = BillMetaFactory.getInstance().getBillMeta(PickmAppVOMeta.class); + return billMeta; + } + + public void setBVO(PickmItemVO[] voaChildren) { + this.setChildrenVO(voaChildren); + } + + public void setHVO(PickmHeadVO voaParent) { + this.setParent(voaParent); + } +}