Explorar o código

PC端取消订单时也允许推送模板消息

longmeizhen@avic-s.com hai 1 ano
pai
achega
3f88323fa3

+ 4 - 3
src/main/java/com/palmnest/service/estateserve/airconditioner/impl/ConditionerAddTimeServiceImpl.java

@@ -38,6 +38,7 @@ import com.palmnest.service.virtProject.manager.VirtualAccountManager;
 import lombok.extern.slf4j.Slf4j;
 import net.sf.json.JSONObject;
 
+import org.apache.commons.collections.CollectionUtils;
 import org.apache.commons.lang.StringUtils;
 import org.apache.poi.hssf.usermodel.HSSFWorkbook;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -1086,7 +1087,7 @@ public class ConditionerAddTimeServiceImpl implements ConditionerAddTimeService
 			String types = "5,6";
 			List<Map<String, Object>> list = enterprisePermissionDao.getGoodsConfig(bill.getOrganizationId().longValue(), types,"");
 
-			if (list.size() > bill.getSort()) {
+			if (null != bill.getSort() && null != list && list.size() >0 && list.size() > bill.getSort()) {
 
 				bill.setType(Integer.parseInt(list.get(bill.getSort()).get("type").toString()));//下一级审批人
 				bill.setRoleId(Integer.parseInt(list.get(bill.getSort()).get("roleId").toString()));
@@ -1291,9 +1292,9 @@ public class ConditionerAddTimeServiceImpl implements ConditionerAddTimeService
 				
 			}
 			//取消发微信消息
-			if(!dto.getBillFrom().equals(CodeConstants.PC)){
+//			if(!dto.getBillFrom().equals(CodeConstants.PC)){
 				conditionerAddTimeManager.sendCancelWechat(bill, bill.getCancelReason());
-			}
+//			}
 		} catch (Exception e) {
 			e.printStackTrace();
 		}