|
@@ -1,6 +1,62 @@
|
|
|
package com.huyi.service.credit.controller;
|
|
|
|
|
|
+import com.huyi.service.base.entity.ZcFinanceInf;
|
|
|
+import com.huyi.service.base.service.IZcFinanceInfService;
|
|
|
+import com.tianhu.common.core.domain.R;
|
|
|
+import com.tianhu.common.core.utils.CommonUtil;
|
|
|
import com.tianhu.common.core.web.controller.BaseController;
|
|
|
+import com.tianhu.common.core.web.domain.AjaxResult;
|
|
|
+import com.tianhu.common.security.annotation.PreAuthorize;
|
|
|
+import com.tianhu.common.security.service.TokenService;
|
|
|
+import com.tianhu.system.api.RemoteCommonService;
|
|
|
+import org.apache.poi.ss.formula.functions.T;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.web.bind.annotation.PutMapping;
|
|
|
+import org.springframework.web.bind.annotation.RequestBody;
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
+import java.util.Map;
|
|
|
+
|
|
|
+/**
|
|
|
+ * 融信审批
|
|
|
+ * @author ch
|
|
|
+ * @date 2021-08-31
|
|
|
+ */
|
|
|
+@RestController
|
|
|
+@RequestMapping("/financeInf")
|
|
|
public class CreditApproveController extends BaseController {
|
|
|
+ @Autowired
|
|
|
+ private TokenService tokenService;
|
|
|
+ @Autowired
|
|
|
+ private RemoteCommonService remoteCommonService;
|
|
|
+ @Autowired
|
|
|
+ private IZcFinanceInfService zcFinanceInfService;
|
|
|
+ /**
|
|
|
+ * 融资企业申请融信提交审批
|
|
|
+ * @param map
|
|
|
+ * @return
|
|
|
+ * @throws Exception
|
|
|
+ */
|
|
|
+ @PreAuthorize(hasPermi = "service:financeApply:approval")
|
|
|
+ @PutMapping("/submitApproval")
|
|
|
+ public AjaxResult submitApproval(@RequestBody Map<String,Object> map ) throws Exception {
|
|
|
+ //WaLeaveInf wal = waLeaveInfService.getById(waLeaveInf.getWliId());
|
|
|
+ R<T> r = this.remoteCommonService.leaveStart(map);
|
|
|
+ if (200 != (r.getCode())) {
|
|
|
+ if("300".equals(r.getMsg())){
|
|
|
+ return AjaxResult.success();
|
|
|
+ }
|
|
|
+ throw new Exception(r.getMsg());
|
|
|
+ }else {
|
|
|
+ String zfiId = CommonUtil.objToString(map.get("zfiId"));
|
|
|
+ ZcFinanceInf zfi = new ZcFinanceInf();
|
|
|
+ zfi.setZfiId(zfiId);
|
|
|
+ //修改融资企业申请融信审核中
|
|
|
+ zfi.setZfiSupplierStatus("00");
|
|
|
+ zcFinanceInfService.updateById(zfi);
|
|
|
+ }
|
|
|
+ return AjaxResult.success();
|
|
|
+ }
|
|
|
+
|
|
|
}
|