diff --git a/ssjygl-xsx-common/pom.xml b/ssjygl-xsx-common/pom.xml
index ff63313..f4e900d 100644
--- a/ssjygl-xsx-common/pom.xml
+++ b/ssjygl-xsx-common/pom.xml
@@ -109,7 +109,7 @@
com.alibaba
druid
- 1.1.22
+ 1.1.20
runtime
diff --git a/ssjygl-xsx-common/src/main/java/com/cowr/common/utils/DataUtil.java b/ssjygl-xsx-common/src/main/java/com/cowr/common/utils/DataUtil.java
index 5ce5e49..394b317 100644
--- a/ssjygl-xsx-common/src/main/java/com/cowr/common/utils/DataUtil.java
+++ b/ssjygl-xsx-common/src/main/java/com/cowr/common/utils/DataUtil.java
@@ -139,4 +139,11 @@ public class DataUtil {
return obj == null ? 0.0 : obj;
}
+
+ public static String formatWithVarargs(String format, Object... objs) {
+ if (null == objs || objs.length == 0){
+ return format;
+ }
+ return String.format(format, objs);
+ }
}
diff --git a/ssjygl-xsx-common/src/main/java/com/cowr/model/base/BaseOrderEnd.java b/ssjygl-xsx-common/src/main/java/com/cowr/model/base/BaseOrderEnd.java
index 244d5ff..37139e0 100644
--- a/ssjygl-xsx-common/src/main/java/com/cowr/model/base/BaseOrderEnd.java
+++ b/ssjygl-xsx-common/src/main/java/com/cowr/model/base/BaseOrderEnd.java
@@ -199,5 +199,48 @@ public abstract class BaseOrderEnd> extends BaseModel<
return getInt("count");
}
+ /**
+ * name: product_id
+ * type: INT(10)
+ * isNullable: NO
+ * isPrimaryKey: NO
+ * defaultValue:
+ * @param productId 订单总数
+ */
+ @JSONField(name="product_id")
+ public void setProductId(Integer productId) {
+ set("product_id", productId);
+ }
+
+
+ /**
+ * @return count 订单总数
+ */
+ @JSONField(name="product_id")
+ public Integer getProductId() {
+ return getInt("product_id");
+ }
+ /**
+ * name: invoice_type
+ * type: INT(10)
+ * isNullable: NO
+ * isPrimaryKey: NO
+ * defaultValue:
+ * @param invoiceType 发票类型
+ */
+ @JSONField(name="invoice_type")
+ public void setInvoiceType(Integer invoiceType) {
+ set("invoice_type", invoiceType);
+ }
+
+
+ /**
+ * @return invoice_type 发票类型
+ */
+ @JSONField(name="invoice_type")
+ public Integer getInvoiceType() {
+ return getInt("invoice_type");
+ }
+
}
diff --git a/ssjygl-xsx-common/src/main/java/com/cowr/sms/AliyunSmsService.java b/ssjygl-xsx-common/src/main/java/com/cowr/sms/AliyunSmsService.java
index 4ce7a62..8a1171f 100644
--- a/ssjygl-xsx-common/src/main/java/com/cowr/sms/AliyunSmsService.java
+++ b/ssjygl-xsx-common/src/main/java/com/cowr/sms/AliyunSmsService.java
@@ -67,7 +67,7 @@ public class AliyunSmsService {
CommonResponse response = client.getCommonResponse(request);
- // {"TotalCount":1,"Message":"OK","RequestId":"710D29B5-3F13-463D-9935-62D2EB763A79","Code":"OK","SmsSendDetailDTOs":{"SmsSendDetailDTO":[{"TemplateCode":"SMS_66850327","ReceiveDate":"2020-09-13 00:28:16","PhoneNum":"13627293906","Content":"【智慧砂石】2020-09-13平台异常,异常信息:Windows 10Windows 10Windows 10Windows 10Windows 10Windows 10Windows 10Windows 10Windows 10","SendStatus":3,"SendDate":"2020-09-13 00:28:10","ErrCode":"DELIVERED"}]}}
+ // {"TotalCount":1,"Message":"OK","RequestId":"710D29B5-3F13-463D-9935-62D2EB763A79","Code":"OK","SmsSendDetailDTOs":{"SmsSendDetailDTO":[{"TemplateCode":"SMS_66850327","ReceiveDate":"2020-09-13 00:28:16","PhoneNum":"18891233883","Content":"【智慧砂石】2020-09-13平台异常,异常信息:Windows 10Windows 10Windows 10Windows 10Windows 10Windows 10Windows 10Windows 10Windows 10","SendStatus":3,"SendDate":"2020-09-13 00:28:10","ErrCode":"DELIVERED"}]}}
return response.getData();
}
diff --git a/ssjygl-xsx-common/src/main/java/com/cowr/ssjygl/order/ordercluster/OrderclusterService.java b/ssjygl-xsx-common/src/main/java/com/cowr/ssjygl/order/ordercluster/OrderclusterService.java
index 8e5c19b..8ad4b95 100644
--- a/ssjygl-xsx-common/src/main/java/com/cowr/ssjygl/order/ordercluster/OrderclusterService.java
+++ b/ssjygl-xsx-common/src/main/java/com/cowr/ssjygl/order/ordercluster/OrderclusterService.java
@@ -640,7 +640,9 @@ public class OrderclusterService extends BaseService {
// 零散购砂总价四舍五入
if (ordercluster.getCustomerId() == null) {
- total_price = total_price.setScale(0, BigDecimal.ROUND_HALF_UP);
+// total_price = total_price.setScale(0, BigDecimal.ROUND_HALF_UP);
+// 2024年9月2日 散户(处置砂,黄砂)结算付款不再四舍五入,保留小数点后两位数
+ total_price = total_price.setScale(2, BigDecimal.ROUND_HALF_UP);
}
return total_price;
@@ -725,11 +727,11 @@ public class OrderclusterService extends BaseService {
*/
public BigDecimal undoPrice(int customer_id, int sale_type) {
String sql = "select(\n" +
- " select sum(t.`total_weight` * t.`unit_price`) `total_price`\n" +
+ " select IFNULL(sum(t.`total_weight` * t.`unit_price`),0) `total_price`\n" +
" from `ordercluster` t\n" +
" where t.`customer_id`= ?\n" +
" and t.state < ? and t.sale_type = ?) - (\n" +
- " select sum(t.`weight` * t.`unit_price`) total_price\n" +
+ " select IFNULL(sum(t.`weight` * t.`unit_price`),0) total_price\n" +
" from order_temp t\n" +
" where exists(\n" +
" select 1 from `ordercluster` o\n" +
diff --git a/ssjygl-xsx-common/src/main/java/com/cowr/ssjygl/order/orderend/OrderEndService.java b/ssjygl-xsx-common/src/main/java/com/cowr/ssjygl/order/orderend/OrderEndService.java
index a08320f..60a22b7 100644
--- a/ssjygl-xsx-common/src/main/java/com/cowr/ssjygl/order/orderend/OrderEndService.java
+++ b/ssjygl-xsx-common/src/main/java/com/cowr/ssjygl/order/orderend/OrderEndService.java
@@ -17,7 +17,6 @@ import org.apache.commons.collections4.CollectionUtils;
import java.math.BigDecimal;
import java.util.ArrayList;
-import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
@@ -65,6 +64,11 @@ public class OrderEndService extends BaseService {
public List getOrderEndByTm(String tm,String customerId) {
+ Long count = Db.queryLong("select count(id) from order_end");
+ if (count == 0) {
+ return null;
+ }
+
List