Browse Source

临时收款表修改

anderx 2 years ago
parent
commit
1db92a67c7

+ 2 - 0
src/main/java/com/goafanti/common/dao/TOrderNewMapper.java

@@ -79,4 +79,6 @@ public interface TOrderNewMapper {
     List<TOrderNewBo> selectByuidandAid(@Param("uid")String uid,@Param("aid") String aid);
 
     List<StatisOrderList>  statisticsOrderList(InputStatistics in);
+
+    List<TOrderNewBo>  matchingOrderNoOrUserName(@Param("orderNo") String orderNo, @Param("userName")String userName);
 }

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

@@ -2081,5 +2081,17 @@ left join department d on o.order_dep = d.id   left join t_order_mid a on o.orde
     </if>
   </select>
 
+  <select id="matchingOrderNoOrUserName" resultType="com.goafanti.order.bo.TOrderNewBo">
+    select order_no ,buyer_id ,b.nickname
+    from t_order_new a left join `user` b on a.buyer_id =b.id
+    where 1=1
+    <if test="orderNo !=null">
+      and   order_no like concat('%',#{orderNo},'%')
+    </if>
+    <if test="userName !=null">
+      and   b.nickname like concat('%',#{userName},'%')
+    </if>
+  </select>
+
 
 </mapper>

+ 41 - 7
src/main/java/com/goafanti/order/controller/AdminOrderReceivablesApiController.java

@@ -249,16 +249,50 @@ public class AdminOrderReceivablesApiController extends CertifyApiController {
 		 return  excel.exportExcel(list,"订单流水列表",response);
     }
 
-    @RequestMapping(value = "/waitingMerge",method = RequestMethod.POST)
+	@RequestMapping(value = "/waitingMerge",method = RequestMethod.POST)
 	public Result waitingMerge(String ids){
-    	Result res=new Result();
-    	if (ids==null||ids.isEmpty()){
-    		res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"回款编号"));
-    		return res;
+		Result res=new Result();
+		if (ids==null||ids.isEmpty()){
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"回款编号"));
+			return res;
 		}
-    	res.data(orderReceivablesService.pushWaitingMerge(ids));
-    	return res;
+		res.data(orderReceivablesService.pushWaitingMerge(ids));
+		return res;
+	}
+
+	/**
+	 * 匹配
+	 * @param value 匹配数据值
+	 * @return
+	 */
+	@RequestMapping(value = "/matchingOrderNo",method = RequestMethod.GET)
+	public Result matchingOrderNo(String value){
+		Result res=new Result();
+		if (value==null){
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"数据值"));
+			return res;
+		}
+		res.data(orderReceivablesService.matchingOrderNo(value));
+		return res;
 	}
 
+	/**
+	 * 匹配
+	 * @param value 匹配数据值
+	 * @return
+	 */
+	@RequestMapping(value = "/matchingUser",method = RequestMethod.GET)
+	public Result matchingUser(String value){
+		Result res=new Result();
+
+		if (value==null){
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"数据值"));
+			return res;
+		}
+		res.data(orderReceivablesService.matchingUser(value));
+		return res;
+	}
+
+
 
 }

+ 7 - 0
src/main/java/com/goafanti/order/service/OrderReceivablesService.java

@@ -1,8 +1,11 @@
 package com.goafanti.order.service;
 
+import java.util.List;
 import java.util.Map;
 
 
+import com.goafanti.common.model.User;
+import com.goafanti.order.bo.TOrderNewBo;
 import org.springframework.web.multipart.MultipartFile;
 
 import com.goafanti.core.mybatis.page.Pagination;
@@ -34,4 +37,8 @@ public interface OrderReceivablesService {
 
 
     int pushWaitingMerge(String ids);
+
+    List<TOrderNewBo> matchingOrderNo(String value);
+
+	List<TOrderNewBo> matchingUser(String value);
 }

+ 12 - 6
src/main/java/com/goafanti/order/service/impl/OrderReceivablesServiceImpl.java

@@ -6,6 +6,7 @@ import java.util.*;
 import javax.annotation.Resource;
 
 import com.goafanti.admin.service.DepartmentService;
+import com.goafanti.common.model.*;
 import com.goafanti.order.bo.*;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.poi.ss.usermodel.Cell;
@@ -34,12 +35,6 @@ import com.goafanti.common.dao.TOrderTaskMapper;
 import com.goafanti.common.dao.TemporaryReceivablesMapper;
 import com.goafanti.common.enums.OrderLogProcess;
 import com.goafanti.common.error.BusinessException;
-import com.goafanti.common.model.TOrderBillNew;
-import com.goafanti.common.model.TOrderBonus;
-import com.goafanti.common.model.TOrderLog;
-import com.goafanti.common.model.TOrderNew;
-import com.goafanti.common.model.TOrderTask;
-import com.goafanti.common.model.TemporaryReceivables;
 import com.goafanti.common.utils.DateUtils;
 import com.goafanti.common.utils.ExcelUtils;
 import com.goafanti.common.utils.ExportExcelUtil;
@@ -584,4 +579,15 @@ public class OrderReceivablesServiceImpl extends BaseMybatisDao<TemporaryReceiva
 		return 1;
 	}
 
+	@Override
+	public List<TOrderNewBo> matchingOrderNo(String value) {
+			tOrderNewMapper.matchingOrderNoOrUserName(value,null);
+		return null;
+	}
+
+	@Override
+	public List<TOrderNewBo> matchingUser(String value) {
+		return null;
+	}
+
 }