支出合同结算删除支持财务确认单时解绑发票
This commit is contained in:
parent
3fd6ebabf0
commit
9774474d21
|
|
@ -1,5 +1,7 @@
|
||||||
package zcgj.zcdev.zcdev.pr.plugin.operate;
|
package zcgj.zcdev.zcdev.pr.plugin.operate;
|
||||||
|
|
||||||
|
import com.google.gson.Gson;
|
||||||
|
import com.google.gson.reflect.TypeToken;
|
||||||
import kd.bos.dataentity.entity.DynamicObject;
|
import kd.bos.dataentity.entity.DynamicObject;
|
||||||
import kd.bos.dataentity.entity.DynamicObjectCollection;
|
import kd.bos.dataentity.entity.DynamicObjectCollection;
|
||||||
import kd.bos.entity.ExtendedDataEntity;
|
import kd.bos.entity.ExtendedDataEntity;
|
||||||
|
|
@ -7,12 +9,16 @@ import kd.bos.entity.plugin.AbstractOperationServicePlugIn;
|
||||||
import kd.bos.entity.plugin.AddValidatorsEventArgs;
|
import kd.bos.entity.plugin.AddValidatorsEventArgs;
|
||||||
import kd.bos.entity.plugin.PreparePropertysEventArgs;
|
import kd.bos.entity.plugin.PreparePropertysEventArgs;
|
||||||
import kd.bos.entity.validate.AbstractValidator;
|
import kd.bos.entity.validate.AbstractValidator;
|
||||||
|
import kd.bos.openapi.common.result.OpenApiResult;
|
||||||
|
import kd.bos.openapi.common.util.OpenApiSdkUtil;
|
||||||
import kd.bos.orm.query.QCP;
|
import kd.bos.orm.query.QCP;
|
||||||
import kd.bos.orm.query.QFilter;
|
import kd.bos.orm.query.QFilter;
|
||||||
import kd.bos.servicehelper.BusinessDataServiceHelper;
|
import kd.bos.servicehelper.BusinessDataServiceHelper;
|
||||||
import kd.bos.servicehelper.operation.DeleteServiceHelper;
|
import kd.bos.servicehelper.operation.DeleteServiceHelper;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 支出合同结算冲销单反审核校验是否生成收入合同冲销单
|
* 支出合同结算冲销单反审核校验是否生成收入合同冲销单
|
||||||
|
|
@ -65,6 +71,8 @@ public class OutContractSettleUnauditCheckOp extends AbstractOperationServicePlu
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}else{
|
}else{
|
||||||
|
//删除发票绑定关系
|
||||||
|
bindInvoice("1", dynamicObject.getLong("id"));
|
||||||
QFilter idFilter = new QFilter("id", "=", dynamicObject.getLong("id"));
|
QFilter idFilter = new QFilter("id", "=", dynamicObject.getLong("id"));
|
||||||
QFilter statusFilter = new QFilter("billstatus", "=", "A");
|
QFilter statusFilter = new QFilter("billstatus", "=", "A");
|
||||||
DeleteServiceHelper.delete("zcgj_ec_out_finaceconfirm", new QFilter[]{idFilter.and(statusFilter)});
|
DeleteServiceHelper.delete("zcgj_ec_out_finaceconfirm", new QFilter[]{idFilter.and(statusFilter)});
|
||||||
|
|
@ -75,4 +83,27 @@ public class OutContractSettleUnauditCheckOp extends AbstractOperationServicePlu
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void bindInvoice(String status,Long billId){
|
||||||
|
// 拼接完整 JSON
|
||||||
|
String par ="";
|
||||||
|
if("1".equals(status)){ //删除发票绑定关系
|
||||||
|
par = "{" +
|
||||||
|
" \"messageType\": \"billDel\"," +
|
||||||
|
" \"messageId\": \""+System.currentTimeMillis()+"\"," +
|
||||||
|
" \"data\": {" +
|
||||||
|
" \"billId\": \"" + billId + "\"," +
|
||||||
|
" \"resource\": \"4\"" +
|
||||||
|
" }" +
|
||||||
|
"}";
|
||||||
|
}
|
||||||
|
Gson gson = new Gson();
|
||||||
|
//String json = gson.toJson(balanceQueryParamApi);
|
||||||
|
Map<String, Object> params = gson.fromJson(par,
|
||||||
|
new TypeToken<Map<String, Object>>() {
|
||||||
|
}.getType());
|
||||||
|
OpenApiResult balanceData = OpenApiSdkUtil.invoke("/v2/rim/message/service", params);
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue