Compare commits
3 Commits
e7a43b9833
...
57100e6333
Author | SHA1 | Date |
---|---|---|
|
57100e6333 | |
|
c7c763bc60 | |
|
1a093c1577 |
|
@ -30,6 +30,7 @@ import java.io.FileInputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
import java.util.concurrent.CountDownLatch;
|
||||||
import java.util.concurrent.ExecutorService;
|
import java.util.concurrent.ExecutorService;
|
||||||
import java.util.concurrent.Executors;
|
import java.util.concurrent.Executors;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
@ -60,39 +61,66 @@ public class DeleteU8cDataUtil {
|
||||||
|
|
||||||
private static Integer MARK2 = 0;
|
private static Integer MARK2 = 0;
|
||||||
|
|
||||||
|
CountDownLatch latch = new CountDownLatch(2);
|
||||||
|
|
||||||
@PostConstruct
|
@PostConstruct
|
||||||
public void init() {
|
public void init() {
|
||||||
deleteTargetU8cData();
|
// deleteTargetU8cData();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void deleteTargetU8cData() {
|
public void deleteTargetU8cData() {
|
||||||
Thread thread = new Thread(new Runnable() {
|
Thread thread000 = new Thread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
synchronized (LOCK_OBJECT) {
|
// Thread thread = new Thread(new Runnable() {
|
||||||
if (MARK == 0) {
|
// @Override
|
||||||
MARK = 1;
|
// public void run() {
|
||||||
//删除销售出库单
|
// synchronized (LOCK_OBJECT) {
|
||||||
cancelSignatureSoSaleReadExcel20250528V2();
|
// if (MARK == 0) {
|
||||||
}
|
// MARK = 1;
|
||||||
}
|
// //删除销售出库单
|
||||||
}
|
//// cancelSignatureSoSaleReadExcel20250528V2();
|
||||||
}, "删除销售出库单 2025-05-29");
|
// //反审核销售订单
|
||||||
thread.start();
|
//// cancelSignatureSoSaleReadExcel2505282140V2();
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// latch.countDown();
|
||||||
|
// }
|
||||||
|
// }, "反审核销售订单 2025-05-30");
|
||||||
|
// thread.start();
|
||||||
|
//
|
||||||
|
// Thread thread2 = new Thread(new Runnable() {
|
||||||
|
// @Override
|
||||||
|
// public void run() {
|
||||||
|
// synchronized (LOCK_OBJECT2) {
|
||||||
|
// if (MARK2 == 0) {
|
||||||
|
// MARK2 = 1;
|
||||||
|
// //删除销售发票
|
||||||
|
//// abandonmentReviewSoSaleinvoice2505282107();
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// latch.countDown();
|
||||||
|
// }
|
||||||
|
// }, "删除销售发票 2025-05-30");
|
||||||
|
// thread2.start();
|
||||||
|
|
||||||
Thread thread2 = new Thread(new Runnable() {
|
try {
|
||||||
@Override
|
//等待两个线程都完成
|
||||||
public void run() {
|
// latch.await();
|
||||||
synchronized (LOCK_OBJECT2) {
|
//在两个线程都完成后执行反审核销售订单方法
|
||||||
if (MARK2 == 0) {
|
// cancelSignatureSoSaleReadExcel2505282140V2();
|
||||||
MARK2 = 1;
|
//修复销售订单部门字段错误问题
|
||||||
//删除销售发票
|
// repairSoSaleDepartment();
|
||||||
abandonmentReviewSoSaleinvoice2505282107();
|
//销售订单审核
|
||||||
|
// salesOrderReviewV2();
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
// Thread.currentThread().interrupt();
|
||||||
|
// throw new RuntimeException("等待线程完成时中断", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}, "U8C单据逻辑处理:销售订单审核");
|
||||||
}, "删除销售发票 2025-05-29");
|
thread000.start();
|
||||||
thread2.start();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -545,6 +573,8 @@ public class DeleteU8cDataUtil {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private Object lockObject = new Object();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 2024年8月8日 10:54:48
|
* 2024年8月8日 10:54:48
|
||||||
* 推送U8C销售订单方法
|
* 推送U8C销售订单方法
|
||||||
|
@ -552,6 +582,7 @@ public class DeleteU8cDataUtil {
|
||||||
* @author liuyang
|
* @author liuyang
|
||||||
*/
|
*/
|
||||||
public void sendU8C(String url, String param, Integer number) throws Exception {
|
public void sendU8C(String url, String param, Integer number) throws Exception {
|
||||||
|
synchronized (lockObject) {
|
||||||
logger.info("入参:" + param);
|
logger.info("入参:" + param);
|
||||||
long l = System.currentTimeMillis();
|
long l = System.currentTimeMillis();
|
||||||
String result = HttpRequest.post(url).header("usercode", "admin1").header("password", "f7fcde654e968541cc803c4b08c30abb").header("system", "lz1").header("trantype", "code").body(param)//表单内容
|
String result = HttpRequest.post(url).header("usercode", "admin1").header("password", "f7fcde654e968541cc803c4b08c30abb").header("system", "lz1").header("trantype", "code").body(param)//表单内容
|
||||||
|
@ -564,6 +595,7 @@ public class DeleteU8cDataUtil {
|
||||||
// result = String.valueOf(jsonObject.get("attribute"));
|
// result = String.valueOf(jsonObject.get("attribute"));
|
||||||
// System.out.println(result);
|
// System.out.println(result);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 弃审应收单
|
* 弃审应收单
|
||||||
|
@ -1116,7 +1148,7 @@ public class DeleteU8cDataUtil {
|
||||||
List<DeleteU8cDataUtilEntity> soSaleinvoiceEntities2 = deleteU8cDataUtilDao.queryIcGeneralHByCancelSignatureV2(deleteIcGeneralHVo2);
|
List<DeleteU8cDataUtilEntity> soSaleinvoiceEntities2 = deleteU8cDataUtilDao.queryIcGeneralHByCancelSignatureV2(deleteIcGeneralHVo2);
|
||||||
Map<String, List<DeleteU8cDataUtilEntity>> stringListMap2 = groupByDbilldatev2(soSaleinvoiceEntities2);
|
Map<String, List<DeleteU8cDataUtilEntity>> stringListMap2 = groupByDbilldatev2(soSaleinvoiceEntities2);
|
||||||
if (stringListMap2.size() > 0) {
|
if (stringListMap2.size() > 0) {
|
||||||
for (Map.Entry<String, List<DeleteU8cDataUtilEntity>> entry : stringListMap.entrySet()) {
|
for (Map.Entry<String, List<DeleteU8cDataUtilEntity>> entry : stringListMap2.entrySet()) {
|
||||||
String key = entry.getKey();
|
String key = entry.getKey();
|
||||||
List<DeleteU8cDataUtilEntity> valueList = entry.getValue();
|
List<DeleteU8cDataUtilEntity> valueList = entry.getValue();
|
||||||
List<String> vreceiptcodeList = valueList.stream().map(DeleteU8cDataUtilEntity::getVbillcode).collect(Collectors.toList());
|
List<String> vreceiptcodeList = valueList.stream().map(DeleteU8cDataUtilEntity::getVbillcode).collect(Collectors.toList());
|
||||||
|
@ -1170,7 +1202,7 @@ public class DeleteU8cDataUtil {
|
||||||
try {
|
try {
|
||||||
//确定销售订单范围、19648
|
//确定销售订单范围、19648
|
||||||
List<DeleteU8cDataUtilEntity> deleteU8cDataUtilEntities = deleteU8cDataUtilDao.cancelSignatureSoSaleReadExcel20250528V2();
|
List<DeleteU8cDataUtilEntity> deleteU8cDataUtilEntities = deleteU8cDataUtilDao.cancelSignatureSoSaleReadExcel20250528V2();
|
||||||
List<List<DeleteU8cDataUtilEntity>> lists = SplitListByCountUtil.splitListByCount(deleteU8cDataUtilEntities, 100);
|
List<List<DeleteU8cDataUtilEntity>> lists = SplitListByCountUtil.splitListByCount(deleteU8cDataUtilEntities, 500);
|
||||||
if (lists.size() > 0) {
|
if (lists.size() > 0) {
|
||||||
for (int i = 0; i < lists.size(); i++) {
|
for (int i = 0; i < lists.size(); i++) {
|
||||||
List<DeleteU8cDataUtilEntity> deleteU8cDataUtilEntities1 = lists.get(i);
|
List<DeleteU8cDataUtilEntity> deleteU8cDataUtilEntities1 = lists.get(i);
|
||||||
|
@ -1266,16 +1298,15 @@ public class DeleteU8cDataUtil {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 销售订单取消签字+删除
|
* 销售订单取消签字
|
||||||
*/
|
*/
|
||||||
public void cancelSignatureSoSaleReadExcel2505282140V2() {
|
public void cancelSignatureSoSaleReadExcel2505282140V2() {
|
||||||
try {
|
try {
|
||||||
//确定销售订单范围、19648
|
//确定销售订单范围、19648
|
||||||
List<DeleteU8cDataUtilEntity> deleteU8cDataUtilEntities = deleteU8cDataUtilDao.cancelSignatureSoSaleReadExcel20250528V2();
|
List<DeleteU8cDataUtilEntity> deleteU8cDataUtilEntities = deleteU8cDataUtilDao.cancelSignatureSoSaleReadExcel20250528V2();
|
||||||
if (deleteU8cDataUtilEntities.size() > 0) {
|
if (deleteU8cDataUtilEntities.size() > 0) {
|
||||||
List<List<DeleteU8cDataUtilEntity>> lists = SplitListByCountUtil.splitListByCount(deleteU8cDataUtilEntities, 100);
|
List<List<DeleteU8cDataUtilEntity>> lists = SplitListByCountUtil.splitListByCount(deleteU8cDataUtilEntities, 500);
|
||||||
for (int i = 0; i < lists.size(); i++) {
|
for (int i = 0; i < lists.size(); i++) {
|
||||||
List<DeleteU8cDataUtilEntity> deleteU8cDataUtilEntities1 = lists.get(i);
|
List<DeleteU8cDataUtilEntity> deleteU8cDataUtilEntities1 = lists.get(i);
|
||||||
String concatenatedIds = deleteU8cDataUtilEntities1.stream().map(DeleteU8cDataUtilEntity::getCsaleid).map(csaleid -> "'" + csaleid + "'").collect(Collectors.joining(","));
|
String concatenatedIds = deleteU8cDataUtilEntities1.stream().map(DeleteU8cDataUtilEntity::getCsaleid).map(csaleid -> "'" + csaleid + "'").collect(Collectors.joining(","));
|
||||||
|
@ -1370,6 +1401,12 @@ public class DeleteU8cDataUtil {
|
||||||
deleteU8cDataUtilDao.updateCdeptid(updateSoSaleCdeptId);
|
deleteU8cDataUtilDao.updateCdeptid(updateSoSaleCdeptId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
List<DeleteU8cDataUtilEntity> deleteU8cDataUtilEntities2 = deleteU8cDataUtilDao.cancelSignatureSoSaleReadExcel20250528V2();
|
||||||
|
if (deleteU8cDataUtilEntities2 != null && deleteU8cDataUtilEntities2.size() > 0) {
|
||||||
|
//还存在部门字段错误的数据行,重新执行修复,确保目标数据被完全修复!
|
||||||
|
repairSoSaleDepartment();
|
||||||
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
@ -1381,7 +1418,8 @@ public class DeleteU8cDataUtil {
|
||||||
public void salesOrderReviewV2() {
|
public void salesOrderReviewV2() {
|
||||||
try {
|
try {
|
||||||
//确定销售订单范围、19648
|
//确定销售订单范围、19648
|
||||||
List<DeleteU8cDataUtilEntity> deleteU8cDataUtilEntities = deleteU8cDataUtilDao.cancelSignatureSoSaleReadExcel20250528V2();
|
//注意⚠️这里只能审核已经修复完毕的销售订单!并且处理自由状态
|
||||||
|
List<DeleteU8cDataUtilEntity> deleteU8cDataUtilEntities = deleteU8cDataUtilDao.cancelSignatureSoSaleReadExcel20250528V3();
|
||||||
if (deleteU8cDataUtilEntities.size() > 0) {
|
if (deleteU8cDataUtilEntities.size() > 0) {
|
||||||
List<List<DeleteU8cDataUtilEntity>> lists = SplitListByCountUtil.splitListByCount(deleteU8cDataUtilEntities, 100);
|
List<List<DeleteU8cDataUtilEntity>> lists = SplitListByCountUtil.splitListByCount(deleteU8cDataUtilEntities, 100);
|
||||||
for (int i = 0; i < lists.size(); i++) {
|
for (int i = 0; i < lists.size(); i++) {
|
||||||
|
@ -1391,7 +1429,7 @@ public class DeleteU8cDataUtil {
|
||||||
DeleteSoSaleVo deleteSoSaleVo = new DeleteSoSaleVo();
|
DeleteSoSaleVo deleteSoSaleVo = new DeleteSoSaleVo();
|
||||||
deleteSoSaleVo.setDataSourceCode("lets_u8c");
|
deleteSoSaleVo.setDataSourceCode("lets_u8c");
|
||||||
deleteSoSaleVo.setCsaleids(concatenatedIds);
|
deleteSoSaleVo.setCsaleids(concatenatedIds);
|
||||||
deleteSoSaleVo.setFstatus("1");
|
deleteSoSaleVo.setFstatus("1");//自由状态
|
||||||
List<DeleteU8cDataUtilEntity> deleteU8cDataUtilEntities2 = deleteU8cDataUtilDao.querySoSaleByDeletev2(deleteSoSaleVo);
|
List<DeleteU8cDataUtilEntity> deleteU8cDataUtilEntities2 = deleteU8cDataUtilDao.querySoSaleByDeletev2(deleteSoSaleVo);
|
||||||
Map<String, List<DeleteU8cDataUtilEntity>> deleteU8cDataUtilEntitiesMap = groupByDbilldatev2(deleteU8cDataUtilEntities2);
|
Map<String, List<DeleteU8cDataUtilEntity>> deleteU8cDataUtilEntitiesMap = groupByDbilldatev2(deleteU8cDataUtilEntities2);
|
||||||
if (deleteU8cDataUtilEntitiesMap.size() > 0) {
|
if (deleteU8cDataUtilEntitiesMap.size() > 0) {
|
||||||
|
@ -1422,14 +1460,18 @@ public class DeleteU8cDataUtil {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//再次确认是否存在已经修复完毕,但未审核的销售订单
|
||||||
List<DeleteU8cDataUtilEntity> deleteU8cDataUtilEntities22All = new ArrayList<>();
|
List<DeleteU8cDataUtilEntity> deleteU8cDataUtilEntities22All = new ArrayList<>();
|
||||||
List<DeleteU8cDataUtilEntity> deleteU8cDataUtilEntities2 = deleteU8cDataUtilDao.cancelSignatureSoSaleReadExcel20250528V2();
|
List<DeleteU8cDataUtilEntity> deleteU8cDataUtilEntities2 = deleteU8cDataUtilDao.cancelSignatureSoSaleReadExcel20250528V3();
|
||||||
if (deleteU8cDataUtilEntities2 != null) {
|
if (deleteU8cDataUtilEntities2 != null && deleteU8cDataUtilEntities2.size() > 0) {
|
||||||
List<List<DeleteU8cDataUtilEntity>> lists = SplitListByCountUtil.splitListByCount(deleteU8cDataUtilEntities, 999);
|
List<List<DeleteU8cDataUtilEntity>> lists = SplitListByCountUtil.splitListByCount(deleteU8cDataUtilEntities2, 999);
|
||||||
for (int i = 0; i < lists.size(); i++) {
|
for (int i = 0; i < lists.size(); i++) {
|
||||||
List<DeleteU8cDataUtilEntity> deleteU8cDataUtilEntities1 = lists.get(i);
|
List<DeleteU8cDataUtilEntity> deleteU8cDataUtilEntities1 = lists.get(i);
|
||||||
String concatenatedIds = deleteU8cDataUtilEntities1.stream().map(DeleteU8cDataUtilEntity::getCsaleid).map(csaleid -> "'" + csaleid + "'").collect(Collectors.joining(","));
|
String concatenatedIds = deleteU8cDataUtilEntities1.stream().map(DeleteU8cDataUtilEntity::getCsaleid).map(csaleid -> "'" + csaleid + "'").collect(Collectors.joining(","));
|
||||||
|
|
||||||
|
if (concatenatedIds == null || "".equals(concatenatedIds.trim())) {
|
||||||
|
throw new Exception("concatenatedIds == null || \"\".equals(concatenatedIds)");
|
||||||
|
}
|
||||||
DeleteSoSaleVo deleteSoSaleVo = new DeleteSoSaleVo();
|
DeleteSoSaleVo deleteSoSaleVo = new DeleteSoSaleVo();
|
||||||
deleteSoSaleVo.setDataSourceCode("lets_u8c");
|
deleteSoSaleVo.setDataSourceCode("lets_u8c");
|
||||||
deleteSoSaleVo.setCsaleids(concatenatedIds);
|
deleteSoSaleVo.setCsaleids(concatenatedIds);
|
||||||
|
@ -1452,89 +1494,89 @@ public class DeleteU8cDataUtil {
|
||||||
*
|
*
|
||||||
* @author liuyang
|
* @author liuyang
|
||||||
*/
|
*/
|
||||||
public void unApprovalDeleteAccountsReceivable() {
|
// public void unApprovalDeleteAccountsReceivable() {
|
||||||
try {
|
// try {
|
||||||
//确定销售订单范围、19648
|
// //确定销售订单范围、19648
|
||||||
List<DeleteU8cDataUtilEntity> deleteU8cDataUtilEntities = deleteU8cDataUtilDao.cancelSignatureSoSaleReadExcel20250528V2();
|
// List<DeleteU8cDataUtilEntity> deleteU8cDataUtilEntities = deleteU8cDataUtilDao.cancelSignatureSoSaleReadExcel20250528V2();
|
||||||
if (deleteU8cDataUtilEntities.size() > 0) {
|
// if (deleteU8cDataUtilEntities.size() > 0) {
|
||||||
List<List<DeleteU8cDataUtilEntity>> lists = SplitListByCountUtil.splitListByCount(deleteU8cDataUtilEntities, 500);
|
// List<List<DeleteU8cDataUtilEntity>> lists = SplitListByCountUtil.splitListByCount(deleteU8cDataUtilEntities, 500);
|
||||||
for (int i = 0; i < lists.size(); i++) {
|
// for (int i = 0; i < lists.size(); i++) {
|
||||||
List<DeleteU8cDataUtilEntity> deleteU8cDataUtilEntities1 = lists.get(i);
|
// List<DeleteU8cDataUtilEntity> deleteU8cDataUtilEntities1 = lists.get(i);
|
||||||
String concatenatedIds = deleteU8cDataUtilEntities1.stream().map(DeleteU8cDataUtilEntity::getCsaleid).map(csaleid -> "'" + csaleid + "'").collect(Collectors.joining(","));
|
// String concatenatedIds = deleteU8cDataUtilEntities1.stream().map(DeleteU8cDataUtilEntity::getCsaleid).map(csaleid -> "'" + csaleid + "'").collect(Collectors.joining(","));
|
||||||
//查询需要弃审的应收单
|
// //查询需要弃审的应收单
|
||||||
Map<String, List<Map<String, String>>> mapList = new HashMap();
|
// Map<String, List<Map<String, String>>> mapList = new HashMap();
|
||||||
List<Map<String, String>> mapList1 = new ArrayList<>();
|
// List<Map<String, String>> mapList1 = new ArrayList<>();
|
||||||
|
//
|
||||||
DeleteSoSaleVo deleteSoSaleVo = new DeleteSoSaleVo();
|
// DeleteSoSaleVo deleteSoSaleVo = new DeleteSoSaleVo();
|
||||||
deleteSoSaleVo.setCsaleid(concatenatedIds);
|
// deleteSoSaleVo.setCsaleid(concatenatedIds);
|
||||||
deleteSoSaleVo.setSpzt("1");
|
// deleteSoSaleVo.setSpzt("1");
|
||||||
List<ArapDjzbVo> arapDjzbVos = deleteU8cDataUtilDao.abandonmentAccountsReceivableDocV2(deleteSoSaleVo);
|
// List<ArapDjzbVo> arapDjzbVos = deleteU8cDataUtilDao.abandonmentAccountsReceivableDocV2(deleteSoSaleVo);
|
||||||
if (arapDjzbVos != null && arapDjzbVos.size() > 0) {
|
// if (arapDjzbVos != null && arapDjzbVos.size() > 0) {
|
||||||
for (int j = 0; j < arapDjzbVos.size(); j++) {
|
// for (int j = 0; j < arapDjzbVos.size(); j++) {
|
||||||
ArapDjzbVo arapDjzbVo = arapDjzbVos.get(j);
|
// ArapDjzbVo arapDjzbVo = arapDjzbVos.get(j);
|
||||||
|
//
|
||||||
Map<String, String> stringStringMap = new HashMap<>();
|
// Map<String, String> stringStringMap = new HashMap<>();
|
||||||
stringStringMap.put("djbh", arapDjzbVo.getDjbh());//单据编码
|
// stringStringMap.put("djbh", arapDjzbVo.getDjbh());//单据编码
|
||||||
stringStringMap.put("dwbm", arapDjzbVo.getUnitcode());//公司编码
|
// stringStringMap.put("dwbm", arapDjzbVo.getUnitcode());//公司编码
|
||||||
stringStringMap.put("operatedate", arapDjzbVo.getDjrq());//单据日期
|
// stringStringMap.put("operatedate", arapDjzbVo.getDjrq());//单据日期
|
||||||
stringStringMap.put("operatorid", "18846145294");//操作人编码
|
// stringStringMap.put("operatorid", "18846145294");//操作人编码
|
||||||
mapList1.add(stringStringMap);
|
// mapList1.add(stringStringMap);
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
if (mapList1.size() > 0) {
|
// if (mapList1.size() > 0) {
|
||||||
mapList.put("bills", mapList1);
|
// mapList.put("bills", mapList1);
|
||||||
// sendU8C("http://39.170.109.90:8088/u8cloud/api/arap/ys/unaudit", JSON.toJSONString(mapList), mapList1.size());
|
//// sendU8C("http://39.170.109.90:8088/u8cloud/api/arap/ys/unaudit", JSON.toJSONString(mapList), mapList1.size());
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
//删除应收单
|
// //删除应收单
|
||||||
DeleteSoSaleVo deleteSoSaleVo2 = new DeleteSoSaleVo();
|
// DeleteSoSaleVo deleteSoSaleVo2 = new DeleteSoSaleVo();
|
||||||
deleteSoSaleVo2.setCsaleid(concatenatedIds);
|
// deleteSoSaleVo2.setCsaleid(concatenatedIds);
|
||||||
// deleteSoSaleVo2.setSpzt("1");
|
//// deleteSoSaleVo2.setSpzt("1");
|
||||||
deleteSoSaleVo2.setSpztnull("1");//a.spzt is null
|
// deleteSoSaleVo2.setSpztnull("1");//a.spzt is null
|
||||||
List<ArapDjzbVo> arapDjzbVos2 = deleteU8cDataUtilDao.abandonmentAccountsReceivableDocV2(deleteSoSaleVo2);
|
// List<ArapDjzbVo> arapDjzbVos2 = deleteU8cDataUtilDao.abandonmentAccountsReceivableDocV2(deleteSoSaleVo2);
|
||||||
for (int j = 0; j < arapDjzbVos2.size(); j++) {
|
// for (int j = 0; j < arapDjzbVos2.size(); j++) {
|
||||||
ArapDjzbVo arapDjzbVo = arapDjzbVos2.get(j);
|
// ArapDjzbVo arapDjzbVo = arapDjzbVos2.get(j);
|
||||||
|
//
|
||||||
Map<String, String> stringStringMap = new HashMap<>();
|
// Map<String, String> stringStringMap = new HashMap<>();
|
||||||
stringStringMap.put("coperator", "tbadmin");
|
// stringStringMap.put("coperator", "tbadmin");
|
||||||
|
//
|
||||||
Map<String, String> stringStringMap2 = new HashMap<>();
|
// Map<String, String> stringStringMap2 = new HashMap<>();
|
||||||
stringStringMap2.put("dwbm", arapDjzbVo.getUnitcode());
|
// stringStringMap2.put("dwbm", arapDjzbVo.getUnitcode());
|
||||||
stringStringMap2.put("djbh_from", arapDjzbVo.getDjbh());
|
// stringStringMap2.put("djbh_from", arapDjzbVo.getDjbh());
|
||||||
stringStringMap2.put("djbh_to", arapDjzbVo.getDjbh());
|
// stringStringMap2.put("djbh_to", arapDjzbVo.getDjbh());
|
||||||
|
//
|
||||||
Map<String, Map<String, String>> stringStringMap3 = new HashMap<>();
|
// Map<String, Map<String, String>> stringStringMap3 = new HashMap<>();
|
||||||
stringStringMap3.put("deleteinfo", stringStringMap);
|
// stringStringMap3.put("deleteinfo", stringStringMap);
|
||||||
stringStringMap3.put("queryinfo", stringStringMap2);
|
// stringStringMap3.put("queryinfo", stringStringMap2);
|
||||||
// sendU8C("http://39.170.109.90:8088/u8cloud/api/arap/ys/delete", JSON.toJSONString(stringStringMap3), 1);
|
//// sendU8C("http://39.170.109.90:8088/u8cloud/api/arap/ys/delete", JSON.toJSONString(stringStringMap3), 1);
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
//判断是否存在失败的应收单
|
// //判断是否存在失败的应收单
|
||||||
List<ArapDjzbVo> arapDjzbVosAll = new ArrayList<>();
|
// List<ArapDjzbVo> arapDjzbVosAll = new ArrayList<>();
|
||||||
List<DeleteU8cDataUtilEntity> deleteU8cDataUtilEntities2 = deleteU8cDataUtilDao.cancelSignatureSoSaleReadExcel20250528V2();
|
// List<DeleteU8cDataUtilEntity> deleteU8cDataUtilEntities2 = deleteU8cDataUtilDao.cancelSignatureSoSaleReadExcel20250528V2();
|
||||||
if (deleteU8cDataUtilEntities2.size() > 0) {
|
// if (deleteU8cDataUtilEntities2.size() > 0) {
|
||||||
List<List<DeleteU8cDataUtilEntity>> lists = SplitListByCountUtil.splitListByCount(deleteU8cDataUtilEntities2, 999);
|
// List<List<DeleteU8cDataUtilEntity>> lists = SplitListByCountUtil.splitListByCount(deleteU8cDataUtilEntities2, 999);
|
||||||
for (int i = 0; i < lists.size(); i++) {
|
// for (int i = 0; i < lists.size(); i++) {
|
||||||
List<DeleteU8cDataUtilEntity> deleteU8cDataUtilEntities1 = lists.get(i);
|
// List<DeleteU8cDataUtilEntity> deleteU8cDataUtilEntities1 = lists.get(i);
|
||||||
String concatenatedIds = deleteU8cDataUtilEntities1.stream().map(DeleteU8cDataUtilEntity::getCsaleid).map(csaleid -> "'" + csaleid + "'").collect(Collectors.joining(","));
|
// String concatenatedIds = deleteU8cDataUtilEntities1.stream().map(DeleteU8cDataUtilEntity::getCsaleid).map(csaleid -> "'" + csaleid + "'").collect(Collectors.joining(","));
|
||||||
|
//
|
||||||
DeleteSoSaleVo deleteSoSaleVo = new DeleteSoSaleVo();
|
// DeleteSoSaleVo deleteSoSaleVo = new DeleteSoSaleVo();
|
||||||
deleteSoSaleVo.setCsaleid(concatenatedIds);
|
// deleteSoSaleVo.setCsaleid(concatenatedIds);
|
||||||
deleteSoSaleVo.setSpzt("0,1,2,null");
|
// deleteSoSaleVo.setSpzt("0,1,2,null");
|
||||||
List<ArapDjzbVo> arapDjzbVos = deleteU8cDataUtilDao.abandonmentAccountsReceivableDocV2(deleteSoSaleVo);
|
// List<ArapDjzbVo> arapDjzbVos = deleteU8cDataUtilDao.abandonmentAccountsReceivableDocV2(deleteSoSaleVo);
|
||||||
arapDjzbVosAll.addAll(arapDjzbVos);
|
// arapDjzbVosAll.addAll(arapDjzbVos);
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
if (arapDjzbVosAll.size() > 0) {
|
// if (arapDjzbVosAll.size() > 0) {
|
||||||
unApprovalDeleteAccountsReceivable();
|
// unApprovalDeleteAccountsReceivable();
|
||||||
}
|
// }
|
||||||
} catch (Exception e) {
|
// } catch (Exception e) {
|
||||||
e.printStackTrace();
|
// e.printStackTrace();
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 汇总相同时间+公司的单据
|
* 汇总相同时间+公司的单据
|
||||||
|
|
|
@ -121,4 +121,11 @@ public interface DeleteU8cDataUtilDao extends IBaseDao<DeleteU8cDataUtilEntity,
|
||||||
* @author liuyang
|
* @author liuyang
|
||||||
*/
|
*/
|
||||||
List<ArapDjzbVo> abandonmentAccountsReceivableDocV2(DeleteSoSaleVo deleteSoSaleVo) throws Exception;
|
List<ArapDjzbVo> abandonmentAccountsReceivableDocV2(DeleteSoSaleVo deleteSoSaleVo) throws Exception;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询已经修复完毕的销售订单
|
||||||
|
*
|
||||||
|
* @author liuyang
|
||||||
|
*/
|
||||||
|
List<DeleteU8cDataUtilEntity> cancelSignatureSoSaleReadExcel20250528V3() throws Exception;
|
||||||
}
|
}
|
|
@ -58,6 +58,12 @@ public class DeleteU8cDataUtilDaoImpl extends MybatisGenericDao<DeleteU8cDataUti
|
||||||
@DS("lets_u8c")
|
@DS("lets_u8c")
|
||||||
@Override
|
@Override
|
||||||
public List<DeleteU8cDataUtilEntity> querySoSaleByDeletev2(DeleteSoSaleVo deleteSoSaleVo) throws Exception {
|
public List<DeleteU8cDataUtilEntity> querySoSaleByDeletev2(DeleteSoSaleVo deleteSoSaleVo) throws Exception {
|
||||||
|
if (deleteSoSaleVo.getCsaleids() == null || "".equals(deleteSoSaleVo.getCsaleids())) {
|
||||||
|
throw new Exception("deleteSoSaleVo.getCsaleids() == null || \"\".equals(deleteSoSaleVo.getCsaleids())");
|
||||||
|
}
|
||||||
|
// if (deleteSoSaleVo.getFstatus() == null || "".equals(deleteSoSaleVo.getFstatus())) {
|
||||||
|
// throw new Exception("deleteSoSaleVo.getFstatus() == null || \"\".equals(deleteSoSaleVo.getFstatus())");
|
||||||
|
// }
|
||||||
return query("com.hzya.frame.deletedata.dao.impl.DeleteU8cDataUtilDaoImpl.querySoSaleByDeletev2", deleteSoSaleVo);
|
return query("com.hzya.frame.deletedata.dao.impl.DeleteU8cDataUtilDaoImpl.querySoSaleByDeletev2", deleteSoSaleVo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -108,5 +114,10 @@ public class DeleteU8cDataUtilDaoImpl extends MybatisGenericDao<DeleteU8cDataUti
|
||||||
public List<ArapDjzbVo> abandonmentAccountsReceivableDocV2(DeleteSoSaleVo deleteSoSaleVo) throws Exception {
|
public List<ArapDjzbVo> abandonmentAccountsReceivableDocV2(DeleteSoSaleVo deleteSoSaleVo) throws Exception {
|
||||||
return (List<ArapDjzbVo>) selectList("com.hzya.frame.deletedata.dao.impl.DeleteU8cDataUtilDaoImpl.abandonmentAccountsReceivableDocV2", deleteSoSaleVo);
|
return (List<ArapDjzbVo>) selectList("com.hzya.frame.deletedata.dao.impl.DeleteU8cDataUtilDaoImpl.abandonmentAccountsReceivableDocV2", deleteSoSaleVo);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
@DS("lets_u8c")
|
||||||
|
@Override
|
||||||
|
public List<DeleteU8cDataUtilEntity> cancelSignatureSoSaleReadExcel20250528V3() throws Exception {
|
||||||
|
return query("com.hzya.frame.deletedata.dao.impl.DeleteU8cDataUtilDaoImpl.cancelSignatureSoSaleReadExcel20250528V3", new DeleteU8cDataUtilEntity());
|
||||||
|
}
|
||||||
|
}
|
|
@ -311,7 +311,7 @@
|
||||||
AND a.cdeptid NOT IN ( SELECT pk_deptdoc FROM bd_deptdoc WHERE deptname = '业务部门' AND dr = 0 )
|
AND a.cdeptid NOT IN ( SELECT pk_deptdoc FROM bd_deptdoc WHERE deptname = '业务部门' AND dr = 0 )
|
||||||
AND a.cdeptid IS NOT NULL
|
AND a.cdeptid IS NOT NULL
|
||||||
and a.pk_corp != c.pk_corp
|
and a.pk_corp != c.pk_corp
|
||||||
-- and a.csaleid = '1001A1100000000FC70H'
|
-- and a.csaleid = '1015A11000000000SIO8'
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<!--查询审批状态下的销售发票-->
|
<!--查询审批状态下的销售发票-->
|
||||||
|
@ -431,5 +431,51 @@
|
||||||
<result property="unitcode" column="unitcode" jdbcType="VARCHAR"/>
|
<result property="unitcode" column="unitcode" jdbcType="VARCHAR"/>
|
||||||
<result property="djrq" column="djrq" jdbcType="VARCHAR"/>
|
<result property="djrq" column="djrq" jdbcType="VARCHAR"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="cancelSignatureSoSaleReadExcel20250528V3" resultMap="get-DeleteU8cDataUtilEntity-result" parameterType="com.hzya.frame.deletedata.entity.DeleteU8cDataUtilEntity">
|
||||||
|
SELECT-- 单据主键
|
||||||
|
a.csaleid,
|
||||||
|
-- 单据编码
|
||||||
|
a.vreceiptcode,
|
||||||
|
-- 单据对应公司主键
|
||||||
|
a.pk_corp,
|
||||||
|
-- 单据对应公司名称
|
||||||
|
b.unitname,
|
||||||
|
-- 单据对应公司编码
|
||||||
|
b.unitcode,
|
||||||
|
-- 单据对应的业务流程主键
|
||||||
|
a.cbiztype,
|
||||||
|
-- 单据对应的业务流程名称
|
||||||
|
d.businame,
|
||||||
|
-- 部门主键
|
||||||
|
a.cdeptid,
|
||||||
|
-- 部门名称
|
||||||
|
c.deptname,
|
||||||
|
-- 部门对应公司主键
|
||||||
|
c.pk_corp pk_corp2
|
||||||
|
FROM
|
||||||
|
so_sale a
|
||||||
|
LEFT JOIN bd_corp b ON a.PK_CORP = b.PK_CORP
|
||||||
|
LEFT JOIN bd_deptdoc c ON c.pk_deptdoc = a.cdeptid
|
||||||
|
LEFT JOIN bd_busitype d ON d.pk_busitype = a.cbiztype
|
||||||
|
WHERE
|
||||||
|
a.cbiztype IN (
|
||||||
|
SELECT
|
||||||
|
pk_busitype
|
||||||
|
FROM
|
||||||
|
bd_busitype
|
||||||
|
WHERE
|
||||||
|
( businame = 'TOC无源件退货入库' OR businame = 'TOC无源件退款' OR businame = 'TOC销售' OR businame = 'TOC冲发出商品' OR businame = 'TOC确认收入' OR businame = 'TOC销售退货' OR businame = 'TOC销售退款' )
|
||||||
|
)
|
||||||
|
AND a.dr = 0
|
||||||
|
AND a.dbilldate >= '2025-05-01'
|
||||||
|
AND a.dbilldate <= '2025-05-31'
|
||||||
|
AND a.cdeptid NOT IN ( SELECT pk_deptdoc FROM bd_deptdoc WHERE deptname = '业务部门' AND dr = 0 )
|
||||||
|
AND a.cdeptid IS NOT NULL
|
||||||
|
AND a.pk_corp = c.pk_corp
|
||||||
|
and a.fstatus in (1)
|
||||||
|
-- and a.csaleid = '1015A11000000000SIO8'
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue