|
@@ -2,6 +2,7 @@ package com.uas.erp.schedular.finance.task;
|
|
|
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
+import com.uas.erp.schedular.task.support.Method;
|
|
|
import com.uas.erp.schedular.task.support.Role;
|
|
|
import com.uas.erp.schedular.task.support.TaskMapping;
|
|
|
import com.usoft.fin.external.open.api.entity.*;
|
|
@@ -25,6 +26,7 @@ public class CustInfomationTask extends AbstractTask{
|
|
|
* @param enUUList
|
|
|
* @throws Exception
|
|
|
*/
|
|
|
+ @TaskMapping(title = "客户信息下载", fixedDelay = 30000, method = Method.DOWNLOAD)
|
|
|
public void getCustInfomation(List<Map<String, Object>> enUUList) throws Exception {
|
|
|
List<String> sqls = new ArrayList<>();
|
|
|
for(Map<String, Object> enMap : enUUList){
|
|
@@ -661,8 +663,8 @@ public class CustInfomationTask extends AbstractTask{
|
|
|
CompanyLawInfoFinRest compLawInfoRest = entCrawLFRest.getCompanyLawInfo();
|
|
|
String cu_term = ((compBaseInfoByErmRest.getEnOpDate()==null || compBaseInfoByErmRest.getEnOpDate().equals(""))? "null" : (compBaseInfoByErmRest.getEnOpDate().contains("无固定期限")?"9999":compBaseInfoByErmRest.getEnOpDate()));
|
|
|
String cu_licensedate = (compBaseInfoByErmRest.getEnRegDate()==null||compBaseInfoByErmRest.getEnRegDate().equals("")?"null":"to_date('"+compBaseInfoByErmRest.getEnRegDate()+"','YYYY-MM-DD')");
|
|
|
- String cu_regcapital = (compBaseInfoByErmRest.getEnRegCapital() ==null || compBaseInfoByErmRest.getEnRegCapital().equals("") ? "null":compBaseInfoByErmRest.getEnRegCapital().replace("万元人民币",""));
|
|
|
- String cu_paidincapital =(compIndusAndCommInforRest.getContributedCapital() ==null ||compIndusAndCommInforRest.getContributedCapital().equals("") ? "null" : compIndusAndCommInforRest.getContributedCapital().replace("万元人民币",""));
|
|
|
+ String cu_regcapital = (compBaseInfoByErmRest.getEnRegCapital() ==null || compBaseInfoByErmRest.getEnRegCapital().equals("") ? "null":compBaseInfoByErmRest.getEnRegCapital());
|
|
|
+ String cu_paidincapital =(compIndusAndCommInforRest.getContributedCapital() ==null ||compIndusAndCommInforRest.getContributedCapital().equals("") ? "null" : compIndusAndCommInforRest.getContributedCapital());
|
|
|
String cu_employeesnum = (compIndusAndCommInforRest.getInsuredNumberOfPeople() == null || compIndusAndCommInforRest.getInsuredNumberOfPeople().equals("") ? "null":compIndusAndCommInforRest.getInsuredNumberOfPeople());
|
|
|
if(type.equals("INSERT")){
|
|
|
sqls.add("INSERT INTO CUSTOMERINFOR(CU_ID,CU_CODE,CU_ENUU,CU_STATUS,CU_STATUSCODE,CU_UPDATEDATE,CU_NAME,CU_LEGALPERSON," +
|
|
@@ -673,7 +675,8 @@ public class CustInfomationTask extends AbstractTask{
|
|
|
") VALUES ("+cuId+",'"+cuCode+"',"+compBaseInfoByErmRest.getEnuu()+",'在录入','ENTERING',SYSDATE,'"+compBaseInfoByErmRest.getEnName()+"','"+compBaseInfoByErmRest.getEnLegalRepName()+"','"
|
|
|
+cu_term+"',"+"'"+compBaseInfoByErmRest.getEnType()+"','"+restBaseInfo.getGrade()+"'," +cu_licensedate+",'"+compBaseInfoByErmRest.getEnCodeCrawled()+"',"+
|
|
|
"'"+entCrawLFRest.getConTheTaxCredit()+"','"+compBaseInfoByErmRest.getEnRegStatus()+"','"+compBaseInfoByErmRest.getEnOpRange()+"','"+restBaseInfo.getEnBusinessMain()+"',"+
|
|
|
- "'"+restBaseInfo.getFsContactsMan()+"','"+restBaseInfo.getFsContactsPhone()+"',"+cu_regcapital+","+cu_paidincapital+",'"
|
|
|
+ "'"+restBaseInfo.getFsContactsMan()+"','"+restBaseInfo.getFsContactsPhone()+"','"+cu_regcapital+
|
|
|
+ "','"+cu_paidincapital+"','"
|
|
|
+compBaseInfoByErmRest.getEnRegLocation()+"','"+restBaseInfo.getEnAddress()+"','"+compLawInfoRest.getEnIntro()+"',"+cu_employeesnum+",'10050877')");
|
|
|
sqls.add("UPDATE CUSTOMERQUOTA SET cq_custcode ='"+cuCode+"' where cq_custcode is null and CQ_CUSTUU = "+custUU);
|
|
|
}else {
|
|
@@ -684,7 +687,7 @@ public class CustInfomationTask extends AbstractTask{
|
|
|
" CU_TERM = '"+cu_term+"',CU_ENTERPTYPE ='"+compBaseInfoByErmRest.getEnType()+"',CU_PLAFORMLEVEL='"+restBaseInfo.getGrade()+"'," +
|
|
|
" CU_LICENSEDATE = "+cu_licensedate+",CU_PAPERSCODE='"+compBaseInfoByErmRest.getEnCodeCrawled()+"'," +
|
|
|
" CU_TAXCREDIT ='"+entCrawLFRest.getConTheTaxCredit()+"',CU_REGISTSTATUS='"+compBaseInfoByErmRest.getEnRegStatus()+"',CU_BUSINSSCOPE='"+compBaseInfoByErmRest.getEnOpRange()+"',CU_BUSINESSMAIN='"+restBaseInfo.getEnBusinessMain()+"'," +
|
|
|
- " CU_CONTACT='"+restBaseInfo.getFsContactsMan()+"',CU_CONTACTNUM='"+restBaseInfo.getFsContactsPhone()+"',CU_REGCAPITAL="+cu_regcapital+",CU_PAIDINCAPITAL="+cu_paidincapital+"," +
|
|
|
+ " CU_CONTACT='"+restBaseInfo.getFsContactsMan()+"',CU_CONTACTNUM='"+restBaseInfo.getFsContactsPhone()+"',CU_REGCAPITAL='"+cu_regcapital+"',CU_PAIDINCAPITAL='"+cu_paidincapital+"'," +
|
|
|
" CU_REGADD='"+compBaseInfoByErmRest.getEnRegLocation()+"',CU_OFFICEADD='"+restBaseInfo.getEnAddress()+"',CU_INTRODUCTION='"+compLawInfoRest.getEnIntro()+"',CU_ZJUU='"+10050877+"'," +
|
|
|
" CU_EMPLOYEESNUM=" +cu_employeesnum+
|
|
|
" WHERE CU_ENUU = "+custUU+" AND CU_STATUSCODE <> 'DISABLE'");
|