|
|
@@ -4,12 +4,15 @@ import com.alibaba.fastjson.JSONArray;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.java110.core.log.LoggerFactory;
|
|
|
import com.java110.dto.complaint.ComplaintDto;
|
|
|
+import com.java110.dto.complaintType.ComplaintTypeDto;
|
|
|
import com.java110.dto.complaintTypeUser.ComplaintTypeUserDto;
|
|
|
import com.java110.dto.system.Business;
|
|
|
import com.java110.intf.store.IComplaintTypeUserV1InnerServiceSMO;
|
|
|
+import com.java110.intf.store.IComplaintTypeV1InnerServiceSMO;
|
|
|
import com.java110.intf.store.IComplaintV1InnerServiceSMO;
|
|
|
import com.java110.job.adapt.DatabusAdaptImpl;
|
|
|
import com.java110.job.adapt.Repair.MachineReturnRepairAdapt;
|
|
|
+import com.java110.job.msgNotify.IMsgNotify;
|
|
|
import com.java110.job.msgNotify.MsgNotifyFactory;
|
|
|
import com.java110.po.owner.RepairUserPo;
|
|
|
import com.java110.utils.cache.MappingCache;
|
|
|
@@ -35,6 +38,9 @@ public class SendComplaintNotifyStaffAdapt extends DatabusAdaptImpl {
|
|
|
@Autowired
|
|
|
private IComplaintV1InnerServiceSMO complaintV1InnerServiceSMOImpl;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private IComplaintTypeV1InnerServiceSMO complaintTypeV1InnerServiceSMOImpl;
|
|
|
+
|
|
|
@Autowired
|
|
|
private IComplaintTypeUserV1InnerServiceSMO complaintTypeUserV1InnerServiceSMOImpl;
|
|
|
|
|
|
@@ -58,6 +64,14 @@ public class SendComplaintNotifyStaffAdapt extends DatabusAdaptImpl {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
+ ComplaintTypeDto complaintTypeDto = new ComplaintTypeDto();
|
|
|
+ complaintTypeDto.setTypeCd(complaintDtos.get(0).getTypeCd());
|
|
|
+ List<ComplaintTypeDto> complaintTypeDtos = complaintTypeV1InnerServiceSMOImpl.queryComplaintTypes(complaintTypeDto);
|
|
|
+
|
|
|
+ if(ListUtil.isNull(complaintTypeDtos)){
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
ComplaintTypeUserDto complaintTypeUserDto = new ComplaintTypeUserDto();
|
|
|
complaintTypeUserDto.setTypeCd(complaintDtos.get(0).getTypeCd());
|
|
|
List<ComplaintTypeUserDto> complaintTypeUserDtos = complaintTypeUserV1InnerServiceSMOImpl.queryComplaintTypeUsers(complaintTypeUserDto);
|
|
|
@@ -72,9 +86,17 @@ public class SendComplaintNotifyStaffAdapt extends DatabusAdaptImpl {
|
|
|
|
|
|
String wechatUrl = MappingCache.getValue(MappingConstant.URL_DOMAIN, "STAFF_WECHAT_URL");
|
|
|
content.put("url", wechatUrl);
|
|
|
+ IMsgNotify msgNotify = null;
|
|
|
+ if(ComplaintTypeDto.NOTIFY_WAY_SMS.equals(complaintTypeDtos.get(0).getNotifyWay())) {
|
|
|
+ msgNotify = MsgNotifyFactory.getMsgNotify(MsgNotifyFactory.NOTIFY_WAY_ALI);
|
|
|
+ }else if(ComplaintTypeDto.NOTIFY_WAY_WECHAT.equals(complaintTypeDtos.get(0).getNotifyWay())){
|
|
|
+ msgNotify = MsgNotifyFactory.getMsgNotify(MsgNotifyFactory.NOTIFY_WAY_WECHAT);
|
|
|
+ }else{
|
|
|
+ return;
|
|
|
+ }
|
|
|
|
|
|
for(ComplaintTypeUserDto tmpComplaintTypeUserDto:complaintTypeUserDtos) {
|
|
|
- MsgNotifyFactory.sendComplaintMsg(tmpComplaintTypeUserDto.getCommunityId(), tmpComplaintTypeUserDto.getStaffId(), content);
|
|
|
+ msgNotify.sendComplaintMsg(tmpComplaintTypeUserDto.getCommunityId(), tmpComplaintTypeUserDto.getStaffId(), content);
|
|
|
}
|
|
|
|
|
|
}
|