dev
parent
2ae1c7c228
commit
1fcde5cf7e
|
|
@ -1,5 +1,7 @@
|
|||
package com.cowr.local.ssjygl.devicectrl.device;
|
||||
|
||||
import com.jfinal.log.Log;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.ArrayList;
|
||||
|
|
@ -13,6 +15,8 @@ import java.util.stream.Collectors;
|
|||
* 柯力称重显示器
|
||||
*/
|
||||
public class DingsongScale extends AbsScale {
|
||||
private static Log log = Log.getLog(DingsongScale.class);
|
||||
|
||||
private static final int DATA_LENGTH = 24;
|
||||
private static final int DATA_FROM = 4;
|
||||
private static final int DATA_TO = 10;
|
||||
|
|
@ -89,7 +93,7 @@ public class DingsongScale extends AbsScale {
|
|||
continue;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
log.error(e.getMessage(), e);
|
||||
}
|
||||
|
||||
// System.out.println("读一次耗时:" + (System.currentTimeMillis() - st) + ", " + Double.parseDouble(flip(weight)));
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
package com.cowr.local.ssjygl.devicectrl.device;
|
||||
|
||||
import com.jfinal.log.Log;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.ArrayList;
|
||||
|
|
@ -13,6 +15,8 @@ import java.util.stream.Collectors;
|
|||
* 柯力称重显示器
|
||||
*/
|
||||
public class KeLiScale extends AbsScale {
|
||||
private static Log log = Log.getLog(KeLiScale.class);
|
||||
|
||||
private static final int DATA_LENGTH = 12;
|
||||
private static final int DATA_FROM = 2;
|
||||
private static final int DATA_TO = 8;
|
||||
|
|
@ -83,6 +87,15 @@ public class KeLiScale extends AbsScale {
|
|||
continue;
|
||||
}
|
||||
|
||||
try {
|
||||
if (Long.parseLong(weight) > 100000) {
|
||||
errCount++;
|
||||
continue;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(), e);
|
||||
}
|
||||
|
||||
// System.out.println("读一次耗时:" + (System.currentTimeMillis() - st) + ", " + Double.parseDouble(flip(weight)));
|
||||
list.add(weight);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -80,6 +80,15 @@ public class XiShuiScale extends AbsScale {
|
|||
continue;
|
||||
}
|
||||
|
||||
try {
|
||||
if (Long.parseLong(weight) > 100000) {
|
||||
errCount++;
|
||||
continue;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(), e);
|
||||
}
|
||||
|
||||
// System.out.println("读一次耗时:" + (System.currentTimeMillis() - st) + ", " + Double.parseDouble(flip(weight)));
|
||||
list.add(weight);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
package com.cowr.local.ssjygl.devicectrl.device;
|
||||
|
||||
import com.jfinal.log.Log;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.ArrayList;
|
||||
|
|
@ -13,6 +15,8 @@ import java.util.stream.Collectors;
|
|||
* 耀华称重显示器
|
||||
*/
|
||||
public class YaoHuaScale extends AbsScale {
|
||||
private static Log log = Log.getLog(YaoHuaScale.class);
|
||||
|
||||
public YaoHuaScale(String id, String ip, int port) {
|
||||
super(id, ip, port);
|
||||
}
|
||||
|
|
@ -78,6 +82,14 @@ public class YaoHuaScale extends AbsScale {
|
|||
errCount++;
|
||||
continue;
|
||||
}
|
||||
try {
|
||||
if (Long.parseLong(weight) > 100000) {
|
||||
errCount++;
|
||||
continue;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(), e);
|
||||
}
|
||||
|
||||
// System.out.println("读一次耗时:" + (System.currentTimeMillis() - st) + ", " + Double.parseDouble(flip(weight)));
|
||||
list.add(weight);
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ public class Config extends JFinalConfig {
|
|||
public static DeviceThread deviceThread = new DeviceThread();
|
||||
public static SocketIOService socketio = null;
|
||||
private static boolean client_run = true;
|
||||
public static final String CLINET_VERSION = "20210111";
|
||||
public static final String CLINET_VERSION = "20210128";
|
||||
|
||||
public static String getRootPath() {
|
||||
return PathKit.getWebRootPath()
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@ import com.cowr.common.view.PageParam;
|
|||
import com.cowr.common.view.Result;
|
||||
import com.cowr.model.*;
|
||||
import com.cowr.service.ssjygl.base.BaseSyncService;
|
||||
import com.cowr.service.ssjygl.customer.register.CustomerRegisterService;
|
||||
import com.cowr.service.ssjygl.main.Config;
|
||||
import com.cowr.service.ssjygl.main.SvrCacheData;
|
||||
import com.cowr.service.ssjygl.synctask.SyncTaskService;
|
||||
|
|
@ -417,7 +416,8 @@ public class SysuserSyncService extends BaseSyncService {
|
|||
synctask.addSaveData(customer);
|
||||
|
||||
return model.save() && SyncTaskService.me.save(synctask)
|
||||
&& ModifyLogService.me.save(model, null, Enums.DataOpType.SAVE.getId(), tokenuser);
|
||||
&& ModifyLogService.me.save(model, null, Enums.DataOpType.SAVE.getId(), tokenuser)
|
||||
&& ModifyLogService.me.save(customer, null, Enums.DataOpType.SAVE.getId(), tokenuser);
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(), e);
|
||||
return false;
|
||||
|
|
@ -487,6 +487,8 @@ public class SysuserSyncService extends BaseSyncService {
|
|||
chkobj.setPassword(getPwdMD5(model.getPhone(), Const.DEFAULT_PASSWORD));
|
||||
}
|
||||
|
||||
Customer customerold = customer.clone();
|
||||
|
||||
customer.setName(texpayer_name);
|
||||
customer.setTexpayerName(texpayer_name);
|
||||
customer.setInvoiceType(invoice_type);
|
||||
|
|
@ -538,7 +540,8 @@ public class SysuserSyncService extends BaseSyncService {
|
|||
}
|
||||
|
||||
return SyncTaskService.me.save(synctask)
|
||||
&& ModifyLogService.me.save(chkobj, old, Enums.DataOpType.UPDATE.getId(), tokenuser);
|
||||
&& ModifyLogService.me.save(chkobj, old, Enums.DataOpType.UPDATE.getId(), tokenuser)
|
||||
&& ModifyLogService.me.save(customer, customerold, Enums.DataOpType.UPDATE.getId(), tokenuser);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
@ -828,7 +831,7 @@ public class SysuserSyncService extends BaseSyncService {
|
|||
sqlbuf.append(") a\n");
|
||||
sqlbuf.append("where 1 = 1");
|
||||
|
||||
if(StrKit.notBlank(customer_name)){
|
||||
if (StrKit.notBlank(customer_name)) {
|
||||
sqlbuf.append(" and a.customer_name like ? \n");
|
||||
paraList.add("%" + customer_name.trim() + "%");
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue