Explorar o código

报价单需求修改

haoyu %!s(int64=2) %!d(string=hai) anos
pai
achega
486fafea87

+ 16 - 0
src/main/java/com/ydtech/modules/admin/controller/SysQuotationController.java

@@ -146,4 +146,20 @@ public class SysQuotationController extends BaseController {
         return HttpResult.ok("配置成功");
     }
 
+
+    @ApiOperation(value = "获取用户对应报价单")
+    @GetMapping(value = "/getThemeByUserId")
+    public HttpResult<SysOrganizationQuotation> getThemeByUserId() {
+        SysUser user = getUser();
+        LambdaQueryWrapper<SysOrganizationQuotation> oQueryWrapper = new LambdaQueryWrapper<>();
+        oQueryWrapper.eq(SysOrganizationQuotation::getAuthorizationId, user.getId());
+        SysOrganizationQuotation quotationServiceOne = sysOrganizationQuotationService.getOne(oQueryWrapper);
+        if (quotationServiceOne == null) {
+            quotationServiceOne = new SysOrganizationQuotation();
+            quotationServiceOne.setThemeCode("QD");
+        }
+        return HttpResult.ok(quotationServiceOne);
+    }
+
+
 }