Browse Source

营销员列表修改

Signed-off-by: anderx <312518615@qq.com>
anderx 6 years ago
parent
commit
f8b96f1e7e

+ 12 - 3
src/main/java/com/goafanti/common/constant/AFTConstants.java

@@ -21,10 +21,19 @@ public class AFTConstants {
 
 	public static final String	VICE_CEO							= "99997";				// 集团副总
 
-		
 	public static final String  TECH_ADMIN                          = "9998";				// 技术管理员
 	
 	public static final String  FINANCE_ADMIN                       = "9997";				// 财务管理员
+	
+	public static final String  SALESMAN_ADMIN                      = "9996";				// 营销管理员
+	
+	public static final String  SALESMAN_MANAGER                    = "996";				// 营销经理
+	
+	public static final String  SALESMAN                      		= "96";					// 营销员
+	
+	public static final String  TECH_MANAGER                        = "998";				// 技术管理员
+	
+	public static final String  TECH		                        = "98";				// 技术管理员
 
 	public static final String	AREAADMIN							= "";					// 地区管理员
 
@@ -32,9 +41,9 @@ public class AFTConstants {
 
 	public static final String	MANAGERADMIN						= "";					// 客户经理
 	
-	public static final String  FINANCEMANAGERADMIN					= "997";					// 财务经理
+	public static final String  FINANCE_MANAGER						= "997";				// 财务经理
 	
-	public static final String  FINANCEADMIN						= "97";					// 财务专员
+	public static final String  FINANCE								= "97";					// 财务专员
 
 	public static final String	SALESMANAGERADMIN					= "";					// 营销经理
 

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

@@ -1245,7 +1245,7 @@ where super_id is null )  e on e.order_no=a.order_no
   	and a.order_status not in(5,7)
   	</if>
   	<if test="specially == 5">
-  	and c.department_id in
+  	and a.order_dep in
   	<foreach close=")" collection="deps" item="deps" open="(" separator=",">
 	 #{deps.id}
   	</foreach>
@@ -1263,7 +1263,7 @@ where super_id is null )  e on e.order_no=a.order_no
   	and b.nickname like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
   	</if>
   	<if test="orderNo != null"> 
-  	and a.order_no = #{orderNo,jdbcType=VARCHAR}
+  	and a.order_no like CONCAT('%',#{orderNo,jdbcType=VARCHAR},'%') 
   	</if>
   	<if test="contractNo != null">
   	and a.contract_no like CONCAT('%',#{contractNo,jdbcType=VARCHAR},'%')
@@ -1289,7 +1289,7 @@ where super_id is null )  e on e.order_no=a.order_no
   	desc
   	</if>
   	<if test="page_sql!=null">
-			${page_sql}
+	${page_sql}
 	</if>
   </select>
   
@@ -1353,7 +1353,7 @@ where super_id is null ) e on e.order_no=a.order_no
   	and b.nickname like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
   	</if>
   	<if test="orderNo != null">
-  	and a.order_no = #{orderNo,jdbcType=VARCHAR}
+  	and a.order_no like CONCAT('%',#{orderNo,jdbcType=VARCHAR},'%') 
   	</if>
   	<if test="contractNo != null">
   	and a.contract_no like CONCAT('%',#{contractNo,jdbcType=VARCHAR},'%')
@@ -1392,9 +1392,8 @@ where super_id is null ) e on e.order_no=a.order_no
   	<if test="adminName != null">
   	and d.name  like CONCAT('%',#{adminName,jdbcType=VARCHAR},'%')
   	</if>
-  	
   	<if test="orderNo != null">
-  	and a.order_no = #{orderNo,jdbcType=VARCHAR}
+  	and a.order_no like CONCAT('%',#{orderNo,jdbcType=VARCHAR},'%') 
   	</if>
   	<if test="depId != null">
   	and dep.id= #{depId,jdbcType=VARCHAR}

+ 3 - 0
src/main/java/com/goafanti/order/bo/TOrderNewBo.java

@@ -309,6 +309,9 @@ public class TOrderNewBo extends TOrderNew{
 		this.dunStatus = dunStatus;
 	}
 	public BigDecimal getInvoiceAmount() {
+		if (invoiceAmount==null) {
+			return new BigDecimal(0);
+		}
 		return invoiceAmount;
 	}
 	public void setInvoiceAmount(BigDecimal invoiceAmount) {

+ 0 - 15
src/main/java/com/goafanti/order/bo/TOrderTaskBo.java

@@ -19,24 +19,9 @@ public class TOrderTaskBo extends TOrderTask{
 	
 	private Integer orderStatus;
 	private BigDecimal price;
-	private String outsourceName;
 	
-	private BigDecimal outsourcePrice;
 	
 	
-	
-	public String getOutsourceName() {
-		return outsourceName;
-	}
-	public void setOutsourceName(String outsourceName) {
-		this.outsourceName = outsourceName;
-	}
-	public BigDecimal getOutsourcePrice() {
-		return outsourcePrice;
-	}
-	public void setOutsourcePrice(BigDecimal outsourcePrice) {
-		this.outsourcePrice = outsourcePrice;
-	}
 	public String getContractNo() {
 		return contractNo;
 	}

+ 2 - 2
src/main/java/com/goafanti/order/service/impl/FundManagerOrderServiceImpl.java

@@ -157,11 +157,11 @@ public class FundManagerOrderServiceImpl extends BaseMybatisDao<TOrderNewMapper>
 			Integer pageNo, Integer pageSize) {
 		Map<String, Object> result = new HashMap<String, Object>();
 		Map<String, Object> params = new HashMap<String, Object>();
-		if(TokenManager.hasRole(AFTConstants.FINANCEADMIN)) {
+		if(TokenManager.hasRole(AFTConstants.FINANCE)) {
 			order.setFinanceId(TokenManager.getAdminId());
 		}
 		List<String> fids=null;
-		if(TokenManager.hasRole(AFTConstants.FINANCEMANAGERADMIN)) {
+		if(TokenManager.hasRole(AFTConstants.FINANCE_MANAGER)) {
 			fids =adminMapper.selectBySuperId(TokenManager.getAdminId());
 			params.put("fids", fids);
 		}

+ 16 - 1
src/main/java/com/goafanti/order/service/impl/OrderNewServiceImpl.java

@@ -42,6 +42,7 @@ import com.alibaba.fastjson.JSON;
 import com.goafanti.admin.bo.AdminListBo;
 import com.goafanti.common.bo.EmailBo;
 import com.goafanti.common.bo.Error;
+import com.goafanti.common.constant.AFTConstants;
 import com.goafanti.common.constant.ErrorConstants;
 import com.goafanti.common.dao.AdminMapper;
 import com.goafanti.common.dao.IdleContractNoMapper;
@@ -234,11 +235,25 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 
 	@Override
 	public List<TOrderTaskBo> selectOrderTask(String orderNo) {
-		return tOrderTaskMapper.selectOrderTask(orderNo);
+		List<TOrderTaskBo> list=new ArrayList<>();
+		list=tOrderTaskMapper.selectOrderTask(orderNo);
+		if (TokenManager.hasRole(AFTConstants.SALESMAN)) {
+			for (TOrderTaskBo t : list) {
+				t.setOutsourceName("****");
+				t.setOutsourcePrice(new BigDecimal(0));
+				t.setDeclareUser("****");
+				t.setDeclarePwd("****");
+				t.setCertificateNumber("****");
+				t.setCommodityPrice(new BigDecimal(0));
+			}
+		}
+		return list;
 	}
 
 
 
+
+
 	@Override
 	public int updateServiceOrder(TOrderNew t, Integer isSubmit) {
 		TOrderNew t2=tOrderNewMapper.selectByPrimaryKey(t.getOrderNo());

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

@@ -206,7 +206,13 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 
 	@Override
 	public TOrderTaskDetailBo orderTaskDetail(String id) {
-		return tOrderTaskMapper.getOrderTaskDetail(id);
+		TOrderTaskDetailBo t=tOrderTaskMapper.getOrderTaskDetail(id);
+		t.setOutsourceName("****");
+		t.setOutsourcePrice("****");
+		t.setDeclareUser("****");
+		t.setDeclarePwd("****");
+		t.setCertificateNumber("****");
+		return t;
 	}
 
 	@Override