Administrator
2023-02-15 5694bb030cdfa848f5f157f8fd546ef511e0aa81
内贸判断必须有单位
已修改2个文件
70 ■■■■ 文件已修改
JavaSource/com/mandi/fendan/service/impl/ErpService.java 43 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
JavaSource/com/mandi/fendan/service/impl/Fd_BsheetService.java 27 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
JavaSource/com/mandi/fendan/service/impl/ErpService.java
@@ -1114,7 +1114,7 @@
            String tdNo = tdje.getAsString();
            if (StringUtils.isNotBlank(tdNo)) {
                Fd_XSTD td = this.tdper.getbyTDBH(tdNo);
                if (td == null || td.getTd_wfdsl()<=0 ) {  //|| td.isTd_zcwcbz()  装车完成标志  不需要了
                if (td == null || td.getTd_wfdsl()<=0 ) {
                    continue;
                }
@@ -1123,45 +1123,13 @@
                //当前用户只能看到可以操作的提单  不可以操作的提单看不到
                //所有以下else操作去掉
                if (StringUtils.isBlank(bsDE)) {
                    /*bsDE = td.getTd_cqNo().equals(Contants.nc_ywdy_ZZ) ? Contants.zzSdepartNo :
                            td.getTd_cqNo().equals(Contants.nc_ywdy_MS)? Contants.msSdepartNo :
                            td.getTd_cqNo().equals(Contants.nc_ywdy_YR)? Contants.yrSdepartNo :
                                    Contants.kjSdepartNo;*/
                    bsDE = ConvertTool.ncCovertToYkt(td.getTd_cqNo());
                }
//                else {
//                    // 郑州
//                    if (bsDE.equals(Contants.zzSdepartNo)) {
//                        if (!td.getTd_ywdybh().equals(Contants.nc_ywdy_ZZ)) {
//                            orr.setCode(1);
//                            orr.setErrmsg("提单:"+td.getTd_ywdybh()+"不是郑州厂区的提单,不能同时配单!");
//                            return orr;
//                        }
//                    } else if(bsDE.equals(Contants.msSdepartNo)) {
//                        if (!td.getTd_ywdybh().equals(Contants.nc_ywdy_MS)) {
//                            orr.setCode(1);
//                            orr.setErrmsg("提单:"+td.getTd_ywdybh()+"不是明晟厂区的提单,不能同时配单!");
//                            return orr;
//                        }
//                    }else {
//                        if (!td.getTd_ywdybh().equals(Contants.nc_ywdy_KJ)) {
//                            orr.setCode(1);
//                            orr.setErrmsg("提单:"+td.getTd_ywdybh()+"不是明晟厂区的提单,不能同时配单!");
//                            return orr;
//                        }
//                    }
//                }
                if (StringUtils.isBlank(ziti)) {
                    ziti = td.getTd_ztbz() == 2 ? "自提" : "非自提";
                }
                if (StringUtils.isBlank(Rcompany)) {
                    Map<String, Object> mm = this.dqper.getKH(td.getTd_khbh());
                    if(mm == null || mm.size() == 0) { // 客户必须存在,否则无法分单
                        orr.setCode(1);
                        orr.setErrmsg("该提单客户不存在,请检查数据!");
                        return orr;
                    }
                    //
                    /*
                    * 1、外贸有发票编号,内贸没有发票编号
                    * 2、内贸取实际公司名称,外贸取相应组织的公司简称+‘报关’
@@ -1170,11 +1138,12 @@
                        if (mm != null) {
                            Rcompany = mm.get("name") == null ? "" : mm.get("name").toString();
                        }
                        if(mm == null || mm.size() == 0) { // 客户必须存在,否则无法分单
                            orr.setCode(1);
                            orr.setErrmsg("该提单客户不存在,请检查数据!");
                            return orr;
                        }
                    } else {
                        /*Rcompany = (td.getTd_ywdybh().equals(Contants.nc_ywdy_ZZ)?"郑州报关":
                            td.getTd_ywdybh().equals(Contants.nc_ywdy_MT)?"河南报关":
                                td.getTd_ywdybh().equals(Contants.nc_ywdy_MS)?"明晟报关":
                            "科技报关");*/
                        Rcompany = ConvertTool.covertToCustoms(td.getTd_ywdybh());
                    }
                }
JavaSource/com/mandi/fendan/service/impl/Fd_BsheetService.java
@@ -133,15 +133,6 @@
            orr.setErrmsg("该提单已经分单完成,不能分单!");
            return orr;
        }
        // 判断是否存在客户
        if(StringUtils.isBlank(xstd.getTd_fpbh())){
            Nckh nckh = zsjper.getNckhbyCode(xstd.getTd_khbh());// 客户不存在的特殊情况是不应该存在的,以防万一,加判空。
            if(nckh == null) {
                orr.setCode(1);
                orr.setErrmsg("该提单客户不存在,请检查数据!");
                return orr;
            }
        }
        //送货
        if(xstd.getTd_ztbz()==2){
            if(fdc!=null){
@@ -152,12 +143,6 @@
                }
            }
        }else{
//            Fd_wlgs_fhdq wldq=this.dqper.getbyNos(lg.getDepartno(),xstd.getTd_shddbh(),
            // todo 下面的意义何在????默认查科技???
//                    xstd.getTd_ywdybh().equals(Contants.nc_ywdy_ZZ)?Contants.nc_ywdy_ZZ
//                        :xstd.getTd_ywdybh().equals(Contants.nc_ywdy_MS)?Contants.nc_ywdy_MS
//                        :Contants.nc_ywdy_KJ);
            Fd_wlgs_fhdq wldq = this.dqper.getbyNos(lg.getDepartno(),xstd.getTd_shddbh(), ConvertTool.ncGetDefault(xstd.getTd_ywdybh()));
            int total = fdMxWlgsMapper.selectCountByTdTdls(xstd.getTd_tdls());
            if(wldq==null && total == 0){
@@ -171,11 +156,13 @@
        if(StringUtils.isBlank(xstd.getTd_fpbh())){
            if(mm!=null)
                Rcompany=mm.get("name")==null?"":mm.get("name").toString();
            // 判断是否存在客户
            if(mm == null || mm.size() == 0) { // 客户必须存在,否则无法分单
                orr.setCode(1);
                orr.setErrmsg("该提单客户不存在,请检查数据!");
                return orr;
            }
        }else{
            /*Rcompany=(xstd.getTd_ywdybh().equals(Contants.nc_ywdy_ZZ)?"郑州报关":
                        xstd.getTd_ywdybh().equals(Contants.nc_ywdy_MT)?"河南报关":
                            xstd.getTd_ywdybh().equals(Contants.nc_ywdy_MS)?"明晟报关":
                        "科技报关");*/
            Rcompany = ConvertTool.covertToCustoms(xstd.getTd_ywdybh());
        }
@@ -184,8 +171,6 @@
        List<Fd_XSTDMX> mxl=new ArrayList<Fd_XSTDMX>();
        //是否保存一卡通业务单表头信息
        boolean saveBT=false;
        /*String bsDE=xstd.getTd_cqNo().equals(Contants.nc_ywdy_ZZ) ?
                Contants.zzSdepartNo :xstd.getTd_cqNo().equals(Contants.nc_ywdy_MS)?Contants.msSdepartNo:Contants.kjSdepartNo;*/
        String bsDE = ConvertTool.ncCovertToYkt(xstd.getTd_cqNo());
        String bbsNo="";
        String ziti="";//是否自提