科目优化
This commit is contained in:
parent
ef2df3b5a7
commit
18eeae3a06
|
|
@ -109,7 +109,8 @@ public class JHSSOAuthHandler implements ThirdSSOAuthHandler {
|
|||
ssoURL.append("/esc-sso/oauth2.0/profile?access_token=");
|
||||
ssoURL.append(accessToken);
|
||||
linkPostjson = HttpClientUtils.get(ssoURL.toString());
|
||||
logger.info("认证中心用户信息:"+linkPostjson);
|
||||
logger.info("认证中心Userinfo post:"+ssoURL);
|
||||
logger.info("认证中心Userinfo result:"+linkPostjson);
|
||||
if (StringUtils.isNotEmpty(linkPostjson)) {
|
||||
jsonObject = JSONObject.parseObject(linkPostjson);
|
||||
return jsonObject.getString("id");
|
||||
|
|
|
|||
|
|
@ -10,9 +10,10 @@ import kd.bos.dataentity.entity.DynamicObjectCollection;
|
|||
import kd.bos.dataentity.utils.StringUtils;
|
||||
import kd.bos.db.DB;
|
||||
import kd.bos.db.DBRoute;
|
||||
import kd.bos.form.control.Button;
|
||||
import kd.bos.entity.datamodel.events.BeforeImportEntryEventArgs;
|
||||
import kd.bos.form.control.Control;
|
||||
import kd.bos.form.plugin.AbstractFormPlugin;
|
||||
import kd.bos.form.plugin.importentry.resolving.ImportEntryData;
|
||||
import kd.bos.id.ID;
|
||||
import kd.bos.logging.Log;
|
||||
import kd.bos.logging.LogFactory;
|
||||
|
|
@ -22,10 +23,7 @@ import kd.bos.servicehelper.operation.SaveServiceHelper;
|
|||
import shjh.jhzj7.fi.fi.utils.EsbUtils;
|
||||
import shjh.jhzj7.fi.fi.utils.JhzjUtils;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.EventObject;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 动态表单插件-【科目初始化】 shjh_init_account
|
||||
|
|
@ -43,6 +41,22 @@ public class InitAccountFormPlugin extends AbstractFormPlugin {
|
|||
private static final Map<String, DynamicObject> hsxmMaps = new HashMap<>();//核算维度对象集合
|
||||
private static final String insertSql = "insert into T_BD_Account_U (fdataid,fuseorgid) values (?,?);";
|
||||
|
||||
|
||||
@Override
|
||||
public void beforeImportEntry(BeforeImportEntryEventArgs e) {
|
||||
super.beforeImportEntry(e);
|
||||
//处理导入的excel数据 注意 excel中的列名必须与分录的列标识一致,否则无法识别到excel中的数据
|
||||
HashMap itemEntry = (HashMap) e.getSource();//excel表格全量数据
|
||||
ArrayList list = (ArrayList) itemEntry.get("shjh_details");//excel表格的某个页签
|
||||
Iterator iterator = list.iterator();//遍历页签
|
||||
ImportEntryData importData;
|
||||
JSONObject rowdata;
|
||||
while (iterator.hasNext()) {
|
||||
importData = (ImportEntryData) iterator.next();
|
||||
rowdata = importData.getData();//具体的某行数据,key值为列名
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 按钮监听注册
|
||||
*/
|
||||
|
|
@ -50,8 +64,8 @@ public class InitAccountFormPlugin extends AbstractFormPlugin {
|
|||
public void registerListener(EventObject e) {
|
||||
super.registerListener(e);
|
||||
//确认按钮
|
||||
Button selectedButton = this.getView().getControl(OK_BUTTON_KEY);
|
||||
selectedButton.addClickListener(this);
|
||||
// Button selectedButton = this.getView().getControl(OK_BUTTON_KEY);
|
||||
// selectedButton.addClickListener(this);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -133,7 +133,7 @@ public class FundPlanCollectionTask extends AbstractTask implements Plugin {
|
|||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
JSONArray IT_LIST = new JSONArray();
|
||||
String duedate_starts = sdf.format(lastMonthFirstDay);//上月1号
|
||||
String duedate_ends = sdf.format(new Date());//当前月
|
||||
String duedate_ends = sdf.format(new Date());//当前日期
|
||||
addFilterCondition(IT_LIST, "BUDAT", duedate_starts, duedate_ends);//过账日期-上月和当前月
|
||||
JSONObject sapresult = SapUtils.sapARClearedDataAPI(IT_LIST, "FundPlanCollectionTask");
|
||||
if(sapresult != null){
|
||||
|
|
@ -141,13 +141,13 @@ public class FundPlanCollectionTask extends AbstractTask implements Plugin {
|
|||
if(data != null){
|
||||
JSONArray items = data.getJSONArray("IT_ITEM");
|
||||
Map<String, BigDecimal> acctamountMap = new HashMap<>();
|
||||
BigDecimal amount;
|
||||
BigDecimal amount;//根据事业部编号+月份+资金计划科目编号汇总的金额
|
||||
String productnum;//品牌
|
||||
String sybnum;//事业部编号
|
||||
String months;//月份
|
||||
String accountnum;//资金计划科目编号
|
||||
String mapkey;//事业部编号+月份+资金计划科目编号
|
||||
DynamicObject ppsybinfo;
|
||||
DynamicObject ppsybinfo;//品牌和事业部关系对象
|
||||
for (int i = 0; i < items.size(); i++) {
|
||||
sapresult = items.getJSONObject(i);
|
||||
amount = sapresult.getBigDecimal("DMBTR");//已清金额
|
||||
|
|
|
|||
|
|
@ -20,8 +20,10 @@ import kd.tmc.fpm.business.dataproc.save.domain.FpmResponse;
|
|||
import kd.tmc.fpm.business.dataproc.save.domain.ReportDataBatchSaveParam;
|
||||
import shjh.jhzj7.fi.fi.utils.SapUtils;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Calendar;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
|
|
@ -124,7 +126,7 @@ public class FundPlanPaymentTask extends AbstractTask implements Plugin {
|
|||
JSONArray IT_LIST = new JSONArray();
|
||||
String duedate_starts = sdf.format(cal.getTime());//下月1号为开始日期
|
||||
//将日期加三月份得到一个季度后的1号
|
||||
cal.add(Calendar.MONTH, 1);
|
||||
cal.add(Calendar.MONTH, 3);
|
||||
String duedate_ends = sdf.format(cal.getTime());
|
||||
addFilterCondition(IT_LIST, "FAEDT", duedate_starts, duedate_ends);//到期日
|
||||
JSONObject sapresult = SapUtils.vouchers_payable(IT_LIST, "FundPlanPaymentTask");
|
||||
|
|
@ -132,6 +134,13 @@ public class FundPlanPaymentTask extends AbstractTask implements Plugin {
|
|||
JSONObject data = sapresult.getJSONObject("data");
|
||||
if(data != null){
|
||||
JSONArray items = data.getJSONArray("IT_ITEM");
|
||||
Map<String, BigDecimal> acctamountMap = new HashMap<>();
|
||||
BigDecimal amount;//根据事业部编号+月份+资金计划科目编号汇总的金额
|
||||
String productnum;//品牌
|
||||
String sybnum;//事业部编号
|
||||
String months;//月份
|
||||
String accountnum;//资金计划科目编号
|
||||
String mapkey;//事业部编号+月份+资金计划科目编号
|
||||
for (int i = 0; i < items.size(); i++) {
|
||||
sapresult = items.getJSONObject(i);
|
||||
sapresult.getString("BUKRS");//公司编号
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ public class EsbUtils {
|
|||
public static final Long CUSTOMERSTAND = 712984405228187648L;//客户分类标准
|
||||
public static final Long CUSTOMERSTATUS = 1122390034075371520L;//客户状态 默认合格
|
||||
|
||||
public static final Long ACCTABLE = 2125524820924832768L;//科目表
|
||||
public static final Long ACCTABLE = 2184297498435138560L;//科目表 财务库 T_BD_Accounttable
|
||||
private static final String orgName = "bos_org";//系统库 表名 t_org_org
|
||||
public static final String deptOrgName = "上海家化联合股份有限公司";//指定部门名称-原始
|
||||
public static final String newDeptOrgName = "上海家化(联合股份)";//指定部门名称-新-防止与业务单元中的名称重复
|
||||
|
|
|
|||
Loading…
Reference in New Issue