package abacus.springboot.example.config;

import java.util.ArrayList;
import java.util.List;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import abacus.config.dao.AbacusConfig;
import abacus.config.dao.AbacusConfigItem;
import abacus.config.wso.AbacusConfigNote;

/**
 * <p>Title:JcConfiguration</p>
   <p>Description: 系统配置定义</p>
   @author chuanZeng 
   @date 2024年12月9日
 */
@Configuration
public class JcConfiguration {

	@Bean
	public AbacusConfigNote key_jc_scan_source() {
		AbacusConfigNote abacusConfigNote = new AbacusConfigNote();
		
		AbacusConfig abacusConfig = new AbacusConfig();
		abacusConfig.setKeyGroup(JcConfigKey.KEY_GROUP);
		abacusConfig.setKey(JcConfigKey.KEY_JC_SCAN_SOURCE);
		abacusConfig.setValueType(AbacusConfig._Value);
		abacusConfig.setValuees("http://c.ztyxkj.com/,https://scan.vatsliquor.com/logistic/,https://scan.vats.com.cn/scan/");
		abacusConfig.setProcedures("API");
		abacusConfig.setInsulate(null);
		abacusConfig.setDescribe("溯源：二维码域名IP");
		
		abacusConfigNote.setAbacusConfig(abacusConfig);
		return abacusConfigNote;
	}
	
	@Bean
	public AbacusConfigNote key_jc_payment_offline() {
		AbacusConfigNote abacusConfigNote = new AbacusConfigNote();
		
		AbacusConfig abacusConfig = new AbacusConfig();
		abacusConfig.setKeyGroup(JcConfigKey.KEY_GROUP);
		abacusConfig.setKey(JcConfigKey.KEY_JC_PAYMENT_OFFLINE);
		abacusConfig.setValueType(AbacusConfig._Set);
		abacusConfig.setValuees(null);
		abacusConfig.setProcedures("API");
		abacusConfig.setInsulate(null);
		abacusConfig.setDescribe("支付方式：线下支付");
		
		List<AbacusConfigItem> abacusConfigItems = new ArrayList<AbacusConfigItem>();
		
		AbacusConfigItem aci = new AbacusConfigItem();
		aci.setKeyGroup(JcConfigKey.KEY_GROUP);
		aci.setKey(JcConfigKey.KEY_JC_PAYMENT_OFFLINE);
		aci.setCode(JcConfigKey.KEY_JC_ZHMC);
		aci.setName("张三");
		aci.setInsulate(null);
		aci.setDescribe("账户名称");
		abacusConfigItems.add(aci);
		
		AbacusConfigItem aci1 = new AbacusConfigItem();
		aci1.setKeyGroup(JcConfigKey.KEY_GROUP);
		aci1.setKey(JcConfigKey.KEY_JC_PAYMENT_OFFLINE);
		aci1.setCode(JcConfigKey.KEY_JC_KHYH);
		aci1.setName("工商银行");
		aci1.setInsulate(null);
		aci1.setDescribe("开户银行");
		abacusConfigItems.add(aci1);
		
		AbacusConfigItem aci2 = new AbacusConfigItem();
		aci2.setKeyGroup(JcConfigKey.KEY_GROUP);
		aci2.setKey(JcConfigKey.KEY_JC_PAYMENT_OFFLINE);
		aci2.setCode(JcConfigKey.KEY_JC_YHZH);
		aci2.setName("0101010020023090");
		aci2.setInsulate(null);
		aci2.setDescribe("银行账户");
		abacusConfigItems.add(aci2);
		
		abacusConfigNote.setAbacusConfig(abacusConfig);
		abacusConfigNote.setAbacusConfigItems(abacusConfigItems);
		return abacusConfigNote;
	}
	
	
	@Bean
	public AbacusConfigNote key_jc_wdt_dept() {
		AbacusConfigNote abacusConfigNote = new AbacusConfigNote();
		
		AbacusConfig abacusConfig = new AbacusConfig();
		abacusConfig.setKeyGroup(JcConfigKey.KEY_GROUP);
		abacusConfig.setKey(JcConfigKey.KEY_JC_WDT_DEPT);
		abacusConfig.setValueType(AbacusConfig._Value);
		abacusConfig.setValuees("0001");
		abacusConfig.setProcedures("旺店通固定店铺编码");
		abacusConfig.setInsulate(null);
		abacusConfig.setDescribe("旺店通固定店铺编码");
		
		abacusConfigNote.setAbacusConfig(abacusConfig);
		return abacusConfigNote;
	}
	
	@Bean
	public AbacusConfigNote key_jc_wdt_fcflage() {
		AbacusConfigNote abacusConfigNote = new AbacusConfigNote();
		
		AbacusConfig abacusConfig = new AbacusConfig();
		abacusConfig.setKeyGroup(JcConfigKey.KEY_GROUP);
		abacusConfig.setKey(JcConfigKey.KEY_JC_WDT_FCFLAGE);
		abacusConfig.setValueType(AbacusConfig._Value);
		abacusConfig.setValuees("true");
		abacusConfig.setProcedures("是否自动分仓");
		abacusConfig.setInsulate(null);
		abacusConfig.setDescribe("是否自动分仓");
		
		abacusConfigNote.setAbacusConfig(abacusConfig);
		return abacusConfigNote;
	}
	
	@Bean
	public AbacusConfigNote key_jc_erp_url() {
		AbacusConfigNote abacusConfigNote = new AbacusConfigNote();
		
		AbacusConfig abacusConfig = new AbacusConfig();
		abacusConfig.setKeyGroup(JcConfigKey.KEY_GROUP);
		abacusConfig.setKey(JcConfigKey.KEY_JC_ERP_URL);
		abacusConfig.setValueType(AbacusConfig._Value);
		abacusConfig.setValuees("http://");
		abacusConfig.setProcedures("erp的IP");
		abacusConfig.setInsulate(null);
		abacusConfig.setDescribe("erp的IP");
		
		abacusConfigNote.setAbacusConfig(abacusConfig);
		return abacusConfigNote;
	}
	
	@Bean
	public AbacusConfigNote key_jc_warehouse() {
		AbacusConfigNote abacusConfigNote = new AbacusConfigNote();
		
		AbacusConfig abacusConfig = new AbacusConfig();
		abacusConfig.setKeyGroup(JcConfigKey.KEY_GROUP);
		abacusConfig.setKey(JcConfigKey.KEY_JC_WAREHOUSE);
		abacusConfig.setValueType(AbacusConfig._Set);
		abacusConfig.setValuees(null);
		abacusConfig.setProcedures("API");
		abacusConfig.setInsulate(null);
		abacusConfig.setDescribe("稽查收货仓库");
		
//		List<AbacusConfigItem> abacusConfigItems = new ArrayList<AbacusConfigItem>();
//		
//		AbacusConfigItem aci = new AbacusConfigItem();
//		aci.setKeyGroup(JcConfigKey.KEY_GROUP);
//		aci.setKey(JcConfigKey.KEY_JC_WAREHOUSE);
//		aci.setCode("237881");
//		aci.setName("江苏致众盐城仓库");
//		aci.setInsulate(null);
//		aci.setDescribe("稽查收货仓库");
//		abacusConfigItems.add(aci);
//		
//		AbacusConfigItem aci1 = new AbacusConfigItem();
//		aci1.setKeyGroup(JcConfigKey.KEY_GROUP);
//		aci1.setKey(JcConfigKey.KEY_JC_WAREHOUSE);
//		aci1.setCode("288381");
//		aci1.setName("上海一区");
//		aci1.setInsulate(null);
//		aci1.setDescribe("稽查收货仓库");
//		abacusConfigItems.add(aci1);
		
		abacusConfigNote.setAbacusConfig(abacusConfig);
//		abacusConfigNote.setAbacusConfigItems(abacusConfigItems);
		return abacusConfigNote;
	}
}
