|
|
@@ -5,12 +5,14 @@ import com.alibaba.fastjson.JSONObject;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.apache.shiro.SecurityUtils;
|
|
|
import org.jeecg.common.api.vo.Result;
|
|
|
import org.jeecg.common.exception.JeecgBootException;
|
|
|
import org.jeecg.common.system.vo.LoginUser;
|
|
|
import org.jeecg.common.util.businessAccountUtils;
|
|
|
+import org.jeecg.modules.api.SysBaseRemoteApi;
|
|
|
import org.jeecg.modules.hlwaccount.entity.HlwCompany;
|
|
|
import org.jeecg.modules.hlwaccount.entity.HlwCompanyAccount;
|
|
|
import org.jeecg.modules.hlwaccount.entity.HlwCompanyAccountDetail;
|
|
|
@@ -64,6 +66,7 @@ import static org.jeecg.common.util.DateUtils.now;
|
|
|
* @Date: 2020-07-21
|
|
|
* @Version: V1.0
|
|
|
*/
|
|
|
+@Slf4j
|
|
|
@Service
|
|
|
public class HlwPaymentServiceImpl extends ServiceImpl<HlwPaymentMapper, HlwPayment> implements IHlwPaymentService {
|
|
|
|
|
|
@@ -95,6 +98,9 @@ public class HlwPaymentServiceImpl extends ServiceImpl<HlwPaymentMapper, HlwPaym
|
|
|
private IHlwOrderService hlwOrderService;
|
|
|
@Autowired
|
|
|
private IHlwUserService hlwUserService;
|
|
|
+ @Autowired
|
|
|
+ private SysBaseRemoteApi sysBaseRemoteApi;
|
|
|
+
|
|
|
|
|
|
@Override
|
|
|
public Page<HlwPayment> pageList(Page<HlwPayment> page, HlwPayment hlwPayment, QueryWrapper<HlwPayment> queryWrapper) {
|
|
|
@@ -470,6 +476,21 @@ public class HlwPaymentServiceImpl extends ServiceImpl<HlwPaymentMapper, HlwPaym
|
|
|
updateAccountA_B(hlwPayment);
|
|
|
}
|
|
|
result.success("付款提交成功!等待银行返回结果");
|
|
|
+ try {
|
|
|
+ /**
|
|
|
+ * 推送消息
|
|
|
+ */
|
|
|
+ JSONObject jsonObject = new JSONObject();
|
|
|
+ String title = "付款单" + hlwPaymentEntity.getPaymentCode();
|
|
|
+ String message = "共发放" + hlwPaymentDetailList.size() + "人,合计金额" + totalPayment + "元";
|
|
|
+ jsonObject.put("userId", "e9ca23d68d884d4ebb19d07889727dae");
|
|
|
+ jsonObject.put("title", title);
|
|
|
+ jsonObject.put("message", message);
|
|
|
+ sysBaseRemoteApi.sendUserByWebSocket(jsonObject);
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.info("推送异常===,{}", e.getStackTrace());
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
} else {
|
|
|
result.error500("付款提交失败!");
|
|
|
}
|
|
|
@@ -720,6 +741,21 @@ public class HlwPaymentServiceImpl extends ServiceImpl<HlwPaymentMapper, HlwPaym
|
|
|
updateAccountA_B(hlwPayment);
|
|
|
}
|
|
|
result.success("付款提交成功!等待银行返回结果");
|
|
|
+ try {
|
|
|
+ /**
|
|
|
+ * 推送消息
|
|
|
+ */
|
|
|
+ JSONObject jsonObject = new JSONObject();
|
|
|
+ String title = "付款单" + hlwPaymentEntity.getPaymentCode();
|
|
|
+ String message = "共发放" + hlwPaymentDetailList.size() + "人,合计金额" + totalPayment + "元";
|
|
|
+ jsonObject.put("userId", "e9ca23d68d884d4ebb19d07889727dae");
|
|
|
+ jsonObject.put("title", title);
|
|
|
+ jsonObject.put("message", message);
|
|
|
+ sysBaseRemoteApi.sendUserByWebSocket(jsonObject);
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.info("推送异常===,{}", e.getStackTrace());
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
} else {
|
|
|
result.error500("付款提交失败!");
|
|
|
}
|