Compare commits
	
		
			2 Commits
		
	
	
		
			e5be42af19
			...
			852b1e8f81
		
	
	| Author | SHA1 | Date | 
|---|---|---|
| 
							
							
								
									
								
								 | 
						852b1e8f81 | |
| 
							
							
								
									
								
								 | 
						a82c3b98ce | 
| 
						 | 
				
			
			@ -33,7 +33,7 @@ public class AccountbanksFormPlugin extends AbstractFormPlugin {
 | 
			
		|||
                case "normal"://一般存款账户
 | 
			
		||||
                    this.getView().getModel().setValue("shkd_accounttype","D01");
 | 
			
		||||
                    DynamicObject value = (DynamicObject) this.getView().getModel().getValue("acctproperty");
 | 
			
		||||
                    if (value!=null&&"保证金".equals(value.getString("name"))){
 | 
			
		||||
                    if (value!=null&&value.getString("name").contains("保证金")){
 | 
			
		||||
                        this.getView().getModel().setValue("shkd_accounttype","D06");
 | 
			
		||||
                    }else {
 | 
			
		||||
                        this.getView().getModel().setValue("shkd_accounttype","D02");
 | 
			
		||||
| 
						 | 
				
			
			@ -68,7 +68,7 @@ public class AccountbanksFormPlugin extends AbstractFormPlugin {
 | 
			
		|||
                    break;
 | 
			
		||||
                case "normal"://一般存款账户
 | 
			
		||||
                    this.getView().getModel().setValue("shkd_accounttype","D01");
 | 
			
		||||
                    if (newValue!=null&&"保证金".equals(newValue.getString("name"))){
 | 
			
		||||
                    if (newValue!=null&&newValue.getString("name").contains("保证金")){
 | 
			
		||||
                        this.getView().getModel().setValue("shkd_accounttype","D06");
 | 
			
		||||
                    }else {
 | 
			
		||||
                        this.getView().getModel().setValue("shkd_accounttype","D02");
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -72,7 +72,7 @@ public class AccountbankListPlugin extends AbstractListPlugin {
 | 
			
		|||
                            dynamicObject.set("shkd_accounttype","D01");//账户用途
 | 
			
		||||
                            break;
 | 
			
		||||
                        case "normal"://一般存款账户
 | 
			
		||||
                            if ("保证金".equals(acctproperty_name)){
 | 
			
		||||
                            if (acctproperty_name!=null&&acctproperty_name.contains("保证金")){
 | 
			
		||||
                                dynamicObject.set("shkd_accounttype","D06");//账户用途
 | 
			
		||||
                            }else {
 | 
			
		||||
                                dynamicObject.set("shkd_accounttype","D02");//账户用途
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -0,0 +1,109 @@
 | 
			
		|||
package shkd.sys.sys.plugin.operation;
 | 
			
		||||
 | 
			
		||||
import kd.bos.dataentity.entity.DynamicObject;
 | 
			
		||||
import kd.bos.entity.plugin.AbstractOperationServicePlugIn;
 | 
			
		||||
import kd.bos.entity.plugin.PreparePropertysEventArgs;
 | 
			
		||||
import kd.bos.entity.plugin.args.BeforeOperationArgs;
 | 
			
		||||
import kd.bos.logging.Log;
 | 
			
		||||
import kd.bos.logging.LogFactory;
 | 
			
		||||
 | 
			
		||||
import java.util.Date;
 | 
			
		||||
 | 
			
		||||
public class AccountbankSaveOPPlugin extends AbstractOperationServicePlugIn {
 | 
			
		||||
 | 
			
		||||
    private static final Log logger = LogFactory.getLog(AccountbankSaveOPPlugin.class);
 | 
			
		||||
    @Override
 | 
			
		||||
    public void onPreparePropertys(PreparePropertysEventArgs e) {
 | 
			
		||||
        super.onPreparePropertys(e);
 | 
			
		||||
        e.getFieldKeys().add("openorg.uniformsocialcreditcode");
 | 
			
		||||
        e.getFieldKeys().add("finorgtype");
 | 
			
		||||
        e.getFieldKeys().add("bank.org");
 | 
			
		||||
        e.getFieldKeys().add("bank.number");
 | 
			
		||||
        e.getFieldKeys().add("bank.name");
 | 
			
		||||
        e.getFieldKeys().add("bank.country.name");
 | 
			
		||||
        e.getFieldKeys().add("bank.parent.name");
 | 
			
		||||
        e.getFieldKeys().add("acctstyle");
 | 
			
		||||
        e.getFieldKeys().add("acctproperty.name");
 | 
			
		||||
        e.getFieldKeys().add("shkd_direct_time1");
 | 
			
		||||
        e.getFieldKeys().add("issetbankinterface");
 | 
			
		||||
        e.getFieldKeys().add("shkd_openunitcode");
 | 
			
		||||
        e.getFieldKeys().add("shkd_subcompany");
 | 
			
		||||
        e.getFieldKeys().add("shkd_bankcodenumber");
 | 
			
		||||
        e.getFieldKeys().add("shkd_country");
 | 
			
		||||
        e.getFieldKeys().add("shkd_bank_head_office");
 | 
			
		||||
        e.getFieldKeys().add("shkd_accounttype");
 | 
			
		||||
        e.getFieldKeys().add("shkd_accounttype");
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override
 | 
			
		||||
    public void beforeExecuteOperationTransaction(BeforeOperationArgs e) {
 | 
			
		||||
        super.beforeExecuteOperationTransaction(e);
 | 
			
		||||
        DynamicObject[] dataEntities = e.getDataEntities();
 | 
			
		||||
        for (DynamicObject dataEntity : dataEntities) {
 | 
			
		||||
            try {
 | 
			
		||||
                String uniformsocialcreditcode = dataEntity.getString("openorg.uniformsocialcreditcode");//信用代码
 | 
			
		||||
                String finorgtype = dataEntity.getString("finorgtype");//金融机构类别
 | 
			
		||||
                DynamicObject bank_org = dataEntity.getDynamicObject("bank.org");//开户行
 | 
			
		||||
                String bank_number = dataEntity.getString("bank.number");//开户行
 | 
			
		||||
                String bank_name = dataEntity.getString("bank.name");//开户行
 | 
			
		||||
                String bank_bd_country_name = dataEntity.getString("bank.country.name");//开户行
 | 
			
		||||
                String bank_parent_name = dataEntity.getString("bank.parent.name");//开户行
 | 
			
		||||
                String acctstyle = dataEntity.getString("acctstyle");//账户类型
 | 
			
		||||
                String acctproperty_name = dataEntity.getString("acctproperty.name");//账户用途
 | 
			
		||||
                Date shkd_direct_time1 = dataEntity.getDate("shkd_direct_time1");//开通银企直联时间
 | 
			
		||||
                boolean issetbankinterface = dataEntity.getBoolean("issetbankinterface");//是否开启银企
 | 
			
		||||
 | 
			
		||||
                //开始赋值
 | 
			
		||||
                dataEntity.set("shkd_openunitcode",uniformsocialcreditcode);//开户单位编码
 | 
			
		||||
                if ("3".equals(finorgtype)&&bank_org!=null){
 | 
			
		||||
                    dataEntity.set("shkd_subcompany","T01");//是否为内部单位账户
 | 
			
		||||
                }else {
 | 
			
		||||
                    dataEntity.set("shkd_subcompany","T00");//是否为内部单位账户
 | 
			
		||||
                }
 | 
			
		||||
                dataEntity.set("shkd_bankcodenumber",bank_number);//开户机构联行号
 | 
			
		||||
                dataEntity.set("shkd_country",bank_bd_country_name);//开户银行所在国所在地区
 | 
			
		||||
                if ("0".equals(finorgtype)){
 | 
			
		||||
                    dataEntity.set("shkd_bank_head_office",bank_parent_name);//开户银行总行
 | 
			
		||||
                }else {
 | 
			
		||||
                    dataEntity.set("shkd_bank_head_office",bank_name);//开户银行总行
 | 
			
		||||
                }
 | 
			
		||||
                switch (acctstyle) {
 | 
			
		||||
                    case "basic"://基本存款账户
 | 
			
		||||
                        dataEntity.set("shkd_accounttype","D01");//账户用途
 | 
			
		||||
                        break;
 | 
			
		||||
                    case "normal"://一般存款账户
 | 
			
		||||
                        if (acctproperty_name!=null&&acctproperty_name.contains("保证金")){
 | 
			
		||||
                            dataEntity.set("shkd_accounttype","D06");//账户用途
 | 
			
		||||
                        }else {
 | 
			
		||||
                            dataEntity.set("shkd_accounttype","D02");//账户用途
 | 
			
		||||
                        }
 | 
			
		||||
                        break;
 | 
			
		||||
                    case "temp"://临时存款账户
 | 
			
		||||
                        dataEntity.set("shkd_accounttype","D04");//账户用途
 | 
			
		||||
                        break;
 | 
			
		||||
                    case "spcl"://专用存款账户
 | 
			
		||||
                        dataEntity.set("shkd_accounttype","D03");//账户用途
 | 
			
		||||
                        break;
 | 
			
		||||
                    case "fgn_curr"://经常项目外汇账户
 | 
			
		||||
                        dataEntity.set("shkd_accounttype","D05");//账户用途
 | 
			
		||||
                        break;
 | 
			
		||||
                    case "fng_fin"://资本项目外汇账户
 | 
			
		||||
                        dataEntity.set("shkd_accounttype","D05");//账户用途
 | 
			
		||||
                        break;
 | 
			
		||||
                    case "non-settlement"://非结算账户
 | 
			
		||||
                        dataEntity.set("shkd_accounttype","D05");//账户用途
 | 
			
		||||
                        break;
 | 
			
		||||
                    default:
 | 
			
		||||
                        dataEntity.set("shkd_accounttype","D05");//账户用途
 | 
			
		||||
                        break;
 | 
			
		||||
                }
 | 
			
		||||
                if (issetbankinterface&&shkd_direct_time1==null){
 | 
			
		||||
                    dataEntity.set("shkd_direct_time1",dataEntity.getDate("opendate"));//
 | 
			
		||||
                }
 | 
			
		||||
            } catch (Exception ex) {
 | 
			
		||||
                logger.info(dataEntity.getString("number")+"保存报错原因:"+ex.getMessage());
 | 
			
		||||
                continue;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -3,14 +3,18 @@ package shkd.sys.sys.plugin.report;
 | 
			
		|||
import kd.bos.algo.DataSet;
 | 
			
		||||
import kd.bos.algo.JoinDataSet;
 | 
			
		||||
import kd.bos.algo.JoinType;
 | 
			
		||||
import kd.bos.dataentity.entity.DynamicObject;
 | 
			
		||||
import kd.bos.dataentity.entity.DynamicObjectCollection;
 | 
			
		||||
import kd.bos.db.DB;
 | 
			
		||||
import kd.bos.db.DBRoute;
 | 
			
		||||
import kd.bos.entity.report.AbstractReportListDataPlugin;
 | 
			
		||||
import kd.bos.entity.report.ReportQueryParam;
 | 
			
		||||
import kd.bos.entity.report.*;
 | 
			
		||||
import kd.bos.logging.Log;
 | 
			
		||||
import kd.bos.logging.LogFactory;
 | 
			
		||||
import kd.bos.orm.ORM;
 | 
			
		||||
import kd.bos.orm.query.QCP;
 | 
			
		||||
import kd.bos.orm.query.QFilter;
 | 
			
		||||
import kd.bos.servicehelper.QueryServiceHelper;
 | 
			
		||||
import kd.bos.util.CollectionUtils;
 | 
			
		||||
import shkd.sys.sys.plugin.report.util.ReportUtils;
 | 
			
		||||
 | 
			
		||||
import java.text.SimpleDateFormat;
 | 
			
		||||
| 
						 | 
				
			
			@ -34,11 +38,10 @@ public class AccountbankReportPlugin extends AbstractReportListDataPlugin {
 | 
			
		|||
            }
 | 
			
		||||
        }
 | 
			
		||||
        String selectFields="id,openorg.shkd_comcode as shkd_ssjtbm,openorg.shkd_comname as shkd_ssjtmc," +
 | 
			
		||||
                "openorg.number as shkd_khdwbm,openorg.name as shkd_khdwmc," +
 | 
			
		||||
                "openorg.uniformsocialcreditcode as shkd_khdwbm,openorg.name as shkd_khdwmc," +
 | 
			
		||||
                "openorg.shkd_comlevel as shkd_khdwqyjc,acctname as shkd_zhmc,bankaccountnumber as shkd_yhzh," +
 | 
			
		||||
                "shkd_subcompany as shkd_sfwnbdwzh,bank.name as shkd_khhmc,bank.number as shkd_khhbm," +
 | 
			
		||||
                "bank.country.name as shkd_khhszgj,shkd_bank_head_office as shkd_khhzh,currency," +
 | 
			
		||||
//                "123 as shkd_zhyeyb,123 as shkd_zhyebb,"+"'2025-07-09 11:31:12'"+" as shkd_zhyesj," +
 | 
			
		||||
                "shkd_accounttype as shkd_zhytbm,case  when issetbankinterface=1 then '是' else '否' end as shkd_ktyqjk,shkd_direct_time1 as shkd_ktyqsj," +
 | 
			
		||||
                "shkd_accounttype as shkd_zhytmc,fundaccflag as shkd_jzjzzhbs,case when closedate IS NULL then acctstatus else (case  when closedate>'"+dateList.get(0)+"' then 'normal' else 'closed' end) end as shkd_zhzt,closedate as shkd_xhrq," +
 | 
			
		||||
                "opendate as shkd_khrq,'"+dateList.get(0)+"' as shkd_sjrq,case  when ismoneypool=1 then '是' else '否' end as shkd_sfzjczh";
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue