@@ -0,0 +1,76 @@ | |||||
# Compiled source # | |||||
################### | |||||
*.com | |||||
*.class | |||||
*.dll | |||||
*.exe | |||||
*.o | |||||
*.so | |||||
# Packages # | |||||
############ | |||||
# it's better to unpack these files and commit the raw source | |||||
# git has its own built in compression methods | |||||
*.7z | |||||
*.dmg | |||||
*.gz | |||||
*.iso | |||||
*.rar | |||||
*.tar | |||||
*.zip | |||||
*.war | |||||
# Logs and databases # | |||||
###################### | |||||
*.log | |||||
# OS generated files # | |||||
###################### | |||||
.DS_Store* | |||||
ehthumbs.db | |||||
Icon? | |||||
Thumbs.db | |||||
# Editor Files # | |||||
################ | |||||
*~ | |||||
*.swp | |||||
# Gradle Files # | |||||
################ | |||||
.gradle | |||||
# Build output directies | |||||
/target | |||||
*/target | |||||
/build | |||||
*/build | |||||
/log | |||||
# IntelliJ specific files/directories | |||||
out | |||||
.idea | |||||
*/*.idea | |||||
*.ipr | |||||
*.iws | |||||
*.iml | |||||
/*.iml | |||||
*/*.iml | |||||
# Eclipse specific files/directories | |||||
.classpath | |||||
.project | |||||
.settings | |||||
.metadata | |||||
.myeclipse | |||||
.factorypath | |||||
# NetBeans specific files/directories | |||||
.nbattrs | |||||
# Subversion directory # | |||||
.svn | |||||
/bin/ | |||||
config-server/src/main/resources/yml-config/*-local.yml |
@@ -0,0 +1,3 @@ | |||||
__pycache__/ | |||||
dist/ | |||||
main.spec |
@@ -0,0 +1,3 @@ | |||||
pyinstaller --onefile main.py | |||||
copy *.dll dist\ | |||||
pause |
@@ -0,0 +1,153 @@ | |||||
# encoding:utf-8 | |||||
from http.server import HTTPServer,SimpleHTTPRequestHandler | |||||
from PySmartCard.CpuCard import PcscReader | |||||
import time | |||||
def getbits(intger): | |||||
tmp = intger | |||||
b = 0 | |||||
while(tmp): | |||||
tmp >>= 1 | |||||
b += 1 | |||||
return b - 1 | |||||
class cardReaderHelper: | |||||
cardReader = None | |||||
cardReaderName = "" | |||||
def __init__(self): | |||||
self.cardReader = PcscReader() | |||||
def open(self): | |||||
names = self.cardReader.get_pcsc_readerlist() | |||||
if len(names) > 0: | |||||
self.cardReaderName = names.split(";")[0] | |||||
if len(self.cardReaderName) > 0: | |||||
print("Found Card Reader:", self.cardReaderName) | |||||
return True | |||||
else: | |||||
print("Can't Found Any Card Reader") | |||||
return False | |||||
def connect(self): | |||||
return self.cardReader.connect_device(self.cardReaderName) | |||||
def disconnect(self): | |||||
self.cardReader.disconnect_device() | |||||
def search(self, timeout): | |||||
i = timeout | |||||
ATR = "" | |||||
while(i > 0): | |||||
i -= 1 | |||||
ATR = self.connect() | |||||
if len(ATR) > 0: | |||||
break | |||||
else: | |||||
self.disconnect() | |||||
time.sleep(1) | |||||
return ATR | |||||
def poweron(self): | |||||
if self.cardReader.power_on(1) == 0: | |||||
return True | |||||
else: | |||||
self.disconnect() | |||||
return False | |||||
def __sendAPDU(self, send, readertype=None): | |||||
recv = {"data":"","sw":"","sw1":"","sw2":"","empty":True} | |||||
print("Send",send) | |||||
result = self.cardReader.send_apdu(send, readertype) | |||||
if len(result) > 0: | |||||
recv["empty"] = False | |||||
recv["data"] = result[:-4] | |||||
recv["sw"] = result[-4:] | |||||
recv["sw1"] = result[-4:-2] | |||||
recv["sw2"] = result[-2:] | |||||
print("Recv",recv["data"], recv["sw1"], recv["sw2"], recv["sw"], recv["empty"]) | |||||
return recv | |||||
def transfer(self, send, readertype=None): | |||||
recv = self.__sendAPDU(send, readertype) | |||||
if not recv["empty"]: | |||||
if recv["sw1"] == "61": | |||||
apdu = "00C00000" + recv["sw2"] | |||||
recv = self.__sendAPDU(apdu, readertype) | |||||
elif recv["sw1"] == "6C": | |||||
apdu = send[0:8] + recv["sw2"] | |||||
recv = self.__sendAPDU(apdu, readertype) | |||||
return recv | |||||
def prase(self, recv): | |||||
cardCode="" | |||||
if not recv["empty"]: | |||||
if "9000" == recv["sw"]: | |||||
raw = recv["data"] | |||||
cur = 0 | |||||
while(cur >= 0): | |||||
old_cur = cur | |||||
cur = raw.find("80", old_cur) | |||||
if cur >= 0: | |||||
if "03838D" == raw[cur+4:cur+10] or "0301DD" == raw[cur+4:cur+10]: | |||||
r_len = int(raw[cur+2:cur+4], 16) | |||||
code = int(raw[cur+10:cur+r_len*2+4], 16) | |||||
code &= ~(1<<getbits(code)) | |||||
code >>= 4 | |||||
cardCode = str(code) | |||||
print("Prase Card Code ", cardCode) | |||||
break | |||||
else: | |||||
print("Prase Card Code Failed") | |||||
if cur == old_cur: | |||||
cur += 1 | |||||
else: | |||||
print("Receive Error "+ recv["sw"]) | |||||
return cardCode | |||||
class My_RequestHandler(SimpleHTTPRequestHandler): | |||||
def do_GET(self): | |||||
readResult = {"message":"读卡失败,请再次尝试", "result":""} | |||||
reader = cardReaderHelper() | |||||
if reader.open(): | |||||
if len(reader.search(10)) > 0: | |||||
if reader.poweron(): | |||||
recv = reader.transfer("FF70076B07A005BE0380010400", 1) | |||||
reader.disconnect() | |||||
if not recv["empty"]: | |||||
code = reader.prase(recv) | |||||
if(len(code) > 0): | |||||
readResult["message"] = "读卡成功" | |||||
readResult["result"] = code | |||||
else: | |||||
readResult["message"]="读卡失败: " + recv["sw"] | |||||
else: | |||||
readResult["message"]="读卡失败" | |||||
else: | |||||
readResult["message"]="卡上电失败" | |||||
else: | |||||
readResult["message"]="没有搜索到卡片" | |||||
result = "{\"code\":\"200\",\"message\":\"" + readResult["message"] + "\",\"result\":\""+ readResult["result"] +"\"}" | |||||
print(result) | |||||
self.send_response(200) | |||||
self.send_header('Content-type','text/plain; charset=utf-8') | |||||
self.send_header('Access-Control-Allow-Origin', self.headers['Origin']) | |||||
self.send_header('Access-Control-Allow-Credentials', 'true') | |||||
self.send_header("Access-Control-Allow-Headers", "authorization") | |||||
self.end_headers() | |||||
self.wfile.write(bytes(result, "utf8")) | |||||
def do_OPTIONS(self): | |||||
self.send_response(200, "ok") | |||||
self.send_header('Access-Control-Allow-Origin', self.headers['Origin']) | |||||
self.send_header('Access-Control-Allow-Credentials', 'true') | |||||
self.send_header("Access-Control-Allow-Headers", "authorization") | |||||
self.end_headers() | |||||
def run(server_class=HTTPServer, handler_class=My_RequestHandler): | |||||
server_address = ('', 8000) | |||||
httpd = server_class(server_address, handler_class) | |||||
print("Start Service!") | |||||
httpd.serve_forever() | |||||
if __name__ == "__main__": | |||||
run() |
@@ -0,0 +1,126 @@ | |||||
<?xml version="1.0" encoding="UTF-8"?> | |||||
<project xmlns="http://maven.apache.org/POM/4.0.0" | |||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |||||
<modelVersion>4.0.0</modelVersion> | |||||
<groupId>com.neusoft.smart.pos</groupId> | |||||
<artifactId>common</artifactId> | |||||
<version>1.0-SNAPSHOT</version> | |||||
<packaging>jar</packaging> | |||||
<properties> | |||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | |||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> | |||||
<java.version>1.8</java.version> | |||||
</properties> | |||||
<dependencies> | |||||
<dependency> | |||||
<groupId>com.neusoft.smart.pos</groupId> | |||||
<artifactId>framework</artifactId> | |||||
<version>1.0-SNAPSHOT</version> | |||||
</dependency> | |||||
<!-- MySql数据库驱动 --> | |||||
<dependency> | |||||
<groupId>mysql</groupId> | |||||
<artifactId>mysql-connector-java</artifactId> | |||||
<version>5.1.39</version> | |||||
<scope>provided</scope> | |||||
</dependency> | |||||
<dependency> | |||||
<groupId>com.alibaba</groupId> | |||||
<artifactId>druid</artifactId> | |||||
<version>1.1.2</version> | |||||
<scope>provided</scope> | |||||
</dependency> | |||||
<!-- mybatis代码自动生成 --> | |||||
<dependency> | |||||
<groupId>org.mybatis.generator</groupId> | |||||
<artifactId>mybatis-generator-core</artifactId> | |||||
<version>1.3.5</version> | |||||
<scope>provided</scope> | |||||
</dependency> | |||||
<dependency> | |||||
<groupId>org.mybatis.spring.boot</groupId> | |||||
<artifactId>mybatis-spring-boot-starter</artifactId> | |||||
<version>1.1.1</version> | |||||
<scope>provided</scope> | |||||
</dependency> | |||||
<dependency> | |||||
<groupId>org.projectlombok</groupId> | |||||
<artifactId>lombok</artifactId> | |||||
<version>1.16.18</version> | |||||
<scope>provided</scope> | |||||
</dependency> | |||||
<dependency> | |||||
<groupId>io.springfox</groupId> | |||||
<artifactId>springfox-swagger2</artifactId> | |||||
<version>2.6.1</version> | |||||
<scope>provided</scope> | |||||
</dependency> | |||||
<dependency> | |||||
<groupId>org.hibernate</groupId> | |||||
<artifactId>hibernate-validator</artifactId> | |||||
<version>5.3.6.Final</version> | |||||
<scope>provided</scope> | |||||
</dependency> | |||||
<dependency> | |||||
<groupId>com.alibaba</groupId> | |||||
<artifactId>fastjson</artifactId> | |||||
<version>RELEASE</version> | |||||
<scope>provided</scope> | |||||
</dependency> | |||||
<dependency> | |||||
<groupId>org.springframework.boot</groupId> | |||||
<artifactId>spring-boot-starter-amqp</artifactId> | |||||
<version>RELEASE</version> | |||||
</dependency> | |||||
<dependency> | |||||
<groupId>org.apache.commons</groupId> | |||||
<artifactId>commons-lang3</artifactId> | |||||
<version>3.9</version> | |||||
</dependency> | |||||
</dependencies> | |||||
<!-- 数据库映射生成工具 --> | |||||
<build> | |||||
<plugins> | |||||
<plugin> | |||||
<groupId>org.mybatis.generator</groupId> | |||||
<artifactId>mybatis-generator-maven-plugin</artifactId> | |||||
<version>1.3.3</version> | |||||
<configuration> | |||||
<configurationFile>src/test/resources/mybatis/mybatis-generator/generatorConfig.xml | |||||
</configurationFile> | |||||
<overwrite>true</overwrite> | |||||
<verbose>true</verbose> | |||||
</configuration> | |||||
<dependencies> | |||||
<!-- 数据库驱动 --> | |||||
<dependency> | |||||
<groupId>mysql</groupId> | |||||
<artifactId>mysql-connector-java</artifactId> | |||||
<version>5.1.39</version> | |||||
</dependency> | |||||
<dependency> | |||||
<groupId>com.github.oceanc</groupId> | |||||
<artifactId>mybatis3-generator-plugin</artifactId> | |||||
<version>RELEASE</version> | |||||
</dependency> | |||||
</dependencies> | |||||
</plugin> | |||||
<plugin> | |||||
<groupId>org.apache.maven.plugins</groupId> | |||||
<artifactId>maven-compiler-plugin</artifactId> | |||||
<version>3.1</version> | |||||
<configuration> | |||||
<source>${java.version}</source> | |||||
<target>${java.version}</target> | |||||
<encoding>${project.build.sourceEncoding}</encoding> | |||||
</configuration> | |||||
</plugin> | |||||
</plugins> | |||||
</build> | |||||
</project> |
@@ -0,0 +1,285 @@ | |||||
package com.neusoft.smart.pos.constants; | |||||
public enum DictionaryConstant { | |||||
PAY_TYPE("PAY_TYPE", "支付方式"), | |||||
PAY_TYPE_WXEWM("1", "微信支付二维码"), | |||||
PAY_TYPE_ZFBEWM("2", "支付宝支付二维码"), | |||||
PAY_TYPE_YHK("3", "银行卡支付"), | |||||
PAY_TYPE_WXZZ("4", "微信转账"), | |||||
PAY_TYPE_ZFBZZ("5", "支付宝转账"), | |||||
PAY_TYPE_XJ("6", "现金支付"), | |||||
PAY_TYPE_HYK("7", "会员卡支付"), | |||||
PAY_TYPE_ZFBZZSQ("8", "支付宝当面资金授权支付"), | |||||
PAY_TYPE_YLEWM("9", "银联二维码支付"), | |||||
PAY_TYPE_FKYS("10", "饭卡(易石)"), | |||||
PAY_TYPE_FACE("11", "人脸支付"), | |||||
PAY_TYPE_WXZF_SERVICE("12", "微信支付(服务商)"), | |||||
PAY_TYPE_FKSY("13", "饭卡(沈阳食堂)"), | |||||
PAY_TYPE_YLSWYS("14", "银联商务(银商)"), | |||||
PAY_TYPE_YLSWGZH("15", "银联商务(公众号)"), | |||||
PAY_TYPE_YLSWBSC("16", "银联商务(B扫C)"), | |||||
PAY_TYPE_ELM("17", "饿了么支付"), | |||||
PAY_TYPE_YMF("18", "一码付"), | |||||
PAY_TYPE_WFT("19", "威富通"), | |||||
PAY_TYPE_XYHF("20", "西银惠付"), | |||||
PAY_TYPE_WXZFYS("21", "微信支付(甘肃银行)"), | |||||
PAY_TYPE_ZFBYS("22", "支付宝(甘肃银行)"), | |||||
PAY_TYPE_BANK_YS("23", "银行卡(银商)"), | |||||
PAY_TYPE_BANK_FLM("24", "银行卡(MISPOS)"), | |||||
PAY_TYPE_WXZFGJ("25", "微信支付(国际)"), | |||||
PAY_TYPE_ZFB_FACE_PAY("26", "支付宝(人脸支付)"), | |||||
PAY_TYPE_WX_FACE_PAY("27", "微信人脸支付"), | |||||
PAY_TYPE_DISCOUNT("29", "折扣"), | |||||
PAY_TYPE_FM_COUPON("30", "富茂优惠券"), | |||||
PAY_TYPE_WX_QRCODE("31", "微信支付(二维码)"), | |||||
PAY_TYPE_ZFB_QRCODE("32", "支付宝(二维码)"), | |||||
PAY_TYPE_FM_CARD("33", "伟业城会员卡"), | |||||
PAY_TYPE_CZ_ONLINE("34", "招行APP线上充值"), | |||||
PAY_TYPE_MULTY_COMBINED("1000","组合支付"), | |||||
ORDER_STATUS("ORDER_STATUS", "订单状态"), | |||||
ORDER_STATUS_DFK("1", "待付款"), | |||||
ORDER_STATUS_YFK("2", "已付款"), | |||||
ORDER_STATUS_TKZ("3", "退款中"), | |||||
ORDER_STATUS_YTK("4", "已退款"), | |||||
ORDER_STATUS_DDQX("5", "订单取消"), | |||||
ORDER_UPDATE_STATUS("ORDER_UPDATE_STATUS", "订单状态"), | |||||
ORDER_UPDATE_STATUS_DFK("1", "待付款"), | |||||
ORDER_UPDATE_STATUS_DDQX("2", "已取消"), | |||||
ORDER_UPDATE_STATUS_ZFZ("3", "支付中"), | |||||
ORDER_UPDATE_STATUS_YZF("4", "已支付"), | |||||
ORDER_UPDATE_STATUS_ZFWC("5", "支付完成"), | |||||
ORDER_UPDATE_STATUS_DTC("6", "待退款"), | |||||
ORDER_UPDATE_STATUS_TKZ("7", "退款中"), | |||||
ORDER_UPDATE_STATUS_YTC("8", "已退款"), | |||||
ORDER_UPDATE_STATUS_TKWC("9", "退款完成"), | |||||
ORDER_UPDATE_STATUS_DFH("11", "商户待发货"), | |||||
ORDER_UPDATE_STATUS_DQH("12", "商户待取货"), | |||||
ORDER_UPDATE_STATUS_DJD("13", "骑手待接单"), | |||||
ORDER_UPDATE_STATUS_YFH("14", "已发货"), | |||||
ORDER_UPDATE_STATUS_YSD("15", "已送达"), | |||||
ORDER_UPDATE_STATUS_YSH("16", "已收货"), | |||||
ORDER_TYPE("ORDER_TYPE", "订单类型"), | |||||
ORDER_TYPE_ZC("1", "普通订单"), | |||||
ORDER_TYPE_BL("2", "POS端补录订单"), | |||||
ORDER_TYPE_HYCZ("3", "会员卡充值订单"), | |||||
ORDER_TYPE_WXDC("4", "微信点餐订单"), | |||||
ORDER_TYPE_ELM("5", "饿了么订单"), | |||||
ORDER_SUB_TYPE("ORDER_SUB_TYPE", "订单子类型"), | |||||
ORDER_SUB_TYPE_COMMON_CONSUME_ORDER("common_consume_order", "堂食订单"), | |||||
ORDER_SUB_TYPE_REQ_DELIVERY_ORDER("req_delivery_order", "需要配送"), | |||||
PAY_STATUS("PAY_STATUS", "订单支付状态"), | |||||
PAY_STATUS_WFK("1", "未付款"), | |||||
PAY_STATUS_YFK("2", "已付款"), | |||||
PAY_STATUS_YQX("3", "交易关闭"), | |||||
PAY_STATUS_TKZ("4", "退款中"), | |||||
PAY_STATUS_YTK("5", "已退款"), | |||||
PAY_REFUND_STATUS("PAY_REFUND_STATUS", "退款支付订单状态"), | |||||
PAY_REFUND_STATUS_WTK("1", "未退款"), | |||||
PAY_REFUND_STATUS__YTK("2", "已退款"), | |||||
PAY_REFUND_STATUS__YQX("3", "已取消"), | |||||
PAY_GRANT_STATUS("PAY_GRANT_STATUS", "授权状态"), | |||||
PAY_GRANT_STATUS_CLZ("1", "待授权"), | |||||
PAY_GRANT_STATUS_YSQ("2", "已授权"), | |||||
PAY_GRANT_STATUS_YJD("3", "已解冻"), | |||||
PAY_GRANT_STATUS_YCX("4", "已撤销"), | |||||
PAY_GRANT_STATUS_ZF("5", "授权转支付"), | |||||
PAY_GRANT_STATUS_YTK("6", "已退款"), | |||||
PAY_GRANT_STATUS_SQSB("7", "授权失败"), | |||||
REQUEST_TYPE("REQUEST_TYPE", "第三方请求类型"), | |||||
REQUEST_TYPE_ZD("1", "主动请求"), | |||||
REQUEST_TYPE_BD("2", "被动请求"), | |||||
PAYMENT_ORDER_STATUS("PAYMENT_ORDER_STATUS", "聚合支付平台订单状态"), | |||||
PAYMENT_ORDER_STATUS_DZF("1", "待支付"), | |||||
PAYMENT_ORDER_STATUS_YZF("2", "已支付"), | |||||
PAYMENT_ORDER_STATUS_TKZ("3", "退款中"), | |||||
PAYMENT_ORDER_STATUS_YTK("4", "已退款"), | |||||
PAYMENT_ORDER_STATUS_JYGB("5", "交易关闭"), | |||||
PAYMENT_ORDER_STATUS_FINISH("6", "交易结束,不可退款,支付宝特有状态"), | |||||
PAYMENT_PAY_TYPE("PAYMENT_PAY_TYPE", "聚合支付平台支付类型"), | |||||
PAYMENT_PAY_TYPE_WXSM("1", "微信扫码支付"), | |||||
PAYMENT_PAY_TYPE_ZFBSM("2", "支付宝扫码支付"), | |||||
PAYMENT_PAY_TYPE_ZFBZZSQ("3", "支付宝当面资金授权支付"), | |||||
PAYMENT_PAY_TYPE_YLSM("4", "银联二维码支付"), | |||||
PAYMENT_PAY_TYPE_WXZF_SERCIE("5", "微信支付(服务商)"), | |||||
PAYMENT_PAY_TYPE_YLSW_SERCIE("6", "银联商务(银商)"), | |||||
PAYMENT_PAY_TYPE_YLSW_GZH_SERCIE("7", "银联商务(公众号)"), | |||||
PAYMENT_PAY_TYPE_YLSW_BSC_SERCIE("8", "银联商务(B扫C)"), | |||||
PAYMENT_PAY_TYPE_XYHF("9", "西银惠付"), | |||||
PAYMENT_PAY_TYPE_WFT("10", "威富通"), | |||||
PAYMENT_PAY_TYPE_WXZF_US_SERCIE("11", "微信支付(服务商国际)"), | |||||
PAYMENT_PAY_TYPE_ZFB_FACE_PAY("12", "支付宝(人脸支付)"), | |||||
PAYMENT_PAY_TYPE_WX_FACE_PAY("13", "微信人脸支付"), | |||||
PAYMENT_PAY_TYPE_DICOUNT_PAY("15", "折扣支付"), | |||||
PAYMENT_PAY_TYPE_FM_COUPON_PAY("16", "富茂优惠券支付"), | |||||
PAYMENT_PAY_TYPE_CARD_BALANCE_PAY("17", "实体卡余额支付"), | |||||
PAYMENT_REQUEST_TYPE("PAYMENT_REQUEST_TYPE", "第三方请求类型"), | |||||
PAYMENT_REQUEST_TYPE_ZD("1", "主动向业务系统发起请求(如支付成功回调)"), | |||||
PAYMENT_REQUEST_TYPE_BD("2", "接收业务系统请求,如创建订单、订单信息查询"), | |||||
PAYMENT_APPLY_TYPE("PAYMENT_APPLY_TYPE", "聚合支付平台商户申请类型"), | |||||
PAYMENT_APPLY_TYPE_NB("1", "内部申请"), | |||||
PAYMENT_APPLY_TYPE_GR("2", "个人用户申请"), | |||||
PAYMENT_APPLY_TYPE_GS("3", "公司集团用户申请"), | |||||
PAYMENT_MCH_STATUS("PAYMENT_MCH_STATUS", "聚合支付平台商户状态"), | |||||
PAYMENT_MCH_STATUS_BC("1", "保存"), | |||||
PAYMENT_MCH_STATUS_TJSQ("2", "提交申请"), | |||||
PAYMENT_MCH_STATUS_SHTG("3", "审核通过"), | |||||
PAYMENT_MCH_STATUS_DJ("4", "冻结"), | |||||
PAYMENT_MCH_STATUS_LJSC("5", "逻辑删除"), | |||||
IS_ENABLE("IS_ENABLE", "是否启用"), | |||||
IS_ENABLE_TY("0", "未启用"), | |||||
IS_ENABLE_QY("1", "启用"), | |||||
IS_SHOW("IS_SHOW", "是否显示"), | |||||
IS_SHOW_F("0", "不显示"), | |||||
IS_SHOW_S("1", "显示"), | |||||
TRADE_MCH_PAY_CHANNEL_ACTIVE_STATUS("ACTIVE_STATUS", "店铺支付渠道状态"), | |||||
TRADE_MCH_PAY_CHANNEL_ACTIVE_STATUS_SHOWN_ON_POS("shown_on_pos", "POS端显示"), | |||||
TRADE_MCH_PAY_CHANNEL_ACTIVE_STATUS_NOT_SHOWN_ON_POS("not_shown_on_pos", "POS端不显示"), | |||||
SETTLEMENT_TYPE("SETTLEMENT_TYPE", "商户结算类型"), | |||||
SETTLEMENT_TYPE_JT("1", "集团结算"), | |||||
SETTLEMENT_TYPE_MD("2", "门店结算"), | |||||
REFUND_STATUS("REFUND_STATUS", "退款状态"), | |||||
REFUND_STATUS_DTK("1", "待退款"), | |||||
REFUND_STATUS_TKZ("2", "退款中"), | |||||
REFUND_STATUS_TKWC("3", "退款完成"), | |||||
REFUND_STATUS_TKQX("4", "退款取消"), | |||||
WX_TRADE_TYPE("WX_TRADE_TYPE", "微信交易类型"), | |||||
WX_TRADE_TYPE_JSAPI("JSAPI", "公众号支付"), | |||||
WX_TRADE_TYPE_NATIVE("NATIVE", "原生扫码支付"), | |||||
WX_TRADE_TYPE_APP("APP", "app支付"), | |||||
WX_TRADE_TYPE_MICROPAY("MICROPAY", "刷卡支付"), | |||||
WX_TRADE_TYPE_MWEB("MWEB", "H5支付"), | |||||
INVENTORY_FLOW_TYPE("INVENTORY_FLOW_TYPE","库存流水类型"), | |||||
INVENTORY_FLOW_TYPE_STOCK_IN("10","进货"), | |||||
INVENTORY_FLOW_TYPE_USER_RETURN("11","用户退货"), | |||||
INVENTORY_FLOW_TYPE_CHECK_ADD("12","盘盈"), | |||||
INVENTORY_FLOW_TYPE_SUP_RETURN("20","向供应货退货"), | |||||
INVENTORY_FLOW_TYPE_GOODS_SALE("21","销售"), | |||||
INVENTORY_FLOW_TYPE_CHECK_DEC("22","盘损"), | |||||
INVENTORY_FLOW_TYPE_GOODS_TAKE("23","领用"), | |||||
INVENTORY_STATUS("INVENTORY_STATUS","库存批次状态"), | |||||
INVENTORY_STATUS_USABLE("1","可用批次"), | |||||
INVENTORY_STATUS_ZERO("0","库存为0批次"), | |||||
INVENTORY_STATUS_SOLDOUT("-1","下架产品"), | |||||
GRANT_OPERATION_TYPE("GRANT_OPERATION_TYPE","预授权操作类型"), | |||||
GRANT_OPERATION_TYPE_1("1","授权申请"), | |||||
GRANT_OPERATION_TYPE_2("2","授权成功"), | |||||
GRANT_OPERATION_TYPE_3("3","解冻"), | |||||
GRANT_OPERATION_TYPE_4("4","撤销"), | |||||
GRANT_OPERATION_TYPE_5("5","授权转支付"), | |||||
GRANT_OPERATION_TYPE_6("6","退款"), | |||||
PAY_CATEGORY_TYPE("PAY_CATEGORY_TYPE","支付方式处理类别"), | |||||
PAY_CATEGORY_TYPE_1("1","三方支付类(微信支付宝等)"), | |||||
PAY_CATEGORY_TYPE_2("2","现金支付类"), | |||||
PAY_CATEGORY_TYPE_3("3","银行卡支付类"), | |||||
PAY_CATEGORY_TYPE_4("4","饭卡类"), | |||||
PAY_CATEGORY_TYPE_5("5","会员卡支付类"), | |||||
PAY_CATEGORY_TYPE_6("6","人脸支付"), | |||||
PAY_CATEGORY_TYPE_7("7","第三方资金授权支付类"), | |||||
PRINTER_DEVICE_TYPE("PRINTER_DEVICE_TYPE","打印机类型"), | |||||
PRINTER_DEVICE_TYPE_1("1","中转设备"), | |||||
PRINTER_DEVICE_TYPE_2("2","打印机"), | |||||
PRINTER_RELATIONSHIP_TYPE("PRINTER_RELATIONSHIP_TYPE","打印关系类型"), | |||||
PRINTER_RELATIONSHIP_TYPE_1("1","菜品编号"), | |||||
PRINTER_RELATIONSHIP_TYPE_2("2","菜品分类"), | |||||
PRINTER_PRINTER_TYPE("PRINTER_PRINTER_TYPE","打印机类型"), | |||||
PRINTER_PRINTER_TYPE_1("1","打印机打印"), | |||||
PRINTER_PRINTER_TYPE_2("2","中转打印"), | |||||
PRINTER_ORDER_TYPE("PRINTER_ORDER_TYPE","打印订单类型"), | |||||
PRINTER_ORDER_TYPE_1("1","后厨打印"), | |||||
PRINTER_ORDER_TYPE_2("2","预结算订单"), | |||||
PRINTER_ORDER_TYPE_3("3","结算订单"), | |||||
PRINTER_ORDER_TYPE_4("4","不干胶打印"), | |||||
PRINTER_TASK_STATUS("PRINTER_TASK_STATUS","打印任务状态"), | |||||
PRINTER_TASK_STATUS_1("1","未打印"), | |||||
PRINTER_TASK_STATUS_2("2","已发送,未打印"), | |||||
PRINTER_TASK_STATUS_3("3","已打印"), | |||||
PRINTER_STATUS("PRINTER_STATUS","打印机状态"), | |||||
PRINTER_STATUS_0("0","停用"), | |||||
PRINTER_STATUS_1("1","启用"), | |||||
PRINTER_TEMPLATE_TYPE("PRINTER_TEMPLATE_TYPE","打印模板类型"), | |||||
PRINTER_TEMPLATE_TYPE_1("1","后结下单模板"), | |||||
PRINTER_TEMPLATE_TYPE_2("2","前结结算模板"), | |||||
PRINTER_TEMPLATE_TYPE_3("3","后结结算模板"), | |||||
PRINTER_OPERATION_TYPE("PRINTER_OPERATION_TYPE","打印操作类型"), | |||||
PRINTER_OPERATION_TYPE_1("1","下单"), | |||||
PRINTER_OPERATION_TYPE_2("2","结算"), | |||||
BILL_CYCLE_TYPE("BILL_CYCLE_TYPE","周期类型"), | |||||
BILL_CYCLE_TYPE_MONTH("1","月结"), | |||||
BILL_CYCLE_TYPE_YEAR("2","年结"), | |||||
BILL_CYCLE_TYPE_QUARTER("3","季结"), | |||||
BILL_CYCLE_TYPE_WEEK("4","周结"), | |||||
BILL_ACCEPT_STATUS("BILL_ACCEPT_STATUS","归档状态"), | |||||
BILL_ACCEPT_STATUS_NO("1","未归档"), | |||||
BILL_ACCEPT_STATUS_YES("2","已归档"), | |||||
BILL_RULE_STATUS("BILL_RULE_STATUS","规则状态"), | |||||
BILL_RULE_STATUS_YES("1","生效"), | |||||
BILL_RULE_STATUS_NO("2","失效"), | |||||
BILL_TASK_STATUS("BILL_TASK_STATUS","任务状态"), | |||||
BILL_TASK_STATUS_1("1","执行中"), | |||||
BILL_TASK_STATUS_2("2","执行完成"), | |||||
BILL_TASK_STATUS_3("3","执行失败"), | |||||
; | |||||
private String code; | |||||
private String value; | |||||
DictionaryConstant(String code, String value) { | |||||
this.code = code; | |||||
this.value = value; | |||||
} | |||||
public String getCode() { | |||||
return code; | |||||
} | |||||
public String getValue() { | |||||
return value; | |||||
} | |||||
public static DictionaryConstant getEnumByCode(String enumName,String code){ | |||||
for(DictionaryConstant dictEnum : DictionaryConstant.values()){ | |||||
if(dictEnum.name().startsWith(enumName) && code.equals(dictEnum.getCode())){ | |||||
return dictEnum; | |||||
} | |||||
} | |||||
return null; | |||||
} | |||||
} |
@@ -0,0 +1,40 @@ | |||||
package com.neusoft.smart.pos.constants; | |||||
/** | |||||
* @author yuan-p@neusoft.com | |||||
* @date 2020-06-12 13:50 | |||||
* @description | |||||
*/ | |||||
public enum EntityTableConstant { | |||||
ENTITY_TABLE("ENTITY_TABLE","数据库表名"), | |||||
ENTITY_TABLE_SHOP("shop","商户表"), | |||||
ENTITY_TABLE_ORG("org","集团表"), | |||||
; | |||||
private String code; | |||||
private String value; | |||||
EntityTableConstant(String code, String value) { | |||||
this.code = code; | |||||
this.value = value; | |||||
} | |||||
public String getCode() { | |||||
return code; | |||||
} | |||||
public String getValue() { | |||||
return value; | |||||
} | |||||
public static EntityTableConstant getEnumByCode(String enumName,String code){ | |||||
for(EntityTableConstant dictEnum : EntityTableConstant.values()){ | |||||
if(dictEnum.name().startsWith(enumName) && code.equals(dictEnum.getCode())){ | |||||
return dictEnum; | |||||
} | |||||
} | |||||
return null; | |||||
} | |||||
} |
@@ -0,0 +1,13 @@ | |||||
package com.neusoft.smart.pos.dto; | |||||
import lombok.Data; | |||||
@Data | |||||
public abstract class AbstractQuery { | |||||
private Boolean isPage = true; | |||||
private Integer offset = 0; | |||||
private Integer limit = 10; | |||||
} |
@@ -0,0 +1,14 @@ | |||||
package com.neusoft.smart.pos.dto; | |||||
import io.swagger.annotations.ApiModelProperty; | |||||
import lombok.Data; | |||||
import java.util.List; | |||||
@Data | |||||
public class AlterUserRequest { | |||||
private Integer id; | |||||
private String nickname; | |||||
@ApiModelProperty(name = "shopIds", value = "门店代码,可空", dataType = "Integer") | |||||
private List<Integer> shopIds; | |||||
} |
@@ -0,0 +1,14 @@ | |||||
package com.neusoft.smart.pos.dto; | |||||
import lombok.Data; | |||||
@Data | |||||
public class RegisterRequest { | |||||
String username; | |||||
String password; | |||||
String name; | |||||
String phone; | |||||
String address; | |||||
String province; | |||||
String city; | |||||
} |
@@ -0,0 +1,26 @@ | |||||
package com.neusoft.smart.pos.dto.advertisement.request; | |||||
import com.neusoft.smart.pos.dto.AbstractQuery; | |||||
import lombok.Data; | |||||
import java.util.List; | |||||
/** | |||||
* Created by 姜涛 on 2017/7/17. | |||||
*/ | |||||
@Data | |||||
public class MediaResourceQueryRequest extends AbstractQuery { | |||||
private String mediaName; | |||||
private List<Integer> mediaType; | |||||
private String fileType; | |||||
private Integer status; | |||||
private List<Integer> ids; | |||||
private Integer storeId; | |||||
} |
@@ -0,0 +1,45 @@ | |||||
package com.neusoft.smart.pos.dto.advertisement.request; | |||||
import io.swagger.annotations.ApiModel; | |||||
import io.swagger.annotations.ApiModelProperty; | |||||
import lombok.Data; | |||||
import javax.validation.constraints.NotNull; | |||||
import java.util.Date; | |||||
@Data | |||||
@ApiModel | |||||
public class MediaResourceRequest { | |||||
private Integer id; | |||||
@NotNull(message = "资源名称不可为空") | |||||
@ApiModelProperty(name = "mediaName", value = "资源名称", dataType = "String" ,example="1",required=true) | |||||
private String mediaName; | |||||
@NotNull(message = "资源uuid不可为空") | |||||
@ApiModelProperty(name = "mediaUuid", value = "资源uuid", dataType = "String" ,example="xxx-xxx-ddd-xxx",required=true) | |||||
private String mediaUuid; | |||||
@NotNull(message = "资源地址不可为空") | |||||
@ApiModelProperty(name = "mediaUrl", value = "资源地址", dataType = "String" ,example="http://xxx.com/xxx",required=true) | |||||
private String mediaUrl; | |||||
@NotNull(message = "资源类型不可为空") | |||||
@ApiModelProperty(name = "mediaType", value = "资源类型", dataType = "Integer" ,example="1",required=true) | |||||
private Integer mediaType; | |||||
@NotNull(message = "文件类型不可为空") | |||||
@ApiModelProperty(name = "mediaName", value = "文件类型", dataType = "String" ,example="jpg",required=true) | |||||
private String fileType; | |||||
@ApiModelProperty(name = "displayType", value = "播放类型", dataType = "Integer" ,example="1",required=true) | |||||
private Integer displayType; | |||||
private Integer status; | |||||
private Integer createBy; | |||||
private Date createTime; | |||||
} |
@@ -0,0 +1,20 @@ | |||||
package com.neusoft.smart.pos.dto.advertisement.request; | |||||
import com.neusoft.smart.pos.dto.AbstractQuery; | |||||
import lombok.Data; | |||||
@Data | |||||
public class MediaResourceStrategyQueryRequest extends AbstractQuery { | |||||
private String strategyName; | |||||
private String startDate; | |||||
private String endDate; | |||||
private Integer status; | |||||
private Integer organizationId; | |||||
private Integer storeId; | |||||
} |
@@ -0,0 +1,40 @@ | |||||
package com.neusoft.smart.pos.dto.advertisement.request; | |||||
import com.neusoft.smart.pos.dto.device.request.DeviceRequest; | |||||
import io.swagger.annotations.ApiModel; | |||||
import io.swagger.annotations.ApiModelProperty; | |||||
import lombok.Data; | |||||
import javax.validation.constraints.NotNull; | |||||
import java.util.List; | |||||
@Data | |||||
@ApiModel | |||||
public class MediaResourceStrategyRequest { | |||||
@NotNull(message = "广告策略名称不可为空") | |||||
@ApiModelProperty(name = "strategyName", value = "广告策略名称", dataType = "String", example = "xxxxx", required = true) | |||||
private String strategyName; | |||||
@NotNull(message = "广告资源缓存时间不可为空") | |||||
@ApiModelProperty(name = "macAddr", value = "广告资源缓存时间", dataType = "Long", example = "123", required = true) | |||||
private Long cacheTime; | |||||
@NotNull(message = "机具列表不可为空") | |||||
@ApiModelProperty(name = "deviceList", value = "机具列表", dataType = "java.util.List", required = true) | |||||
private List<DeviceRequest> deviceList; | |||||
@NotNull(message = "资源列表不可为空") | |||||
@ApiModelProperty(name = "strategyList", value = "资源列表", dataType = "java.util.List", required = true) | |||||
private List<MediaStrategyRequest> strategyList; | |||||
// public static void main(String[] args) { | |||||
// MediaResourceStrategyRequest request = new MediaResourceStrategyRequest(); | |||||
// request.setDeviceList(new ArrayList<>()); | |||||
// request.getDeviceList().add(new DeviceRequest()); | |||||
// request.setStrategyList(new ArrayList<>()); | |||||
// request.getStrategyList().add(new MediaStrategyRequest()); | |||||
// System.out.println(JSON.toJSONString(request, SerializerFeature.PrettyFormat,SerializerFeature.WriteMapNullValue)); | |||||
// } | |||||
} |
@@ -0,0 +1,32 @@ | |||||
package com.neusoft.smart.pos.dto.advertisement.request; | |||||
import com.fasterxml.jackson.annotation.JsonFormat; | |||||
import io.swagger.annotations.ApiModel; | |||||
import lombok.Data; | |||||
import java.util.Date; | |||||
@Data | |||||
@ApiModel | |||||
public class MediaStrategyRequest { | |||||
private Integer id; | |||||
private Integer strategyId; | |||||
private Integer deviceId; | |||||
private Integer mediaResourceId; | |||||
private Integer playLength; | |||||
@JsonFormat(pattern = "HH:mm") | |||||
private Date showTimeBegin; | |||||
@JsonFormat(pattern = "HH:mm") | |||||
private Date showTimeEnd; | |||||
private Integer backgroundAudioId; | |||||
private Integer status; | |||||
} |
@@ -0,0 +1,14 @@ | |||||
package com.neusoft.smart.pos.dto.advertisement.response; | |||||
import com.neusoft.smart.pos.redis.bean.DeviceMedias; | |||||
import io.swagger.annotations.ApiModel; | |||||
import lombok.Data; | |||||
@Data | |||||
@ApiModel("老版OTA的广告接口所用,首字母大写的") | |||||
public class DeviceMediaResponse extends DeviceMedias { | |||||
private Integer St; | |||||
private String Msg; | |||||
} |
@@ -0,0 +1,33 @@ | |||||
package com.neusoft.smart.pos.dto.advertisement.response; | |||||
import lombok.Data; | |||||
import java.util.Date; | |||||
@Data | |||||
public class MediaResourceResponse { | |||||
private Integer id; | |||||
private String mediaName; | |||||
private String mediaUuid; | |||||
private String mediaUrl; | |||||
private Integer mediaType; | |||||
private String fileType; | |||||
private Integer displayType; | |||||
private Integer status; | |||||
private Integer createBy; | |||||
private Date createTime; | |||||
private Integer organizationId; | |||||
private Integer storeId; | |||||
} |
@@ -0,0 +1,27 @@ | |||||
package com.neusoft.smart.pos.dto.advertisement.response; | |||||
import com.fasterxml.jackson.annotation.JsonFormat; | |||||
import lombok.Data; | |||||
import java.util.Date; | |||||
@Data | |||||
public class MediaResourceStrategyResponse { | |||||
private Integer id; | |||||
private String strategyName; | |||||
private Long cacheTime; | |||||
private Integer createdBy; | |||||
@JsonFormat(timezone = "GMT+8") | |||||
private Date createdDate; | |||||
private Integer status; | |||||
private Integer organizationId; | |||||
private Integer storeId; | |||||
} |
@@ -0,0 +1,31 @@ | |||||
package com.neusoft.smart.pos.dto.advertisement.response; | |||||
import lombok.Data; | |||||
import java.util.Date; | |||||
@Data | |||||
public class MediaStrategyResponse { | |||||
private Integer id; | |||||
private Integer strategyId; | |||||
private Integer deviceId; | |||||
private Integer mediaResourceId; | |||||
private MediaResourceResponse mediaResource; | |||||
private Integer playLength; | |||||
private Date showTimeBegin; | |||||
private Date showTimeEnd; | |||||
private Integer backgroundAudioId; | |||||
private MediaResourceResponse backgroundAudio; | |||||
private Integer status; | |||||
} |
@@ -0,0 +1,71 @@ | |||||
package com.neusoft.smart.pos.dto.card.request; | |||||
import io.swagger.annotations.ApiModel; | |||||
import io.swagger.annotations.ApiModelProperty; | |||||
import lombok.Data; | |||||
import org.hibernate.validator.constraints.NotEmpty; | |||||
import javax.validation.constraints.NotNull; | |||||
import java.util.Date; | |||||
@Data | |||||
@ApiModel | |||||
public class ActivateCardRequest { | |||||
@NotNull(message = "cardType is required") | |||||
@ApiModelProperty(name = "cardType", value = "卡类型:0:会员卡 1:储值卡 2:礼品卡", dataType = "int", example = "0", required = true) | |||||
private int cardType; | |||||
@NotNull(message = "beanName is required") | |||||
@ApiModelProperty(name = "beanName", value = "卡关联关系查询Bean名称", dataType = "String", example = "defaultCardRelationRepository", required = true) | |||||
private String beanName; | |||||
@ApiModelProperty(name = "rechargeStrategyParam", value = "充值策略参数", dataType = "String", example = "1", required = true) | |||||
private String rechargeStrategyParam; | |||||
@ApiModelProperty(name = "pointStrategyParam", value = "积分策略参数", dataType = "String", example = "1", required = true) | |||||
private String pointStrategyParam; | |||||
@ApiModelProperty(name = "cardNum", value = "卡号", dataType = "String", example = "12225845") | |||||
private String cardNum; | |||||
@ApiModelProperty(name = "cardOtherId", value = "卡其他识别号", dataType = "String", example = "12225845") | |||||
private String cardOtherId; | |||||
@ApiModelProperty(name = "cardAnotherId", value = "卡识别号二", dataType = "String", example = "12225845") | |||||
private String cardAnotherId; | |||||
@ApiModelProperty(name = "needPassword", value = "是否需要卡密码@0不需要 @1需要,默认值0", dataType = "String", example = "1") | |||||
private String needPassword = "0"; | |||||
@ApiModelProperty(name = "cardPassword", value = "卡密码", dataType = "String", example = "12225845") | |||||
private String cardPassword; | |||||
@ApiModelProperty(name = "cardImage", value = "卡图片地址", dataType = "String", example = "http://xxx") | |||||
private String cardImage; | |||||
private Integer org; | |||||
private Integer store = 0; | |||||
// 以下为会员信息:如果卡类型为会员卡,则name字段不能为空 | |||||
private String name; | |||||
private String mobile; | |||||
private String memberEmail; | |||||
private String memberCode; | |||||
private Integer memberType; | |||||
private Date birthday; | |||||
private Integer gender; | |||||
private String address; | |||||
private String avatar; | |||||
private String content; | |||||
} |
@@ -0,0 +1,20 @@ | |||||
package com.neusoft.smart.pos.dto.card.request; | |||||
import io.swagger.annotations.ApiModel; | |||||
import io.swagger.annotations.ApiModelProperty; | |||||
import lombok.Data; | |||||
import org.hibernate.validator.constraints.NotEmpty; | |||||
import javax.validation.constraints.DecimalMax; | |||||
import javax.validation.constraints.NotNull; | |||||
import java.math.BigDecimal; | |||||
@Data | |||||
@ApiModel(value = "卡交易取消请求对象") | |||||
public class CardTradeCancelRequest { | |||||
@NotEmpty(message = "支付单编号不可为空") | |||||
@ApiModelProperty(name = "outTradeId", value = "支付单编号", dataType = "String", example = "xxxxxxxxxx", required = true) | |||||
private String outTradeId; | |||||
} |
@@ -0,0 +1,53 @@ | |||||
package com.neusoft.smart.pos.dto.card.request; | |||||
import io.swagger.annotations.ApiModel; | |||||
import io.swagger.annotations.ApiModelProperty; | |||||
import lombok.Data; | |||||
import org.hibernate.validator.constraints.NotEmpty; | |||||
import javax.validation.constraints.DecimalMax; | |||||
import javax.validation.constraints.NotNull; | |||||
import java.math.BigDecimal; | |||||
import java.util.Date; | |||||
@Data | |||||
@ApiModel(value = "卡交易请求对象") | |||||
public class CardTradeCreateRequest { | |||||
@ApiModelProperty(name = "sourceCardNum", value = "支付方卡号", dataType = "String", example = "123546798") | |||||
private String sourceCardNum; | |||||
@ApiModelProperty(name = "sourceCardAnotherId", value = "支付方卡Id2", dataType = "String", example = "221654") | |||||
private String sourceCardAnotherId; | |||||
@ApiModelProperty(name = "sourceCardOtherId", value = "支付方卡其他ID", dataType = "String", example = "123546798") | |||||
private String sourceCardOtherId; | |||||
@ApiModelProperty(name = "password", value = "支付方卡密码", dataType = "String", example = "123546798") | |||||
private String cardPassword; | |||||
@ApiModelProperty(name = "targetCardNum", value = "卖方卡号", dataType = "String", example = "123546798") | |||||
private String targetCardNum; | |||||
@ApiModelProperty(name = "targetCardAnotherId", value = "卖方会员Id", dataType = "String", example = "289753") | |||||
private String targetCardAnotherId; | |||||
@ApiModelProperty(name = "targetCardOtherId", value = "卖方卡其他ID", dataType = "String", example = "123546798") | |||||
private String targetCardOtherId; | |||||
@NotEmpty(message = "支付单编号不可为空") | |||||
@ApiModelProperty(name = "outTradeId", value = "支付单编号", dataType = "String", example = "xxxxxxxxxx", required = true) | |||||
private String outTradeId; | |||||
@NotNull(message = "交易金额不可为空") | |||||
@DecimalMax(value = "999999999", message = "交易金额不可大于999999999") | |||||
@ApiModelProperty(name = "payAmount", value = "交易金额(单位分)", dataType = "Long", example = "123", required = true) | |||||
private Long payAmount; | |||||
@NotNull(message = "扣款方式不可为空 @1:卡内余额支付 @2:积分支付") | |||||
@ApiModelProperty(name = "payType", value = "扣款方式", dataType = "String", example = "1", required = true) | |||||
private String payType; | |||||
private Boolean canBeNegative = false; | |||||
} |
@@ -0,0 +1,16 @@ | |||||
package com.neusoft.smart.pos.dto.card.request; | |||||
import io.swagger.annotations.ApiModel; | |||||
import io.swagger.annotations.ApiModelProperty; | |||||
import lombok.Data; | |||||
import org.hibernate.validator.constraints.NotEmpty; | |||||
@Data | |||||
@ApiModel(value = "卡交易查询请求对象") | |||||
public class CardTradeQueryRequest { | |||||
@NotEmpty(message = "支付单编号不可为空") | |||||
@ApiModelProperty(name = "outTradeId", value = "支付单编号", dataType = "String", example = "xxxxxxxxxx", required = true) | |||||
private String outTradeId; | |||||
} |
@@ -0,0 +1,35 @@ | |||||
package com.neusoft.smart.pos.dto.card.request; | |||||
import io.swagger.annotations.ApiModel; | |||||
import io.swagger.annotations.ApiModelProperty; | |||||
import lombok.Data; | |||||
import org.hibernate.validator.constraints.NotEmpty; | |||||
import javax.validation.constraints.DecimalMax; | |||||
import javax.validation.constraints.NotNull; | |||||
import java.math.BigDecimal; | |||||
import java.util.Date; | |||||
@Data | |||||
@ApiModel(value = "卡支付退款请求对象") | |||||
public class CardTradeRefundRequest { | |||||
@NotEmpty(message = "平台支付单编号不可为空") | |||||
@ApiModelProperty(name = "outTradeId", value = "平台支付单编号", dataType = "String", example = "xxxxxxxxxx", required = true) | |||||
private String outTradeId; | |||||
@NotEmpty(message = "平台退款订单编号不可为空") | |||||
@ApiModelProperty(name = "outRefundNumber", value = "平台退款订单编号", dataType = "String", example = "xxxxxxxxxx", required = true) | |||||
private String outRefundNumber; | |||||
@NotEmpty(message = "卡交易流水号不可为空") | |||||
@ApiModelProperty(name = "cardTradeNum", value = "卡交易流水号", dataType = "String", example = "xxxxxxxxxx", required = true) | |||||
private String cardTradeNum; | |||||
@NotNull(message = "退款金额不可为空") | |||||
@ApiModelProperty(name = "refundAmount", value = "退款金额", dataType = "Long", example = "123", required = true) | |||||
private Long refundAmount; | |||||
// private String refundUser; | |||||
} |
@@ -0,0 +1,16 @@ | |||||
package com.neusoft.smart.pos.dto.card.request; | |||||
import io.swagger.annotations.ApiModel; | |||||
import io.swagger.annotations.ApiModelProperty; | |||||
import lombok.Data; | |||||
import org.hibernate.validator.constraints.NotEmpty; | |||||
@Data | |||||
@ApiModel(value = "卡交易撤销请求对象") | |||||
public class CardTradeReverseRequest { | |||||
@NotEmpty(message = "支付单编号不可为空") | |||||
@ApiModelProperty(name = "outTradeId", value = "支付单编号", dataType = "String", example = "xxxxxxxxxx", required = true) | |||||
private String outTradeId; | |||||
} |
@@ -0,0 +1,17 @@ | |||||
package com.neusoft.smart.pos.dto.card.request; | |||||
import io.swagger.annotations.ApiModel; | |||||
import io.swagger.annotations.ApiModelProperty; | |||||
import lombok.Data; | |||||
import javax.validation.constraints.NotNull; | |||||
import java.util.Date; | |||||
@Data | |||||
@ApiModel | |||||
public class DeactivateCardRequest { | |||||
@NotNull(message = "cardId is required") | |||||
@ApiModelProperty(name = "cardId", value = "卡ID", dataType = "Integer", example = "125") | |||||
private Integer cardId; | |||||
} |
@@ -0,0 +1,31 @@ | |||||
package com.neusoft.smart.pos.dto.card.request; | |||||
import io.swagger.annotations.ApiModel; | |||||
import io.swagger.annotations.ApiModelProperty; | |||||
import lombok.Data; | |||||
import org.hibernate.validator.constraints.NotEmpty; | |||||
import javax.validation.constraints.Max; | |||||
import javax.validation.constraints.Min; | |||||
import javax.validation.constraints.NotNull; | |||||
@Data | |||||
@ApiModel(value = "会员卡积分核销请求对象") | |||||
public class MemberPointWriteOffRequest { | |||||
@ApiModelProperty(name = "cardNum", value = "卡号", dataType = "String", example = "123546798") | |||||
private String cardNum; | |||||
@ApiModelProperty(name = "memberId", value = "会员Id", dataType = "Integer", example = "2") | |||||
private Integer memberId; | |||||
@ApiModelProperty(name = "cardOtherId", value = "卡其他识别ID", dataType = "String", example = "123546798") | |||||
private String cardOtherId; | |||||
@NotNull(message = "核销会员积分不可为空") | |||||
@ApiModelProperty(name = "writeOffPoint", value = "核销会员积分", dataType = "Integer", example = "123", required = true) | |||||
@Max(value = 999999, message = "核销会员积分不可大于999999") | |||||
@Min(value = 1, message = "核销会员积分必须大于1") | |||||
private Integer writeOffPoint; | |||||
} |
@@ -0,0 +1,70 @@ | |||||
package com.neusoft.smart.pos.dto.card.request; | |||||
import io.swagger.annotations.ApiModel; | |||||
import io.swagger.annotations.ApiModelProperty; | |||||
import lombok.Data; | |||||
import org.hibernate.validator.constraints.NotEmpty; | |||||
import javax.validation.constraints.NotNull; | |||||
import java.util.Date; | |||||
@Data | |||||
@ApiModel | |||||
public class PosActivateCardRequest { | |||||
@ApiModelProperty(name = "snCode", value = "设备SN", dataType = "String", example = "21554560") | |||||
private String snCode; | |||||
@NotNull(message = "cardType is required") | |||||
@ApiModelProperty(name = "cardType", value = "卡类型:1:会员卡 2:储值卡 3:礼品卡", dataType = "int", example = "0", required = true) | |||||
private int cardType; | |||||
@NotNull(message = "beanName is required") | |||||
@ApiModelProperty(name = "beanName", value = "卡关联关系查询Bean名称", dataType = "String", example = "defaultCardRelationRepository", required = true) | |||||
private String beanName; | |||||
@ApiModelProperty(name = "rechargeStrategyParam", value = "充值策略参数", dataType = "String", example = "1", required = true) | |||||
private String rechargeStrategyParam; | |||||
@ApiModelProperty(name = "pointStrategyParam", value = "积分策略参数", dataType = "String", example = "1", required = true) | |||||
private String pointStrategyParam; | |||||
@ApiModelProperty(name = "cardNum", value = "卡号", dataType = "String", example = "12225845") | |||||
private String cardNum; | |||||
@ApiModelProperty(name = "cardAnotherId", value = "卡识别号2", dataType = "String", example = "12225845") | |||||
private String cardAnotherId; | |||||
@ApiModelProperty(name = "cardOtherId", value = "卡其他识别号", dataType = "String", example = "12225845") | |||||
private String cardOtherId; | |||||
@ApiModelProperty(name = "needPassword", value = "是否需要卡密码@0不需要 @1需要,默认值0", dataType = "String", example = "1") | |||||
private String needPassword = "0"; | |||||
@ApiModelProperty(name = "cardPassword", value = "卡密码", dataType = "String", example = "12225845") | |||||
private String cardPassword="123456"; | |||||
@ApiModelProperty(name = "cardImage", value = "卡图片地址", dataType = "String", example = "http://xxx") | |||||
private String cardImage; | |||||
// 以下为会员信息:如果卡类型为会员卡,则name字段不能为空 | |||||
private String name; | |||||
private String mobile; | |||||
private String memberEmail; | |||||
private String memberCode; | |||||
private Integer memberType; | |||||
private Date birthday; | |||||
private Integer gender; | |||||
private String address; | |||||
private String avatar; | |||||
private String content; | |||||
} |
@@ -0,0 +1,42 @@ | |||||
package com.neusoft.smart.pos.dto.card.request; | |||||
import io.swagger.annotations.ApiModel; | |||||
import io.swagger.annotations.ApiModelProperty; | |||||
import lombok.Data; | |||||
import org.hibernate.validator.constraints.NotEmpty; | |||||
import javax.validation.constraints.DecimalMax; | |||||
import javax.validation.constraints.NotNull; | |||||
import java.math.BigDecimal; | |||||
import java.util.Date; | |||||
@Data | |||||
@ApiModel(value = "卡充值请求对象") | |||||
public class RechargeRequest { | |||||
@ApiModelProperty(name = "cardNum", value = "卡号", dataType = "String", example = "123546798") | |||||
private String cardNum; | |||||
@ApiModelProperty(name = "cardAnotherId", value = "卡Id2", dataType = "String", example = "2") | |||||
private String cardAnotherId; | |||||
@ApiModelProperty(name = "cardOtherId", value = "卡其他识别ID", dataType = "String", example = "123546798") | |||||
private String cardOtherId; | |||||
@NotEmpty(message = "充值订单编号不可为空") | |||||
@ApiModelProperty(name = "outRechargeOrderNo", value = "充值编号", dataType = "String", example = "xxxxxxxxxx", required = true) | |||||
private String outRechargeOrderNo; | |||||
@NotNull(message = "充值金额不可为空") | |||||
@ApiModelProperty(name = "rechargeAmount", value = "充值金额(单位:分)", dataType = "Long", example = "12321", required = true) | |||||
private Long rechargeAmount; | |||||
@ApiModelProperty(name = "rechargeMode", value = "充值支付方式", dataType = "Integer", example = "2") | |||||
private Integer rechargeMode; | |||||
@NotNull(message = "充值时间不可为空") | |||||
@ApiModelProperty(name = "rechargeTime", value = "充值时间", dataType = "Date", example = "2018-04-16 15:20:32", required = true) | |||||
private Date rechargeTime; | |||||
} |
@@ -0,0 +1,48 @@ | |||||
package com.neusoft.smart.pos.dto.card.request; | |||||
import io.swagger.annotations.ApiModel; | |||||
import io.swagger.annotations.ApiModelProperty; | |||||
import lombok.Data; | |||||
import org.hibernate.validator.constraints.NotEmpty; | |||||
import javax.validation.constraints.DecimalMax; | |||||
import javax.validation.constraints.NotNull; | |||||
import java.math.BigDecimal; | |||||
import java.util.Date; | |||||
@Data | |||||
@ApiModel(value = "卡资金转账请求对象") | |||||
public class TransferRequest { | |||||
@ApiModelProperty(name = "sourceCardNum", value = "资金流出方卡号", dataType = "String", example = "123546798") | |||||
private String sourceCardNum; | |||||
@ApiModelProperty(name = "sourceCardAnotherId", value = "资金流出方卡Id2", dataType = "String", example = "2") | |||||
private String sourceCardAnotherId; | |||||
@ApiModelProperty(name = "sourceCardOtherId", value = "资金流出方卡其他识别ID", dataType = "String", example = "123546798") | |||||
private String sourceCardOtherId; | |||||
@ApiModelProperty(name = "targetCardNum", value = "资金流入方卡号", dataType = "String", example = "123546798") | |||||
private String targetCardNum; | |||||
@ApiModelProperty(name = "targetCardAnotherId", value = "资金流入方卡Id2", dataType = "String", example = "2") | |||||
private String targetCardAnotherId; | |||||
@ApiModelProperty(name = "targetCardOtherId", value = "资金流入方卡其他识别ID", dataType = "String", example = "123546798") | |||||
private String targetCardOtherId; | |||||
@NotEmpty(message = "转账订单编号不可为空") | |||||
@ApiModelProperty(name = "outTransferOrderNo", value = "转账订单编号", dataType = "String", example = "xxxxxxxxxx", required = true) | |||||
private String outTransferOrderNo; | |||||
@NotNull(message = "转账金额不可为空") | |||||
@ApiModelProperty(name = "transferAmount", value = "转账金额(单位:分)", dataType = "Long", example = "123", required = true) | |||||
private Long transferAmount; | |||||
@NotNull(message = "转账时间不可为空") | |||||
@ApiModelProperty(name = "transferTime", value = "转账时间", dataType = "Date", example = "2018-04-16 15:20:32", required = true) | |||||
private Date transferTime; | |||||
} |
@@ -0,0 +1,19 @@ | |||||
package com.neusoft.smart.pos.dto.card.response; | |||||
import com.fasterxml.jackson.annotation.JsonFormat; | |||||
import io.swagger.annotations.ApiModel; | |||||
import lombok.Data; | |||||
import java.util.Date; | |||||
@Data | |||||
@ApiModel | |||||
public class CardOrderInfoResponse { | |||||
private String orderNo; | |||||
private Long amount; | |||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") | |||||
protected Date time; | |||||
private String channel; //卡交易状态 | |||||
} |
@@ -0,0 +1,26 @@ | |||||
package com.neusoft.smart.pos.dto.card.response; | |||||
import com.fasterxml.jackson.annotation.JsonFormat; | |||||
import io.swagger.annotations.ApiModel; | |||||
import lombok.Data; | |||||
import java.math.BigDecimal; | |||||
import java.util.Date; | |||||
@Data | |||||
@ApiModel | |||||
public class CardTradeCreateResponse { | |||||
private String outTradeId; //平台支付单编号 | |||||
private String cardTradeNum; //卡交易流水号 | |||||
private Long balance;//余额 | |||||
private Integer point;//积分 | |||||
private String cardNum; // 卡号 | |||||
private String cardAnotherId; // 卡ID2 | |||||
private String cardOtherId; //卡其他ID | |||||
private String payStatus; //卡交易状态 | |||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") | |||||
protected Date payTime; | |||||
} |
@@ -0,0 +1,19 @@ | |||||
package com.neusoft.smart.pos.dto.card.response; | |||||
import com.fasterxml.jackson.annotation.JsonFormat; | |||||
import io.swagger.annotations.ApiModel; | |||||
import lombok.Data; | |||||
import java.util.Date; | |||||
@Data | |||||
@ApiModel | |||||
public class CardTradeQueryResponse { | |||||
private String outTradeId; //平台支付单编号 | |||||
private String cardTradeNum; //卡交易流水号 | |||||
private String payStatus; //卡交易状态 | |||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") | |||||
protected Date payTime; | |||||
} |
@@ -0,0 +1,33 @@ | |||||
package com.neusoft.smart.pos.dto.card.response; | |||||
import com.fasterxml.jackson.annotation.JsonFormat; | |||||
import io.swagger.annotations.ApiModel; | |||||
import io.swagger.annotations.ApiModelProperty; | |||||
import lombok.Data; | |||||
import org.hibernate.validator.constraints.NotEmpty; | |||||
import javax.validation.constraints.DecimalMax; | |||||
import java.math.BigDecimal; | |||||
import java.util.Date; | |||||
@Data | |||||
@ApiModel | |||||
public class CardTradeRefundResponse { | |||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") | |||||
protected Date refundedTime; | |||||
private String cardRefundNum; //卡交易退单流水号 | |||||
@ApiModelProperty(name = "refundAmount", value = "退款金额(单位分)", dataType = "Long", example = "123", required = true) | |||||
private Long refundAmount; | |||||
@NotEmpty(message = "平台支付单编号不可为空") | |||||
@ApiModelProperty(name = "outTradeId", value = "平台支付单编号", dataType = "String", example = "xxxxxxxxxx", required = true) | |||||
private String outTradeId; | |||||
@NotEmpty(message = "平台退款订单编号不可为空") | |||||
@ApiModelProperty(name = "outRefundNumber", value = "平台退款订单编号", dataType = "String", example = "xxxxxxxxxx", required = true) | |||||
private String outRefundNumber; | |||||
} |
@@ -0,0 +1,12 @@ | |||||
package com.neusoft.smart.pos.dto.card.response; | |||||
import io.swagger.annotations.ApiModel; | |||||
import lombok.Data; | |||||
@Data | |||||
@ApiModel | |||||
public class GetBalanceResponse { | |||||
private long balance; | |||||
private String memberName; | |||||
} |
@@ -0,0 +1,14 @@ | |||||
package com.neusoft.smart.pos.dto.card.response; | |||||
import io.swagger.annotations.ApiModel; | |||||
import lombok.Data; | |||||
import java.util.List; | |||||
@Data | |||||
@ApiModel | |||||
public class GetRechargeListResponse { | |||||
private long balance; | |||||
private String memberName; | |||||
private List<CardOrderInfoResponse> rechargeList; | |||||
} |
@@ -0,0 +1,27 @@ | |||||
package com.neusoft.smart.pos.dto.device.request; | |||||
import io.swagger.annotations.ApiModel; | |||||
import io.swagger.annotations.ApiModelProperty; | |||||
import lombok.Data; | |||||
import javax.validation.constraints.NotNull; | |||||
import java.util.List; | |||||
@ApiModel | |||||
@Data | |||||
public class ConfigStrategyGroupRequest { | |||||
@NotNull(message = "配置策略名称不可为空") | |||||
@ApiModelProperty(name = "strategyName", value = "配置策略名称", dataType = "String", example = "abc", required = true) | |||||
private String strategyName; | |||||
@NotNull(message = "设备列表不可为空") | |||||
@ApiModelProperty(name = "deviceList", value = "设备列表", dataType = "List", example = "[]", required = true) | |||||
private List<DeviceRequest> deviceList; | |||||
@NotNull(message = "配置文件列表不可为空") | |||||
@ApiModelProperty(name = "strategyList", value = "配置文件列表", dataType = "List", example = "[]", required = true) | |||||
private List<ConfigStrategyRequest> strategyList; | |||||
private Integer organizationId; | |||||
} |
@@ -0,0 +1,21 @@ | |||||
package com.neusoft.smart.pos.dto.device.request; | |||||
import com.neusoft.smart.pos.dto.AbstractQuery; | |||||
import io.swagger.annotations.ApiModel; | |||||
import lombok.Data; | |||||
@ApiModel | |||||
@Data | |||||
public class ConfigStrategyQueryRequest extends AbstractQuery { | |||||
private String strategyName; | |||||
private String startDate; | |||||
private String endDate; | |||||
private Integer status; | |||||
private Integer organizationId; | |||||
} |
@@ -0,0 +1,24 @@ | |||||
package com.neusoft.smart.pos.dto.device.request; | |||||
import io.swagger.annotations.ApiModel; | |||||
import lombok.Data; | |||||
@ApiModel | |||||
@Data | |||||
public class ConfigStrategyRequest { | |||||
private Integer id; | |||||
private Integer strategyId; | |||||
private Integer deviceId; | |||||
private String configUrl; | |||||
private String configFileName; | |||||
private String configFileCode; | |||||
private Integer status; | |||||
} |
@@ -0,0 +1,46 @@ | |||||
package com.neusoft.smart.pos.dto.device.request; | |||||
import com.neusoft.smart.pos.dto.AbstractQuery; | |||||
import io.swagger.annotations.ApiModel; | |||||
import lombok.Data; | |||||
import java.util.List; | |||||
@ApiModel | |||||
@Data | |||||
public class DeviceQueryRequest extends AbstractQuery { | |||||
private String macAddr; | |||||
private String serialNo; | |||||
private String curVersion; | |||||
private String manufacturer; | |||||
private String region; | |||||
private String department; | |||||
private String customer; | |||||
private String deviceType; | |||||
private String deviceModel; | |||||
private String alias; | |||||
private Integer status; | |||||
private Integer organizationId; | |||||
private List<Integer> ids; | |||||
private List<Integer> storeIds; | |||||
private Boolean excludeDeleted = true; | |||||
private Boolean isStoreUserQueryWithoutStoreId = false; | |||||
} |
@@ -0,0 +1,62 @@ | |||||
package com.neusoft.smart.pos.dto.device.request; | |||||
import io.swagger.annotations.ApiModel; | |||||
import io.swagger.annotations.ApiModelProperty; | |||||
import lombok.Data; | |||||
import org.hibernate.validator.constraints.NotEmpty; | |||||
import javax.validation.constraints.NotNull; | |||||
import java.util.Date; | |||||
@Data | |||||
@ApiModel | |||||
public class DeviceRequest { | |||||
private Integer id; | |||||
@NotEmpty(message = "设备MAC地址不可为空") | |||||
@ApiModelProperty(name = "macAddr", value = "设备MAC地址", dataType = "String", example = "xxxx-xxx-xxx", required = true) | |||||
private String macAddr; | |||||
@NotEmpty(message = "设备序列号不可为空") | |||||
@ApiModelProperty(name = "serialNo", value = "设备序列号", dataType = "String", example = "xxxxxxxxxx", required = true) | |||||
private String serialNo; | |||||
@NotEmpty(message = "设备当前版本不可为空") | |||||
@ApiModelProperty(name = "curVersion", value = "设备当前版本", dataType = "String", example = "1.0.1", required = true) | |||||
private String curVersion; | |||||
private String manufacturer; | |||||
private String region; | |||||
private String department; | |||||
private String customer; | |||||
private String deviceType; | |||||
private String deviceModel; | |||||
private String alias; | |||||
private Integer createdBy; | |||||
private Date createdDate; | |||||
private Integer lastModifiedBy; | |||||
private Date lastModifiedDate; | |||||
private Integer status; | |||||
private String signalStrength; | |||||
private String ipAddress; | |||||
private Date lastRequestTime; | |||||
private Integer organizationId; | |||||
private Integer storeId; | |||||
} |
@@ -0,0 +1,21 @@ | |||||
package com.neusoft.smart.pos.dto.device.request; | |||||
import io.swagger.annotations.ApiModel; | |||||
import io.swagger.annotations.ApiModelProperty; | |||||
import lombok.Data; | |||||
import javax.validation.constraints.NotNull; | |||||
import java.util.List; | |||||
@Data | |||||
@ApiModel | |||||
public class DeviceStatusRequest { | |||||
@NotNull(message = "设备id不可为空") | |||||
@ApiModelProperty(name = "deviceIds", value = "设备id", dataType = "List", example = "[1]", required = true) | |||||
private List<Integer> deviceIds; | |||||
@NotNull(message = "设备状态不可为空") | |||||
@ApiModelProperty(name = "status", value = "设备状态", dataType = "Integer", example = "1", required = true) | |||||
private Integer status; | |||||
} |
@@ -0,0 +1,21 @@ | |||||
package com.neusoft.smart.pos.dto.device.request; | |||||
import io.swagger.annotations.ApiModel; | |||||
import io.swagger.annotations.ApiModelProperty; | |||||
import lombok.Data; | |||||
import javax.validation.constraints.NotNull; | |||||
import java.util.List; | |||||
@Data | |||||
@ApiModel | |||||
public class DeviceStoreRequest { | |||||
// @NotNull(message = "设备id不可为空") | |||||
@ApiModelProperty(name = "deviceIds", value = "设备id", dataType = "List", example = "[1]", required = true) | |||||
private List<Integer> deviceIds; | |||||
@NotNull(message = "门店id不可为空") | |||||
@ApiModelProperty(name = "storeId", value = "门店id", dataType = "Integer", example = "1", required = true) | |||||
private Integer storeId; | |||||
} |
@@ -0,0 +1,18 @@ | |||||
package com.neusoft.smart.pos.dto.device.response; | |||||
import lombok.Data; | |||||
import java.util.List; | |||||
@Data | |||||
public class ConfigStrategyDetailResponse { | |||||
List<DeviceResponse> deviceList; | |||||
List<ConfigStrategyResponse> configStrategyList; | |||||
public ConfigStrategyDetailResponse(List<ConfigStrategyResponse> configStrategyList, List<DeviceResponse> deviceList) { | |||||
this.configStrategyList = configStrategyList; | |||||
this.deviceList = deviceList; | |||||
} | |||||
} |
@@ -0,0 +1,22 @@ | |||||
package com.neusoft.smart.pos.dto.device.response; | |||||
import lombok.Data; | |||||
import java.util.Date; | |||||
@Data | |||||
public class ConfigStrategyGroupResponse { | |||||
private Integer id; | |||||
private String strategyName; | |||||
private Integer createdBy; | |||||
private Date createdDate; | |||||
private Integer organizationId; | |||||
private Integer status; | |||||
} |
@@ -0,0 +1,22 @@ | |||||
package com.neusoft.smart.pos.dto.device.response; | |||||
import lombok.Data; | |||||
@Data | |||||
public class ConfigStrategyResponse { | |||||
private Integer id; | |||||
private Integer strategyId; | |||||
private Integer deviceId; | |||||
private String configUrl; | |||||
private String configFileName; | |||||
private String configFileCode; | |||||
private Integer status; | |||||
} |
@@ -0,0 +1,18 @@ | |||||
package com.neusoft.smart.pos.dto.device.response; | |||||
import com.neusoft.smart.pos.redis.bean.DeviceConfig; | |||||
import io.swagger.annotations.ApiModel; | |||||
import lombok.Data; | |||||
import java.util.List; | |||||
@Data | |||||
@ApiModel("老版配置接口所用,首字母大写的") | |||||
public class DeviceConfigResponse{ | |||||
private Integer St; | |||||
private String Msg; | |||||
private List<DeviceConfig> Config; | |||||
} |
@@ -0,0 +1,53 @@ | |||||
package com.neusoft.smart.pos.dto.device.response; | |||||
import lombok.Data; | |||||
import java.util.Date; | |||||
@Data | |||||
public class DeviceResponse { | |||||
private Integer id; | |||||
private String macAddr; | |||||
private String serialNo; | |||||
private String curVersion; | |||||
private String manufacturer; | |||||
private String region; | |||||
private String department; | |||||
private String customer; | |||||
private String deviceType; | |||||
private String deviceModel; | |||||
private String alias; | |||||
private Integer createdBy; | |||||
private Date createdDate; | |||||
private Integer lastModifiedBy; | |||||
private Date lastModifiedDate; | |||||
private Integer status; | |||||
private String signalStrength; | |||||
private String ipAddress; | |||||
private Date lastRequestTime; | |||||
private Integer organizationId; | |||||
private Integer storeId; | |||||
private String note; | |||||
} |
@@ -0,0 +1,19 @@ | |||||
package com.neusoft.smart.pos.dto.device.response; | |||||
import io.swagger.annotations.ApiModelProperty; | |||||
import lombok.Data; | |||||
import lombok.NoArgsConstructor; | |||||
@Data | |||||
@NoArgsConstructor | |||||
public class GetAppProjectConfigResponse { | |||||
@ApiModelProperty(name = "appId", value = "应用ID", dataType = "String" ,example="121") | |||||
public String appId; | |||||
@ApiModelProperty(name = "projectId", value = "项目ID", dataType = "String" ,example="121") | |||||
public String projectId; | |||||
@ApiModelProperty(name = "paramJson", value = "参数json信息", dataType = "String" ,example="121") | |||||
public String paramJson; | |||||
} |
@@ -0,0 +1,16 @@ | |||||
package com.neusoft.smart.pos.dto.device.response; | |||||
import io.swagger.annotations.ApiModelProperty; | |||||
import lombok.Data; | |||||
import lombok.NoArgsConstructor; | |||||
@Data | |||||
@NoArgsConstructor | |||||
public class GetDeviceAuthLicenceResponse { | |||||
@ApiModelProperty(name = "name", value = "名称", dataType = "String" ,example="121") | |||||
public String name; | |||||
@ApiModelProperty(name = "account", value = "账号", dataType = "String" ,example="121") | |||||
public String account; | |||||
} |
@@ -0,0 +1,25 @@ | |||||
package com.neusoft.smart.pos.dto.fumao.bean; | |||||
import lombok.Data; | |||||
import java.io.Serializable; | |||||
import java.math.BigDecimal; | |||||
@Data | |||||
public class MemberDiscount implements Serializable { | |||||
private String level; | |||||
private Integer sequence; | |||||
private Integer discount; | |||||
private String discount_description; | |||||
private Long order_amount; | |||||
private Long discount_amount; | |||||
private Long order_amount_left; | |||||
private String remain_amount; | |||||
} |
@@ -0,0 +1,10 @@ | |||||
package com.neusoft.smart.pos.dto.fumao.bean; | |||||
import lombok.Data; | |||||
import java.util.Date; | |||||
@Data | |||||
public class NeuInfoBean { | |||||
private String sn; | |||||
} |
@@ -0,0 +1,26 @@ | |||||
package com.neusoft.smart.pos.dto.fumao.bean; | |||||
import lombok.Data; | |||||
import java.util.Date; | |||||
import java.util.List; | |||||
@Data | |||||
public class ParameterforNextStepBean { | |||||
private String actionName; | |||||
private String orderNumber; | |||||
private String totalAmount; | |||||
private String payAmount; | |||||
private String cardId; | |||||
private List<String> payType; | |||||
private List<String> couponList; | |||||
private String scanCode; | |||||
} |
@@ -0,0 +1,23 @@ | |||||
package com.neusoft.smart.pos.dto.fumao.bean; | |||||
import lombok.Data; | |||||
import java.util.Date; | |||||
@Data | |||||
public class ThirdPartyInfoBean { | |||||
private String operatorID; | |||||
private String merchantID; | |||||
private String tenantID; | |||||
private String memberID; | |||||
private String memberPhoneNumber; | |||||
private String token; | |||||
private String businessType; //(0:核销, 1:支付 | |||||
} |
@@ -0,0 +1,35 @@ | |||||
package com.neusoft.smart.pos.dto.fumao.request; | |||||
import com.neusoft.smart.pos.dto.payment.response.FumaoParameterforNextStep; | |||||
import io.swagger.annotations.ApiModel; | |||||
import io.swagger.annotations.ApiModelProperty; | |||||
import lombok.Data; | |||||
import org.hibernate.validator.constraints.NotEmpty; | |||||
import com.neusoft.smart.pos.dto.fumao.bean.NeuInfoBean; | |||||
import com.neusoft.smart.pos.dto.fumao.bean.ParameterforNextStepBean; | |||||
import com.neusoft.smart.pos.dto.fumao.bean.ThirdPartyInfoBean; | |||||
import java.math.BigDecimal; | |||||
import java.util.Date; | |||||
import java.util.List; | |||||
/** | |||||
* @author tjm | |||||
* @date 2019-08-29 10:43 | |||||
* @description 富茂订单新增使用Request | |||||
*/ | |||||
@Data | |||||
@ApiModel | |||||
public class PostFumaoTradeOrderRequest { | |||||
@ApiModelProperty(name = "neuInfo", value = "东软云POS端信息", dataType = "NeuInfo类") | |||||
private NeuInfoBean neuInfo; | |||||
@ApiModelProperty(name = "thirdPartyInfo", value = "三方富茂端信息", dataType = "ThirdPartyInfo类") | |||||
private ThirdPartyInfoBean thirdPartyInfo; | |||||
@ApiModelProperty(name = "parameterforNextStep", value = "请求相关数据", dataType = "String" ,example="ParameterforNextStep类") | |||||
private FumaoParameterforNextStep parameterforNextStep; | |||||
} |
@@ -0,0 +1,29 @@ | |||||
package com.neusoft.smart.pos.dto.inventory.bean; | |||||
import lombok.Data; | |||||
import java.util.Date; | |||||
@Data | |||||
public class LockStorageBean { | |||||
private Integer id; | |||||
private String orderId; | |||||
private Integer goodsId; | |||||
private Integer goodsBatchId; | |||||
private Integer beforeLockCount; | |||||
private Integer lockCount; | |||||
private Date lockTime; | |||||
private Date expireTime; | |||||
private Integer status; | |||||
private Integer version; | |||||
} |
@@ -0,0 +1,25 @@ | |||||
package com.neusoft.smart.pos.dto.inventory.request; | |||||
import io.swagger.annotations.ApiModel; | |||||
import io.swagger.annotations.ApiModelProperty; | |||||
import lombok.Data; | |||||
@Data | |||||
@ApiModel | |||||
abstract public class BaseGetGoodsListRequest { | |||||
@ApiModelProperty(hidden = true) | |||||
protected Integer org; | |||||
@ApiModelProperty(value = "门店id") | |||||
protected Integer store; | |||||
@ApiModelProperty(value = "是否上架 1: 上架 0: 下架") | |||||
protected Integer onSale; | |||||
@ApiModelProperty(value = "offset") | |||||
protected Integer offset; | |||||
@ApiModelProperty(value = "limit") | |||||
protected Integer limit; | |||||
} |
@@ -0,0 +1,54 @@ | |||||
package com.neusoft.smart.pos.dto.inventory.request; | |||||
import io.swagger.annotations.ApiModel; | |||||
import io.swagger.annotations.ApiModelProperty; | |||||
import lombok.Data; | |||||
import javax.validation.constraints.NotNull; | |||||
import java.math.BigDecimal; | |||||
import java.util.List; | |||||
@Data | |||||
@ApiModel | |||||
public class BatchCreateRetailGoodsRequest { | |||||
@ApiModelProperty(value = "门店id") | |||||
private Integer store; | |||||
@NotNull(message = "数据不能为空") | |||||
@ApiModelProperty(value = "创建数据") | |||||
private List<Item> data; | |||||
@Data | |||||
public static class Item { | |||||
@NotNull(message = "条码不能为空") | |||||
@ApiModelProperty(value = "条码", required = true) | |||||
protected String barCode; | |||||
@NotNull(message = "商品名不能为空") | |||||
@ApiModelProperty(value = "商品名称", required = true) | |||||
protected String name; | |||||
@NotNull(message = "商品价格不能为空") | |||||
@ApiModelProperty(value = "商品价格", required = true) | |||||
protected BigDecimal price; | |||||
@NotNull(message = "商品规格不能为空") | |||||
@ApiModelProperty(value = "商品规格", required = true) | |||||
protected String unit; | |||||
@NotNull(message = "商品类别不能为空") | |||||
@ApiModelProperty(value = "商品类别名", required = true) | |||||
protected Integer categoryId; | |||||
@NotNull(message = "是否库存管理不能为空") | |||||
@ApiModelProperty(value = "是否库存管理", required = true) | |||||
private Integer isStock; | |||||
@NotNull(message = "商品规格精度不能为空") | |||||
@ApiModelProperty(value = "商品规格精度", required = true) | |||||
private Integer scale; | |||||
} | |||||
} |
@@ -0,0 +1,29 @@ | |||||
package com.neusoft.smart.pos.dto.inventory.request; | |||||
import io.swagger.annotations.ApiModel; | |||||
import io.swagger.annotations.ApiModelProperty; | |||||
import lombok.Data; | |||||
import javax.validation.constraints.NotNull; | |||||
@Data | |||||
@ApiModel | |||||
public class CreateCategoryRequest { | |||||
@NotNull(message = "类别名称不能为空") | |||||
@ApiModelProperty(value = "类别名称", required = true) | |||||
private String name; | |||||
@NotNull(message = "行业不能为空") | |||||
@ApiModelProperty(value = "行业 餐饮: 1", required = true) | |||||
private byte industry; | |||||
@ApiModelProperty(value = "父类别id") | |||||
private Integer parent; | |||||
@ApiModelProperty(hidden = true) | |||||
private Integer org; | |||||
@ApiModelProperty(value = "门店id") | |||||
private Integer store; | |||||
} |
@@ -0,0 +1,44 @@ | |||||
package com.neusoft.smart.pos.dto.inventory.request; | |||||
import io.swagger.annotations.ApiModel; | |||||
import io.swagger.annotations.ApiModelProperty; | |||||
import lombok.Data; | |||||
import javax.validation.constraints.NotNull; | |||||
import java.util.List; | |||||
@Data | |||||
@ApiModel | |||||
public class CreateMenuRequest { | |||||
@NotNull(message = "菜品名不能为空") | |||||
@ApiModelProperty(value = "菜品名", required = true) | |||||
protected String name; | |||||
@NotNull(message = "菜品价格不能为空") | |||||
@ApiModelProperty(value = "菜品价格", required = true) | |||||
protected Double price; | |||||
@NotNull(message = "菜品类别不能为空") | |||||
@ApiModelProperty(value = "菜品类别", required = true) | |||||
protected Integer category; | |||||
@ApiModelProperty(value = "菜品标签") | |||||
protected List<Integer> tags; | |||||
/*@NotNull(message = "集团id不能为空") | |||||
@ApiModelProperty(value = "集团id", required = true) | |||||
protected Integer org;*/ | |||||
/*@NotNull(message = "门店id不能为空")*/ | |||||
@ApiModelProperty(value = "门店id", required = true) | |||||
protected Integer shop; | |||||
@ApiModelProperty(value = "是否上架 1: 上架 0: 下架") | |||||
protected Byte onSale; | |||||
@ApiModelProperty(value = "图片") | |||||
protected String image; | |||||
protected Integer order; | |||||
} |
@@ -0,0 +1,29 @@ | |||||
package com.neusoft.smart.pos.dto.inventory.request; | |||||
import io.swagger.annotations.ApiModel; | |||||
import io.swagger.annotations.ApiModelProperty; | |||||
import lombok.Data; | |||||
import javax.validation.constraints.NotNull; | |||||
@Data | |||||
@ApiModel | |||||
public class CreateTagRequest { | |||||
@NotNull(message = "标签名称不能为空") | |||||
@ApiModelProperty(value = "标签名称", required = true) | |||||
private String name; | |||||
@NotNull(message = "行业不能为空") | |||||
@ApiModelProperty(value = "行业 餐饮: 1", required = true) | |||||
private Integer industry; | |||||
private Integer org; | |||||
@ApiModelProperty(value = "门店id") | |||||
private Integer shop; | |||||
private Integer type; | |||||
private Integer order; | |||||
} |
@@ -0,0 +1,19 @@ | |||||
package com.neusoft.smart.pos.dto.inventory.request; | |||||
import io.swagger.annotations.ApiModel; | |||||
import lombok.Data; | |||||
import java.util.Date; | |||||
@Data | |||||
@ApiModel | |||||
public class FinancialListRequest { | |||||
private Date startTime; | |||||
private Date endTime; | |||||
private Integer type; | |||||
private Integer mode; | |||||
} |
@@ -0,0 +1,31 @@ | |||||
package com.neusoft.smart.pos.dto.inventory.request; | |||||
import io.swagger.annotations.ApiModel; | |||||
import io.swagger.annotations.ApiModelProperty; | |||||
import lombok.Data; | |||||
import javax.validation.constraints.NotNull; | |||||
@Data | |||||
@ApiModel | |||||
public class GetCategoriesRequest { | |||||
@NotNull | |||||
@ApiModelProperty(value = "是否删除 1:是, 0:否") | |||||
private Integer deleted; | |||||
@ApiModelProperty(value = "预设类别") | |||||
private Integer preset; | |||||
@ApiModelProperty(hidden = true) | |||||
private Integer org; | |||||
@ApiModelProperty(value = "门店id") | |||||
private Integer shop; | |||||
@ApiModelProperty(value = "门店id") | |||||
private Integer store; | |||||
@ApiModelProperty(value = "父类别id") | |||||
private Integer parent; | |||||
} |
@@ -0,0 +1,24 @@ | |||||
package com.neusoft.smart.pos.dto.inventory.request; | |||||
import io.swagger.annotations.ApiModel; | |||||
import io.swagger.annotations.ApiModelProperty; | |||||
import lombok.Data; | |||||
import java.util.List; | |||||
@Data | |||||
@ApiModel | |||||
public class GetRetailGoodsListRequest extends BaseGetGoodsListRequest { | |||||
@ApiModelProperty(value = "条码") | |||||
private String barCode; | |||||
@ApiModelProperty(value = "商品名称") | |||||
private String name; | |||||
@ApiModelProperty(value = "类型id") | |||||
private Integer categoryId; | |||||
@ApiModelProperty(hidden = true) | |||||
private List<Integer> storeIds; | |||||
} |
@@ -0,0 +1,13 @@ | |||||
package com.neusoft.smart.pos.dto.inventory.request; | |||||
import lombok.Data; | |||||
@Data | |||||
public class GetSupplierRequest { | |||||
private String name; | |||||
private Integer status; | |||||
private Integer shopId; | |||||
} |
@@ -0,0 +1,24 @@ | |||||
package com.neusoft.smart.pos.dto.inventory.request; | |||||
import io.swagger.annotations.ApiModel; | |||||
import io.swagger.annotations.ApiModelProperty; | |||||
import lombok.Data; | |||||
import javax.validation.constraints.NotNull; | |||||
@Data | |||||
@ApiModel | |||||
public class GetTagsRequest { | |||||
@ApiModelProperty(value = "集团id") | |||||
private Integer org; | |||||
@ApiModelProperty(value = "门店id") | |||||
private Integer shop; | |||||
@NotNull | |||||
private Integer type; | |||||
@NotNull | |||||
private Integer industry; | |||||
} |
@@ -0,0 +1,10 @@ | |||||
package com.neusoft.smart.pos.dto.inventory.request; | |||||
import com.neusoft.smart.pos.dto.AbstractQuery; | |||||
import lombok.Data; | |||||
@Data | |||||
public class GoodsApprovalQueryRequest extends AbstractQuery { | |||||
private Integer storeId; | |||||
} |
@@ -0,0 +1,29 @@ | |||||
package com.neusoft.smart.pos.dto.inventory.request; | |||||
import io.swagger.annotations.ApiModel; | |||||
import io.swagger.annotations.ApiModelProperty; | |||||
import lombok.Data; | |||||
import org.hibernate.validator.constraints.NotEmpty; | |||||
import javax.validation.constraints.NotNull; | |||||
import java.util.List; | |||||
@Data | |||||
@ApiModel | |||||
public class GoodsApprovalRequest { | |||||
// @NotNull(message = "审批id") | |||||
// @ApiModelProperty(value = "审批id", required = true) | |||||
// private Integer id; | |||||
@NotEmpty(message = "审批id集合不可为空") | |||||
@ApiModelProperty(value = "审批id集合", required = true) | |||||
private List<Integer> ids; | |||||
@NotNull(message = "审批状态不可为空") | |||||
@ApiModelProperty(value = "审批状态 1 通过 2 拒绝", required = true) | |||||
private Integer approvalStatus; | |||||
@ApiModelProperty(value = "审批意见") | |||||
private String opinion; | |||||
} |
@@ -0,0 +1,15 @@ | |||||
package com.neusoft.smart.pos.dto.inventory.request; | |||||
import lombok.Data; | |||||
@Data | |||||
public class InventoryCheckStockDetailRequest { | |||||
private Integer checkId; | |||||
private Integer checkStatus; | |||||
private Integer limit; | |||||
private Integer offset; | |||||
} |
@@ -0,0 +1,13 @@ | |||||
package com.neusoft.smart.pos.dto.inventory.request; | |||||
import lombok.Data; | |||||
@Data | |||||
public class InventoryCheckStockListRequest { | |||||
private Integer shopId; | |||||
private Integer limit; | |||||
private Integer offset; | |||||
} |
@@ -0,0 +1,21 @@ | |||||
package com.neusoft.smart.pos.dto.inventory.request; | |||||
import io.swagger.annotations.ApiModel; | |||||
import lombok.Data; | |||||
@Data | |||||
@ApiModel | |||||
public class InventoryConfigRequest { | |||||
private Integer id; | |||||
private Integer orgId; | |||||
private Integer shopId; | |||||
private Integer isLock; | |||||
private Integer canNegativeStorage; | |||||
private Integer needApproval; | |||||
} |
@@ -0,0 +1,40 @@ | |||||
package com.neusoft.smart.pos.dto.inventory.request; | |||||
import com.neusoft.smart.pos.dto.AbstractQuery; | |||||
import io.swagger.annotations.ApiModelProperty; | |||||
import lombok.Data; | |||||
import java.util.List; | |||||
@Data | |||||
public class InventoryGoodsQueryRequest extends AbstractQuery { | |||||
@ApiModelProperty(value = "菜品名") | |||||
private String name; | |||||
@ApiModelProperty(value = "一维码") | |||||
private String barCode; | |||||
@ApiModelProperty(value = "菜品类别,多个类别以'|'分割") | |||||
private String categories; | |||||
@ApiModelProperty(value = "菜品标签,多个标签以'|'分割") | |||||
private String tags; | |||||
@ApiModelProperty(value = "集团id") | |||||
private Integer orgId; | |||||
@ApiModelProperty(value = "门店id") | |||||
private Integer shopId; | |||||
@ApiModelProperty(value = "门店id集合") | |||||
private List<Integer> shopIds; | |||||
@ApiModelProperty(value = "是否上架 1: 上架 0: 下架") | |||||
private Integer onSale; | |||||
@ApiModelProperty(value = "是否不包含餐位费") | |||||
private Boolean withoutServiceCharge = true; | |||||
private String orderByClause; | |||||
} |
@@ -0,0 +1,11 @@ | |||||
package com.neusoft.smart.pos.dto.inventory.request; | |||||
import io.swagger.annotations.ApiModel; | |||||
import lombok.Data; | |||||
@Data | |||||
@ApiModel | |||||
public class InventoryRequest { | |||||
private Integer goodsId; | |||||
} |
@@ -0,0 +1,32 @@ | |||||
package com.neusoft.smart.pos.dto.inventory.request; | |||||
import lombok.Data; | |||||
import javax.validation.constraints.NotNull; | |||||
@Data | |||||
public class InventoryStoreHistoryRequest { | |||||
@NotNull | |||||
private Integer offset; | |||||
@NotNull | |||||
private Integer limit; | |||||
@NotNull | |||||
private Integer shopId; | |||||
private Boolean isPage; | |||||
private Integer actionDire; | |||||
private String goodsBarCode; | |||||
private String goodsName; | |||||
private String goodsCategory; | |||||
private String startDate; | |||||
private String endDate; | |||||
} |
@@ -0,0 +1,36 @@ | |||||
package com.neusoft.smart.pos.dto.inventory.request; | |||||
import io.swagger.annotations.ApiModelProperty; | |||||
import lombok.Data; | |||||
import javax.validation.constraints.NotNull; | |||||
@Data | |||||
public class InventoryStoreRequest { | |||||
private Integer shopId; | |||||
@NotNull | |||||
private Integer offset; | |||||
@NotNull | |||||
private Integer limit; | |||||
private Boolean isPage; | |||||
private String goodsBarCode; | |||||
private String goodsName; | |||||
private Integer goodsCategory; | |||||
private Integer supplierId; | |||||
private String operator; | |||||
@ApiModelProperty(name = "startDate", value = "开始日期(大于等于)", dataType = "String", example = "2018-05-24") | |||||
private String startDate; | |||||
@ApiModelProperty(name = "endDate", value = "结束日期(小于等于)", dataType = "String", example = "2018-05-24") | |||||
private String endDate; | |||||
} |
@@ -0,0 +1,41 @@ | |||||
package com.neusoft.smart.pos.dto.inventory.request; | |||||
import io.swagger.annotations.ApiModel; | |||||
import io.swagger.annotations.ApiModelProperty; | |||||
import lombok.Data; | |||||
import javax.validation.constraints.NotNull; | |||||
import java.util.List; | |||||
@Data | |||||
@ApiModel | |||||
public class PatchUpdateMenuRequest { | |||||
@NotNull(message = "菜品id不能为空") | |||||
@ApiModelProperty(value = "菜品id") | |||||
private Integer id; | |||||
@ApiModelProperty(value = "菜品名") | |||||
private String name; | |||||
@ApiModelProperty(value = "菜品价格") | |||||
private Double price; | |||||
@ApiModelProperty(value = "菜品类别") | |||||
private Integer category; | |||||
@ApiModelProperty(value = "菜品标签") | |||||
private List<Integer> tags; | |||||
/*@ApiModelProperty(value = "集团id") | |||||
private Integer org;*/ | |||||
@ApiModelProperty(value = "门店id") | |||||
private Integer shop; | |||||
@ApiModelProperty(value = "是否上架 1: 上架 0: 下架") | |||||
private Byte onSale; | |||||
@ApiModelProperty(value = "图片") | |||||
private String image; | |||||
} |
@@ -0,0 +1,16 @@ | |||||
package com.neusoft.smart.pos.dto.inventory.request; | |||||
import io.swagger.annotations.ApiModel; | |||||
import io.swagger.annotations.ApiModelProperty; | |||||
import lombok.Data; | |||||
import javax.validation.constraints.NotNull; | |||||
@Data | |||||
@ApiModel | |||||
public class PosGetMenusRequest { | |||||
@NotNull(message = "sn code不能为空") | |||||
@ApiModelProperty(value = "pos sn code", required = true) | |||||
private String snCode; | |||||
} |
@@ -0,0 +1,55 @@ | |||||
package com.neusoft.smart.pos.dto.inventory.request; | |||||
import io.swagger.annotations.ApiModel; | |||||
import io.swagger.annotations.ApiModelProperty; | |||||
import lombok.Data; | |||||
import javax.validation.constraints.NotNull; | |||||
import java.math.BigDecimal; | |||||
@Data | |||||
@ApiModel | |||||
public class PostInventoryGoodsInfoRequest { | |||||
@ApiModelProperty(value = "条码", required = true) | |||||
protected String barCode; | |||||
@NotNull(message = "商品名不能为空") | |||||
@ApiModelProperty(value = "商品名称", required = true) | |||||
protected String name; | |||||
@NotNull(message = "商品价格不能为空") | |||||
@ApiModelProperty(value = "商品价格", required = true) | |||||
protected BigDecimal price; | |||||
@NotNull(message = "商品规格不能为空") | |||||
@ApiModelProperty(value = "商品规格", required = true) | |||||
protected String unit; | |||||
@NotNull(message = "商品类别不能为空") | |||||
@ApiModelProperty(value = "商品类别", required = true) | |||||
protected Integer categoryId; | |||||
@ApiModelProperty(hidden = true) | |||||
protected Integer org; | |||||
@ApiModelProperty(value = "门店id") | |||||
protected Integer store; | |||||
@ApiModelProperty(value = "是否上架 1: 上架 0: 下架") | |||||
protected Integer onSale; | |||||
private Integer id; | |||||
@NotNull(message = "商品是否需要库存不可以为空") | |||||
@ApiModelProperty(value = "商品是否需要库存", required = true) | |||||
private Integer isStock; | |||||
private Integer scale; | |||||
private String image; | |||||
private Integer priority; | |||||
private Integer isThirdparty; | |||||
} |
@@ -0,0 +1,61 @@ | |||||
package com.neusoft.smart.pos.dto.inventory.request; | |||||
import io.swagger.annotations.ApiModel; | |||||
import io.swagger.annotations.ApiModelProperty; | |||||
import lombok.Data; | |||||
import java.io.Serializable; | |||||
import java.math.BigDecimal; | |||||
import java.util.Date; | |||||
@Data | |||||
@ApiModel | |||||
public class PostInventoryStoreBatchRequest implements Serializable { | |||||
@ApiModelProperty(name = "id", value = "ID", dataType = "Integer", example = "1") | |||||
private Integer id; | |||||
@ApiModelProperty(name = "goodsId", value = "商品ID", dataType = "Integer", required = true, example = "123") | |||||
private Integer goodsId; | |||||
private String goodsName; | |||||
private Integer orgId; | |||||
@ApiModelProperty(name = "shopId", value = "门店ID", dataType = "Integer", required = true, example = "123") | |||||
private Integer shopId; | |||||
@ApiModelProperty(name = "storageNum", value = "入库出库数量", dataType = "BigDecimal", required = true, example = "10.0") | |||||
private BigDecimal storageNum; | |||||
@ApiModelProperty(name = "inPrice", value = "进价", dataType = "BigDecimal", example = "10.5") | |||||
private BigDecimal inPrice; | |||||
@ApiModelProperty(name = "salePrice", value = "售价", dataType = "BigDecimal", example = "10.5") | |||||
private BigDecimal salePrice; | |||||
@ApiModelProperty(name = "supplier", value = "厂家ID", dataType = "Integer", example = "110") | |||||
private Integer supplier; | |||||
@ApiModelProperty(name = "madeDate", value = "生产日期", dataType = "Date", example = "2018-01-01") | |||||
private Date madeDate; | |||||
@ApiModelProperty(name = "qualityDate", value = "过期日期", dataType = "Date", example = "2018-05-01") | |||||
private Date qualityDate; | |||||
@ApiModelProperty(name = "actionType", value = "活动类型", dataType = "String", example = "10") | |||||
private String actionType; | |||||
private Integer actionDire; | |||||
@ApiModelProperty(name = "uniqId", value = "销售/退货/盘点的唯一标识", dataType = "String", example = "201801010101") | |||||
private String uniqId; | |||||
@ApiModelProperty(name = "pulPrice", value = "进价(用于绑定查询到的批次的单价)", dataType = "BigDecimal", example = "10.5") | |||||
private BigDecimal pulPrice; | |||||
@ApiModelProperty(name = "operator", value = "操作人", dataType = "String", example = "aaa") | |||||
private String operator; | |||||
} |
@@ -0,0 +1,25 @@ | |||||
package com.neusoft.smart.pos.dto.inventory.request; | |||||
import lombok.Data; | |||||
@Data | |||||
public class PostSupplierRequest { | |||||
private Integer shopId; | |||||
private Integer id; | |||||
private String name; | |||||
private String telephone; | |||||
private String email; | |||||
private String supplierUser; | |||||
private Integer status; | |||||
private String address; | |||||
private String content; | |||||
} |
@@ -0,0 +1,16 @@ | |||||
package com.neusoft.smart.pos.dto.inventory.request; | |||||
import io.swagger.annotations.ApiModel; | |||||
import io.swagger.annotations.ApiModelProperty; | |||||
import lombok.Data; | |||||
import javax.validation.constraints.NotNull; | |||||
@Data | |||||
@ApiModel | |||||
public class PostUpdateMenuRequest extends CreateMenuRequest { | |||||
@NotNull(message = "菜品id不能为空") | |||||
@ApiModelProperty(value = "菜品id", required = true) | |||||
private Integer id; | |||||
} |
@@ -0,0 +1,56 @@ | |||||
package com.neusoft.smart.pos.dto.inventory.request; | |||||
import io.swagger.annotations.ApiModel; | |||||
import io.swagger.annotations.ApiModelProperty; | |||||
import lombok.Data; | |||||
import javax.validation.constraints.NotNull; | |||||
import javax.validation.constraints.Size; | |||||
import java.math.BigDecimal; | |||||
@Data | |||||
@ApiModel | |||||
public class PutInventoryGoodsInfoRequest { | |||||
@ApiModelProperty(value = "条码") | |||||
@Size(max = 15) | |||||
protected String barCode; | |||||
@ApiModelProperty(value = "商品名称") | |||||
@Size(max = 15) | |||||
protected String name; | |||||
@ApiModelProperty(value = "商品价格") | |||||
protected BigDecimal price; | |||||
@ApiModelProperty(value = "商品规格") | |||||
@Size(max = 8) | |||||
protected String unit; | |||||
@ApiModelProperty(value = "商品类别") | |||||
protected Integer categoryId; | |||||
@ApiModelProperty(hidden = true) | |||||
protected Integer org; | |||||
@ApiModelProperty(value = "门店id") | |||||
protected Integer store; | |||||
@ApiModelProperty(value = "是否上架 1: 上架 0: 下架") | |||||
protected Integer onSale; | |||||
@ApiModelProperty(value = "id") | |||||
@NotNull(message = "id不可为空") | |||||
private Integer id; | |||||
@ApiModelProperty(value = "商品是否需要库存") | |||||
private Integer isStock = 0; | |||||
private Integer scale; | |||||
private String image; | |||||
private Integer priority; | |||||
private Integer isThirdparty; | |||||
} |
@@ -0,0 +1,38 @@ | |||||
package com.neusoft.smart.pos.dto.inventory.request; | |||||
import io.swagger.annotations.ApiModel; | |||||
import io.swagger.annotations.ApiModelProperty; | |||||
import lombok.Data; | |||||
import java.io.Serializable; | |||||
import java.math.BigDecimal; | |||||
@Data | |||||
@ApiModel | |||||
public class PutInventoryStoreBatchRequest implements Serializable { | |||||
@ApiModelProperty(name = "goodsId", value = "商品ID", dataType = "Integer", required = true, example = "123") | |||||
private Integer goodsId; | |||||
@ApiModelProperty(name = "orgId", value = "集团ID", dataType = "Integer", required = true, example = "123") | |||||
private Integer orgId; | |||||
@ApiModelProperty(name = "shopId", value = "门店ID", dataType = "Integer", required = true, example = "123") | |||||
private Integer shopId; | |||||
@ApiModelProperty(name = "storageNum", value = "入库出库数量", dataType = "BigDecimal", required = true, example = "10.0") | |||||
private BigDecimal storageNum; | |||||
@ApiModelProperty(name = "salePrice", value = "售价", dataType = "BigDecimal", example = "10.5") | |||||
private BigDecimal salePrice; | |||||
@ApiModelProperty(name = "supplier", value = "厂家ID", dataType = "Integer", example = "110") | |||||
private Integer supplier; | |||||
@ApiModelProperty(name = "uniqId", value = "销售/退货/盘点的唯一标识", dataType = "String", example = "201801010101") | |||||
private String uniqId; | |||||
@ApiModelProperty(name = "operator", value = "操作人", dataType = "String", example = "aaa") | |||||
private String operator; | |||||
} |
@@ -0,0 +1,11 @@ | |||||
package com.neusoft.smart.pos.dto.inventory.request; | |||||
import lombok.Data; | |||||
@Data | |||||
public class ReorderRequest { | |||||
private Integer id; | |||||
private Integer order; | |||||
} |
@@ -0,0 +1,51 @@ | |||||
package com.neusoft.smart.pos.dto.inventory.request; | |||||
import io.swagger.annotations.ApiModel; | |||||
import io.swagger.annotations.ApiModelProperty; | |||||
import lombok.Data; | |||||
import javax.validation.constraints.NotNull; | |||||
import java.math.BigDecimal; | |||||
import java.util.Date; | |||||
import java.util.List; | |||||
@Data | |||||
@ApiModel | |||||
public class SellAndWarehouseOutRequest { | |||||
@NotNull | |||||
private String orderNum; | |||||
// @NotNull | |||||
// private Date orderExpireTime; | |||||
@NotNull | |||||
private Integer orgId; | |||||
@NotNull | |||||
private Integer shopId; | |||||
@NotNull | |||||
private List<OrderItem> orderItems; | |||||
@Data | |||||
public static class OrderItem { | |||||
@ApiModelProperty(name = "goodsId", value = "商品ID", dataType = "Integer", required = true, example = "123") | |||||
private Integer goodsId; | |||||
@ApiModelProperty(name = "orgId", value = "集团ID", dataType = "Integer", required = true, example = "123") | |||||
private Integer orgId; | |||||
@ApiModelProperty(name = "shopId", value = "门店ID", dataType = "Integer", required = true, example = "123") | |||||
private Integer shopId; | |||||
@ApiModelProperty(name = "storageNum", value = "售卖数量(计算后,非原始)", dataType = "BigDecimal", required = true, example = "10.0") | |||||
private BigDecimal storageNum; | |||||
@ApiModelProperty(name = "scale", value = "精度", dataType = "Integer", required = true, example = "2") | |||||
private Integer scale = 0; | |||||
} | |||||
} |
@@ -0,0 +1,25 @@ | |||||
package com.neusoft.smart.pos.dto.inventory.request; | |||||
import io.swagger.annotations.ApiModel; | |||||
import io.swagger.annotations.ApiModelProperty; | |||||
import lombok.Data; | |||||
import javax.validation.constraints.NotNull; | |||||
@Data | |||||
@ApiModel | |||||
public class UpdateCategoryRequest { | |||||
@ApiModelProperty(value = "类别名称", required = true) | |||||
private String name; | |||||
@NotNull(message = "行业不能为空") | |||||
@ApiModelProperty(value = "行业 餐饮: 1", required = true) | |||||
private byte industry; | |||||
@ApiModelProperty(value = "门店id") | |||||
private Integer store; | |||||
@ApiModelProperty(value = "父类别id") | |||||
private Integer parent; | |||||
} |
@@ -0,0 +1,24 @@ | |||||
package com.neusoft.smart.pos.dto.inventory.request; | |||||
import io.swagger.annotations.ApiModel; | |||||
import io.swagger.annotations.ApiModelProperty; | |||||
import lombok.Data; | |||||
import javax.validation.constraints.NotNull; | |||||
@Data | |||||
@ApiModel | |||||
public class UpdateTagRequest { | |||||
@ApiModelProperty(value = "类别名称", required = true) | |||||
private String name; | |||||
@ApiModelProperty(value = "门店id") | |||||
private Integer shop; | |||||
@NotNull(message = "行业不能为空") | |||||
@ApiModelProperty(value = "行业 餐饮: 1", required = true) | |||||
private Integer industry; | |||||
private Integer type; | |||||
} |
@@ -0,0 +1,50 @@ | |||||
package com.neusoft.smart.pos.dto.inventory.response; | |||||
import io.swagger.annotations.ApiModel; | |||||
import io.swagger.annotations.ApiModelProperty; | |||||
import lombok.Data; | |||||
import java.math.BigDecimal; | |||||
@ApiModel | |||||
@Data | |||||
public abstract class BaseMenuResponse { | |||||
@ApiModelProperty(value = "菜品id") | |||||
protected Integer id; | |||||
@ApiModelProperty(value = "菜品名") | |||||
protected String name; | |||||
@ApiModelProperty(value = "菜品价格") | |||||
protected BigDecimal price; | |||||
@ApiModelProperty(value = "菜品类别id") | |||||
protected Integer category; | |||||
@ApiModelProperty(value = "集团id") | |||||
protected Integer org; | |||||
@ApiModelProperty(value = "门店id") | |||||
protected Integer shop; | |||||
@ApiModelProperty(value = "菜品是否上架 1: 上架 0: 下架") | |||||
protected Integer onSale; | |||||
@ApiModelProperty(value = "图片") | |||||
protected String image; | |||||
public BaseMenuResponse(InventoryGoodsResponse goodsMenu) { | |||||
id = goodsMenu.getId(); | |||||
name = goodsMenu.getName(); | |||||
price = goodsMenu.getPrice(); | |||||
category = goodsMenu.getCateId(); | |||||
org = goodsMenu.getOrgId(); | |||||
shop = goodsMenu.getShopId(); | |||||
onSale = goodsMenu.getOnSale(); | |||||
image = goodsMenu.getImage(); | |||||
} | |||||
public BaseMenuResponse() { | |||||
} | |||||
} |
@@ -0,0 +1,35 @@ | |||||
package com.neusoft.smart.pos.dto.inventory.response; | |||||
import io.swagger.annotations.ApiModel; | |||||
import io.swagger.annotations.ApiModelProperty; | |||||
import lombok.Data; | |||||
@ApiModel | |||||
@Data | |||||
public class CategoryResponse { | |||||
@ApiModelProperty(value = "类别id") | |||||
private Integer id; | |||||
@ApiModelProperty(value = "父类别id") | |||||
private Integer parent; | |||||
@ApiModelProperty(value = "类别名称") | |||||
private String name; | |||||
@ApiModelProperty(value = "商品类型") | |||||
private Integer industry; | |||||
@ApiModelProperty(value = "集团id") | |||||
private Integer org; | |||||
@ApiModelProperty(value = "门店id") | |||||
private Integer shop; | |||||
@ApiModelProperty(value = "门店id") | |||||
private Integer store; | |||||
@ApiModelProperty(value = "排序") | |||||
private Integer order; | |||||
} |
@@ -0,0 +1,24 @@ | |||||
package com.neusoft.smart.pos.dto.inventory.response; | |||||
import io.swagger.annotations.ApiModel; | |||||
import io.swagger.annotations.ApiModelProperty; | |||||
import lombok.Data; | |||||
import java.util.Map; | |||||
@ApiModel | |||||
@Data | |||||
public class FullMenuResponse extends BaseMenuResponse { | |||||
@ApiModelProperty(value = "类别名称") | |||||
private String cateName; | |||||
@ApiModelProperty(value = "菜品标签 id => name") | |||||
private Map<Integer, String> tags; | |||||
public FullMenuResponse(InventoryGoodsResponse goodsMenu, Map<Integer, String> tags) { | |||||
super(goodsMenu); | |||||
cateName = goodsMenu.getCateName(); | |||||
this.tags = tags; | |||||
} | |||||
} |
@@ -0,0 +1,33 @@ | |||||
package com.neusoft.smart.pos.dto.inventory.response; | |||||
import lombok.Data; | |||||
import java.util.Date; | |||||
@Data | |||||
public class GoodsApprovalOpinionResponse { | |||||
private Integer id; | |||||
private Integer goodsId; | |||||
private Integer approvalStatus; | |||||
private String opinion; | |||||
private Integer approvalType; | |||||
private Date createTime; | |||||
private Integer createBy; | |||||
private Integer orgId; | |||||
private Integer storeId; | |||||
private String requestData; | |||||
private String originalData; | |||||
} |
@@ -0,0 +1,18 @@ | |||||
package com.neusoft.smart.pos.dto.inventory.response; | |||||
import io.swagger.annotations.ApiModel; | |||||
import io.swagger.annotations.ApiModelProperty; | |||||
import lombok.Data; | |||||
import java.util.List; | |||||
@ApiModel | |||||
@Data | |||||
public class GoodsListResponse<T> { | |||||
@ApiModelProperty(value = "总数") | |||||
private Integer total; | |||||
@ApiModelProperty(value = "商品列表") | |||||
private List<T> data; | |||||
} |
@@ -0,0 +1,31 @@ | |||||
package com.neusoft.smart.pos.dto.inventory.response; | |||||
import io.swagger.annotations.ApiModel; | |||||
import io.swagger.annotations.ApiModelProperty; | |||||
import lombok.Data; | |||||
import java.util.ArrayList; | |||||
import java.util.List; | |||||
@ApiModel | |||||
@Data | |||||
public class InventoryCategoryTreeResponse { | |||||
private Integer id; | |||||
private Integer parentId; | |||||
private String name; | |||||
private Integer orgId; | |||||
private Integer shopId; | |||||
private Integer deleted; | |||||
private Integer priority; | |||||
@ApiModelProperty(value = "子类别集合") | |||||
private List<InventoryCategoryTreeResponse> children = new ArrayList<>(); | |||||
} |
@@ -0,0 +1,17 @@ | |||||
package com.neusoft.smart.pos.dto.inventory.response; | |||||
import io.swagger.annotations.ApiModel; | |||||
import lombok.Data; | |||||
@Data | |||||
@ApiModel | |||||
public class InventoryCheckBillDetailResponse { | |||||
private Integer goodsId; | |||||
private Integer checkId; | |||||
private Integer recordNum; | |||||
private Integer realNum; | |||||
} |
@@ -0,0 +1,21 @@ | |||||
package com.neusoft.smart.pos.dto.inventory.response; | |||||
import io.swagger.annotations.ApiModel; | |||||
import lombok.Data; | |||||
import java.util.Date; | |||||
@Data | |||||
@ApiModel | |||||
public class InventoryCheckBillResponse { | |||||
private Integer id; | |||||
private String checkNum; | |||||
private String checkUser; | |||||
private Date checkTime; | |||||
private Integer status; | |||||
} |
@@ -0,0 +1,38 @@ | |||||
package com.neusoft.smart.pos.dto.inventory.response; | |||||
import lombok.Data; | |||||
import java.math.BigDecimal; | |||||
import java.util.List; | |||||
@Data | |||||
public class InventoryCheckStockDetailResponse { | |||||
private Integer total; | |||||
private List<Entry> data; | |||||
@Data | |||||
public static class Entry { | |||||
private Integer id; | |||||
private String goodsBarCode; | |||||
private String goodsName; | |||||
private String goodsCategory; | |||||
private String supplier; | |||||
private String goodsUnit; | |||||
private BigDecimal stockNum; | |||||
private BigDecimal checkNum; | |||||
private BigDecimal diffNum; | |||||
private String remark; | |||||
} | |||||
} |
@@ -0,0 +1,26 @@ | |||||
package com.neusoft.smart.pos.dto.inventory.response; | |||||
import com.fasterxml.jackson.annotation.JsonFormat; | |||||
import lombok.Data; | |||||
import java.util.Date; | |||||
import java.util.List; | |||||
@Data | |||||
public class InventoryCheckStockListResponse { | |||||
private Integer total; | |||||
private List<Entry> data; | |||||
@Data | |||||
public static class Entry { | |||||
private Integer id; | |||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") | |||||
private Date time; | |||||
private String operator; | |||||
} | |||||
} |
@@ -0,0 +1,13 @@ | |||||
package com.neusoft.smart.pos.dto.inventory.response; | |||||
import lombok.Data; | |||||
@Data | |||||
public class InventoryCheckStockSummaryResponse { | |||||
private Integer win; | |||||
private Integer loss; | |||||
private Integer normal; | |||||
} |
@@ -0,0 +1,68 @@ | |||||
package com.neusoft.smart.pos.dto.inventory.response; | |||||
import java.io.Serializable; | |||||
public class InventoryGoodsConfigResponse implements Serializable { | |||||
private static final long serialVersionUID = 1L; | |||||
private Integer id; | |||||
private Integer orgId; | |||||
private Integer shopId; | |||||
private Integer isLock; | |||||
private Integer canNegativeStorage; | |||||
private Integer needApproval; | |||||
public Integer getId() { | |||||
return id; | |||||
} | |||||
public void setId(Integer id) { | |||||
this.id = id; | |||||
} | |||||
public Integer getOrgId() { | |||||
return orgId; | |||||
} | |||||
public void setOrgId(Integer orgId) { | |||||
this.orgId = orgId; | |||||
} | |||||
public Integer getShopId() { | |||||
return shopId; | |||||
} | |||||
public void setShopId(Integer shopId) { | |||||
this.shopId = shopId; | |||||
} | |||||
public Integer getIsLock() { | |||||
return isLock; | |||||
} | |||||
public void setIsLock(Integer isLock) { | |||||
this.isLock = isLock; | |||||
} | |||||
public Integer getCanNegativeStorage() { | |||||
return canNegativeStorage; | |||||
} | |||||
public void setCanNegativeStorage(Integer canNegativeStorage) { | |||||
this.canNegativeStorage = canNegativeStorage; | |||||
} | |||||
public Integer getNeedApproval() { | |||||
return needApproval; | |||||
} | |||||
public void setNeedApproval(Integer needApproval) { | |||||
this.needApproval = needApproval; | |||||
} | |||||
} |
@@ -0,0 +1,58 @@ | |||||
package com.neusoft.smart.pos.dto.inventory.response; | |||||
import io.swagger.annotations.ApiModelProperty; | |||||
import lombok.Data; | |||||
import java.math.BigDecimal; | |||||
import java.util.Date; | |||||
import java.util.Map; | |||||
@Data | |||||
public class InventoryGoodsResponse { | |||||
private Integer id; | |||||
private String name; | |||||
private String barCode; | |||||
private String unit; | |||||
private Integer scale; | |||||
private BigDecimal price; | |||||
private String image; | |||||
private Integer onSale; | |||||
private Integer orgId; | |||||
private Integer shopId; | |||||
private Integer cateId; | |||||
private Integer deleted; | |||||
private Integer isStock; | |||||
private String isStockStr; | |||||
private Integer priority; | |||||
private Integer isThirdparty; | |||||
private Date createdTime; | |||||
private Integer createdBy; | |||||
private Date updatedTime; | |||||
private Integer updatedBy; | |||||
@ApiModelProperty(value = "类别名称") | |||||
private String cateName; | |||||
@ApiModelProperty(value = "菜品标签 id => name") | |||||
private Map<Integer, String> tags; | |||||
} |