Compare commits
3 Commits
aae67832b7
...
8767b8fe08
Author | SHA1 | Date |
---|---|---|
|
8767b8fe08 | |
|
781994dff1 | |
|
12a1acb3f5 |
|
@ -66,4 +66,8 @@ public class QueryOfsSoSaleOutVo {
|
||||||
private String relatedAt_end;
|
private String relatedAt_end;
|
||||||
//无源入库单号
|
//无源入库单号
|
||||||
private String receiptCode;
|
private String receiptCode;
|
||||||
|
//更新开始时间
|
||||||
|
private String lastUpdated_start;
|
||||||
|
//更新结束时间
|
||||||
|
private String lastUpdated_end;
|
||||||
}
|
}
|
|
@ -1399,7 +1399,7 @@ public class PassiveWarehouseReceiptToC extends PluginBaseEntity {
|
||||||
} else {
|
} else {
|
||||||
logger.info("OFS销售订单号:{} 存在部门字段:{}!", header1.getCode(), header1.getDepartmentType());
|
logger.info("OFS销售订单号:{} 存在部门字段:{}!", header1.getCode(), header1.getDepartmentType());
|
||||||
String deptCode = header1.getDepartmentType().trim();
|
String deptCode = header1.getDepartmentType().trim();
|
||||||
bdDeptdocEntity = cacheTocMapVoV2.getStringBdDeptdocEntityMapByDeptCode().get(deptCode);
|
bdDeptdocEntity = cacheTocMapVoV2.getStringBdDeptdocEntityMapByDeptCode().get(deptCode + bdCorpEntity.getPkCorp());
|
||||||
}
|
}
|
||||||
|
|
||||||
//客商基本档案
|
//客商基本档案
|
||||||
|
@ -1654,7 +1654,8 @@ public class PassiveWarehouseReceiptToC extends PluginBaseEntity {
|
||||||
} else {
|
} else {
|
||||||
logger.info("OFS销售订单号:{} 存在部门字段:{}!", header1.getCode(), header1.getDepartmentType());
|
logger.info("OFS销售订单号:{} 存在部门字段:{}!", header1.getCode(), header1.getDepartmentType());
|
||||||
String deptCode = header1.getDepartmentType().trim();
|
String deptCode = header1.getDepartmentType().trim();
|
||||||
bdDeptdocEntity = cacheTocMapVoV2.getStringBdDeptdocEntityMapByDeptCode().get(deptCode);
|
bdDeptdocEntity = cacheTocMapVoV2.getStringBdDeptdocEntityMapByDeptCode().get(deptCode + bdCorpEntity.getPkCorp());
|
||||||
|
Assert.notNull(bdDeptdocEntity, "无法匹配到指定部门 部门编码:{} 对应公司主键:{}", deptCode, bdCorpEntity.getPkCorp());
|
||||||
}
|
}
|
||||||
|
|
||||||
//客商基本档案
|
//客商基本档案
|
||||||
|
|
|
@ -1574,8 +1574,8 @@ public class SoSaleOutPluginInitializerToC extends PluginBaseEntity {
|
||||||
//使用O选定的部门字段,logger太影响性能
|
//使用O选定的部门字段,logger太影响性能
|
||||||
// logger.info("OFS销售订单号:{} 存在部门字段:{}!", header2.getCode(), header2.getDepartmentType());
|
// logger.info("OFS销售订单号:{} 存在部门字段:{}!", header2.getCode(), header2.getDepartmentType());
|
||||||
String deptCode = header2.getDepartmentType().trim();
|
String deptCode = header2.getDepartmentType().trim();
|
||||||
bdDeptdocEntity = cacheTocMapVo.getStringBdDeptdocEntityMapByDeptCode().get(deptCode);
|
bdDeptdocEntity = cacheTocMapVo.getStringBdDeptdocEntityMapByDeptCode().get(deptCode + bdCorpEntity.getPkCorp());
|
||||||
Assert.notNull(bdDeptdocEntity, "无法匹配到U8C部门档案 OFS销售订单-部门编码:{}", deptCode);
|
Assert.notNull(bdDeptdocEntity, "无法匹配到U8C部门档案 OFS销售订单-部门编码:{}", deptCode + "_" + bdCorpEntity.getPkCorp());
|
||||||
}
|
}
|
||||||
|
|
||||||
//存货基本档案
|
//存货基本档案
|
||||||
|
|
|
@ -1544,7 +1544,8 @@ public class SoSaleReturnPluginInitializerToC extends PluginBaseEntity {
|
||||||
} else {
|
} else {
|
||||||
logger.info("OFS销售订单号:{} 存在部门字段:{}!", header1.getCode(), header1.getDepartmentType());
|
logger.info("OFS销售订单号:{} 存在部门字段:{}!", header1.getCode(), header1.getDepartmentType());
|
||||||
String deptCode = header1.getDepartmentType().trim();
|
String deptCode = header1.getDepartmentType().trim();
|
||||||
bdDeptdocEntity = cacheTocMapVoV2.getStringBdDeptdocEntityMapByDeptCode().get(deptCode);
|
bdDeptdocEntity = cacheTocMapVoV2.getStringBdDeptdocEntityMapByDeptCode().get(deptCode + bdCorpEntity.getPkCorp());
|
||||||
|
Assert.notNull(bdDeptdocEntity, "无法匹配到指定部门 部门编码:{} 对应公司主键:{}", deptCode, bdCorpEntity.getPkCorp());
|
||||||
}
|
}
|
||||||
|
|
||||||
//客商基本档案
|
//客商基本档案
|
||||||
|
|
|
@ -178,7 +178,7 @@ public class PassiveComponentsArchivesCacheUtil {
|
||||||
if (bdDeptdocEntityList2 != null && bdDeptdocEntityList2.size() > 0) {
|
if (bdDeptdocEntityList2 != null && bdDeptdocEntityList2.size() > 0) {
|
||||||
for (int i = 0; i < bdDeptdocEntityList2.size(); i++) {
|
for (int i = 0; i < bdDeptdocEntityList2.size(); i++) {
|
||||||
BdDeptdocEntity bdDeptdocEntity1 = bdDeptdocEntityList2.get(i);
|
BdDeptdocEntity bdDeptdocEntity1 = bdDeptdocEntityList2.get(i);
|
||||||
stringBdDeptdocEntityMap2.put(bdDeptdocEntity1.getDeptcode(), bdDeptdocEntity1);
|
stringBdDeptdocEntityMap2.put(bdDeptdocEntity1.getDeptcode() + bdDeptdocEntity1.getPkCorp(), bdDeptdocEntity1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return bddeptdocEntityList;
|
return bddeptdocEntityList;
|
||||||
|
|
|
@ -180,7 +180,7 @@ public class PassiveComponentsArchivesCacheUtilV2 {
|
||||||
if (bdDeptdocEntityList2 != null && bdDeptdocEntityList2.size() > 0) {
|
if (bdDeptdocEntityList2 != null && bdDeptdocEntityList2.size() > 0) {
|
||||||
for (int i = 0; i < bdDeptdocEntityList2.size(); i++) {
|
for (int i = 0; i < bdDeptdocEntityList2.size(); i++) {
|
||||||
BdDeptdocEntity bdDeptdocEntity1 = bdDeptdocEntityList2.get(i);
|
BdDeptdocEntity bdDeptdocEntity1 = bdDeptdocEntityList2.get(i);
|
||||||
stringBdDeptdocEntityMap2.put(bdDeptdocEntity1.getDeptcode(), bdDeptdocEntity1);
|
stringBdDeptdocEntityMap2.put(bdDeptdocEntity1.getDeptcode() + bdDeptdocEntity1.getPkCorp(), bdDeptdocEntity1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return bddeptdocEntityList;
|
return bddeptdocEntityList;
|
||||||
|
|
|
@ -179,6 +179,7 @@ public class TocOrderBasicArchivesCacheUtil {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//部门编码+主键
|
||||||
BdDeptdocEntity bdDeptdocEntity2 = new BdDeptdocEntity();
|
BdDeptdocEntity bdDeptdocEntity2 = new BdDeptdocEntity();
|
||||||
bdDeptdocEntity2.setDataSourceCode("lets_u8c");
|
bdDeptdocEntity2.setDataSourceCode("lets_u8c");
|
||||||
bdDeptdocEntity2.setDr(0);
|
bdDeptdocEntity2.setDr(0);
|
||||||
|
@ -186,7 +187,7 @@ public class TocOrderBasicArchivesCacheUtil {
|
||||||
if (bdDeptdocEntityList2 != null && bdDeptdocEntityList2.size() > 0) {
|
if (bdDeptdocEntityList2 != null && bdDeptdocEntityList2.size() > 0) {
|
||||||
for (int i = 0; i < bdDeptdocEntityList2.size(); i++) {
|
for (int i = 0; i < bdDeptdocEntityList2.size(); i++) {
|
||||||
BdDeptdocEntity bdDeptdocEntity1 = bdDeptdocEntityList2.get(i);
|
BdDeptdocEntity bdDeptdocEntity1 = bdDeptdocEntityList2.get(i);
|
||||||
stringBdDeptdocEntityMap2.put(bdDeptdocEntity1.getDeptcode(), bdDeptdocEntity1);
|
stringBdDeptdocEntityMap2.put(bdDeptdocEntity1.getDeptcode() + bdDeptdocEntity1.getPkCorp(), bdDeptdocEntity1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return bddeptdocEntityList;
|
return bddeptdocEntityList;
|
||||||
|
|
|
@ -179,7 +179,7 @@ public class TocReturnBasicArchivesCacheUtil {
|
||||||
if (bdDeptdocEntityList2 != null && bdDeptdocEntityList2.size() > 0) {
|
if (bdDeptdocEntityList2 != null && bdDeptdocEntityList2.size() > 0) {
|
||||||
for (int i = 0; i < bdDeptdocEntityList2.size(); i++) {
|
for (int i = 0; i < bdDeptdocEntityList2.size(); i++) {
|
||||||
BdDeptdocEntity bdDeptdocEntity1 = bdDeptdocEntityList2.get(i);
|
BdDeptdocEntity bdDeptdocEntity1 = bdDeptdocEntityList2.get(i);
|
||||||
stringBdDeptdocEntityMap2.put(bdDeptdocEntity1.getDeptcode(), bdDeptdocEntity1);
|
stringBdDeptdocEntityMap2.put(bdDeptdocEntity1.getDeptcode() + bdDeptdocEntity1.getPkCorp(), bdDeptdocEntity1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return bddeptdocEntityList;
|
return bddeptdocEntityList;
|
||||||
|
|
|
@ -27,8 +27,10 @@ public class ProxyPurchaseWarehousOrderTest {
|
||||||
@Test
|
@Test
|
||||||
public void startImplementByCode() {
|
public void startImplementByCode() {
|
||||||
try {
|
try {
|
||||||
proxyPurchaseWarehousOrder.startImplementByCode("LETS-RE2025040300001802-confirm");
|
// proxyPurchaseWarehousOrder.startImplementByCode("LETS-RE2025040300001802-confirm");
|
||||||
// proxyPurchaseWarehousOrder.startImplementByTime("2025-01-21 17:38:26", "2025-01-21 17:38:26");
|
// proxyPurchaseWarehousOrder.startImplementByTime("2025-01-21 17:38:26", "2025-01-21 17:38:26");
|
||||||
|
// proxyPurchaseWarehousOrder.startImplementByCode("");
|
||||||
|
proxyPurchaseWarehousOrder.startImplementByTime("2025-05-13 19:22:04", "2025-05-13 19:22:04");
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
|
@ -72,6 +72,10 @@ class SoSaleOutPluginInitializerToCTest {
|
||||||
// errorHeaderDetailsDtoDto.setHeader(header);
|
// errorHeaderDetailsDtoDto.setHeader(header);
|
||||||
// errorHeaderDetailsDtoDto.setDetails(details);
|
// errorHeaderDetailsDtoDto.setDetails(details);
|
||||||
// errorHeaderDetailsDtoDto.
|
// errorHeaderDetailsDtoDto.
|
||||||
|
|
||||||
|
|
||||||
|
String aaa = "LETS-SH2025032600025120";
|
||||||
|
soSaleOutPluginInitializerToC.startImplementStockByCode(aaa, "tran");
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
@ -99,7 +103,7 @@ class SoSaleOutPluginInitializerToCTest {
|
||||||
// String s = "LETS-SH2025032200027982";
|
// String s = "LETS-SH2025032200027982";
|
||||||
// soSaleOutPluginInitializerToC.startImplementStockByCode(s, "stock");
|
// soSaleOutPluginInitializerToC.startImplementStockByCode(s, "stock");
|
||||||
|
|
||||||
soSaleOutPluginInitializerToC.startImplementTranByTime("2025-05-08 00:00:00", "2025-05-08 23:59:59", "2");
|
// soSaleOutPluginInitializerToC.startImplementTranByTime("2025-05-08 00:00:00", "2025-05-08 23:59:59", "2");
|
||||||
|
|
||||||
// List<com.hzya.frame.ttxofs.dto.ofssalesordersearch.HeaderDetailsDto> headerDetailsDtoArrayList = new ArrayList<>();
|
// List<com.hzya.frame.ttxofs.dto.ofssalesordersearch.HeaderDetailsDto> headerDetailsDtoArrayList = new ArrayList<>();
|
||||||
// QueryOfsSoSaleOutVo queryOfsSoSaleOutVo = new QueryOfsSoSaleOutVo();
|
// QueryOfsSoSaleOutVo queryOfsSoSaleOutVo = new QueryOfsSoSaleOutVo();
|
||||||
|
|
|
@ -65,7 +65,7 @@ public class SoSaleReturnPluginInitializerToCTest {
|
||||||
// soSaleReturnPluginInitializerToC.startImplementStockByTime(startAndEndVos.get(0).getStart_time(), startAndEndVos.get(0).getEnd_time());
|
// soSaleReturnPluginInitializerToC.startImplementStockByTime(startAndEndVos.get(0).getStart_time(), startAndEndVos.get(0).getEnd_time());
|
||||||
|
|
||||||
try {
|
try {
|
||||||
soSaleReturnPluginInitializerToC.startImplementByTradeTime("2025-04-28 00:00:00", "2025-04-28 23:59:59", "2");
|
// soSaleReturnPluginInitializerToC.startImplementByTradeTime("2025-04-28 00:00:00", "2025-04-28 23:59:59", "2");
|
||||||
|
|
||||||
// soSaleReturnPluginInitializerToC.startImplementByCode("LETS-RE2025010900002384", "tran");
|
// soSaleReturnPluginInitializerToC.startImplementByCode("LETS-RE2025010900002384", "tran");
|
||||||
|
|
||||||
|
|
|
@ -80,6 +80,10 @@ public class DeleteU8cDataUtil {
|
||||||
// saleOutSign("'0001A110000000001TH6', '0001A1100000000VKCOK'");
|
// saleOutSign("'0001A110000000001TH6', '0001A1100000000VKCOK'");
|
||||||
|
|
||||||
// cancelSignatureSoSaleReadExcelV2();
|
// cancelSignatureSoSaleReadExcelV2();
|
||||||
|
|
||||||
|
// cancelSignatureSoSaleReadExcel20250528V2();
|
||||||
|
// abandonmentReviewSoSaleinvoice2505282107();
|
||||||
|
// cancelSignatureSoSaleReadExcel2505282140V2();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -879,7 +883,7 @@ public class DeleteU8cDataUtil {
|
||||||
JsonRootBean jsonRootBean = new JsonRootBean();
|
JsonRootBean jsonRootBean = new JsonRootBean();
|
||||||
jsonRootBean.setDeleteinfo(deleteinfo);
|
jsonRootBean.setDeleteinfo(deleteinfo);
|
||||||
jsonRootBean.setQueryinfo(queryinfo);
|
jsonRootBean.setQueryinfo(queryinfo);
|
||||||
sendU8C("http://39.170.109.90:8088/u8cloud/api/so/saleorder/delete", JSON.toJSONString(jsonRootBean), 1);
|
// sendU8C("http://39.170.109.90:8088/u8cloud/api/so/saleorder/delete", JSON.toJSONString(jsonRootBean), 1);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
@ -1020,7 +1024,7 @@ public class DeleteU8cDataUtil {
|
||||||
JsonRootBean jsonRootBean = new JsonRootBean();
|
JsonRootBean jsonRootBean = new JsonRootBean();
|
||||||
jsonRootBean.setDeleteinfo(deleteinfo);
|
jsonRootBean.setDeleteinfo(deleteinfo);
|
||||||
jsonRootBean.setQueryinfo(queryinfo);
|
jsonRootBean.setQueryinfo(queryinfo);
|
||||||
sendU8C("http://39.170.109.90:8088/u8cloud/api/so/saleorder/delete", JSON.toJSONString(jsonRootBean), vreceiptcodeList.size());
|
// sendU8C("http://39.170.109.90:8088/u8cloud/api/so/saleorder/delete", JSON.toJSONString(jsonRootBean), vreceiptcodeList.size());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1049,4 +1053,321 @@ public class DeleteU8cDataUtil {
|
||||||
}
|
}
|
||||||
return resultMap;
|
return resultMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 销售出库单取消签证并删除
|
||||||
|
*/
|
||||||
|
public void cancelSignatureSoSaleReadExcel20250528V2() {
|
||||||
|
try {
|
||||||
|
//确定销售订单范围、19648
|
||||||
|
List<DeleteU8cDataUtilEntity> deleteU8cDataUtilEntities = deleteU8cDataUtilDao.cancelSignatureSoSaleReadExcel20250528V2();
|
||||||
|
|
||||||
|
//按100行拆分
|
||||||
|
List<List<DeleteU8cDataUtilEntity>> lists = SplitListByCountUtil.splitListByCount(deleteU8cDataUtilEntities, 100);
|
||||||
|
if (lists.size() > 0) {
|
||||||
|
for (int i = 0; i < lists.size(); i++) {
|
||||||
|
List<DeleteU8cDataUtilEntity> deleteU8cDataUtilEntities1 = lists.get(i);
|
||||||
|
//逗号拼接
|
||||||
|
String concatenatedIds = deleteU8cDataUtilEntities1.stream().map(DeleteU8cDataUtilEntity::getCsaleid).map(csaleid -> "'" + csaleid + "'").collect(Collectors.joining(","));
|
||||||
|
|
||||||
|
//根据销售订单主键,查询对应的销售出库单
|
||||||
|
DeleteIcGeneralHVo deleteIcGeneralHVo = new DeleteIcGeneralHVo();
|
||||||
|
deleteIcGeneralHVo.setDataSourceCode("lets_u8c");
|
||||||
|
deleteIcGeneralHVo.setCfirstbillhids(concatenatedIds);
|
||||||
|
deleteIcGeneralHVo.setFbillflag("3");//签字状态
|
||||||
|
List<DeleteU8cDataUtilEntity> soSaleinvoiceEntities = deleteU8cDataUtilDao.queryIcGeneralHByCancelSignatureV2(deleteIcGeneralHVo);
|
||||||
|
Map<String, List<DeleteU8cDataUtilEntity>> stringListMap = groupByDbilldatev2(soSaleinvoiceEntities);
|
||||||
|
|
||||||
|
if (stringListMap.size() > 0) {
|
||||||
|
for (Map.Entry<String, List<DeleteU8cDataUtilEntity>> entry : stringListMap.entrySet()) {
|
||||||
|
String key = entry.getKey();
|
||||||
|
List<DeleteU8cDataUtilEntity> valueList = entry.getValue();
|
||||||
|
List<String> vreceiptcodeList = valueList.stream().map(DeleteU8cDataUtilEntity::getVbillcode).collect(Collectors.toList());
|
||||||
|
|
||||||
|
String[] split = key.split("@@@@");
|
||||||
|
|
||||||
|
//批量销售出库单取消签字
|
||||||
|
Deleteinfo deleteinfo = new Deleteinfo();
|
||||||
|
deleteinfo.setCoperator("tbadmin");
|
||||||
|
|
||||||
|
Queryinfo queryinfo = new Queryinfo();
|
||||||
|
queryinfo.setCorp(split[1]);
|
||||||
|
queryinfo.setDate_begin(split[0]);
|
||||||
|
queryinfo.setDate_end(split[0]);
|
||||||
|
queryinfo.setBillcode(vreceiptcodeList);
|
||||||
|
|
||||||
|
JsonRootBean jsonRootBean = new JsonRootBean();
|
||||||
|
jsonRootBean.setUnsignInfo(deleteinfo);
|
||||||
|
jsonRootBean.setQueryInfo(queryinfo);
|
||||||
|
sendU8C("http://39.170.109.90:8088/u8cloud/api/ic/saleout/unsign", JSON.toJSONString(jsonRootBean), vreceiptcodeList.size());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//根据销售订单主键,查询对应的销售出库单
|
||||||
|
DeleteIcGeneralHVo deleteIcGeneralHVo2 = new DeleteIcGeneralHVo();
|
||||||
|
deleteIcGeneralHVo2.setDataSourceCode("lets_u8c");
|
||||||
|
deleteIcGeneralHVo2.setCfirstbillhids(concatenatedIds);
|
||||||
|
deleteIcGeneralHVo2.setFbillflag("2");//自由状态
|
||||||
|
List<DeleteU8cDataUtilEntity> soSaleinvoiceEntities2 = deleteU8cDataUtilDao.queryIcGeneralHByCancelSignatureV2(deleteIcGeneralHVo2);
|
||||||
|
Map<String, List<DeleteU8cDataUtilEntity>> stringListMap2 = groupByDbilldatev2(soSaleinvoiceEntities2);
|
||||||
|
if (stringListMap2.size() > 0) {
|
||||||
|
for (Map.Entry<String, List<DeleteU8cDataUtilEntity>> entry : stringListMap.entrySet()) {
|
||||||
|
String key = entry.getKey();
|
||||||
|
List<DeleteU8cDataUtilEntity> valueList = entry.getValue();
|
||||||
|
List<String> vreceiptcodeList = valueList.stream().map(DeleteU8cDataUtilEntity::getVbillcode).collect(Collectors.toList());
|
||||||
|
|
||||||
|
String[] split = key.split("@@@@");
|
||||||
|
|
||||||
|
//批量销售出库单删除
|
||||||
|
Deleteinfo deleteinfo2 = new Deleteinfo();
|
||||||
|
deleteinfo2.setCoperator("tbadmin");
|
||||||
|
|
||||||
|
Queryinfo queryinfo2 = new Queryinfo();
|
||||||
|
queryinfo2.setCorp(split[1]);
|
||||||
|
queryinfo2.setDate_begin(split[0]);
|
||||||
|
queryinfo2.setDate_end(split[0]);
|
||||||
|
queryinfo2.setBillcode(vreceiptcodeList);
|
||||||
|
|
||||||
|
JsonRootBean jsonRootBean2 = new JsonRootBean();
|
||||||
|
jsonRootBean2.setDeleteInfo(deleteinfo2);
|
||||||
|
jsonRootBean2.setQueryInfo(queryinfo2);
|
||||||
|
sendU8C("http://39.170.109.90:8088/u8cloud/api/ic/saleout/delete", JSON.toJSONString(jsonRootBean2), vreceiptcodeList.size());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//验证是否还存在需要取消签字并删除的销售出库单
|
||||||
|
List<DeleteU8cDataUtilEntity> soSaleinvoiceEntitieAll = new ArrayList<>();
|
||||||
|
List<List<DeleteU8cDataUtilEntity>> lists2 = SplitListByCountUtil.splitListByCount(deleteU8cDataUtilEntities, 999);
|
||||||
|
for (int i = 0; i < lists2.size(); i++) {
|
||||||
|
List<DeleteU8cDataUtilEntity> deleteU8cDataUtilEntities1 = lists2.get(i);
|
||||||
|
String concatenatedIds = deleteU8cDataUtilEntities1.stream().map(DeleteU8cDataUtilEntity::getCsaleid).map(csaleid -> "'" + csaleid + "'").collect(Collectors.joining(","));
|
||||||
|
DeleteIcGeneralHVo deleteIcGeneralHVo = new DeleteIcGeneralHVo();
|
||||||
|
deleteIcGeneralHVo.setDataSourceCode("lets_u8c");
|
||||||
|
deleteIcGeneralHVo.setCfirstbillhids(concatenatedIds);
|
||||||
|
List<DeleteU8cDataUtilEntity> soSaleinvoiceEntities = deleteU8cDataUtilDao.queryIcGeneralHByCancelSignatureV2(deleteIcGeneralHVo);
|
||||||
|
soSaleinvoiceEntitieAll.addAll(soSaleinvoiceEntities);
|
||||||
|
}
|
||||||
|
if (soSaleinvoiceEntitieAll.size() > 0) {
|
||||||
|
Thread.sleep(10000);
|
||||||
|
cancelSignatureSoSaleReadExcel20250528V2();
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 弃审销售发票,并删除销售发票
|
||||||
|
*/
|
||||||
|
public void abandonmentReviewSoSaleinvoice2505282107() {
|
||||||
|
try {
|
||||||
|
//确定销售订单范围、19648
|
||||||
|
List<DeleteU8cDataUtilEntity> deleteU8cDataUtilEntities = deleteU8cDataUtilDao.cancelSignatureSoSaleReadExcel20250528V2();
|
||||||
|
List<List<DeleteU8cDataUtilEntity>> lists = SplitListByCountUtil.splitListByCount(deleteU8cDataUtilEntities, 100);
|
||||||
|
if (lists.size() > 0) {
|
||||||
|
for (int i = 0; i < lists.size(); i++) {
|
||||||
|
List<DeleteU8cDataUtilEntity> deleteU8cDataUtilEntities1 = lists.get(i);
|
||||||
|
String concatenatedIds = deleteU8cDataUtilEntities1.stream().map(DeleteU8cDataUtilEntity::getCsaleid).map(csaleid -> "'" + csaleid + "'").collect(Collectors.joining(","));
|
||||||
|
//取消审核销售发票
|
||||||
|
DeleteU8cDataUtilEntity soSaleinvoiceEntity = new DeleteU8cDataUtilEntity();
|
||||||
|
soSaleinvoiceEntity.setDataSourceCode("lets_u8c");
|
||||||
|
soSaleinvoiceEntity.setCsaleid(concatenatedIds);
|
||||||
|
soSaleinvoiceEntity.setFstatus("2");//审批状态
|
||||||
|
List<DeleteU8cDataUtilEntity> soSaleinvoiceEntities = deleteU8cDataUtilDao.querySoSaleinvoiceByCancelApprovalV2(soSaleinvoiceEntity);
|
||||||
|
Map<String, List<DeleteU8cDataUtilEntity>> stringListMap = groupByDbilldate(soSaleinvoiceEntities);
|
||||||
|
for (Map.Entry<String, List<DeleteU8cDataUtilEntity>> entry : stringListMap.entrySet()) {
|
||||||
|
String key = entry.getKey();
|
||||||
|
List<DeleteU8cDataUtilEntity> valueList = entry.getValue();
|
||||||
|
List<String> vreceiptcodeList = valueList.stream().map(DeleteU8cDataUtilEntity::getVreceiptcode).collect(Collectors.toList());
|
||||||
|
|
||||||
|
String[] split = key.split("@@@@");
|
||||||
|
|
||||||
|
Map<String, Object> stringStringMap = new HashMap<>();
|
||||||
|
stringStringMap.put("approvid", "tbadmin");
|
||||||
|
|
||||||
|
Map<String, Object> stringStringMap2 = new HashMap<>();
|
||||||
|
stringStringMap2.put("corp", split[1]);
|
||||||
|
stringStringMap2.put("code", vreceiptcodeList);
|
||||||
|
stringStringMap2.put("date_begin", split[0]);
|
||||||
|
stringStringMap2.put("date_end", split[0]);
|
||||||
|
|
||||||
|
Map<String, Map<String, Object>> stringStringMap3 = new HashMap<>();
|
||||||
|
stringStringMap3.put("approveinfo", stringStringMap);
|
||||||
|
stringStringMap3.put("queryinfo", stringStringMap2);
|
||||||
|
sendU8C("http://39.170.109.90:8088/u8cloud/api/so/saleinvoice/unapprove", JSON.toJSONString(stringStringMap3), vreceiptcodeList.size());
|
||||||
|
}
|
||||||
|
|
||||||
|
//删除销售发票
|
||||||
|
DeleteU8cDataUtilEntity soSaleinvoiceEntity2 = new DeleteU8cDataUtilEntity();
|
||||||
|
soSaleinvoiceEntity2.setDataSourceCode("lets_u8c");
|
||||||
|
soSaleinvoiceEntity2.setFstatus("1");//自由状态
|
||||||
|
soSaleinvoiceEntity2.setCsaleid(concatenatedIds);
|
||||||
|
List<DeleteU8cDataUtilEntity> soSaleinvoiceEntities2 = deleteU8cDataUtilDao.querySoSaleinvoiceByCancelApprovalV2(soSaleinvoiceEntity2);
|
||||||
|
logger.info("条数:{}", soSaleinvoiceEntities2.size());
|
||||||
|
if (soSaleinvoiceEntities2 != null && soSaleinvoiceEntities2.size() > 0) {
|
||||||
|
List<List<DeleteU8cDataUtilEntity>> splitListByCount = SplitListByCountUtil.splitListByCount(soSaleinvoiceEntities2, 100);
|
||||||
|
for (int j = 0; j < splitListByCount.size(); j++) {
|
||||||
|
List<DeleteU8cDataUtilEntity> deleteU8cDataUtilEntities2 = splitListByCount.get(j);
|
||||||
|
Map<String, List<DeleteU8cDataUtilEntity>> stringListMap2 = groupByDbilldate(deleteU8cDataUtilEntities2);
|
||||||
|
for (Map.Entry<String, List<DeleteU8cDataUtilEntity>> entry : stringListMap2.entrySet()) {
|
||||||
|
String key = entry.getKey();
|
||||||
|
List<DeleteU8cDataUtilEntity> valueList = entry.getValue();
|
||||||
|
List<String> vreceiptcodeList = valueList.stream().map(DeleteU8cDataUtilEntity::getVreceiptcode).collect(Collectors.toList());
|
||||||
|
|
||||||
|
String[] split = key.split("@@@@");
|
||||||
|
|
||||||
|
Map<String, Object> objectMap = new HashMap<>();
|
||||||
|
objectMap.put("coperator", "tbadmin");
|
||||||
|
|
||||||
|
Map<String, Object> objectMap2 = new HashMap<>();
|
||||||
|
objectMap2.put("corp", split[1]);
|
||||||
|
objectMap2.put("date_begin", split[0]);
|
||||||
|
objectMap2.put("date_end", split[0]);
|
||||||
|
objectMap2.put("code", vreceiptcodeList);
|
||||||
|
|
||||||
|
Map<String, Object> objectMap3 = new HashMap<>();
|
||||||
|
objectMap3.put("deleteinfo", objectMap);
|
||||||
|
objectMap3.put("queryinfo", objectMap2);
|
||||||
|
|
||||||
|
sendU8C("http://39.170.109.90:8088/u8cloud/api/so/saleinvoice/delete", JSON.toJSONString(objectMap3), vreceiptcodeList.size());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//判断是否还存在需要删除的发票
|
||||||
|
List<DeleteU8cDataUtilEntity> soSaleinvoiceEntities2All = new ArrayList<>();
|
||||||
|
List<DeleteU8cDataUtilEntity> deleteU8cDataUtilEntities2 = deleteU8cDataUtilDao.cancelSignatureSoSaleReadExcel20250528V2();
|
||||||
|
List<List<DeleteU8cDataUtilEntity>> lists2 = SplitListByCountUtil.splitListByCount(deleteU8cDataUtilEntities2, 999);
|
||||||
|
for (int i = 0; i < lists2.size(); i++) {
|
||||||
|
List<DeleteU8cDataUtilEntity> deleteU8cDataUtilEntities1 = lists2.get(i);
|
||||||
|
String concatenatedIds = deleteU8cDataUtilEntities1.stream().map(DeleteU8cDataUtilEntity::getCsaleid).map(csaleid -> "'" + csaleid + "'").collect(Collectors.joining(","));
|
||||||
|
|
||||||
|
DeleteU8cDataUtilEntity soSaleinvoiceEntity2 = new DeleteU8cDataUtilEntity();
|
||||||
|
soSaleinvoiceEntity2.setDataSourceCode("lets_u8c");
|
||||||
|
soSaleinvoiceEntity2.setCsaleid(concatenatedIds);
|
||||||
|
List<DeleteU8cDataUtilEntity> soSaleinvoiceEntities2 = deleteU8cDataUtilDao.querySoSaleinvoiceByCancelApprovalV2(soSaleinvoiceEntity2);
|
||||||
|
soSaleinvoiceEntities2All.addAll(soSaleinvoiceEntities2);
|
||||||
|
}
|
||||||
|
if (soSaleinvoiceEntities2All.size() > 0) {
|
||||||
|
Thread.sleep(10000);
|
||||||
|
abandonmentReviewSoSaleinvoice2505282107();
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 销售订单取消签字+删除
|
||||||
|
*/
|
||||||
|
public void cancelSignatureSoSaleReadExcel2505282140V2() {
|
||||||
|
try {
|
||||||
|
//确定销售订单范围、19648
|
||||||
|
List<DeleteU8cDataUtilEntity> deleteU8cDataUtilEntities = deleteU8cDataUtilDao.cancelSignatureSoSaleReadExcel20250528V2();
|
||||||
|
if (deleteU8cDataUtilEntities.size() > 0) {
|
||||||
|
List<List<DeleteU8cDataUtilEntity>> lists = SplitListByCountUtil.splitListByCount(deleteU8cDataUtilEntities, 100);
|
||||||
|
for (int i = 0; i < lists.size(); i++) {
|
||||||
|
List<DeleteU8cDataUtilEntity> deleteU8cDataUtilEntities1 = lists.get(i);
|
||||||
|
String concatenatedIds = deleteU8cDataUtilEntities1.stream().map(DeleteU8cDataUtilEntity::getCsaleid).map(csaleid -> "'" + csaleid + "'").collect(Collectors.joining(","));
|
||||||
|
//销售订单取消审核
|
||||||
|
DeleteSoSaleVo deleteSoSaleVo = new DeleteSoSaleVo();
|
||||||
|
deleteSoSaleVo.setDataSourceCode("lets_u8c");
|
||||||
|
deleteSoSaleVo.setCsaleids(concatenatedIds);
|
||||||
|
deleteSoSaleVo.setFstatus(2L);
|
||||||
|
List<DeleteU8cDataUtilEntity> deleteU8cDataUtilEntities2 = deleteU8cDataUtilDao.querySoSaleByDeletev2(deleteSoSaleVo);
|
||||||
|
Map<String, List<DeleteU8cDataUtilEntity>> deleteU8cDataUtilEntitiesMap = groupByDbilldatev2(deleteU8cDataUtilEntities2);
|
||||||
|
if (deleteU8cDataUtilEntitiesMap.size() > 0) {
|
||||||
|
for (Map.Entry<String, List<DeleteU8cDataUtilEntity>> entry : deleteU8cDataUtilEntitiesMap.entrySet()) {
|
||||||
|
String key = entry.getKey();
|
||||||
|
List<DeleteU8cDataUtilEntity> valueList = entry.getValue();
|
||||||
|
List<String> vreceiptcodeList = valueList.stream().map(DeleteU8cDataUtilEntity::getVreceiptcode).collect(Collectors.toList());
|
||||||
|
|
||||||
|
String[] split = key.split("@@@@");
|
||||||
|
|
||||||
|
//批量销售订单取消审核
|
||||||
|
JsonRootBeanCancelSignature jsonRootBeanCancelSignature = new JsonRootBeanCancelSignature();
|
||||||
|
|
||||||
|
QueryinfoCancelSignature queryinfoCancelSignature = new QueryinfoCancelSignature();
|
||||||
|
queryinfoCancelSignature.setDate_begin(split[0]);
|
||||||
|
queryinfoCancelSignature.setDate_end(split[0]);
|
||||||
|
queryinfoCancelSignature.setCorp(split[1]);
|
||||||
|
queryinfoCancelSignature.setCode(vreceiptcodeList);
|
||||||
|
|
||||||
|
ApproveinfoCancelSignature approveinfoCancelSignature = new ApproveinfoCancelSignature();
|
||||||
|
approveinfoCancelSignature.setApprovid("tbadmin");
|
||||||
|
|
||||||
|
jsonRootBeanCancelSignature.setApproveinfo(approveinfoCancelSignature);
|
||||||
|
jsonRootBeanCancelSignature.setQueryinfo(queryinfoCancelSignature);
|
||||||
|
sendU8C("http://39.170.109.90:8088/u8cloud/api/so/saleorder/unapprove", JSON.toJSONString(jsonRootBeanCancelSignature), vreceiptcodeList.size());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
List<DeleteU8cDataUtilEntity> deleteU8cDataUtilEntities22All = new ArrayList<>();
|
||||||
|
List<DeleteU8cDataUtilEntity> deleteU8cDataUtilEntities2 = deleteU8cDataUtilDao.cancelSignatureSoSaleReadExcel20250528V2();
|
||||||
|
if (deleteU8cDataUtilEntities2 != null) {
|
||||||
|
List<List<DeleteU8cDataUtilEntity>> lists = SplitListByCountUtil.splitListByCount(deleteU8cDataUtilEntities, 999);
|
||||||
|
for (int i = 0; i < lists.size(); i++) {
|
||||||
|
List<DeleteU8cDataUtilEntity> deleteU8cDataUtilEntities1 = lists.get(i);
|
||||||
|
String concatenatedIds = deleteU8cDataUtilEntities1.stream().map(DeleteU8cDataUtilEntity::getCsaleid).map(csaleid -> "'" + csaleid + "'").collect(Collectors.joining(","));
|
||||||
|
|
||||||
|
DeleteSoSaleVo deleteSoSaleVo = new DeleteSoSaleVo();
|
||||||
|
deleteSoSaleVo.setDataSourceCode("lets_u8c");
|
||||||
|
deleteSoSaleVo.setCsaleids(concatenatedIds);
|
||||||
|
deleteSoSaleVo.setFstatus(2L);
|
||||||
|
List<DeleteU8cDataUtilEntity> deleteU8cDataUtilEntities22 = deleteU8cDataUtilDao.querySoSaleByDeletev2(deleteSoSaleVo);
|
||||||
|
deleteU8cDataUtilEntities22All.addAll(deleteU8cDataUtilEntities22);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (deleteU8cDataUtilEntities22All.size() > 0) {
|
||||||
|
Thread.sleep(10000);
|
||||||
|
cancelSignatureSoSaleReadExcel2505282140V2();
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修复销售订单部门字段错误问题
|
||||||
|
*/
|
||||||
|
public void repairSoSaleDepartment() {
|
||||||
|
try {
|
||||||
|
//确定销售订单范围、19648
|
||||||
|
List<DeleteU8cDataUtilEntity> deleteU8cDataUtilEntities = deleteU8cDataUtilDao.cancelSignatureSoSaleReadExcel20250528V2();
|
||||||
|
if (deleteU8cDataUtilEntities != null && deleteU8cDataUtilEntities.size() > 0) {
|
||||||
|
for (DeleteU8cDataUtilEntity deleteU8cDataUtilEntity : deleteU8cDataUtilEntities) {
|
||||||
|
//找到正确的部门主键
|
||||||
|
if (deleteU8cDataUtilEntity.getCdeptid() == null) {
|
||||||
|
throw new Exception("deleteU8cDataUtilEntity.getCdeptid() == null");
|
||||||
|
}
|
||||||
|
if (deleteU8cDataUtilEntity.getPk_corp() == null) {
|
||||||
|
throw new Exception("deleteU8cDataUtilEntity.getPk_corp() == null");
|
||||||
|
}
|
||||||
|
QueryCorrectDeptIdVo queryCorrectDeptIdVo = new QueryCorrectDeptIdVo();
|
||||||
|
queryCorrectDeptIdVo.setPk_deptdoc(deleteU8cDataUtilEntity.getCdeptid());
|
||||||
|
queryCorrectDeptIdVo.setPk_corp(deleteU8cDataUtilEntity.getPk_corp());
|
||||||
|
List<QueryCorrectDeptIdVo> queryCorrectDeptIdVos = deleteU8cDataUtilDao.queryCorrectDeptId(queryCorrectDeptIdVo);
|
||||||
|
if (queryCorrectDeptIdVos == null || queryCorrectDeptIdVos.size() != 1) {
|
||||||
|
throw new Exception("queryCorrectDeptIdVos.size() != 1");
|
||||||
|
}
|
||||||
|
QueryCorrectDeptIdVo queryCorrectDeptIdVo1 = queryCorrectDeptIdVos.get(0);
|
||||||
|
//发起销售订单表头部门修改
|
||||||
|
UpdateSoSaleCdeptId updateSoSaleCdeptId = new UpdateSoSaleCdeptId();
|
||||||
|
updateSoSaleCdeptId.setCdeptid(queryCorrectDeptIdVo1.getNewdeptpk());//部门id
|
||||||
|
updateSoSaleCdeptId.setCsaleid(deleteU8cDataUtilEntity.getCsaleid());//销售订单id
|
||||||
|
deleteU8cDataUtilDao.updateCdeptid(updateSoSaleCdeptId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,9 +2,11 @@ package com.hzya.frame.deletedata.dao;
|
||||||
|
|
||||||
import com.hzya.frame.basedao.dao.IBaseDao;
|
import com.hzya.frame.basedao.dao.IBaseDao;
|
||||||
import com.hzya.frame.deletedata.entity.DeleteU8cDataUtilEntity;
|
import com.hzya.frame.deletedata.entity.DeleteU8cDataUtilEntity;
|
||||||
import com.hzya.frame.deletedata.vo.DeleteArapDjzbVo;
|
//import com.hzya.frame.deletedata.vo.DeleteArapDjzbVo;
|
||||||
import com.hzya.frame.deletedata.vo.DeleteIcGeneralHVo;
|
import com.hzya.frame.deletedata.vo.DeleteIcGeneralHVo;
|
||||||
import com.hzya.frame.deletedata.vo.DeleteSoSaleVo;
|
import com.hzya.frame.deletedata.vo.DeleteSoSaleVo;
|
||||||
|
import com.hzya.frame.deletedata.vo.QueryCorrectDeptIdVo;
|
||||||
|
import com.hzya.frame.deletedata.vo.UpdateSoSaleCdeptId;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@ -86,4 +88,33 @@ public interface DeleteU8cDataUtilDao extends IBaseDao<DeleteU8cDataUtilEntity,
|
||||||
*/
|
*/
|
||||||
List<DeleteU8cDataUtilEntity> querySoSaleinvoiceByCancelApproval(DeleteU8cDataUtilEntity deleteU8cDataUtilEntity) throws Exception;
|
List<DeleteU8cDataUtilEntity> querySoSaleinvoiceByCancelApproval(DeleteU8cDataUtilEntity deleteU8cDataUtilEntity) throws Exception;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询需要处理的销售订单
|
||||||
|
*
|
||||||
|
* @author liuyang
|
||||||
|
*/
|
||||||
|
List<DeleteU8cDataUtilEntity> cancelSignatureSoSaleReadExcel20250528V2() throws Exception;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询需要审批的销售发票
|
||||||
|
*
|
||||||
|
* @author liuyang
|
||||||
|
*/
|
||||||
|
List<DeleteU8cDataUtilEntity> querySoSaleinvoiceByCancelApprovalV2(DeleteU8cDataUtilEntity deleteU8cDataUtilEntity) throws Exception;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查找正确的部门主键
|
||||||
|
*
|
||||||
|
* @author liuyang
|
||||||
|
*/
|
||||||
|
List<QueryCorrectDeptIdVo> queryCorrectDeptId(QueryCorrectDeptIdVo deleteU8cDataUtilEntity) throws Exception;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改销售订单表头部门主键
|
||||||
|
*
|
||||||
|
* @author liuyang
|
||||||
|
*/
|
||||||
|
void updateCdeptid(UpdateSoSaleCdeptId updateSoSaleCdeptId) throws Exception;
|
||||||
}
|
}
|
|
@ -4,9 +4,7 @@ import com.baomidou.dynamic.datasource.annotation.DS;
|
||||||
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
||||||
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.deletedata.vo.DeleteArapDjzbVo;
|
import com.hzya.frame.deletedata.vo.*;
|
||||||
import com.hzya.frame.deletedata.vo.DeleteIcGeneralHVo;
|
|
||||||
import com.hzya.frame.deletedata.vo.DeleteSoSaleVo;
|
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -80,5 +78,29 @@ public class DeleteU8cDataUtilDaoImpl extends MybatisGenericDao<DeleteU8cDataUti
|
||||||
public List<DeleteU8cDataUtilEntity> querySoSaleinvoiceByCancelApproval(DeleteU8cDataUtilEntity soSaleinvoiceEntity) throws Exception {
|
public List<DeleteU8cDataUtilEntity> querySoSaleinvoiceByCancelApproval(DeleteU8cDataUtilEntity soSaleinvoiceEntity) throws Exception {
|
||||||
return query("com.hzya.frame.deletedata.dao.impl.DeleteU8cDataUtilDaoImpl.querySoSaleinvoiceByCancelApproval", soSaleinvoiceEntity);
|
return query("com.hzya.frame.deletedata.dao.impl.DeleteU8cDataUtilDaoImpl.querySoSaleinvoiceByCancelApproval", soSaleinvoiceEntity);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@DS("lets_u8c")
|
||||||
|
@Override
|
||||||
|
public List<DeleteU8cDataUtilEntity> cancelSignatureSoSaleReadExcel20250528V2() throws Exception {
|
||||||
|
return query("com.hzya.frame.deletedata.dao.impl.DeleteU8cDataUtilDaoImpl.cancelSignatureSoSaleReadExcel20250528V2", new DeleteU8cDataUtilEntity());
|
||||||
|
}
|
||||||
|
|
||||||
|
@DS("lets_u8c")
|
||||||
|
@Override
|
||||||
|
public List<DeleteU8cDataUtilEntity> querySoSaleinvoiceByCancelApprovalV2(DeleteU8cDataUtilEntity deleteU8cDataUtilEntity) throws Exception {
|
||||||
|
return query("com.hzya.frame.deletedata.dao.impl.DeleteU8cDataUtilDaoImpl.querySoSaleinvoiceByCancelApprovalV2", deleteU8cDataUtilEntity);
|
||||||
|
}
|
||||||
|
|
||||||
|
@DS("lets_u8c")
|
||||||
|
@Override
|
||||||
|
public List<QueryCorrectDeptIdVo> queryCorrectDeptId(QueryCorrectDeptIdVo deleteU8cDataUtilEntity) throws Exception {
|
||||||
|
return (List<QueryCorrectDeptIdVo>) selectList("com.hzya.frame.deletedata.dao.impl.DeleteU8cDataUtilDaoImpl.queryCorrectDeptId", deleteU8cDataUtilEntity);
|
||||||
|
}
|
||||||
|
|
||||||
|
@DS("lets_u8c")
|
||||||
|
@Override
|
||||||
|
public void updateCdeptid(UpdateSoSaleCdeptId updateSoSaleCdeptId) throws Exception {
|
||||||
|
update("com.hzya.frame.deletedata.dao.impl.DeleteU8cDataUtilDaoImpl.updateCdeptid", updateSoSaleCdeptId);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,36 @@ public class DeleteU8cDataUtilEntity extends BaseEntity {
|
||||||
private String dwbm;
|
private String dwbm;
|
||||||
// private String vouchid;
|
// private String vouchid;
|
||||||
|
|
||||||
|
private String csaleid;
|
||||||
|
|
||||||
|
private String fstatus;
|
||||||
|
|
||||||
|
private String cdeptid;
|
||||||
|
|
||||||
|
public String getCdeptid() {
|
||||||
|
return cdeptid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCdeptid(String cdeptid) {
|
||||||
|
this.cdeptid = cdeptid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getFstatus() {
|
||||||
|
return fstatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFstatus(String fstatus) {
|
||||||
|
this.fstatus = fstatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCsaleid() {
|
||||||
|
return csaleid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCsaleid(String csaleid) {
|
||||||
|
this.csaleid = csaleid;
|
||||||
|
}
|
||||||
|
|
||||||
public String getDjbh() {
|
public String getDjbh() {
|
||||||
return djbh;
|
return djbh;
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,6 +10,9 @@
|
||||||
|
|
||||||
<result property="djbh" column="djbh" jdbcType="VARCHAR"/>
|
<result property="djbh" column="djbh" jdbcType="VARCHAR"/>
|
||||||
<result property="dwbm" column="dwbm" jdbcType="VARCHAR"/>
|
<result property="dwbm" column="dwbm" jdbcType="VARCHAR"/>
|
||||||
|
|
||||||
|
<result property="csaleid" column="csaleid" jdbcType="VARCHAR"/>
|
||||||
|
<result property="cdeptid" column="cdeptid" jdbcType="VARCHAR"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<!--查询需要删除的销售发票-->
|
<!--查询需要删除的销售发票-->
|
||||||
|
@ -109,6 +112,9 @@
|
||||||
AND cfirstbillhid in (${cfirstbillhids})
|
AND cfirstbillhid in (${cfirstbillhids})
|
||||||
</if>
|
</if>
|
||||||
) and a.dr = 0
|
) and a.dr = 0
|
||||||
|
<if test="fbillflag!=null and fbillflag!=null">
|
||||||
|
and a.fbillflag = #{fbillflag}
|
||||||
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="queryIcGeneralHBySign" parameterType="com.hzya.frame.deletedata.vo.DeleteIcGeneralHVo" resultMap="get-IcGeneralHByDelete-result">
|
<select id="queryIcGeneralHBySign" parameterType="com.hzya.frame.deletedata.vo.DeleteIcGeneralHVo" resultMap="get-IcGeneralHByDelete-result">
|
||||||
|
@ -183,6 +189,9 @@
|
||||||
<if test="csaleids!=null and csaleids!=''">
|
<if test="csaleids!=null and csaleids!=''">
|
||||||
AND a.csaleid in (${csaleids})
|
AND a.csaleid in (${csaleids})
|
||||||
</if>
|
</if>
|
||||||
|
<if test="fstatus!=null">
|
||||||
|
AND a.fstatus = #{fstatus}
|
||||||
|
</if>
|
||||||
AND a.dr = 0
|
AND a.dr = 0
|
||||||
ORDER BY
|
ORDER BY
|
||||||
a.DBILLDATE,
|
a.DBILLDATE,
|
||||||
|
@ -260,5 +269,105 @@
|
||||||
AND a.dr = 0
|
AND a.dr = 0
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="cancelSignatureSoSaleReadExcel20250528V2" 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.csaleid = '1015A11000000000OUKB'
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!--查询审批状态下的销售发票-->
|
||||||
|
<select id="querySoSaleinvoiceByCancelApprovalV2" parameterType="com.hzya.frame.deletedata.entity.DeleteU8cDataUtilEntity" resultMap="get-DeleteU8cDataUtilEntity-result">
|
||||||
|
SELECT
|
||||||
|
a.csaleid,
|
||||||
|
a.vreceiptcode,
|
||||||
|
a.dbilldate,
|
||||||
|
a.cbiztype,
|
||||||
|
a.fstatus,
|
||||||
|
a.pk_corp,
|
||||||
|
b.unitname,
|
||||||
|
b.unitcode
|
||||||
|
FROM
|
||||||
|
so_saleinvoice a
|
||||||
|
LEFT JOIN bd_corp b ON b.pk_corp = a.pk_corp
|
||||||
|
WHERE
|
||||||
|
1=1
|
||||||
|
<if test="fstatus!=null and fstatus!=''">
|
||||||
|
AND a.FSTATUS = #{fstatus}
|
||||||
|
</if>
|
||||||
|
and a.csaleid in (
|
||||||
|
SELECT csaleid FROM so_saleinvoice_b WHERE csourcebillid IN ( ${csaleid} ) AND dr = 0
|
||||||
|
)
|
||||||
|
AND a.dr = 0
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!--查找正确的部门id-->
|
||||||
|
<select id="queryCorrectDeptId" parameterType="com.hzya.frame.deletedata.vo.QueryCorrectDeptIdVo" resultMap="get-queryCorrectDeptId-result">
|
||||||
|
-- 找到正确的部门主键
|
||||||
|
SELECT
|
||||||
|
a.PK_DEPTDOC "olddeptpk",
|
||||||
|
a.DEPTCODE "olddeptcode",
|
||||||
|
a.PK_CORP "olddeptcorp",
|
||||||
|
b.pk_deptdoc "newdeptpk",
|
||||||
|
b.deptcode "newdeptcode",
|
||||||
|
b.pk_corp "newdeptcorp"
|
||||||
|
FROM
|
||||||
|
( SELECT a.pk_deptdoc, a.deptcode, a.pk_corp FROM bd_deptdoc a WHERE a.pk_deptdoc = #{pk_deptdoc} AND dr = 0 ) a
|
||||||
|
LEFT JOIN bd_deptdoc b ON a.DEPTCODE = b.DEPTCODE
|
||||||
|
AND b.PK_CORP = #{pk_corp}
|
||||||
|
AND b.dr = 0
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<resultMap id="get-queryCorrectDeptId-result" type="com.hzya.frame.deletedata.vo.QueryCorrectDeptIdVo" >
|
||||||
|
<result property="olddeptpk" column="olddeptpk" jdbcType="VARCHAR"/>
|
||||||
|
<result property="olddeptcode" column="olddeptcode" jdbcType="VARCHAR"/>
|
||||||
|
<result property="olddeptcorp" column="olddeptcorp" jdbcType="VARCHAR"/>
|
||||||
|
<result property="newdeptpk" column="newdeptpk" jdbcType="VARCHAR"/>
|
||||||
|
<result property="newdeptcode" column="newdeptcode" jdbcType="VARCHAR"/>
|
||||||
|
<result property="newdeptcorp" column="newdeptcorp" jdbcType="VARCHAR"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<!--修改销售主表对应的部门id-->
|
||||||
|
<update id="updateCdeptid" parameterType="com.hzya.frame.deletedata.vo.UpdateSoSaleCdeptId">
|
||||||
|
update so_sale set cdeptid=#{cdeptid} where csaleid = #{csaleid} and dr = 0
|
||||||
|
</update>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,25 @@
|
||||||
|
package com.hzya.frame.deletedata.vo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author:liuyang
|
||||||
|
* @Package:com.hzya.frame.deletedata.vo
|
||||||
|
* @Project:kangarooDataCenterV3
|
||||||
|
* @name:QueryCorrectDeptIdVo
|
||||||
|
* @Date:2025/5/29 09:27
|
||||||
|
* @Filename:QueryCorrectDeptIdVo
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class QueryCorrectDeptIdVo {
|
||||||
|
//入参
|
||||||
|
private String pk_deptdoc;
|
||||||
|
private String pk_corp;
|
||||||
|
//出参
|
||||||
|
private String olddeptpk;
|
||||||
|
private String olddeptcode;
|
||||||
|
private String olddeptcorp;
|
||||||
|
private String newdeptpk;
|
||||||
|
private String newdeptcode;
|
||||||
|
private String newdeptcorp;
|
||||||
|
}
|
|
@ -0,0 +1,17 @@
|
||||||
|
package com.hzya.frame.deletedata.vo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author:liuyang
|
||||||
|
* @Package:com.hzya.frame.deletedata.vo
|
||||||
|
* @Project:kangarooDataCenterV3
|
||||||
|
* @name:UpdateSoSaleCdeptId
|
||||||
|
* @Date:2025/5/29 10:48
|
||||||
|
* @Filename:UpdateSoSaleCdeptId
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class UpdateSoSaleCdeptId {
|
||||||
|
private String cdeptid;
|
||||||
|
private String csaleid;
|
||||||
|
}
|
Loading…
Reference in New Issue