Sfoglia il codice sorgente

销售订单状态更新

chenw 6 anni fa
parent
commit
475cb91b19

+ 3 - 6
src/main/java/com/uas/erp/schedular/mall/task/ProductTask.java

@@ -413,11 +413,6 @@ public class ProductTask extends AbstractTask {
 
                 Order order = orders.get(j);
                 order.getEnuu();
-                //如果下载过,不再次下载
-                int saleCount = jdbcTemplate.getInt("SELECT COUNT(*) FROM SALE WHERE SA_POCODE = ?", order.getCode());
-                if (saleCount > 0) {
-                    continue;
-                }
 
                 String mallStatus = "";
                 if (order.getStatus() == 141010 || order.getStatus() == 141020){
@@ -500,7 +495,9 @@ public class ProductTask extends AbstractTask {
                             "'ADMIN',sysdate,0,'" + order.getBuyerName() +"','" + order.getBuyerMobile() + "','"+ mallStatus +"')";
                     int count = jdbcTemplate.getInt("SELECT COUNT(*) FROM SALE WHERE SA_POCODE = ?", order.getCode());
                     if (count > 0) {
-                        jdbcTemplate.execute("UPDATE SALE SET SA_STATUS = ?, SA_STATUSCODE = ? WHERE SA_POCODE = ?", status, statusCode, order.getCode());
+                        if ("已结案".equals(status)) {
+                            jdbcTemplate.execute("UPDATE SALE SET SA_STATUS = ?, SA_STATUSCODE = ? WHERE SA_POCODE = ?", status, statusCode, order.getCode());
+                        }
                     }else {
                         if (detailList.size() > 0) {
                             jdbcTemplate.execute(sql);