Commit 15936b73 by huluobin

周转波动预测修改

parent 36818628
...@@ -9,7 +9,6 @@ import java.time.LocalDateTime; ...@@ -9,7 +9,6 @@ import java.time.LocalDateTime;
@Data @Data
public class DcAutoForecastFluctuation { public class DcAutoForecastFluctuation {
/** /**
*
* This field was generated by MyBatis Generator. * This field was generated by MyBatis Generator.
* This field corresponds to the database column dc_auto_forecast_fluctuation.id * This field corresponds to the database column dc_auto_forecast_fluctuation.id
* *
...@@ -18,7 +17,6 @@ public class DcAutoForecastFluctuation { ...@@ -18,7 +17,6 @@ public class DcAutoForecastFluctuation {
private Integer id; private Integer id;
/** /**
*
* This field was generated by MyBatis Generator. * This field was generated by MyBatis Generator.
* This field corresponds to the database column dc_auto_forecast_fluctuation.gmt_create * This field corresponds to the database column dc_auto_forecast_fluctuation.gmt_create
* *
...@@ -27,7 +25,6 @@ public class DcAutoForecastFluctuation { ...@@ -27,7 +25,6 @@ public class DcAutoForecastFluctuation {
private LocalDateTime gmtCreate; private LocalDateTime gmtCreate;
/** /**
*
* This field was generated by MyBatis Generator. * This field was generated by MyBatis Generator.
* This field corresponds to the database column dc_auto_forecast_fluctuation.gmt_modified * This field corresponds to the database column dc_auto_forecast_fluctuation.gmt_modified
* *
...@@ -36,7 +33,6 @@ public class DcAutoForecastFluctuation { ...@@ -36,7 +33,6 @@ public class DcAutoForecastFluctuation {
private LocalDateTime gmtModified; private LocalDateTime gmtModified;
/** /**
*
* This field was generated by MyBatis Generator. * This field was generated by MyBatis Generator.
* This field corresponds to the database column dc_auto_forecast_fluctuation.bailun_sku * This field corresponds to the database column dc_auto_forecast_fluctuation.bailun_sku
* *
...@@ -45,7 +41,6 @@ public class DcAutoForecastFluctuation { ...@@ -45,7 +41,6 @@ public class DcAutoForecastFluctuation {
private String bailunSku; private String bailunSku;
/** /**
*
* This field was generated by MyBatis Generator. * This field was generated by MyBatis Generator.
* This field corresponds to the database column dc_auto_forecast_fluctuation.warehouse_code * This field corresponds to the database column dc_auto_forecast_fluctuation.warehouse_code
* *
...@@ -54,7 +49,6 @@ public class DcAutoForecastFluctuation { ...@@ -54,7 +49,6 @@ public class DcAutoForecastFluctuation {
private String warehouseCode; private String warehouseCode;
/** /**
*
* This field was generated by MyBatis Generator. * This field was generated by MyBatis Generator.
* This field corresponds to the database column dc_auto_forecast_fluctuation.warehouse_name * This field corresponds to the database column dc_auto_forecast_fluctuation.warehouse_name
* *
...@@ -63,7 +57,6 @@ public class DcAutoForecastFluctuation { ...@@ -63,7 +57,6 @@ public class DcAutoForecastFluctuation {
private String warehouseName; private String warehouseName;
/** /**
*
* This field was generated by MyBatis Generator. * This field was generated by MyBatis Generator.
* This field corresponds to the database column dc_auto_forecast_fluctuation.start_time * This field corresponds to the database column dc_auto_forecast_fluctuation.start_time
* *
...@@ -72,7 +65,6 @@ public class DcAutoForecastFluctuation { ...@@ -72,7 +65,6 @@ public class DcAutoForecastFluctuation {
private LocalDate startTime; private LocalDate startTime;
/** /**
*
* This field was generated by MyBatis Generator. * This field was generated by MyBatis Generator.
* This field corresponds to the database column dc_auto_forecast_fluctuation.end_time * This field corresponds to the database column dc_auto_forecast_fluctuation.end_time
* *
...@@ -81,7 +73,6 @@ public class DcAutoForecastFluctuation { ...@@ -81,7 +73,6 @@ public class DcAutoForecastFluctuation {
private LocalDate endTime; private LocalDate endTime;
/** /**
*
* This field was generated by MyBatis Generator. * This field was generated by MyBatis Generator.
* This field corresponds to the database column dc_auto_forecast_fluctuation.bl_operator * This field corresponds to the database column dc_auto_forecast_fluctuation.bl_operator
* *
...@@ -90,7 +81,6 @@ public class DcAutoForecastFluctuation { ...@@ -90,7 +81,6 @@ public class DcAutoForecastFluctuation {
private String blOperator; private String blOperator;
/** /**
*
* This field was generated by MyBatis Generator. * This field was generated by MyBatis Generator.
* This field corresponds to the database column dc_auto_forecast_fluctuation.remark * This field corresponds to the database column dc_auto_forecast_fluctuation.remark
* *
...@@ -99,7 +89,6 @@ public class DcAutoForecastFluctuation { ...@@ -99,7 +89,6 @@ public class DcAutoForecastFluctuation {
private String remark; private String remark;
/** /**
*
* This field was generated by MyBatis Generator. * This field was generated by MyBatis Generator.
* This field corresponds to the database column dc_auto_forecast_fluctuation.has_solve * This field corresponds to the database column dc_auto_forecast_fluctuation.has_solve
* *
...@@ -108,7 +97,6 @@ public class DcAutoForecastFluctuation { ...@@ -108,7 +97,6 @@ public class DcAutoForecastFluctuation {
private Boolean hasSolve; private Boolean hasSolve;
/** /**
*
* This field was generated by MyBatis Generator. * This field was generated by MyBatis Generator.
* This field corresponds to the database column dc_auto_forecast_fluctuation.forecast_solve_time * This field corresponds to the database column dc_auto_forecast_fluctuation.forecast_solve_time
* *
...@@ -117,7 +105,6 @@ public class DcAutoForecastFluctuation { ...@@ -117,7 +105,6 @@ public class DcAutoForecastFluctuation {
private LocalDateTime forecastSolveTime; private LocalDateTime forecastSolveTime;
/** /**
*
* This field was generated by MyBatis Generator. * This field was generated by MyBatis Generator.
* This field corresponds to the database column dc_auto_forecast_fluctuation.has_confirm * This field corresponds to the database column dc_auto_forecast_fluctuation.has_confirm
* *
...@@ -126,7 +113,6 @@ public class DcAutoForecastFluctuation { ...@@ -126,7 +113,6 @@ public class DcAutoForecastFluctuation {
private Boolean hasConfirm; private Boolean hasConfirm;
/** /**
*
* This field was generated by MyBatis Generator. * This field was generated by MyBatis Generator.
* This field corresponds to the database column dc_auto_forecast_fluctuation.confirm_time * This field corresponds to the database column dc_auto_forecast_fluctuation.confirm_time
* *
...@@ -135,7 +121,6 @@ public class DcAutoForecastFluctuation { ...@@ -135,7 +121,6 @@ public class DcAutoForecastFluctuation {
private LocalDateTime confirmTime; private LocalDateTime confirmTime;
/** /**
*
* This field was generated by MyBatis Generator. * This field was generated by MyBatis Generator.
* This field corresponds to the database column dc_auto_forecast_fluctuation.type * This field corresponds to the database column dc_auto_forecast_fluctuation.type
* *
...@@ -144,7 +129,6 @@ public class DcAutoForecastFluctuation { ...@@ -144,7 +129,6 @@ public class DcAutoForecastFluctuation {
private Integer type; private Integer type;
/** /**
*
* This field was generated by MyBatis Generator. * This field was generated by MyBatis Generator.
* This field corresponds to the database column dc_auto_forecast_fluctuation.avg_sales_three * This field corresponds to the database column dc_auto_forecast_fluctuation.avg_sales_three
* *
...@@ -153,7 +137,6 @@ public class DcAutoForecastFluctuation { ...@@ -153,7 +137,6 @@ public class DcAutoForecastFluctuation {
private BigDecimal avgSalesThree; private BigDecimal avgSalesThree;
/** /**
*
* This field was generated by MyBatis Generator. * This field was generated by MyBatis Generator.
* This field corresponds to the database column dc_auto_forecast_fluctuation.quantity * This field corresponds to the database column dc_auto_forecast_fluctuation.quantity
* *
...@@ -213,22 +196,22 @@ public class DcAutoForecastFluctuation { ...@@ -213,22 +196,22 @@ public class DcAutoForecastFluctuation {
} }
DcAutoForecastFluctuation other = (DcAutoForecastFluctuation) that; DcAutoForecastFluctuation other = (DcAutoForecastFluctuation) that;
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
&& (this.getGmtCreate() == null ? other.getGmtCreate() == null : this.getGmtCreate().equals(other.getGmtCreate())) && (this.getGmtCreate() == null ? other.getGmtCreate() == null : this.getGmtCreate().equals(other.getGmtCreate()))
&& (this.getGmtModified() == null ? other.getGmtModified() == null : this.getGmtModified().equals(other.getGmtModified())) && (this.getGmtModified() == null ? other.getGmtModified() == null : this.getGmtModified().equals(other.getGmtModified()))
&& (this.getBailunSku() == null ? other.getBailunSku() == null : this.getBailunSku().equals(other.getBailunSku())) && (this.getBailunSku() == null ? other.getBailunSku() == null : this.getBailunSku().equals(other.getBailunSku()))
&& (this.getWarehouseCode() == null ? other.getWarehouseCode() == null : this.getWarehouseCode().equals(other.getWarehouseCode())) && (this.getWarehouseCode() == null ? other.getWarehouseCode() == null : this.getWarehouseCode().equals(other.getWarehouseCode()))
&& (this.getWarehouseName() == null ? other.getWarehouseName() == null : this.getWarehouseName().equals(other.getWarehouseName())) && (this.getWarehouseName() == null ? other.getWarehouseName() == null : this.getWarehouseName().equals(other.getWarehouseName()))
&& (this.getStartTime() == null ? other.getStartTime() == null : this.getStartTime().equals(other.getStartTime())) && (this.getStartTime() == null ? other.getStartTime() == null : this.getStartTime().equals(other.getStartTime()))
&& (this.getEndTime() == null ? other.getEndTime() == null : this.getEndTime().equals(other.getEndTime())) && (this.getEndTime() == null ? other.getEndTime() == null : this.getEndTime().equals(other.getEndTime()))
&& (this.getBlOperator() == null ? other.getBlOperator() == null : this.getBlOperator().equals(other.getBlOperator())) && (this.getBlOperator() == null ? other.getBlOperator() == null : this.getBlOperator().equals(other.getBlOperator()))
&& (this.getRemark() == null ? other.getRemark() == null : this.getRemark().equals(other.getRemark())) && (this.getRemark() == null ? other.getRemark() == null : this.getRemark().equals(other.getRemark()))
&& (this.getHasSolve() == null ? other.getHasSolve() == null : this.getHasSolve().equals(other.getHasSolve())) && (this.getHasSolve() == null ? other.getHasSolve() == null : this.getHasSolve().equals(other.getHasSolve()))
&& (this.getForecastSolveTime() == null ? other.getForecastSolveTime() == null : this.getForecastSolveTime().equals(other.getForecastSolveTime())) && (this.getForecastSolveTime() == null ? other.getForecastSolveTime() == null : this.getForecastSolveTime().equals(other.getForecastSolveTime()))
&& (this.getHasConfirm() == null ? other.getHasConfirm() == null : this.getHasConfirm().equals(other.getHasConfirm())) && (this.getHasConfirm() == null ? other.getHasConfirm() == null : this.getHasConfirm().equals(other.getHasConfirm()))
&& (this.getConfirmTime() == null ? other.getConfirmTime() == null : this.getConfirmTime().equals(other.getConfirmTime())) && (this.getConfirmTime() == null ? other.getConfirmTime() == null : this.getConfirmTime().equals(other.getConfirmTime()))
&& (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType())) && (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType()))
&& (this.getAvgSalesThree() == null ? other.getAvgSalesThree() == null : this.getAvgSalesThree().equals(other.getAvgSalesThree())) && (this.getAvgSalesThree() == null ? other.getAvgSalesThree() == null : this.getAvgSalesThree().equals(other.getAvgSalesThree()))
&& (this.getQuantity() == null ? other.getQuantity() == null : this.getQuantity().equals(other.getQuantity())); && (this.getQuantity() == null ? other.getQuantity() == null : this.getQuantity().equals(other.getQuantity()));
} }
/** /**
...@@ -260,4 +243,4 @@ public class DcAutoForecastFluctuation { ...@@ -260,4 +243,4 @@ public class DcAutoForecastFluctuation {
result = prime * result + ((getQuantity() == null) ? 0 : getQuantity().hashCode()); result = prime * result + ((getQuantity() == null) ? 0 : getQuantity().hashCode());
return result; return result;
} }
} }
\ No newline at end of file
package com.bailuntec.mapper;
import com.bailuntec.domain.example.DcAutoConfigSalesUpperLimitExample;
import com.bailuntec.utils.SessionUtil;
import org.junit.jupiter.api.Test;
/**
* <p>
*
* </p>
*
* @author robbendev
* @since 2020/8/15 2:13 下午
*/
class DcAutoConfigSalesUpperLimitMapperTest {
@Test
void selectByExample() {
DcAutoConfigSalesUpperLimitMapper dcAutoConfigSalesUpperLimitMapper = SessionUtil.getSession().getMapper(DcAutoConfigSalesUpperLimitMapper.class);
dcAutoConfigSalesUpperLimitMapper.selectByExample(DcAutoConfigSalesUpperLimitExample.newAndCreateCriteria()
.andBlOperatorEqualTo("xadasdadsadsadafdafd")
.example());
}
}
...@@ -23,6 +23,12 @@ ...@@ -23,6 +23,12 @@
</exclusions> </exclusions>
</dependency> </dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>easyexcel</artifactId>
<version>2.1.1</version>
</dependency>
<dependency> <dependency>
<groupId>org.projectlombok</groupId> <groupId>org.projectlombok</groupId>
......
package com.bailuntec.excel;
import com.alibaba.excel.annotation.ExcelProperty;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
/**
* <p>
*
* </p>
*
* @author robbendev
* @since 2020/6/12 5:55 下午
*/
@Data
public class DcAutoTurnoverExcel implements Serializable {
@ExcelProperty("Sku")
private String sku;
@ExcelProperty("仓库编码")
private String warehouseCode;
@ExcelProperty("开始时间")
private String status;
}
package com.bailuntec.excel;
import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.event.AnalysisEventListener;
import com.alibaba.fastjson.JSON;
import com.bailuntec.domain.constant.CommonConstant;
import com.bailuntec.domain.entity.DcBaseStock;
import com.bailuntec.domain.example.DcBaseStockExample;
import com.bailuntec.job.AutoTurnoverJob;
import com.bailuntec.mapper.DcBaseStockMapper;
import com.bailuntec.utils.SessionUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
import java.util.List;
/**
* <p>
* 有个很重要的点 DemoDataListener 不能被spring管理,要每次读取excel都要new,然后里面用到spring可以构造方法传进去
* </p>
*
* @author robbendev
* @since 2020/6/6 5:29 下午
*/
public class ExcelListener extends AnalysisEventListener<DcAutoTurnoverExcel> {
private static final Logger LOGGER = LoggerFactory.getLogger(DcAutoTurnoverExcel.class);
/**
* 每隔5条存储数据库,实际使用中可以3000条,然后清理list ,方便内存回收
*/
private static final int BATCH_COUNT = 5;
private AutoTurnoverJob autoTurnoverJob;
public ExcelListener() {
autoTurnoverJob = new AutoTurnoverJob();
}
List<DcAutoTurnoverExcel> list = new ArrayList<>();
@Override
public void invoke(DcAutoTurnoverExcel data, AnalysisContext context) {
LOGGER.info("解析到一条数据:{}", JSON.toJSONString(data));
list.add(data);
if (list.size() >= BATCH_COUNT) {
syncData();
list.clear();
}
}
@Override
public void doAfterAllAnalysed(AnalysisContext context) {
syncData();
LOGGER.info("所有数据解析完成!");
}
/**
* 加上存储数据库
*/
private void syncData() {
LOGGER.info("{}条数据,开始存储数据库!", list.size());
list.forEach(dcAutoTurnoverExcel -> {
DcBaseStock dcBaseStock = SessionUtil.getSession().getMapper(DcBaseStockMapper.class)
.selectOneByExample(DcBaseStockExample.newAndCreateCriteria()
.andBailunSkuEqualTo(dcAutoTurnoverExcel.getSku())
.andWarehouseCodeEqualTo(dcAutoTurnoverExcel.getWarehouseCode())
.example());
try {
autoTurnoverJob.autoTurnoverFromStock(DateTimeFormatter.ofPattern(CommonConstant.DATE_FORMAT).format(LocalDate.now()), dcBaseStock);
} catch (Exception e) {
e.printStackTrace();
}
});
LOGGER.info("存储数据库成功!");
}
}
...@@ -2,6 +2,9 @@ package com.bailuntec.service; ...@@ -2,6 +2,9 @@ package com.bailuntec.service;
import com.bailuntec.domain.entity.DcAutoTurnover; import com.bailuntec.domain.entity.DcAutoTurnover;
import java.math.BigDecimal;
import java.util.List;
/** /**
* <p> * <p>
* *
...@@ -12,6 +15,7 @@ import com.bailuntec.domain.entity.DcAutoTurnover; ...@@ -12,6 +15,7 @@ import com.bailuntec.domain.entity.DcAutoTurnover;
*/ */
public interface AutoTurnoverService { public interface AutoTurnoverService {
/** /**
* <p> * <p>
* 计算设置autoTurnover销售预测 * 计算设置autoTurnover销售预测
...@@ -19,6 +23,16 @@ public interface AutoTurnoverService { ...@@ -19,6 +23,16 @@ public interface AutoTurnoverService {
* *
* @param dcAutoTurnover * @param dcAutoTurnover
*/ */
void setAutoTurnoverSaleDetails(DcAutoTurnover dcAutoTurnover); List<BigDecimal> getAutoTurnoverSaleDetails(DcAutoTurnover dcAutoTurnover, int turnoverDays, int autoForecastDay);
/**
* <p>
* 获取设置autoTurnover销售预测
* </p>
*
* @param dcAutoTurnover
*/
List<String> getAutoTurnoverSaleDetailsFormula(DcAutoTurnover dcAutoTurnover, int turnoverDays, int autoForecastDay);
} }
import com.alibaba.excel.EasyExcel;
import com.bailuntec.domain.constant.CommonConstant; import com.bailuntec.domain.constant.CommonConstant;
import com.bailuntec.domain.entity.DcBaseStock; import com.bailuntec.domain.entity.DcBaseStock;
import com.bailuntec.domain.entity.JobPointLog; import com.bailuntec.domain.entity.JobPointLog;
import com.bailuntec.domain.example.DcBaseStockExample; import com.bailuntec.domain.example.DcBaseStockExample;
import com.bailuntec.excel.DcAutoTurnoverExcel;
import com.bailuntec.excel.ExcelListener;
import com.bailuntec.job.AutoTurnoverJob; import com.bailuntec.job.AutoTurnoverJob;
import com.bailuntec.listener.AutoTurnoverJobListener; import com.bailuntec.listener.AutoTurnoverJobListener;
import com.bailuntec.mapper.DcBaseStockMapper; import com.bailuntec.mapper.DcBaseStockMapper;
...@@ -18,7 +21,7 @@ import java.util.HashMap; ...@@ -18,7 +21,7 @@ import java.util.HashMap;
import java.util.List; import java.util.List;
public class AutoTurnoverTest { public class AutoTurnoverTest {
// @Test // @Test
public void test1() throws Exception { public void test1() throws Exception {
LocalDate parse = LocalDate.parse("2018-01-01", DateTimeFormatter.ofPattern("yyyy-MM-dd")); LocalDate parse = LocalDate.parse("2018-01-01", DateTimeFormatter.ofPattern("yyyy-MM-dd"));
LocalDate parse1 = LocalDate.parse("2018-01-02", DateTimeFormatter.ofPattern("yyyy-MM-dd")); LocalDate parse1 = LocalDate.parse("2018-01-02", DateTimeFormatter.ofPattern("yyyy-MM-dd"));
...@@ -29,10 +32,12 @@ public class AutoTurnoverTest { ...@@ -29,10 +32,12 @@ public class AutoTurnoverTest {
System.out.println(parse.compareTo(parse1)); System.out.println(parse.compareTo(parse1));
} }
} }
@Test @Test
public void test12() throws Exception { public void test12() throws Exception {
System.out.println(LocalDateTime.of(1990,1,1,0,0)); System.out.println(LocalDateTime.of(1990, 1, 1, 0, 0));
} }
@Test @Test
public void test10() throws Exception { public void test10() throws Exception {
int interval = Period.between(LocalDate.now().minusDays(1), LocalDate.now()).getDays(); int interval = Period.between(LocalDate.now().minusDays(1), LocalDate.now()).getDays();
...@@ -42,6 +47,7 @@ public class AutoTurnoverTest { ...@@ -42,6 +47,7 @@ public class AutoTurnoverTest {
System.out.println(interval1); System.out.println(interval1);
System.out.println(interval2); System.out.println(interval2);
} }
@Test @Test
public void test() throws Exception { public void test() throws Exception {
// 生成周转 // 生成周转
...@@ -76,6 +82,7 @@ public class AutoTurnoverTest { ...@@ -76,6 +82,7 @@ public class AutoTurnoverTest {
autoTurnoverJob.autoTurnoverFromStock(queryTime, dcBaseStock); autoTurnoverJob.autoTurnoverFromStock(queryTime, dcBaseStock);
} }
} }
@Test @Test
public void test3() throws Exception { public void test3() throws Exception {
String queryTime = DateTimeFormatter.ofPattern(CommonConstant.DATE_FORMAT).format(LocalDate.now()); String queryTime = DateTimeFormatter.ofPattern(CommonConstant.DATE_FORMAT).format(LocalDate.now());
...@@ -93,31 +100,41 @@ public class AutoTurnoverTest { ...@@ -93,31 +100,41 @@ public class AutoTurnoverTest {
autoTurnoverJob.autoTurnoverFromStock(queryTime, dcBaseStock); autoTurnoverJob.autoTurnoverFromStock(queryTime, dcBaseStock);
} }
} }
@Test @Test
public void test4() { public void test4() {
AutoTurnoverJob autoTurnoverJob = new AutoTurnoverJob(); AutoTurnoverJob autoTurnoverJob = new AutoTurnoverJob();
HashMap<Integer, String> map = new HashMap<>(); HashMap<Integer, String> map = new HashMap<>();
map.put(1,""); map.put(1, "");
ShardingContext shardingContext = new ShardingContext(new ShardingContexts("","",1,"INCREMENT", map), 0); ShardingContext shardingContext = new ShardingContext(new ShardingContexts("", "", 1, "INCREMENT", map), 0);
JobPointLog jobPointLog = new JobPointLog("", 1, 400, 1, 1, LocalDateTime.now().minusSeconds(1), LocalDateTime.now()); JobPointLog jobPointLog = new JobPointLog("", 1, 400, 1, 1, LocalDateTime.now().minusSeconds(1), LocalDateTime.now());
autoTurnoverJob.executeJob(shardingContext, jobPointLog); autoTurnoverJob.executeJob(shardingContext, jobPointLog);
} }
@Test @Test
public void test5() { public void test5() {
AutoTurnoverJobListener autoTurnoverJobListener = new AutoTurnoverJobListener(); AutoTurnoverJobListener autoTurnoverJobListener = new AutoTurnoverJobListener();
autoTurnoverJobListener.afterJobExecuted(null); autoTurnoverJobListener.afterJobExecuted(null);
} }
@Test @Test
public void test55() { public void test55() {
LocalDateTime recordTime = LocalDateTime.now(); LocalDateTime recordTime = LocalDateTime.now();
LocalDateTime finalEstimatedArrivalTime = LocalDateTime.now().minusDays(1); LocalDateTime finalEstimatedArrivalTime = LocalDateTime.now().minusDays(1);
int interval = Period.between(recordTime.toLocalDate(), finalEstimatedArrivalTime.toLocalDate()).getDays(); int interval = Period.between(recordTime.toLocalDate(), finalEstimatedArrivalTime.toLocalDate()).getDays();
System.out.println(interval); System.out.println(interval);
} }
@Test @Test
public void test66() { public void test66() {
} }
@Test
public void testDcAutoTurnover() {
String filePath = "/Users/huluobin/Library/Containers/com.tencent.WeWorkMac/Data/Library/Application Support/WXWork/Data/1688853793439460/Cache/File/2020-08/实际冗余测试815.xlsx";
EasyExcel.read(filePath, DcAutoTurnoverExcel.class, new ExcelListener()).sheet().doRead();
}
} }
...@@ -27,7 +27,7 @@ class AutoTurnoverServiceImplTest { ...@@ -27,7 +27,7 @@ class AutoTurnoverServiceImplTest {
AutoTurnoverService autoTurnoverService = new AutoTurnoverServiceImpl(); AutoTurnoverService autoTurnoverService = new AutoTurnoverServiceImpl();
DcAutoTurnover dcAutoTurnover = dcAutoTurnoverMapper.selectByPrimaryKey(58845); DcAutoTurnover dcAutoTurnover = dcAutoTurnoverMapper.selectByPrimaryKey(58845);
autoTurnoverService.setAutoTurnoverSaleDetails(dcAutoTurnover); // autoTurnoverService.setAutoTurnoverSaleDetails(dcAutoTurnover,dcAutoTurnover.getTurnoverDays(),dcAutoTurnover.getTurnoverDays());
System.out.println(dcAutoTurnover.getSalesDetails()); System.out.println(dcAutoTurnover.getSalesDetails());
System.out.println(dcAutoTurnover.getSalesDetailsFormula()); System.out.println(dcAutoTurnover.getSalesDetailsFormula());
} finally { } finally {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment