|
@@ -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) {
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
}
|