/*
 * Decompiled with CFR 0.152.
 * 
 * Could not load the following classes:
 *  com.google.gson.Gson
 *  org.apache.commons.beanutils.BeanUtils
 *  org.apache.commons.lang.StringUtils
 *  org.springframework.stereotype.Service
 *  org.springframework.transaction.annotation.Propagation
 *  org.springframework.transaction.annotation.Transactional
 */
package com.hst.taxService.service.imp;

import com.google.gson.Gson;
import com.hst.business.domain.XtGt3SmbsLogDomain;
import com.hst.common.bo.SmzBsySxsfzBdjl;
import com.hst.common.bo.XtGt3SmbsRxbdLog;
import com.hst.common.bo.XtGt3SmbsSmcjLog;
import com.hst.common.domain.BaseGt3ServiceDomain;
import com.hst.common.domain.TaxCommonReturnDomain;
import com.hst.common.service.imp.BaseBusinessServiceImp;
import com.hst.common.util.Base64;
import com.hst.common.util.EjbJ3Util;
import com.hst.common.util.HstWxServiceUtil;
import com.hst.common.util.IDCardUtil;
import com.hst.common.util.ImgCompress;
import com.hst.common.util.XmlHelper;
import com.hst.common.util.XmlUtil;
import com.hst.framework.constants.AppServiceConstants;
import com.hst.framework.constants.WebConstants;
import com.hst.framework.dao.BaseDao;
import com.hst.framework.util.HstDateUtil;
import com.hst.framework.util.HstHwFaceUtil;
import com.hst.framework.util.HstToolsUtil;
import com.hst.servlet.domain.SfzxxResponse;
import com.hst.task.domain.JhxxData;
import com.hst.taxService.dao.imp.TaxLogDaoImp;
import com.hst.taxService.dao.imp.TaxSmzAppDaoImp;
import com.hst.taxService.domain.SjqhGetPhxxAppDomain;
import com.hst.taxService.domain.SjqhPjAppDomain;
import com.hst.taxService.domain.gt3.Gt3HeadDomain;
import com.hst.taxService.domain.gt3.Gt3RtnMsgDomain;
import com.hst.taxService.domain.gt3.Gt3ServiceDomain;
import com.hst.taxService.domain.gt3.HxzgDjCxNsrjyxxRequestDomain;
import com.hst.taxService.domain.gt3.HxzgDjCxNsrjyxxResponseDomain;
import com.hst.taxService.domain.gt3.Zjsmbs00001RequestDomain;
import com.hst.taxService.domain.gt3.Zjsmbs00001ResponseDomain;
import com.hst.taxService.domain.gt3.Zjsmbs00006QyqcxxGrid;
import com.hst.taxService.domain.gt3.Zjsmbs00006QyqcxxVO;
import com.hst.taxService.domain.gt3.Zjsmbs00006RequestDomain;
import com.hst.taxService.domain.gt3.Zjsmbs00006ResponseDomain;
import com.hst.taxService.domain.gt3.Zjsmbs00006SmcjxxVO;
import com.hst.taxService.domain.gt3.Zjsmbs00006ZgzsxxGrid;
import com.hst.taxService.domain.gt3.Zjsmbs00006ZgzsxxVO;
import com.hst.taxService.domain.gt3.Zjsmbs00007RequestDomain;
import com.hst.taxService.domain.gt3.Zjsmbs00007ResponseDomain;
import com.hst.taxService.domain.gt3.Zjsmbs00007SmcjxxVO;
import com.hst.taxService.domain.gt3.Zjsmbs00008QybsryxxVO;
import com.hst.taxService.domain.gt3.Zjsmbs00008RequestDomain;
import com.hst.taxService.domain.gt3.Zjsmbs00008ResponseDomain;
import com.hst.taxService.domain.gt3.Zjsmbs00009RequestDomain;
import com.hst.taxService.domain.gt3.Zjsmbs00009ResponseDomain;
import com.hst.taxService.domain.gt3.Zjsmbs00011GlqyxxGrid;
import com.hst.taxService.domain.gt3.Zjsmbs00011GlqyxxGridlb;
import com.hst.taxService.domain.gt3.Zjsmbs00011RequestDomain;
import com.hst.taxService.domain.gt3.Zjsmbs00011ResponseDomain;
import com.hst.taxService.domain.gt3.Zjsmbs00011YjxxGrid;
import com.hst.taxService.domain.gt3.Zjsmbs00011YjxxGridlb;
import com.hst.taxService.domain.gt3.Zjsmbs00012RequestDomain;
import com.hst.taxService.domain.gt3.Zjsmbs00012ResponseDomain;
import com.hst.taxService.domain.gt3.Zjsmbs00012YjxxGrid;
import com.hst.taxService.domain.gt3.Zjsmbs00012YjxxGridlb;
import com.hst.taxService.domain.smz.BsyglBsydelAppDomain;
import com.hst.taxService.domain.smz.BsyglBsydjAppDomain;
import com.hst.taxService.domain.smz.JhxtGetBdNsrxxAppDomain;
import com.hst.taxService.domain.smz.JhxtGetBdNsrxxDomain;
import com.hst.taxService.domain.smz.JhxtGetBdNsrxxReturnDomain;
import com.hst.taxService.domain.smz.JhxtGetBsyGlqyxxAppDomain;
import com.hst.taxService.domain.smz.JhxtGetBsyGlqyxxDomain;
import com.hst.taxService.domain.smz.JhxtGetBsyGlqyxxReturnDomain;
import com.hst.taxService.domain.smz.JhxtGetBsyxxByqhhmAppDomain;
import com.hst.taxService.domain.smz.JhxtGetDhrsAppDomain;
import com.hst.taxService.domain.smz.JhxtGetGgjChxxAppDomain;
import com.hst.taxService.domain.smz.JhxtGetGgjGetListAppDomain;
import com.hst.taxService.domain.smz.JhxtGetJhListAppDomain;
import com.hst.taxService.domain.smz.JhxtGetJhListReturnDomain;
import com.hst.taxService.domain.smz.JhxtGetNsrxxBynsrsbhAppDomain;
import com.hst.taxService.domain.smz.JhxtGetNsrxxBynsrsbhReturnDomain;
import com.hst.taxService.domain.smz.JhxtGetQhhmlistAppDomain;
import com.hst.taxService.domain.smz.JhxtGetSjqhhmAppDomain;
import com.hst.taxService.domain.smz.JhxtGetSssxdmAppDomain;
import com.hst.taxService.domain.smz.JhxtGetXtcsAppDomain;
import com.hst.taxService.domain.smz.JhxtGetYwfl2AppDomain;
import com.hst.taxService.domain.smz.JhxtGetYwflAppDomain;
import com.hst.taxService.domain.smz.JhxtGetYyqhlistAppDomain;
import com.hst.taxService.domain.smz.JhxtGetYyxxAppDomain;
import com.hst.taxService.domain.smz.JhxtGetYyxxReturnDomain;
import com.hst.taxService.domain.smz.JhxtJhSjqhAppDomain;
import com.hst.taxService.domain.smz.JhxtJhYyqhAppDomain;
import com.hst.taxService.domain.smz.JhxtSaveBlnsrAppDomain;
import com.hst.taxService.domain.smz.JhxtSaveBsydjAppDomain;
import com.hst.taxService.domain.smz.JhxtSaveSjhmAppDomain;
import com.hst.taxService.domain.smz.JhxtSaveYcxgzAppDomain;
import com.hst.taxService.domain.smz.JhxtSetSjhmAppDomain;
import com.hst.taxService.domain.smz.JhxtTycxSqlAppDomain;
import com.hst.taxService.domain.smz.JhxtXxtsAppDomain;
import com.hst.taxService.domain.smz.JhxtZfSjqhAppDomain;
import com.hst.taxService.domain.smz.JhxtZfYyqhAppDomain;
import com.hst.taxService.domain.smz.SmzGetsfzbdxxAppDomain;
import com.hst.taxService.domain.smz.SmzJhxtHzqhhmAppDomain;
import com.hst.taxService.domain.smz.SmzRxsfzBdAppDomain;
import com.hst.taxService.domain.smz.SmzRxsfzBdReturnDomain;
import com.hst.taxService.domain.smz.SmzRxsfzGetBdxxByRxAppDomain;
import com.hst.taxService.domain.smz.SmzSaveSmcjWebAppDomain;
import com.hst.taxService.domain.smz.SmzbsGetSmzcjxxAppDomain;
import com.hst.taxService.domain.smz.SmzbsGetSmzcjxxReturnDomain;
import com.hst.taxService.domain.smz.SmzbsSaveSmzcjxxAppDomain;
import com.hst.taxService.domain.zhdt.QhjGetNsrBltsxxAppDomain;
import com.hst.taxService.domain.zhdt.QhjGetNsrBltsxxDomain;
import com.hst.taxService.domain.zhdt.QhjGetNsrBltsxxReturnDomain;
import com.hst.taxService.domain.zhdt.QhjGetNsrQhtsxxAppDomain;
import com.hst.taxService.domain.zhdt.QhjGetNsrQhtsxxDomain;
import com.hst.taxService.domain.zhdt.QhjGetNsrQhtsxxReturnDomain;
import com.hst.taxService.service.TaxWxSmzCommonAppService;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.apache.commons.beanutils.BeanUtils;
import org.apache.commons.lang.StringUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

@Service
public class TaxWxSmzAppCommonServiceImp
extends BaseBusinessServiceImp
implements TaxWxSmzCommonAppService {
    private BaseDao dao;

    @Override
    public TaxCommonReturnDomain rxsfzBdHw(SmzRxsfzBdAppDomain appDomain) throws Exception {
        SmzRxsfzBdAppDomain domain = appDomain;
        SmzBsySxsfzBdjl bo = new SmzBsySxsfzBdjl();
        BeanUtils.copyProperties((Object)bo, (Object)domain);
        bo.setSjlyDm(domain.getSjlyDm());
        SmzRxsfzBdReturnDomain returnDomain = new SmzRxsfzBdReturnDomain();
        returnDomain.setBdjg("N");
        Map<String, String> resMap = HstHwFaceUtil.comparePhoto(domain.getSfzzmPic(), domain.getHeadPic());
        _logger.info(resMap);
        if ("00".equals(resMap.get("code"))) {
            bo.setXsbl(resMap.get("mess"));
            String xsbl = resMap.get("mess");
            if (Double.parseDouble(xsbl) >= 0.6) {
                bo.setBdjg("Y");
            } else {
                bo.setBdjg("N");
            }
            returnDomain.setBdjg(bo.getBdjg());
            returnDomain.setXsbl(bo.getXsbl());
            returnDomain.setCode("00");
            return returnDomain;
        }
        returnDomain.setCode("01");
        returnDomain.setMess(resMap.get("mess"));
        bo.setXsbl("0");
        bo.setBdjg("N");
        return returnDomain;
    }

    @Override
    public TaxCommonReturnDomain rxsfzBd(SmzRxsfzBdAppDomain appDomain) throws Exception {
        SmzRxsfzBdAppDomain domain = appDomain;
        SmzBsySxsfzBdjl bo = new SmzBsySxsfzBdjl();
        BeanUtils.copyProperties((Object)bo, (Object)domain);
        bo.setSjlyDm(domain.getSjlyDm());
        SmzRxsfzBdReturnDomain returnDomain = new SmzRxsfzBdReturnDomain();
        returnDomain.setBdjg("N");
        if ("Y".equals(WebConstants.SMZ_RXBD_JK_GT3)) {
            if (StringUtils.isBlank((String)WebConstants.SMZ_RXBD_BSDT_DJXH)) {
                returnDomain.setCode("01");
                returnDomain.setMess("\u8bf7\u8054\u7cfb\u7ba1\u7406\u5458\u7ef4\u62a4BS_TAX_REGNUM\u53c2\u6570");
                returnDomain.setBdjg("N");
                WebConstants.SMZ_RXBD_BSDT_DJXH = ((TaxSmzAppDaoImp)this.getDao("taxSmzAppDaoImp")).queryBsdtDjxh();
                return returnDomain;
            }
            domain.setBsdt_djxh(WebConstants.SMZ_RXBD_BSDT_DJXH);
            bo.setBsdt_djxh(WebConstants.SMZ_RXBD_BSDT_DJXH);
            try {
                if (StringUtils.isBlank((String)domain.getSfzzmPic())) {
                    _logger.debug((Object)"\u8fdb\u884c\u65e0\u8eab\u4efd\u8bc1\u53d6\u53f7----");
                    String zjkurl = String.valueOf(WebConstants.ZJK_FOR_QHJ__URL) + "/querySfzxx";
                    HashMap<String, String> params = new HashMap<String, String>();
                    params.put("idcard", domain.getSfzhm());
                    params.put("name", domain.getXm());
                    Map<String, String> res = HstWxServiceUtil.sendMess(zjkurl, params, "utf-8");
                    if ("00".equals(res.get("code"))) {
                        SfzxxResponse zjkRes = (SfzxxResponse)new Gson().fromJson(res.get("mess"), SfzxxResponse.class);
                        if ("0".equals(zjkRes.getErrorCode())) {
                            byte[] zjkByte = Base64.stringToByte(zjkRes.getSfzpic());
                            String zjkbase64 = zjkRes.getSfzpic();
                            if (zjkByte.length > 20000) {
                                ImgCompress imgCom = new ImgCompress(zjkByte);
                                byte[] imgbyte = imgCom.resizeFix(400, 300);
                                zjkbase64 = Base64.byteToString(imgbyte).replaceAll("\n", "").replaceAll("\r", "");
                            }
                            domain.setSfzzmPic(zjkbase64);
                            bo.setXm(zjkRes.getXm());
                            bo.setZz(zjkRes.getZz());
                            bo.setXb(IDCardUtil.getGenderByIdCard(domain.getSfzhm()));
                            bo.setYxq_z(this.convertRq(zjkRes.getYxq_z()));
                            bo.setCsrq(this.convertRq(zjkRes.getCsrq()));
                        } else {
                            Zjsmbs00006RequestDomain zjsmbs00006RequestDomain = new Zjsmbs00006RequestDomain();
                            returnDomain.setCode("00");
                            zjsmbs00006RequestDomain.setSfzjlxDm("201");
                            zjsmbs00006RequestDomain.setSfzjhm(domain.getSfzhm());
                            zjsmbs00006RequestDomain.setCxbz("N");
                            Zjsmbs00006ResponseDomain responseDomain = (Zjsmbs00006ResponseDomain)this.querySmcjxxAndQxqcxx(zjsmbs00006RequestDomain);
                            if ("00".equals(responseDomain.getCode())) {
                                if ("N".equals(responseDomain.getSfsmcj())) {
                                    returnDomain.setCode("01");
                                    returnDomain.setMess("\u8bf7\u786e\u8ba4\u60a8\u7684\u8eab\u4efd\u8bc1\u53f7\u7801\u662f\u5426\u6b63\u786e\uff0c\u82e5\u6b63\u786e\u8bf7\u7a0d\u540e\u91cd\u8bd5");
                                    returnDomain.setBdjg("N");
                                    return returnDomain;
                                }
                                domain.setSfzzmPic(responseDomain.getSmcjxxVO().getZjznr());
                                bo.setXm(responseDomain.getSmcjxxVO().getBsrxm());
                                bo.setCsrq(responseDomain.getSmcjxxVO().getCsrq());
                            }
                        }
                    }
                }
                bo.setSfzzmPic(domain.getSfzzmPic());
                Zjsmbs00001RequestDomain g3Req = new Zjsmbs00001RequestDomain();
                g3Req.setSfzjhm(domain.getSfzhm());
                g3Req.setSfzjlxDm("201");
                g3Req.setZpnr(domain.getHeadPic());
                g3Req.setZjznr(domain.getSfzzmPic());
                g3Req.setBsrxm(domain.getXm());
                Zjsmbs00001ResponseDomain g3Res = (Zjsmbs00001ResponseDomain)this.doSmbsRxbdGt3(g3Req);
                if ("00".equals(g3Res.getCode())) {
                    bo.setJkyzuuid(g3Res.getJkyzuuid());
                    String bdjg = WebConstants.SMZ_RXBD_CODE_QHBZ.get(g3Res.getReturncode());
                    if (StringUtils.isBlank((String)bdjg)) {
                        returnDomain.setBdjg(g3Res.getCgbz());
                    }
                    returnDomain.setMess(g3Res.getReturnmessage());
                    if ("15".equals(g3Res.getReturncode()) && "N".equals(bdjg)) {
                        returnDomain.setCode("88");
                        returnDomain.setMess("\u672a\u91c7\u96c6\uff0c\u8bf7\u5148\u8fdb\u884c\u5b9e\u540d\u91c7\u96c6!\u91d1\u4e09\u8fd4\u56de:" + g3Res.getReturnmessage());
                    } else if ("4".equals(g3Res.getReturncode())) {
                        returnDomain.setCode("88");
                    } else {
                        returnDomain.setCode("00");
                    }
                    returnDomain.setBdjg(bdjg);
                    if ("12".equals(g3Res.getReturncode()) || "15".equals(g3Res.getReturncode()) || "1".equals(g3Res.getReturncode())) {
                        bo.setCjbz("N");
                        String HWURL = WebConstants.HST_PROP_MAP.get("hst.RXBD_HW_URL");
                        String BDWCJBZ = WebConstants.HST_PROP_MAP.get("hst.SMZ_RXBD_WCJBD_TOHW");
                        if ("Y".equals(BDWCJBZ) && "N".equals(bdjg)) {
                            SmzRxsfzBdReturnDomain hwReturnDomain = (SmzRxsfzBdReturnDomain)HstWxServiceUtil.sendMess(HWURL, domain, "smz.rxsfzBd", returnDomain.getClass());
                            _logger.debug((Object)("-------" + hwReturnDomain.getCode() + "----" + hwReturnDomain.getBdjg()));
                            if ("00".equals(hwReturnDomain.getCode()) && StringUtils.isNotBlank((String)hwReturnDomain.getBdjg()) && "Y".equals(hwReturnDomain.getBdjg())) {
                                returnDomain.setBdjg(hwReturnDomain.getBdjg());
                                returnDomain.setMess(hwReturnDomain.getMess());
                            } else {
                                returnDomain.setMess("\u672a\u91c7\u96c6,\u4eba\u50cf\u6bd4\u5bf9\u4e0d\u901a\u8fc7");
                            }
                        }
                    } else {
                        bo.setCjbz("Y");
                    }
                } else {
                    returnDomain.setCode("01");
                    returnDomain.setMess(g3Res.getMess());
                }
            }
            catch (Exception e) {
                returnDomain.setCode("01");
                if (e.getMessage().length() > 3000) {
                    returnDomain.setMess(e.getMessage().substring(0, 3000));
                } else {
                    returnDomain.setMess(e.getMessage());
                }
                returnDomain.setBdjg("N");
            }
            bo.setRtnMsg(returnDomain.getMess());
            bo.setBdjg(returnDomain.getBdjg());
            SmzRxsfzBdReturnDomain rxbdRetrun = (SmzRxsfzBdReturnDomain)((TaxSmzAppDaoImp)this.getDao("taxSmzAppDaoImp")).rxsfzBd_sqlServer(domain, bo);
            returnDomain.setNj(rxbdRetrun.getNj());
            returnDomain.setRxsfzBdxh(bo.getRxsfzBdxh());
            _logger.info((Object)("----" + returnDomain.getRxsfzBdxh()));
            return returnDomain;
        }
        Map<String, String> resMap = HstHwFaceUtil.comparePhoto(domain.getSfzzmPic(), domain.getHeadPic());
        _logger.info(resMap);
        if ("00".equals(resMap.get("code"))) {
            bo.setXsbl(resMap.get("mess"));
            String xsbl = resMap.get("mess");
            if (Double.parseDouble(xsbl) >= 0.6) {
                bo.setBdjg("Y");
            } else {
                bo.setBdjg("N");
            }
            return ((TaxSmzAppDaoImp)this.getDao("taxSmzAppDaoImp")).rxsfzBd(domain, bo);
        }
        returnDomain.setCode("01");
        returnDomain.setMess(resMap.get("mess"));
        bo.setXsbl("0");
        bo.setBdjg("N");
        ((TaxSmzAppDaoImp)this.getDao("taxSmzAppDaoImp")).rxsfzBd(domain, bo);
        return returnDomain;
    }

    @Override
    public TaxCommonReturnDomain rxsfzGetBdxxByRx(SmzRxsfzGetBdxxByRxAppDomain appDomain) throws Exception {
        SmzRxsfzGetBdxxByRxAppDomain domain = appDomain;
        SmzBsySxsfzBdjl bo = new SmzBsySxsfzBdjl();
        BeanUtils.copyProperties((Object)bo, (Object)domain);
        bo.setSjlyDm("2");
        bo.setSfzhm("330100199202113111");
        bo.setBdjg("Y");
        bo.setSjlyDm("2");
        bo.setXsbl("0.66");
        SmzRxsfzBdReturnDomain returnDomain = new SmzRxsfzBdReturnDomain();
        returnDomain.setBdjg("N");
        returnDomain.setCode("01");
        returnDomain.setMess("\u5931\u8d25");
        _logger.info((Object)"smz.rxsfzGetBdxxByRx \u8c03\u7528\u5931\u8d25");
        return returnDomain;
    }

    @Override
    public TaxCommonReturnDomain jhxtHzqhhm(SmzJhxtHzqhhmAppDomain appDomain) throws Exception {
        SmzJhxtHzqhhmAppDomain domain = appDomain;
        TaxCommonReturnDomain returnDomain = new TaxCommonReturnDomain();
        returnDomain.setCode("00");
        if ("Y".equals(WebConstants.SMZ_RXBD_JK_GT3)) {
            try {
                returnDomain.setCode("00");
                Zjsmbs00009RequestDomain requestDomain = ((TaxSmzAppDaoImp)this.getDao("taxSmzAppDaoImp")).queryUpdateJhxxG3Cx(domain);
                if (requestDomain == null) {
                    returnDomain.setCode("01");
                    returnDomain.setMess("\u65e0\u76f8\u5173\u6bd4\u5bf9\u4fe1\u606f\uff0c\u8bf7\u8054\u7cfb\u7ba1\u7406\u5458");
                }
                requestDomain.setSfzjlxDm("201");
                if (StringUtils.isNotBlank((String)requestDomain.getJkyzuuid()) && StringUtils.isBlank((String)requestDomain.getWbsbkl())) {
                    requestDomain.setWbsbkl(domain.getQhhm());
                    Zjsmbs00009ResponseDomain g3Res = (Zjsmbs00009ResponseDomain)this.doUpdateGt3Jhxx(requestDomain);
                    if ("00".equals(g3Res.getCode())) {
                        if ("2".equals(g3Res.getReturncode())) {
                            returnDomain.setCode("01");
                            returnDomain.setMess("\u91d1\u4e09\u4fdd\u5b58\u6392\u961f\u53f7\u5931\u8d25:" + g3Res.getReturnmessage());
                        }
                    } else {
                        returnDomain.setCode("01");
                        returnDomain.setMess("\u91d1\u4e09\u4fdd\u5b58\u6392\u961f\u53f7\u5931\u8d25:" + g3Res.getMess());
                    }
                }
            }
            catch (Exception e) {
                returnDomain.setCode("01");
                if (e.getMessage().length() > 3000) {
                    returnDomain.setMess(e.getMessage().substring(0, 3000));
                }
                returnDomain.setMess(e.getMessage());
            }
            ((TaxSmzAppDaoImp)this.getDao("taxSmzAppDaoImp")).jhxtHzqhhm_sqlserver(domain);
            return returnDomain;
        }
        return ((TaxSmzAppDaoImp)this.getDao("taxSmzAppDaoImp")).jhxtHzqhhm(domain);
    }

    public TaxCommonReturnDomain getsfzbdxx(SmzGetsfzbdxxAppDomain domain) throws Exception {
        return ((TaxSmzAppDaoImp)this.getDao("taxSmzAppDaoImp")).getsfzbdxx(domain);
    }

    public BaseDao getDao(String daoName) {
        this.dao = (BaseDao)WebConstants.WEB_APP_CONTEXT.getBean(daoName);
        return this.dao;
    }

    @Override
    public TaxCommonReturnDomain bsyglBsydj(BsyglBsydjAppDomain domain) throws Exception {
        return ((TaxSmzAppDaoImp)this.getDao("taxSmzAppDaoImp")).bsyglBsydj(domain);
    }

    @Override
    public TaxCommonReturnDomain bsyglBsydel(BsyglBsydelAppDomain domain) throws Exception {
        return ((TaxSmzAppDaoImp)this.getDao("taxSmzAppDaoImp")).bsyglBsydel(domain);
    }

    @Override
    public TaxCommonReturnDomain jhxtGetBsyxxByqhhm(JhxtGetBsyxxByqhhmAppDomain domain) throws Exception {
        if ("Y".equals(WebConstants.SMZ_RXBD_JK_GT3)) {
            return ((TaxSmzAppDaoImp)this.getDao("taxSmzAppDaoImp")).jhxtGetBsyxxByqhhm_sqlServer(domain);
        }
        return ((TaxSmzAppDaoImp)this.getDao("taxSmzAppDaoImp")).jhxtGetBsyxxByqhhm(domain);
    }

    @Override
    public TaxCommonReturnDomain jhxtGetBdNsrxx(JhxtGetBdNsrxxAppDomain domain) throws Exception {
        if ("Y".equals(WebConstants.SMZ_RXBD_JK_GT3)) {
            JhxtGetBdNsrxxReturnDomain returnDomain = new JhxtGetBdNsrxxReturnDomain();
            returnDomain.setCode("00");
            Zjsmbs00011RequestDomain req = new Zjsmbs00011RequestDomain();
            req.setSfzjlxDm("201");
            if ("330103198805210417".equals(domain.getSfzhm())) {
                req.setSfzjhm("330102197803240013");
            } else {
                req.setSfzjhm(domain.getSfzhm());
            }
            req.setSmbsYjfsDm("30");
            StringBuffer djxhBuffer = new StringBuffer();
            Zjsmbs00011ResponseDomain responseDomain = (Zjsmbs00011ResponseDomain)this.queryYjxxForBsr(req);
            if ("1".equals(responseDomain.getReturncode())) {
                returnDomain.setCode("00");
                StringBuffer yjxxStr = new StringBuffer();
                String zbbz = "N";
                ArrayList<JhxtGetBdNsrxxDomain> dataList = new ArrayList<JhxtGetBdNsrxxDomain>();
                HashMap<String, String> djxhmap = new HashMap<String, String>();
                for (Zjsmbs00011GlqyxxGridlb qybo : responseDomain.getGlqyxxGrid().getZgzsxxVO()) {
                    if (djxhmap.containsKey(qybo.getDjxh())) continue;
                    djxhmap.put(qybo.getDjxh(), "");
                    JhxtGetBdNsrxxDomain tmp = new JhxtGetBdNsrxxDomain();
                    tmp.setNsrmc(qybo.getNsrmc());
                    tmp.setNsrsbh(qybo.getNsrsbh());
                    tmp.setDjxh(qybo.getDjxh());
                    dataList.add(tmp);
                    djxhBuffer.append(qybo.getDjxh()).append("|");
                }
                if (djxhBuffer.length() > 0) {
                    String DJXH = djxhBuffer.substring(0, djxhBuffer.length() - 1);
                    HashMap<String, String> parms = new HashMap<String, String>();
                    parms.put("ywId", "zhdt.qhjGetNsrBltsxx");
                    QhjGetNsrBltsxxAppDomain reqDomain = new QhjGetNsrBltsxxAppDomain();
                    reqDomain.setDJXH(DJXH);
                    Gson gson = new Gson();
                    parms.put("parJson", gson.toJson((Object)reqDomain));
                    Map<String, String> resMap = HstWxServiceUtil.sendMess(WebConstants.JHXT_BID_URL_MAP.get("zhdt.qhjGetNsrBltsxx"), parms, "utf-8");
                    if (!"00".equals(resMap.get("code"))) {
                        returnDomain.setCode("01");
                        returnDomain.setMess(resMap.get("mess"));
                        return returnDomain;
                    }
                    String json = resMap.get("mess");
                    QhjGetNsrBltsxxReturnDomain responseMap = (QhjGetNsrBltsxxReturnDomain)gson.fromJson(json, QhjGetNsrBltsxxReturnDomain.class);
                    if (!"00".equals(responseMap.getCode())) {
                        returnDomain.setCode("01");
                        returnDomain.setMess(responseMap.getMess());
                        return returnDomain;
                    }
                    if (responseMap.getDATALIST().size() > 0) {
                        int i = 0;
                        block1: for (JhxtGetBdNsrxxDomain data : dataList) {
                            for (QhjGetNsrBltsxxDomain dom : responseMap.getDATALIST()) {
                                if (!data.getDjxh().equals(dom.getDJXH())) continue;
                                data.setTsyjbz(dom.getTSYJBZ());
                                data.setTsyjnr(dom.getTSYJNR());
                                data.setFsrq(dom.getFSRQ());
                                data.setFsr(dom.getFSR());
                                yjxxStr.append(i + 1).append(". ").append(dom.getTSYJNR()).append("\\n");
                                ++i;
                                continue block1;
                            }
                        }
                    }
                    returnDomain.setDataList(dataList);
                    returnDomain.setZbbz(zbbz);
                    returnDomain.setYjxx(yjxxStr.toString());
                }
            } else {
                returnDomain.setCode("01");
                returnDomain.setMess(responseDomain.getReturnmessage());
            }
            return returnDomain;
        }
        return ((TaxSmzAppDaoImp)this.getDao("taxSmzAppDaoImp")).jhxtGetBdNsrxx(domain);
    }

    @Override
    public TaxCommonReturnDomain jhxtSaveYcxgz(JhxtSaveYcxgzAppDomain domain) throws Exception {
        return ((TaxSmzAppDaoImp)this.getDao("taxSmzAppDaoImp")).jhxtSaveYcxgz(domain);
    }

    @Override
    public TaxCommonReturnDomain jhxtSaveBsydj(JhxtSaveBsydjAppDomain domain) throws Exception {
        TaxCommonReturnDomain returnDomain = new TaxCommonReturnDomain();
        if ("Y".equals(WebConstants.SMZ_RXBD_JK_GT3)) {
            try {
                returnDomain.setCode("00");
                Zjsmbs00008RequestDomain requestDomain = new Zjsmbs00008RequestDomain();
                Zjsmbs00008QybsryxxVO vo = new Zjsmbs00008QybsryxxVO();
                vo.setSfzjhm(domain.getSfzhm());
                vo.setDjxh(domain.getDjxh());
                vo.setOpType("I");
                vo.setSfzjlxDm("201");
                vo.setYxqq(HstDateUtil.getCurrentDate());
                vo.setYxqz("9999-12-31");
                vo.setCysh("");
                requestDomain.getQybsryxxGrid().getQybsryxxVO().add(vo);
                Zjsmbs00008ResponseDomain g3Res = (Zjsmbs00008ResponseDomain)this.doSaveBsyxx(requestDomain);
                if ("00".equals(g3Res.getCode())) {
                    if ("N".equals(g3Res.getCgbz())) {
                        returnDomain.setCode("01");
                        returnDomain.setMess("\u91d1\u4e09:" + g3Res.getReturnmessage());
                    } else {
                        returnDomain.setCode("00");
                    }
                } else {
                    returnDomain.setCode("01");
                    returnDomain.setMess("\u91d1\u4e09:" + g3Res.getMess());
                }
            }
            catch (Exception e) {
                returnDomain.setCode("01");
                if (e.getMessage().length() > 3000) {
                    returnDomain.setMess(e.getMessage().substring(0, 3000));
                }
                returnDomain.setMess(e.getMessage());
            }
            return returnDomain;
        }
        return ((TaxSmzAppDaoImp)this.getDao("taxSmzAppDaoImp")).jhxtSaveBsydj(domain);
    }

    @Override
    public TaxCommonReturnDomain jhxtGetNsrxxBynsrsbh(JhxtGetNsrxxBynsrsbhAppDomain domain) throws Exception {
        if ("Y".equals(WebConstants.SMZ_RXBD_JK_GT3)) {
            JhxtGetNsrxxBynsrsbhReturnDomain returnDomain = new JhxtGetNsrxxBynsrsbhReturnDomain();
            HxzgDjCxNsrjyxxRequestDomain nsrjyxxReq = new HxzgDjCxNsrjyxxRequestDomain();
            nsrjyxxReq.setBid("GT3.HxzgDjCxNsrjyxx");
            nsrjyxxReq.setNsrsbh(domain.getNsrsbh());
            HxzgDjCxNsrjyxxResponseDomain nsrjyxxRespDomain = HstWxServiceUtil.sendMess(WebConstants.GT3JK_SJ_URL, nsrjyxxReq, "GT3.HxzgDjCxNsrjyxx", HxzgDjCxNsrjyxxResponseDomain.class);
            if (!"00".equals(nsrjyxxRespDomain.getCode())) {
                returnDomain.setCode(nsrjyxxRespDomain.getCode());
                returnDomain.setMess(nsrjyxxRespDomain.getMess());
                return returnDomain;
            }
            returnDomain.setCode("00");
            returnDomain.setNsrmc(nsrjyxxRespDomain.getNsrmc());
            returnDomain.setNsrsbh(nsrjyxxRespDomain.getNsrsbh());
            String nsrzt = "";
            nsrzt = "01".equals(nsrjyxxRespDomain.getNsrztDm()) ? "\u53d7\u7406" : ("02".equals(nsrjyxxRespDomain.getNsrztDm()) ? "\u7b79\u5efa\u671f" : ("03".equals(nsrjyxxRespDomain.getNsrztDm()) ? "\u6b63\u5e38" : ("04".equals(nsrjyxxRespDomain.getNsrztDm()) ? "\u505c\u4e1a" : ("05".equals(nsrjyxxRespDomain.getNsrztDm()) ? "\u975e\u6b63\u5e38" : ("06".equals(nsrjyxxRespDomain.getNsrztDm()) ? "\u6e05\u7b97" : ("07".equals(nsrjyxxRespDomain.getNsrztDm()) ? "\u6ce8\u9500" : ("08".equals(nsrjyxxRespDomain.getNsrztDm()) ? "\u975e\u6b63\u5e38\u6237\u6ce8\u9500" : ("09".equals(nsrjyxxRespDomain.getNsrztDm()) ? "\u62a5\u9a8c" : ("10".equals(nsrjyxxRespDomain.getNsrztDm()) ? "\u62a5\u9a8c" : ("11".equals(nsrjyxxRespDomain.getNsrztDm()) ? "\u4e2d\u65ad\u7f34\u8d39" : ("12".equals(nsrjyxxRespDomain.getNsrztDm()) ? "\u6062\u590d\u7f34\u8d39" : "\u5176\u4ed6")))))))))));
            returnDomain.setNsrzt(nsrzt);
            returnDomain.setDjxh(nsrjyxxRespDomain.getDjxh());
            return returnDomain;
        }
        return ((TaxSmzAppDaoImp)this.getDao("taxSmzAppDaoImp")).jhxtGetNsrxxBynsrsbh(domain);
    }

    @Override
    public TaxCommonReturnDomain jhxtGetXtcs(JhxtGetXtcsAppDomain domain) throws Exception {
        return ((TaxSmzAppDaoImp)this.getDao("taxSmzAppDaoImp")).jhxtGetXtcs(domain);
    }

    @Override
    public TaxCommonReturnDomain jhxtGetYyxx(JhxtGetYyxxAppDomain domain) throws Exception {
        if ("Y".equals(WebConstants.SMZ_RXBD_JK_GT3)) {
            return new JhxtGetYyxxReturnDomain();
        }
        return ((TaxSmzAppDaoImp)this.getDao("taxSmzAppDaoImp")).jhxtGetYyxx(domain);
    }

    @Override
    public TaxCommonReturnDomain jhxtXxts(JhxtXxtsAppDomain appDomain) throws Exception {
        return ((TaxSmzAppDaoImp)this.getDao("taxSmzAppDaoImp")).jhxtXxts(appDomain);
    }

    @Override
    public TaxCommonReturnDomain saveSmzcjxx(SmzbsSaveSmzcjxxAppDomain domain) throws Exception {
        TaxCommonReturnDomain returnDomain = new TaxCommonReturnDomain();
        Zjsmbs00007RequestDomain requestDomain = new Zjsmbs00007RequestDomain();
        Zjsmbs00007SmcjxxVO vo = new Zjsmbs00007SmcjxxVO();
        SmzBsySxsfzBdjl dom = ((TaxSmzAppDaoImp)this.getDao("taxSmzAppDaoImp")).querySmzbdxxByRsxfzBdxh(domain.getRxsfzBdxh());
        if (StringUtils.isBlank((String)WebConstants.SMZ_RXBD_SWJG_DM)) {
            WebConstants.SMZ_RXBD_SWJG_DM = ((TaxSmzAppDaoImp)this.getDao("taxSmzAppDaoImp")).queryParmValueByKey("BS_TAX_AUTHORITY_NUM");
        }
        if (StringUtils.isBlank((String)WebConstants.SMZ_RXBD_SWJG_DM)) {
            returnDomain.setCode("01");
            returnDomain.setMess("\u8bf7\u8054\u7cfb\u7ba1\u7406\u5458\u7ef4\u62a4BS_TAX_AUTHORITY_NUM\u53c2\u6570");
            return returnDomain;
        }
        if (dom == null) {
            returnDomain.setCode("01");
            returnDomain.setMess("\u65e0\u6bd4\u5bf9\u4fe1\u606f");
            return returnDomain;
        }
        vo.setBsrxm(dom.getXm());
        vo.setSfzjlxDm("201");
        vo.setDz(dom.getZz());
        vo.setSfzjhm(dom.getSfzhm());
        vo.setLxdh(domain.getLxdh());
        vo.setYdhm1(domain.getSjhm());
        vo.setDzyx(domain.getDzyx());
        vo.setXbDm(dom.getXb());
        String mzdm = ((TaxSmzAppDaoImp)this.getDao("taxSmzAppDaoImp")).queryMzDmByMc(dom.getMz());
        vo.setMzDm(mzdm);
        vo.setGjDm("156");
        vo.setCsrq(dom.getCsrq());
        vo.setFjjg(dom.getQfjg());
        vo.setYxqq(dom.getYxq_q());
        vo.setYxqz(dom.getYxq_z());
        vo.setZjznr(dom.getSfzzmPic());
        vo.setCcznr(dom.getHeadPic());
        vo.setSwjgDm(WebConstants.SMZ_RXBD_SWJG_DM);
        requestDomain.setSmcjxxVO(vo);
        Zjsmbs00007ResponseDomain g3Res = (Zjsmbs00007ResponseDomain)this.doSaveSmcjxx(requestDomain);
        this.saveSmzSmcjLog(requestDomain, g3Res, dom);
        if ("00".equals(g3Res.getCode())) {
            if ("Y".equals(g3Res.getCgbz())) {
                returnDomain.setCode("00");
                Zjsmbs00001RequestDomain g3Req = new Zjsmbs00001RequestDomain();
                g3Req.setSfzjhm(dom.getSfzhm());
                g3Req.setSfzjlxDm("201");
                g3Req.setZpnr(dom.getHeadPic());
                g3Req.setZjznr(dom.getSfzzmPic());
                g3Req.setBsrxm(dom.getXm());
                Zjsmbs00001ResponseDomain bdRes = (Zjsmbs00001ResponseDomain)this.doSmbsRxbdGt3(g3Req);
                if (!"Y".equals(bdRes.getCgbz())) {
                    returnDomain.setCode("01");
                    returnDomain.setMess("\u91d1\u4e09\u4eba\u8138\u6bd4\u5bf9\u5931\u8d25:" + bdRes.getReturnmessage());
                    return returnDomain;
                }
                Zjsmbs00009RequestDomain saveQhhmReq = new Zjsmbs00009RequestDomain();
                saveQhhmReq.setSfzjlxDm("201");
                saveQhhmReq.setWbsbkl(dom.getQhhm());
                saveQhhmReq.setJkyzuuid(bdRes.getJkyzuuid());
                saveQhhmReq.setWbsbbs(WebConstants.SMZ_RXBD_BSDT_DJXH);
                saveQhhmReq.setSfzjhm(dom.getSfzhm());
                Zjsmbs00009ResponseDomain saveQhhmRes = (Zjsmbs00009ResponseDomain)this.doUpdateGt3Jhxx(saveQhhmReq);
                if ("00".equals(saveQhhmRes.getCode())) {
                    if ("2".equals(saveQhhmRes.getReturncode())) {
                        returnDomain.setCode("01");
                        returnDomain.setMess("\u91d1\u4e09\u4fdd\u5b58\u6392\u961f\u53f7\u5931\u8d25:" + saveQhhmRes.getReturnmessage());
                    }
                } else {
                    returnDomain.setCode("01");
                    returnDomain.setMess("\u91d1\u4e09\u4fdd\u5b58\u6392\u961f\u53f7\u5931\u8d25:" + g3Res.getMess());
                }
            } else {
                returnDomain.setCode("01");
                returnDomain.setMess(g3Res.getReturnmessage());
            }
        } else {
            returnDomain.setCode("01");
            returnDomain.setMess(g3Res.getMess());
        }
        return returnDomain;
    }

    @Override
    public TaxCommonReturnDomain getSmzcjxx(SmzbsGetSmzcjxxAppDomain domain) throws Exception {
        SmzbsGetSmzcjxxReturnDomain returnDomain = new SmzbsGetSmzcjxxReturnDomain();
        Zjsmbs00006RequestDomain req = new Zjsmbs00006RequestDomain();
        returnDomain.setCode("00");
        req.setSfzjlxDm("201");
        req.setSfzjhm(domain.getSfzhm());
        req.setCxbz("N");
        Zjsmbs00006ResponseDomain responseDomain = (Zjsmbs00006ResponseDomain)this.querySmcjxxAndQxqcxx(req);
        if ("00".equals(responseDomain.getCode())) {
            if ("10000".equals(responseDomain.getReturncode())) {
                Zjsmbs00006SmcjxxVO smcjxxVO = responseDomain.getSmcjxxVO();
                returnDomain.setSjhm(smcjxxVO.getYdhm1());
                returnDomain.setDljgbz(smcjxxVO.getDljgbz());
                returnDomain.setZcpf(smcjxxVO.getZcpf());
                returnDomain.setPjdf(smcjxxVO.getPjdf());
                returnDomain.setGlqydf(smcjxxVO.getGlqydf());
                returnDomain.setQtdf(smcjxxVO.getQtdf());
                returnDomain.setZhdf(smcjxxVO.getZhdf());
                returnDomain.setBz(smcjxxVO.getBz());
                returnDomain.setSfwxgz("N");
                returnDomain.setCode("00");
            } else {
                returnDomain.setCode("01");
                returnDomain.setMess(responseDomain.getReturnmessage());
            }
        } else {
            returnDomain.setCode("01");
            returnDomain.setMess(responseDomain.getMess());
        }
        return returnDomain;
    }

    @Override
    public TaxCommonReturnDomain jhxtGetSssxdm(JhxtGetSssxdmAppDomain domain) throws Exception {
        return ((TaxSmzAppDaoImp)this.getDao("taxSmzAppDaoImp")).jhxtGetSssxdm(domain);
    }

    @Override
    public TaxCommonReturnDomain jhxtGetGgjChxx(JhxtGetGgjChxxAppDomain domain) throws Exception {
        return ((TaxSmzAppDaoImp)this.getDao("taxSmzAppDaoImp")).jhxtGetGgjChxx(domain);
    }

    @Override
    public TaxCommonReturnDomain jhxtGetGgjGetList(JhxtGetGgjGetListAppDomain domain) throws Exception {
        return ((TaxSmzAppDaoImp)this.getDao("taxSmzAppDaoImp")).jhxtGetGgjGetList(domain);
    }

    @Override
    public TaxCommonReturnDomain jhxtGetJhList(JhxtGetJhListAppDomain domain) throws Exception {
        return ((TaxSmzAppDaoImp)this.getDao("taxSmzAppDaoImp")).jhxtGetJhList(domain);
    }

    @Override
    public TaxCommonReturnDomain JhxtGetSjqhhm(JhxtGetSjqhhmAppDomain domain) throws Exception {
        return ((TaxSmzAppDaoImp)this.getDao("taxSmzAppDaoImp")).JhxtGetSjqhhm(domain);
    }

    @Override
    public TaxCommonReturnDomain JhxtZfSjqh(JhxtZfSjqhAppDomain domain) throws Exception {
        return ((TaxSmzAppDaoImp)this.getDao("taxSmzAppDaoImp")).JhxtZfSjqh(domain);
    }

    @Override
    public TaxCommonReturnDomain JhxtJhSjqh(JhxtJhSjqhAppDomain domain) throws Exception {
        SfzxxResponse zjkRes;
        TaxCommonReturnDomain returnDomain = new TaxCommonReturnDomain();
        String zjkurl = String.valueOf(WebConstants.ZJK_FOR_QHJ__URL) + "/querySfzxx";
        HashMap<String, String> params = new HashMap<String, String>();
        params.put("idcard", domain.getSfzhm());
        Map<String, String> res = HstWxServiceUtil.sendMess(zjkurl, params, "utf-8");
        if ("00".equals(res.get("code")) && "0".equals((zjkRes = (SfzxxResponse)new Gson().fromJson(res.get("mess"), SfzxxResponse.class)).getErrorCode())) {
            byte[] zjkByte = Base64.stringToByte(zjkRes.getSfzpic());
            String zjkbase64 = zjkRes.getSfzpic();
            if (zjkByte.length > 20000) {
                ImgCompress imgCom = new ImgCompress(zjkByte);
                byte[] imgbyte = imgCom.resizeFix(400, 300);
                zjkbase64 = Base64.byteToString(imgbyte).replaceAll("\n", "").replaceAll("\r", "");
            }
            params.put("sfzPic", zjkbase64);
            params.put("xm", zjkRes.getXm());
            params.put("yxq_z", this.convertRq(zjkRes.getYxq_z()));
            params.put("csrq", this.convertRq(zjkRes.getCsrq()));
            params.put("xb", IDCardUtil.getGenderByIdCard(domain.getSfzhm()));
        }
        params.put("qhhm", domain.getQhhm());
        params.put("sfzhm", domain.getSfzhm());
        params.put("sjhm", domain.getSjhm());
        params.put("ywflbm", domain.getYwflbm());
        params.put("headPic", domain.getHeadPic());
        returnDomain = ((TaxSmzAppDaoImp)this.getDao("taxSmzAppDaoImp")).JhxtJhSjqh(domain, params);
        Zjsmbs00001RequestDomain g3Req = new Zjsmbs00001RequestDomain();
        g3Req.setSfzjhm(domain.getSfzhm());
        g3Req.setSfzjlxDm("201");
        g3Req.setZpnr(domain.getHeadPic());
        g3Req.setZjznr(params.get("sfzPic"));
        g3Req.setBsrxm(params.get("xm"));
        Zjsmbs00001ResponseDomain g3Res = (Zjsmbs00001ResponseDomain)this.doSmbsRxbdGt3(g3Req);
        if ("00".equals(g3Res.getCode())) {
            String jkyzuuid = g3Res.getJkyzuuid();
            String cgbz = g3Res.getCgbz();
            String gt3rtnMess = g3Res.getReturnmessage();
            if ("Y".equals(cgbz)) {
                if (StringUtils.isBlank((String)jkyzuuid)) {
                    SmzBsySxsfzBdjl dom = ((TaxSmzAppDaoImp)this.getDao("taxSmzAppDaoImp")).queryBdjlByDrqhhm(domain.getQhhm());
                    Zjsmbs00007RequestDomain requestDomain = new Zjsmbs00007RequestDomain();
                    Zjsmbs00007SmcjxxVO vo = new Zjsmbs00007SmcjxxVO();
                    vo.setBsrxm(dom.getXm());
                    vo.setSfzjlxDm("201");
                    vo.setDz(dom.getZz());
                    vo.setSfzjhm(dom.getSfzhm());
                    vo.setLxdh(domain.getSjhm());
                    vo.setYdhm1(domain.getSjhm());
                    vo.setXbDm(dom.getXb());
                    vo.setGjDm("156");
                    vo.setYxqz(dom.getYxq_z());
                    vo.setZjznr(dom.getSfzzmPic());
                    vo.setCcznr(dom.getHeadPic());
                    vo.setSwjgDm(WebConstants.SMZ_RXBD_SWJG_DM);
                    requestDomain.setSmcjxxVO(vo);
                    Zjsmbs00007ResponseDomain g3Res2 = (Zjsmbs00007ResponseDomain)this.doSaveSmcjxx(requestDomain);
                    this.saveSmzSmcjLog(requestDomain, g3Res2, dom);
                    if ("00".equals(g3Res.getCode()) && "Y".equals(g3Res.getCgbz())) {
                        returnDomain.setCode("00");
                        Zjsmbs00001ResponseDomain bdRes = (Zjsmbs00001ResponseDomain)this.doSmbsRxbdGt3(g3Req);
                        if ("Y".equals(bdRes.getCgbz())) {
                            jkyzuuid = bdRes.getJkyzuuid();
                            gt3rtnMess = bdRes.getReturnmessage();
                            Zjsmbs00009RequestDomain saveQhhmReq = new Zjsmbs00009RequestDomain();
                            saveQhhmReq.setSfzjlxDm("201");
                            saveQhhmReq.setWbsbkl(dom.getQhhm());
                            saveQhhmReq.setJkyzuuid(bdRes.getJkyzuuid());
                            saveQhhmReq.setWbsbbs(WebConstants.SMZ_RXBD_BSDT_DJXH);
                            saveQhhmReq.setSfzjhm(dom.getSfzhm());
                            Zjsmbs00009ResponseDomain cfr_ignored_0 = (Zjsmbs00009ResponseDomain)this.doUpdateGt3Jhxx(saveQhhmReq);
                        }
                    }
                } else {
                    Zjsmbs00009RequestDomain requestDomain = ((TaxSmzAppDaoImp)this.getDao("taxSmzAppDaoImp")).queryUpdateGt3QhhmReqByqhhm(domain.getQhhm());
                    requestDomain.setSfzjlxDm("201");
                    requestDomain.setWbsbkl(domain.getQhhm());
                    requestDomain.setJkyzuuid(jkyzuuid);
                    requestDomain.setWbsbbs(WebConstants.SMZ_RXBD_BSDT_DJXH);
                    requestDomain.setSfzjhm(domain.getSfzhm());
                    Zjsmbs00009ResponseDomain cfr_ignored_1 = (Zjsmbs00009ResponseDomain)this.doUpdateGt3Jhxx(requestDomain);
                }
            }
            ((TaxSmzAppDaoImp)this.getDao("taxSmzAppDaoImp")).updateSmzBsyRxsfzBdjlJkyzUuidByqhhm(domain.getQhhm(), jkyzuuid, gt3rtnMess);
        }
        return returnDomain;
    }

    @Override
    public TaxCommonReturnDomain JhxtGetDhrs(JhxtGetDhrsAppDomain domain) throws Exception {
        return ((TaxSmzAppDaoImp)this.getDao("taxSmzAppDaoImp")).JhxtGetDhrs(domain);
    }

    public TaxCommonReturnDomain JhxtGetYwfl(JhxtGetYwflAppDomain domain) throws Exception {
        return ((TaxSmzAppDaoImp)this.getDao("taxSmzAppDaoImp")).JhxtGetYwfl(domain);
    }

    @Override
    public TaxCommonReturnDomain JhxtGetYwfl2(JhxtGetYwfl2AppDomain domain) throws Exception {
        return ((TaxSmzAppDaoImp)this.getDao("taxSmzAppDaoImp")).JhxtGetYwfl2(domain);
    }

    @Override
    public TaxCommonReturnDomain jhxtGetJhListWx(JhxtGetJhListAppDomain domain) throws Exception {
        List<Object> jhxxDataList = new ArrayList();
        if (StringUtils.isBlank((String)domain.getYwflbm())) {
            jhxxDataList = WebConstants.JHXT_JHXX_LIST;
        } else {
            for (JhxxData data : WebConstants.JHXT_JHXX_LIST) {
                if (!data.getYwflbm().equals(domain.getYwflbm())) continue;
                jhxxDataList.add(data);
            }
        }
        Integer size = jhxxDataList.size();
        Integer rows = 0;
        Integer page = 0;
        page = StringUtils.isBlank((String)domain.getPage()) ? Integer.valueOf(1) : new Integer(domain.getPage());
        rows = StringUtils.isBlank((String)domain.getRows()) ? Integer.valueOf(9999) : new Integer(domain.getRows());
        int tmp = (page - 1) * rows;
        int maxSize = size < page * rows ? size : page * rows;
        ArrayList<JhxxData> dataList = new ArrayList();
        if (tmp <= size) {
            dataList = jhxxDataList.subList(tmp, maxSize);
        }
        JhxtGetJhListReturnDomain returnDomain = new JhxtGetJhListReturnDomain();
        returnDomain.setDataList(dataList);
        returnDomain.setCode("00");
        return returnDomain;
    }

    public TaxCommonReturnDomain jhxtGetDqphxx(SjqhGetPhxxAppDomain domain) throws Exception {
        return ((TaxSmzAppDaoImp)this.getDao("taxSmzAppDaoImp")).jhxtGetDqphxx(domain);
    }

    public TaxCommonReturnDomain jhxtPjDqph(SjqhPjAppDomain domain) throws Exception {
        return ((TaxSmzAppDaoImp)this.getDao("taxSmzAppDaoImp")).jhxtPjDqph(domain);
    }

    @Override
    public TaxCommonReturnDomain jhxtGetQhhmlist(JhxtGetQhhmlistAppDomain domain) throws Exception {
        return ((TaxSmzAppDaoImp)this.getDao("taxSmzAppDaoImp")).jhxtGetQhhmlist(domain);
    }

    @Override
    public TaxCommonReturnDomain JhxtJhYyqh(JhxtJhYyqhAppDomain domain) throws Exception {
        return ((TaxSmzAppDaoImp)this.getDao("taxSmzAppDaoImp")).JhxtJhYyqh(domain);
    }

    @Override
    public TaxCommonReturnDomain jhxtGetYyqhlist(JhxtGetYyqhlistAppDomain domain) throws Exception {
        return ((TaxSmzAppDaoImp)this.getDao("taxSmzAppDaoImp")).jhxtGetYyqhlist(domain);
    }

    @Override
    public TaxCommonReturnDomain JhxtZfYyqh(JhxtZfYyqhAppDomain domain) throws Exception {
        return ((TaxSmzAppDaoImp)this.getDao("taxSmzAppDaoImp")).JhxtZfYyqh(domain);
    }

    @Override
    public TaxCommonReturnDomain JhxtSetSjhm(JhxtSetSjhmAppDomain domain) throws Exception {
        return ((TaxSmzAppDaoImp)this.getDao("taxSmzAppDaoImp")).JhxtSetSjhm(domain);
    }

    @Override
    public TaxCommonReturnDomain jhxtGetBsyGlqyxx(JhxtGetBsyGlqyxxAppDomain domain) throws Exception {
        JhxtGetBsyGlqyxxReturnDomain returnDomain = new JhxtGetBsyGlqyxxReturnDomain();
        returnDomain.setCode("00");
        ArrayList<JhxtGetBsyGlqyxxDomain> dataList = new ArrayList<JhxtGetBsyGlqyxxDomain>();
        Zjsmbs00011RequestDomain req = new Zjsmbs00011RequestDomain();
        req.setSfzjlxDm("201");
        if ("330103198805210417".equals(domain.getSfzhm())) {
            req.setSfzjhm("330102197803240013");
        } else {
            req.setSfzjhm(domain.getSfzhm());
        }
        req.setSmbsYjfsDm("30");
        Zjsmbs00011ResponseDomain responseDomain = (Zjsmbs00011ResponseDomain)this.queryYjxxForBsr(req);
        if ("1".equals(responseDomain.getReturncode())) {
            StringBuffer djxhBuffer = new StringBuffer();
            HashMap<String, String> djxhmap = new HashMap<String, String>();
            for (Zjsmbs00011GlqyxxGridlb qybo : responseDomain.getGlqyxxGrid().getZgzsxxVO()) {
                if (djxhmap.containsKey(qybo.getDjxh())) continue;
                djxhmap.put(qybo.getDjxh(), "");
                JhxtGetBsyGlqyxxDomain data = new JhxtGetBsyGlqyxxDomain();
                data.setDjxh(qybo.getDjxh());
                data.setNsrsbh(qybo.getNsrsbh());
                data.setNsrmc(qybo.getNsrmc());
                dataList.add(data);
                djxhBuffer.append(data.getDjxh()).append("|");
            }
            if (djxhBuffer.length() > 0) {
                String DJXH = djxhBuffer.substring(0, djxhBuffer.length() - 1);
                HashMap<String, String> parms = new HashMap<String, String>();
                parms.put("ywId", "zhdt.qhjGetNsrQhtsxx");
                QhjGetNsrQhtsxxAppDomain reqDomain = new QhjGetNsrQhtsxxAppDomain();
                reqDomain.setDJXH(DJXH);
                Gson gson = new Gson();
                parms.put("parJson", gson.toJson((Object)reqDomain));
                Map<String, String> resMap = HstWxServiceUtil.sendMess(WebConstants.JHXT_BID_URL_MAP.get("zhdt.qhjGetNsrQhtsxx"), parms, "utf-8");
                if (!"00".equals(resMap.get("code"))) {
                    returnDomain.setCode("01");
                    returnDomain.setMess(resMap.get("mess"));
                    return returnDomain;
                }
                String json = resMap.get("mess");
                QhjGetNsrQhtsxxReturnDomain responseMap = (QhjGetNsrQhtsxxReturnDomain)gson.fromJson(json, QhjGetNsrQhtsxxReturnDomain.class);
                if (!"00".equals(responseMap.getCode())) {
                    returnDomain.setCode("01");
                    returnDomain.setMess(responseMap.getMess());
                    return returnDomain;
                }
                returnDomain.setTsxx(responseMap.getTSXX());
                if (responseMap.getDATALIST().size() > 0) {
                    for (JhxtGetBsyGlqyxxDomain data : dataList) {
                        for (QhjGetNsrQhtsxxDomain qhjData : responseMap.getDATALIST()) {
                            if (!qhjData.getDJXH().equals(data.getDjxh())) continue;
                            data.setBzsm(qhjData.getBZSM());
                            data.setIsVip(qhjData.getISVIP());
                            data.setQhbz(qhjData.getQHBZ());
                        }
                        if (StringUtils.isBlank((String)data.getIsVip())) {
                            data.setIsVip("N");
                        }
                        if (!StringUtils.isBlank((String)data.getQhbz())) continue;
                        data.setQhbz("Y");
                    }
                }
                returnDomain.setDataList(dataList);
            }
        } else {
            returnDomain.setCode("01");
            returnDomain.setMess(responseDomain.getReturnmessage());
        }
        return returnDomain;
    }

    @Override
    public TaxCommonReturnDomain JhxtTycxSql(JhxtTycxSqlAppDomain appDomain) throws Exception {
        return ((TaxSmzAppDaoImp)this.getDao("taxSmzAppDaoImp")).JhxtTycxSql(appDomain);
    }

    @Override
    public TaxCommonReturnDomain jhxtSaveSjhm(JhxtSaveSjhmAppDomain appDomain) throws Exception {
        return ((TaxSmzAppDaoImp)this.getDao("taxSmzAppDaoImp")).jhxtSaveSjhm(appDomain);
    }

    @Override
    public TaxCommonReturnDomain jhxtSaveBlnsr(JhxtSaveBlnsrAppDomain appDomain) throws Exception {
        return ((TaxSmzAppDaoImp)this.getDao("taxSmzAppDaoImp")).jhxtSaveBlnsr(appDomain);
    }

    private TaxCommonReturnDomain doSmbsRxbdGt3(Zjsmbs00001RequestDomain request) throws Exception {
        Zjsmbs00001ResponseDomain response = new Zjsmbs00001ResponseDomain();
        try {
            response.setCode("00");
            StringBuffer xml = new StringBuffer();
            xml.append("<?xml version=\"1.0\" encoding=\"UTF-8\"?>").append("<taxML xsi:type=\"ZJSMBS00001Request\" xmlbh=\"String\" bbh=\"String\" xmlmc=\"String\" xsi:schemaLocation=\"http://www.chinatax.gov.cn/dataspec/ TaxMLBw_ZJSMBS_00001_Request_V1.0.xsd\" xmlns=\"http://www.chinatax.gov.cn/dataspec/\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">").append("<sfzjhm>").append(request.getSfzjhm()).append("</sfzjhm>").append("<sfzjlxDm>").append(request.getSfzjlxDm()).append("</sfzjlxDm>").append("<zpnr>").append(request.getZpnr()).append("</zpnr>").append("<zjznr>").append(request.getZjznr()).append("</zjznr>").append("<bsrxm>").append(request.getBsrxm()).append("</bsrxm>").append("</taxML>");
            HashMap<String, String> map = new HashMap<String, String>();
            map.put("tran_id", "DNSW.ZJSMBS.SMBS.SAVEJHJYZXX");
            map.put("tran_seq", EjbJ3Util.getUUID());
            Date date = new Date();
            map.put("tran_date", HstDateUtil.toDateString(date, "yyyyMMdd"));
            map.put("tran_time", HstDateUtil.toDateString(date, "HHmmssSSS"));
            map.put("sjry", this.getSjry(request));
            map.put("sjjg", this.getSjjg(request));
            map.put("ywbw", xml.toString());
            Gt3ServiceDomain domain = this.doGt3Ejb(map);
            if (domain == null) {
                response.setCode("01");
                response.setMess("\u89e3\u6790\u5bf9\u8c61\u4e3a\u7a7a\uff0c\u8bf7\u60a8\u8054\u7cfb\u6709\u5173\u4eba\u5458!");
                Zjsmbs00001ResponseDomain zjsmbs00001ResponseDomain = response;
                return zjsmbs00001ResponseDomain;
            }
            try {
                if ("0".equals(domain.getHead().getRtn_code()) && "000".equals(domain.getHead().getRtn_msg().getCode())) {
                    String resStr = domain.getBody();
                    HashMap<String, Class> mapClass = new HashMap<String, Class>();
                    mapClass.put("taxML", Zjsmbs00001ResponseDomain.class);
                    XmlHelper help = new XmlHelper("taxML", mapClass);
                    Zjsmbs00001ResponseDomain dj = (Zjsmbs00001ResponseDomain)help.xmlStrParser(resStr);
                    BeanUtils.copyProperties((Object)response, (Object)dj);
                    response.setCode("00");
                } else {
                    response.setCode("01");
                    response.setMess("\u91d1\u4e09\u9519\u8bef\u8fd4\u56de\uff1aMessage[" + domain.getHead().getRtn_msg().getMessage() + "]Reason[" + domain.getHead().getRtn_msg().getReason() + "]");
                    _logger.error((Object)("\u91d1\u4e09\u9519\u8bef\u8fd4\u56de\uff1aMessage[" + domain.getHead().getRtn_msg().getMessage() + "]Reason[" + domain.getHead().getRtn_msg().getReason() + "]"));
                }
            }
            catch (Exception e) {
                response.setCode("01");
                if (e.getMessage().length() > 1000) {
                    response.setMess(e.getMessage().substring(0, 1000));
                } else {
                    response.setMess(e.getMessage());
                }
                e.getStackTrace();
                _logger.error((Object)e.getMessage());
                throw new Exception(e);
            }
        }
        finally {
            this.saveSmzRxbdLog(request, response);
        }
        return response;
    }

    private TaxCommonReturnDomain doSaveBsyxx(Zjsmbs00008RequestDomain request) throws Exception {
        Zjsmbs00008ResponseDomain response;
        block5: {
            response = new Zjsmbs00008ResponseDomain();
            try {
                response.setCode("00");
                StringBuffer xml = new StringBuffer();
                xml.append("<?xml version=\"1.0\" encoding=\"UTF-8\"?>").append("<taxML xsi:type=\"ZJSMBS00008Request\" xmlbh=\"String\" bbh=\"String\" xmlmc=\"String\" xsi:schemaLocation=\"http://www.chinatax.gov.cn/dataspec/ TaxMLBw_ZJSMBS_00008_Request_V1.0.xsd\" xmlns=\"http://www.chinatax.gov.cn/dataspec/\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">").append("<qybsryxxGrid>");
                for (Zjsmbs00008QybsryxxVO vo : request.getQybsryxxGrid().getQybsryxxVO()) {
                    xml.append("<qybsryxxVO>").append("<opType>").append(vo.getOpType()).append("</opType>").append("<djxh>").append(vo.getDjxh()).append("</djxh>").append("<sfzjhm>").append(vo.getSfzjhm()).append("</sfzjhm>").append("<sfzjlxDm>").append(vo.getSfzjlxDm()).append("</sfzjlxDm>").append("<yxqq>").append(vo.getYxqq()).append("</yxqq>").append("<yxqz>").append(vo.getYxqz()).append("</yxqz>").append("</qybsryxxVO>");
                }
                xml.append("</qybsryxxGrid>").append("</taxML>");
                HashMap<String, String> map = new HashMap<String, String>();
                map.put("tran_id", "DNSW.ZJSMBS.SMCJ.HANDLEQYBSRXX");
                map.put("tran_seq", EjbJ3Util.getUUID());
                Date date = new Date();
                map.put("tran_date", HstDateUtil.toDateString(date, "yyyyMMdd"));
                map.put("tran_time", HstDateUtil.toDateString(date, "HHmmssSSS"));
                map.put("sjry", this.getSjry(request));
                map.put("sjjg", this.getSjjg(request));
                map.put("ywbw", xml.toString());
                Gt3ServiceDomain domain = this.doGt3Ejb(map);
                if (domain == null) {
                    response.setCode("01");
                    response.setMess("\u89e3\u6790\u5bf9\u8c61\u4e3a\u7a7a\uff0c\u8bf7\u60a8\u8054\u7cfb\u6709\u5173\u4eba\u5458!");
                    return response;
                }
                if ("0".equals(domain.getHead().getRtn_code()) && "000".equals(domain.getHead().getRtn_msg().getCode())) {
                    String resStr = domain.getBody();
                    HashMap<String, Class> mapClass = new HashMap<String, Class>();
                    mapClass.put("taxML", Zjsmbs00008ResponseDomain.class);
                    XmlHelper help = new XmlHelper("taxML", mapClass);
                    Zjsmbs00008ResponseDomain dj = (Zjsmbs00008ResponseDomain)help.xmlStrParser(resStr);
                    BeanUtils.copyProperties((Object)response, (Object)dj);
                    response.setCode("00");
                    break block5;
                }
                response.setCode("01");
                response.setMess("\u91d1\u4e09\u9519\u8bef\u8fd4\u56de\uff1aMessage[" + domain.getHead().getRtn_msg().getMessage() + "]Reason[" + domain.getHead().getRtn_msg().getReason() + "]");
                _logger.error((Object)("\u91d1\u4e09\u9519\u8bef\u8fd4\u56de\uff1aMessage[" + domain.getHead().getRtn_msg().getMessage() + "]Reason[" + domain.getHead().getRtn_msg().getReason() + "]"));
                return response;
            }
            catch (Exception e) {
                e.getStackTrace();
                _logger.error((Object)e.getMessage());
                throw new Exception(e);
            }
        }
        return response;
    }

    @Override
    public TaxCommonReturnDomain saveSmcjxxWeb(SmzSaveSmcjWebAppDomain domain) throws Exception {
        TaxCommonReturnDomain returnDomain = new TaxCommonReturnDomain();
        returnDomain.setCode("00");
        Zjsmbs00007RequestDomain requestDomain = new Zjsmbs00007RequestDomain();
        Zjsmbs00007SmcjxxVO vo = new Zjsmbs00007SmcjxxVO();
        vo.setBsrxm(domain.getXm());
        vo.setSfzjlxDm("201");
        vo.setDz(domain.getZz());
        vo.setSfzjhm(domain.getSfzhm());
        vo.setLxdh(domain.getLxdh());
        vo.setYdhm1(domain.getSjhm());
        vo.setDzyx(domain.getDzyx());
        vo.setXbDm(domain.getXb());
        vo.setMzDm(domain.getMz());
        vo.setGjDm("156");
        vo.setCsrq(domain.getCsrq());
        vo.setFjjg(domain.getQfjg());
        vo.setYxqq(domain.getYxq_q());
        vo.setYxqz(domain.getYxq_z());
        vo.setZjznr(domain.getSfzzmPic());
        vo.setCcznr(domain.getHeadPic());
        vo.setSwjgDm(domain.getSwjgDm());
        requestDomain.setSmcjxxVO(vo);
        Zjsmbs00007ResponseDomain g3Res = (Zjsmbs00007ResponseDomain)this.doSaveSmcjxx(requestDomain);
        if ("00".equals(g3Res.getCode())) {
            if ("Y".equals(g3Res.getCgbz())) {
                returnDomain.setCode("00");
            } else {
                returnDomain.setCode("01");
                returnDomain.setMess(g3Res.getReturnmessage());
            }
        } else {
            returnDomain.setCode("01");
            returnDomain.setMess("\u91d1\u4e09\u4fdd\u5b58\u5931\u8d25:" + g3Res.getMess());
        }
        return returnDomain;
    }

    private TaxCommonReturnDomain doSaveSmcjxx(Zjsmbs00007RequestDomain request) throws Exception {
        Zjsmbs00007ResponseDomain response = new Zjsmbs00007ResponseDomain();
        try {
            response.setCode("00");
            StringBuffer xml = new StringBuffer();
            xml.append("<?xml version=\"1.0\" encoding=\"UTF-8\"?>").append("<taxML xsi:type=\"ZJSMBS00007Request\" xmlbh=\"String\" bbh=\"String\" xmlmc=\"String\" xsi:schemaLocation=\"http://www.chinatax.gov.cn/dataspec/ TaxMLBw_ZJSMBS_00007_Request_V1.0.xsd\" xmlns=\"http://www.chinatax.gov.cn/dataspec/\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">").append("<smcjxxVO>").append("<bsrxm>").append(request.getSmcjxxVO().getBsrxm()).append("</bsrxm>").append("<sfzjlxDm>").append(request.getSmcjxxVO().getSfzjlxDm()).append("</sfzjlxDm>").append("<sfzjhm>").append(request.getSmcjxxVO().getSfzjhm()).append("</sfzjhm>").append("<dz>").append(request.getSmcjxxVO().getDz()).append("</dz>").append("<lxdh>").append(request.getSmcjxxVO().getLxdh()).append("</lxdh>").append("<ydhm1>").append(request.getSmcjxxVO().getYdhm1()).append("</ydhm1>").append("<dzyx>").append(request.getSmcjxxVO().getDzyx()).append("</dzyx>").append("<xbDm>").append(request.getSmcjxxVO().getXbDm()).append("</xbDm>").append("<mzDm>").append(this.getNullStr(request.getSmcjxxVO().getMzDm())).append("</mzDm>").append("<gjDm>").append(request.getSmcjxxVO().getGjDm()).append("</gjDm>").append("<csrq>").append(request.getSmcjxxVO().getCsrq()).append("</csrq>").append("<fjjg>").append(this.getNullStr(request.getSmcjxxVO().getFjjg())).append("</fjjg>").append("<yxqq>").append(this.getNullStr(request.getSmcjxxVO().getYxqq())).append("</yxqq>").append("<yxqz>").append(request.getSmcjxxVO().getYxqz()).append("</yxqz>").append("<zjznr>").append(request.getSmcjxxVO().getZjznr()).append("</zjznr>").append("<ccznr>").append(request.getSmcjxxVO().getCcznr()).append("</ccznr>").append("<swjgDm>").append(request.getSmcjxxVO().getSwjgDm()).append("</swjgDm>").append("</smcjxxVO>").append("<zgzsxxGrid>").append("</zgzsxxGrid>").append("</taxML>");
            HashMap<String, String> map = new HashMap<String, String>();
            map.put("tran_id", "DNSW.ZJSMBS.SMCJ.INSERTSMCJXXBYJHJ");
            map.put("tran_seq", EjbJ3Util.getUUID());
            Date date = new Date();
            map.put("tran_date", HstDateUtil.toDateString(date, "yyyyMMdd"));
            map.put("tran_time", HstDateUtil.toDateString(date, "HHmmssSSS"));
            map.put("sjry", this.getSjry(request));
            map.put("sjjg", this.getSjjg(request));
            map.put("ywbw", xml.toString());
            Gt3ServiceDomain domain = this.doGt3Ejb(map);
            if (domain == null) {
                response.setCode("01");
                response.setMess("\u89e3\u6790\u5bf9\u8c61\u4e3a\u7a7a\uff0c\u8bf7\u60a8\u8054\u7cfb\u6709\u5173\u4eba\u5458!");
                return response;
            }
            if (!"0".equals(domain.getHead().getRtn_code()) || !"000".equals(domain.getHead().getRtn_msg().getCode())) {
                response.setCode("01");
                response.setMess("\u91d1\u4e09\u9519\u8bef\u8fd4\u56de\uff1aMessage[" + domain.getHead().getRtn_msg().getMessage() + "]Reason[" + domain.getHead().getRtn_msg().getReason() + "]");
                _logger.error((Object)("\u91d1\u4e09\u9519\u8bef\u8fd4\u56de\uff1aMessage[" + domain.getHead().getRtn_msg().getMessage() + "]Reason[" + domain.getHead().getRtn_msg().getReason() + "]"));
                return response;
            }
            String resStr = domain.getBody();
            HashMap<String, Class> mapClass = new HashMap<String, Class>();
            mapClass.put("taxML", Zjsmbs00007ResponseDomain.class);
            XmlHelper help = new XmlHelper("taxML", mapClass);
            Zjsmbs00007ResponseDomain dj = (Zjsmbs00007ResponseDomain)help.xmlStrParser(resStr);
            BeanUtils.copyProperties((Object)response, (Object)dj);
            response.setCode("00");
        }
        catch (Exception e) {
            e.getStackTrace();
            _logger.error((Object)e.getMessage());
            response.setCode("01");
            response.setMess(e.getMessage());
        }
        return response;
    }

    private TaxCommonReturnDomain doUpdateGt3Jhxx(Zjsmbs00009RequestDomain request) throws Exception {
        Zjsmbs00009ResponseDomain response = new Zjsmbs00009ResponseDomain();
        try {
            response.setCode("00");
            StringBuffer xml = new StringBuffer();
            xml.append("<?xml version=\"1.0\" encoding=\"UTF-8\"?>").append("<taxML xsi:type=\"ZJSMBS00009Request\" xmlbh=\"String\" bbh=\"String\" xmlmc=\"String\" xsi:schemaLocation=\"http://www.chinatax.gov.cn/dataspec/ TaxMLBw_ZJSMBS_00009_Request_V1.0.xsd\" xmlns=\"http://www.chinatax.gov.cn/dataspec/\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">").append("<jkyzuuid>").append(request.getJkyzuuid()).append("</jkyzuuid>").append("<sfzjhm>").append(request.getSfzjhm()).append("</sfzjhm>").append("<sfzjlxDm>").append(request.getSfzjlxDm()).append("</sfzjlxDm>").append("<wbsbbs>").append(request.getWbsbbs()).append("</wbsbbs>").append("<wbsbkl>").append(request.getWbsbkl()).append("</wbsbkl>").append("</taxML>");
            HashMap<String, String> map = new HashMap<String, String>();
            map.put("tran_id", "DNSW.ZJSMBS.SMBS.UPDATEJHJYZXX");
            map.put("tran_seq", EjbJ3Util.getUUID());
            Date date = new Date();
            map.put("tran_date", HstDateUtil.toDateString(date, "yyyyMMdd"));
            map.put("tran_time", HstDateUtil.toDateString(date, "HHmmssSSS"));
            map.put("sjry", this.getSjry(request));
            map.put("sjjg", this.getSjjg(request));
            map.put("ywbw", xml.toString());
            Gt3ServiceDomain domain = this.doGt3Ejb(map);
            if (domain == null) {
                response.setCode("01");
                response.setMess("\u89e3\u6790\u5bf9\u8c61\u4e3a\u7a7a\uff0c\u8bf7\u60a8\u8054\u7cfb\u6709\u5173\u4eba\u5458!");
                return response;
            }
            if (!"0".equals(domain.getHead().getRtn_code()) || !"000".equals(domain.getHead().getRtn_msg().getCode())) {
                response.setCode("01");
                response.setMess("\u91d1\u4e09\u9519\u8bef\u8fd4\u56de\uff1aMessage[" + domain.getHead().getRtn_msg().getMessage() + "]Reason[" + domain.getHead().getRtn_msg().getReason() + "]");
                return response;
            }
            String resStr = domain.getBody();
            HashMap<String, Class> mapClass = new HashMap<String, Class>();
            mapClass.put("taxML", Zjsmbs00009ResponseDomain.class);
            XmlHelper help = new XmlHelper("taxML", mapClass);
            Zjsmbs00009ResponseDomain dj = (Zjsmbs00009ResponseDomain)help.xmlStrParser(resStr);
            BeanUtils.copyProperties((Object)response, (Object)dj);
            response.setCode("00");
        }
        catch (Exception e) {
            e.getStackTrace();
            _logger.error((Object)e.getMessage());
            throw new Exception(e);
        }
        return response;
    }

    private TaxCommonReturnDomain querySmcjxxAndQxqcxx(Zjsmbs00006RequestDomain request) throws Exception {
        Zjsmbs00006ResponseDomain response = new Zjsmbs00006ResponseDomain();
        try {
            response.setCode("00");
            StringBuffer xml = new StringBuffer();
            xml.append("<?xml version=\"1.0\" encoding=\"UTF-8\"?>").append("<taxML xsi:type=\"ZJSMBS00006Request\" xmlbh=\"String\" bbh=\"String\" xmlmc=\"String\" xsi:schemaLocation=\"http://www.chinatax.gov.cn/dataspec/ TaxMLBw_ZJSMBS_00006_Request_V1.0.xsd\" xmlns=\"http://www.chinatax.gov.cn/dataspec/\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">").append("<sfzjhm>").append(request.getSfzjhm()).append("</sfzjhm>").append("<sfzjlxDm>").append(request.getSfzjlxDm()).append("</sfzjlxDm>").append("<cxbz>").append(request.getCxbz()).append("</cxbz>").append("</taxML>");
            HashMap<String, String> map = new HashMap<String, String>();
            map.put("tran_id", "DNSW.ZJSMBS.SMCJ.QUERYSMCJXXANDQYQCXXBYSFZJHM");
            map.put("tran_seq", EjbJ3Util.getUUID());
            Date date = new Date();
            map.put("tran_date", HstDateUtil.toDateString(date, "yyyyMMdd"));
            map.put("tran_time", HstDateUtil.toDateString(date, "HHmmssSSS"));
            map.put("sjry", this.getSjry(request));
            map.put("sjjg", this.getSjjg(request));
            map.put("ywbw", xml.toString());
            Gt3ServiceDomain domain = this.doGt3Ejb(map);
            if (domain == null) {
                response.setCode("01");
                response.setMess("\u89e3\u6790\u5bf9\u8c61\u4e3a\u7a7a\uff0c\u8bf7\u60a8\u8054\u7cfb\u6709\u5173\u4eba\u5458!");
                return response;
            }
            if (!"0".equals(domain.getHead().getRtn_code()) || !"000".equals(domain.getHead().getRtn_msg().getCode())) {
                response.setCode("01");
                response.setMess("\u91d1\u4e09\u9519\u8bef\u8fd4\u56de\uff1aMessage[" + domain.getHead().getRtn_msg().getMessage() + "]Reason[" + domain.getHead().getRtn_msg().getReason() + "]");
                return response;
            }
            String resStr = domain.getBody();
            HashMap<String, Class> mapClass = new HashMap<String, Class>();
            mapClass.put("taxML", Zjsmbs00006ResponseDomain.class);
            mapClass.put("smcjxxVO", Zjsmbs00006SmcjxxVO.class);
            mapClass.put("zgzsxxGrid", Zjsmbs00006ZgzsxxGrid.class);
            mapClass.put("qyqcxxGrid", Zjsmbs00006QyqcxxGrid.class);
            mapClass.put("zgzsxxVO", Zjsmbs00006ZgzsxxVO.class);
            mapClass.put("qyqcxxVO", Zjsmbs00006QyqcxxVO.class);
            XmlHelper help = new XmlHelper("taxML", mapClass);
            Zjsmbs00006ResponseDomain dj = (Zjsmbs00006ResponseDomain)help.xmlStrParser(resStr);
            BeanUtils.copyProperties((Object)response, (Object)dj);
            response.setCode("00");
        }
        catch (Exception e) {
            e.getStackTrace();
            _logger.error((Object)e.getMessage());
            throw new Exception(e);
        }
        return response;
    }

    private TaxCommonReturnDomain queryYjxxForBsr(Zjsmbs00011RequestDomain request) throws Exception {
        Zjsmbs00011ResponseDomain response = new Zjsmbs00011ResponseDomain();
        try {
            response.setCode("00");
            StringBuffer xml = new StringBuffer();
            xml.append("<?xml version=\"1.0\" encoding=\"UTF-8\"?>").append("<taxML xsi:type=\"ZJSMBS00011Request\" xmlbh=\"String\" bbh=\"String\" xmlmc=\"String\" xsi:schemaLocation=\"http://www.chinatax.gov.cn/dataspec/ TaxMLBw_ZJSMBS_00011_Request_V1.0.xsd\" xmlns=\"http://www.chinatax.gov.cn/dataspec/\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">").append("<sfzjhm>").append(request.getSfzjhm()).append("</sfzjhm>").append("<sfzjlxDm>").append(request.getSfzjlxDm()).append("</sfzjlxDm>").append("<smbsYjfsDm>").append(request.getSmbsYjfsDm()).append("</smbsYjfsDm>").append("</taxML>");
            HashMap<String, String> map = new HashMap<String, String>();
            map.put("tran_id", "DNSW.ZJSMBS.YJGL.QUERYYJXXFORBSR");
            map.put("tran_seq", EjbJ3Util.getUUID());
            Date date = new Date();
            map.put("tran_date", HstDateUtil.toDateString(date, "yyyyMMdd"));
            map.put("tran_time", HstDateUtil.toDateString(date, "HHmmssSSS"));
            map.put("sjry", this.getSjry(request));
            map.put("sjjg", this.getSjjg(request));
            map.put("ywbw", xml.toString());
            Gt3ServiceDomain domain = this.doGt3Ejb(map);
            if (domain == null) {
                response.setCode("01");
                response.setMess("\u89e3\u6790\u5bf9\u8c61\u4e3a\u7a7a\uff0c\u8bf7\u60a8\u8054\u7cfb\u6709\u5173\u4eba\u5458!");
                return response;
            }
            if (!"0".equals(domain.getHead().getRtn_code()) || !"000".equals(domain.getHead().getRtn_msg().getCode())) {
                response.setCode("01");
                response.setMess("\u91d1\u4e09\u9519\u8bef\u8fd4\u56de\uff1aMessage[" + domain.getHead().getRtn_msg().getMessage() + "]Reason[" + domain.getHead().getRtn_msg().getReason() + "]");
                return response;
            }
            String resStr = domain.getBody();
            HashMap<String, Class> mapClass = new HashMap<String, Class>();
            mapClass.put("taxML", Zjsmbs00011ResponseDomain.class);
            mapClass.put("GlqyxxGrid", Zjsmbs00011GlqyxxGrid.class);
            mapClass.put("YjxxGrid", Zjsmbs00011YjxxGrid.class);
            mapClass.put("GlqyxxGridlb", Zjsmbs00011GlqyxxGridlb.class);
            mapClass.put("YjxxGridlb", Zjsmbs00011YjxxGridlb.class);
            XmlHelper help = new XmlHelper("taxML", mapClass);
            Zjsmbs00011ResponseDomain dj = (Zjsmbs00011ResponseDomain)help.xmlStrParser(resStr);
            BeanUtils.copyProperties((Object)response, (Object)dj);
            response.setCode("00");
        }
        catch (Exception e) {
            e.getStackTrace();
            _logger.error((Object)e.getMessage());
            throw new Exception(e);
        }
        return response;
    }

    private TaxCommonReturnDomain queryYjxxForNsr(Zjsmbs00012RequestDomain request) throws Exception {
        Zjsmbs00012ResponseDomain response = new Zjsmbs00012ResponseDomain();
        try {
            response.setCode("00");
            StringBuffer xml = new StringBuffer();
            xml.append("<?xml version=\"1.0\" encoding=\"UTF-8\"?>").append("<taxML xsi:type=\"ZJSMBS00012Request\" xmlbh=\"String\" bbh=\"String\" xmlmc=\"String\" xsi:schemaLocation=\"http://www.chinatax.gov.cn/dataspec/ TaxMLBw_ZJSMBS_00012_Request_V1.0.xsd\" xmlns=\"http://www.chinatax.gov.cn/dataspec/\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">").append("<djxh>").append(request.getDjxh()).append("</djxh>").append("<smbsYjfsDm>30</smbsYjfsDm>").append("</taxML>");
            HashMap<String, String> map = new HashMap<String, String>();
            map.put("tran_id", "DNSW.ZJSMBS.YJGL.QUERYYJXXFORNSR");
            map.put("tran_seq", EjbJ3Util.getUUID());
            Date date = new Date();
            map.put("tran_date", HstDateUtil.toDateString(date, "yyyyMMdd"));
            map.put("tran_time", HstDateUtil.toDateString(date, "HHmmssSSS"));
            map.put("sjry", this.getSjry(request));
            map.put("sjjg", this.getSjjg(request));
            map.put("ywbw", xml.toString());
            Gt3ServiceDomain domain = this.doGt3Ejb(map);
            if (domain == null) {
                response.setCode("01");
                response.setMess("\u89e3\u6790\u5bf9\u8c61\u4e3a\u7a7a\uff0c\u8bf7\u60a8\u8054\u7cfb\u6709\u5173\u4eba\u5458!");
                return response;
            }
            if ("0".equals(domain.getHead().getRtn_code()) && "000".equals(domain.getHead().getRtn_msg().getCode())) {
                String resStr = domain.getBody();
                HashMap<String, Class> mapClass = new HashMap<String, Class>();
                mapClass.put("taxML", Zjsmbs00012ResponseDomain.class);
                mapClass.put("YjxxGrid", Zjsmbs00012YjxxGrid.class);
                mapClass.put("YjxxGridlb", Zjsmbs00012YjxxGridlb.class);
                XmlHelper help = new XmlHelper("taxML", mapClass);
                Zjsmbs00012ResponseDomain dj = (Zjsmbs00012ResponseDomain)help.xmlStrParser(resStr);
                if (dj != null) {
                    BeanUtils.copyProperties((Object)response, (Object)dj);
                }
            } else {
                response.setCode("01");
                response.setMess("\u91d1\u4e09\u9519\u8bef\u8fd4\u56de\uff1aMessage[" + domain.getHead().getRtn_msg().getMessage() + "]Reason[" + domain.getHead().getRtn_msg().getReason() + "]");
                _logger.error((Object)("\u91d1\u4e09\u9519\u8bef\u8fd4\u56de\uff1aMessage[" + domain.getHead().getRtn_msg().getMessage() + "]Reason[" + domain.getHead().getRtn_msg().getReason() + "]"));
                return response;
            }
            response.setCode("00");
        }
        catch (Exception e) {
            e.getStackTrace();
            _logger.error((Object)e.getMessage());
            throw new Exception(e);
        }
        return response;
    }

    public String getSjry(BaseGt3ServiceDomain request) {
        return HstToolsUtil.isNullOrEmpty(request.getSjry()) ? WebConstants.GT3_SHHBSPT_SJRY : request.getSjry();
    }

    public String getSjjg(BaseGt3ServiceDomain request) {
        return HstToolsUtil.isNullOrEmpty(request.getSjjg()) ? WebConstants.GT3_SHHBSPT_SJJG : request.getSjjg();
    }

    public Gt3ServiceDomain doGt3Ejb(Map<String, String> map) throws Exception {
        XtGt3SmbsLogDomain gt3LogDomain = null;
        Gt3ServiceDomain domain = null;
        long start = 0L;
        try {
            EjbJ3Util ejb = new EjbJ3Util();
            String requestXml = ejb.creatEjbXml(map);
            if ("Y".equals(WebConstants.GT3_LOG)) {
                gt3LogDomain = new XtGt3SmbsLogDomain();
                gt3LogDomain.setTranId(map.get("tran_id"));
                gt3LogDomain.setReqData(requestXml);
                gt3LogDomain.setBsdtDjxh(WebConstants.SMZ_RXBD_BSDT_DJXH);
                gt3LogDomain.setSwjgDm(WebConstants.SMZ_RXBD_SWJG_DM);
                this.saveGt3Log(gt3LogDomain);
            }
            _logger.debug((Object)("tran_id[" + map.get("tran_id") + "]tran_seq[" + map.get("tran_seq") + "]\u8bf7\u6c42\u62a5\u6587[" + requestXml + "]"));
            start = System.currentTimeMillis();
            String strResult = ejb.doCommService(requestXml);
            _logger.debug((Object)("tran_id[" + map.get("tran_id") + "]tran_seq[" + map.get("tran_seq") + "]\u8fd4\u56de\u62a5\u6587[" + strResult + "]"));
            if (HstToolsUtil.isNullOrEmpty(strResult)) {
                Gt3ServiceDomain gt3ServiceDomain = domain;
                return gt3ServiceDomain;
            }
            if (strResult.startsWith("<ns0:service")) {
                domain = new Gt3ServiceDomain();
                domain.getHead().setRtn_code("9999");
                domain.getHead().getRtn_msg().setMessage("\u89e3\u6790\u8fd4\u56de\u62a5\u6587\u4e2d\u5305\u542b\u5df2<ns0:service\u5f00\u5934\uff0c\u8be6\u7ec6\u89c1\u65e5\u5fd7\u6216\u8005\u6570\u636e\u8868XT_GT3_LOG");
                _logger.error((Object)("tran_id[" + map.get("tran_id") + "]tran_seq[" + map.get("tran_seq") + "]\u8fd4\u56de\u9519\u8bef\u62a5\u6587[" + strResult + "]"));
                if ("Y".equals(WebConstants.GT3_LOG)) {
                    gt3LogDomain.setClbz("1");
                    if (strResult.length() > 2000) {
                        gt3LogDomain.setErrMess(strResult.substring(0, 1999));
                    } else {
                        gt3LogDomain.setErrMess(strResult);
                    }
                }
                Gt3ServiceDomain gt3ServiceDomain = domain;
                return gt3ServiceDomain;
            }
            try {
                domain = TaxWxSmzAppCommonServiceImp.parseJsbw(strResult);
            }
            catch (Exception e) {
                e.getStackTrace();
                _logger.error((Object)e.getMessage());
                if ("Y".equals(WebConstants.GT3_LOG)) {
                    gt3LogDomain.setClbz("9");
                    if (e.toString().length() > 2000) {
                        gt3LogDomain.setErrMess(e.toString().substring(0, 1999));
                    } else {
                        gt3LogDomain.setErrMess(e.toString());
                    }
                }
                throw new Exception(e);
            }
        }
        finally {
            if ("Y".equals(WebConstants.GT3_LOG)) {
                long end = System.currentTimeMillis();
                if (domain != null && !"9999".equals(domain.getHead().getRtn_code())) {
                    gt3LogDomain.setClbz("1");
                    gt3LogDomain.setResData(domain.getBody());
                    gt3LogDomain.setResCode(String.valueOf(domain.getHead().getRtn_code()) + domain.getHead().getRtn_msg().getCode());
                    gt3LogDomain.setResMess(String.valueOf(domain.getHead().getRtn_msg().getMessage()) + domain.getHead().getRtn_msg().getReason());
                }
                gt3LogDomain.setTimeUsed(end - start);
                this.updateGt3Log(gt3LogDomain);
            }
        }
        return domain;
    }

    public static Gt3ServiceDomain parseJsbw(String strResult) {
        HashMap<String, Class> mapClass = new HashMap<String, Class>();
        mapClass.put("head", Gt3HeadDomain.class);
        mapClass.put("rtn_msg", Gt3RtnMsgDomain.class);
        Gt3ServiceDomain domain = XmlUtil.xmlStrToBean(strResult, Gt3ServiceDomain.class, "service", mapClass);
        return domain;
    }

    public static void main(String[] args) throws Exception {
        StringBuffer xml = new StringBuffer();
        try {
            String encoding = "UTF-8";
            File file = new File("D:\\head\\1.txt");
            if (file.isFile() && file.exists()) {
                InputStreamReader read = new InputStreamReader((InputStream)new FileInputStream(file), encoding);
                BufferedReader bufferedReader = new BufferedReader(read);
                String lineTxt = null;
                while ((lineTxt = bufferedReader.readLine()) != null) {
                    xml.append(lineTxt);
                }
                read.close();
            } else {
                System.out.println("\u627e\u4e0d\u5230\u6307\u5b9a\u7684\u6587\u4ef6");
            }
        }
        catch (Exception e) {
            System.out.println("\u8bfb\u53d6\u6587\u4ef6\u5185\u5bb9\u51fa\u9519");
            e.printStackTrace();
        }
        Gt3ServiceDomain domain = TaxWxSmzAppCommonServiceImp.parseJsbw(xml.toString());
        String resStr = domain.getBody();
        HashMap<String, Class> mapClass = new HashMap<String, Class>();
        mapClass.put("taxML", Zjsmbs00011ResponseDomain.class);
        mapClass.put("GlqyxxGrid", Zjsmbs00011GlqyxxGrid.class);
        mapClass.put("YjxxGrid", Zjsmbs00011YjxxGrid.class);
        mapClass.put("GlqyxxGridlb", Zjsmbs00011GlqyxxGridlb.class);
        mapClass.put("YjxxGridlb", Zjsmbs00011YjxxGridlb.class);
        XmlHelper help = new XmlHelper("taxML", mapClass);
        Zjsmbs00011ResponseDomain dj = (Zjsmbs00011ResponseDomain)help.xmlStrParser(resStr);
        if ("1".equals(dj.getReturncode())) {
            new StringBuffer();
            ArrayList<JhxtGetBdNsrxxDomain> dataList = new ArrayList<JhxtGetBdNsrxxDomain>();
            for (Zjsmbs00011GlqyxxGridlb qybo : dj.getGlqyxxGrid().getZgzsxxVO()) {
                JhxtGetBdNsrxxDomain tmp;
                Zjsmbs00012RequestDomain yjxxReq = new Zjsmbs00012RequestDomain();
                yjxxReq.setDjxh(qybo.getDjxh());
                yjxxReq.setSmbsYjfsDm("30");
                StringBuffer xml2 = new StringBuffer();
                try {
                    String encoding = "UTF-8";
                    File file2 = new File("D:\\head\\2.txt");
                    if (file2.isFile() && file2.exists()) {
                        InputStreamReader read = new InputStreamReader((InputStream)new FileInputStream(file2), encoding);
                        BufferedReader bufferedReader = new BufferedReader(read);
                        String lineTxt = null;
                        while ((lineTxt = bufferedReader.readLine()) != null) {
                            xml2.append(lineTxt);
                        }
                        read.close();
                    } else {
                        System.out.println("\u627e\u4e0d\u5230\u6307\u5b9a\u7684\u6587\u4ef6");
                    }
                }
                catch (Exception e) {
                    System.out.println("\u8bfb\u53d6\u6587\u4ef6\u5185\u5bb9\u51fa\u9519");
                    e.printStackTrace();
                }
                Gt3ServiceDomain domain2 = TaxWxSmzAppCommonServiceImp.parseJsbw(xml2.toString());
                String resStr2 = domain2.getBody();
                HashMap<String, Class> mapClas2 = new HashMap<String, Class>();
                mapClass.put("taxML", Zjsmbs00012ResponseDomain.class);
                mapClass.put("YjxxGrid", Zjsmbs00012YjxxGrid.class);
                mapClass.put("YjxxGridlb", Zjsmbs00012YjxxGridlb.class);
                XmlHelper help2 = new XmlHelper("taxML", mapClas2);
                Zjsmbs00012ResponseDomain response = new Zjsmbs00012ResponseDomain();
                Zjsmbs00012ResponseDomain yjxxRes = (Zjsmbs00012ResponseDomain)help2.xmlStrParser(resStr2);
                BeanUtils.copyProperties((Object)response, (Object)yjxxRes);
                response.setCode("00");
                if (yjxxRes != null && yjxxRes.getYjxxGrid() != null) {
                    for (Zjsmbs00012YjxxGridlb yjxx : yjxxRes.getYjxxGrid().getYjxxGridlb()) {
                        tmp = new JhxtGetBdNsrxxDomain();
                        tmp.setNsrmc(qybo.getNsrmc());
                        tmp.setNsrsbh(qybo.getNsrsbh());
                        tmp.setTsyjbz("1");
                        tmp.setTsyjnr(yjxx.getYjnr());
                        dataList.add(tmp);
                    }
                    continue;
                }
                tmp = new JhxtGetBdNsrxxDomain();
                tmp.setNsrmc(qybo.getNsrmc());
                tmp.setNsrsbh(qybo.getNsrsbh());
                tmp.setTsyjbz("0");
                dataList.add(tmp);
            }
            System.out.println(dataList.size());
        }
        System.out.println(1);
    }

    @Transactional(readOnly=false, propagation=Propagation.REQUIRED)
    public void saveGt3Log(XtGt3SmbsLogDomain logDomain) throws Exception {
        logDomain.setReqTime(HstDateUtil.getYyyyMmddHhMmSs(HstDateUtil.toDateString(new Date(), AppServiceConstants.TIME_DATETIME_FORMAT)));
        logDomain.setClbz("0");
        try {
            ((TaxLogDaoImp)this.getDao("taxLogDaoImp")).saveGt3SmbzLogDomain(logDomain);
        }
        catch (Exception e) {
            _logger.error((Object)e.getMessage());
        }
    }

    @Transactional(readOnly=false, propagation=Propagation.REQUIRED)
    public void updateGt3Log(XtGt3SmbsLogDomain logDomain) throws Exception {
        if (logDomain == null) {
            return;
        }
        logDomain.setResTime(HstDateUtil.getYyyyMmddHhMmSs(HstDateUtil.toDateString(new Date(), AppServiceConstants.TIME_DATETIME_FORMAT)));
        try {
            ((TaxLogDaoImp)this.getDao("taxLogDaoImp")).saveGt3SmbzLogDomain(logDomain);
        }
        catch (Exception e) {
            _logger.error((Object)e.getMessage());
        }
    }

    @Transactional(readOnly=false, propagation=Propagation.REQUIRED)
    public void saveSmzRxbdLog(Zjsmbs00001RequestDomain requestDomain, Zjsmbs00001ResponseDomain responseDomain) throws Exception {
        XtGt3SmbsRxbdLog bo = new XtGt3SmbsRxbdLog();
        if (!"00".equals(responseDomain.getCode())) {
            bo.setCgbz("N");
            bo.setReturnmessage(responseDomain.getMess());
            bo.setSfzhm(requestDomain.getSfzjhm());
            bo.setSwjgDm(WebConstants.SMZ_RXBD_SWJG_DM);
            bo.setBsdtDjxh(WebConstants.SMZ_RXBD_BSDT_DJXH);
        } else {
            BeanUtils.copyProperties((Object)bo, (Object)responseDomain);
            bo.setSfzhm(requestDomain.getSfzjhm());
            bo.setSwjgDm(WebConstants.SMZ_RXBD_SWJG_DM);
            bo.setBsdtDjxh(WebConstants.SMZ_RXBD_BSDT_DJXH);
        }
        try {
            ((TaxLogDaoImp)this.getDao("taxLogDaoImp")).saveSmzRxbdLog(bo);
        }
        catch (Exception e) {
            _logger.error((Object)e.getMessage());
        }
    }

    @Transactional(readOnly=false, propagation=Propagation.REQUIRED)
    public void saveSmzSmcjLog(Zjsmbs00007RequestDomain requestDomain, Zjsmbs00007ResponseDomain responseDomain, SmzBsySxsfzBdjl bdxx) throws Exception {
        XtGt3SmbsSmcjLog bo = new XtGt3SmbsSmcjLog();
        if (!"00".equals(responseDomain.getCode())) {
            bo.setCgbz("N");
            bo.setReturnmessage(responseDomain.getMess());
            bo.setSfzhm(bdxx.getSfzhm());
            bo.setSwjgDm(WebConstants.SMZ_RXBD_SWJG_DM);
            bo.setBsdtDjxh(WebConstants.SMZ_RXBD_BSDT_DJXH);
            bo.setQhhm(bdxx.getQhhm());
            bo.setQhsj(bdxx.getQhsj());
        } else {
            BeanUtils.copyProperties((Object)bo, (Object)responseDomain);
            bo.setSwjgDm(WebConstants.SMZ_RXBD_SWJG_DM);
            bo.setBsdtDjxh(WebConstants.SMZ_RXBD_BSDT_DJXH);
            bo.setSfzhm(bdxx.getSfzhm());
            bo.setQhhm(bdxx.getQhhm());
            bo.setQhsj(bdxx.getQhsj());
        }
        try {
            ((TaxLogDaoImp)this.getDao("taxLogDaoImp")).saveSmzSmcjLog(bo);
        }
        catch (Exception e) {
            _logger.error((Object)e.getMessage());
        }
    }

    private String convertRq(String yyyymmmdd) {
        String rq = "";
        if (StringUtils.isBlank((String)yyyymmmdd)) {
            return rq;
        }
        rq = StringUtils.isNumeric((String)yyyymmmdd) ? String.valueOf(yyyymmmdd.substring(0, 4)) + "-" + yyyymmmdd.substring(4, 6) + "-" + yyyymmmdd.substring(6, 8) : "9999-12-31";
        return rq;
    }

    public String getNullStr(String str) {
        if (HstToolsUtil.isNullOrEmpty(str)) {
            return "";
        }
        return str;
    }
}
