fix(sales): 修复销售退货赠品判断逻辑
- 在 SoSaleReturnPluginInitializerToC 类中,修改了赠品判断逻辑,使用 setScale 方法保留两位小数 - 更新了 u8cOperationFlow 方法,将业务流程名称从 "TOC销售" 改为 "TOC销售退货" - 在测试类中更新了测试用例的订单号
This commit is contained in:
parent
d01ee3eac3
commit
ac8c7ac853
|
@ -1112,7 +1112,7 @@ public class SoSaleReturnPluginInitializerToC extends PluginBaseEntity {
|
|||
|
||||
//判断是否为赠品
|
||||
Boolean isblargessflag = false;
|
||||
if ("0".equals(goodsRertunSonDetailsDto.getGroupTotalPayAmount().stripTrailingZeros().toPlainString())) {
|
||||
if ("0".equals(goodsRertunSonDetailsDto.getGroupTotalPayAmount().setScale(2, BigDecimal.ROUND_HALF_UP).stripTrailingZeros().toPlainString())) {
|
||||
isblargessflag = true;
|
||||
}
|
||||
|
||||
|
@ -1728,10 +1728,10 @@ public class SoSaleReturnPluginInitializerToC extends PluginBaseEntity {
|
|||
*
|
||||
* @author liuyang
|
||||
*/
|
||||
private BdBusitypeEntity u8cOperationFlow() throws Exception {
|
||||
public BdBusitypeEntity u8cOperationFlow() throws Exception {
|
||||
//查询业务流程
|
||||
//2024年8月6日 11:33:07 具体的业务流程名称,还需要实施提供
|
||||
String processName = "TOC销售";
|
||||
String processName = "TOC销售退货";
|
||||
BdBusitypeEntity bdBusitypeEntity = queryBdBusitypeUtil.queryBdBusitype(processName);
|
||||
Assert.notNull(bdBusitypeEntity, "根据业务流程名称({})没有查询到业务流程", processName);
|
||||
return bdBusitypeEntity;
|
||||
|
|
|
@ -89,7 +89,7 @@ public class SoSaleOutPluginInitializerToBTest {
|
|||
|
||||
// soSaleOutPluginInitializerToB.startImplementByStockTime("2024-10-31 14:48:41", "2024-10-31 14:48:41");
|
||||
|
||||
soSaleOutPluginInitializerToB.startImplementByCode("LETS-SH2024122000040612", "stock");
|
||||
soSaleOutPluginInitializerToB.startImplementByCode("LETS-SH2025020600020284", "tran");
|
||||
|
||||
|
||||
// soSaleOutPluginInitializerToB.startImplementByStockTime("2024-11-08 19:18:02", "2024-11-08 19:18:02");
|
||||
|
|
|
@ -36,7 +36,7 @@ public class SoSaleReturnPluginInitializerToCTest {
|
|||
public void startImplement() {
|
||||
// soSaleReturnPluginInitializerToC.startImplement(null, null);
|
||||
try {
|
||||
// String code = "LETS-RE2024122300000847";
|
||||
// String code = "LETS-RE2025022000001336";
|
||||
// soSaleReturnPluginInitializerToC.startImplementByCode(code, "tran");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
|
@ -50,7 +50,7 @@ public class SoSaleReturnPluginInitializerToCTest {
|
|||
|
||||
// soSaleReturnPluginInitializerToC.startImplementByCode("LETS-RE2025010900002384", "tran");
|
||||
|
||||
soSaleReturnPluginInitializerToC.startImplementStockByTime("2025-01-31 00:00:00", "2025-01-31 23:59:59", "1");
|
||||
// soSaleReturnPluginInitializerToC.startImplementStockByTime("2025-01-31 00:00:00", "2025-01-31 23:59:59", "1");
|
||||
|
||||
// JSONObject jsonObject = new JSONObject();
|
||||
// soSaleReturnPluginInitializerToC.executeBusiness(jsonObject);
|
||||
|
@ -71,6 +71,8 @@ public class SoSaleReturnPluginInitializerToCTest {
|
|||
//
|
||||
// String s = soSaleReturnPluginInitializerToC.timeJudgment(header2);
|
||||
// System.out.println(s);
|
||||
|
||||
soSaleReturnPluginInitializerToC.u8cOperationFlow();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue