|
|
@@ -21,6 +21,7 @@ import com.goafanti.common.constant.ErrorConstants;
|
|
|
import com.goafanti.common.controller.CertifyApiController;
|
|
|
import com.goafanti.common.enums.AchievementAuditStatus;
|
|
|
import com.goafanti.common.enums.AchievementOrderFields;
|
|
|
+import com.goafanti.common.enums.AchievementOrderStatus;
|
|
|
import com.goafanti.common.enums.AchievementReleaseStatus;
|
|
|
import com.goafanti.common.enums.AttachmentType;
|
|
|
import com.goafanti.common.enums.DeleteStatus;
|
|
|
@@ -56,7 +57,54 @@ public class PortalOrderApiController extends CertifyApiController {
|
|
|
@Resource
|
|
|
private AchievementOrderService achievementOrderService;
|
|
|
|
|
|
+ /**
|
|
|
+ * 科技成果Log
|
|
|
+ */
|
|
|
+ @RequestMapping(value = "/achievementOrderLog", method =RequestMethod.GET)
|
|
|
+ public Result achievementOrderLog(String achievementOrderId){
|
|
|
+ Result res = new Result();
|
|
|
+
|
|
|
+ if (StringUtils.isEmpty(achievementOrderId)) {
|
|
|
+ res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "", "科技成果订单ID"));
|
|
|
+ return res;
|
|
|
+ }
|
|
|
+ AchievementOrder order = achievementOrderService.selectByPrimaryKey(achievementOrderId);
|
|
|
+ if (null != order && TokenManager.getUserId().equals(order.getUid())) {
|
|
|
+ res.setData(achievementOrderLogService.selectAchievementOrderLogByAchievementOrderId(achievementOrderId));
|
|
|
+ } else {
|
|
|
+ res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "科技成果订单ID"));
|
|
|
+ }
|
|
|
+
|
|
|
+ return res;
|
|
|
+ }
|
|
|
|
|
|
+ /**
|
|
|
+ * 关闭科技成果订单
|
|
|
+ */
|
|
|
+ @RequestMapping(value = "/achievementShutdown", method = RequestMethod.POST)
|
|
|
+ public Result achevementShutdown(String id){
|
|
|
+ Result res = new Result();
|
|
|
+
|
|
|
+ if (StringUtils.isBlank(id)) {
|
|
|
+ res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到订单ID", "订单ID"));
|
|
|
+ return res;
|
|
|
+ }
|
|
|
+
|
|
|
+ AchievementOrder order = achievementOrderService.selectByPrimaryKey(id);
|
|
|
+ if (null == order) {
|
|
|
+ res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "订单ID"));
|
|
|
+ return res;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (!AchievementOrderStatus.CREATE.getCode().equals(order.getStatus())) {
|
|
|
+ res.getError().add(buildError("", "当前状态无法撤销!"));
|
|
|
+ return res;
|
|
|
+ }
|
|
|
+
|
|
|
+ res.setData(achievementOrderService.updateShutdownByUser(order));
|
|
|
+
|
|
|
+ return res;
|
|
|
+ }
|
|
|
|
|
|
/**
|
|
|
* 科技成果订单列表
|