|
@@ -89,6 +89,9 @@ public class AddInstallBusinessImpl implements AddInstallBusiness {
|
|
|
ItfMessagehuifangentityService itfMessagehuifangentityService;
|
|
|
@Resource
|
|
|
SyncCreateOrderService syncCreateOrderService;
|
|
|
+ @Resource
|
|
|
+ ItfReceiveSmsService itfReceiveSmsService;
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
@@ -492,6 +495,163 @@ public class AddInstallBusinessImpl implements AddInstallBusiness {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public void getOrderAppraiseSelf(OrderBase orderBase, Map<String, List<SysDictRef>> sysDictRefDLMap,
|
|
|
+ List<OrderAppraise> oanew,
|
|
|
+ String downloadTaskNo, List<Long> getSynReqId,
|
|
|
+ List<FaGreeSms> faGreeSms,List<OrderAppeal> orderAppeal) {
|
|
|
+ WebsitFWS websitFWS = new WebsitFWS();
|
|
|
+ int jcaninsert=1;
|
|
|
+ int cpflag=0;
|
|
|
+ int canappeal = 0;
|
|
|
+ Boolean cppjly = Boolean.FALSE;
|
|
|
+ List<ItfTblAzAssignSatisfactionDownload> sas = new ArrayList<>();
|
|
|
+ List<OrderAppraise> oa = new ArrayList<>();
|
|
|
+ Map<String,List<OrderAppraise>> oaMap = new HashMap<>();
|
|
|
+
|
|
|
+ String spmessage="";
|
|
|
+ String cpid="";
|
|
|
+ OrderAppraise zpoa=null;
|
|
|
+
|
|
|
+
|
|
|
+ Date ssDate = new Date();
|
|
|
+ Date jzDate = new Date();
|
|
|
+ List<ItfReceiveSms> irsms = new ArrayList<>();
|
|
|
+
|
|
|
+
|
|
|
+ publicService.getExpireTime(orderBase, ssDate, jzDate);
|
|
|
+
|
|
|
+
|
|
|
+ sas = itfTblAzAssignSatisfactionDownloadService.lambdaQuery()
|
|
|
+ .eq(ItfTblAzAssignSatisfactionDownload::getDownloadTaskNo, downloadTaskNo)
|
|
|
+ .eq(ItfTblAzAssignSatisfactionDownload::getSynStatus,0)
|
|
|
+ .orderByAsc(ItfTblAzAssignSatisfactionDownload::getHfsj)
|
|
|
+ .list();
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ irsms = itfReceiveSmsService.lambdaQuery()
|
|
|
+ .eq(ItfReceiveSms::getSynStatus,0)
|
|
|
+ .orderByAsc(ItfReceiveSms::getSynReqId)
|
|
|
+ .list();
|
|
|
+
|
|
|
+ for (ItfReceiveSms item:irsms){
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ spmessage = publicService.getSpmessage(orderBase, spmessage);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ spmessage = publicService.getSpmessage(orderBase, spmessage);
|
|
|
+
|
|
|
+
|
|
|
+ OrderAppeal oldcpss = orderAppealService.lambdaQuery()
|
|
|
+ .eq(OrderAppeal::getOrderBaseId,orderBase.getId())
|
|
|
+ .last("limit 1").one();
|
|
|
+
|
|
|
+ for (ItfTblAzAssignSatisfactionDownload s :sas){
|
|
|
+
|
|
|
+
|
|
|
+ jcaninsert=1;
|
|
|
+
|
|
|
+
|
|
|
+ if (s.getSxlx()==0){
|
|
|
+ spmessage = s.getPjnr();
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ if (checkRecord(orderBase, s)) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ if (checkFrontRecord(s)) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ cppjly = publicService.getCppjly(s.getPjly().trim());
|
|
|
+
|
|
|
+ if (cppjly){
|
|
|
+ OrderAppraise oldoat = orderAppraiseService.lambdaQuery()
|
|
|
+ .eq(OrderAppraise::getOrderBaseId,orderBase.getId())
|
|
|
+ .ne(OrderAppraise::getAppraiseStatus,"A").last("limit 1").one();
|
|
|
+ if (oldoat==null){
|
|
|
+ canappeal=1;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ if (s.getSynStatus().equals(0) && s.getSxlx().equals(0)){
|
|
|
+ OrderAppraise oldoatt = orderAppraiseService.lambdaQuery()
|
|
|
+ .eq(OrderAppraise::getOrderBaseId,orderBase.getId())
|
|
|
+ .eq(OrderAppraise::getPid,s.getId())
|
|
|
+ .eq(OrderAppraise::getType,1)
|
|
|
+ .last("limit 1").one();
|
|
|
+ if (oldoatt !=null){
|
|
|
+ jcaninsert=0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ if (StringUtils.isEmpty(orderBase.getUserMobile()) &&
|
|
|
+ (orderBase.getOverTime()==null && orderBase.getWebsitOverTime()==null)){
|
|
|
+ s.setSynStatus(9);
|
|
|
+ s.setSynTime(new Date());
|
|
|
+ s.setSynErrMsg("工单未报完工不处理评价短信");
|
|
|
+ s.updateById();
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ if (jcaninsert==1){
|
|
|
+ websitFWS = getOrderAppreise(orderBase, sysDictRefDLMap, oanew, s);
|
|
|
+
|
|
|
+ if (zpoa==null){
|
|
|
+ zpoa=oanew.get(oanew.size()-1);
|
|
|
+ } else {
|
|
|
+ if (zpoa.getCreateTime().before(oanew.get(oanew.size()-1).getCreateTime())){
|
|
|
+ zpoa=oanew.get(oanew.size()-1);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ if (oanew.size()>0){
|
|
|
+ orderAppraiseService.saveBatch(oanew);
|
|
|
+ oanew.clear();
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ addcpsms(orderBase, s, websitFWS, faGreeSms, jzDate);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ setOrderAppraisemessage(orderBase, s);
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ if (oldcpss==null && cpflag==0) {
|
|
|
+
|
|
|
+ cpflag = getCp(orderBase, orderAppeal,s,ssDate);
|
|
|
+ if (cpflag==1){
|
|
|
+ cpid=s.getId();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ s.setSynStatus(1);
|
|
|
+ s.setSynTime(new Date());
|
|
|
+ s.updateById();
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ getOrderAppeal(orderAppeal, cpflag, spmessage, cpid, zpoa, oldcpss);
|
|
|
+ }
|
|
|
+
|
|
|
public void addOrUpdateOrderDataApi(ItfTblAzAssignLcLsDownload item,
|
|
|
List<ItfTblAzAssignMxDownload> mxsynreqids,
|
|
|
List<ItfTblAzAssignFkmxDownload> synreqids,List<OrderInstallOperatingLog> addoiolList,
|