Browse Source

git-svn-id: https://192.168.57.71/svn/hbghj@132 201dd7a2-ec1b-f84b-8b06-88221118ff88

xt_xuhao 8 years ago
parent
commit
7bbfa84d13

+ 12 - 0
gkaq/yjpt-java/trunk/java_src/com/jtgh/cjhs/service/impl/DtywCbsbServiceImpl.java

@@ -62,6 +62,9 @@ public class DtywCbsbServiceImpl extends
 			entity.setZzl(Double.parseDouble(objects[5].toString()));
 			entity.setLzbz(objects[6].toString());
 			entity.setWxhwbz(objects[7].toString());
+			//PLUS BY XH-2016-10-28
+			entity.setBsxh(Long.parseLong(objects[8].toString()));
+			entity.setXh(Long.parseLong(objects[9].toString()));
 			list.add(entity);
 		}
 		return list;
@@ -85,6 +88,9 @@ public class DtywCbsbServiceImpl extends
 			entity.setZzl(Double.parseDouble(objects[5].toString()));
 			entity.setLzbz(objects[6].toString());
 			entity.setWxhwbz(objects[7].toString());
+			//PLUS BY XH-2016-10-28
+			entity.setBsxh(Long.parseLong(objects[8].toString()));
+			entity.setXh(Long.parseLong(objects[9].toString()));
 			list.add(entity);
 		}
 		return list;
@@ -153,6 +159,9 @@ public class DtywCbsbServiceImpl extends
 			entity.setZzl(Double.parseDouble(objects[5].toString()));
 			entity.setLzbz(objects[6].toString());
 			entity.setWxhwbz(objects[7].toString());
+			//PLUS BY XH-2016-10-28
+			entity.setBsxh(Long.parseLong(objects[8].toString()));
+			entity.setXh(Long.parseLong(objects[9].toString()));
 			list.add(entity);
 		}
 		return list;
@@ -177,6 +186,9 @@ public class DtywCbsbServiceImpl extends
 			entity.setWxhwbz(objects[7].toString());
 			entity.setBsxh(Long.parseLong(objects[8].toString()));
 			entity.setXh(Long.parseLong(objects[9].toString()));
+			//PLUS BY XH-2016-10-28
+			entity.setBsxh(Long.parseLong(objects[8].toString()));
+			entity.setXh(Long.parseLong(objects[9].toString()));
 			list.add(entity);
 		}
 		return list;

+ 12 - 10
gkaq/yjpt-java/trunk/java_src/com/jtgh/yjpt/controller/zysqbp/ZysqbpController.java

@@ -2690,22 +2690,24 @@ public class ZysqbpController extends BaseController {
 	public BusinessContext doCjhsInit(Long id) {
 		BusinessContext bc = createBusinessContext();
 		CjhsEntity cjhs = cjhsService.findCjhsByGksbbh(id);
-		List<CjhsHwEntity> cjhsHwList = cjhs.getHshwList();
-		List<CjhsHwEntity> list = new ArrayList<CjhsHwEntity>();
-		//货物总重量取和
-		if (cjhsHwList != null && cjhsHwList.size() > 0) {
-			CjhsHwEntity cjhsHw = cjhsHwList.get(0);
-			double zzl=0;
-			for (CjhsHwEntity hw : cjhsHwList) {
-				if (hw.getZqysmczw() != null
-						&& hw.getZqysmczw().trim()
-								.equals(cjhsHw.getZqysmczw().trim())) {
+		
+		if(cjhs!=null){
+			List<CjhsHwEntity> cjhsHwList = cjhs.getHshwList();
+			List<CjhsHwEntity> list = new ArrayList<CjhsHwEntity>();
+			//货物总重量取和
+			if (cjhsHwList != null && cjhsHwList.size() > 0) {
+				CjhsHwEntity cjhsHw = cjhsHwList.get(0);
+				double zzl=0;
+				for (CjhsHwEntity hw : cjhsHwList) {
+					if (hw.getZqysmczw() != null&& hw.getZqysmczw().trim().equals(cjhsHw.getZqysmczw().trim())) {
 					zzl = zzl+ hw.getZzl();
 				}
 			}
 			cjhsHw.setZzl(zzl);
 			list.add(cjhsHw);
+			}
 		}
+		
 		bc.setResult(cjhs);
 		return bc;
 	}

+ 33 - 35
gkaq/yjpt-java/trunk/java_src/com/jtgh/yjpt/service/impl/cjhs/CjhsServiceImpl.java

@@ -26,7 +26,7 @@ import com.jtgh.yjpt.service.cjhs.CjhsService;
 import com.jtgh.yjpt.service.zysqbp.ZysqbpService;
 
 @Service
-public class CjhsServiceImpl  implements CjhsService {
+public class CjhsServiceImpl implements CjhsService {
 	@Autowired
 	private ZysqbpService zysqbpService;
 	@Autowired
@@ -47,9 +47,8 @@ public class CjhsServiceImpl  implements CjhsService {
 		try {
 			List<CjhsDbEntity> cjhsdbList = cjhsDbService.findByGksbbh(gksbbh);
 			if (cjhsdbList == null || cjhsdbList.size() <= 0) {
-				List<DtywCbsbEntity> dtywCbsbEntityList = dtywCbsbService
-						.findByZwcm(vo.getCm());
-				if (dtywCbsbEntityList != null) {
+				List<DtywCbsbEntity> dtywCbsbEntityList = dtywCbsbService.findByZwcm(vo.getCm());
+				if (dtywCbsbEntityList != null && dtywCbsbEntityList.size() > 0) {
 					DtywCbsbEntity dtywCbsbEntity = dtywCbsbEntityList.get(0);
 					cjhs = changeFromDtywCbsb(dtywCbsbEntity);
 				}
@@ -64,8 +63,7 @@ public class CjhsServiceImpl  implements CjhsService {
 				}
 			} else {
 				CjhsDbEntity cjhsdbEntity = cjhsdbList.get(0);
-				DtywCbsbEntity dtywCbsbEntity = dtywCbsbService
-						.findBySbdbh(cjhsdbEntity.getHssbbh());
+				DtywCbsbEntity dtywCbsbEntity = dtywCbsbService.findBySbdbh(cjhsdbEntity.getHssbbh());
 				cjhs = changeFromDtywCbsb(dtywCbsbEntity);
 			}
 		} catch (Exception e) {
@@ -100,8 +98,7 @@ public class CjhsServiceImpl  implements CjhsService {
 	public List<CjhsHwEntity> findCjhsHwListByCbsb(DtywCbsbEntity entity) {
 		List<CjhsHwEntity> cjhsHwList = null;
 		if (entity.getSbdlb().trim().equals("CS")) {
-			List<DtywCbsbszHwEntity> cbsbszList = dtywCbsbService
-					.findCbsbszHwBySbdbh(entity.getId());
+			List<DtywCbsbszHwEntity> cbsbszList = dtywCbsbService.findCbsbszHwBySbdbh(entity.getId());
 			cjhsHwList = changeFromCbsbszHw(cbsbszList);
 		} else if (entity.getSbdlb().trim().equals("CB")) {
 			List<DtywCbsbgtHwEntity> cbsbgtList = dtywCbsbService
@@ -127,34 +124,40 @@ public class CjhsServiceImpl  implements CjhsService {
 		if (entity.getSbdlb().trim().equals("CS")) {
 			List<DtywCbsbszHwEntity> cbsbszList = dtywCbsbService
 					.findCbsbszHwBySbdbh(entity.getId());
-			List<DtywCbsbszHwEntity> cbsbszList2 = dtywCbsbService
-					.findCbsbszHwBySbdbhAndBsxhAndXh(db.getHssbbh(),
-							db.getBsxh(), db.getXh());
 			DtywCbsbszHwEntity cbsbsz = null;
-			if (cbsbszList2 != null && cbsbszList2.size() > 0) {
-				cbsbsz = cbsbszList2.get(0);
+			if (db != null) {
+				List<DtywCbsbszHwEntity> cbsbszList2 = dtywCbsbService
+						.findCbsbszHwBySbdbhAndBsxhAndXh(db.getHssbbh(),
+								db.getBsxh(), db.getXh());
+				if (cbsbszList2 != null && cbsbszList2.size() > 0) {
+					cbsbsz = cbsbszList2.get(0);
+				}
 			}
 			cjhsHwList = changeFromCbsbszHw(cbsbszList, cbsbsz);
 		} else if (entity.getSbdlb().trim().equals("CB")) {
 			List<DtywCbsbgtHwEntity> cbsbgtList = dtywCbsbService
 					.findCbsbgtHwBySbdbh(entity.getId());
-			List<DtywCbsbgtHwEntity> cbsbgtList2 = dtywCbsbService
-					.findCbsbgtHwBySbdbhAndBsxhAndXh(db.getHssbbh(),
-							db.getBsxh(), db.getXh());
 			DtywCbsbgtHwEntity cbsbgt = null;
-			if (cbsbgtList2 != null && cbsbgtList2.size() > 0) {
-				cbsbgt = cbsbgtList2.get(0);
+			if (db != null) {
+				List<DtywCbsbgtHwEntity> cbsbgtList2 = dtywCbsbService
+						.findCbsbgtHwBySbdbhAndBsxhAndXh(db.getHssbbh(),
+								db.getBsxh(), db.getXh());
+				if (cbsbgtList2 != null && cbsbgtList2.size() > 0) {
+					cbsbgt = cbsbgtList2.get(0);
+				}
 			}
 			cjhsHwList = changeFromCbsbgtHw(cbsbgtList, cbsbgt);
 		} else if (entity.getSbdlb().trim().equals("CY")) {
 			List<DtywCbsbytHwEntity> cbsbytList = dtywCbsbService
 					.findCbsbytHwBySbdbh(entity.getId());
-			List<DtywCbsbytHwEntity> cbsbytList2 = dtywCbsbService
-					.findCbsbytHwBySbdbhAndBsxhAndXh(db.getHssbbh(),
-							db.getBsxh(), db.getXh());
 			DtywCbsbytHwEntity cbsbyt = null;
-			if (cbsbytList2 != null && cbsbytList2.size() > 0) {
-				cbsbyt = cbsbytList2.get(0);
+			if (db != null) {
+				List<DtywCbsbytHwEntity> cbsbytList2 = dtywCbsbService
+						.findCbsbytHwBySbdbhAndBsxhAndXh(db.getHssbbh(),
+								db.getBsxh(), db.getXh());
+				if (cbsbytList2 != null && cbsbytList2.size() > 0) {
+					cbsbyt = cbsbytList2.get(0);
+				}
 			}
 			cjhsHwList = changeFromCbsbytHw(cbsbytList, cbsbyt);
 		}
@@ -330,7 +333,6 @@ public class CjhsServiceImpl  implements CjhsService {
 		return cjhsHwList;
 	}
 
-
 	/**
 	 * 获取长江海事货物信息
 	 */
@@ -338,6 +340,7 @@ public class CjhsServiceImpl  implements CjhsService {
 	public List<CjhsHwEntity> findCjhsHwListByHssbbh(ZysqbpEntity zysqbp,
 			String hssbbh) {
 		DtywCbsbEntity dtywCbsbEntity = dtywCbsbService.findBySbdbh(hssbbh);
+
 		List<CjhsDbEntity> cjhsDbList = cjhsDbService.findByGksbbh(zysqbp
 				.getId());
 		CjhsDbEntity db = null;
@@ -351,12 +354,11 @@ public class CjhsServiceImpl  implements CjhsService {
 	}
 
 	/**
-	 *保存泊位
+	 * 保存泊位
 	 */
 	@Override
 	public void saveData(BwEntity entity) {
-		
-		
+
 	}
 
 	/**
@@ -364,8 +366,7 @@ public class CjhsServiceImpl  implements CjhsService {
 	 */
 	@Override
 	public void saveData(GkwxhwzyfzblhhzEntity entity) {
-		
-		
+
 	}
 
 	/**
@@ -373,8 +374,7 @@ public class CjhsServiceImpl  implements CjhsService {
 	 */
 	@Override
 	public void saveData(GkwxhwzyfzblFzEntity entity) {
-		
-		
+
 	}
 
 	/**
@@ -382,8 +382,7 @@ public class CjhsServiceImpl  implements CjhsService {
 	 */
 	@Override
 	public void saveData(WxhwpmEntity entity) {
-		
-		
+
 	}
 
 	/**
@@ -391,7 +390,6 @@ public class CjhsServiceImpl  implements CjhsService {
 	 */
 	@Override
 	public void saveData(ZysqbpEntity entity) {
-		
-		
+
 	}
 }

+ 1 - 1
gkaq/yjpt-java/trunk/java_src/com/jtgh/yjpt/service/impl/cjhs/GkToCjhsServiceImpl.java

@@ -454,8 +454,8 @@ public class GkToCjhsServiceImpl implements GkToCjhsService {
 		cjhs.setCnno(entity.getCnno());
 		if(entity.getDxdj()!=null){
 			cjhs.setHwzl(entity.getDxdj().getBz());
+			cjhs.setDxdj(entity.getDxdj().getBz());
 		}
-		cjhs.setDxdj(entity.getDxdj().getBz());
 		cjhs.setGjbh(entity.getGjbh());
 		cjhs.setHc(entity.getHc());
 		String hwxs = entity.getHwxs();