From 5694bb030cdfa848f5f157f8fd546ef511e0aa81 Mon Sep 17 00:00:00 2001 From: Administrator <hbal> Date: 星期三, 15 二月 2023 17:43:44 +0800 Subject: [PATCH] 内贸判断必须有单位 --- JavaSource/com/mandi/fendan/service/impl/ErpService.java | 43 +++------------------ JavaSource/com/mandi/fendan/service/impl/Fd_BsheetService.java | 27 +++---------- 2 files changed, 12 insertions(+), 58 deletions(-) diff --git a/JavaSource/com/mandi/fendan/service/impl/ErpService.java b/JavaSource/com/mandi/fendan/service/impl/ErpService.java index cf311e3..2394b3d 100644 --- a/JavaSource/com/mandi/fendan/service/impl/ErpService.java +++ b/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 @@ //褰撳墠鐢ㄦ埛鍙兘鐪嬪埌鍙互鎿嶄綔鐨勬彁鍗� 涓嶅彲浠ユ搷浣滅殑鎻愬崟鐪嬩笉鍒� //鎵�鏈変互涓媏lse鎿嶄綔鍘绘帀 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()); } } diff --git a/JavaSource/com/mandi/fendan/service/impl/Fd_BsheetService.java b/JavaSource/com/mandi/fendan/service/impl/Fd_BsheetService.java index c9a715c..0d6610a 100644 --- a/JavaSource/com/mandi/fendan/service/impl/Fd_BsheetService.java +++ b/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="";//鏄惁鑷彁 -- Gitblit v1.9.3