Pārlūkot izejas kodu

按车扣款修改

linbl 1 mēnesi atpakaļ
vecāks
revīzija
36dafb7811

+ 1 - 1
sp-service/level-one-server/src/main/java/com/pj/ht_trade_settlement/HtTradeSettlementMapper.xml

@@ -93,7 +93,7 @@
 			<when test='sortType == 31'> sell_goods_list desc </when>
 			<when test='sortType == 32'> id desc </when>
 			<when test='sortType == 33'> finish_time desc </when>
-			<otherwise> plat_seq_no desc </otherwise>
+			<otherwise> create_time desc ,id desc </otherwise>
 		</choose>
 	</select>
 	<select id="getOnSaleList" resultType="com.pj.ht_trade_settlement.HtTradeSettlement">

+ 4 - 4
sp-service/level-one-server/src/main/java/com/pj/tb_order/TbOrderController.java

@@ -138,8 +138,8 @@ public class TbOrderController {
 	/** 订单补扣款——按车,并且未扣款 */
 	@RequestMapping("deductionByVeNo")
 	@SaCheckPermission(TbOrder.PERMISSION_CODE_DEDUCTION)
-	public AjaxJson deductionByVeNo(String veNo){
-		tbOrderService.deductionByVeNo(veNo);
+	public AjaxJson deductionByVeNo(String veNo, Long id){
+		tbOrderService.deductionByVeNo(veNo, id);
 		return AjaxJson.getSuccess();
 	}
 	@RequestMapping("getDeductionByVeNoList")
@@ -180,8 +180,8 @@ public class TbOrderController {
 	/** 订单补推结关信息给银行——按车,并且未完成 */
 	@RequestMapping("sendCXB001ByVeNo")
 	@SaCheckPermission(TbOrder.PERMISSION_CODE_SENDCXB001)
-	public AjaxJson sendCXB001ByVeNo(String veNo){
-		tbOrderService.sendCXB001ByVeNo(veNo);
+	public AjaxJson sendCXB001ByVeNo(String veNo, Long id){
+		tbOrderService.sendCXB001ByVeNo(veNo, id);
 		return AjaxJson.getSuccess();
 	}
 	@RequestMapping("getSendCXB001ByVeNoList")

+ 2 - 1
sp-service/level-one-server/src/main/java/com/pj/tb_order/TbOrderMapper.xml

@@ -181,7 +181,7 @@
 			<when test='sortType == 48'> update_by desc </when>
 			<when test='sortType == 49'> update_name desc </when>
 			<when test='sortType == 50'> delete_status desc </when>
-			<otherwise> id desc </otherwise>
+			<otherwise> create_time desc ,id desc </otherwise>
 		</choose>
 	</select>
 
@@ -199,6 +199,7 @@
 		<if test=' this.has("productName") '>and goods_names like concat('%',#{productName},'%')</if>
 		<if test=' this.has("dateBegin") '>and date_format(create_time,'%Y-%m-%d') &gt;=#{dateBegin}</if>
 		<if test=' this.has("dateEnd") '>and date_format(create_time,'%Y-%m-%d') &lt;=#{dateEnd}</if>
+		<if test=' this.has("id") '> and sale_main_id = #{id} </if>
 		order by up_time desc
 
 	</select>

+ 8 - 4
sp-service/level-one-server/src/main/java/com/pj/tb_order/TbOrderService.java

@@ -738,10 +738,11 @@ public class TbOrderService extends ServiceImpl<TbOrderMapper, TbOrder> implemen
     /**
      * 订单补扣款——按车,并且未扣款
      */
-    public boolean deductionByVeNo(String veNo) {
+    public boolean deductionByVeNo(String veNo, Long id) {
         LambdaQueryWrapper<TbOrder> wrapper = new LambdaQueryWrapper<>();
         wrapper.eq(TbOrder::getVeNo, veNo);
-        wrapper.ne(TbOrder::getSxb010Status, 1);
+        wrapper.eq(TbOrder::getSaleMainId, id);
+        wrapper.ne(TbOrder::getSxb010Status, 1).orderByDesc(TbOrder::getCreateTime);
         List<TbOrder> tbOrders = tbOrderMapper.selectList(wrapper);
         if (!tbOrders.isEmpty()) {
             for (TbOrder tbOrder : tbOrders) {
@@ -759,7 +760,8 @@ public class TbOrderService extends ServiceImpl<TbOrderMapper, TbOrder> implemen
     List<TbOrder> getDeductionByVeNoList(SoMap so) {
         LambdaQueryWrapper<TbOrder> wrapper = new LambdaQueryWrapper<>();
         wrapper.eq(TbOrder::getVeNo, so.getString("veNo"));
-        wrapper.ne(TbOrder::getSxb010Status, 1);
+        wrapper.eq(TbOrder::getSaleMainId, so.getLong("id"));
+        wrapper.ne(TbOrder::getSxb010Status, 1).orderByDesc(TbOrder::getCreateTime);
         List<TbOrder> tbOrders = tbOrderMapper.selectList(wrapper);
         return tbOrders;
     }
@@ -872,9 +874,10 @@ public class TbOrderService extends ServiceImpl<TbOrderMapper, TbOrder> implemen
     /**
      * 订单补推结关信息给银行——按车,并且未完成
      */
-    public boolean sendCXB001ByVeNo(String veNo) {
+    public boolean sendCXB001ByVeNo(String veNo, Long id) {
         LambdaQueryWrapper<TbOrder> wrapper = new LambdaQueryWrapper<>();
         wrapper.eq(TbOrder::getVeNo, veNo);
+        wrapper.eq(TbOrder::getSaleMainId, id);
         wrapper.ne(TbOrder::getFinishStatus, 1).orderByDesc(TbOrder::getCreateTime);
         List<TbOrder> tbOrders = tbOrderMapper.selectList(wrapper);
 
@@ -910,6 +913,7 @@ public class TbOrderService extends ServiceImpl<TbOrderMapper, TbOrder> implemen
     List<TbOrder> getSendCXB001ByVeNoList(SoMap so) {
         LambdaQueryWrapper<TbOrder> wrapper = new LambdaQueryWrapper<>();
         wrapper.eq(TbOrder::getVeNo, so.getString("veNo"));
+        wrapper.eq(TbOrder::getSaleMainId, so.getLong("id"));
         wrapper.ne(TbOrder::getFinishStatus, 1).orderByDesc(TbOrder::getCreateTime);
         List<TbOrder> tbOrders = tbOrderMapper.selectList(wrapper);
         return tbOrders;