Commit aa6ee641 authored by 1650842865's avatar 1650842865

取消办结提醒;

parent 084bd534
...@@ -50,13 +50,13 @@ ...@@ -50,13 +50,13 @@
<x:inputC name="vendorCode" required="false" readonly="true" label="供应商编码" labelCol="1" maxLength="64" fieldCol="2"/> <x:inputC name="vendorCode" required="false" readonly="true" label="供应商编码" labelCol="1" maxLength="64" fieldCol="2"/>
<x:inputC name="vendorName" required="false" readonly="true" label="供应商名称" labelCol="1" maxLength="64" fieldCol="2"/> <x:inputC name="vendorName" required="false" readonly="true" label="供应商名称" labelCol="1" maxLength="64" fieldCol="2"/>
<x:inputC name="dutyDeptName" required="false" readonly="true" label="评审部门" labelCol="1" fieldCol="2" /> <x:inputC name="dutyDeptName" required="false" readonly="true" label="评审部门" labelCol="1" fieldCol="2" />
<x:inputC name="submitterName" required="false" readonly="true" label="提报人" labelCol="1" fieldCol="2" /> <x:inputC name="usnam" required="false" readonly="true" label="收货人" labelCol="1" fieldCol="2" />
</div> </div>
<div class="hg-form-row"> <div class="hg-form-row">
<x:textareaC name="exceptionDesc" required="false" label="异常描述" labelCol="1" fieldCol="10" rows="3" readonly="true"/> <x:textareaC name="exceptionDesc" required="false" label="异常描述" labelCol="1" fieldCol="10" rows="3" readonly="true"/>
</div> </div>
<div class="hg-form-row"> <div class="hg-form-row">
<x:inputC name="usnam" required="false" readonly="true" label="仓管员" labelCol="1" fieldCol="2" /> <x:inputC name="submitterName" required="false" readonly="true" label="提报人" labelCol="1" fieldCol="2" />
<x:selectC name="result" required="false" label="评审结果" labelCol="1" fieldCol="2" dictionary="result"/> <x:selectC name="result" required="false" label="评审结果" labelCol="1" fieldCol="2" dictionary="result"/>
</div> </div>
</div> </div>
......
...@@ -168,7 +168,7 @@ public class EpChangeFormApplicationImpl extends FlowBroker implements EpChangeF ...@@ -168,7 +168,7 @@ public class EpChangeFormApplicationImpl extends FlowBroker implements EpChangeF
@Override @Override
protected void onEnd(DelegateExecution delegateExecution) { protected void onEnd(DelegateExecution delegateExecution) {
super.onEnd(delegateExecution); //super.onEnd(delegateExecution);
String bizId = delegateExecution.getProcessBusinessKey(); String bizId = delegateExecution.getProcessBusinessKey();
BizBillStatus status = approvePassed() ? BizBillStatus.COMPLETED : BizBillStatus.ABORTED; BizBillStatus status = approvePassed() ? BizBillStatus.COMPLETED : BizBillStatus.ABORTED;
EpChangeForm epChangeForm = epChangeFormRepository.findOne(bizId); EpChangeForm epChangeForm = epChangeFormRepository.findOne(bizId);
......
...@@ -161,7 +161,7 @@ public class UnqualifiedMaterialsApplicationImpl extends FlowBroker implements U ...@@ -161,7 +161,7 @@ public class UnqualifiedMaterialsApplicationImpl extends FlowBroker implements U
@Override @Override
protected void onEnd(DelegateExecution delegateExecution) { protected void onEnd(DelegateExecution delegateExecution) {
super.onEnd(delegateExecution); //super.onEnd(delegateExecution);
String bizId = delegateExecution.getProcessBusinessKey(); String bizId = delegateExecution.getProcessBusinessKey();
BizBillStatus status = approvePassed() ? BizBillStatus.COMPLETED : BizBillStatus.ABORTED; BizBillStatus status = approvePassed() ? BizBillStatus.COMPLETED : BizBillStatus.ABORTED;
UnqualifiedMaterials unqualifiedMaterials = unqualifiedMaterialsRepository.findOne(bizId); UnqualifiedMaterials unqualifiedMaterials = unqualifiedMaterialsRepository.findOne(bizId);
......
...@@ -100,7 +100,7 @@ public class ComponentSupplyApplicationImpl extends FlowBroker implements Compon ...@@ -100,7 +100,7 @@ public class ComponentSupplyApplicationImpl extends FlowBroker implements Compon
@Override @Override
protected void onEnd(DelegateExecution delegateExecution) { protected void onEnd(DelegateExecution delegateExecution) {
super.onEnd(delegateExecution); //super.onEnd(delegateExecution);
String bizId = delegateExecution.getProcessBusinessKey(); String bizId = delegateExecution.getProcessBusinessKey();
BizBillStatus status = approvePassed() ? BizBillStatus.COMPLETED : BizBillStatus.ABORTED; BizBillStatus status = approvePassed() ? BizBillStatus.COMPLETED : BizBillStatus.ABORTED;
ComponentSupply componentSupply = componentSupplyRepository.findOne(bizId); ComponentSupply componentSupply = componentSupplyRepository.findOne(bizId);
......
...@@ -151,7 +151,7 @@ public class CostCenterApplicationImpl extends FlowBroker implements CostCenterA ...@@ -151,7 +151,7 @@ public class CostCenterApplicationImpl extends FlowBroker implements CostCenterA
*/ */
@Override @Override
protected void onEnd(DelegateExecution delegateExecution) { protected void onEnd(DelegateExecution delegateExecution) {
super.onEnd(delegateExecution); //super.onEnd(delegateExecution);
String bizId = delegateExecution.getProcessBusinessKey(); String bizId = delegateExecution.getProcessBusinessKey();
BizBillStatus status = approvePassed() ? BizBillStatus.COMPLETED : BizBillStatus.ABORTED; BizBillStatus status = approvePassed() ? BizBillStatus.COMPLETED : BizBillStatus.ABORTED;
CostCenter costCenter = costCenterRepository.findOne(bizId); CostCenter costCenter = costCenterRepository.findOne(bizId);
......
...@@ -183,7 +183,7 @@ public class SapCostReimbursementApplicationImpl extends FlowBroker implements S ...@@ -183,7 +183,7 @@ public class SapCostReimbursementApplicationImpl extends FlowBroker implements S
*/ */
@Override @Override
protected void onEnd(DelegateExecution delegateExecution) { protected void onEnd(DelegateExecution delegateExecution) {
super.onEnd(delegateExecution); //super.onEnd(delegateExecution);
String bizId = delegateExecution.getProcessBusinessKey(); String bizId = delegateExecution.getProcessBusinessKey();
BizBillStatus status = approvePassed() ? BizBillStatus.COMPLETED : BizBillStatus.ABORTED; BizBillStatus status = approvePassed() ? BizBillStatus.COMPLETED : BizBillStatus.ABORTED;
SapCostReimbursement sapCostReimbursement = costReimbursementRepository.findOne(bizId); SapCostReimbursement sapCostReimbursement = costReimbursementRepository.findOne(bizId);
......
...@@ -124,7 +124,7 @@ public class CustomerDelayPayApplicationImpl extends FlowBroker implements Custo ...@@ -124,7 +124,7 @@ public class CustomerDelayPayApplicationImpl extends FlowBroker implements Custo
@Override @Override
protected void onEnd(DelegateExecution delegateExecution) { protected void onEnd(DelegateExecution delegateExecution) {
super.onEnd(delegateExecution); //super.onEnd(delegateExecution);
String bizId = delegateExecution.getProcessBusinessKey(); String bizId = delegateExecution.getProcessBusinessKey();
BizBillStatus status = approvePassed() ? BizBillStatus.COMPLETED : BizBillStatus.ABORTED; BizBillStatus status = approvePassed() ? BizBillStatus.COMPLETED : BizBillStatus.ABORTED;
CustomerDelayPay customerDelayPay = customerDelayPayRepository.findOne(bizId); CustomerDelayPay customerDelayPay = customerDelayPayRepository.findOne(bizId);
......
...@@ -93,7 +93,7 @@ public class SapDullApplicationImpl extends FlowBroker implements SapDullApplica ...@@ -93,7 +93,7 @@ public class SapDullApplicationImpl extends FlowBroker implements SapDullApplica
@Override @Override
protected void onEnd(DelegateExecution delegateExecution) { protected void onEnd(DelegateExecution delegateExecution) {
super.onEnd(delegateExecution); //super.onEnd(delegateExecution);
String bizId = delegateExecution.getProcessBusinessKey(); String bizId = delegateExecution.getProcessBusinessKey();
BizBillStatus status = approvePassed() ? BizBillStatus.COMPLETED : BizBillStatus.ABORTED; BizBillStatus status = approvePassed() ? BizBillStatus.COMPLETED : BizBillStatus.ABORTED;
SapDull Dull = sapDullRepository.findOne(bizId); SapDull Dull = sapDullRepository.findOne(bizId);
......
...@@ -426,7 +426,7 @@ public class ExceptionReportApplicationImpl extends FlowBroker implements Except ...@@ -426,7 +426,7 @@ public class ExceptionReportApplicationImpl extends FlowBroker implements Except
*/ */
@Override @Override
protected void onEnd(DelegateExecution delegateExecution) { protected void onEnd(DelegateExecution delegateExecution) {
super.onEnd(delegateExecution); //super.onEnd(delegateExecution);
BizBillStatus status = BizBillStatus.COMPLETED; BizBillStatus status = BizBillStatus.COMPLETED;
String bizId = delegateExecution.getProcessBusinessKey(); String bizId = delegateExecution.getProcessBusinessKey();
ExceptionReport exceptionReport = this.findById(bizId); ExceptionReport exceptionReport = this.findById(bizId);
......
...@@ -216,7 +216,7 @@ public class FinaCustomerApplicationImpl extends FlowBroker implements FinaCusto ...@@ -216,7 +216,7 @@ public class FinaCustomerApplicationImpl extends FlowBroker implements FinaCusto
*/ */
@Override @Override
protected void onEnd(DelegateExecution delegateExecution) { protected void onEnd(DelegateExecution delegateExecution) {
super.onEnd(delegateExecution); //super.onEnd(delegateExecution);
String bizId = delegateExecution.getProcessBusinessKey(); String bizId = delegateExecution.getProcessBusinessKey();
FinaCustomerInfo finaCustomer = finaCustomerRepository.findOne(bizId); FinaCustomerInfo finaCustomer = finaCustomerRepository.findOne(bizId);
List<FinaCustomerPay> payList = this.finaCustomerPayRepository.findAllBySId(finaCustomer.getId()); List<FinaCustomerPay> payList = this.finaCustomerPayRepository.findAllBySId(finaCustomer.getId());
......
...@@ -82,7 +82,7 @@ public class SapFixedAssessApplicationImpl extends FlowBroker implements SapFixe ...@@ -82,7 +82,7 @@ public class SapFixedAssessApplicationImpl extends FlowBroker implements SapFixe
@Override @Override
protected void onEnd(DelegateExecution delegateExecution) { protected void onEnd(DelegateExecution delegateExecution) {
super.onEnd(delegateExecution); //super.onEnd(delegateExecution);
String bizId = delegateExecution.getProcessBusinessKey(); String bizId = delegateExecution.getProcessBusinessKey();
BizBillStatus status = approvePassed() ? BizBillStatus.COMPLETED : BizBillStatus.ABORTED; BizBillStatus status = approvePassed() ? BizBillStatus.COMPLETED : BizBillStatus.ABORTED;
SapFixedAssess fixedAssess = sapFixedAssessRepository.findOne(bizId); SapFixedAssess fixedAssess = sapFixedAssessRepository.findOne(bizId);
......
...@@ -85,7 +85,7 @@ public class SapFixedAssetsApplicationImpl extends FlowBroker implements SapFixe ...@@ -85,7 +85,7 @@ public class SapFixedAssetsApplicationImpl extends FlowBroker implements SapFixe
@Override @Override
protected void onEnd(DelegateExecution delegateExecution) { protected void onEnd(DelegateExecution delegateExecution) {
super.onEnd(delegateExecution); //super.onEnd(delegateExecution);
String bizId = delegateExecution.getProcessBusinessKey(); String bizId = delegateExecution.getProcessBusinessKey();
BizBillStatus status = approvePassed() ? BizBillStatus.COMPLETED : BizBillStatus.ABORTED; BizBillStatus status = approvePassed() ? BizBillStatus.COMPLETED : BizBillStatus.ABORTED;
SapFixedAssets fixedAssets = sapFixedAssetsRepository.findOne(bizId); SapFixedAssets fixedAssets = sapFixedAssetsRepository.findOne(bizId);
......
...@@ -88,7 +88,7 @@ public class SapFixedAssetsMoveApplicationImpl extends FlowBroker implements Sap ...@@ -88,7 +88,7 @@ public class SapFixedAssetsMoveApplicationImpl extends FlowBroker implements Sap
@Override @Override
protected void onEnd(DelegateExecution delegateExecution) { protected void onEnd(DelegateExecution delegateExecution) {
super.onEnd(delegateExecution); //super.onEnd(delegateExecution);
String bizId = delegateExecution.getProcessBusinessKey(); String bizId = delegateExecution.getProcessBusinessKey();
BizBillStatus status = approvePassed() ? BizBillStatus.COMPLETED : BizBillStatus.ABORTED; BizBillStatus status = approvePassed() ? BizBillStatus.COMPLETED : BizBillStatus.ABORTED;
SapFixedAssetsMove fixedAssetsMove = sapFixedAssetsMoveRepository.findOne(bizId); SapFixedAssetsMove fixedAssetsMove = sapFixedAssetsMoveRepository.findOne(bizId);
......
...@@ -113,7 +113,7 @@ public class SapFixedRetirementApplicationImpl extends FlowBroker implements Sap ...@@ -113,7 +113,7 @@ public class SapFixedRetirementApplicationImpl extends FlowBroker implements Sap
@Override @Override
protected void onEnd(DelegateExecution delegateExecution) { protected void onEnd(DelegateExecution delegateExecution) {
super.onEnd(delegateExecution); //super.onEnd(delegateExecution);
String bizId = delegateExecution.getProcessBusinessKey(); String bizId = delegateExecution.getProcessBusinessKey();
BizBillStatus status = approvePassed() ? BizBillStatus.COMPLETED : BizBillStatus.ABORTED; BizBillStatus status = approvePassed() ? BizBillStatus.COMPLETED : BizBillStatus.ABORTED;
SapRetirement fixedRetirement = sapFixedRetirementRepository.findOne(bizId); SapRetirement fixedRetirement = sapFixedRetirementRepository.findOne(bizId);
......
...@@ -48,7 +48,7 @@ public class MaterialApplicationImpl extends FlowBroker implements MaterialAppli ...@@ -48,7 +48,7 @@ public class MaterialApplicationImpl extends FlowBroker implements MaterialAppli
@Override @Override
protected void onEnd(DelegateExecution delegateExecution) { protected void onEnd(DelegateExecution delegateExecution) {
super.onEnd(delegateExecution); //super.onEnd(delegateExecution);
String bizId = delegateExecution.getProcessBusinessKey(); String bizId = delegateExecution.getProcessBusinessKey();
BizBillStatus status = approvePassed() ? BizBillStatus.COMPLETED : BizBillStatus.ABORTED; BizBillStatus status = approvePassed() ? BizBillStatus.COMPLETED : BizBillStatus.ABORTED;
Material material = materialRepository.findOne(bizId); Material material = materialRepository.findOne(bizId);
......
...@@ -88,7 +88,7 @@ public class NonOrderStorageApplicationImpl extends FlowBroker implements NonOrd ...@@ -88,7 +88,7 @@ public class NonOrderStorageApplicationImpl extends FlowBroker implements NonOrd
@Override @Override
protected void onEnd(DelegateExecution delegateExecution) { protected void onEnd(DelegateExecution delegateExecution) {
super.onEnd(delegateExecution); //super.onEnd(delegateExecution);
String bizId = delegateExecution.getProcessBusinessKey(); String bizId = delegateExecution.getProcessBusinessKey();
BizBillStatus status = approvePassed() ? BizBillStatus.COMPLETED : BizBillStatus.ABORTED; BizBillStatus status = approvePassed() ? BizBillStatus.COMPLETED : BizBillStatus.ABORTED;
NonOrderStorage nonOrderStorage = nonOrderStorageRepository.findOne(bizId); NonOrderStorage nonOrderStorage = nonOrderStorageRepository.findOne(bizId);
......
...@@ -244,7 +244,7 @@ public class NonProdApplyApplicationImpl extends FlowBroker implements NonProdA ...@@ -244,7 +244,7 @@ public class NonProdApplyApplicationImpl extends FlowBroker implements NonProdA
*/ */
@Override @Override
protected void onEnd(DelegateExecution delegateExecution) { protected void onEnd(DelegateExecution delegateExecution) {
super.onEnd(delegateExecution); //super.onEnd(delegateExecution);
String bizId = delegateExecution.getProcessBusinessKey(); String bizId = delegateExecution.getProcessBusinessKey();
ApprovalParameter parameter = getApprovalParameter(); ApprovalParameter parameter = getApprovalParameter();
BizBillStatus status = approvePassed() ? BizBillStatus.COMPLETED : BizBillStatus.ABORTED; BizBillStatus status = approvePassed() ? BizBillStatus.COMPLETED : BizBillStatus.ABORTED;
......
...@@ -135,7 +135,7 @@ public class SapPermitApplicationImpl extends FlowBroker implements SapPermitApp ...@@ -135,7 +135,7 @@ public class SapPermitApplicationImpl extends FlowBroker implements SapPermitApp
@Override @Override
protected void onEnd(DelegateExecution delegateExecution) { protected void onEnd(DelegateExecution delegateExecution) {
super.onEnd(delegateExecution); //super.onEnd(delegateExecution);
String bizId = delegateExecution.getProcessBusinessKey(); String bizId = delegateExecution.getProcessBusinessKey();
BizBillStatus status = approvePassed() ? BizBillStatus.COMPLETED : BizBillStatus.ABORTED; BizBillStatus status = approvePassed() ? BizBillStatus.COMPLETED : BizBillStatus.ABORTED;
SapPermit Permit = sapPermitRepository.findOne(bizId); SapPermit Permit = sapPermitRepository.findOne(bizId);
......
...@@ -54,7 +54,7 @@ public class SapPriceMasterDataApplicationImpl extends FlowBroker implements Sap ...@@ -54,7 +54,7 @@ public class SapPriceMasterDataApplicationImpl extends FlowBroker implements Sap
@Override @Override
protected void onEnd(DelegateExecution delegateExecution) { protected void onEnd(DelegateExecution delegateExecution) {
super.onEnd(delegateExecution); //super.onEnd(delegateExecution);
String bizId = delegateExecution.getProcessBusinessKey(); String bizId = delegateExecution.getProcessBusinessKey();
BizBillStatus status = approvePassed() ? BizBillStatus.COMPLETED : BizBillStatus.ABORTED; BizBillStatus status = approvePassed() ? BizBillStatus.COMPLETED : BizBillStatus.ABORTED;
SapPriceMasterData sapPriceMasterData = sapPriceMasterDataRepository.findOne(bizId); SapPriceMasterData sapPriceMasterData = sapPriceMasterDataRepository.findOne(bizId);
......
...@@ -165,7 +165,7 @@ public class ProcessOutsourceApplicationImpl extends FlowBroker implements Proce ...@@ -165,7 +165,7 @@ public class ProcessOutsourceApplicationImpl extends FlowBroker implements Proce
@Override @Override
protected void onEnd(DelegateExecution delegateExecution) { protected void onEnd(DelegateExecution delegateExecution) {
super.onEnd(delegateExecution); //super.onEnd(delegateExecution);
String bizId = delegateExecution.getProcessBusinessKey(); String bizId = delegateExecution.getProcessBusinessKey();
BizBillStatus status = approvePassed() ? BizBillStatus.COMPLETED : BizBillStatus.ABORTED; BizBillStatus status = approvePassed() ? BizBillStatus.COMPLETED : BizBillStatus.ABORTED;
ProcessOutsource processOutsource = processOutsourceRepository.findOne(bizId); ProcessOutsource processOutsource = processOutsourceRepository.findOne(bizId);
...@@ -232,6 +232,20 @@ public class ProcessOutsourceApplicationImpl extends FlowBroker implements Proce ...@@ -232,6 +232,20 @@ public class ProcessOutsourceApplicationImpl extends FlowBroker implements Proce
String format = dateFormat.format(processOutsourceOrderItem.getEeind()); String format = dateFormat.format(processOutsourceOrderItem.getEeind());
processOutsourceItemVo.setEeind(format); processOutsourceItemVo.setEeind(format);
} }
//工序描述拼接产品编码去掉前导零+工序号去掉前导零
StringBuilder stringBuilder = new StringBuilder();
if (StringUtil.isNotBlank(processOutsourceOrderItem.getProductCode())){
stringBuilder.append(processOutsourceOrderItem.getProductCode().replaceFirst("^0*", ""));
}
if (StringUtil.isNotBlank(processOutsourceOrderItem.getWempf())){
stringBuilder.append("-");
stringBuilder.append(processOutsourceOrderItem.getWempf().replaceFirst("^0*", ""));
}
if (StringUtil.isNotBlank(processOutsourceOrderItem.getTxz01())){
stringBuilder.append("-");
stringBuilder.append(processOutsourceOrderItem.getTxz01());
}
processOutsourceItemVo.setTxz01(stringBuilder.toString());
//设置默认值 //设置默认值
//processOutsourceVo.setPersonMemberName(processOutsource.getPersonMemberName()); //processOutsourceVo.setPersonMemberName(processOutsource.getPersonMemberName());
//同一个供应商下的行项目序号 //同一个供应商下的行项目序号
......
...@@ -124,7 +124,7 @@ public class ProcessQuotedPriceApplicationImpl extends FlowBroker implements Pro ...@@ -124,7 +124,7 @@ public class ProcessQuotedPriceApplicationImpl extends FlowBroker implements Pro
@Override @Override
protected void onEnd(DelegateExecution delegateExecution) { protected void onEnd(DelegateExecution delegateExecution) {
super.onEnd(delegateExecution); //super.onEnd(delegateExecution);
String bizId = delegateExecution.getProcessBusinessKey(); String bizId = delegateExecution.getProcessBusinessKey();
BizBillStatus status = approvePassed() ? BizBillStatus.COMPLETED : BizBillStatus.ABORTED; BizBillStatus status = approvePassed() ? BizBillStatus.COMPLETED : BizBillStatus.ABORTED;
ProcessQuotedPrice processQuotedPrice = processQuotedPriceRepository.findOne(bizId); ProcessQuotedPrice processQuotedPrice = processQuotedPriceRepository.findOne(bizId);
......
...@@ -88,7 +88,7 @@ public class ProduceMaterialApplyApplicationImpl extends FlowBroker implements P ...@@ -88,7 +88,7 @@ public class ProduceMaterialApplyApplicationImpl extends FlowBroker implements P
@Override @Override
protected void onEnd(DelegateExecution delegateExecution) { protected void onEnd(DelegateExecution delegateExecution) {
super.onEnd(delegateExecution); //super.onEnd(delegateExecution);
String bizId = delegateExecution.getProcessBusinessKey(); String bizId = delegateExecution.getProcessBusinessKey();
BizBillStatus status = approvePassed() ? BizBillStatus.COMPLETED : BizBillStatus.ABORTED; BizBillStatus status = approvePassed() ? BizBillStatus.COMPLETED : BizBillStatus.ABORTED;
ProduceMaterialApply produceMaterialApply = produceMaterialApplyRepository.findOne(bizId); ProduceMaterialApply produceMaterialApply = produceMaterialApplyRepository.findOne(bizId);
......
...@@ -97,7 +97,7 @@ public class ProduceSupplierReviewApplicationImpl extends FlowBroker implements ...@@ -97,7 +97,7 @@ public class ProduceSupplierReviewApplicationImpl extends FlowBroker implements
@Override @Override
protected void onEnd(DelegateExecution delegateExecution) { protected void onEnd(DelegateExecution delegateExecution) {
super.onEnd(delegateExecution); //super.onEnd(delegateExecution);
String bizId = delegateExecution.getProcessBusinessKey(); String bizId = delegateExecution.getProcessBusinessKey();
BizBillStatus status = approvePassed() ? BizBillStatus.COMPLETED : BizBillStatus.ABORTED; BizBillStatus status = approvePassed() ? BizBillStatus.COMPLETED : BizBillStatus.ABORTED;
ProduceSupplierReview produceSupplierReview = produceSupplierReviewRepository.findOne(bizId); ProduceSupplierReview produceSupplierReview = produceSupplierReviewRepository.findOne(bizId);
......
...@@ -143,7 +143,7 @@ public class ProductScrapApplyApplicationImpl extends FlowBroker implements Prod ...@@ -143,7 +143,7 @@ public class ProductScrapApplyApplicationImpl extends FlowBroker implements Prod
@Override @Override
protected void onEnd(DelegateExecution delegateExecution) { protected void onEnd(DelegateExecution delegateExecution) {
super.onEnd(delegateExecution); //super.onEnd(delegateExecution);
String bizId = delegateExecution.getProcessBusinessKey(); String bizId = delegateExecution.getProcessBusinessKey();
BizBillStatus status = approvePassed() ? BizBillStatus.COMPLETED : BizBillStatus.ABORTED; BizBillStatus status = approvePassed() ? BizBillStatus.COMPLETED : BizBillStatus.ABORTED;
ProductScrapApply productScrapApply = productScrapApplyRepository.findOne(bizId); ProductScrapApply productScrapApply = productScrapApplyRepository.findOne(bizId);
......
...@@ -171,7 +171,7 @@ public class SapPurchaseApplicationImpl extends FlowBroker implements SapPurchas ...@@ -171,7 +171,7 @@ public class SapPurchaseApplicationImpl extends FlowBroker implements SapPurchas
@Override @Override
protected void onEnd(DelegateExecution delegateExecution) { protected void onEnd(DelegateExecution delegateExecution) {
super.onEnd(delegateExecution); //super.onEnd(delegateExecution);
String bizId = delegateExecution.getProcessBusinessKey(); String bizId = delegateExecution.getProcessBusinessKey();
BizBillStatus status = approvePassed() ? BizBillStatus.COMPLETED : BizBillStatus.ABORTED; BizBillStatus status = approvePassed() ? BizBillStatus.COMPLETED : BizBillStatus.ABORTED;
SapPurchase sapPurchase = sapPurchaseRepository.findOne(bizId); SapPurchase sapPurchase = sapPurchaseRepository.findOne(bizId);
......
...@@ -164,7 +164,7 @@ public class SapPurchaseApprovalApplicationImpl extends FlowBroker implements Sa ...@@ -164,7 +164,7 @@ public class SapPurchaseApprovalApplicationImpl extends FlowBroker implements Sa
@Override @Override
protected void onEnd(DelegateExecution delegateExecution) { protected void onEnd(DelegateExecution delegateExecution) {
//取消待办任务办结提醒 //取消待办任务办结提醒
super.onEnd(delegateExecution); //super.onEnd(delegateExecution);
String bizId = delegateExecution.getProcessBusinessKey(); String bizId = delegateExecution.getProcessBusinessKey();
BizBillStatus status = approvePassed() ? BizBillStatus.COMPLETED : BizBillStatus.ABORTED; BizBillStatus status = approvePassed() ? BizBillStatus.COMPLETED : BizBillStatus.ABORTED;
SapPurchaseApproval sapPurchaseApproval = sapPurchaseApprovalRepository.findOne(bizId); SapPurchaseApproval sapPurchaseApproval = sapPurchaseApprovalRepository.findOne(bizId);
......
...@@ -153,7 +153,7 @@ public class SapPurchaseInfoRecordApplicationImpl extends FlowBroker implements ...@@ -153,7 +153,7 @@ public class SapPurchaseInfoRecordApplicationImpl extends FlowBroker implements
@Override @Override
protected void onEnd(DelegateExecution delegateExecution) { protected void onEnd(DelegateExecution delegateExecution) {
super.onEnd(delegateExecution); //super.onEnd(delegateExecution);
String bizId = delegateExecution.getProcessBusinessKey(); String bizId = delegateExecution.getProcessBusinessKey();
BizBillStatus status = approvePassed() ? BizBillStatus.COMPLETED : BizBillStatus.ABORTED; BizBillStatus status = approvePassed() ? BizBillStatus.COMPLETED : BizBillStatus.ABORTED;
SapPurchaseInfoRecord sapPurchaseInfoRecord = sapPurchaseInfoRecordRepository.findOne(bizId); SapPurchaseInfoRecord sapPurchaseInfoRecord = sapPurchaseInfoRecordRepository.findOne(bizId);
......
...@@ -202,7 +202,7 @@ public class SapPurchaseOrderApplicationImpl extends FlowBroker implements SapPu ...@@ -202,7 +202,7 @@ public class SapPurchaseOrderApplicationImpl extends FlowBroker implements SapPu
@Override @Override
protected void onEnd(DelegateExecution delegateExecution) { protected void onEnd(DelegateExecution delegateExecution) {
//取消待办任务办结提醒 //取消待办任务办结提醒
super.onEnd(delegateExecution); //super.onEnd(delegateExecution);
String bizId = delegateExecution.getProcessBusinessKey(); String bizId = delegateExecution.getProcessBusinessKey();
BizBillStatus status = approvePassed() ? BizBillStatus.COMPLETED : BizBillStatus.ABORTED; BizBillStatus status = approvePassed() ? BizBillStatus.COMPLETED : BizBillStatus.ABORTED;
SapPurchaseOrder sapPurchaseOrder = sapPurchaseOrderRepository.findOne(bizId); SapPurchaseOrder sapPurchaseOrder = sapPurchaseOrderRepository.findOne(bizId);
...@@ -563,6 +563,12 @@ public class SapPurchaseOrderApplicationImpl extends FlowBroker implements SapPu ...@@ -563,6 +563,12 @@ public class SapPurchaseOrderApplicationImpl extends FlowBroker implements SapPu
List<String> matnrList = new ArrayList<>(purchaseOrderItems List<String> matnrList = new ArrayList<>(purchaseOrderItems
.stream() .stream()
.map(SapPurchaseOrderItem::getMatnr2).collect(Collectors.toSet())); .map(SapPurchaseOrderItem::getMatnr2).collect(Collectors.toSet()));
//根据产品和单价合并明细项
List<MatnrNetprPair> result = purchaseOrderItems.stream()
.map(item -> new MatnrNetprPair(item.getMatnr2(), item.getNetpr()))
.distinct() // 如果类正确实现了 equals() 和 hashCode()
.collect(Collectors.toList());
////获取产品信息 ////获取产品信息
List<EpProductInfoVo> productInfoVoList = this.getProductInfo(matnrList); List<EpProductInfoVo> productInfoVoList = this.getProductInfo(matnrList);
map.put("productInfoVoList",productInfoVoList); map.put("productInfoVoList",productInfoVoList);
...@@ -571,16 +577,16 @@ public class SapPurchaseOrderApplicationImpl extends FlowBroker implements SapPu ...@@ -571,16 +577,16 @@ public class SapPurchaseOrderApplicationImpl extends FlowBroker implements SapPu
//获取订单明细信息 //获取订单明细信息
List<Map<String,Object>> detailList = new ArrayList<>(); List<Map<String,Object>> detailList = new ArrayList<>();
for (int i = 1; i <= matnrList.size(); i++) { for (int i = 1; i <= result.size(); i++) {
String matnr = matnrList.get(i-1); MatnrNetprPair matnrNetprPair = result.get(i-1);
Map<String, Object> detailMap = new HashMap<>(); Map<String, Object> detailMap = new HashMap<>();
detailMap.put("no",i); detailMap.put("no",i);
BigDecimal number = BigDecimal.ZERO; BigDecimal number = BigDecimal.ZERO;
BigDecimal amount = BigDecimal.ZERO; BigDecimal amount = BigDecimal.ZERO;
for (int j = 0; j < purchaseOrderItems.size(); j++) { for (int j = 0; j < purchaseOrderItems.size(); j++) {
SapPurchaseOrderItem purchaseOrderItem = purchaseOrderItems.get(j); SapPurchaseOrderItem purchaseOrderItem = purchaseOrderItems.get(j);
if (matnr.equals(purchaseOrderItem.getMatnr2())){ if (matnrNetprPair.getMatnr2().equals(purchaseOrderItem.getMatnr2())){
detailMap.put("matnr2",matnr.replaceFirst("^0*", "")); detailMap.put("matnr2",matnrNetprPair.getMatnr2().replaceFirst("^0*", ""));
detailMap.put("maktx",purchaseOrderItem.getTxz01()); detailMap.put("maktx",purchaseOrderItem.getTxz01());
detailMap.put("msehl",purchaseOrderItem.getMsehl()); detailMap.put("msehl",purchaseOrderItem.getMsehl());
number = number.add(new BigDecimal(purchaseOrderItem.getMenge())); number = number.add(new BigDecimal(purchaseOrderItem.getMenge()));
...@@ -649,8 +655,9 @@ public class SapPurchaseOrderApplicationImpl extends FlowBroker implements SapPu ...@@ -649,8 +655,9 @@ public class SapPurchaseOrderApplicationImpl extends FlowBroker implements SapPu
map.put("productionProcess",productInfoVoList.get(0).getProductionProcess()); map.put("productionProcess",productInfoVoList.get(0).getProductionProcess());
//产品和工序合并明细项,获取数量合计,loss合计,总金额合计 //产品和工序合并明细项,获取数量合计,loss合计,总金额合计
List<ProductKey> uniqueProductList = new ArrayList<>(outsourceOrderItemList.stream() List<ProductKey> uniqueProductList = new ArrayList<>(outsourceOrderItemList.stream()
.map(p -> new ProductKey(p.getProductCode(), p.getWempf())) .map(p -> new ProductKey(p.getProductCode(), p.getWempf(),p.getKbetr()))
.collect(Collectors.toSet())); .distinct() // 如果类正确实现了 equals() 和 hashCode()
.collect(Collectors.toList()));
map.put("eindt",outsourceOrderItemList.get(0).getEeind()); map.put("eindt",outsourceOrderItemList.get(0).getEeind());
List<Map<String,Object>> detailList = new ArrayList<>(); List<Map<String,Object>> detailList = new ArrayList<>();
for (int i = 0; i < uniqueProductList.size(); i++) { for (int i = 0; i < uniqueProductList.size(); i++) {
...@@ -662,7 +669,7 @@ public class SapPurchaseOrderApplicationImpl extends FlowBroker implements SapPu ...@@ -662,7 +669,7 @@ public class SapPurchaseOrderApplicationImpl extends FlowBroker implements SapPu
BigDecimal amount = BigDecimal.ZERO; BigDecimal amount = BigDecimal.ZERO;
for (int j = 0; j < outsourceOrderItemList.size(); j++) { for (int j = 0; j < outsourceOrderItemList.size(); j++) {
ProcessOutsourceOrderItem outsourceOrderItem = outsourceOrderItemList.get(j); ProcessOutsourceOrderItem outsourceOrderItem = outsourceOrderItemList.get(j);
if (productKey.getProductCode().equals(outsourceOrderItem.getProductCode())){ if (productKey.getProductCode().equals(outsourceOrderItem.getProductCode()) && productKey.getKbetr().equals(outsourceOrderItem.getKbetr())){
detailMap.put("matnr2",outsourceOrderItem.getProductCode().replaceFirst("^0*", "")); detailMap.put("matnr2",outsourceOrderItem.getProductCode().replaceFirst("^0*", ""));
detailMap.put("maktx",outsourceOrderItem.getProductName()); detailMap.put("maktx",outsourceOrderItem.getProductName());
detailMap.put("msehl",outsourceOrderItem.getMeinsName()); detailMap.put("msehl",outsourceOrderItem.getMeinsName());
......
package com.huigou.topsun.sap.purchaseOrder.domain.vo;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
// 或者用普通类
@Data
public class MatnrNetprPair implements Serializable {
private String matnr2;
private BigDecimal netpr;
// 构造方法、getter、setter...
public MatnrNetprPair(String matnr2, BigDecimal netpr) {
this.matnr2 = matnr2;
this.netpr = netpr;
}
}
\ No newline at end of file
...@@ -2,6 +2,8 @@ package com.huigou.topsun.sap.purchaseOrder.domain.vo; ...@@ -2,6 +2,8 @@ package com.huigou.topsun.sap.purchaseOrder.domain.vo;
import lombok.Data; import lombok.Data;
import java.math.BigDecimal;
/** /**
* @author xin.lu * @author xin.lu
* @Description: TODO * @Description: TODO
...@@ -11,10 +13,12 @@ import lombok.Data; ...@@ -11,10 +13,12 @@ import lombok.Data;
public class ProductKey { public class ProductKey {
private final String productCode; private final String productCode;
private final String wempf; private final String wempf;
private final BigDecimal kbetr;
public ProductKey(String productCode, String wempf) { public ProductKey(String productCode, String wempf, BigDecimal kbetr) {
this.productCode = productCode; this.productCode = productCode;
this.wempf = wempf; this.wempf = wempf;
this.kbetr = kbetr;
} }
@Override @Override
...@@ -22,11 +26,11 @@ public class ProductKey { ...@@ -22,11 +26,11 @@ public class ProductKey {
if (this == o) return true; if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false; if (o == null || getClass() != o.getClass()) return false;
ProductKey that = (ProductKey) o; ProductKey that = (ProductKey) o;
return productCode.equals(that.productCode) && wempf.equals(that.wempf); return productCode.equals(that.productCode) && wempf.equals(that.wempf) && kbetr.equals(that.kbetr);
} }
@Override @Override
public int hashCode() { public int hashCode() {
return java.util.Objects.hash(productCode, wempf); return java.util.Objects.hash(productCode, wempf, kbetr);
} }
} }
...@@ -137,7 +137,7 @@ public class SapQualityInfoRecordApplicationImpl extends FlowBroker implements S ...@@ -137,7 +137,7 @@ public class SapQualityInfoRecordApplicationImpl extends FlowBroker implements S
@Override @Override
protected void onEnd(DelegateExecution delegateExecution) { protected void onEnd(DelegateExecution delegateExecution) {
super.onEnd(delegateExecution); //super.onEnd(delegateExecution);
String bizId = delegateExecution.getProcessBusinessKey(); String bizId = delegateExecution.getProcessBusinessKey();
BizBillStatus status = approvePassed() ? BizBillStatus.COMPLETED : BizBillStatus.ABORTED; BizBillStatus status = approvePassed() ? BizBillStatus.COMPLETED : BizBillStatus.ABORTED;
SapQualityInfoRecord sapQualityInfoRecord = sapQualityInfoRecordRepository.findOne(bizId); SapQualityInfoRecord sapQualityInfoRecord = sapQualityInfoRecordRepository.findOne(bizId);
......
...@@ -169,7 +169,7 @@ public class SapStatsIndicatorsApplicationImpl extends FlowBroker implements Sap ...@@ -169,7 +169,7 @@ public class SapStatsIndicatorsApplicationImpl extends FlowBroker implements Sap
*/ */
@Override @Override
protected void onEnd(DelegateExecution delegateExecution) { protected void onEnd(DelegateExecution delegateExecution) {
super.onEnd(delegateExecution); //super.onEnd(delegateExecution);
String bizId = delegateExecution.getProcessBusinessKey(); String bizId = delegateExecution.getProcessBusinessKey();
BizBillStatus status = approvePassed() ? BizBillStatus.COMPLETED : BizBillStatus.ABORTED; BizBillStatus status = approvePassed() ? BizBillStatus.COMPLETED : BizBillStatus.ABORTED;
SapStatsIndicators sapStatsIndicators = sapStatsIndicatorsRepository.findOne(bizId); SapStatsIndicators sapStatsIndicators = sapStatsIndicatorsRepository.findOne(bizId);
......
...@@ -261,7 +261,7 @@ public class SuppliersDataApplicationImpl extends FlowBroker implements Supplier ...@@ -261,7 +261,7 @@ public class SuppliersDataApplicationImpl extends FlowBroker implements Supplier
*/ */
@Override @Override
protected void onEnd(DelegateExecution delegateExecution) { protected void onEnd(DelegateExecution delegateExecution) {
super.onEnd(delegateExecution); //super.onEnd(delegateExecution);
String bizId = delegateExecution.getProcessBusinessKey(); String bizId = delegateExecution.getProcessBusinessKey();
SuppliersInfo suppliersInfo = suppliersInfoRepository.findOne(bizId); SuppliersInfo suppliersInfo = suppliersInfoRepository.findOne(bizId);
List<SuppliersPay> payList = this.suppliersPayRepository.findAllBySId(suppliersInfo.getId()); List<SuppliersPay> payList = this.suppliersPayRepository.findAllBySId(suppliersInfo.getId());
......
...@@ -122,7 +122,7 @@ public class SapStockTransfersApplicationImpl extends FlowBroker implements SapS ...@@ -122,7 +122,7 @@ public class SapStockTransfersApplicationImpl extends FlowBroker implements SapS
@Override @Override
protected void onEnd(DelegateExecution delegateExecution) { protected void onEnd(DelegateExecution delegateExecution) {
super.onEnd(delegateExecution); //super.onEnd(delegateExecution);
String bizId = delegateExecution.getProcessBusinessKey(); String bizId = delegateExecution.getProcessBusinessKey();
BizBillStatus status = approvePassed() ? BizBillStatus.COMPLETED : BizBillStatus.ABORTED; BizBillStatus status = approvePassed() ? BizBillStatus.COMPLETED : BizBillStatus.ABORTED;
SapStockTransfers stockTransfers = sapStockTransfersRepository.findOne(bizId); SapStockTransfers stockTransfers = sapStockTransfersRepository.findOne(bizId);
......
...@@ -247,7 +247,7 @@ public class WasteSaleApplicationImpl extends FlowBroker implements WasteSaleApp ...@@ -247,7 +247,7 @@ public class WasteSaleApplicationImpl extends FlowBroker implements WasteSaleApp
@Override @Override
protected void onEnd(DelegateExecution delegateExecution) { protected void onEnd(DelegateExecution delegateExecution) {
super.onEnd(delegateExecution); //super.onEnd(delegateExecution);
String bizId = delegateExecution.getProcessBusinessKey(); String bizId = delegateExecution.getProcessBusinessKey();
BizBillStatus status = approvePassed() ? BizBillStatus.COMPLETED : BizBillStatus.ABORTED; BizBillStatus status = approvePassed() ? BizBillStatus.COMPLETED : BizBillStatus.ABORTED;
WasteSale wasteSale = wasteSaleRepository.findOne(bizId); WasteSale wasteSale = wasteSaleRepository.findOne(bizId);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment