|
@@ -1,15 +1,21 @@
|
|
|
package com.kingdee.eas.custom.shuiyou.inter.handler;
|
|
|
|
|
|
+import cn.hutool.json.JSONUtil;
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
+import com.google.common.collect.Lists;
|
|
|
+import com.google.common.collect.Maps;
|
|
|
import com.kingdee.bos.BOSException;
|
|
|
import com.kingdee.bos.Context;
|
|
|
import com.kingdee.bos.dao.ormapping.ObjectUuidPK;
|
|
|
+import com.kingdee.bos.metadata.entity.SelectorItemCollection;
|
|
|
+import com.kingdee.bos.metadata.entity.SelectorItemInfo;
|
|
|
import com.kingdee.bos.util.BOSUuid;
|
|
|
import com.kingdee.eas.basedata.hraux.BirthplaceFactory;
|
|
|
import com.kingdee.eas.basedata.hraux.NationalityFactory;
|
|
|
import com.kingdee.eas.basedata.person.PersonFactory;
|
|
|
import com.kingdee.eas.common.EASBizException;
|
|
|
+import com.kingdee.eas.custom.shuiyou.registration.IRegistrationInfo;
|
|
|
import com.kingdee.eas.custom.shuiyou.registration.RegistrationInfoCollection;
|
|
|
import com.kingdee.eas.custom.shuiyou.registration.RegistrationInfoFactory;
|
|
|
import com.kingdee.eas.custom.shuiyou.registration.RegistrationInfoInfo;
|
|
@@ -20,12 +26,14 @@ import com.kingdee.shr.base.syssetting.context.SHRContext;
|
|
|
import com.kingdee.shr.base.syssetting.exception.SHRWebException;
|
|
|
import com.kingdee.shr.base.syssetting.web.json.JSONUtils;
|
|
|
import com.kingdee.shr.compensation.app.incomeTax.*;
|
|
|
+import com.kingdee.shr.compensation.app.tax.ITaxUnit;
|
|
|
import com.kingdee.shr.compensation.app.tax.TaxUnitCollection;
|
|
|
import com.kingdee.shr.compensation.app.tax.TaxUnitFactory;
|
|
|
import com.kingdee.shr.compensation.app.tax.TaxUnitInfo;
|
|
|
import com.kingdee.shr.compensation.util.Base64Utils;
|
|
|
import com.kingdee.shr.compensation.web.handler.tax.taxUnit.TaxUnitListHandler;
|
|
|
import okhttp3.*;
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
|
import org.apache.log4j.Logger;
|
|
|
import org.springframework.ui.ModelMap;
|
|
|
|
|
@@ -39,7 +47,7 @@ import java.text.SimpleDateFormat;
|
|
|
import java.util.*;
|
|
|
|
|
|
public class TaxUnitListHandlerEx extends TaxUnitListHandler {
|
|
|
- private Properties propt = new Properties();
|
|
|
+
|
|
|
private static Logger logger = Logger.getLogger("com.kingdee.eas.custom.shuiyou.TaxUnitListHandlerEx");
|
|
|
|
|
|
/**
|
|
@@ -54,187 +62,207 @@ public class TaxUnitListHandlerEx extends TaxUnitListHandler {
|
|
|
String entrance = "com.kingdee.eas.custom.jiuzhoutong.shuiyou.TaxUnitListHandlerEx.businessAegistrationAction";
|
|
|
Map<String, Object> returnMap = new HashMap<String, Object>();
|
|
|
logger.error("=========进入:" + entrance + "==========");
|
|
|
- String id = request.getParameter("id");
|
|
|
+ String ids = request.getParameter("id");
|
|
|
Context context = SHRContext.getInstance().getContext();
|
|
|
- Map<String, String> commonParameter = null;
|
|
|
+
|
|
|
String postBody = "";
|
|
|
String post = "";
|
|
|
+ List<Map<String,Object>> unList = Lists.newArrayList();
|
|
|
try {
|
|
|
+ ISYUtilsFacade utilsFacade = SYUtilsFacadeFactory.getLocalInstance(context);
|
|
|
+ Map propt=utilsFacade.getConfig();
|
|
|
logger.error("=====获取基本信息=====");
|
|
|
- this.propt.load(new FileInputStream(System.getProperty("EAS_HOME") + "/server/properties/sy/syConfig.properties"));
|
|
|
- logger.error("=======获取报税企业信息=====");
|
|
|
- TaxUnitInfo taxUnitInfo = TaxUnitFactory.getLocalInstance(context).getTaxUnitInfo(new ObjectUuidPK(id));
|
|
|
- String name = taxUnitInfo.getName();//企业名称
|
|
|
- String taxNumber = taxUnitInfo.getTaxNumber();//税号
|
|
|
- String areaCode = taxUnitInfo.getAreaCode();//行政区代码
|
|
|
- logger.error("企业名称:" + name);
|
|
|
- logger.error("税号:" + taxNumber);
|
|
|
- logger.error("行政区代码:" + areaCode);
|
|
|
- logger.error("==========================");
|
|
|
-
|
|
|
-
|
|
|
- logger.error("==========发送请求 post================");
|
|
|
- OkHttpClient client = new OkHttpClient();
|
|
|
- String ip = propt.getProperty("ip");
|
|
|
- String url = ip + "/gateway/iit/declare/getCompanyRegisterInfo";
|
|
|
- logger.error("地址:" + url);
|
|
|
- postBody = "{\"qymc\":\"" + name + "\",\"nsrsbh\":\"" + taxNumber + "\",\"areaid\":\"" + areaCode + "\"}";
|
|
|
- logger.error("参数:" + postBody);
|
|
|
- logger.error("公共参数:" + JSONObject.toJSONString(commonParameter));
|
|
|
-
|
|
|
- post = SYUtilsFacadeFactory.getLocalInstance(context).post(url, postBody);
|
|
|
- //gateway/iit/declare/getCompanyRegisterInfo
|
|
|
-// RequestBody body = RequestBody.create(MediaType.parse("application/json"), postBody);
|
|
|
-// Request sYRequest = new Request.Builder()
|
|
|
-// .url(url)
|
|
|
-// .post(body).headers(Headers.of(commonParameter))
|
|
|
-// .build();
|
|
|
-// sYResponse = client.newCall(sYRequest).execute();
|
|
|
-
|
|
|
- logger.error("返回参数:" + post);
|
|
|
- //返回值需要改 不是JSONArray 类型 需要更具 正常返回值来判断
|
|
|
- //JSONArray jsonArray = JSONArray.parseArray(post);
|
|
|
- JSONObject returnDate = JSONObject.parseObject(post);
|
|
|
- JSONObject head = returnDate.getJSONObject("head");
|
|
|
- String description = head.getString("description");
|
|
|
- RegistrationInfoInfo registrationInfo;
|
|
|
- if (!"成功".equals(description)) {
|
|
|
- returnMap.put("code", 500);
|
|
|
- returnMap.put("error", "接口调用失败,请看日志");
|
|
|
- JSONUtils.SUCCESS(returnMap);
|
|
|
- return;
|
|
|
- }
|
|
|
-
|
|
|
- JSONArray body = returnDate.getJSONArray("body");
|
|
|
-// if (body.size() > 0) {
|
|
|
-// logger.error("写入数据:"+body.toJSONString());
|
|
|
-// logger.error("删除原有的数据以便以写入行的数据");
|
|
|
-// String sql = "delete from CT_REG_RegistrationInfo";
|
|
|
-// DBUtil.execute(context, sql);
|
|
|
-// }
|
|
|
- logger.error("写入数据:");
|
|
|
- for (int i = 0; i < body.size(); i++) {
|
|
|
- JSONObject jsonObject = body.getJSONObject(i);
|
|
|
- String djxhid = jsonObject.getString("djxhid");// 登记序号
|
|
|
- RegistrationInfoCollection registrationInfoCollection = RegistrationInfoFactory.getLocalInstance(context).getRegistrationInfoCollection("where djxhid = '" + djxhid + "'");
|
|
|
- if (registrationInfoCollection.size() == 0) {
|
|
|
- registrationInfo = new RegistrationInfoInfo();
|
|
|
- } else {
|
|
|
- registrationInfo = registrationInfoCollection.get(0);
|
|
|
- }
|
|
|
-
|
|
|
- registrationInfo.setDjxhid(djxhid);
|
|
|
- String qymc = jsonObject.getString("qymc");// 企业名称
|
|
|
-
|
|
|
- registrationInfo.setQymc(qymc);
|
|
|
- String frxm = jsonObject.getString("frxm");// 法人姓名
|
|
|
- registrationInfo.setFrxm(frxm);
|
|
|
-
|
|
|
- String lxdh = jsonObject.getString("lxdh");// 联系电话
|
|
|
- registrationInfo.setLxdh(lxdh);
|
|
|
-
|
|
|
- String scjydz = jsonObject.getString("scjydz");// 生产经营地址
|
|
|
- registrationInfo.setScjydz(scjydz);
|
|
|
-
|
|
|
- String hymc = jsonObject.getString("hymc");// 行业名称
|
|
|
- registrationInfo.setHymc(hymc);
|
|
|
-
|
|
|
- String zgswjgmc = jsonObject.getString("zgswjgmc");// 主管税务机关名称
|
|
|
- registrationInfo.setZgswjgmc(zgswjgmc);
|
|
|
-
|
|
|
- String zgswjg = jsonObject.getString("zgswjg");// 主管税务机关代码
|
|
|
- registrationInfo.setZgswjg(zgswjg);
|
|
|
-
|
|
|
- String zgswjgskdm = jsonObject.getString("zgswjgskdm");// 主管税务分局所科代码
|
|
|
- registrationInfo.setZgswjgskdm(zgswjgskdm);
|
|
|
-
|
|
|
- String zgswjgskmc = jsonObject.getString("zgswjgskmc");// 主管税务分局所科名称
|
|
|
- registrationInfo.setZgswjgskmc(zgswjgskmc);
|
|
|
-
|
|
|
- String fbmba = jsonObject.getString("fbmba");// 是否分部门备案
|
|
|
- registrationInfo.setFbmba(fbmba);
|
|
|
-
|
|
|
- String smzh = jsonObject.getString("smzh");// 实名账号
|
|
|
- registrationInfo.setSmzh(smzh);
|
|
|
-
|
|
|
- String shxydm = jsonObject.getString("shxydm");// 社会信用代码
|
|
|
- registrationInfo.setShxydm(shxydm);
|
|
|
-
|
|
|
- String nsrsbm = jsonObject.getString("nsrsbm");// 纳税人识别码
|
|
|
- registrationInfo.setNsrsbm(nsrsbm);
|
|
|
-
|
|
|
- String yzbm = jsonObject.getString("yzbm");// 邮政编码
|
|
|
- registrationInfo.setYzbm(yzbm);
|
|
|
-
|
|
|
- String cwxm = jsonObject.getString("cwxm");// 财务负责人
|
|
|
- registrationInfo.setCwxm(cwxm);
|
|
|
-
|
|
|
- String hydm = jsonObject.getString("hydm");// 行业代码
|
|
|
- registrationInfo.setHydm(hydm);
|
|
|
-
|
|
|
- String jjlxdm = jsonObject.getString("jjlxdm");// 经济类型名称代码
|
|
|
- registrationInfo.setJjlxdm(jjlxdm);
|
|
|
-
|
|
|
- String jjlxmc = jsonObject.getString("jjlxmc");// 经济类型名称
|
|
|
- registrationInfo.setJjlxmc(jjlxmc);
|
|
|
-
|
|
|
- String ssglydm = jsonObject.getString("ssglydm");// 税收管理员代码
|
|
|
- registrationInfo.setSsglydm(ssglydm);
|
|
|
-
|
|
|
- String bsrxm = jsonObject.getString("bsrxm");// 报税人姓名
|
|
|
- registrationInfo.setBsrxm(bsrxm);
|
|
|
-
|
|
|
- String jdxzdm = jsonObject.getString("jdxzdm");// 街道乡镇代码
|
|
|
- registrationInfo.setJdxzdm(jdxzdm);
|
|
|
-
|
|
|
- String kjywrdm = jsonObject.getString("kjywrdm");// 扣缴义务人代码
|
|
|
- registrationInfo.setKjywrdm(kjywrdm);
|
|
|
-
|
|
|
- String djrq = jsonObject.getString("djrq");// 登记日期
|
|
|
- registrationInfo.setDjrq(djrq);
|
|
|
-
|
|
|
- String swjgdm = jsonObject.getString("swjgdm");// 税务机关代码
|
|
|
- registrationInfo.setSwjgdm(swjgdm);
|
|
|
-
|
|
|
- String swjgmc = jsonObject.getString("swjgmc");// 税务机关名称
|
|
|
- registrationInfo.setSwjgmc(swjgmc);
|
|
|
-
|
|
|
- String sfscjyqy = jsonObject.getString("sfscjyqy");// 是否是生产经营企业
|
|
|
- registrationInfo.setSfscjyqy(sfscjyqy);
|
|
|
+ IRegistrationInfo ir = RegistrationInfoFactory.getLocalInstance(context);
|
|
|
+ ITaxUnitRegisterDetail itr = TaxUnitRegisterDetailFactory.getLocalInstance(context);
|
|
|
+ if(StringUtils.isNotBlank(ids)) {
|
|
|
+ String[] idsArr = ids.split(",");
|
|
|
+ for (String id : idsArr) {
|
|
|
+ logger.error("=======获取报税企业信息=====");
|
|
|
+ ITaxUnit taxUnit = TaxUnitFactory.getLocalInstance(context);
|
|
|
+ TaxUnitInfo taxUnitInfo = taxUnit.getTaxUnitInfo(new ObjectUuidPK(id));
|
|
|
+ String name = taxUnitInfo.getName();//企业名称
|
|
|
+ String taxNumber = taxUnitInfo.getTaxNumber();//税号
|
|
|
+ String areaCode = taxUnitInfo.getAreaCode();//行政区代码
|
|
|
+ String regNumber = taxUnitInfo.getRegNumber();//登记序列号
|
|
|
+ logger.error("企业名称:" + name);
|
|
|
+ logger.error("税号:" + taxNumber);
|
|
|
+ logger.error("行政区代码:" + areaCode);
|
|
|
+ logger.error("==========================");
|
|
|
+ logger.error("==========发送请求 post================");
|
|
|
+ String ip = (String) propt.get("ip");
|
|
|
+ String url = ip + "/gateway/iit/declare/getCompanyRegisterInfo";
|
|
|
+ logger.error("地址:" + url);
|
|
|
+ Map<String, Object> param = Maps.newHashMap();
|
|
|
+ param.put("qymc", name);
|
|
|
+ param.put("nsrsbh", taxNumber);
|
|
|
+ param.put("areaid", areaCode);
|
|
|
+ param.put("djxhid", regNumber);
|
|
|
+ postBody = JSONUtil.toJsonStr(param);
|
|
|
+ logger.error("参数:" + postBody);
|
|
|
+ post = SYUtilsFacadeFactory.getLocalInstance(context).post(url, postBody);
|
|
|
+ logger.error("返回参数:" + post);
|
|
|
+ JSONObject returnDate = JSONObject.parseObject(post);
|
|
|
+ JSONObject head = returnDate.getJSONObject("head");
|
|
|
+ String code = head.getString("code");
|
|
|
+ RegistrationInfoInfo registrationInfo;
|
|
|
+ TaxUnitRegisterDetailInfo registrationInfo_old;
|
|
|
+ if (!"00000000".equals(code)) {
|
|
|
+ Map<String,Object> errMap = Maps.newHashMap();
|
|
|
+ errMap.put("msg",name+",注册失败!");
|
|
|
+ errMap.put("result",post);
|
|
|
+ unList.add(errMap);
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ JSONArray body = returnDate.getJSONArray("body");
|
|
|
+ logger.error("写入数据:");
|
|
|
|
|
|
- String nsrztdm = jsonObject.getString("nsrztdm");// 纳税人状态代码
|
|
|
- registrationInfo.setNsrztdm(nsrztdm);
|
|
|
+ for (int i = 0; i < body.size(); i++) {
|
|
|
+ JSONObject jsonObject = body.getJSONObject(i);
|
|
|
+ String djxhid = jsonObject.getString("djxhid");// 登记序号
|
|
|
+ String nsrsbm = jsonObject.getString("nsrsbm");// 纳税人识别码
|
|
|
|
|
|
- String nsrztmc = jsonObject.getString("nsrztmc");// 纳税人状态名称
|
|
|
- registrationInfo.setNsrztmc(nsrztmc);
|
|
|
- if (registrationInfoCollection.size() == 0) {
|
|
|
- RegistrationInfoFactory.getLocalInstance(context).save(registrationInfo);
|
|
|
- } else {
|
|
|
- RegistrationInfoFactory.getLocalInstance(context).update(new ObjectUuidPK(registrationInfo.getId()), registrationInfo);
|
|
|
+ RegistrationInfoCollection registrationInfoCollection = ir.getRegistrationInfoCollection("where djxhid = '" + djxhid + "'");
|
|
|
+ TaxUnitRegisterDetailCollection registrationInfo_oldCollection = itr.getTaxUnitRegisterDetailCollection("where registerNo = '" + djxhid + "'");
|
|
|
+ if (registrationInfoCollection.size() <= 0) {
|
|
|
+ registrationInfo = new RegistrationInfoInfo();
|
|
|
+ } else {
|
|
|
+ registrationInfo = registrationInfoCollection.get(0);
|
|
|
+ }
|
|
|
+ if (registrationInfo_oldCollection.size() <= 0) {
|
|
|
+ registrationInfo_old = new TaxUnitRegisterDetailInfo();
|
|
|
+ } else {
|
|
|
+ registrationInfo_old = registrationInfo_oldCollection.get(0);
|
|
|
+ }
|
|
|
+ registrationInfo_old.setTaxUnit(taxUnitInfo);
|
|
|
+ registrationInfo_old.setRegisterDate(new Date());
|
|
|
+ registrationInfo_old.setRegisterNo(djxhid);
|
|
|
+ registrationInfo_old.setTaxNumber(nsrsbm);
|
|
|
+ registrationInfo.setDjxhid(djxhid);
|
|
|
+ registrationInfo_old.setNumber(nsrsbm);
|
|
|
+ String qymc = jsonObject.getString("qymc");// 企业名称
|
|
|
+ registrationInfo_old.setRegisterName(qymc);
|
|
|
+ registrationInfo_old.setName(qymc);
|
|
|
+ registrationInfo.setQymc(qymc);
|
|
|
+ String frxm = jsonObject.getString("frxm");// 法人姓名
|
|
|
+ registrationInfo.setFrxm(frxm);
|
|
|
+
|
|
|
+ String lxdh = jsonObject.getString("lxdh");// 联系电话
|
|
|
+ registrationInfo_old.setTelephone(lxdh);
|
|
|
+ registrationInfo.setLxdh(lxdh);
|
|
|
+
|
|
|
+ String scjydz = jsonObject.getString("scjydz");// 生产经营地址
|
|
|
+ registrationInfo.setScjydz(scjydz);
|
|
|
+
|
|
|
+ String hymc = jsonObject.getString("hymc");// 行业名称
|
|
|
+ registrationInfo.setHymc(hymc);
|
|
|
+
|
|
|
+ String zgswjgmc = jsonObject.getString("zgswjgmc");// 主管税务机关名称
|
|
|
+ registrationInfo_old.setTaxAuthName(zgswjgmc);
|
|
|
+ registrationInfo.setZgswjgmc(zgswjgmc);
|
|
|
+
|
|
|
+ String zgswjg = jsonObject.getString("zgswjg");// 主管税务机关代码
|
|
|
+ registrationInfo.setZgswjg(zgswjg);
|
|
|
+
|
|
|
+ String zgswjgskdm = jsonObject.getString("zgswjgskdm");// 主管税务分局所科代码
|
|
|
+ registrationInfo.setZgswjgskdm(zgswjgskdm);
|
|
|
+
|
|
|
+ String zgswjgskmc = jsonObject.getString("zgswjgskmc");// 主管税务分局所科名称
|
|
|
+ registrationInfo.setZgswjgskmc(zgswjgskmc);
|
|
|
+
|
|
|
+ String fbmba = jsonObject.getString("fbmba");// 是否分部门备案
|
|
|
+ registrationInfo.setFbmba(fbmba);
|
|
|
+
|
|
|
+ String smzh = jsonObject.getString("smzh");// 实名账号
|
|
|
+ registrationInfo.setSmzh(smzh);
|
|
|
+
|
|
|
+ String shxydm = jsonObject.getString("shxydm");// 社会信用代码
|
|
|
+ registrationInfo.setShxydm(shxydm);
|
|
|
+
|
|
|
+
|
|
|
+ registrationInfo.setNsrsbm(nsrsbm);
|
|
|
+
|
|
|
+ String yzbm = jsonObject.getString("yzbm");// 邮政编码
|
|
|
+ registrationInfo.setYzbm(yzbm);
|
|
|
+
|
|
|
+ String cwxm = jsonObject.getString("cwxm");// 财务负责人
|
|
|
+ registrationInfo.setCwxm(cwxm);
|
|
|
+
|
|
|
+ String hydm = jsonObject.getString("hydm");// 行业代码
|
|
|
+ registrationInfo.setHydm(hydm);
|
|
|
+
|
|
|
+ String jjlxdm = jsonObject.getString("jjlxdm");// 经济类型名称代码
|
|
|
+ registrationInfo.setJjlxdm(jjlxdm);
|
|
|
+
|
|
|
+ String jjlxmc = jsonObject.getString("jjlxmc");// 经济类型名称
|
|
|
+ registrationInfo.setJjlxmc(jjlxmc);
|
|
|
+
|
|
|
+ String ssglydm = jsonObject.getString("ssglydm");// 税收管理员代码
|
|
|
+ registrationInfo.setSsglydm(ssglydm);
|
|
|
+
|
|
|
+ String bsrxm = jsonObject.getString("bsrxm");// 报税人姓名
|
|
|
+ registrationInfo.setBsrxm(bsrxm);
|
|
|
+
|
|
|
+ String jdxzdm = jsonObject.getString("jdxzdm");// 街道乡镇代码
|
|
|
+ registrationInfo.setJdxzdm(jdxzdm);
|
|
|
+
|
|
|
+ String kjywrdm = jsonObject.getString("kjywrdm");// 扣缴义务人代码
|
|
|
+ registrationInfo.setKjywrdm(kjywrdm);
|
|
|
+
|
|
|
+ String djrq = jsonObject.getString("djrq");// 登记日期
|
|
|
+ registrationInfo.setDjrq(djrq);
|
|
|
+
|
|
|
+ String swjgdm = jsonObject.getString("swjgdm");// 税务机关代码
|
|
|
+ registrationInfo.setSwjgdm(swjgdm);
|
|
|
+
|
|
|
+ String swjgmc = jsonObject.getString("swjgmc");// 税务机关名称
|
|
|
+ registrationInfo.setSwjgmc(swjgmc);
|
|
|
+
|
|
|
+ String sfscjyqy = jsonObject.getString("sfscjyqy");// 是否是生产经营企业
|
|
|
+ registrationInfo.setSfscjyqy(sfscjyqy);
|
|
|
+
|
|
|
+ String nsrztdm = jsonObject.getString("nsrztdm");// 纳税人状态代码
|
|
|
+ registrationInfo.setNsrztdm(nsrztdm);
|
|
|
+
|
|
|
+ String nsrztmc = jsonObject.getString("nsrztmc");// 纳税人状态名称
|
|
|
+ registrationInfo.setNsrztmc(nsrztmc);
|
|
|
+ if (registrationInfoCollection.size() == 0) {
|
|
|
+ ir.addnew(registrationInfo);
|
|
|
+ } else {
|
|
|
+ ir.save(registrationInfo);
|
|
|
+ }
|
|
|
+ if (registrationInfo_oldCollection.size() == 0) {
|
|
|
+ itr.addnew(registrationInfo_old);
|
|
|
+ } else {
|
|
|
+ itr.save(registrationInfo_old);
|
|
|
+ }
|
|
|
+ if (taxNumber.equals(nsrsbm)) {
|
|
|
+ taxUnitInfo.setRegNumber(djxhid);
|
|
|
+ taxUnitInfo.put("registration",registrationInfo);
|
|
|
+ taxUnitInfo.setTaxRegisterInfo(registrationInfo_old);
|
|
|
+ taxUnit.save(taxUnitInfo);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
logger.error("记录成功接口日志");
|
|
|
returnMap.put("code", 200);
|
|
|
- returnMap.put("error", "");
|
|
|
+ returnMap.put("unList", unList);
|
|
|
returnMap.put("info", "注册成功");
|
|
|
+ JSONUtils.SUCCESS(returnMap);
|
|
|
} catch (BOSException e) {
|
|
|
+ e.printStackTrace();
|
|
|
logger.error("记录BOSException报错接口日志");
|
|
|
returnMap.put("code", 500);
|
|
|
- returnMap.put("error", e);
|
|
|
+ returnMap.put("error", e.getMessage());
|
|
|
+ JSONUtils.ERROR(e.getMessage(),e);
|
|
|
} catch (EASBizException e) {
|
|
|
+ e.printStackTrace();
|
|
|
logger.error("记录 EASBizException 报错接口日志");
|
|
|
returnMap.put("code", 500);
|
|
|
- returnMap.put("error", e);
|
|
|
- } catch (FileNotFoundException e) {
|
|
|
- logger.error("记录 FileNotFoundException 报错接口日志");
|
|
|
- returnMap.put("code", 500);
|
|
|
- returnMap.put("error", e);
|
|
|
- } catch (IOException e) {
|
|
|
- logger.error("记录 IOException 报错接口日志");
|
|
|
- returnMap.put("code", 500);
|
|
|
- returnMap.put("error", e);
|
|
|
+ returnMap.put("error", e.getMessage());
|
|
|
+ JSONUtils.ERROR(e.getMessage(),e);
|
|
|
}
|
|
|
- JSONUtils.SUCCESS(returnMap);
|
|
|
+
|
|
|
logger.error("======================退出==================================");
|
|
|
}
|
|
|
|
|
@@ -257,7 +285,8 @@ public class TaxUnitListHandlerEx extends TaxUnitListHandler {
|
|
|
taxPeriodDate=taxPeriodFormat.format(new Date());
|
|
|
}
|
|
|
try {
|
|
|
- this.propt.load(new FileInputStream(System.getProperty("EAS_HOME") + "/server/properties/sy/syConfig.properties"));
|
|
|
+ ISYUtilsFacade utilsFacade = SYUtilsFacadeFactory.getLocalInstance(context);
|
|
|
+ Map propt=utilsFacade.getConfig();
|
|
|
TaxUnitCollection taxUnitCollection = TaxUnitFactory.getLocalInstance(context).getTaxUnitCollection();
|
|
|
for (int i = 0; i < taxUnitCollection.size(); i++) {
|
|
|
TaxUnitInfo taxUnitInfo = taxUnitCollection.get(i);
|
|
@@ -478,7 +507,7 @@ public class TaxUnitListHandlerEx extends TaxUnitListHandler {
|
|
|
|
|
|
}
|
|
|
postBody.put("rylb", rylb);
|
|
|
- String ip = propt.getProperty("ip");
|
|
|
+ String ip = (String) propt.get("ip");
|
|
|
String url = ip + "/gateway/iit/declare/declareEmployeeInfo";
|
|
|
logger.error("===请求参数=="+postBody+"========");
|
|
|
ISYUtilsFacade localInstance = SYUtilsFacadeFactory.getLocalInstance(context);
|
|
@@ -507,12 +536,6 @@ public class TaxUnitListHandlerEx extends TaxUnitListHandler {
|
|
|
} catch (BOSException e) {
|
|
|
JSONUtils.ERROR("BOSException",e);
|
|
|
throw new RuntimeException(e);
|
|
|
- } catch (FileNotFoundException e) {
|
|
|
- JSONUtils.ERROR("FileNotFoundException",e);
|
|
|
- throw new RuntimeException(e);
|
|
|
- } catch (IOException e) {
|
|
|
- JSONUtils.ERROR("IOException",e);
|
|
|
- throw new RuntimeException(e);
|
|
|
} catch (EASBizException e) {
|
|
|
JSONUtils.ERROR("EASBizException",e);
|
|
|
throw new RuntimeException(e);
|
|
@@ -535,7 +558,8 @@ public class TaxUnitListHandlerEx extends TaxUnitListHandler {
|
|
|
Calendar cal = Calendar.getInstance();
|
|
|
String skssq = skssqFormat.format(cal.getTime());
|
|
|
try {
|
|
|
- this.propt.load(new FileInputStream(System.getProperty("EAS_HOME") + "/server/properties/sy/syConfig.properties"));
|
|
|
+ ISYUtilsFacade utilsFacade = SYUtilsFacadeFactory.getLocalInstance(context);
|
|
|
+ Map propt=utilsFacade.getConfig();
|
|
|
TaxUnitCollection taxUnitCollection = TaxUnitFactory.getLocalInstance(context).getTaxUnitCollection();
|
|
|
for (int i = 0; i < taxUnitCollection.size(); i++) {
|
|
|
TaxUnitInfo taxUnitInfo = taxUnitCollection.get(i);
|
|
@@ -599,7 +623,7 @@ public class TaxUnitListHandlerEx extends TaxUnitListHandler {
|
|
|
rylb.add(personInfo);
|
|
|
}
|
|
|
postBody.put("rylb", rylb);
|
|
|
- String ip = propt.getProperty("ip");
|
|
|
+ String ip = (String) propt.get("ip");
|
|
|
String url = ip + "/gateway/iit/personalPension/download";
|
|
|
logger.error("===请求参数=="+postBody+"========");
|
|
|
ISYUtilsFacade localInstance = SYUtilsFacadeFactory.getLocalInstance(context);
|
|
@@ -626,12 +650,6 @@ public class TaxUnitListHandlerEx extends TaxUnitListHandler {
|
|
|
} catch (BOSException e) {
|
|
|
JSONUtils.ERROR("BOSException",e);
|
|
|
throw new RuntimeException(e);
|
|
|
- } catch (FileNotFoundException e) {
|
|
|
- JSONUtils.ERROR("FileNotFoundException",e);
|
|
|
- throw new RuntimeException(e);
|
|
|
- } catch (IOException e) {
|
|
|
- JSONUtils.ERROR("IOException",e);
|
|
|
- throw new RuntimeException(e);
|
|
|
} catch (EASBizException e) {
|
|
|
JSONUtils.ERROR("EASBizException",e);
|
|
|
throw new RuntimeException(e);
|