出库申请-备料计划查询
This commit is contained in:
parent
8fc84cf285
commit
795de11ead
|
@ -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<String> busitypes = info.getBusitypes();
|
||||
if (!ValueCheckUtil.isNullORZeroLength(busitypes)) {
|
||||
scheme.put("busitypearray", busitypes.toArray(new String[0]));
|
||||
List<String> 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;
|
||||
}
|
||||
}
|
|
@ -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<String> busitypes = info.getBusitypes();
|
||||
if (!ValueCheckUtil.isNullORZeroLength(busitypes)) {
|
||||
scheme.put("busitypearray", busitypes.toArray(new String[0]));
|
||||
List<String> 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;
|
||||
}
|
||||
}
|
|
@ -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<String> busitypes = info.getBusitypes();
|
||||
if (!ValueCheckUtil.isNullORZeroLength(busitypes)) {
|
||||
scheme.put("busitypearray", busitypes.toArray(new String[0]));
|
||||
List<String> 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;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,88 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
|
||||
<actions>
|
||||
<action>
|
||||
<name>ic.sapplybill.query</name>
|
||||
<label>出库申请单查询</label>
|
||||
<clazz>nccloud.web.ic.outbound.sapplybill.action.SapplyBillQueryAction</clazz>
|
||||
</action>
|
||||
<action>
|
||||
<name>ic.sapplybill.queryPage</name>
|
||||
<label>出库申请单查询</label>
|
||||
<clazz>nccloud.web.ic.outbound.sapplybill.action.SapplyBillPageQueryAction</clazz>
|
||||
</action>
|
||||
<action>
|
||||
<name>ic.sapplybill.maintain</name>
|
||||
<label>出库申请单删除、提交、收回</label>
|
||||
<clazz>nccloud.web.ic.outbound.sapplybill.action.SapplyBillMaintainAction</clazz>
|
||||
</action>
|
||||
<action>
|
||||
<name>ic.sapplybill.save</name>
|
||||
<label>出库申请单保存</label>
|
||||
<clazz>nccloud.web.ic.outbound.sapplybill.action.SapplyBillSaveAction</clazz>
|
||||
</action>
|
||||
<action>
|
||||
<name>ic.sapplybill.saveAndCommit</name>
|
||||
<label>出库申请单保存提交</label>
|
||||
<clazz>nccloud.web.ic.outbound.sapplybill.action.SapplyBillSaveCommitAction</clazz>
|
||||
</action>
|
||||
<action>
|
||||
<name>ic.sapplybill.canbecopy</name>
|
||||
<label>出库申请单查询是否可以复制</label>
|
||||
<clazz>nccloud.web.ic.outbound.sapplybill.action.SapplyBillBeforeCopyAction</clazz>
|
||||
</action>
|
||||
<action>
|
||||
<name>ic.sapplybill.copy</name>
|
||||
<label>出库申请单复制</label>
|
||||
<clazz>nccloud.web.ic.outbound.sapplybill.action.SapplyBillCopyAction</clazz>
|
||||
</action>
|
||||
<action>
|
||||
<name>ic.sapplybill.cardquery</name>
|
||||
<label>出库申请单卡片态查询</label>
|
||||
<clazz>nccloud.web.ic.outbound.sapplybill.action.SapplyBillQueryCardAction</clazz>
|
||||
</action>
|
||||
<action>
|
||||
<name>ic.sapplybill.query422x</name>
|
||||
<label>拉单物资需求申请单查询</label>
|
||||
<clazz>nccloud.web.ic.outbound.sapplybill.action.Query422XFor4455Action</clazz>
|
||||
</action>
|
||||
<action>
|
||||
<name>ic.sapplybill.transfervo</name>
|
||||
<label>物资需求申请单-转单</label>
|
||||
<clazz>nccloud.web.ic.outbound.sapplybill.action.TransToSapplyBillAction</clazz>
|
||||
</action>
|
||||
<action>
|
||||
<name>ic.sapplybill.queryPickm</name>
|
||||
<label>拉单备料计划查询</label>
|
||||
<clazz>nccloud.web.ic.outbound.sapplybill.action.QueryPickmFor4455Action</clazz>
|
||||
</action>
|
||||
<action>
|
||||
<name>ic.sapplybill.print</name>
|
||||
<label>出库申请单打印</label>
|
||||
<clazz>nccloud.web.ic.outbound.sapplybill.action.SapplyBillPrintAction</clazz>
|
||||
</action>
|
||||
<action>
|
||||
<name>ic.sapplybill.combine</name>
|
||||
<label>出库申请单合并显示</label>
|
||||
<clazz>nccloud.web.ic.outbound.sapplybill.action.SapplyBillCombineAction</clazz>
|
||||
</action>
|
||||
<action>
|
||||
<name>ic.sapplybill.checkprem</name>
|
||||
<label>出库申请单校验权限</label>
|
||||
<clazz>nccloud.web.ic.outbound.sapplybill.action.SapplyBillDataPermissionAction</clazz>
|
||||
</action>
|
||||
<action>
|
||||
<name>ic.sapplybill.headAfterEdit</name>
|
||||
<label>出库申请单表头区域改变事件</label>
|
||||
<clazz>nccloud.web.ic.outbound.sapplybill.events.SapplyBillHeadAfterEventAction</clazz>
|
||||
</action>
|
||||
<action>
|
||||
<name>ic.sapplybill.bodyAfterEdit</name>
|
||||
<label>出库申请单表体区域改变事件</label>
|
||||
<clazz>nccloud.web.ic.outbound.sapplybill.events.SapplyBillBodyAfterEditAction</clazz>
|
||||
</action>
|
||||
<action>
|
||||
<name>ic.sapplybill.rowOpenClose</name>
|
||||
<label>出库申请单表体行打开关闭操作</label>
|
||||
<clazz>nccloud.web.ic.outbound.sapplybill.action.SapplyBillRowOpenCloseAction</clazz>
|
||||
</action>
|
||||
</actions>
|
|
@ -0,0 +1,24 @@
|
|||
<authorizes>
|
||||
<authorize>
|
||||
<appcode>400801200,400801204</appcode>
|
||||
<actions>
|
||||
<action>ic.sapplybill.query</action>
|
||||
<action>ic.sapplybill.queryPage</action>
|
||||
<action>ic.sapplybill.maintain</action>
|
||||
<action>ic.sapplybill.save</action>
|
||||
<action>ic.sapplybill.saveAndCommit</action>
|
||||
<action>ic.sapplybill.canbecopy</action>
|
||||
<action>ic.sapplybill.copy</action>
|
||||
<action>ic.sapplybill.cardquery</action>
|
||||
<action>ic.sapplybill.query422x</action>
|
||||
<action>ic.sapplybill.transfervo</action>
|
||||
<action>ic.sapplybill.queryPickm</action>
|
||||
<action>ic.sapplybill.print</action>
|
||||
<action>ic.sapplybill.combine</action>
|
||||
<action>ic.sapplybill.checkprem</action>
|
||||
<action>ic.sapplybill.headAfterEdit</action>
|
||||
<action>ic.sapplybill.bodyAfterEdit</action>
|
||||
<action>ic.sapplybill.rowOpenClose</action>
|
||||
</actions>
|
||||
</authorize>
|
||||
</authorizes>
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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);
|
||||
}
|
||||
}
|
|
@ -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<String> 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<PickmReqAppVO> 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;
|
||||
}
|
||||
}
|
|
@ -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<PickmReqAppVO> processer) {
|
||||
processer.addAfterRule((IFilterRule<PickmReqAppVO>) 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<PickmReqAppVO> processer = new AroundProcesser(StoreReqAppPluginPoint.PULL_4455);
|
||||
this.addRule(processer);
|
||||
return (PickmReqAppVO[]) processer.after(queryResult);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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;
|
||||
}
|
|
@ -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);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue