From 0620759090646bf58a7e786c55cfe07ce1984e45 Mon Sep 17 00:00:00 2001
From: Administrator <hbal>
Date: 星期五, 31 三月 2023 10:11:23 +0800
Subject: [PATCH] 分单随行人员

---
 JavaSource/com/mandi/fendan/service/impl/Fd_BsheetService.java |   34 +++++++++++++++++++++-------------
 1 files changed, 21 insertions(+), 13 deletions(-)

diff --git a/JavaSource/com/mandi/fendan/service/impl/Fd_BsheetService.java b/JavaSource/com/mandi/fendan/service/impl/Fd_BsheetService.java
index 354ae78..a7eb5c0 100644
--- a/JavaSource/com/mandi/fendan/service/impl/Fd_BsheetService.java
+++ b/JavaSource/com/mandi/fendan/service/impl/Fd_BsheetService.java
@@ -9,9 +9,15 @@
 
 import javax.annotation.Resource;
 
+import com.mandi.basicconfig.mapper.NczsjMapper;
+import com.mandi.basicconfig.persist.Nckh;
 import com.mandi.fendan.mapper.*;
 import com.mandi.fendan.util.ConvertTool;
+import com.mandi.servlet.file.impl.FileLoadImpl;
+import com.mandi.springmvc.logs.OpLogs;
+import com.mandi.system.persist.ModuleEnum;
 import org.apache.commons.lang3.StringUtils;
+import org.apache.log4j.Logger;
 import org.apache.poi.ss.usermodel.charts.ScatterChartSeries;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
@@ -50,6 +56,7 @@
 
 @Service
 public class Fd_BsheetService implements Ifd_bsheetService {
+	private Logger log= Logger.getLogger(Fd_BsheetService.class);
 
 	@Resource
 	private Fd_BsheetMapper bsper;
@@ -75,6 +82,9 @@
 	private Fd_YKTMapper yktmper;
 	@Resource
 	private FdMxWlgsMapper fdMxWlgsMapper;
+
+	@Resource
+	private NczsjMapper zsjper;
 
 	@Override
 	@Transactional(rollbackFor=Exception.class)
@@ -133,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){
@@ -152,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());
 		}
 
@@ -165,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="";//鏄惁鑷彁
@@ -435,6 +439,7 @@
 				}
 			}
 		}catch(Exception e){
+			e.printStackTrace();
 			if(saveBT){
 				JsonObject jo=new JsonObject();
 				jo.addProperty("bussinessNo", bbsNo);
@@ -445,7 +450,10 @@
 		}
 
 		orr.setCode(0);
-		orr.setItem(null);
+		Map map = new HashMap<>();
+		// 杩斿洖涓氬姟鍗曞彿锛岀粰鍓嶇浣跨敤
+		map.put("businessNo",bbsNo);
+		orr.setItem(map);
 		return orr;
 	}
 

--
Gitblit v1.9.3