|
|
@@ -16,6 +16,7 @@ import com.inspur.idm.media.po.part.ElePartType;
|
|
|
import com.inspur.idm.media.service.msg.IPubMsgService;
|
|
|
import com.inspur.idm.media.service.msg.MsgConstant;
|
|
|
import com.inspur.idm.media.service.msg.PubMsgHelper;
|
|
|
+import com.inspur.idm.media.util.MyUserUtil;
|
|
|
import com.inspur.idm.media.vo.fault.*;
|
|
|
import com.inspur.idm.media.vo.msg.PubMsgDTO;
|
|
|
import com.inspur.idm.platform.utils.UUIDUtil;
|
|
|
@@ -24,6 +25,7 @@ import com.inspur.idm.sys.dao.NewAuthUserDao;
|
|
|
import com.inspur.idm.sys.po.AuthUser;
|
|
|
import com.inspur.idm.sys.vo.user.AuthUserQuery;
|
|
|
import com.inspur.idm.sys.vo.user.AuthUserVO;
|
|
|
+import io.jsonwebtoken.lang.Collections;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.apache.dubbo.common.utils.CollectionUtils;
|
|
|
@@ -93,6 +95,9 @@ public class FaultRepairScheduleServiceImpl implements FaultRepairScheduleServic
|
|
|
@Autowired
|
|
|
private EleFittingsPriceDao eleFittingsPriceDao;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private FaultInsureOrderDao faultInsureOrderDao;
|
|
|
+
|
|
|
@Override
|
|
|
public void deleteFaultRepairScheduleById(String faultId) {
|
|
|
faultRepairScheduleDao.deleteByPrimaryKey(faultId);
|
|
|
@@ -100,6 +105,18 @@ public class FaultRepairScheduleServiceImpl implements FaultRepairScheduleServic
|
|
|
|
|
|
@Override
|
|
|
public FaultRepairScheduleVO getFaultRepairScheduleById(String faultId) {
|
|
|
+
|
|
|
+ FaultInsureOrderQuery query = new FaultInsureOrderQuery();
|
|
|
+ MyUserUtil.addDataAuth(query);
|
|
|
+ List<FaultInsureOrderVO> orderVOList = faultInsureOrderDao.selectByQuery(query);
|
|
|
+ if (Collections.isEmpty(orderVOList)) {
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ List<String> insureOrderIdList = orderVOList.stream().map(FaultInsureOrderVO::getFaultId).collect(Collectors.toList());
|
|
|
+ if (!insureOrderIdList.contains(faultId)) {
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+
|
|
|
FaultRepairSchedule po = faultRepairScheduleDao.selectByPrimaryKey(faultId);
|
|
|
if(po == null){
|
|
|
return null;
|
|
|
@@ -183,8 +200,10 @@ public class FaultRepairScheduleServiceImpl implements FaultRepairScheduleServic
|
|
|
}
|
|
|
if (StringUtils.isNotBlank(vo.getInsureAuditUserId())) {
|
|
|
AuthUser insureAuditUser = authUserDao.selectByPrimaryKey(vo.getInsureAuditUserId());
|
|
|
- vo.setInsureUserName(insureAuditUser.getRealName());
|
|
|
- vo.setInsureUserPhone(insureAuditUser.getPhone());
|
|
|
+ if (insureAuditUser != null) {
|
|
|
+ vo.setInsureUserName(insureAuditUser.getRealName());
|
|
|
+ vo.setInsureUserPhone(insureAuditUser.getPhone());
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
return vo;
|