From 34a0c62a1bb440a2cea6546f07c20cd699c152fc Mon Sep 17 00:00:00 2001 From: "lisai17@sina.com" Date: Fri, 14 Aug 2020 17:39:16 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=89=93=E5=8D=B0=E4=BA=8C?= =?UTF-8?q?=E7=BB=B4=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/cowr/model/base/BaseInvoiceLog.java | 14 +- .../cowr/model/base/BaseInvoiceReceive.java | 14 +- .../invoice/log/InvoiceLogPKValidator.java | 4 +- .../invoice/log/InvoiceLogValidator.java | 4 +- .../receive/InvoiceReceivePKValidator.java | 5 +- .../receive/InvoiceReceiveValidator.java | 23 +-- ssjygl-xsx-local/pom.xml | 11 + .../devicectrl/printer/CellAddresses.java | 1 + .../devicectrl/printer/ExcelHelper.java | 134 +++++++----- .../devicectrl/printer/QRcodeZxingUtil.java | 190 ++++++++++++++++++ .../invoice/log/InvoiceLogSyncService.java | 9 + .../com/cowr/local/ssjygl/main/Config.java | 2 +- .../cowr/local/ssjygl/order/OrderService.java | 20 +- .../system/sysuser/SysuserController.java | 9 + .../src/main/resources/dev/db.properties | 12 +- .../invoice/log/InvoiceLogController.java | 36 ---- .../receive/InvoiceReceiveSyncService.java | 18 +- .../system/sysuser/SysuserController.java | 12 ++ .../system/sysuser/SysuserSyncService.java | 48 +++++ .../src/main/resources/dev/db.properties | 12 +- 20 files changed, 429 insertions(+), 149 deletions(-) create mode 100644 ssjygl-xsx-local/src/main/java/com/cowr/local/ssjygl/devicectrl/printer/QRcodeZxingUtil.java create mode 100644 ssjygl-xsx-local/src/main/java/com/cowr/local/ssjygl/invoice/log/InvoiceLogSyncService.java diff --git a/ssjygl-xsx-common/src/main/java/com/cowr/model/base/BaseInvoiceLog.java b/ssjygl-xsx-common/src/main/java/com/cowr/model/base/BaseInvoiceLog.java index 90718e4..21027dc 100644 --- a/ssjygl-xsx-common/src/main/java/com/cowr/model/base/BaseInvoiceLog.java +++ b/ssjygl-xsx-common/src/main/java/com/cowr/model/base/BaseInvoiceLog.java @@ -5,7 +5,7 @@ import com.jfinal.plugin.activerecord.IBean; import com.alibaba.fastjson.annotation.JSONField; /** - * Generated by COWR Thu Aug 13 23:05:38 CST 2020 + * Generated by COWR Fri Aug 14 11:13:17 CST 2020 * TableName: invoice_log * Remarks: 发票管理 - 发票使用记录 * PrimaryKey: id @@ -22,24 +22,24 @@ public abstract class BaseInvoiceLog> extends BaseMo /** * name: id - * type: INT(10) + * type: CHAR(32) * isNullable: NO * isPrimaryKey: YES * defaultValue: - * @param id + * @param id uuid */ @JSONField(name="id") - public void setId(Integer id) { + public void setId(String id) { set("id", id); } /** - * @return id + * @return id uuid */ @JSONField(name="id") - public Integer getId() { - return getInt("id"); + public String getId() { + return getStr("id"); } /** diff --git a/ssjygl-xsx-common/src/main/java/com/cowr/model/base/BaseInvoiceReceive.java b/ssjygl-xsx-common/src/main/java/com/cowr/model/base/BaseInvoiceReceive.java index c8a70cc..4299d30 100644 --- a/ssjygl-xsx-common/src/main/java/com/cowr/model/base/BaseInvoiceReceive.java +++ b/ssjygl-xsx-common/src/main/java/com/cowr/model/base/BaseInvoiceReceive.java @@ -5,7 +5,7 @@ import com.jfinal.plugin.activerecord.IBean; import com.alibaba.fastjson.annotation.JSONField; /** - * Generated by COWR Fri Aug 14 00:06:21 CST 2020 + * Generated by COWR Fri Aug 14 11:13:17 CST 2020 * TableName: invoice_receive * Remarks: 发票管理 - 领用记录 * PrimaryKey: id @@ -22,24 +22,24 @@ public abstract class BaseInvoiceReceive> extend /** * name: id - * type: INT(10) + * type: CHAR(32) * isNullable: NO * isPrimaryKey: YES * defaultValue: - * @param id + * @param id uuid */ @JSONField(name="id") - public void setId(Integer id) { + public void setId(String id) { set("id", id); } /** - * @return id + * @return id uuid */ @JSONField(name="id") - public Integer getId() { - return getInt("id"); + public String getId() { + return getStr("id"); } /** diff --git a/ssjygl-xsx-common/src/main/java/com/cowr/ssjygl/invoice/log/InvoiceLogPKValidator.java b/ssjygl-xsx-common/src/main/java/com/cowr/ssjygl/invoice/log/InvoiceLogPKValidator.java index cdaa572..25057e0 100644 --- a/ssjygl-xsx-common/src/main/java/com/cowr/ssjygl/invoice/log/InvoiceLogPKValidator.java +++ b/ssjygl-xsx-common/src/main/java/com/cowr/ssjygl/invoice/log/InvoiceLogPKValidator.java @@ -7,7 +7,7 @@ import com.cowr.model.InvoiceLog; import com.jfinal.core.Controller; /** - * Generated by COWR Thu Aug 13 22:45:08 CST 2020 + * Generated by COWR Fri Aug 14 11:13:22 CST 2020 * TableName: invoice_log * Remarks: 发票管理 - 发票使用记录 * PrimaryKey: id @@ -16,7 +16,7 @@ public class InvoiceLogPKValidator extends CrudParamValidator { @Override protected void validate(Controller c) { validateRequired("id", "id", "id 必填"); - validateInteger("id", 1, 2147483647, "id", "id 范围 1~2147483647"); + validateString("id", 1, 32, "id", "id 长度 1~32"); } protected void handleError(Controller c) { diff --git a/ssjygl-xsx-common/src/main/java/com/cowr/ssjygl/invoice/log/InvoiceLogValidator.java b/ssjygl-xsx-common/src/main/java/com/cowr/ssjygl/invoice/log/InvoiceLogValidator.java index 8908a66..cbd6943 100644 --- a/ssjygl-xsx-common/src/main/java/com/cowr/ssjygl/invoice/log/InvoiceLogValidator.java +++ b/ssjygl-xsx-common/src/main/java/com/cowr/ssjygl/invoice/log/InvoiceLogValidator.java @@ -7,7 +7,7 @@ import com.cowr.common.view.Result; import com.cowr.model.InvoiceLog; /** - * Generated by COWR Thu Aug 13 23:09:29 CST 2020 + * Generated by COWR Fri Aug 14 11:13:22 CST 2020 * TableName: invoice_log * Remarks: 发票管理 - 发票使用记录 * PrimaryKey: id @@ -19,7 +19,7 @@ public class InvoiceLogValidator extends CrudParamValidator { if (!"save".equals(getActionMethodName())) { validateRequired("id", "id", "id 必填"); - validateInteger("id", 1, 2147483647, "id", "id 范围 1~2147483647"); + validateString("id", 1, 32, "id", "id 长度 1~32"); } validateInteger("invoice_receive_id", 1, 2147483647, "invoice_receive_id", "invoice_receive_id 范围 1~2147483647"); diff --git a/ssjygl-xsx-common/src/main/java/com/cowr/ssjygl/invoice/receive/InvoiceReceivePKValidator.java b/ssjygl-xsx-common/src/main/java/com/cowr/ssjygl/invoice/receive/InvoiceReceivePKValidator.java index bdab639..a575ddf 100644 --- a/ssjygl-xsx-common/src/main/java/com/cowr/ssjygl/invoice/receive/InvoiceReceivePKValidator.java +++ b/ssjygl-xsx-common/src/main/java/com/cowr/ssjygl/invoice/receive/InvoiceReceivePKValidator.java @@ -3,10 +3,11 @@ package com.cowr.ssjygl.invoice.receive; import com.cowr.common.validator.CrudParamValidator; import com.cowr.common.view.Result; +import com.cowr.model.InvoiceReceive; import com.jfinal.core.Controller; /** - * Generated by COWR Thu Aug 13 22:45:08 CST 2020 + * Generated by COWR Fri Aug 14 11:13:22 CST 2020 * TableName: invoice_receive * Remarks: 发票管理 - 领用记录 * PrimaryKey: id @@ -15,7 +16,7 @@ public class InvoiceReceivePKValidator extends CrudParamValidator { @Override protected void validate(Controller c) { validateRequired("id", "id", "id 必填"); - validateInteger("id", 1, 2147483647, "id", "id 范围 1~2147483647"); + validateString("id", 1, 32, "id", "id 长度 1~32"); } protected void handleError(Controller c) { diff --git a/ssjygl-xsx-common/src/main/java/com/cowr/ssjygl/invoice/receive/InvoiceReceiveValidator.java b/ssjygl-xsx-common/src/main/java/com/cowr/ssjygl/invoice/receive/InvoiceReceiveValidator.java index 9762ef3..3f37e0e 100644 --- a/ssjygl-xsx-common/src/main/java/com/cowr/ssjygl/invoice/receive/InvoiceReceiveValidator.java +++ b/ssjygl-xsx-common/src/main/java/com/cowr/ssjygl/invoice/receive/InvoiceReceiveValidator.java @@ -7,7 +7,7 @@ import com.cowr.common.view.Result; import com.cowr.model.InvoiceReceive; /** - * Generated by COWR Fri Aug 14 00:06:27 CST 2020 + * Generated by COWR Fri Aug 14 11:13:22 CST 2020 * TableName: invoice_receive * Remarks: 发票管理 - 领用记录 * PrimaryKey: id @@ -18,31 +18,12 @@ public class InvoiceReceiveValidator extends CrudParamValidator { // 默认新增时,前端不需要传主键。若需要前端传主键,需要去掉这个判断 if (!"save".equals(getActionMethodName())) { validateRequired("id", "id", "id 必填"); - - validateInteger("id", 1, 2147483647, "id", "id 范围 1~2147483647"); + validateString("id", 1, 32, "id", "id 长度 1~32"); } validateInteger("num", -2147483647, 2147483647, "num", "num 范围 -2147483647~2147483647"); - - validateString("start_code", 1, 20, "start_code", "start_code 长度 1~20"); - - - validateString("current_code", 0, 20, "current_code", "current_code 长度 0~20"); - - - validateString("create_time", 0, 19, "create_time", "create_time 长度 0~19"); - - - validateString("change_time", 0, 19, "change_time", "change_time 长度 0~19"); - - validateInteger("receive_user_id", 1, 2147483647, "receive_user_id", "receive_user_id 范围 1~2147483647"); - - - validateString("receive_user_name", 1, 255, "receive_user_name", "receive_user_name 长度 1~255"); - - validateInteger("supermarket_id", 1, 2147483647, "supermarket_id", "supermarket_id 范围 1~2147483647"); diff --git a/ssjygl-xsx-local/pom.xml b/ssjygl-xsx-local/pom.xml index e8d2e64..a2ae8d2 100644 --- a/ssjygl-xsx-local/pom.xml +++ b/ssjygl-xsx-local/pom.xml @@ -145,6 +145,17 @@ 2.4.2 + + com.google.zxing + core + 3.4.0 + + + com.google.zxing + javase + 3.4.0 + +