|
@@ -149,32 +149,34 @@ public class MsTripService {
|
|
msSuspectedMapper.insert(msSuspected);
|
|
msSuspectedMapper.insert(msSuspected);
|
|
|
|
|
|
//添加出行
|
|
//添加出行
|
|
- MsTrip msTrip = new MsTrip();
|
|
|
|
- msTrip.setTripId(msSuspected.getSuspectedId());
|
|
|
|
- msTrip.setIsTrip(isTrip);
|
|
|
|
- msTrip.setTodayLocal(todayLocal);
|
|
|
|
- msTrip.setTodayLocalOther(todayLocalOther);
|
|
|
|
- msTrip.setWorkLocal(workLocal);
|
|
|
|
- msTrip.setWorkLocalOther(workLocalOther);
|
|
|
|
- msTripMapper.insert(msTrip);
|
|
|
|
- //添加出行详细
|
|
|
|
- if (listTripDet != null && listTripDet.size() > 0) {
|
|
|
|
- for (MsTripDet msTripDet : listTripDet) {
|
|
|
|
- MsTripDet msTripDet1 = new MsTripDet();
|
|
|
|
- msTripDet1.setTripDetId(IdWorker.getId());
|
|
|
|
- msTripDet1.setTripId(msSuspected.getSuspectedId());
|
|
|
|
- msTripDet1.setSort(msTripDet.getSort());
|
|
|
|
- msTripDet1.setStartLocal(msTripDet.getStartLocal());
|
|
|
|
- msTripDet1.setStartLocalOther(msTripDet.getStartLocalOther());
|
|
|
|
- msTripDet1.setEndLocal(msTripDet.getEndLocal());
|
|
|
|
- msTripDet1.setEndLocalOther(msTripDet.getEndLocalOther());
|
|
|
|
- msTripDet1.setTripType(msTripDet.getTripType());
|
|
|
|
- msTripDet1.setTripTypeDesp(msTripDet.getTripTypeDesp());
|
|
|
|
- msTripDet1.setTimeCreate(DateTime.now());
|
|
|
|
- msTripDet1.setUserCreate(userCreate);
|
|
|
|
- msTripDet1.setTimeUpdate(DateTime.now());
|
|
|
|
- msTripDet1.setUserUpdate(userCreate);
|
|
|
|
- msTripDetMapper.insert(msTripDet1);
|
|
|
|
|
|
+ if(todayLocal>0 && workLocal>0){
|
|
|
|
+ MsTrip msTrip = new MsTrip();
|
|
|
|
+ msTrip.setTripId(msSuspected.getSuspectedId());
|
|
|
|
+ msTrip.setIsTrip(isTrip);
|
|
|
|
+ msTrip.setTodayLocal(todayLocal);
|
|
|
|
+ msTrip.setTodayLocalOther(todayLocalOther);
|
|
|
|
+ msTrip.setWorkLocal(workLocal);
|
|
|
|
+ msTrip.setWorkLocalOther(workLocalOther);
|
|
|
|
+ msTripMapper.insert(msTrip);
|
|
|
|
+ //添加出行详细
|
|
|
|
+ if (listTripDet != null && listTripDet.size() > 0) {
|
|
|
|
+ for (MsTripDet msTripDet : listTripDet) {
|
|
|
|
+ MsTripDet msTripDet1 = new MsTripDet();
|
|
|
|
+ msTripDet1.setTripDetId(IdWorker.getId());
|
|
|
|
+ msTripDet1.setTripId(msSuspected.getSuspectedId());
|
|
|
|
+ msTripDet1.setSort(msTripDet.getSort());
|
|
|
|
+ msTripDet1.setStartLocal(msTripDet.getStartLocal());
|
|
|
|
+ msTripDet1.setStartLocalOther(msTripDet.getStartLocalOther());
|
|
|
|
+ msTripDet1.setEndLocal(msTripDet.getEndLocal());
|
|
|
|
+ msTripDet1.setEndLocalOther(msTripDet.getEndLocalOther());
|
|
|
|
+ msTripDet1.setTripType(msTripDet.getTripType());
|
|
|
|
+ msTripDet1.setTripTypeDesp(msTripDet.getTripTypeDesp());
|
|
|
|
+ msTripDet1.setTimeCreate(DateTime.now());
|
|
|
|
+ msTripDet1.setUserCreate(userCreate);
|
|
|
|
+ msTripDet1.setTimeUpdate(DateTime.now());
|
|
|
|
+ msTripDet1.setUserUpdate(userCreate);
|
|
|
|
+ msTripDetMapper.insert(msTripDet1);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|