|
@@ -251,6 +251,7 @@ public class PublicServiceImpl implements PublicService {
|
|
|
public String getSHWDPhone(String websitNo){
|
|
|
Websit websit = websitService.lambdaQuery()
|
|
|
.eq(Websit::getWebsitId,websitNo)
|
|
|
+ .last("limit 1")
|
|
|
.one();
|
|
|
if (websit != null){
|
|
|
if (StringUtils.isNotEmpty(websit.getHotline())){
|
|
@@ -272,6 +273,7 @@ public class PublicServiceImpl implements PublicService {
|
|
|
WebsitOrderSign wos = websitOrderSignService.lambdaQuery()
|
|
|
.eq(WebsitOrderSign::getBrandWebsitId, websitNo)
|
|
|
.eq(WebsitOrderSign::getBrandId, brandId)
|
|
|
+ .last("limit 1")
|
|
|
.one();
|
|
|
if (wos != null){
|
|
|
resultData.setWebsitId(wos.getWebsitId());
|
|
@@ -279,6 +281,7 @@ public class PublicServiceImpl implements PublicService {
|
|
|
CustomerInformationWebsit ciwx = customerInformationWebsitService.lambdaQuery()
|
|
|
.eq(CustomerInformationWebsit::getRefWebsitId, websitNo)
|
|
|
.eq(CustomerInformationWebsit::getBrandId, brandId)
|
|
|
+ .last("limit 1")
|
|
|
.one();
|
|
|
if (ciwx !=null){
|
|
|
resultData.setWebsitId(ciwx.getWebsitId());
|
|
@@ -289,6 +292,7 @@ public class PublicServiceImpl implements PublicService {
|
|
|
if (StringUtils.isNotEmpty(resultData.getWebsitId())){
|
|
|
Websit websit = websitService.lambdaQuery()
|
|
|
.eq(Websit::getWebsitId,resultData.getWebsitId())
|
|
|
+ .last("limit 1")
|
|
|
.one();
|
|
|
if (websit != null){
|
|
|
resultData.setWdmc(websit.getWebsitName());
|
|
@@ -314,6 +318,7 @@ public class PublicServiceImpl implements PublicService {
|
|
|
WebsitOrderSign wos = websitOrderSignService.lambdaQuery()
|
|
|
.eq(WebsitOrderSign::getWebsitId, websitId)
|
|
|
.eq(WebsitOrderSign::getBrandId, brandId)
|
|
|
+ .last("limit 1")
|
|
|
.one();
|
|
|
if (wos != null){
|
|
|
resultData.setWdno(wos.getBrandWebsitId());
|
|
@@ -323,6 +328,7 @@ public class PublicServiceImpl implements PublicService {
|
|
|
CustomerInformationWebsit ciwx = customerInformationWebsitService.lambdaQuery()
|
|
|
.eq(CustomerInformationWebsit::getWebsitId, websitId)
|
|
|
.eq(CustomerInformationWebsit::getBrandId, brandId)
|
|
|
+ .last("limit 1")
|
|
|
.one();
|
|
|
if (ciwx !=null){
|
|
|
resultData.setWdno(ciwx.getRefWebsitId());
|
|
@@ -335,6 +341,7 @@ public class PublicServiceImpl implements PublicService {
|
|
|
BrandWebsit bw = brandWebsitService.lambdaQuery()
|
|
|
.eq(BrandWebsit::getBrandWebsitNumber, resultData.getWdno())
|
|
|
.eq(BrandWebsit::getGroupCompanyId, brandId)
|
|
|
+ .last("limit 1")
|
|
|
.one();
|
|
|
if (bw != null){
|
|
|
resultData.setXtwdno(bw.getSysWebsitNumber());
|
|
@@ -351,7 +358,9 @@ public class PublicServiceImpl implements PublicService {
|
|
|
String itemTableName, String itemOrderType, int taskType) {
|
|
|
// 提取目志的类型
|
|
|
OrderRepairOperatingLog rlog = orderRepairOperatingLogService.lambdaQuery()
|
|
|
- .eq(OrderRepairOperatingLog::getId,id).one();
|
|
|
+ .eq(OrderRepairOperatingLog::getId,id)
|
|
|
+ .last("limit 1")
|
|
|
+ .one();
|
|
|
|
|
|
OutJiasmToGreeUploadTaskList add = new OutJiasmToGreeUploadTaskList();
|
|
|
add.setUploadTaskType(taskType);
|
|
@@ -474,7 +483,9 @@ public class PublicServiceImpl implements PublicService {
|
|
|
public WebsitSH merchantWebsitInfoX(String websitNo,String type){
|
|
|
WebsitSH resultData = new WebsitSH();
|
|
|
// 提取格力集团信息
|
|
|
- Brand brandRec = brandService.lambdaQuery().eq(Brand::getBrand,"格力").one();
|
|
|
+ Brand brandRec = brandService.lambdaQuery().eq(Brand::getBrand,"格力")
|
|
|
+ .last("limit 1")
|
|
|
+ .one();
|
|
|
|
|
|
if (StringUtils.isEmpty(websitNo)){
|
|
|
return resultData;
|
|
@@ -483,7 +494,9 @@ public class PublicServiceImpl implements PublicService {
|
|
|
BrandWebsit brandWebsit = brandWebsitService.lambdaQuery()
|
|
|
.eq(BrandWebsit::getGroupCompanyId,brandRec.getBrandId())
|
|
|
.eq(BrandWebsit::getType,type)
|
|
|
- .eq(BrandWebsit::getBrandWebsitNumber,websitNo).one();
|
|
|
+ .eq(BrandWebsit::getBrandWebsitNumber,websitNo)
|
|
|
+ .last("limit 1")
|
|
|
+ .one();
|
|
|
|
|
|
if (brandWebsit !=null){
|
|
|
resultData.setWdId(brandWebsit.getBrandWebsitNumber());
|
|
@@ -639,6 +652,7 @@ public class PublicServiceImpl implements PublicService {
|
|
|
.eq(BrandWebsit::getGroupCompanyId, item.getGroupCompanyId())
|
|
|
.eq(BrandWebsit::getSplb,category)
|
|
|
.eq(BrandWebsit::getBrandWebsitNumber, item.getRefWebsitId())
|
|
|
+ .last("limit 1")
|
|
|
.one();
|
|
|
if (bw != null) {
|
|
|
return merchantWebsitInfoX(bw.getBrandWebsitNumber(),
|
|
@@ -683,6 +697,7 @@ public class PublicServiceImpl implements PublicService {
|
|
|
BrandWebsit bw = brandWebsitService.lambdaQuery()
|
|
|
.eq(BrandWebsit::getSplb, category)
|
|
|
.eq(BrandWebsit::getBrandWebsitNumber, item.getBrandWebsitId())
|
|
|
+ .last("limit 1")
|
|
|
.one();
|
|
|
if (bw != null) {
|
|
|
wosn.add(bw);
|
|
@@ -730,7 +745,9 @@ public class PublicServiceImpl implements PublicService {
|
|
|
private Boolean addSRecord(OrderReAppointment rea){
|
|
|
// 插入前查看是否已存在,存在不再插入
|
|
|
SmsRecord sr = smsRecordService.lambdaQuery()
|
|
|
- .eq(SmsRecord::getId,rea.getId()).one();
|
|
|
+ .eq(SmsRecord::getId,rea.getId())
|
|
|
+ .last("limit 1")
|
|
|
+ .one();
|
|
|
if (sr !=null){
|
|
|
return Boolean.TRUE;
|
|
|
}
|
|
@@ -743,14 +760,18 @@ public class PublicServiceImpl implements PublicService {
|
|
|
@Override
|
|
|
public Boolean addFaOrderSms(OrderReAppointment rea){
|
|
|
OrderBase orderBase = orderbaseService.lambdaQuery()
|
|
|
- .eq(OrderBase::getId,rea.getOrderBaseId()).one();
|
|
|
+ .eq(OrderBase::getId,rea.getOrderBaseId())
|
|
|
+ .last("limit 1")
|
|
|
+ .one();
|
|
|
if (orderBase == null){
|
|
|
return Boolean.TRUE;
|
|
|
}
|
|
|
// 一个工单只能有一次预约信息,改约可以多个
|
|
|
if (rea.getFlag()==1){
|
|
|
FaOrderSms r = faOrderSmsService.lambdaQuery()
|
|
|
- .eq(FaOrderSms::getSynTaskNo,rea.getId()).one();
|
|
|
+ .eq(FaOrderSms::getSynTaskNo,rea.getId())
|
|
|
+ .last("limit 1")
|
|
|
+ .one();
|
|
|
if (r !=null){
|
|
|
return Boolean.TRUE;
|
|
|
}
|
|
@@ -878,7 +899,9 @@ public class PublicServiceImpl implements PublicService {
|
|
|
@Override
|
|
|
public Integer getCompanyId(String brandWebsitNumber){
|
|
|
BrandWebsit bw = brandWebsitService.lambdaQuery()
|
|
|
- .eq(BrandWebsit::getBrandWebsitNumber, brandWebsitNumber).one();
|
|
|
+ .eq(BrandWebsit::getBrandWebsitNumber, brandWebsitNumber)
|
|
|
+ .last("limit 1")
|
|
|
+ .one();
|
|
|
if (bw != null){
|
|
|
return bw.getBelongCompanyId();
|
|
|
}
|
|
@@ -894,7 +917,9 @@ public class PublicServiceImpl implements PublicService {
|
|
|
// 提取配置参数 首次申诉-服务人员+网点审核截止时间
|
|
|
SysVariableConfig config = sysVariableConfigService.lambdaQuery()
|
|
|
.eq(SysVariableConfig::getVariableType,"APPEAL_TIME")
|
|
|
- .eq(SysVariableConfig::getSmallType,3).one();
|
|
|
+ .eq(SysVariableConfig::getSmallType,3)
|
|
|
+ .last("limit 1")
|
|
|
+ .one();
|
|
|
if (config != null){
|
|
|
hour = Integer.valueOf(config.getVariableValue());
|
|
|
}
|
|
@@ -905,7 +930,9 @@ public class PublicServiceImpl implements PublicService {
|
|
|
// 提取短信发送时间 目的配合配置参数生成申诉单的截止申诉时间
|
|
|
ItfMessagehuifangentity message = itfMessagehuifangentityService.lambdaQuery()
|
|
|
.eq(ItfMessagehuifangentity::getOrderBaseId, orderBase.getId())
|
|
|
- .eq(ItfMessagehuifangentity::getFjid, orderBase.getPgguid()).one();
|
|
|
+ .eq(ItfMessagehuifangentity::getFjid, orderBase.getPgguid())
|
|
|
+ .last("limit 1")
|
|
|
+ .one();
|
|
|
|
|
|
|
|
|
// 测试时存在无message的情况
|
|
@@ -933,7 +960,9 @@ public class PublicServiceImpl implements PublicService {
|
|
|
// 提取配置参数 首次申诉-服务人员+网点审核截止时间
|
|
|
SysVariableConfig config = sysVariableConfigService.lambdaQuery()
|
|
|
.eq(SysVariableConfig::getVariableType,"APPEAL_TIME")
|
|
|
- .eq(SysVariableConfig::getSmallType,3).one();
|
|
|
+ .eq(SysVariableConfig::getSmallType,3)
|
|
|
+ .last("limit 1")
|
|
|
+ .one();
|
|
|
if (config != null){
|
|
|
hour = Integer.valueOf(config.getVariableValue());
|
|
|
}
|
|
@@ -944,7 +973,9 @@ public class PublicServiceImpl implements PublicService {
|
|
|
// 提取短信发送时间 目的配合配置参数生成申诉单的截止申诉时间
|
|
|
ItfMessagehuifangentity message = itfMessagehuifangentityService.lambdaQuery()
|
|
|
.eq(ItfMessagehuifangentity::getOrderBaseId, orderBase.getId())
|
|
|
- .eq(ItfMessagehuifangentity::getFjid, orderBase.getPgid()).one();
|
|
|
+ .eq(ItfMessagehuifangentity::getFjid, orderBase.getPgid())
|
|
|
+ .last("limit 1")
|
|
|
+ .one();
|
|
|
|
|
|
|
|
|
// 测试时存在无message的情况
|
|
@@ -968,7 +999,9 @@ public class PublicServiceImpl implements PublicService {
|
|
|
@Override
|
|
|
public Boolean checkEvaluatemessage(String pjly){
|
|
|
SatisfactionList sfl = satisfactionListService.lambdaQuery()
|
|
|
- .eq(SatisfactionList::getPjly,pjly.trim()).one();
|
|
|
+ .eq(SatisfactionList::getPjly,pjly.trim())
|
|
|
+ .last("limit 1")
|
|
|
+ .one();
|
|
|
if (sfl==null){
|
|
|
return Boolean.TRUE;
|
|
|
}
|
|
@@ -995,7 +1028,9 @@ public class PublicServiceImpl implements PublicService {
|
|
|
public Worker getInstallOrderWorker(Long azrenid){
|
|
|
List<Worker> worker = new ArrayList<>();
|
|
|
ItfTblWangdianWxgDownload wdwxg = itfTblWangdianWxgDownloadService.lambdaQuery()
|
|
|
- .eq(ItfTblWangdianWxgDownload::getWxgid,azrenid).one();
|
|
|
+ .eq(ItfTblWangdianWxgDownload::getWxgid,azrenid)
|
|
|
+ .last("limit 1")
|
|
|
+ .one();
|
|
|
// 根据身份证取师傅信息
|
|
|
if (wdwxg !=null){
|
|
|
worker = workerService.lambdaQuery()
|
|
@@ -1014,7 +1049,9 @@ public class PublicServiceImpl implements PublicService {
|
|
|
public String checkAppraiseType(String pjly){
|
|
|
String result ="C";
|
|
|
SatisfactionList sfl = satisfactionListService.lambdaQuery()
|
|
|
- .eq(SatisfactionList::getPjly,pjly.trim()).one();
|
|
|
+ .eq(SatisfactionList::getPjly,pjly.trim())
|
|
|
+ .last("limit 1")
|
|
|
+ .one();
|
|
|
if (sfl==null){
|
|
|
result = "C";
|
|
|
} else {
|
|
@@ -1058,7 +1095,9 @@ public class PublicServiceImpl implements PublicService {
|
|
|
.eq(WorkerBrandAccount::getDel,0)
|
|
|
.eq(WorkerBrandAccount::getWorkerId,workerId)
|
|
|
.eq(WorkerBrandAccount::getBrandWebsitId,brandWebsitId)
|
|
|
- .eq(WorkerBrandAccount::getWebsitId,websitId).one();
|
|
|
+ .eq(WorkerBrandAccount::getWebsitId,websitId)
|
|
|
+ .last("limit 1")
|
|
|
+ .one();
|
|
|
if (wba !=null){
|
|
|
if (StringUtils.isNotEmpty(wba.getBrandWorkerId())){
|
|
|
return Long.valueOf(wba.getBrandWorkerId());
|
|
@@ -1076,11 +1115,15 @@ public class PublicServiceImpl implements PublicService {
|
|
|
.eq(WorkerBrandAccount::getBrandWorkerStatus,"ON")
|
|
|
.eq(WorkerBrandAccount::getDel,0)
|
|
|
.eq(WorkerBrandAccount::getWorkerId,workerId)
|
|
|
- .eq(WorkerBrandAccount::getBrandWebsitId,brandWebsitId).one();
|
|
|
+ .eq(WorkerBrandAccount::getBrandWebsitId,brandWebsitId)
|
|
|
+ .last("limit 1")
|
|
|
+ .one();
|
|
|
if (wba !=null){
|
|
|
MyBeanUtils.copyProperties(wba,info);
|
|
|
Worker wk = workerService.lambdaQuery()
|
|
|
- .eq(Worker::getWorkerId,workerId).one();
|
|
|
+ .eq(Worker::getWorkerId,workerId)
|
|
|
+ .last("limit 1")
|
|
|
+ .one();
|
|
|
|
|
|
MyBeanUtils.copyProperties(wk,info);
|
|
|
}
|
|
@@ -1214,7 +1257,9 @@ public class PublicServiceImpl implements PublicService {
|
|
|
// 依然有多个时按位置再次过滤 这里指网点的位置
|
|
|
// 商户网点位置
|
|
|
BrandWebsit bw = brandWebsitService.lambdaQuery()
|
|
|
- .eq(BrandWebsit::getBrandWebsitNumber, websitNo).one();
|
|
|
+ .eq(BrandWebsit::getBrandWebsitNumber, websitNo)
|
|
|
+ .last("limit 1")
|
|
|
+ .one();
|
|
|
List<String> wdno = new ArrayList<>();
|
|
|
// 有为空的按经纬度重新提取位置
|
|
|
if (StringUtils.isEmpty(bw.getSfen()) ||
|
|
@@ -1283,7 +1328,9 @@ public class PublicServiceImpl implements PublicService {
|
|
|
// 依然有多个时按位置再次过滤 这里指网点的位置
|
|
|
// 商户网点位置
|
|
|
BrandWebsit bw = brandWebsitService.lambdaQuery()
|
|
|
- .eq(BrandWebsit::getBrandWebsitNumber, websitNo).one();
|
|
|
+ .eq(BrandWebsit::getBrandWebsitNumber, websitNo)
|
|
|
+ .last("limit 1")
|
|
|
+ .one();
|
|
|
List<String> wdno = new ArrayList<>();
|
|
|
// 有为空的按经纬度重新提取位置
|
|
|
if (StringUtils.isNotEmpty(bw.getSfen()) ||
|
|
@@ -1338,13 +1385,17 @@ public class PublicServiceImpl implements PublicService {
|
|
|
.eq(WebsitServiceCategoryDetail::getBrandId,brandId)
|
|
|
.eq(WebsitServiceCategoryDetail::getWebsitId,websitId)
|
|
|
.eq(WebsitServiceCategoryDetail::getType,type)
|
|
|
- .eq(WebsitServiceCategoryDetail::getMainId,categoryId).one();
|
|
|
+ .eq(WebsitServiceCategoryDetail::getMainId,categoryId)
|
|
|
+ .last("limit 1")
|
|
|
+ .one();
|
|
|
}
|
|
|
|
|
|
// 提取平台网点名称及服务热线
|
|
|
private void getNameAndHotline(WebsitFWS req){
|
|
|
Websit websit = websitService.lambdaQuery()
|
|
|
- .eq(Websit::getWebsitId,req.getWebsitId()).one();
|
|
|
+ .eq(Websit::getWebsitId,req.getWebsitId())
|
|
|
+ .last("limit 1")
|
|
|
+ .one();
|
|
|
|
|
|
if (websit != null){
|
|
|
if (StringUtils.isNotEmpty(websit.getHotline())){
|