|
@@ -23,6 +23,7 @@ import com.tianhu.common.security.annotation.PreAuthorize;
|
|
|
import com.tianhu.common.security.service.TokenService;
|
|
|
import com.tianhu.system.api.RemoteConfigService;
|
|
|
import com.tianhu.system.api.RemoteFileService;
|
|
|
+import com.tianhu.system.api.RemoteZxBankService;
|
|
|
import com.tianhu.system.api.domain.SysUser;
|
|
|
import com.tianhu.system.api.model.LoginUser;
|
|
|
import org.apache.commons.io.IOUtils;
|
|
@@ -101,6 +102,8 @@ public class RecordSealController extends BaseController {
|
|
|
private ISysUserCompanyRelService iSysUserCompanyRelService;
|
|
|
@Autowired
|
|
|
private IPayAccInfService iPayAccInfService;
|
|
|
+ @Autowired
|
|
|
+ private RemoteZxBankService remoteZxBankService;
|
|
|
//待办服务类
|
|
|
@Autowired
|
|
|
private ISysNoticeService sysNoticeService;
|
|
@@ -796,23 +799,44 @@ public class RecordSealController extends BaseController {
|
|
|
}
|
|
|
/**
|
|
|
* 缴费状态修改
|
|
|
- * @param zfrId 融资id
|
|
|
+ * @param map 融资id
|
|
|
* @return
|
|
|
* @throws Exception
|
|
|
*/
|
|
|
- @PostMapping("/updateChargeStatus/{zfrId}/{zciStatus}")
|
|
|
- public AjaxResult updateChargeStatus(@PathVariable String zfrId,@PathVariable String zciStatus) throws Exception {
|
|
|
- //获取此操作员
|
|
|
- LoginUser userInfo = tokenService.getLoginUser();
|
|
|
- SysUser user = userInfo.getSysUser();
|
|
|
- String userId = user.getUserId()+"";
|
|
|
- LambdaQueryWrapper<ZcChargeInf> queryWrapper = new LambdaQueryWrapper<>();
|
|
|
- queryWrapper.eq(ZcChargeInf::getZciFinanceId,zfrId);
|
|
|
- ZcChargeInf zcChargeInf = new ZcChargeInf();
|
|
|
- zcChargeInf.setZciStatus(zciStatus);
|
|
|
- zcChargeInf.setUpdateBy(userId);
|
|
|
- zcChargeInf.setUpdateTime(DateUtils.getNowDate());
|
|
|
- iZcChargeInfService.update(zcChargeInf,queryWrapper);
|
|
|
+ @PostMapping("/updateChargeStatus")
|
|
|
+ public AjaxResult updateChargeStatus(@RequestBody Map<String, Object> map) throws Exception {
|
|
|
+ String tranAmt = CommonUtil.objToString(map.get("tranAmt"));
|
|
|
+ String type = CommonUtil.objToString(map.get("type"));
|
|
|
+ String businessId = CommonUtil.objToString(map.get("businessId"));
|
|
|
+ String zciStatus = CommonUtil.objToString(map.get("zciStatus"));
|
|
|
+ String zfrId = CommonUtil.objToString(map.get("zfrId"));
|
|
|
+ //调用缴费接口
|
|
|
+ R bank = remoteZxBankService.transferPay("", "", tranAmt, businessId, type);
|
|
|
+ System.out.println("bank========>"+bank);
|
|
|
+ Map maps = (Map) bank.getData();
|
|
|
+ System.out.println("maps========>"+maps);
|
|
|
+ if(maps!=null&&maps.containsKey("status")) {
|
|
|
+ //状态 0 交易中 1 成功 2 失败
|
|
|
+ String status = maps.get("status").toString();
|
|
|
+ //退款成功费用列表改为退款成功
|
|
|
+ if ("1".equals(status)) {
|
|
|
+ //获取此操作员
|
|
|
+ LoginUser userInfo = tokenService.getLoginUser();
|
|
|
+ SysUser user = userInfo.getSysUser();
|
|
|
+ String userId = user.getUserId()+"";
|
|
|
+ LambdaQueryWrapper<ZcChargeInf> queryWrapper = new LambdaQueryWrapper<>();
|
|
|
+ queryWrapper.eq(ZcChargeInf::getZciFinanceId,zfrId);
|
|
|
+ ZcChargeInf zcChargeInf = new ZcChargeInf();
|
|
|
+ zcChargeInf.setZciStatus(zciStatus);
|
|
|
+ zcChargeInf.setUpdateBy(userId);
|
|
|
+ zcChargeInf.setUpdateTime(DateUtils.getNowDate());
|
|
|
+ iZcChargeInfService.update(zcChargeInf,queryWrapper);
|
|
|
+ } else if ("2".equals(status)) {
|
|
|
+ throw new Exception("缴费失败,前去费用管理再次缴费");
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ throw new Exception("缴费失败,前去费用管理再次缴费");
|
|
|
+ }
|
|
|
return AjaxResult.success();
|
|
|
}
|
|
|
|