fix:
1.框架合同反审核删除国贸经理签批附件
This commit is contained in:
parent
7c1f573ad6
commit
6e8255715c
@ -4,10 +4,15 @@ import kd.bos.dataentity.entity.DynamicObject;
|
|||||||
import kd.bos.entity.plugin.AbstractOperationServicePlugIn;
|
import kd.bos.entity.plugin.AbstractOperationServicePlugIn;
|
||||||
import kd.bos.entity.plugin.PreparePropertysEventArgs;
|
import kd.bos.entity.plugin.PreparePropertysEventArgs;
|
||||||
import kd.bos.entity.plugin.args.EndOperationTransactionArgs;
|
import kd.bos.entity.plugin.args.EndOperationTransactionArgs;
|
||||||
|
import kd.bos.orm.query.QCP;
|
||||||
|
import kd.bos.orm.query.QFilter;
|
||||||
|
import kd.bos.servicehelper.AttachmentServiceHelper;
|
||||||
import kd.bos.servicehelper.BusinessDataServiceHelper;
|
import kd.bos.servicehelper.BusinessDataServiceHelper;
|
||||||
|
import kd.bos.servicehelper.operation.DeleteServiceHelper;
|
||||||
import kd.bos.servicehelper.operation.SaveServiceHelper;
|
import kd.bos.servicehelper.operation.SaveServiceHelper;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author ljw
|
* @author ljw
|
||||||
@ -28,6 +33,7 @@ public class SalesContracUnauditOp extends AbstractOperationServicePlugIn {
|
|||||||
fieldKeys.add("yem_sigflowinstid");
|
fieldKeys.add("yem_sigflowinstid");
|
||||||
fieldKeys.add("yem_sigmag");
|
fieldKeys.add("yem_sigmag");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void endOperationTransaction(EndOperationTransactionArgs e) {
|
public void endOperationTransaction(EndOperationTransactionArgs e) {
|
||||||
super.endOperationTransaction(e);
|
super.endOperationTransaction(e);
|
||||||
@ -35,15 +41,16 @@ public class SalesContracUnauditOp extends AbstractOperationServicePlugIn {
|
|||||||
for (DynamicObject dataEntitie : dataEntities) {
|
for (DynamicObject dataEntitie : dataEntities) {
|
||||||
dataEntitie = BusinessDataServiceHelper.loadSingle(dataEntitie.getPkValue(), dataEntitie.getDynamicObjectType().getName());
|
dataEntitie = BusinessDataServiceHelper.loadSingle(dataEntitie.getPkValue(), dataEntitie.getDynamicObjectType().getName());
|
||||||
clearManagerSign(dataEntitie);
|
clearManagerSign(dataEntitie);
|
||||||
|
createPdf(dataEntitie);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 反审核的时候,清空外销合同-经理签章;
|
* 反审核的时候,清空外销合同-经理签章;
|
||||||
|
*
|
||||||
* @param dataEntitie
|
* @param dataEntitie
|
||||||
*/
|
*/
|
||||||
private void clearManagerSign(DynamicObject dataEntitie)
|
private void clearManagerSign(DynamicObject dataEntitie) {
|
||||||
{
|
|
||||||
dataEntitie.set("yem_managersign", null);
|
dataEntitie.set("yem_managersign", null);
|
||||||
dataEntitie.set("yem_sigstatus", false);
|
dataEntitie.set("yem_sigstatus", false);
|
||||||
dataEntitie.set("yem_siguser", null);
|
dataEntitie.set("yem_siguser", null);
|
||||||
@ -53,4 +60,13 @@ public class SalesContracUnauditOp extends AbstractOperationServicePlugIn {
|
|||||||
dataEntitie.set("yem_sigmag", "");
|
dataEntitie.set("yem_sigmag", "");
|
||||||
SaveServiceHelper.save(new DynamicObject[]{dataEntitie});
|
SaveServiceHelper.save(new DynamicObject[]{dataEntitie});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void createPdf(DynamicObject dataEntitie) {
|
||||||
|
List<Map<String, Object>> salesorder = AttachmentServiceHelper.getAttachments("yem_es_salescontrac", dataEntitie.getLong("id"), "yem_approval");
|
||||||
|
for (Map<String, Object> map : salesorder) {
|
||||||
|
DeleteServiceHelper.delete("bos_attachment", new QFilter[]{new QFilter("id", QCP.equals, map.get("attPkId"))});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user