Browse Source

新增项目标签

anderx 2 years ago
parent
commit
ffe7357d92

+ 6 - 0
src/main/java/com/goafanti/common/mapper/TOrderNewMapper.xml

@@ -1077,6 +1077,9 @@ left join department d on o.order_dep = d.id   left join t_order_mid a on o.orde
   	<if test="liquidationStatus != null">
   	and a.liquidation_status = #{liquidationStatus,jdbcType=INTEGER}
   	</if>
+    <if test="tag != null">
+    and a.tag= #{tag}
+    </if>
   	<if test="amountStatus == 0">
   	and a.total_amount &lt; 10
   	</if>
@@ -1246,6 +1249,9 @@ left join department d on o.order_dep = d.id   left join t_order_mid a on o.orde
   	<if test="liquidationStatus != null">
   	and a.liquidation_status = #{liquidationStatus,jdbcType=INTEGER}
   	</if>
+     <if test="tag != null">
+       and a.tag= #{tag}
+     </if>
   	<if test="amountStatus == 0">
   	and a.total_amount &lt; 10
   	</if>

+ 9 - 0
src/main/java/com/goafanti/order/bo/InputOrderNewListBo.java

@@ -23,9 +23,18 @@ public class InputOrderNewListBo {
     private String uid;
     private Integer projectType;
     private Integer processStatus;
+    private Integer tag;
     private  Integer pageNo;
     private Integer pageSize;
 
+    public Integer getTag() {
+        return tag;
+    }
+
+    public void setTag(Integer tag) {
+        this.tag = tag;
+    }
+
     public String getDeps() {
         return deps;
     }

+ 15 - 0
src/main/java/com/goafanti/order/controller/OrderProjectApiController.java

@@ -801,5 +801,20 @@ 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);
+	}
+
+
 
 }

+ 4 - 3
src/main/java/com/goafanti/order/service/OrderProjectService.java

@@ -1,17 +1,16 @@
 package com.goafanti.order.service;
 
-import java.util.List;
-
 import com.goafanti.common.bo.Result;
 import com.goafanti.common.bo.UserOrderTask;
 import com.goafanti.common.model.TOrderTask;
 import com.goafanti.common.model.TTaskHours;
 import com.goafanti.core.mybatis.page.Pagination;
 import com.goafanti.order.bo.*;
-import com.goafanti.order.bo.InputProjectCheck;
 import com.goafanti.order.controller.InputTaskStopLog;
 import com.goafanti.organization.bo.OutPaymentNode;
 
+import java.util.List;
+
 public interface OrderProjectService {
 
 	/**
@@ -148,4 +147,6 @@ public interface OrderProjectService {
 
 
     Object updateSatisfactionDegree(Integer id, Integer formRetrieve, Integer satisfactionDegree, String satisfactionDegreeUrl);
+
+    int  updateTag(Integer id, Integer tag);
 }

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

@@ -910,6 +910,9 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 		if(null != in.getProcessStatus()) {
 			params.put("processStatus", in.getProcessStatus());
 		}
+		if(null != in.getTag()){
+			params.put("tag",in.getTag());
+		}
 		params.put("outsource", in.getOutsource());
 		return null;
 	}

+ 32 - 25
src/main/java/com/goafanti/order/service/impl/OrderProjectServiceImpl.java

@@ -1,27 +1,34 @@
 package com.goafanti.order.service.impl;
 
-import java.io.UnsupportedEncodingException;
-import java.math.BigDecimal;
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
-import java.util.*;
-
-import javax.mail.MessagingException;
-
 import com.alibaba.fastjson.JSON;
 import com.goafanti.admin.service.DepartmentService;
-import com.goafanti.common.bo.*;
 import com.goafanti.common.bo.Error;
+import com.goafanti.common.bo.*;
+import com.goafanti.common.constant.AFTConstants;
+import com.goafanti.common.constant.ErrorConstants;
 import com.goafanti.common.dao.*;
+import com.goafanti.common.enums.ChannelStatus;
+import com.goafanti.common.enums.NoticeStatus;
 import com.goafanti.common.enums.NoticeTypes;
+import com.goafanti.common.enums.OrderLogProcess;
+import com.goafanti.common.error.BusinessException;
 import com.goafanti.common.model.*;
-import com.goafanti.common.utils.*;
+import com.goafanti.common.utils.AsyncUtils;
+import com.goafanti.common.utils.DateUtils;
+import com.goafanti.common.utils.LoggerUtils;
+import com.goafanti.common.utils.SendEmailUtil;
 import com.goafanti.common.utils.excel.NewExcelUtil;
+import com.goafanti.core.mybatis.BaseMybatisDao;
+import com.goafanti.core.mybatis.page.Pagination;
+import com.goafanti.core.shiro.token.TokenManager;
 import com.goafanti.order.bo.*;
 import com.goafanti.order.controller.InputTaskStopLog;
 import com.goafanti.order.enums.*;
 import com.goafanti.order.service.OrderChangeService;
-import com.goafanti.organization.bo.ProjectTypePuls;
+import com.goafanti.order.service.OrderNewService;
+import com.goafanti.order.service.OrderProjectService;
+import com.goafanti.organization.bo.OutPaymentNode;
+import com.goafanti.techproject.enums.TaskState;
 import org.apache.commons.collections4.map.HashedMap;
 import org.apache.commons.lang3.StringUtils;
 import org.slf4j.Logger;
@@ -32,20 +39,12 @@ import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
-import com.goafanti.common.constant.AFTConstants;
-import com.goafanti.common.constant.ErrorConstants;
-import com.goafanti.common.enums.ChannelStatus;
-import com.goafanti.common.enums.NoticeStatus;
-import com.goafanti.common.enums.OrderLogProcess;
-import com.goafanti.common.error.BusinessException;
-import com.goafanti.core.mybatis.BaseMybatisDao;
-import com.goafanti.core.mybatis.page.Pagination;
-import com.goafanti.core.shiro.token.TokenManager;
-import com.goafanti.order.bo.InputProjectCheck;
-import com.goafanti.order.service.OrderNewService;
-import com.goafanti.order.service.OrderProjectService;
-import com.goafanti.organization.bo.OutPaymentNode;
-import com.goafanti.techproject.enums.TaskState;
+import javax.mail.MessagingException;
+import java.io.UnsupportedEncodingException;
+import java.math.BigDecimal;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.*;
 
 @Service
 public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> implements OrderProjectService {
@@ -1669,4 +1668,12 @@ 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);
+	}
+
 }