|
@@ -106,6 +106,13 @@ public class BillPersonnelAdmissionServiceImpl extends ServiceImpl<BillPersonnel
|
|
|
return new Result(10001, "身份证号格式错误!", false);
|
|
|
}
|
|
|
}
|
|
|
+ BaseWashoutPoint baseWashoutPoint1 = baseWashoutPointMapper.selectOne(new QueryWrapper<BaseWashoutPoint>().lambda().eq(BaseWashoutPoint::getLocationId, departureId).like(BaseWashoutPoint::getFarmIds, farmId).eq(BaseWashoutPoint::getVisitingType, vistitType));
|
|
|
+ BaseWashoutPoint baseWashoutPoint2 = baseWashoutPointMapper.selectOne(new QueryWrapper<BaseWashoutPoint>().lambda().eq(BaseWashoutPoint::getLocationId, destId).like(BaseWashoutPoint::getFarmIds, farmId).eq(BaseWashoutPoint::getVisitingType, vistitType));
|
|
|
+ if (!departureId.equals("0")){
|
|
|
+ if (baseWashoutPoint1.getPointLevel()>baseWashoutPoint2.getPointLevel()){
|
|
|
+ return new Result(10001, "出发地应在目的地之前!", false);
|
|
|
+ }
|
|
|
+ }
|
|
|
SysAccountMultilevel sysAccountMultilevel1 = sysAccountMultilevelMapper.selectById(userId);
|
|
|
|
|
|
DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm");
|
|
@@ -156,7 +163,13 @@ public class BillPersonnelAdmissionServiceImpl extends ServiceImpl<BillPersonnel
|
|
|
String allLocationId = departureId;
|
|
|
String allLocationStatus = "0";
|
|
|
String allFlowId = "";
|
|
|
- List<BaseWashoutPoint> baseWashoutPoints = baseWashoutPointMapper.selectList(new QueryWrapper<BaseWashoutPoint>().lambda().eq(BaseWashoutPoint::getVisitingType, vistitType).like(BaseWashoutPoint::getFarmIds, farmId).orderByAsc(BaseWashoutPoint::getPointLevel));
|
|
|
+
|
|
|
+ List<BaseWashoutPoint> baseWashoutPoints = new ArrayList<>();
|
|
|
+ if (ObjectUtil.isEmpty(baseWashoutPoint1)){
|
|
|
+ baseWashoutPoints = baseWashoutPointMapper.selectList(new QueryWrapper<BaseWashoutPoint>().lambda().eq(BaseWashoutPoint::getVisitingType, vistitType).like(BaseWashoutPoint::getFarmIds, farmId).orderByAsc(BaseWashoutPoint::getPointLevel));
|
|
|
+ }else {
|
|
|
+ baseWashoutPoints = baseWashoutPointMapper.selectList(new QueryWrapper<BaseWashoutPoint>().lambda().eq(BaseWashoutPoint::getVisitingType, vistitType).like(BaseWashoutPoint::getFarmIds, farmId).ge(BaseWashoutPoint::getPointLevel,baseWashoutPoint1.getPointLevel()).orderByAsc(BaseWashoutPoint::getPointLevel));
|
|
|
+ }
|
|
|
for (BaseWashoutPoint baseWashoutPoint : baseWashoutPoints) {
|
|
|
allLocation = allLocation + "," + baseLocationMapper.selectById(baseWashoutPoint.getLocationId()).getLocationName();
|
|
|
allLocationId = allLocationId + "," + baseWashoutPoint.getLocationId();
|