refactor(deletedata):调整删除逻辑并优化代码- 修改销售发票、销售出库单和销售订单的删除条件- 移除不必要的代码和注释
- 添加 deleteTarget 方法实现异步删除
This commit is contained in:
parent
3a08dee5cc
commit
17d42022bf
|
@ -57,13 +57,13 @@ public class SoSaleReturnPluginInitializerToCTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
BdBusitypeEntity bdBusitypeEntity1 = queryBdBusitypeUtil.queryBdBusitype("TOC销售");
|
// BdBusitypeEntity bdBusitypeEntity1 = queryBdBusitypeUtil.queryBdBusitype("TOC销售");
|
||||||
System.out.println("TOC销售:" + bdBusitypeEntity1.getPkBusitype());
|
// System.out.println("TOC销售:" + bdBusitypeEntity1.getPkBusitype());
|
||||||
BdBusitypeEntity bdBusitypeEntity2 = queryBdBusitypeUtil.queryBdBusitype("TOC冲发出商品");
|
BdBusitypeEntity bdBusitypeEntity2 = queryBdBusitypeUtil.queryBdBusitype("TOC冲发出商品");
|
||||||
System.out.println("TOC冲发出商品:" + bdBusitypeEntity2.getPkBusitype());
|
System.out.println("TOC冲发出商品:" + bdBusitypeEntity2.getPkBusitype());
|
||||||
BdBusitypeEntity bdBusitypeEntity3 = queryBdBusitypeUtil.queryBdBusitype("TOC确认收入");
|
BdBusitypeEntity bdBusitypeEntity3 = queryBdBusitypeUtil.queryBdBusitype("TOC确认收入");
|
||||||
System.out.println("TOC确认收入:" + bdBusitypeEntity3.getPkBusitype());
|
System.out.println("TOC确认收入:" + bdBusitypeEntity3.getPkBusitype());
|
||||||
BdBusitypeEntity bdBusitypeEntity4 = queryBdBusitypeUtil.queryBdBusitype("TOC售后完成");
|
// BdBusitypeEntity bdBusitypeEntity4 = queryBdBusitypeUtil.queryBdBusitype("TOC售后完成");
|
||||||
System.out.println("TOC售后完成:" + bdBusitypeEntity4.getPkBusitype());
|
// System.out.println("TOC售后完成:" + bdBusitypeEntity4.getPkBusitype());
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -29,8 +29,9 @@ public class DeleteU8cDataUtilTest {
|
||||||
//删除销售发票
|
//删除销售发票
|
||||||
// deleteU8cDataUtil.deleteSoSaleinvoice();
|
// deleteU8cDataUtil.deleteSoSaleinvoice();
|
||||||
//删除销售出库单
|
//删除销售出库单
|
||||||
deleteU8cDataUtil.deleteIcGeneralH();
|
// deleteU8cDataUtil.deleteIcGeneralH();
|
||||||
//删除销售订单
|
//删除销售订单
|
||||||
|
deleteU8cDataUtil.deleteSoSale();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@ package com.hzya.frame.deletedata;
|
||||||
|
|
||||||
import cn.hutool.http.HttpRequest;
|
import cn.hutool.http.HttpRequest;
|
||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
//import com.alibaba.fastjson.JSONObject;
|
||||||
import com.hzya.frame.deletedata.dao.DeleteU8cDataUtilDao;
|
import com.hzya.frame.deletedata.dao.DeleteU8cDataUtilDao;
|
||||||
import com.hzya.frame.deletedata.entity.DeleteU8cDataUtilEntity;
|
import com.hzya.frame.deletedata.entity.DeleteU8cDataUtilEntity;
|
||||||
//import com.hzya.frame.plugin.lets.dao.ISoSaleinvoiceDao;
|
//import com.hzya.frame.plugin.lets.dao.ISoSaleinvoiceDao;
|
||||||
|
@ -11,7 +11,7 @@ import com.hzya.frame.deletedata.entity.DeleteU8cDataUtilEntity;
|
||||||
import com.hzya.frame.deletedata.vo.*;
|
import com.hzya.frame.deletedata.vo.*;
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.apache.logging.log4j.LogManager;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.apache.logging.log4j.Logger;
|
||||||
import org.junit.jupiter.api.Test;
|
//import org.junit.jupiter.api.Test;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
@ -33,6 +33,21 @@ public class DeleteU8cDataUtil {
|
||||||
|
|
||||||
protected Logger logger = LogManager.getLogger(super.getClass());
|
protected Logger logger = LogManager.getLogger(super.getClass());
|
||||||
|
|
||||||
|
public void deleteTarget() {
|
||||||
|
Thread thread = new Thread(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
//删除销售发票
|
||||||
|
deleteSoSaleinvoice();
|
||||||
|
//删除销售出库单
|
||||||
|
deleteIcGeneralH();
|
||||||
|
//删除销售订单
|
||||||
|
deleteSoSale();
|
||||||
|
}
|
||||||
|
}, "删除U8C11月份TOC对应的销售发票、销售出库单、销售订单");
|
||||||
|
thread.start();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除销售订单
|
* 删除销售订单
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
so_saleinvoice a
|
so_saleinvoice a
|
||||||
LEFT JOIN bd_corp b ON b.pk_corp = a.pk_corp
|
LEFT JOIN bd_corp b ON b.pk_corp = a.pk_corp
|
||||||
WHERE
|
WHERE
|
||||||
a.cbiztype IN ( '0001A110000000000E7S', '0001A110000000001TH5', '0001A110000000001TH6', '0001A11000000000H1FM' )
|
a.cbiztype IN ('0001A110000000001TH5', '0001A110000000001TH6')
|
||||||
AND a.dbilldate >= '2024-11-01 00:00:00'
|
AND a.dbilldate >= '2024-11-01 00:00:00'
|
||||||
AND a.dbilldate <= '2024-11-30 23:59:59'
|
AND a.dbilldate <= '2024-11-30 23:59:59'
|
||||||
AND a.FSTATUS = 1
|
AND a.FSTATUS = 1
|
||||||
|
@ -52,7 +52,7 @@
|
||||||
ic_general_h a
|
ic_general_h a
|
||||||
LEFT JOIN bd_corp b ON b.pk_corp = a.pk_corp
|
LEFT JOIN bd_corp b ON b.pk_corp = a.pk_corp
|
||||||
WHERE
|
WHERE
|
||||||
a.cbiztype IN ( '0001A110000000000E7S', '0001A110000000001TH5', '0001A110000000001TH6', '0001A11000000000H1FM' )
|
a.cbiztype IN ('0001A110000000001TH5', '0001A110000000001TH6')
|
||||||
AND a.dbilldate >= '2024-11-01 00:00:00'
|
AND a.dbilldate >= '2024-11-01 00:00:00'
|
||||||
AND a.dbilldate <= '2024-11-30 23:59:59'
|
AND a.dbilldate <= '2024-11-30 23:59:59'
|
||||||
AND a.fbillflag = 2
|
AND a.fbillflag = 2
|
||||||
|
@ -80,10 +80,10 @@
|
||||||
so_sale a
|
so_sale a
|
||||||
LEFT JOIN bd_corp b ON b.pk_corp = a.pk_corp
|
LEFT JOIN bd_corp b ON b.pk_corp = a.pk_corp
|
||||||
WHERE
|
WHERE
|
||||||
a.cbiztype IN ( '0001A110000000000E7S', '0001A110000000001TH5', '0001A110000000001TH6', '0001A11000000000H1FM' )
|
a.cbiztype IN ('0001A110000000001TH5', '0001A110000000001TH6')
|
||||||
AND a.dbilldate >= '2024-11-01 00:00:00'
|
AND a.dbilldate >= '2024-11-01 00:00:00'
|
||||||
AND a.dbilldate <= '2024-11-30 23:59:59'
|
AND a.dbilldate <= '2024-11-30 23:59:59'
|
||||||
AND a.fstatus = 2
|
AND a.fstatus = 1
|
||||||
AND a.dr = 0
|
AND a.dr = 0
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
Loading…
Reference in New Issue