dev
parent
13c4ae5985
commit
ca11e8e630
|
|
@ -151,13 +151,19 @@ group by date
|
||||||
String premonthtm = DateTimeUtil.sd.get().format(c.getTime()); // 前一月
|
String premonthtm = DateTimeUtil.sd.get().format(c.getTime()); // 前一月
|
||||||
|
|
||||||
String sql_ordercluster = "select \n" +
|
String sql_ordercluster = "select \n" +
|
||||||
" sum(t.total_weight) total_weight, \n" +
|
" ifnull(sum(t.weight), 0) total_weight, \n" +
|
||||||
" sum(case when t.cutoff_time like '" + nowmonttm + "%' then t.total_weight end ) month_total_weight, \n" +
|
" ifnull(sum(case when t.create_time like '" + nowmonttm + "%' then t.weight end ), 0) month_total_weight, \n" +
|
||||||
" sum(case when t.cutoff_time like '" + nowdaytm + "%' then t.total_weight end ) day_total_weight, \n" +
|
" ifnull(sum(case when t.create_time like '" + nowdaytm + "%' then t.weight end ), 0) day_total_weight, \n" +
|
||||||
" sum(case when t.cutoff_time like '" + premonthtm + "%' then t.total_weight end ) before_month_total_weight, \n" +
|
" ifnull(sum(case when t.create_time like '" + premonthtm + "%' then t.weight end ), 0) before_month_total_weight, \n" +
|
||||||
" sum(case when t.cutoff_time like '" + predaytm + "%' then t.total_weight end ) before_day_total_weight \n" +
|
" ifnull(sum(case when t.create_time like '" + predaytm + "%' then t.weight end) , 0) before_day_total_weight,\n" +
|
||||||
" from ordercluster t\n" +
|
" \n" +
|
||||||
" where t.state < ?";
|
" ifnull(sum(t.total_price), 0) total_price, \n" +
|
||||||
|
" ifnull(sum(case when t.create_time like '" + nowmonttm + "%' then t.total_price end ), 0) month_total_price, \n" +
|
||||||
|
" ifnull(sum(case when t.create_time like '" + nowdaytm + "%' then t.total_price end ), 0) day_total_price, \n" +
|
||||||
|
" ifnull(sum(case when t.create_time like '" + premonthtm + "%' then t.total_price end ), 0) before_month_total_price, \n" +
|
||||||
|
" ifnull(sum(case when t.create_time like '" + predaytm + "%' then t.total_price end) , 0) before_day_total_price \n" +
|
||||||
|
" from order_temp t\n" +
|
||||||
|
" where t.state = 5";
|
||||||
|
|
||||||
String sql_ordercluster_truck = "select\n" +
|
String sql_ordercluster_truck = "select\n" +
|
||||||
" count(t.id) truck_cnt,\n" +
|
" count(t.id) truck_cnt,\n" +
|
||||||
|
|
|
||||||
|
|
@ -90,7 +90,7 @@ public class Config extends JFinalConfig {
|
||||||
public static DeviceThread deviceThread = new DeviceThread();
|
public static DeviceThread deviceThread = new DeviceThread();
|
||||||
public static SocketIOService socketio = null;
|
public static SocketIOService socketio = null;
|
||||||
private static boolean client_run = true;
|
private static boolean client_run = true;
|
||||||
public static final String CLINET_VERSION = "20201013";
|
public static final String CLINET_VERSION = "20201014";
|
||||||
|
|
||||||
public static String getRootPath() {
|
public static String getRootPath() {
|
||||||
return PathKit.getWebRootPath()
|
return PathKit.getWebRootPath()
|
||||||
|
|
|
||||||
|
|
@ -34,6 +34,11 @@ import java.util.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 该类下会操作 MySQL 数据,需要将修改的数据同步到服务端
|
* 该类下会操作 MySQL 数据,需要将修改的数据同步到服务端
|
||||||
|
*
|
||||||
|
* 查询手动输入重量
|
||||||
|
* select * from modify_log t
|
||||||
|
* where t.`table` = 'transport'
|
||||||
|
* and t.editdata -> '$.modify_content' = 'manualWeight'
|
||||||
*/
|
*/
|
||||||
public class TransportSyncService {
|
public class TransportSyncService {
|
||||||
public static TransportSyncService me = new TransportSyncService();
|
public static TransportSyncService me = new TransportSyncService();
|
||||||
|
|
@ -701,12 +706,17 @@ public class TransportSyncService {
|
||||||
transport.setOutWhich(out_which);
|
transport.setOutWhich(out_which);
|
||||||
|
|
||||||
SyncTask synctask = new SyncTask();
|
SyncTask synctask = new SyncTask();
|
||||||
|
Record logrecord = new Record();
|
||||||
|
logrecord.set("id", transport.getId());
|
||||||
|
logrecord.set("modify_content", "manualWeight"); // 创建入场记录,用 Enums.DataOpType.UPDATE 记录
|
||||||
|
logrecord.set("first_weight", transport.getFirstWeight());
|
||||||
|
logrecord.set("second_weight", transport.getSecondWeight());
|
||||||
|
|
||||||
boolean ret = Db.tx(new IAtom() {
|
boolean ret = Db.tx(new IAtom() {
|
||||||
@Override
|
@Override
|
||||||
public boolean run() {
|
public boolean run() {
|
||||||
try {
|
try {
|
||||||
boolean ret = transport.save();
|
boolean ret = transport.save() && editLog(logrecord.toJson(), sysuser);
|
||||||
|
|
||||||
if (!ret) {
|
if (!ret) {
|
||||||
return false;
|
return false;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue