parent
							
								
									2a7e958e70
								
							
						
					
					
						commit
						dd0817433d
					
				| 
						 | 
				
			
			@ -5,6 +5,10 @@
 | 
			
		|||
 | 
			
		||||
package shkd.sys.sys.plugin.form;
 | 
			
		||||
 | 
			
		||||
import java.sql.ResultSet;
 | 
			
		||||
import java.util.*;
 | 
			
		||||
import java.util.stream.Collectors;
 | 
			
		||||
 | 
			
		||||
import kd.bos.db.DB;
 | 
			
		||||
import kd.bos.db.ResultSetHandler;
 | 
			
		||||
import kd.bos.db.tx.TX;
 | 
			
		||||
| 
						 | 
				
			
			@ -17,12 +21,6 @@ import kd.tmc.fbp.common.enums.RptDateRangeEnum;
 | 
			
		|||
import kd.tmc.fbp.common.helper.TmcDataServiceHelper;
 | 
			
		||||
import kd.tmc.fbp.common.util.EmptyUtil;
 | 
			
		||||
 | 
			
		||||
import java.sql.ResultSet;
 | 
			
		||||
import java.util.Date;
 | 
			
		||||
import java.util.EventObject;
 | 
			
		||||
import java.util.HashMap;
 | 
			
		||||
import java.util.Map;
 | 
			
		||||
 | 
			
		||||
public class addDormantSettingEdit extends AbstractFormPlugin {
 | 
			
		||||
    public static final String DORMANTSET_FID_CACHE = "DORMANTSET_FID_CACHE";
 | 
			
		||||
    public static final String FTRADECOUNT_MAP = "FTRADECOUNT_MAP";
 | 
			
		||||
| 
						 | 
				
			
			@ -130,11 +128,18 @@ public class addDormantSettingEdit extends AbstractFormPlugin {
 | 
			
		|||
                    this.getModel().setValue("shkd_acctstyle_list", resultString);
 | 
			
		||||
                }
 | 
			
		||||
 | 
			
		||||
                if ("0".equals(addcolumnarray[1])){
 | 
			
		||||
                    this.getModel().setValue("shkd_acctproperty_list", null);
 | 
			
		||||
 | 
			
		||||
                if (addcolumnarray[1] == null || addcolumnarray[1].equals("[]")) {
 | 
			
		||||
                    List<Long> longList = Collections.emptyList(); // 返回空列表
 | 
			
		||||
                    this.getModel().setValue("shkd_acctproperty_list", longList.toArray(new Long[0]));
 | 
			
		||||
                }else {
 | 
			
		||||
                    this.getModel().setValue("shkd_acctproperty_list", addcolumnarray[1]);
 | 
			
		||||
                    List<Long> longList = Arrays.stream(addcolumnarray[1].substring(1, addcolumnarray[1].length() - 1).split(","))
 | 
			
		||||
                            .map(String::trim)  // 去除每个元素的空格
 | 
			
		||||
                            .map(Long::parseLong) // 转换为 Long 类型
 | 
			
		||||
                            .collect(Collectors.toList()); // 收集到 List 中
 | 
			
		||||
                    this.getModel().setValue("shkd_acctproperty_list", longList.toArray(new Long[0]));
 | 
			
		||||
                }
 | 
			
		||||
 | 
			
		||||
            }
 | 
			
		||||
            this.getModel().setValue("datarange", date);
 | 
			
		||||
        } catch (Throwable var32) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -5,7 +5,13 @@
 | 
			
		|||
 | 
			
		||||
package shkd.sys.sys.plugin.operation.domain;
 | 
			
		||||
 | 
			
		||||
import java.util.Arrays;
 | 
			
		||||
import java.util.Date;
 | 
			
		||||
import java.util.List;
 | 
			
		||||
import java.util.stream.Collectors;
 | 
			
		||||
 | 
			
		||||
import kd.bos.dataentity.entity.DynamicObject;
 | 
			
		||||
import kd.bos.dataentity.entity.DynamicObjectCollection;
 | 
			
		||||
import kd.bos.db.tx.TX;
 | 
			
		||||
import kd.bos.db.tx.TXHandle;
 | 
			
		||||
import kd.bos.exception.KDException;
 | 
			
		||||
| 
						 | 
				
			
			@ -14,9 +20,6 @@ import kd.tmc.fbp.common.constant.DBRouteConst;
 | 
			
		|||
import kd.tmc.fbp.common.enums.RptDateRangeEnum;
 | 
			
		||||
import kd.tmc.fbp.common.helper.TmcDataServiceHelper;
 | 
			
		||||
 | 
			
		||||
import java.util.Arrays;
 | 
			
		||||
import java.util.Date;
 | 
			
		||||
 | 
			
		||||
public class NewDormantSaveService extends AbstractTmcBizOppService {
 | 
			
		||||
    public NewDormantSaveService() {
 | 
			
		||||
    }
 | 
			
		||||
| 
						 | 
				
			
			@ -43,14 +46,13 @@ public class NewDormantSaveService extends AbstractTmcBizOppService {
 | 
			
		|||
            shkd_acctstyle_listString=Arrays.toString(array);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        Long shkd_acctproperty_listLong;//账户用途
 | 
			
		||||
        DynamicObject shkd_acctproperty_list = dataEntity.getDynamicObject("shkd_acctproperty_list");
 | 
			
		||||
        if (shkd_acctproperty_list==null){
 | 
			
		||||
            shkd_acctproperty_listLong=0L;
 | 
			
		||||
        }else {
 | 
			
		||||
            shkd_acctproperty_listLong=shkd_acctproperty_list.getLong("id");
 | 
			
		||||
        }
 | 
			
		||||
        String shkd_acctproperty_listLong;//账户用途
 | 
			
		||||
        DynamicObjectCollection shkd_acctproperty_list = dataEntity.getDynamicObjectCollection("shkd_acctproperty_list");
 | 
			
		||||
        List<Long> ids = shkd_acctproperty_list.stream()  // 将 DynamicObjectCollection 转换为 Stream
 | 
			
		||||
                .map(obj ->  obj.getDynamicObject("fbasedataid").getLong("id"))  // 提取每个对象的 id
 | 
			
		||||
                .collect(Collectors.toList());  // 收集到 List 中
 | 
			
		||||
 | 
			
		||||
        shkd_acctproperty_listLong=ids.toString();
 | 
			
		||||
 | 
			
		||||
        if (RptDateRangeEnum.CUSTOM.getValue().equals(datarange)) {
 | 
			
		||||
            datarange = datarange.concat("&").concat(String.valueOf(startDate.getTime()).concat("&").concat(String.valueOf(endDate.getTime())));
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -8,6 +8,7 @@ import kd.bos.db.tx.TXHandle;
 | 
			
		|||
import kd.bos.entity.report.AbstractReportListDataPluginExt;
 | 
			
		||||
import kd.bos.event.AfterQueryEvent;
 | 
			
		||||
import kd.bos.orm.ORM;
 | 
			
		||||
import kd.tmc.am.report.bankacct.helper.DormantSettingFilterHelper;
 | 
			
		||||
import kd.tmc.fbp.common.constant.DBRouteConst;
 | 
			
		||||
import kd.tmc.fbp.common.enums.RptDateRangeEnum;
 | 
			
		||||
import kd.tmc.fbp.common.util.DateUtils;
 | 
			
		||||
| 
						 | 
				
			
			@ -41,8 +42,19 @@ public class addDormantDataListPlugin extends AbstractReportListDataPluginExt {
 | 
			
		|||
                continue;
 | 
			
		||||
            }
 | 
			
		||||
            if (key.equals("shkd_acctproperty_list")&&value!=null){
 | 
			
		||||
                dataSet= dataSet.filter("acctproperty_list in ("+value+")");
 | 
			
		||||
                continue;
 | 
			
		||||
                // 输入字符串
 | 
			
		||||
                String inputString = (String) value;
 | 
			
		||||
 | 
			
		||||
                // 去掉方括号,并按逗号分割字符串
 | 
			
		||||
                Long[] longArray = Arrays.stream(inputString.substring(1, inputString.length() - 1).split(", "))
 | 
			
		||||
                        .map(String::trim) // 去除每个元素的空格
 | 
			
		||||
                        .map(Long::parseLong) // 转换为 Long 类型
 | 
			
		||||
                        .toArray(Long[]::new); // 转换为 Long[] 数组
 | 
			
		||||
                // 将分割后的元素加入到集合中
 | 
			
		||||
                List<Long> list = Arrays.asList(longArray);
 | 
			
		||||
                Map<String, Object> paramMap = new HashMap<String, Object>();
 | 
			
		||||
                paramMap.put("list", list);
 | 
			
		||||
                dataSet = dataSet.filter("acctproperty_list in list",paramMap);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
        }
 | 
			
		||||
| 
						 | 
				
			
			@ -120,7 +132,7 @@ public class addDormantDataListPlugin extends AbstractReportListDataPluginExt {
 | 
			
		|||
                settingFilterMap.put("shkd_acctstyle_list", addcolumnarray[0]);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            if ("0".equals(addcolumnarray[1])){
 | 
			
		||||
            if ("[]".equals(addcolumnarray[1])){
 | 
			
		||||
                settingFilterMap.put("shkd_acctproperty_list", null);
 | 
			
		||||
            }else {
 | 
			
		||||
                settingFilterMap.put("shkd_acctproperty_list", addcolumnarray[1]);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue