anderx лет назад: 2
Родитель
Сommit
7304d16cd4

+ 14 - 0
src/main/java/com/goafanti/order/controller/AdminNewOrderApiController.java

@@ -849,6 +849,20 @@ public class AdminNewOrderApiController extends CertifyApiController {
 		return res.data(orderNewService.updateOrderUrl(orderNo,contractPictureUrl,agreementUrl,serviceContent));
 	}
 
+	@RequestMapping(value = "/updateTag",method = RequestMethod.POST)
+	public Result updateTag(String orderNo,Integer tag){
+		Result res=new Result();
+		if (orderNo==null){
+			res.getError().add(buildErrorMessageParams(ErrorConstants.PARAM_EMPTY_ERROR,"订单编号"));
+			return res;
+		}
+		if (tag==null){
+			res.getError().add(buildErrorMessageParams(ErrorConstants.PARAM_EMPTY_ERROR,"项目标签"));
+			return res;
+		}
+		return res.data(orderNewService.updateTag(orderNo,tag));
+	}
+
 
 
 }

+ 19 - 35
src/main/java/com/goafanti/order/controller/OrderProjectApiController.java

@@ -1,22 +1,20 @@
 package com.goafanti.order.controller;
 
 
-import java.io.IOException;
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import javax.validation.Valid;
-
-import com.goafanti.common.model.TOrderTask;
+import com.goafanti.common.bo.Result;
+import com.goafanti.common.constant.AFTConstants;
+import com.goafanti.common.constant.ErrorConstants;
+import com.goafanti.common.controller.CertifyApiController;
+import com.goafanti.common.enums.OfficialPatentType;
+import com.goafanti.common.model.TTaskHours;
 import com.goafanti.common.utils.ParamUtils;
+import com.goafanti.common.utils.StringUtils;
+import com.goafanti.common.utils.excel.NewExcelUtil;
 import com.goafanti.core.mybatis.page.Pagination;
+import com.goafanti.core.shiro.token.TokenManager;
 import com.goafanti.order.bo.*;
 import com.goafanti.order.service.OrderNewService;
+import com.goafanti.order.service.OrderProjectService;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
@@ -26,16 +24,14 @@ import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.RestController;
 
-import com.goafanti.common.bo.Result;
-import com.goafanti.common.constant.AFTConstants;
-import com.goafanti.common.constant.ErrorConstants;
-import com.goafanti.common.controller.CertifyApiController;
-import com.goafanti.common.enums.OfficialPatentType;
-import com.goafanti.common.model.TTaskHours;
-import com.goafanti.common.utils.StringUtils;
-import com.goafanti.common.utils.excel.NewExcelUtil;
-import com.goafanti.core.shiro.token.TokenManager;
-import com.goafanti.order.service.OrderProjectService;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.validation.Valid;
+import java.io.IOException;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.List;
 
 @RestController
 @RequestMapping(value = "/api/admin/orderProject")
@@ -801,19 +797,7 @@ public class OrderProjectApiController extends CertifyApiController {
 	}
 
 
-	@RequestMapping(value = "/updateTag",method = RequestMethod.POST)
-	public Result updateTag(Integer id,Integer tag){
-		Result res=new Result();
-		if (id==null){
-			res.getError().add(buildErrorMessageParams(ErrorConstants.PARAM_EMPTY_ERROR,"项目编号"));
-			return res;
-		}
-		if (tag==null){
-			res.getError().add(buildErrorMessageParams(ErrorConstants.PARAM_EMPTY_ERROR,"项目标签"));
-			return res;
-		}
-		orderProjectService.updateTag(id,tag);
-	}
+
 
 
 

+ 2 - 0
src/main/java/com/goafanti/order/service/OrderNewService.java

@@ -219,4 +219,6 @@ public interface OrderNewService {
     OrderProcessName getProcessName(String orderNo);
 
 	 void addTTaskMember(Integer id, String serviceLife, String serviceYear, Integer yearSum, String contractTerm);
+
+	int updateTag(String orderNo, Integer tag);
 }

+ 0 - 1
src/main/java/com/goafanti/order/service/OrderProjectService.java

@@ -148,5 +148,4 @@ public interface OrderProjectService {
 
     Object updateSatisfactionDegree(Integer id, Integer formRetrieve, Integer satisfactionDegree, String satisfactionDegreeUrl);
 
-    int  updateTag(Integer id, Integer tag);
 }

+ 8 - 0
src/main/java/com/goafanti/order/service/impl/OrderNewServiceImpl.java

@@ -255,6 +255,14 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 	}
 
 	@Override
+	public int updateTag(String orderNo, Integer tag) {
+		TOrderNew t=new TOrderNew();
+		t.setOrderNo(orderNo);
+		t.setTag(tag);
+		return tOrderNewMapper.updateByPrimaryKeySelective(t);
+	}
+
+	@Override
 	public int addTaskMid(Integer id, String commodityId, String orderNo) {
 		InputAddTask t = new InputAddTask();
 		t.setId(id);

+ 1 - 7
src/main/java/com/goafanti/order/service/impl/OrderProjectServiceImpl.java

@@ -1668,12 +1668,6 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 		return tOrderTaskMapper.updateByPrimaryKeySelective(in);
 	}
 
-	@Override
-	public int updateTag(Integer id, Integer tag) {
-		TOrderTask task=new TOrderTask();
-		task.setId(id);
-		task.setTag(tag);
-		return tOrderTaskMapper.updateByPrimaryKeySelective(task);
-	}
+
 
 }