⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rwglrwmxmbean.java

📁 以前做的一个j2ee的项目
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
                        try{
                            tempString = ssglyRes.getSpecialData().
                                         getSpecialString1();
                            if (fl_type.equals("DFHL")) {
                                tempString = tempString + "的待分户类";
                            } else
                            if (fl_type.equals("WDGH")) {
                                tempString = tempString + "的管户";
                            } else
                            if (fl_type.equals("ZXHL")) {
                                tempString = tempString + "的注销户";
                            } else
                            if (fl_type.equals("FZCH")) {
                                tempString = tempString + "的非正常户";
                            } else
                            if (fl_type.equals("YCXL")) {
                                tempString = tempString + "的一次性税源";
                            } else
                            if (fl_type.equals("TYHL")) {
                                tempString = tempString + "的停业户";
                            }
                        }catch (NullPointerException e){
                            LogWritter.sysDebug("找不到纳税人的所属分类");
                            tempString="";
                        }
                        specialData.setSpecialString3(tempString);
                        if (tempString.equals("")){
                            specialData.setSpecialArray1(new ArrayList());
                            return;
                        }
                        //指定移入类
                        tempString=rwmx.getProperty("to");
                        specialData.setSpecialString4(tempString);
                        tempString=jgrydm;
                        //获取移入类的列表
                        if (rwmx.getRwxl_dm().equals("0101")){
                            //对于移入任务,查可选移动对象
                            tempSpecial.setSqlName("getYrdx");
                            tempSpecial.setSpecialString2(tempString.substring(2));
                        }else
                        if (rwmx.getRwxl_dm().equals("0102")){
                            //对于移出任务,查可选移动对象
                            tempSpecial.setSqlName("getYcdx");
                            tempSpecial.setSpecialString2(tempString);
                        }else
                        if (rwmx.getRwxl_dm().equals("0103")){
                            //对于非正常户认定任务,查可选移动对象
                            tempSpecial.setSqlName("getFZCH");
                            tempSpecial.setSpecialString2(tempString);
                        }else
                        if (rwmx.getRwxl_dm().equals("0104")){
                            //对于注销户认定任务,查可选移动对象
                            tempSpecial.setSqlName("getZXHL");
                            tempSpecial.setSpecialString2(tempString);
                        }else
                        if (rwmx.getRwxl_dm().equals("0107")){
                            //对于一次性税源认定任务,查可选移动对象
                            tempSpecial.setSqlName("getYCXL");
                            tempSpecial.setSpecialString2(tempString);
                        }else
                        if (rwmx.getRwxl_dm().equals("0109")){
                            //对于业户停业任务,查可选移动对象
                            tempSpecial.setSqlName("getTYHL");
                            tempSpecial.setSpecialString2(tempString);
                        }else{
                            //对于其他撤销认定的任务,查可选移动对象
                            tempSpecial.setSqlName("getWDGH");
                            tempSpecial.setSpecialString2(tempString);
                        }
                        tempSpecial.setSqlOperation("selectAll");
                        req.setSpecialData(tempSpecial);
                        try {
                            resp = service.invokeTask(req);
                        } catch (Exception e) {
                            e.printStackTrace();
                        }
                        ssglyRes=(RWGLclrwResEvent)resp;
                        ArrayList list=ssglyRes.getSpecialData().getSpecialArray1();
                        ArrayList toList=new ArrayList();
                        toList.add(new SelectItem("","<请指定目标类>"));
                        SJWHzbzVO zbz=new SJWHzbzVO();
                        if (list!=null){
                            for (int i=0;i<list.size();i++){
                                zbz=(SJWHzbzVO)list.get(i);
                                tempString=zbz.getDml_mc().substring(0,4);
                                if (tempString.equals("DFHL")){
                                    toList.add(new SelectItem(zbz.getDml_mc(),
                                            zbz.getMc()+"的待分户类"));
                                }else
                                if (tempString.equals("WDGH")){
                                    toList.add(new SelectItem(zbz.getDml_mc(),
                                            zbz.getMc()+"的管户"));
                                }else
                                if (tempString.equals("ZXHL")){
                                    toList.add(new SelectItem(zbz.getDml_mc(),
                                            zbz.getMc()+"的注销户"));
                                }else
                                if (tempString.equals("FZCH")){
                                    toList.add(new SelectItem(zbz.getDml_mc(),
                                            zbz.getMc()+"的非正常户"));
                                }else
                                if (tempString.equals("YCXL")){
                                    toList.add(new SelectItem(zbz.getDml_mc(),
                                            zbz.getMc()+"的一次性税源"));
                                }else
                                if (tempString.equals("TYHL")){
                                    toList.add(new SelectItem(zbz.getDml_mc(),
                                            zbz.getMc()+"的停业户"));
                                }
                            }
                            specialData.setSpecialArray1(toList);
                        }
                    }
                }
            }
        } else
        if (rwmx.getDealPage().equals("taskDetail.jsf")) {
            //对于其他种类任务,取纳税人列表
            ArrayList result = new ArrayList();
            specialData = new RWGLspecialDataVO();
            RWGLspecialDataVO tempSpecial = new RWGLspecialDataVO();
            SJWHzbzVO zbz;
            BigDecimal nsrnbm;
            //预设代理接口
            RWGLclrwReqEvent req = new RWGLclrwReqEvent();
            req.setDealMethod("getSpecial");
            req.setSwry_dm(swry_dm);
            ISsglyService service = new SsglyDelegate();
            ResponseEvent resp = null;
            RWGLclrwResEvent ssglyRes;
            //检查分类序号
            BigDecimal fl_xh = rwmx.getFl_xh();
            if (fl_xh != null) {
                //如果存在分类序号,则获取分类名称
                specialData.setSpecialNumber2(fl_xh);
                tempSpecial.setSpecialNumber2(fl_xh);
                tempSpecial.setSqlName("getFlmc");
                tempSpecial.setSqlOperation("select");
                req.setSpecialData(tempSpecial);
                //调用代理方法
                try {
                    resp = service.invokeTask(req);
                } catch (Exception e) {
                    e.printStackTrace();
                }
                //处理ResponseEvent
                ssglyRes = (RWGLclrwResEvent) resp;
                if (ssglyRes.getRepCode().equals("0")) {
                    //如果正确获取分类名称,则添加到结果集中
                    zbz = new SJWHzbzVO();
                    zbz.setDml_mc(fl_xh.toString());
                    zbz.setMc(ssglyRes.getSpecialData().getSpecialString2());
                    result.add(zbz);
                }
            }
            //检查纳税人列表
            ArrayList nsrList = rwmx.getNsrList();
            if (nsrList != null || nsrList.size() > 0) {
                for (int i = 0; i < nsrList.size(); i++) {
                    //对每个纳税人进行查询
                    tempSpecial.setSpecialNumber2(new BigDecimal((String)
                            nsrList.get(i)));
                    tempSpecial.setSqlName("getNsrmc");
                    tempSpecial.setSqlOperation("select");
                    req.setSpecialData(tempSpecial);
                    //调用代理方法
                    try {
                        resp = service.invokeTask(req);
                    } catch (Exception e) {
                        e.printStackTrace();
                    }
                    //处理ResponseEvent
                    ssglyRes = (RWGLclrwResEvent) resp;
                    if (ssglyRes.getRepCode().equals("0")) {
                        //如果正确查询出数据,则添加到结果列表中
                        tempSpecial = ssglyRes.getSpecialData();
                        if (tempSpecial.getSpecialString1() != null) {
                            zbz = new SJWHzbzVO();
                            zbz.setDml_mc(tempSpecial.getSpecialString1());
                            zbz.setMc(tempSpecial.getSpecialString2());
                            result.add(zbz);
                        }
                    }
                }
            }
            //将结果集填写到MBean属性中
            specialData.setSpecialArray1(result);
        }
    }

    /**
     * 保存任务描述和任务明细信息
     * @return String
     */
    public String save() {
        //保存之前先处理特殊数据
        this.saveSpecialData();
        RWGLclrwReqEvent req = new RWGLclrwReqEvent();
        req.setDealMethod("save");
        req.setSwry_dm(swry_dm);
        req.setRwmxVO(rwmx);
        //调用代理方法
        ISsglyService service = new SsglyDelegate();
        ResponseEvent resp = null;
        try {
            resp = service.invokeTask(req);
        } catch (Exception e) {
            e.printStackTrace();
        }
        //处理ResponseEvent
        RWGLclrwResEvent ssglyRes = (RWGLclrwResEvent) resp;
        //保存成功之后页面转移,不再读取数据
        //this.getViewObjects(rwxh);
        return "success";
    }

    public void saveSpecialData(){
        if (rwmx.getRwlx_dm().equals("01")){
            //对于分户管理的任务,设置纳税人移动目标类
            rwmx.setProperty("to",specialData.getSpecialString4());
            //如果是业户移入给某个税管员,并且发送对象是主办人,则自动默认移入到当前发送对象的管户
            if (!rwmx.getRwxl_dm().equals("0101")) return;
            String blfs=WebUtil.getParameterFromContextMap("xyLzfs_dm");
            //LogWritter.sysDebug("lzfs="+blfs);
            if (!blfs.equals("04")) return;
            //LogWritter.sysDebug("to="+specialData.getSpecialString4());
            if (!specialData.getSpecialString4().equals("")) return;
            ArrayList list=specialData.getSpecialArray1();
            if (list==null) return;
            String nextRydm=WebUtil.getParameterFromContextMap("fsdxList");
            //LogWritter.sysDebug("next ry="+nextRydm);
            if (nextRydm.equals("0") || nextRydm.equals("")) return;
            for (int i=0;i<list.size();i++){
                SelectItem item=(SelectItem)list.get(i);
                String value=(String)item.getValue();
                //LogWritter.sysDebug("testing "+value);
                if (value==null || value.length()<10) continue;
                if (!value.substring(0,6).equals("WDGH02")) continue;
                if (nextRydm.equals(value.substring(6))){
                    //发现移入列表中有当前发送对象
                    LogWritter.sysDebug("拟将该纳税人移入主办人"+nextRydm+"的管户中");
                    rwmx.setProperty("to",value);
                    return;
                }
            }
        }
    }


    /**
     * 发送任务给下一人,或者办结
     * @return String
     */
    public String send() {
        //保存之前先处理特殊数据
        this.saveSpecialData();
        //检查发送对象
        String nextRydm=WebUtil.getParameterFromContextMap("fsdxList");
        LogWritter.sysDebug("user choose no." + nextRydm);
        if (nextRydm==null || nextRydm.equals("")) nextRydm="0";
        RWGLclrwReqEvent req = new RWGLclrwReqEvent();
        String swjg_mc = (String) WebUtil.eval("#{user.swjgMc}");
        req.setDealMethod("send");
        req.setRw_xh(rwxh);
        req.setSwry_dm(swry_dm);
        req.setRwmxVO(rwmx);
        req.setSms(sms);
        req.setSwjg_mc(swjg_mc);
        String blfs=WebUtil.getParameterFromContextMap("xyLzfs_dm");
        if (blfs==null || blfs.equals("")) return "fail";
        if (!nextRydm.equals("0") ) {
            //选择了某个发送对象
            RWGLfsdxVO fsdx_VO = new RWGLfsdxVO();
            LogWritter.sysDebug("next ry is " + nextRydm);
            fsdx_VO.setSwry_dm(nextRydm);
            fsdx_VO.setLzfs_dm(blfs);
            req.setFsdx( fsdx_VO);
        } else {
            //不选择下一人员时,发送给群组
            LogWritter.sysDebug("user didn't choose next ry, found blfs=" +
                                blfs);
            RWGLfsdxVO fsdx_VO = new RWGLfsdxVO();
            fsdx_VO.setLzfs_dm(blfs);
            fsdx_VO.setSwry_dm(null);
            req.setFsdx(fsdx_VO);
        }
        LogWritter.sysDebug("选择了协办人:"+xbzList);
        req.setXbzList(xbzList);
        //调用代理方法
        ISsglyService service = new SsglyDelegate();
        ResponseEvent resp = null;
        try {
            resp = service.invokeTask(req);
        } catch (Exception e) {
            e.printStackTrace();
        }
        //处理ResponseEvent
        RWGLclrwResEvent ssglyRes = (RWGLclrwResEvent) resp;
        return "success";
    }

    private void jbInit() throws Exception {
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -