添加客户类型表、客户类型管理、客户分类树
parent
01344e1a52
commit
3923de4ccf
|
|
@ -2,4 +2,6 @@
|
||||||
##浠水县后端服务
|
##浠水县后端服务
|
||||||
1. ssjygl-xs-common 本地和云端后端服务公用代码
|
1. ssjygl-xs-common 本地和云端后端服务公用代码
|
||||||
2. ssjygl-xs-local 本地后端服务
|
2. ssjygl-xs-local 本地后端服务
|
||||||
3. ssjygl-xs-service 云端后端服务
|
3. ssjygl-xs-service 云端后端服务
|
||||||
|
|
||||||
|
2021年7月改版开发分支
|
||||||
|
|
@ -0,0 +1,14 @@
|
||||||
|
package com.cowr.model;
|
||||||
|
|
||||||
|
import com.cowr.model.base.BaseCustomerType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Generated by COWR Mon Jul 26 16:28:20 CST 2021
|
||||||
|
* TableName: customer_type
|
||||||
|
* Remarks: 客户相关 - 客户分类定义
|
||||||
|
* PrimaryKey: id
|
||||||
|
*/
|
||||||
|
@SuppressWarnings("serial")
|
||||||
|
public class CustomerType extends BaseCustomerType<CustomerType> {
|
||||||
|
public static final CustomerType dao = new CustomerType().dao();
|
||||||
|
}
|
||||||
|
|
@ -3,7 +3,7 @@ package com.cowr.model;
|
||||||
import com.jfinal.plugin.activerecord.ActiveRecordPlugin;
|
import com.jfinal.plugin.activerecord.ActiveRecordPlugin;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generated by COWR Fri Feb 26 16:03:22 CST 2021
|
* Generated by COWR Mon Jul 26 16:28:20 CST 2021
|
||||||
* <pre>
|
* <pre>
|
||||||
* Example:
|
* Example:
|
||||||
* public void configPlugin(Plugins me) {
|
* public void configPlugin(Plugins me) {
|
||||||
|
|
@ -14,7 +14,7 @@ import com.jfinal.plugin.activerecord.ActiveRecordPlugin;
|
||||||
* </pre>
|
* </pre>
|
||||||
*/
|
*/
|
||||||
public class _MappingKit {
|
public class _MappingKit {
|
||||||
|
|
||||||
public static void mapping(ActiveRecordPlugin arp) {
|
public static void mapping(ActiveRecordPlugin arp) {
|
||||||
arp.addMapping("auth_license", "truck_license", AuthLicense.class);
|
arp.addMapping("auth_license", "truck_license", AuthLicense.class);
|
||||||
arp.addMapping("transport", "id", Transport.class);
|
arp.addMapping("transport", "id", Transport.class);
|
||||||
|
|
@ -39,6 +39,7 @@ public class _MappingKit {
|
||||||
arp.addMapping("purchase", "id", Purchase.class);
|
arp.addMapping("purchase", "id", Purchase.class);
|
||||||
arp.addMapping("supermarket", "id", Supermarket.class);
|
arp.addMapping("supermarket", "id", Supermarket.class);
|
||||||
arp.addMapping("customer", "id", Customer.class);
|
arp.addMapping("customer", "id", Customer.class);
|
||||||
|
arp.addMapping("customer_type", "id", CustomerType.class);
|
||||||
arp.addMapping("customer_receiver", "id", CustomerReceiver.class);
|
arp.addMapping("customer_receiver", "id", CustomerReceiver.class);
|
||||||
arp.addMapping("customer_register", "id", CustomerRegister.class);
|
arp.addMapping("customer_register", "id", CustomerRegister.class);
|
||||||
arp.addMapping("customer_contact", "id", CustomerContact.class);
|
arp.addMapping("customer_contact", "id", CustomerContact.class);
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ import com.jfinal.plugin.activerecord.IBean;
|
||||||
import com.alibaba.fastjson.annotation.JSONField;
|
import com.alibaba.fastjson.annotation.JSONField;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generated by COWR Thu Aug 20 11:16:08 CST 2020
|
* Generated by COWR Mon Jul 26 16:28:20 CST 2021
|
||||||
* TableName: customer
|
* TableName: customer
|
||||||
* Remarks: 客户相关 - 客户
|
* Remarks: 客户相关 - 客户
|
||||||
* PrimaryKey: id
|
* PrimaryKey: id
|
||||||
|
|
@ -15,8 +15,8 @@ public abstract class BaseCustomer<M extends BaseCustomer<M>> extends BaseModel<
|
||||||
|
|
||||||
public static final String tablename = "customer";
|
public static final String tablename = "customer";
|
||||||
|
|
||||||
@JSONField(serialize = false)
|
@JSONField(serialize=false)
|
||||||
public String getTablename() {
|
public String getTablename(){
|
||||||
return tablename;
|
return tablename;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -25,20 +25,19 @@ public abstract class BaseCustomer<M extends BaseCustomer<M>> extends BaseModel<
|
||||||
* type: INT(10)
|
* type: INT(10)
|
||||||
* isNullable: NO
|
* isNullable: NO
|
||||||
* isPrimaryKey: YES
|
* isPrimaryKey: YES
|
||||||
* defaultValue:
|
* defaultValue:
|
||||||
*
|
* @param id
|
||||||
* @param id
|
|
||||||
*/
|
*/
|
||||||
@JSONField(name = "id")
|
@JSONField(name="id")
|
||||||
public void setId(Integer id) {
|
public void setId(Integer id) {
|
||||||
set("id", id);
|
set("id", id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return id
|
* @return id
|
||||||
*/
|
*/
|
||||||
@JSONField(name = "id")
|
@JSONField(name="id")
|
||||||
public Integer getId() {
|
public Integer getId() {
|
||||||
return getInt("id");
|
return getInt("id");
|
||||||
}
|
}
|
||||||
|
|
@ -48,20 +47,19 @@ public abstract class BaseCustomer<M extends BaseCustomer<M>> extends BaseModel<
|
||||||
* type: VARCHAR(128)
|
* type: VARCHAR(128)
|
||||||
* isNullable: NO
|
* isNullable: NO
|
||||||
* isPrimaryKey: NO
|
* isPrimaryKey: NO
|
||||||
* defaultValue:
|
* defaultValue:
|
||||||
*
|
* @param name
|
||||||
* @param name
|
|
||||||
*/
|
*/
|
||||||
@JSONField(name = "name")
|
@JSONField(name="name")
|
||||||
public void setName(String name) {
|
public void setName(String name) {
|
||||||
set("name", name);
|
set("name", name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return name
|
* @return name
|
||||||
*/
|
*/
|
||||||
@JSONField(name = "name")
|
@JSONField(name="name")
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return getStr("name");
|
return getStr("name");
|
||||||
}
|
}
|
||||||
|
|
@ -71,20 +69,19 @@ public abstract class BaseCustomer<M extends BaseCustomer<M>> extends BaseModel<
|
||||||
* type: VARCHAR(256)
|
* type: VARCHAR(256)
|
||||||
* isNullable: YES
|
* isNullable: YES
|
||||||
* isPrimaryKey: NO
|
* isPrimaryKey: NO
|
||||||
* defaultValue:
|
* defaultValue:
|
||||||
*
|
|
||||||
* @param address 开票地址
|
* @param address 开票地址
|
||||||
*/
|
*/
|
||||||
@JSONField(name = "address")
|
@JSONField(name="address")
|
||||||
public void setAddress(String address) {
|
public void setAddress(String address) {
|
||||||
set("address", address);
|
set("address", address);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return address 开票地址
|
* @return address 开票地址
|
||||||
*/
|
*/
|
||||||
@JSONField(name = "address")
|
@JSONField(name="address")
|
||||||
public String getAddress() {
|
public String getAddress() {
|
||||||
return getStr("address");
|
return getStr("address");
|
||||||
}
|
}
|
||||||
|
|
@ -94,20 +91,19 @@ public abstract class BaseCustomer<M extends BaseCustomer<M>> extends BaseModel<
|
||||||
* type: VARCHAR(20)
|
* type: VARCHAR(20)
|
||||||
* isNullable: YES
|
* isNullable: YES
|
||||||
* isPrimaryKey: NO
|
* isPrimaryKey: NO
|
||||||
* defaultValue:
|
* defaultValue:
|
||||||
*
|
|
||||||
* @param phone 开票电话(可以是座机)
|
* @param phone 开票电话(可以是座机)
|
||||||
*/
|
*/
|
||||||
@JSONField(name = "phone")
|
@JSONField(name="phone")
|
||||||
public void setPhone(String phone) {
|
public void setPhone(String phone) {
|
||||||
set("phone", phone);
|
set("phone", phone);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return phone 开票电话(可以是座机)
|
* @return phone 开票电话(可以是座机)
|
||||||
*/
|
*/
|
||||||
@JSONField(name = "phone")
|
@JSONField(name="phone")
|
||||||
public String getPhone() {
|
public String getPhone() {
|
||||||
return getStr("phone");
|
return getStr("phone");
|
||||||
}
|
}
|
||||||
|
|
@ -117,20 +113,19 @@ public abstract class BaseCustomer<M extends BaseCustomer<M>> extends BaseModel<
|
||||||
* type: VARCHAR(255)
|
* type: VARCHAR(255)
|
||||||
* isNullable: YES
|
* isNullable: YES
|
||||||
* isPrimaryKey: NO
|
* isPrimaryKey: NO
|
||||||
* defaultValue:
|
* defaultValue:
|
||||||
*
|
|
||||||
* @param texpayerName 开票公司名称
|
* @param texpayerName 开票公司名称
|
||||||
*/
|
*/
|
||||||
@JSONField(name = "texpayer_name")
|
@JSONField(name="texpayer_name")
|
||||||
public void setTexpayerName(String texpayerName) {
|
public void setTexpayerName(String texpayerName) {
|
||||||
set("texpayer_name", texpayerName);
|
set("texpayer_name", texpayerName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return texpayer_name 开票公司名称
|
* @return texpayer_name 开票公司名称
|
||||||
*/
|
*/
|
||||||
@JSONField(name = "texpayer_name")
|
@JSONField(name="texpayer_name")
|
||||||
public String getTexpayerName() {
|
public String getTexpayerName() {
|
||||||
return getStr("texpayer_name");
|
return getStr("texpayer_name");
|
||||||
}
|
}
|
||||||
|
|
@ -140,20 +135,19 @@ public abstract class BaseCustomer<M extends BaseCustomer<M>> extends BaseModel<
|
||||||
* type: VARCHAR(20)
|
* type: VARCHAR(20)
|
||||||
* isNullable: YES
|
* isNullable: YES
|
||||||
* isPrimaryKey: NO
|
* isPrimaryKey: NO
|
||||||
* defaultValue:
|
* defaultValue:
|
||||||
*
|
|
||||||
* @param texpayerNum 税号
|
* @param texpayerNum 税号
|
||||||
*/
|
*/
|
||||||
@JSONField(name = "texpayer_num")
|
@JSONField(name="texpayer_num")
|
||||||
public void setTexpayerNum(String texpayerNum) {
|
public void setTexpayerNum(String texpayerNum) {
|
||||||
set("texpayer_num", texpayerNum);
|
set("texpayer_num", texpayerNum);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return texpayer_num 税号
|
* @return texpayer_num 税号
|
||||||
*/
|
*/
|
||||||
@JSONField(name = "texpayer_num")
|
@JSONField(name="texpayer_num")
|
||||||
public String getTexpayerNum() {
|
public String getTexpayerNum() {
|
||||||
return getStr("texpayer_num");
|
return getStr("texpayer_num");
|
||||||
}
|
}
|
||||||
|
|
@ -163,43 +157,41 @@ public abstract class BaseCustomer<M extends BaseCustomer<M>> extends BaseModel<
|
||||||
* type: VARCHAR(128)
|
* type: VARCHAR(128)
|
||||||
* isNullable: YES
|
* isNullable: YES
|
||||||
* isPrimaryKey: NO
|
* isPrimaryKey: NO
|
||||||
* defaultValue:
|
* defaultValue:
|
||||||
*
|
|
||||||
* @param bankName 开户行名称
|
* @param bankName 开户行名称
|
||||||
*/
|
*/
|
||||||
@JSONField(name = "bank_name")
|
@JSONField(name="bank_name")
|
||||||
public void setBankName(String bankName) {
|
public void setBankName(String bankName) {
|
||||||
set("bank_name", bankName);
|
set("bank_name", bankName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return bank_name 开户行名称
|
* @return bank_name 开户行名称
|
||||||
*/
|
*/
|
||||||
@JSONField(name = "bank_name")
|
@JSONField(name="bank_name")
|
||||||
public String getBankName() {
|
public String getBankName() {
|
||||||
return getStr("bank_name");
|
return getStr("bank_name");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* name: bank_account
|
* name: bank_account
|
||||||
* type: VARCHAR(20)
|
* type: VARCHAR(128)
|
||||||
* isNullable: YES
|
* isNullable: YES
|
||||||
* isPrimaryKey: NO
|
* isPrimaryKey: NO
|
||||||
* defaultValue:
|
* defaultValue:
|
||||||
*
|
|
||||||
* @param bankAccount 开户行账号
|
* @param bankAccount 开户行账号
|
||||||
*/
|
*/
|
||||||
@JSONField(name = "bank_account")
|
@JSONField(name="bank_account")
|
||||||
public void setBankAccount(String bankAccount) {
|
public void setBankAccount(String bankAccount) {
|
||||||
set("bank_account", bankAccount);
|
set("bank_account", bankAccount);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return bank_account 开户行账号
|
* @return bank_account 开户行账号
|
||||||
*/
|
*/
|
||||||
@JSONField(name = "bank_account")
|
@JSONField(name="bank_account")
|
||||||
public String getBankAccount() {
|
public String getBankAccount() {
|
||||||
return getStr("bank_account");
|
return getStr("bank_account");
|
||||||
}
|
}
|
||||||
|
|
@ -209,20 +201,19 @@ public abstract class BaseCustomer<M extends BaseCustomer<M>> extends BaseModel<
|
||||||
* type: VARCHAR(256)
|
* type: VARCHAR(256)
|
||||||
* isNullable: YES
|
* isNullable: YES
|
||||||
* isPrimaryKey: NO
|
* isPrimaryKey: NO
|
||||||
* defaultValue:
|
* defaultValue:
|
||||||
*
|
* @param memo
|
||||||
* @param memo
|
|
||||||
*/
|
*/
|
||||||
@JSONField(name = "memo")
|
@JSONField(name="memo")
|
||||||
public void setMemo(String memo) {
|
public void setMemo(String memo) {
|
||||||
set("memo", memo);
|
set("memo", memo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return memo
|
* @return memo
|
||||||
*/
|
*/
|
||||||
@JSONField(name = "memo")
|
@JSONField(name="memo")
|
||||||
public String getMemo() {
|
public String getMemo() {
|
||||||
return getStr("memo");
|
return getStr("memo");
|
||||||
}
|
}
|
||||||
|
|
@ -233,19 +224,18 @@ public abstract class BaseCustomer<M extends BaseCustomer<M>> extends BaseModel<
|
||||||
* isNullable: NO
|
* isNullable: NO
|
||||||
* isPrimaryKey: NO
|
* isPrimaryKey: NO
|
||||||
* defaultValue: 0
|
* defaultValue: 0
|
||||||
*
|
* @param del
|
||||||
* @param del
|
|
||||||
*/
|
*/
|
||||||
@JSONField(name = "del")
|
@JSONField(name="del")
|
||||||
public void setDel(Integer del) {
|
public void setDel(Integer del) {
|
||||||
set("del", del);
|
set("del", del);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return del
|
* @return del
|
||||||
*/
|
*/
|
||||||
@JSONField(name = "del")
|
@JSONField(name="del")
|
||||||
public Integer getDel() {
|
public Integer getDel() {
|
||||||
return getInt("del");
|
return getInt("del");
|
||||||
}
|
}
|
||||||
|
|
@ -256,19 +246,18 @@ public abstract class BaseCustomer<M extends BaseCustomer<M>> extends BaseModel<
|
||||||
* isNullable: NO
|
* isNullable: NO
|
||||||
* isPrimaryKey: NO
|
* isPrimaryKey: NO
|
||||||
* defaultValue: 0
|
* defaultValue: 0
|
||||||
*
|
|
||||||
* @param type 是否预付费客户,0.不是,1.是
|
* @param type 是否预付费客户,0.不是,1.是
|
||||||
*/
|
*/
|
||||||
@JSONField(name = "type")
|
@JSONField(name="type")
|
||||||
public void setType(Integer type) {
|
public void setType(Integer type) {
|
||||||
set("type", type);
|
set("type", type);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return type 是否预付费客户,0.不是,1.是
|
* @return type 是否预付费客户,0.不是,1.是
|
||||||
*/
|
*/
|
||||||
@JSONField(name = "type")
|
@JSONField(name="type")
|
||||||
public Integer getType() {
|
public Integer getType() {
|
||||||
return getInt("type");
|
return getInt("type");
|
||||||
}
|
}
|
||||||
|
|
@ -279,22 +268,65 @@ public abstract class BaseCustomer<M extends BaseCustomer<M>> extends BaseModel<
|
||||||
* isNullable: NO
|
* isNullable: NO
|
||||||
* isPrimaryKey: NO
|
* isPrimaryKey: NO
|
||||||
* defaultValue: 1
|
* defaultValue: 1
|
||||||
*
|
|
||||||
* @param invoiceType 1.普票,2.专票
|
* @param invoiceType 1.普票,2.专票
|
||||||
*/
|
*/
|
||||||
@JSONField(name = "invoice_type")
|
@JSONField(name="invoice_type")
|
||||||
public void setInvoiceType(Integer invoiceType) {
|
public void setInvoiceType(Integer invoiceType) {
|
||||||
set("invoice_type", invoiceType);
|
set("invoice_type", invoiceType);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return invoice_type 1.普票,2.专票
|
* @return invoice_type 1.普票,2.专票
|
||||||
*/
|
*/
|
||||||
@JSONField(name = "invoice_type")
|
@JSONField(name="invoice_type")
|
||||||
public Integer getInvoiceType() {
|
public Integer getInvoiceType() {
|
||||||
return getInt("invoice_type");
|
return getInt("invoice_type");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* name: weight_discount
|
||||||
|
* type: DECIMAL(6,4)
|
||||||
|
* isNullable: NO
|
||||||
|
* isPrimaryKey: NO
|
||||||
|
* defaultValue: 1.0000
|
||||||
|
* @param weightDiscount 重量折扣系数
|
||||||
|
*/
|
||||||
|
@JSONField(name="weight_discount")
|
||||||
|
public void setWeightDiscount(java.math.BigDecimal weightDiscount) {
|
||||||
|
set("weight_discount", weightDiscount);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return weight_discount 重量折扣系数
|
||||||
|
*/
|
||||||
|
@JSONField(name="weight_discount")
|
||||||
|
public java.math.BigDecimal getWeightDiscount() {
|
||||||
|
return get("weight_discount");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* name: customer_type_id
|
||||||
|
* type: INT(10)
|
||||||
|
* isNullable: NO
|
||||||
|
* isPrimaryKey: NO
|
||||||
|
* defaultValue: 0
|
||||||
|
* @param customerTypeId 客户分类id
|
||||||
|
*/
|
||||||
|
@JSONField(name="customer_type_id")
|
||||||
|
public void setCustomerTypeId(Integer customerTypeId) {
|
||||||
|
set("customer_type_id", customerTypeId);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return customer_type_id 客户分类id
|
||||||
|
*/
|
||||||
|
@JSONField(name="customer_type_id")
|
||||||
|
public Integer getCustomerTypeId() {
|
||||||
|
return getInt("customer_type_id");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,90 @@
|
||||||
|
package com.cowr.model.base;
|
||||||
|
|
||||||
|
import com.cowr.common.base.BaseModel;
|
||||||
|
import com.jfinal.plugin.activerecord.IBean;
|
||||||
|
import com.alibaba.fastjson.annotation.JSONField;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Generated by COWR Mon Jul 26 16:28:20 CST 2021
|
||||||
|
* TableName: customer_type
|
||||||
|
* Remarks: 客户相关 - 客户分类定义
|
||||||
|
* PrimaryKey: id
|
||||||
|
*/
|
||||||
|
@SuppressWarnings("serial")
|
||||||
|
public abstract class BaseCustomerType<M extends BaseCustomerType<M>> extends BaseModel<M> implements IBean {
|
||||||
|
|
||||||
|
public static final String tablename = "customer_type";
|
||||||
|
|
||||||
|
@JSONField(serialize=false)
|
||||||
|
public String getTablename(){
|
||||||
|
return tablename;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* name: id
|
||||||
|
* type: INT(10)
|
||||||
|
* isNullable: NO
|
||||||
|
* isPrimaryKey: YES
|
||||||
|
* defaultValue:
|
||||||
|
* @param id
|
||||||
|
*/
|
||||||
|
@JSONField(name="id")
|
||||||
|
public void setId(Integer id) {
|
||||||
|
set("id", id);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return id
|
||||||
|
*/
|
||||||
|
@JSONField(name="id")
|
||||||
|
public Integer getId() {
|
||||||
|
return getInt("id");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* name: name
|
||||||
|
* type: VARCHAR(255)
|
||||||
|
* isNullable: YES
|
||||||
|
* isPrimaryKey: NO
|
||||||
|
* defaultValue:
|
||||||
|
* @param name 类型名称
|
||||||
|
*/
|
||||||
|
@JSONField(name="name")
|
||||||
|
public void setName(String name) {
|
||||||
|
set("name", name);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return name 类型名称
|
||||||
|
*/
|
||||||
|
@JSONField(name="name")
|
||||||
|
public String getName() {
|
||||||
|
return getStr("name");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* name: desc
|
||||||
|
* type: VARCHAR(255)
|
||||||
|
* isNullable: YES
|
||||||
|
* isPrimaryKey: NO
|
||||||
|
* defaultValue:
|
||||||
|
* @param desc 类型描述
|
||||||
|
*/
|
||||||
|
@JSONField(name="desc")
|
||||||
|
public void setDesc(String desc) {
|
||||||
|
set("desc", desc);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return desc 类型描述
|
||||||
|
*/
|
||||||
|
@JSONField(name="desc")
|
||||||
|
public String getDesc() {
|
||||||
|
return getStr("desc");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,24 @@
|
||||||
|
package com.cowr.ssjygl.customer.type;
|
||||||
|
|
||||||
|
import com.cowr.common.view.Result;
|
||||||
|
import com.jfinal.core.Controller;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Generated by COWR Mon Jul 26 16:28:29 CST 2021
|
||||||
|
* TableName: customer_type
|
||||||
|
* Remarks: 客户相关 - 客户分类定义
|
||||||
|
* PrimaryKey: id
|
||||||
|
*/
|
||||||
|
public class CustomerTypeController extends Controller {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 返回所有 customer_type 客户相关 - 客户分类定义
|
||||||
|
*/
|
||||||
|
public void list() {
|
||||||
|
renderJson(Result.object(CustomerTypeService.me.list()));
|
||||||
|
}
|
||||||
|
|
||||||
|
public void treedata() {
|
||||||
|
renderJson(Result.object(CustomerTypeService.me.treedata()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,25 @@
|
||||||
|
package com.cowr.ssjygl.customer.type;
|
||||||
|
|
||||||
|
|
||||||
|
import com.cowr.common.validator.CrudParamValidator;
|
||||||
|
import com.cowr.common.view.Result;
|
||||||
|
import com.cowr.model.CustomerType;
|
||||||
|
import com.jfinal.core.Controller;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Generated by COWR Mon Jul 26 16:28:30 CST 2021
|
||||||
|
* TableName: customer_type
|
||||||
|
* Remarks: 客户相关 - 客户分类定义
|
||||||
|
* PrimaryKey: id
|
||||||
|
*/
|
||||||
|
public class CustomerTypePKValidator extends CrudParamValidator {
|
||||||
|
@Override
|
||||||
|
protected void validate(Controller c) {
|
||||||
|
validateRequired("id", "id", "id 必填");
|
||||||
|
validateInteger("id", 1, 2147483647, "id", "id 范围 1~2147483647");
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void handleError(Controller c) {
|
||||||
|
c.renderJson(Result.failed(getErrmsg()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,52 @@
|
||||||
|
package com.cowr.ssjygl.customer.type;
|
||||||
|
|
||||||
|
import com.cowr.common.base.BaseService;
|
||||||
|
import com.cowr.common.utils.DataUtil;
|
||||||
|
import com.cowr.model.CustomerType;
|
||||||
|
import com.jfinal.log.Log;
|
||||||
|
import com.jfinal.plugin.activerecord.Db;
|
||||||
|
import com.jfinal.plugin.activerecord.Record;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Comparator;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Generated by COWR Mon Jul 26 16:28:30 CST 2021
|
||||||
|
* TableName: customer_type
|
||||||
|
* Remarks: 客户相关 - 客户分类定义
|
||||||
|
* PrimaryKey: id
|
||||||
|
*/
|
||||||
|
public class CustomerTypeService extends BaseService {
|
||||||
|
private static final Log log = Log.getLog(CustomerTypeService.class);
|
||||||
|
public static final CustomerTypeService me = new CustomerTypeService();
|
||||||
|
|
||||||
|
public List<Record> treedata() {
|
||||||
|
List<Record> list = Db.find("select id, name, -1 pid from customer_type ");
|
||||||
|
List<Record> cus = Db.find("select concat('customer_id_', id) id, name, customer_type_id pid, id customer_id from customer ");
|
||||||
|
|
||||||
|
list.addAll(cus);
|
||||||
|
|
||||||
|
List<Record> out = DataUtil.transformToTreeFormat(list);
|
||||||
|
|
||||||
|
out.sort(new Comparator<Record>() {
|
||||||
|
@Override
|
||||||
|
public int compare(Record o1, Record o2) {
|
||||||
|
if (o1.getInt("id") == 0 || o2.getInt("id") == 0) {
|
||||||
|
return -1;
|
||||||
|
} else {
|
||||||
|
return o1.getInt("id") - o2.getInt("id");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
List<Record> root = new ArrayList<>();
|
||||||
|
root.add(new Record().set("id", -1).set("name", "全部").set("children", out));
|
||||||
|
|
||||||
|
return root;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<CustomerType> list() {
|
||||||
|
return CustomerType.dao.find("select * from customer_type");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,38 @@
|
||||||
|
package com.cowr.ssjygl.customer.type;
|
||||||
|
|
||||||
|
import com.cowr.common.validator.CrudParamValidator;
|
||||||
|
import com.cowr.common.view.Result;
|
||||||
|
import com.cowr.model.CustomerType;
|
||||||
|
import com.jfinal.core.Controller;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Generated by COWR Mon Jul 26 16:28:30 CST 2021
|
||||||
|
* TableName: customer_type
|
||||||
|
* Remarks: 客户相关 - 客户分类定义
|
||||||
|
* PrimaryKey: id
|
||||||
|
*/
|
||||||
|
public class CustomerTypeValidator extends CrudParamValidator {
|
||||||
|
@Override
|
||||||
|
protected void validate(Controller c) {
|
||||||
|
// 默认新增时,前端不需要传主键。若需要前端传主键,需要去掉这个判断
|
||||||
|
if (!"save".equals(getActionMethodName())) {
|
||||||
|
validateRequired("id", "id", "id 必填");
|
||||||
|
|
||||||
|
validateInteger("id", 1, 2147483647, "id", "id 范围 1~2147483647");
|
||||||
|
}
|
||||||
|
|
||||||
|
validateString("name", 1, 255, "name", "name 长度 0~255");
|
||||||
|
validateString("desc", 0, 255, "desc", "desc 长度 0~255");
|
||||||
|
|
||||||
|
// 使用 model 更新时,model 不能只有主键有值
|
||||||
|
// 这里用 getActionMethodName 写死,判断是 update 时,才做验证
|
||||||
|
// 如果确实是需要将主键外的字段置为 null,可以在代码生成后删掉这段
|
||||||
|
if ("edit".equals(getActionMethodName())) {
|
||||||
|
validateUpdateModel(CustomerType.class, "", true); // 忽略不在model中的字段
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void handleError(Controller c) {
|
||||||
|
c.renderJson(Result.failed(getErrmsg()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -83,6 +83,7 @@ public class Main {
|
||||||
"ticket_invalid_verify",
|
"ticket_invalid_verify",
|
||||||
"ticket_log",
|
"ticket_log",
|
||||||
"ticket_receive",
|
"ticket_receive",
|
||||||
|
"customer_type",
|
||||||
};
|
};
|
||||||
|
|
||||||
PropKit.use("db.properties");
|
PropKit.use("db.properties");
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ public class Printer {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
lock.lock();
|
lock.lock();
|
||||||
try {
|
try (FileInputStream fis = new FileInputStream(file)) {
|
||||||
Socket socket = new Socket();
|
Socket socket = new Socket();
|
||||||
socket.setOOBInline(false);
|
socket.setOOBInline(false);
|
||||||
socket.setTcpNoDelay(true);
|
socket.setTcpNoDelay(true);
|
||||||
|
|
@ -30,45 +30,49 @@ public class Printer {
|
||||||
socket.setSoTimeout(15000);
|
socket.setSoTimeout(15000);
|
||||||
socket.connect(new InetSocketAddress(ip, port), 5000);
|
socket.connect(new InetSocketAddress(ip, port), 5000);
|
||||||
|
|
||||||
FileInputStream fis = new FileInputStream(file);
|
try (OutputStream out = socket.getOutputStream()) {
|
||||||
OutputStream out = socket.getOutputStream();
|
int l1 = (int) (file.length() >> 56);
|
||||||
int l1 = (int) (file.length() >> 56);
|
int l2 = (int) (file.length() >> 48);
|
||||||
int l2 = (int) (file.length() >> 48);
|
int l3 = (int) (file.length() >> 40);
|
||||||
int l3 = (int) (file.length() >> 40);
|
int l4 = (int) (file.length() >> 32);
|
||||||
int l4 = (int) (file.length() >> 32);
|
int l5 = (int) (file.length() >> 24);
|
||||||
int l5 = (int) (file.length() >> 24);
|
int l6 = (int) (file.length() >> 16);
|
||||||
int l6 = (int) (file.length() >> 16);
|
int l7 = (int) (file.length() >> 8);
|
||||||
int l7 = (int) (file.length() >> 8);
|
int l8 = (int) file.length();
|
||||||
int l8 = (int) file.length();
|
|
||||||
out.write(l1);
|
|
||||||
out.write(l2);
|
|
||||||
out.write(l3);
|
|
||||||
out.write(l4);
|
|
||||||
out.write(l5);
|
|
||||||
out.write(l6);
|
|
||||||
out.write(l7);
|
|
||||||
out.write(l8);
|
|
||||||
out.flush();
|
|
||||||
byte[] buf = new byte[1024];
|
|
||||||
|
|
||||||
while (true) {
|
out.write(l1);
|
||||||
int read = fis.read(buf);
|
out.write(l2);
|
||||||
if (read == -1) {
|
out.write(l3);
|
||||||
break;
|
out.write(l4);
|
||||||
}
|
out.write(l5);
|
||||||
out.write(buf, 0, read);
|
out.write(l6);
|
||||||
|
out.write(l7);
|
||||||
|
out.write(l8);
|
||||||
out.flush();
|
out.flush();
|
||||||
}
|
byte[] buf = new byte[1024];
|
||||||
fis.close();
|
|
||||||
|
|
||||||
InputStream in = socket.getInputStream();
|
while (true) {
|
||||||
while (true) {
|
int read = fis.read(buf);
|
||||||
int i = in.read();
|
if (read == -1) {
|
||||||
if (i != 0) {
|
break;
|
||||||
break;
|
}
|
||||||
|
out.write(buf, 0, read);
|
||||||
|
out.flush();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
InputStream in = socket.getInputStream();
|
||||||
|
while (true) {
|
||||||
|
int i = in.read();
|
||||||
|
if (i != 0) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
socket.close();
|
||||||
|
} catch (Exception e) {
|
||||||
|
throw e;
|
||||||
}
|
}
|
||||||
socket.close();
|
} catch (Exception e) {
|
||||||
|
throw e;
|
||||||
} finally {
|
} finally {
|
||||||
lock.unlock();
|
lock.unlock();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,15 @@
|
||||||
package com.cowr.local.ssjygl.devicectrl.printer;
|
package com.cowr.local.ssjygl.devicectrl.printer;
|
||||||
|
|
||||||
import com.jfinal.log.Log;
|
import com.jfinal.log.Log;
|
||||||
import org.apache.poi.ss.usermodel.*;
|
import org.apache.poi.ss.usermodel.Cell;
|
||||||
|
import org.apache.poi.ss.usermodel.Row;
|
||||||
|
import org.apache.poi.ss.usermodel.Sheet;
|
||||||
|
import org.apache.poi.ss.usermodel.Workbook;
|
||||||
import org.apache.poi.ss.util.CellAddress;
|
import org.apache.poi.ss.util.CellAddress;
|
||||||
import org.apache.poi.xssf.usermodel.XSSFClientAnchor;
|
|
||||||
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
|
||||||
import org.apache.poi.xssf.usermodel.XSSFWorkbookFactory;
|
import org.apache.poi.xssf.usermodel.XSSFWorkbookFactory;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.FileInputStream;
|
import java.io.FileInputStream;
|
||||||
import java.io.IOException;
|
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
@ -20,14 +20,11 @@ public class ExcelHelper {
|
||||||
static SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm");
|
static SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm");
|
||||||
|
|
||||||
public static Workbook genExcel(Map<String, Object> model, File tplFile) {
|
public static Workbook genExcel(Map<String, Object> model, File tplFile) {
|
||||||
FileInputStream is = null;
|
try (FileInputStream is = new FileInputStream(tplFile)) {
|
||||||
try {
|
|
||||||
long st = System.currentTimeMillis();
|
long st = System.currentTimeMillis();
|
||||||
Map<String, CellAddress> addrMap;
|
Map<String, CellAddress> addrMap;
|
||||||
CellAddress datetimePrint;
|
CellAddress datetimePrint;
|
||||||
|
|
||||||
is = new FileInputStream(tplFile);
|
|
||||||
|
|
||||||
Workbook workbook = XSSFWorkbookFactory.create(is);
|
Workbook workbook = XSSFWorkbookFactory.create(is);
|
||||||
log.debug("读取模板耗时:" + (System.currentTimeMillis() - st));
|
log.debug("读取模板耗时:" + (System.currentTimeMillis() - st));
|
||||||
Sheet sheet = workbook.getSheetAt(0);
|
Sheet sheet = workbook.getSheetAt(0);
|
||||||
|
|
@ -70,15 +67,6 @@ public class ExcelHelper {
|
||||||
return workbook;
|
return workbook;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error(e.getMessage(), e);
|
log.error(e.getMessage(), e);
|
||||||
} finally {
|
|
||||||
if (is != null) {
|
|
||||||
try {
|
|
||||||
is.close();
|
|
||||||
is = null;
|
|
||||||
} catch (IOException e) {
|
|
||||||
log.error(e.getMessage(), e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,69 @@
|
||||||
|
package com.cowr.local.ssjygl.jobs;
|
||||||
|
|
||||||
|
import com.cowr.local.ssjygl.devicectrl.common.Const;
|
||||||
|
import com.cowr.local.ssjygl.main.Config;
|
||||||
|
import com.jfinal.log.Log;
|
||||||
|
import org.quartz.Job;
|
||||||
|
import org.quartz.JobExecutionContext;
|
||||||
|
import org.quartz.JobExecutionException;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
|
||||||
|
public class ClearTempFileJob implements Job {
|
||||||
|
private static Log log = Log.getLog(ClearTempFileJob.class);
|
||||||
|
|
||||||
|
private void clearImg() {
|
||||||
|
long now = System.currentTimeMillis();
|
||||||
|
String dir = Config.getRootPath() + File.separator + Const.LicenseImgTmpFolder;
|
||||||
|
|
||||||
|
File baseDir = new File(dir);
|
||||||
|
File[] files = baseDir.listFiles();
|
||||||
|
|
||||||
|
for (int i = 0; i < files.length; i++) {
|
||||||
|
File img = files[i];
|
||||||
|
long st = img.lastModified();
|
||||||
|
|
||||||
|
// 缩略图 名称带 _ , 原图名称带 - ,超过2天后,都删掉
|
||||||
|
if (img.getName().contains("_") || img.getName().contains("-")) {
|
||||||
|
if (now - st > 2 * 24 * 60 * 60 * 1000) {
|
||||||
|
img.delete();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void clearXlsx() {
|
||||||
|
long now = System.currentTimeMillis();
|
||||||
|
String dir = Config.getRootPath() + File.separator + Const.PringExcelTmpFolder;
|
||||||
|
|
||||||
|
File baseDir = new File(dir);
|
||||||
|
File[] files = baseDir.listFiles();
|
||||||
|
|
||||||
|
for (int i = 0; i < files.length; i++) {
|
||||||
|
File xlsx = files[i];
|
||||||
|
long st = xlsx.lastModified();
|
||||||
|
if (now - st > 2 * 24 * 60 * 60 * 1000) {
|
||||||
|
xlsx.delete();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void clear() {
|
||||||
|
try {
|
||||||
|
clearImg();
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error(e.getMessage(), e);
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
clearXlsx();
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error(e.getMessage(), e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
|
||||||
|
clear();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -24,6 +24,7 @@ import com.cowr.local.ssjygl.driver.DriverController;
|
||||||
import com.cowr.local.ssjygl.invoice.invalidverify.InvoiceInvalidVerifyController;
|
import com.cowr.local.ssjygl.invoice.invalidverify.InvoiceInvalidVerifyController;
|
||||||
import com.cowr.local.ssjygl.invoice.log.InvoiceLogController;
|
import com.cowr.local.ssjygl.invoice.log.InvoiceLogController;
|
||||||
import com.cowr.local.ssjygl.invoice.receive.InvoiceReceiveController;
|
import com.cowr.local.ssjygl.invoice.receive.InvoiceReceiveController;
|
||||||
|
import com.cowr.local.ssjygl.jobs.ClearTempFileJob;
|
||||||
import com.cowr.local.ssjygl.netty.NettyClient;
|
import com.cowr.local.ssjygl.netty.NettyClient;
|
||||||
import com.cowr.local.ssjygl.netty.SocketIOService;
|
import com.cowr.local.ssjygl.netty.SocketIOService;
|
||||||
import com.cowr.local.ssjygl.order.invalidverify.OrderInvalidVerifyController;
|
import com.cowr.local.ssjygl.order.invalidverify.OrderInvalidVerifyController;
|
||||||
|
|
@ -64,14 +65,10 @@ import com.cowr.model._MappingKit;
|
||||||
import com.cowr.ssjygl.CacheData;
|
import com.cowr.ssjygl.CacheData;
|
||||||
import com.cowr.ssjygl.actioncmdlog.ActionCmdLogController;
|
import com.cowr.ssjygl.actioncmdlog.ActionCmdLogController;
|
||||||
import com.cowr.ssjygl.cctv.CctvController;
|
import com.cowr.ssjygl.cctv.CctvController;
|
||||||
import com.cowr.local.ssjygl.prepay.PrepayController;
|
|
||||||
import com.cowr.local.ssjygl.overall.OverallController;
|
|
||||||
import com.cowr.ssjygl.modifylog.ModifyLogController;
|
import com.cowr.ssjygl.modifylog.ModifyLogController;
|
||||||
import com.cowr.ssjygl.stat.invoice.InvoiceUseController;
|
import com.cowr.ssjygl.stat.invoice.InvoiceUseController;
|
||||||
import com.cowr.ssjygl.stat.purchase.OrderPurchaseStatController;
|
import com.cowr.ssjygl.stat.purchase.OrderPurchaseStatController;
|
||||||
import com.cowr.local.ssjygl.stat.sale.OrderStatController;
|
|
||||||
import com.cowr.ssjygl.stat.transfer.OrderTransferStatController;
|
import com.cowr.ssjygl.stat.transfer.OrderTransferStatController;
|
||||||
import com.cowr.local.ssjygl.system.sysuser.SysuserController;
|
|
||||||
import com.cowr.ssjygl.transportcompany.TransportCompanyService;
|
import com.cowr.ssjygl.transportcompany.TransportCompanyService;
|
||||||
import com.cowr.ssjygl.transprice.TransPriceService;
|
import com.cowr.ssjygl.transprice.TransPriceService;
|
||||||
import com.jfinal.config.*;
|
import com.jfinal.config.*;
|
||||||
|
|
@ -88,10 +85,6 @@ import com.jfinal.plugin.druid.DruidPlugin;
|
||||||
import com.jfinal.plugin.druid.DruidStatViewHandler;
|
import com.jfinal.plugin.druid.DruidStatViewHandler;
|
||||||
import com.jfinal.plugin.redis.RedisPlugin;
|
import com.jfinal.plugin.redis.RedisPlugin;
|
||||||
import com.jfinal.template.Engine;
|
import com.jfinal.template.Engine;
|
||||||
import com.cowr.common.Interceptor.ReporterInterceptor;
|
|
||||||
import com.cowr.common.handler.GlobalHandler;
|
|
||||||
import com.cowr.common.view.JsonRenderFactory;
|
|
||||||
import com.cowr.model._MappingKit;
|
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.sql.Connection;
|
import java.sql.Connection;
|
||||||
|
|
@ -409,6 +402,8 @@ public class Config extends JFinalConfig {
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error(e.getMessage(), e);
|
log.error(e.getMessage(), e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
new ClearTempFileJob().clear();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error(e.getMessage(), e);
|
log.error(e.getMessage(), e);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -465,9 +465,7 @@ public class LocalOrderService {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
FileOutputStream output = null;
|
Workbook wb = null;
|
||||||
Workbook wb = null;
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
Object invoice_type = data.get("invoice_type"); // 可能是 null
|
Object invoice_type = data.get("invoice_type"); // 可能是 null
|
||||||
|
|
||||||
|
|
@ -491,27 +489,21 @@ public class LocalOrderService {
|
||||||
System.currentTimeMillis()
|
System.currentTimeMillis()
|
||||||
));
|
));
|
||||||
|
|
||||||
output = new FileOutputStream(out);
|
try (FileOutputStream output = new FileOutputStream(out)) {
|
||||||
wb.write(output);
|
wb.write(output);
|
||||||
|
|
||||||
log.debug("生成票据打印文件: %s", out.getAbsolutePath());
|
log.debug("生成票据打印文件: %s", out.getAbsolutePath());
|
||||||
log.debug("生成文件耗时2:%s", System.currentTimeMillis() - st);
|
log.debug("生成文件耗时2:%s", System.currentTimeMillis() - st);
|
||||||
|
|
||||||
return out;
|
return out;
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error(e.getMessage(), e);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error(e.getMessage(), e);
|
log.error(e.getMessage(), e);
|
||||||
return null;
|
return null;
|
||||||
} finally {
|
} finally {
|
||||||
if (output != null) {
|
|
||||||
try {
|
|
||||||
output.flush();
|
|
||||||
output.close();
|
|
||||||
output = null;
|
|
||||||
} catch (IOException e) {
|
|
||||||
log.error(e.getMessage(), e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (wb != null) {
|
if (wb != null) {
|
||||||
try {
|
try {
|
||||||
wb.close();
|
wb.close();
|
||||||
|
|
|
||||||
|
|
@ -6,4 +6,9 @@ synctask.enable=true
|
||||||
# 在零点检查前一天未完成的集团订单,将开始执行的置为已完成,将未开始的置为取消
|
# 在零点检查前一天未完成的集团订单,将开始执行的置为已完成,将未开始的置为取消
|
||||||
checkundonordercluster.job=com.cowr.local.ssjygl.jobs.CheckUndonOrderclusterJob
|
checkundonordercluster.job=com.cowr.local.ssjygl.jobs.CheckUndonOrderclusterJob
|
||||||
checkundonordercluster.cron= 1 0 0 * * ?
|
checkundonordercluster.cron= 1 0 0 * * ?
|
||||||
checkundonordercluster.enable=true
|
checkundonordercluster.enable=true
|
||||||
|
|
||||||
|
# 删除超过2天的无用图片、打印生成的 excel
|
||||||
|
cleartempfile.job=com.cowr.local.ssjygl.jobs.ClearTempFileJob
|
||||||
|
cleartempfile.cron= 1 0 1 * * ?
|
||||||
|
cleartempfile.enable=true
|
||||||
|
|
@ -24,7 +24,7 @@ default_scale_wait_time=8000
|
||||||
weigh.max=49
|
weigh.max=49
|
||||||
|
|
||||||
#集团订单剩余量在结算时的剩余量预警值
|
#集团订单剩余量在结算时的剩余量预警值
|
||||||
surplus.threshold=30
|
surplus.threshold=125
|
||||||
|
|
||||||
#打印用到的配置信息
|
#打印用到的配置信息
|
||||||
print.vendor=浠水县长投环保有限公司
|
print.vendor=浠水县长投环保有限公司
|
||||||
|
|
|
||||||
|
|
@ -61,6 +61,7 @@ import com.cowr.service.ssjygl.truck.TruckController;
|
||||||
import com.cowr.ssjygl.CacheData;
|
import com.cowr.ssjygl.CacheData;
|
||||||
import com.cowr.ssjygl.actioncmdlog.ActionCmdLogController;
|
import com.cowr.ssjygl.actioncmdlog.ActionCmdLogController;
|
||||||
import com.cowr.ssjygl.cctv.CctvController;
|
import com.cowr.ssjygl.cctv.CctvController;
|
||||||
|
import com.cowr.ssjygl.customer.type.CustomerTypeController;
|
||||||
import com.cowr.ssjygl.modifylog.ModifyLogController;
|
import com.cowr.ssjygl.modifylog.ModifyLogController;
|
||||||
import com.cowr.ssjygl.stat.invoice.InvoiceUseController;
|
import com.cowr.ssjygl.stat.invoice.InvoiceUseController;
|
||||||
import com.cowr.ssjygl.stat.purchase.OrderPurchaseStatController;
|
import com.cowr.ssjygl.stat.purchase.OrderPurchaseStatController;
|
||||||
|
|
@ -184,6 +185,7 @@ public class Config extends JFinalConfig {
|
||||||
me.add("/customer/register", CustomerRegisterController.class);
|
me.add("/customer/register", CustomerRegisterController.class);
|
||||||
me.add("/customer/pact", CustomerPactController.class);
|
me.add("/customer/pact", CustomerPactController.class);
|
||||||
me.add("/customer/csp", CustomerSupermarketProductController.class);
|
me.add("/customer/csp", CustomerSupermarketProductController.class);
|
||||||
|
me.add("/customer/type", CustomerTypeController.class);
|
||||||
|
|
||||||
// -- 预付费
|
// -- 预付费
|
||||||
me.add("/prepay", PrepayController.class);
|
me.add("/prepay", PrepayController.class);
|
||||||
|
|
|
||||||
|
|
@ -52,8 +52,6 @@ public class PrepayController extends BaseController {
|
||||||
}
|
}
|
||||||
|
|
||||||
Integer supermarket_id = getInt("supermarket_id");
|
Integer supermarket_id = getInt("supermarket_id");
|
||||||
Integer invoice_type = getInt("invoice_type");
|
|
||||||
|
|
||||||
String stm = get("stm");
|
String stm = get("stm");
|
||||||
String etm = get("etm");
|
String etm = get("etm");
|
||||||
String truck_license = get("truck_license");
|
String truck_license = get("truck_license");
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,6 @@ import com.cowr.common.view.Result;
|
||||||
import com.cowr.model.Customer;
|
import com.cowr.model.Customer;
|
||||||
import com.cowr.model.CustomerReceiver;
|
import com.cowr.model.CustomerReceiver;
|
||||||
import com.cowr.model.Sysuser;
|
import com.cowr.model.Sysuser;
|
||||||
import com.cowr.service.ssjygl.customer.register.CustomerRegisterService;
|
|
||||||
import com.cowr.service.ssjygl.main.AuthInterceptor;
|
import com.cowr.service.ssjygl.main.AuthInterceptor;
|
||||||
import com.cowr.ssjygl.system.sysuser.SysuserPKValidator;
|
import com.cowr.ssjygl.system.sysuser.SysuserPKValidator;
|
||||||
import com.cowr.ssjygl.system.sysuser.SysuserValidator;
|
import com.cowr.ssjygl.system.sysuser.SysuserValidator;
|
||||||
|
|
@ -71,8 +70,9 @@ public class SysuserController extends Controller {
|
||||||
String receiver_phone = get("receiver_phone");
|
String receiver_phone = get("receiver_phone");
|
||||||
String receiver_address = get("receiver_address");
|
String receiver_address = get("receiver_address");
|
||||||
Integer invoice_type = getInt("invoice_type", 1);
|
Integer invoice_type = getInt("invoice_type", 1);
|
||||||
|
Integer customer_type_id = getInt("customer_type_id", 1);
|
||||||
|
|
||||||
renderJson(SysuserSyncService.me.saveCustomer(model, texpayer_name, receiver_name, receiver_phone, receiver_address, invoice_type, tokenuser));
|
renderJson(SysuserSyncService.me.saveCustomer(model, texpayer_name, receiver_name, receiver_phone, receiver_address, invoice_type, customer_type_id, tokenuser));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -137,9 +137,10 @@ public class SysuserController extends Controller {
|
||||||
String receiver_phone = get("receiver_phone");
|
String receiver_phone = get("receiver_phone");
|
||||||
String receiver_address = get("receiver_address");
|
String receiver_address = get("receiver_address");
|
||||||
Integer invoice_type = getInt("invoice_type", 1);
|
Integer invoice_type = getInt("invoice_type", 1);
|
||||||
|
Integer customer_type_id = getInt("customer_type_id", 0);
|
||||||
|
|
||||||
Sysuser model = getModel(Sysuser.class, "", true); // 忽略不在model中的字段
|
Sysuser model = getModel(Sysuser.class, "", true); // 忽略不在model中的字段
|
||||||
renderJson(SysuserSyncService.me.updateCustomer(model, texpayer_name, receiver_name, receiver_phone, receiver_address, invoice_type, tokenuser));
|
renderJson(SysuserSyncService.me.updateCustomer(model, texpayer_name, receiver_name, receiver_phone, receiver_address, invoice_type, customer_type_id, tokenuser));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -139,10 +139,11 @@ public class SysuserSyncService extends BaseSyncService {
|
||||||
/**
|
/**
|
||||||
* 是否财务经理
|
* 是否财务经理
|
||||||
* 预付费审批、退费审批
|
* 预付费审批、退费审批
|
||||||
|
*
|
||||||
* @param roleid
|
* @param roleid
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public boolean isFinanceManager(Integer roleid){
|
public boolean isFinanceManager(Integer roleid) {
|
||||||
if (roleid == null) return false;
|
if (roleid == null) return false;
|
||||||
return roleid.equals(RoleEnum.FINANCEMANAGER.getRoleid());
|
return roleid.equals(RoleEnum.FINANCEMANAGER.getRoleid());
|
||||||
}
|
}
|
||||||
|
|
@ -369,6 +370,7 @@ public class SysuserSyncService extends BaseSyncService {
|
||||||
String receiver_phone,
|
String receiver_phone,
|
||||||
String receiver_address,
|
String receiver_address,
|
||||||
Integer invoice_type,
|
Integer invoice_type,
|
||||||
|
Integer customer_type_id,
|
||||||
Sysuser tokenuser
|
Sysuser tokenuser
|
||||||
) {
|
) {
|
||||||
try {
|
try {
|
||||||
|
|
@ -385,6 +387,7 @@ public class SysuserSyncService extends BaseSyncService {
|
||||||
customer.setName(texpayer_name);
|
customer.setName(texpayer_name);
|
||||||
customer.setTexpayerName(texpayer_name);
|
customer.setTexpayerName(texpayer_name);
|
||||||
customer.setInvoiceType(invoice_type);
|
customer.setInvoiceType(invoice_type);
|
||||||
|
customer.setCustomerTypeId(customer_type_id);
|
||||||
|
|
||||||
if (customer.checkDuplicate("name")) {
|
if (customer.checkDuplicate("name")) {
|
||||||
return Result.failed(false, "名称已存在");
|
return Result.failed(false, "名称已存在");
|
||||||
|
|
@ -464,6 +467,7 @@ public class SysuserSyncService extends BaseSyncService {
|
||||||
String receiver_phone,
|
String receiver_phone,
|
||||||
String receiver_address,
|
String receiver_address,
|
||||||
Integer invoice_type,
|
Integer invoice_type,
|
||||||
|
Integer customer_type_id,
|
||||||
Sysuser tokenuser
|
Sysuser tokenuser
|
||||||
) {
|
) {
|
||||||
try {
|
try {
|
||||||
|
|
@ -504,6 +508,7 @@ public class SysuserSyncService extends BaseSyncService {
|
||||||
customer.setName(texpayer_name);
|
customer.setName(texpayer_name);
|
||||||
customer.setTexpayerName(texpayer_name);
|
customer.setTexpayerName(texpayer_name);
|
||||||
customer.setInvoiceType(invoice_type);
|
customer.setInvoiceType(invoice_type);
|
||||||
|
customer.setCustomerTypeId(customer_type_id);
|
||||||
|
|
||||||
chkobj.setName(model.getName());
|
chkobj.setName(model.getName());
|
||||||
chkobj.setPhone(model.getPhone());
|
chkobj.setPhone(model.getPhone());
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue