|
|
@@ -17,7 +17,9 @@ import com.goafanti.common.bo.Result;
|
|
|
import com.goafanti.common.constant.ErrorConstants;
|
|
|
import com.goafanti.common.controller.CertifyApiController;
|
|
|
import com.goafanti.common.enums.AchievementOrderFields;
|
|
|
+import com.goafanti.common.enums.AchievementOrderStatus;
|
|
|
import com.goafanti.common.enums.DemandOrderStatus;
|
|
|
+import com.goafanti.common.model.AchievementOrder;
|
|
|
import com.goafanti.common.model.DemandOrder;
|
|
|
import com.goafanti.common.model.DemandOrderLog;
|
|
|
import com.goafanti.demand.bo.InputDemandOrder;
|
|
|
@@ -37,6 +39,34 @@ public class AdminOrderApiController extends CertifyApiController {
|
|
|
private AchievementOrderLogService achievementOrderLogService;
|
|
|
|
|
|
/**
|
|
|
+ * 关闭科技成果线索单/意向单
|
|
|
+ */
|
|
|
+ @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;
|
|
|
+ }
|
|
|
+ Boolean unSign = false;
|
|
|
+ if (AchievementOrderStatus.CREATE.getCode().equals(order.getStatus())
|
|
|
+ || AchievementOrderStatus.INTENTIONMONEY.getCode().equals(order.getStatus())) {
|
|
|
+ unSign = true;
|
|
|
+ }
|
|
|
+
|
|
|
+ res.setData(achievementOrderService.updateShutdownByUser(order, unSign));
|
|
|
+
|
|
|
+ return res;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
* 科技成果线索单/意向单Log
|
|
|
*/
|
|
|
@RequestMapping(value = "/achievementOrderLog", method = RequestMethod.GET)
|