|
@@ -14,10 +14,7 @@ import com.steerinfo.framework.service.pagehelper.PageHelper;
|
|
|
import com.steerinfo.framework.service.pagehelper.PageList;
|
|
import com.steerinfo.framework.service.pagehelper.PageList;
|
|
|
import com.steerinfo.meterwork.meterworkcaractual.mapper.MeterWorkCarActualMapper;
|
|
import com.steerinfo.meterwork.meterworkcaractual.mapper.MeterWorkCarActualMapper;
|
|
|
import com.steerinfo.meterwork.meterworkcaractual.model.MeterWorkCarActual;
|
|
import com.steerinfo.meterwork.meterworkcaractual.model.MeterWorkCarActual;
|
|
|
-import com.steerinfo.util.CommonPage;
|
|
|
|
|
-import com.steerinfo.util.FieldsCollector;
|
|
|
|
|
-import com.steerinfo.util.SSOUtil;
|
|
|
|
|
-import com.steerinfo.util.StringUtils;
|
|
|
|
|
|
|
+import com.steerinfo.util.*;
|
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
import org.springframework.transaction.interceptor.TransactionAspectSupport;
|
|
import org.springframework.transaction.interceptor.TransactionAspectSupport;
|
|
@@ -73,10 +70,13 @@ public class MeterBaseCarServiceImpl extends BaseServiceImpl<MeterBaseCar, Strin
|
|
|
// if(!com.isEmpty()){
|
|
// if(!com.isEmpty()){
|
|
|
// return "该车号已存在!";
|
|
// return "该车号已存在!";
|
|
|
// }
|
|
// }
|
|
|
- SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
|
|
|
|
|
- String afl = sdf.format(new Date());
|
|
|
|
|
- String no = meterBaseCarMapper.GetNewID(afl);
|
|
|
|
|
- model.setPkNo(afl + no);
|
|
|
|
|
|
|
+// SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
|
|
|
|
|
+// String afl = sdf.format(new Date());
|
|
|
|
|
+// String no = meterBaseCarMapper.GetNewID(afl);
|
|
|
|
|
+// model.setPkNo(afl + no);
|
|
|
|
|
+
|
|
|
|
|
+ String no = PublicMethod.IdCreate(3);
|
|
|
|
|
+ model.setPkNo(no);
|
|
|
meterBaseCarMapper.insert(model);
|
|
meterBaseCarMapper.insert(model);
|
|
|
return "";
|
|
return "";
|
|
|
}
|
|
}
|
|
@@ -297,8 +297,12 @@ public class MeterBaseCarServiceImpl extends BaseServiceImpl<MeterBaseCar, Strin
|
|
|
car.setPkNo(carModels.get(0).getPkNo());
|
|
car.setPkNo(carModels.get(0).getPkNo());
|
|
|
meterBaseCarMapper.updateByPrimaryKeySelective(car);
|
|
meterBaseCarMapper.updateByPrimaryKeySelective(car);
|
|
|
}else {
|
|
}else {
|
|
|
- String no=meterBaseCarMapper.GetNewID(new SimpleDateFormat("yyyyMMdd").format(new Date()));
|
|
|
|
|
- car.setId(new SimpleDateFormat("yyyyMMdd").format(new Date())+no);
|
|
|
|
|
|
|
+// String no=meterBaseCarMapper.GetNewID(new SimpleDateFormat("yyyyMMdd").format(new Date()));
|
|
|
|
|
+// car.setId(new SimpleDateFormat("yyyyMMdd").format(new Date())+no);
|
|
|
|
|
+
|
|
|
|
|
+ String no = PublicMethod.IdCreate(3);
|
|
|
|
|
+ car.setId(no);
|
|
|
|
|
+ car.setPkNo(no);
|
|
|
meterBaseCarMapper.insertSelective(car);
|
|
meterBaseCarMapper.insertSelective(car);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|