mirror of https://github.com/jeecgboot/jeecg-boot
Merge branch 'dev' into shouman_api
commit
ee7d748206
|
@ -15,22 +15,22 @@ public class SkuListRequestBody implements RequestBody {
|
||||||
|
|
||||||
private static final DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
private static final DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
||||||
|
|
||||||
private String stockSku = "";
|
private String stockSku = null;
|
||||||
// 50 skus max
|
// 50 skus max
|
||||||
private String stockSkuList = "";
|
private String stockSkuList = null;
|
||||||
private DateType datetimeType;
|
private DateType datetimeType;
|
||||||
private LocalDateTime startDate;
|
private LocalDateTime startDate;
|
||||||
private LocalDateTime endDate;
|
private LocalDateTime endDate;
|
||||||
private Integer page = 1;
|
private Integer page = 1;
|
||||||
private Integer total;
|
private Integer total;
|
||||||
private String cursor = "";
|
private String cursor = "1";
|
||||||
private Integer maxRows = 10;
|
private Integer maxRows = null;
|
||||||
private Integer showVirtualSku = 0;
|
private Integer showVirtualSku = null;
|
||||||
private Integer showProvider = 0;
|
private Integer showProvider = null;
|
||||||
private Integer showWarehouse = 0;
|
private Integer showWarehouse = null;
|
||||||
private Integer showLabel = 0;
|
private Integer showLabel = null;
|
||||||
private Integer showAttributes = 0;
|
private Integer showAttributes = null;
|
||||||
private Integer showMachining = 0;
|
private Integer showMachining = null;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String api() {
|
public String api() {
|
||||||
|
|
|
@ -106,7 +106,7 @@ public class MabangSkuJob implements Job {
|
||||||
log.info("{} skus from {} to {} ({})to be inserted.", skusFromMabang.size(),
|
log.info("{} skus from {} to {} ({})to be inserted.", skusFromMabang.size(),
|
||||||
dayBeforeEndDateTime, endDateTime, dateType);
|
dayBeforeEndDateTime, endDateTime, dateType);
|
||||||
|
|
||||||
if (skusFromMabang.size() > 0) {
|
if (!skusFromMabang.isEmpty()) {
|
||||||
// we save the skuDatas in DB
|
// we save the skuDatas in DB
|
||||||
newSkusMap.putAll(skuListMabangService.saveSkuFromMabang(skusFromMabang));
|
newSkusMap.putAll(skuListMabangService.saveSkuFromMabang(skusFromMabang));
|
||||||
}
|
}
|
||||||
|
@ -120,7 +120,7 @@ public class MabangSkuJob implements Job {
|
||||||
log.info("SKU codes replaced by new created SKU IDs");
|
log.info("SKU codes replaced by new created SKU IDs");
|
||||||
|
|
||||||
// here we send system notification with the number and list of new skus saved in DB
|
// here we send system notification with the number and list of new skus saved in DB
|
||||||
if (newSkusMap.size() == 0) {
|
if (newSkusMap.isEmpty()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
List<String> messageContentList = new ArrayList<>();
|
List<String> messageContentList = new ArrayList<>();
|
||||||
|
@ -177,13 +177,11 @@ public class MabangSkuJob implements Job {
|
||||||
Map<String, String> param = new HashMap<>();
|
Map<String, String> param = new HashMap<>();
|
||||||
param.put("nb_of_entries", String.valueOf(newSkusMap.size()));
|
param.put("nb_of_entries", String.valueOf(newSkusMap.size()));
|
||||||
param.put("sku_list", msg);
|
param.put("sku_list", msg);
|
||||||
param.put("need_treatment", needTreatmentSkuMap.size() > 0 ? needTreatmentSku : "None");
|
param.put("need_treatment", !needTreatmentSkuMap.isEmpty() ? needTreatmentSku : "None");
|
||||||
param.put("current_page", String.valueOf(page));
|
param.put("current_page", String.valueOf(page));
|
||||||
param.put("total_page", String.valueOf(messageContentList.size()));
|
param.put("total_page", String.valueOf(messageContentList.size()));
|
||||||
TemplateMessageDTO message = new TemplateMessageDTO("admin", "admin", "SKU导入任务", param, "sku_mabang_job_result");
|
TemplateMessageDTO message = new TemplateMessageDTO("admin", "admin", "SKU导入任务", param, "sku_mabang_job_result");
|
||||||
ISysBaseApi.sendTemplateAnnouncement(message);
|
ISysBaseApi.sendTemplateAnnouncement(message);
|
||||||
// message = new TemplateMessageDTO("admin", "Alice", "SKU导入任务", param, "sku_mabang_job_result");
|
|
||||||
ISysBaseApi.sendTemplateAnnouncement(message);
|
|
||||||
message = new TemplateMessageDTO("admin", "Jessyca", "SKU导入任务", param, "sku_mabang_job_result");
|
message = new TemplateMessageDTO("admin", "Jessyca", "SKU导入任务", param, "sku_mabang_job_result");
|
||||||
ISysBaseApi.sendTemplateAnnouncement(message);
|
ISysBaseApi.sendTemplateAnnouncement(message);
|
||||||
log.info("Page {} of recap sent through system announcement", page);
|
log.info("Page {} of recap sent through system announcement", page);
|
||||||
|
|
|
@ -25,7 +25,7 @@ public class PurchaseInvoiceEntry {
|
||||||
}
|
}
|
||||||
|
|
||||||
public BigDecimal unitPrice() {
|
public BigDecimal unitPrice() {
|
||||||
return totalAmount.divide(BigDecimal.valueOf(quantity));
|
return quantity == 0 ? BigDecimal.ZERO : totalAmount.divide(BigDecimal.valueOf(quantity));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -171,7 +171,7 @@
|
||||||
s.purchasing_amount,
|
s.purchasing_amount,
|
||||||
s.available_amount,
|
s.available_amount,
|
||||||
qtyInOrdersNotShipped.quantity as qtyInOrdersNotShipped,
|
qtyInOrdersNotShipped.quantity as qtyInOrdersNotShipped,
|
||||||
IF(s.available_amount IS NULL, 0, s.available_amount) + IF(s.purchasing_amount IS NULL, 0, s.purchasing_amount) - IF(qtyInOrdersNotShipped.quantity IS NULL, 0, qtyInOrdersNotShipped.quantity) as stock,
|
s.available_amount + s.purchasing_amount - IF(qtyInOrdersNotShipped.quantity IS NULL, 0, qtyInOrdersNotShipped.quantity) as stock,
|
||||||
s.image_source,
|
s.image_source,
|
||||||
s.service_fee,
|
s.service_fee,
|
||||||
IF(sp.price_rmb IS NULL, sp.price,
|
IF(sp.price_rmb IS NULL, sp.price,
|
||||||
|
@ -203,7 +203,7 @@
|
||||||
FROM sku s
|
FROM sku s
|
||||||
JOIN client_sku cs ON s.id = cs.sku_id
|
JOIN client_sku cs ON s.id = cs.sku_id
|
||||||
JOIN product p ON s.product_id = p.id
|
JOIN product p ON s.product_id = p.id
|
||||||
LEFT JOIN sku_price sp ON s.id = sp.sku_id
|
LEFT JOIN sku_current_price sp ON s.id = sp.sku_id
|
||||||
LEFT JOIN sales_28 s28 ON s.id = s28.sku_id
|
LEFT JOIN sales_28 s28 ON s.id = s28.sku_id
|
||||||
LEFT JOIN sales_42 s42 ON s.id = s42.sku_id
|
LEFT JOIN sales_42 s42 ON s.id = s42.sku_id
|
||||||
LEFT JOIN sales_7 s7 ON s.id = s7.sku_id
|
LEFT JOIN sales_7 s7 ON s.id = s7.sku_id
|
||||||
|
|
2
pom.xml
2
pom.xml
|
@ -2,7 +2,7 @@
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>org.jeecgframework.boot</groupId>
|
<groupId>org.jeecgframework.boot</groupId>
|
||||||
<artifactId>jeecg-boot-parent</artifactId>
|
<artifactId>jeecg-boot-parent</artifactId>
|
||||||
<version>1.11.0</version>
|
<version>1.11.1</version>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
<name>WIA APP ${project.version} </name>
|
<name>WIA APP ${project.version} </name>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue