/*
 * Decompiled with CFR 0.152.
 * 
 * Could not load the following classes:
 *  org.apache.commons.httpclient.HttpClient
 *  org.apache.commons.httpclient.HttpException
 *  org.apache.commons.httpclient.HttpMethod
 *  org.apache.commons.httpclient.methods.GetMethod
 *  org.apache.commons.httpclient.methods.PostMethod
 *  org.apache.commons.lang3.StringUtils
 *  org.springframework.beans.factory.annotation.Autowired
 *  org.springframework.stereotype.Service
 */
package com.hst.taxService.service.imp;

import com.hst.common.domain.BaseAppServiceDomain;
import com.hst.common.domain.TaxCommonReturnDomain;
import com.hst.common.service.imp.BaseBusinessServiceImp;
import com.hst.common.util.DesUtils;
import com.hst.framework.constants.AppServiceConstants;
import com.hst.framework.constants.WebConstants;
import com.hst.framework.util.HstDateUtil;
import com.hst.framework.util.HstToolsUtil;
import com.hst.httpclient.HttpClientCommon;
import com.hst.httpclient.HttpConnectionManager;
import com.hst.httpclient.HttpConstants;
import com.hst.taxService.dao.SzrsCommonDao;
import com.hst.taxService.domain.szrs.SwrySzxxDomain;
import com.hst.taxService.domain.szrs.SzrsGzjsDomain;
import com.hst.taxService.domain.szrs.SzrsGzjsGridlbDomain;
import com.hst.taxService.domain.szrs.SzrsGzjsRequestDomain;
import com.hst.taxService.domain.szrs.SzrsRequestDomain;
import com.hst.taxService.domain.szrs.SzrsSjtbDomain;
import com.hst.taxService.service.SzrsCommonService;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.util.HashMap;
import org.apache.commons.httpclient.HttpClient;
import org.apache.commons.httpclient.HttpException;
import org.apache.commons.httpclient.HttpMethod;
import org.apache.commons.httpclient.methods.GetMethod;
import org.apache.commons.httpclient.methods.PostMethod;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class SzrsCommonServiceImp
extends BaseBusinessServiceImp
implements SzrsCommonService {
    @Autowired
    private SzrsCommonDao dao;

    /*
     * Unable to fully structure code
     */
    @Override
    public TaxCommonReturnDomain szrs(BaseAppServiceDomain baseDomain) throws Exception {
        block23: {
            request = (SzrsGzjsRequestDomain)baseDomain;
            response = new TaxCommonReturnDomain();
            post = null;
            get = null;
            sjtbDomain = null;
            path = "";
            response.setCode("00");
            if (HstToolsUtil.isNullOrEmpty(request.getSwryDm())) {
                SzrsCommonServiceImp._logger.error((Object)"\u8c03\u7528\u6570\u5b57\u4eba\u4e8b\u63a5\u53e3\u4f20\u5165\u7a0e\u52a1\u4eba\u5458\u4ee3\u7801\u4e3a\u7a7a\uff0c\u8bf7\u60a8\u68c0\u67e5\uff01");
                response.setCode("01");
                response.setMess("\u8c03\u7528\u6570\u5b57\u4eba\u4e8b\u63a5\u53e3\u4f20\u5165\u7a0e\u52a1\u4eba\u5458\u4ee3\u7801\u4e3a\u7a7a\uff0c\u8bf7\u60a8\u68c0\u67e5\uff01");
                return response;
            }
            if (request.getDataList() == null || request.getDataList().isEmpty()) {
                SzrsCommonServiceImp._logger.error((Object)("\u8c03\u7528\u6570\u5b57\u4eba\u4e8b\u63a5\u53e3\u4f20\u5165dataList\u4e3a\u7a7a\uff0c\u5bf9\u5e94\u7684\u7a0e\u52a1\u4eba\u5458\u4ee3\u7801\u4e3a\uff1a" + request.getSwryDm()));
                response.setCode("01");
                response.setMess("\u8c03\u7528\u6570\u5b57\u4eba\u4e8b\u63a5\u53e3\u4f20\u5165dataList\u4e3a\u7a7a\uff0c\u5bf9\u5e94\u7684\u7a0e\u52a1\u4eba\u5458\u4ee3\u7801\u4e3a\uff1a" + request.getSwryDm());
                return response;
            }
            szrsUser = this.dao.querySzrsUserxx(request.getSwryDm());
            if (szrsUser == null || HstToolsUtil.isNullOrEmpty(szrsUser.getSzrsZh()) || HstToolsUtil.isNullOrEmpty(szrsUser.getSzrsPwd())) {
                response.setCode("01");
                response.setMess("\u7a0e\u52a1\u4eba\u5458\u4ee3\u7801\u4e3a\uff1a" + request.getSwryDm() + "\u4e0d\u5b58\u5728\u6216\u8005\u5df2\u5220\u9664\uff01");
                this.updateSzrsSjtbByError(request, response);
                return response;
            }
            if (HstToolsUtil.isNullOrEmpty(szrsUser.getSzrsZh()) && HstToolsUtil.isNullOrEmpty(szrsUser.getSzrsPwd())) {
                response.setCode("01");
                response.setMess("\u6570\u5b57\u4eba\u4e8b\u7528\u6237\u548c\u5bc6\u7801\u672a\u7ef4\u62a4\uff0c\u8bf7\u60a8\u7ef4\u62a4!");
                this.updateSzrsSjtbByError(request, response);
                return response;
            }
            if (HstToolsUtil.isNullOrEmpty(szrsUser.getSzrsZh())) {
                response.setCode("01");
                response.setMess("\u6570\u5b57\u4eba\u4e8b\u7528\u6237\u672a\u7ef4\u62a4\uff0c\u8bf7\u60a8\u7ef4\u62a4!");
                this.updateSzrsSjtbByError(request, response);
                return response;
            }
            if (HstToolsUtil.isNullOrEmpty(szrsUser.getSzrsPwd())) {
                response.setCode("01");
                response.setMess("\u6570\u5b57\u4eba\u4e8b\u5bc6\u7801\u672a\u7ef4\u62a4\uff0c\u8bf7\u60a8\u7ef4\u62a4!");
                this.updateSzrsSjtbByError(request, response);
                return response;
            }
            path = this.webUrl();
            loginUrl = WebConstants.HST_PROP_MAP.get("hst.SZRY_LOGIN_URL");
            loginUrl = String.valueOf(path) + loginUrl;
            des = new DesUtils("key=bskj");
            szrsUser.setSzrsPwd(des.decrypt(szrsUser.getSzrsPwd()));
            client = HttpConnectionManager.httpClientInstance();
            post = HttpClientCommon.szrsLoginPostMethod(szrsUser.getSzrsZh(), szrsUser.getSzrsPwd(), loginUrl);
            client.executeMethod((HttpMethod)post);
            System.out.println("\u767b\u5f55StatusCode" + post.getStatusCode());
            if (post.getStatusCode() == 302) break block23;
            response.setCode("01");
            response.setMess("\u7528\u6237\u3010" + szrsUser.getSzrsZh() + "\u3011\u5bc6\u7801\u3010" + szrsUser.getSzrsPwd() + "\u3011\u767b\u5f55\u5931\u8d25,\u8bf7\u60a8\u68c0\u67e5\u662f\u5426\u7ef4\u62a4\u9519\u8bef\u3002");
            this.updateSzrsSjtbByError(request, response);
            var27_13 = response;
            this.colseConnection(post, (HttpMethod)get);
            return var27_13;
        }
        try {
            try {
                oid = null;
                gzjsDomain = null;
                for (SzrsGzjsGridlbDomain obj : request.getDataList()) {
                    block24: {
                        block26: {
                            block25: {
                                gzjsDomain = null;
                                sjtbDomain = new SzrsSjtbDomain();
                                sjtbDomain.setSjtbrwXh(obj.getSjtbrwXh());
                                sjtbDomain.setTbbz("Y");
                                map = new HashMap<String, String>();
                                if (!"01".equals(obj.getSzrsRwlbDm())) break block24;
                                gzjsDomain = this.dao.querySzrsGzjsByKey(obj.getYwxh());
                                if (gzjsDomain != null && !HstToolsUtil.isNullOrEmpty(gzjsDomain.getRq())) break block25;
                                sjtbDomain.setTbbz("N");
                                sjtbDomain.setErrMess("\u65e5\u5fd7\u767b\u8bb0\u5e8f\u53f7\uff1a\u3010" + obj.getYwxh() + "\u3011\u5bf9\u5e94\u5df2\u5220\u9664\u6216\u4e0d\u5b58\u5728\u3002");
                                this.dao.updateSzrsSjtb(sjtbDomain);
                                if (!"Y".equals(sjtbDomain.getTbbz())) continue;
                                this.insertGztx(request, sjtbDomain, gzjsDomain, response);
                                continue;
                            }
                            rq = gzjsDomain.getRq();
                            map.put("nd", rq.substring(0, 4));
                            map.put("yf", rq.substring(5, 7));
                            map.put("state", "saveGzjs");
                            map.put("skey", "abc");
                            map.put("gzjsVO.c_oid", HstToolsUtil.isNullOrEmpty(obj.getSzrsYwid()) != false ? "" : obj.getSzrsYwid());
                            map.put("gzjsVO.c_zs_zt", HstToolsUtil.isNullOrEmpty(gzjsDomain.getZszt()) != false ? "1" : gzjsDomain.getZszt());
                            content = "";
                            if (!HstToolsUtil.isNullOrEmpty(gzjsDomain.getGzjs())) {
                                content = gzjsDomain.getGzjs().replaceAll("\r\n|\r|\n|\n\r", "<br/>");
                            }
                            map.put("gzjsVO.c_gzjs_html", content);
                            map.put("content", content);
                            map.put("_previous_url_", "/pskh/gzjs/GzjsAction.do?state=gzjsEdit");
                            map.put("dateString2", rq);
                            map.put("dateString", HstDateUtil.format(HstDateUtil.parse(rq), "yyyy\u5e74MM\u6708dd\u65e5"));
                            gzjs_url = String.valueOf(path) + "/pskh/gzjs/GzjsAction.do";
                            post = HttpClientCommon.postMethodInstance(gzjs_url, map);
                            client.executeMethod((HttpMethod)post);
                            System.out.println("SAVE\u6a21\u5757StatusCode" + post.getStatusCode());
                            if (302 != post.getStatusCode()) ** GOTO lbl138
                            System.out.println(post.getResponseBodyAsString());
                            locationHeader = post.getResponseHeader("location");
                            location = null;
                            if (locationHeader == null) break block24;
                            location = locationHeader.getValue();
                            System.out.println("\u91cd\u5b9a\u5411 redirected to:" + location);
                            get = new GetMethod(location);
                            get.releaseConnection();
                            client.executeMethod((HttpMethod)get);
                            html = get.getResponseBodyAsString();
                            oidMap = new HashMap<K, V>();
                            oidMap = HttpClientCommon.parseSzrsGzjsHtml(html);
                            gzjs_edit_url = (String)oidMap.get(rq);
                            if (!HstToolsUtil.isNullOrEmpty(gzjs_edit_url)) break block26;
                            sjtbDomain.setTbbz("Y");
                            sjtbDomain.setErrMess("\u65e5\u5fd7\u767b\u8bb0\u5e8f\u53f7\uff1a\u3010" + obj.getYwxh() + "\u3011\u5bf9\u5e94\u4fe1\u606f\u5df2\u540c\u6b65\u5230\u6570\u5b57\u4eba\u4e8b\uff0c\u4f46\u672a\u53d6\u5230oid");
                            SzrsCommonServiceImp._logger.error((Object)(String.valueOf(sjtbDomain.getErrMess()) + html));
                            this.dao.updateSzrsSjtb(sjtbDomain);
                            if (!"Y".equals(sjtbDomain.getTbbz())) break;
                            this.insertGztx(request, sjtbDomain, gzjsDomain, response);
                            break;
                        }
                        oid = StringUtils.substringBetween((String)gzjs_edit_url, (String)"&oid=", (String)"&date=");
                        break block24;
lbl138:
                        // 1 sources

                        sjtbDomain.setTbbz("N");
                        sjtbDomain.setErrMess("\u65e5\u5fd7\u767b\u8bb0\u5e8f\u53f7\uff1a\u3010" + obj.getYwxh() + "\u3011\u5bf9\u5e94\u8bb0\u5f55\u540c\u6b65\u5931\u8d25\uff0cStatusCode=" + post.getStatusCode());
                        this.dao.updateSzrsSjtb(sjtbDomain);
                        if (!"Y".equals(sjtbDomain.getTbbz())) continue;
                        this.insertGztx(request, sjtbDomain, gzjsDomain, response);
                        continue;
                    }
                    try {
                        try {
                            sjtbDomain.setSzrsYwid(oid);
                            sjtbDomain.setTbsj(HstDateUtil.getYyyyMmddHhMmSs(HstDateUtil.toDateString(new Date(), AppServiceConstants.TIME_DATETIME_FORMAT)));
                        }
                        catch (Exception e) {
                            e.getStackTrace();
                            SzrsCommonServiceImp._logger.error((Object)("\u6570\u636e\u540c\u6b65\u4efb\u52a1\u5e8f\u53f7\u3010" + obj.getSjtbrwXh() + "\u3011" + e.toString()));
                            sjtbDomain.setTbbz("N");
                            if (e.toString().length() > 3000) {
                                sjtbDomain.setErrMess(e.toString().substring(3000));
                            } else {
                                sjtbDomain.setErrMess(e.toString());
                            }
                            this.dao.updateSzrsSjtb(sjtbDomain);
                            if (!"Y".equals(sjtbDomain.getTbbz())) continue;
                            this.insertGztx(request, sjtbDomain, gzjsDomain, response);
                            continue;
                        }
                    }
                    catch (Throwable var25_28) {
                        this.dao.updateSzrsSjtb(sjtbDomain);
                        if ("Y".equals(sjtbDomain.getTbbz())) {
                            this.insertGztx(request, sjtbDomain, gzjsDomain, response);
                        }
                        throw var25_28;
                    }
                    this.dao.updateSzrsSjtb(sjtbDomain);
                    if (!"Y".equals(sjtbDomain.getTbbz())) continue;
                    this.insertGztx(request, sjtbDomain, gzjsDomain, response);
                }
                this.logout(request, client, path);
            }
            catch (Exception e) {
                e.getStackTrace();
                SzrsCommonServiceImp._logger.error((Object)("\u7a0e\u52a1\u4eba\u5458\u4ee3\u7801\u3010" + request.getSwryDm() + "\u3011" + e.toString()));
                response.setCode("01");
                response.setMess("\u7a0e\u52a1\u4eba\u5458\u4ee3\u7801\u3010" + request.getSwryDm() + "\u3011" + e.toString());
                this.colseConnection(post, (HttpMethod)get);
            }
        }
        catch (Throwable var26_29) {
            this.colseConnection(post, (HttpMethod)get);
            throw var26_29;
        }
        this.colseConnection(post, (HttpMethod)get);
        return response;
    }

    /*
     * Exception decompiling
     */
    public TaxCommonReturnDomain znrwList(BaseAppServiceDomain baseDomain) throws Exception {
        /*
         * This method has failed to decompile.  When submitting a bug report, please provide this stack trace, and (if you hold appropriate legal rights) the relevant class file.
         * 
         * org.benf.cfr.reader.util.ConfusedCFRException: Tried to end blocks [5[TRYBLOCK]], but top level block is 13[WHILELOOP]
         *     at org.benf.cfr.reader.bytecode.analysis.opgraph.Op04StructuredStatement.processEndingBlocks(Op04StructuredStatement.java:435)
         *     at org.benf.cfr.reader.bytecode.analysis.opgraph.Op04StructuredStatement.buildNestedBlocks(Op04StructuredStatement.java:484)
         *     at org.benf.cfr.reader.bytecode.analysis.opgraph.Op03SimpleStatement.createInitialStructuredBlock(Op03SimpleStatement.java:736)
         *     at org.benf.cfr.reader.bytecode.CodeAnalyser.getAnalysisInner(CodeAnalyser.java:850)
         *     at org.benf.cfr.reader.bytecode.CodeAnalyser.getAnalysisOrWrapFail(CodeAnalyser.java:278)
         *     at org.benf.cfr.reader.bytecode.CodeAnalyser.getAnalysis(CodeAnalyser.java:201)
         *     at org.benf.cfr.reader.entities.attributes.AttributeCode.analyse(AttributeCode.java:94)
         *     at org.benf.cfr.reader.entities.Method.analyse(Method.java:531)
         *     at org.benf.cfr.reader.entities.ClassFile.analyseMid(ClassFile.java:1055)
         *     at org.benf.cfr.reader.entities.ClassFile.analyseTop(ClassFile.java:942)
         *     at org.benf.cfr.reader.Driver.doClass(Driver.java:84)
         *     at org.benf.cfr.reader.CfrDriverImpl.analyse(CfrDriverImpl.java:78)
         *     at org.benf.cfr.reader.Main.main(Main.java:54)
         */
        throw new IllegalStateException("Decompilation failed");
    }

    protected boolean validateUsreInfo(SzrsRequestDomain request, TaxCommonReturnDomain response, SwrySzxxDomain szrsUser) throws Exception {
        if (HstToolsUtil.isNullOrEmpty(request.getSwryDm())) {
            _logger.error((Object)"\u8c03\u7528\u6570\u5b57\u4eba\u4e8b\u63a5\u53e3\u4f20\u5165\u7a0e\u52a1\u4eba\u5458\u4ee3\u7801\u4e3a\u7a7a\uff0c\u8bf7\u60a8\u68c0\u67e5\uff01");
            response.setCode("01");
            response.setMess("\u8c03\u7528\u6570\u5b57\u4eba\u4e8b\u63a5\u53e3\u4f20\u5165\u7a0e\u52a1\u4eba\u5458\u4ee3\u7801\u4e3a\u7a7a\uff0c\u8bf7\u60a8\u68c0\u67e5\uff01");
            return false;
        }
        szrsUser = this.dao.querySzrsUserxx(request.getSwryDm());
        if (szrsUser == null || HstToolsUtil.isNullOrEmpty(szrsUser.getSzrsZh()) || HstToolsUtil.isNullOrEmpty(szrsUser.getSzrsPwd())) {
            response.setCode("01");
            response.setMess("\u7a0e\u52a1\u4eba\u5458\u4ee3\u7801\u4e3a\uff1a" + request.getSwryDm() + "\u4e0d\u5b58\u5728\u6216\u8005\u5df2\u5220\u9664\uff01");
            return false;
        }
        if (HstToolsUtil.isNullOrEmpty(szrsUser.getSzrsZh()) && HstToolsUtil.isNullOrEmpty(szrsUser.getSzrsPwd())) {
            response.setCode("01");
            response.setMess("\u6570\u5b57\u4eba\u4e8b\u7528\u6237\u548c\u5bc6\u7801\u672a\u7ef4\u62a4\uff0c\u8bf7\u60a8\u7ef4\u62a4!");
            return false;
        }
        if (HstToolsUtil.isNullOrEmpty(szrsUser.getSzrsZh())) {
            response.setCode("01");
            response.setMess("\u6570\u5b57\u4eba\u4e8b\u7528\u6237\u672a\u7ef4\u62a4\uff0c\u8bf7\u60a8\u7ef4\u62a4!");
            return false;
        }
        if (HstToolsUtil.isNullOrEmpty(szrsUser.getSzrsPwd())) {
            response.setCode("01");
            response.setMess("\u6570\u5b57\u4eba\u4e8b\u5bc6\u7801\u672a\u7ef4\u62a4\uff0c\u8bf7\u60a8\u7ef4\u62a4!");
            return false;
        }
        return true;
    }

    protected String webUrl() throws Exception {
        String path = "";
        String ip = WebConstants.HST_PROP_MAP.get("hst.SZRY_IP");
        int port = Integer.valueOf(WebConstants.HST_PROP_MAP.get("hst.SZRY_PORT"));
        String contextPath = WebConstants.HST_PROP_MAP.get("hst.SZRY_CONTEXT_PATH");
        if (HstToolsUtil.isNullOrEmpty(HttpConstants.HTTP_IP)) {
            HttpConstants.HTTP_IP = ip;
        }
        if (HttpConstants.HTTP_PORT <= 0) {
            HttpConstants.HTTP_PORT = port;
        }
        path = 80 == HttpConstants.HTTP_PORT ? "http://" + HttpConstants.HTTP_IP + contextPath : "http://" + HttpConstants.HTTP_IP + ":" + HttpConstants.HTTP_PORT + contextPath;
        return path;
    }

    protected void login(SzrsRequestDomain request, TaxCommonReturnDomain response, SwrySzxxDomain szrsUser, String path, HttpClient client, PostMethod post) throws Exception {
        try {
            String loginUrl = WebConstants.HST_PROP_MAP.get("hst.SZRY_LOGIN_URL");
            loginUrl = String.valueOf(path) + loginUrl;
            DesUtils des = new DesUtils("key=bskj");
            szrsUser.setSzrsPwd(des.decrypt(szrsUser.getSzrsPwd()));
            post = HttpClientCommon.szrsLoginPostMethod(szrsUser.getSzrsZh(), szrsUser.getSzrsPwd(), loginUrl);
            client.executeMethod((HttpMethod)post);
            System.out.println("\u767b\u5f55StatusCode" + post.getStatusCode());
            if (302 != post.getStatusCode()) {
                response.setCode("01");
                response.setMess("\u7528\u6237\u3010" + szrsUser.getSzrsZh() + "\u3011\u5bc6\u7801\u3010" + szrsUser.getSzrsPwd() + "\u3011\u767b\u5f55\u5931\u8d25,\u8bf7\u60a8\u68c0\u67e5\u662f\u5426\u7ef4\u62a4\u9519\u8bef\u3002");
                return;
            }
        }
        catch (Exception e) {
            _logger.error((Object)("\u767b\u5f55\u5931\u8d25,\u7a0e\u52a1\u4eba\u5458\u4ee3\u7801\u3010" + request.getSwryDm() + "\u3011" + e.toString()));
            response.setCode("01");
            response.setMess("\u767b\u5f55\u5931\u8d25,\u7a0e\u52a1\u4eba\u5458\u4ee3\u7801\u3010" + request.getSwryDm() + "\u3011" + e.toString());
            return;
        }
        finally {
            if (post != null) {
                post.releaseConnection();
            }
        }
    }

    protected void logout(SzrsRequestDomain request, HttpClient client, String path) throws IOException, HttpException {
        GetMethod get = null;
        try {
            try {
                String logout_url = String.valueOf(path) + "/login.do?state=logout";
                get = new GetMethod(logout_url);
                client.executeMethod((HttpMethod)get);
            }
            catch (Exception e) {
                _logger.error((Object)("\u9000\u51fa\u5931\u8d25\uff0c\u7a0e\u52a1\u4eba\u5458\u4ee3\u7801\u3010" + request.getSwryDm() + "\u3011" + e.toString()));
                if (get != null) {
                    get.releaseConnection();
                }
                get = null;
            }
        }
        finally {
            if (get != null) {
                get.releaseConnection();
            }
            get = null;
        }
    }

    protected void colseConnection(PostMethod post, HttpMethod get) {
        if (post != null) {
            post.releaseConnection();
        }
        if (get != null) {
            get.releaseConnection();
        }
    }

    protected String responseAsStringByPost(PostMethod post) throws UnsupportedEncodingException, IOException {
        String response = "";
        BufferedReader reader = null;
        String charset = "utf-8";
        boolean pretty = true;
        try {
            String line;
            StringBuffer sb = new StringBuffer();
            reader = new BufferedReader(new InputStreamReader(post.getResponseBodyAsStream(), charset));
            while ((line = reader.readLine()) != null) {
                if (pretty) {
                    sb.append(line).append(System.getProperty("line.separator"));
                    continue;
                }
                sb.append(line);
            }
            response = sb.toString();
        }
        finally {
            if (reader != null) {
                reader.close();
            }
            post.releaseConnection();
        }
        return response;
    }

    protected String responseAsStringByGet(HttpMethod get) throws UnsupportedEncodingException, IOException {
        String response = "";
        BufferedReader reader = null;
        String charset = "utf-8";
        boolean pretty = true;
        try {
            String line;
            StringBuffer sb = new StringBuffer();
            reader = new BufferedReader(new InputStreamReader(get.getResponseBodyAsStream(), charset));
            while ((line = reader.readLine()) != null) {
                if (pretty) {
                    sb.append(line).append(System.getProperty("line.separator"));
                    continue;
                }
                sb.append(line);
            }
            response = sb.toString();
        }
        finally {
            if (reader != null) {
                reader.close();
            }
            get.releaseConnection();
        }
        return response;
    }

    public void updateSzrsSjtbByError(SzrsGzjsRequestDomain request, TaxCommonReturnDomain response) throws Exception {
        SzrsSjtbDomain sjtbDomain = null;
        for (SzrsGzjsGridlbDomain obj : request.getDataList()) {
            sjtbDomain = new SzrsSjtbDomain();
            sjtbDomain.setSjtbrwXh(obj.getSjtbrwXh());
            sjtbDomain.setTbbz("N");
            sjtbDomain.setErrMess(response.getMess());
            this.dao.updateSzrsSjtb(sjtbDomain);
            this.insertGztx(request, sjtbDomain, null, response);
        }
    }

    public void insertGztx(SzrsGzjsRequestDomain request, SzrsSjtbDomain sjtbDomain, SzrsGzjsDomain gzjsDomain, TaxCommonReturnDomain response) throws Exception {
        try {
            this.dao.sjtSuncessHxcl(sjtbDomain);
        }
        catch (Exception e) {
            e.getStackTrace();
            _logger.error((Object)("\u7a0e\u52a1\u4eba\u5458\u4ee3\u7801\u3010" + request.getSwryDm() + "\u3011" + e.toString()));
        }
    }
}
