증가, 보존 전 존재 여부 판단

9185 단어 판단
function submitpage(result)//result 1:  2: 

    {    

        //     

        var isSubmit =checkvalidate();

        //

        if(isSubmit)

           {

               $.ajax({

                   type:"POST",

                   async:false,

                   url:"checkXgBjlxmc.action",

                   data:$("#form1").serialize(),

                   success:function(data)

                   {

                       if(data!="" && data!=null)

                       {

                           hiAlert(data, " ");

                       }       

                       else

                       {

                           if(result=="1")

                           {

                               $.ajax({

                                     type:"POST",

                                     async: false,

                                    url:"addXgBjlx.action",

                                    data:$("#form1").serialize(),

                                    success:function()

                                    {

                                        setTimeout("parent.tb_remove(1);parent.ts()",0);

                                    }    

                             });     

                           }

                           else

                           {                   

                               $.ajax({

                                 type:"POST",

                                 async: false,

                                url:"addXgBjlx.action",

                                data:$("#form1").serialize(),

                                success:function()

                                {                        

                                    document.getElementsByTagName('form')[0].reset();    

                                    asyncbox.tips(' !','success',500);

                                }    

                             });

                           }

                       }

                   }

               })

                       

           }

    }
/**

     * <p> : </p>

     * @author  

     * @date Jul 26, 2012

     * @param 

     * @return void

     */

    public void checkXgBjlxmc() throws Exception

    {

        HashMap map = new HashMap();

        // 

        if(xgBjlx.getBjlxmc() != null) {

            map.put("bjlxmc", xgBjlx.getBjlxmc().trim());

        }

        map.put("schoolid", getSchoolId());

        

        HashMap bjlxMap = new HashMap();

        // 

        if(xgBjlx.getBjlxbm() != null) {

            bjlxMap.put("bjlxbm", xgBjlx.getBjlxbm().trim());

        }

        bjlxMap.put("schoolid", getSchoolId());

        

        int count = 0;

        int result = 0;

        count = xgBjlxService.checkXgBjlxmc(map);

        result = xgBjlxService.checkXgBjlxbm(bjlxMap);

        if(count > 0)

        {

            responseTxt(" , !");

        }

        if(result > 0)

        {

            responseTxt(" , !");

        }

    }

 
/**

     * <p> : </p>

     * @author  

     * @date Aug 25, 2012

     * @param 

     * @return void

     */

    public void  isSameLxdh()throws Exception{

        // 

        String lxdh = request.getParameter("lxdh").trim();

        // id

        String jgid = request.getParameter("jgid");

        //

        if(!lxdh.equals("")) {

            List<HashMap> list = new ArrayList();

            // 

            list = rsEmployeeService.isSameLxdh(lxdh);

            

            if(list != null){

                for(int i = 0; i < list.size(); i++)

                {

                    // 

                    if(!list.get(i).get("JG_ID").equals(jgid))

                    {

                        responseTxt(" , , ");

                    }

                }

            }

        } else {

            sysLoginpersonService.modifyYzmByJgid(jgid);

            responseTxt("  1234");

        }

    }

좋은 웹페이지 즐겨찾기