|
|
@@ -4,6 +4,7 @@ import java.util.Arrays;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
+import javax.servlet.http.HttpServletResponse;
|
|
|
import javax.validation.Valid;
|
|
|
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
@@ -33,6 +34,25 @@ public class AdminDemandApiController extends CertifyApiController {
|
|
|
private DemandService demandService;
|
|
|
@Resource
|
|
|
private UserService userService;
|
|
|
+
|
|
|
+ @RequestMapping(value = "/download", method = RequestMethod.GET)
|
|
|
+ public Result download(HttpServletResponse response, String id) {
|
|
|
+ Result res = new Result();
|
|
|
+
|
|
|
+ if (StringUtils.isEmpty(id)) {
|
|
|
+ res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "需求ID"));
|
|
|
+ return res;
|
|
|
+ }
|
|
|
+
|
|
|
+ Demand d = demandService.selectByPrimaryKey(id);
|
|
|
+ if (null == d) {
|
|
|
+ res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "需求ID"));
|
|
|
+ return res;
|
|
|
+ }
|
|
|
+
|
|
|
+ //downloadFile(response, t.getApprovalDownloadFileName(), t.getApprovalUrl());
|
|
|
+ return res;
|
|
|
+ }
|
|
|
|
|
|
/**
|
|
|
* 需求管理--获取组织用户下拉
|