Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gs1-office-web-sit
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
吴迪
gs1-office-web-sit
Commits
4edf0d90
Commit
4edf0d90
authored
Dec 10, 2021
by
rongkailun
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
1a3886a3
2956ec2f
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
684 additions
and
26 deletions
+684
-26
pom.xml
pom.xml
+35
-0
BarcodeController.java
...o/office/modules/manage/controller/BarcodeController.java
+0
-0
BarcodeGenerationController.java
...odules/manage/controller/BarcodeGenerationController.java
+62
-0
BikefirmController.java
.../office/modules/manage/controller/BikefirmController.java
+27
-22
ProductController.java
...o/office/modules/manage/controller/ProductController.java
+3
-0
UserFunctionBindingController.java
...ules/manage/controller/UserFunctionBindingController.java
+7
-0
MemberDao.java
src/main/java/io/office/modules/manage/dao/MemberDao.java
+4
-1
QRcodeDao.java
src/main/java/io/office/modules/manage/dao/QRcodeDao.java
+13
-0
GS1CodeListEntity.java
...va/io/office/modules/manage/entity/GS1CodeListEntity.java
+68
-0
BarcodeGenerationService.java
...fice/modules/manage/service/BarcodeGenerationService.java
+21
-0
BarcodeGenerationServiceImpl.java
...les/manage/service/impl/BarcodeGenerationServiceImpl.java
+42
-0
LogLoginServiceImpl.java
...fice/modules/manage/service/impl/LogLoginServiceImpl.java
+36
-1
MemberServiceImpl.java
...office/modules/manage/service/impl/MemberServiceImpl.java
+5
-2
CheckAICodeUtil.java
.../java/io/office/modules/manage/utils/CheckAICodeUtil.java
+59
-0
CheckAIVo.java
...n/java/io/office/modules/manage/vo/request/CheckAIVo.java
+26
-0
MANIFEST.MF
...s/lib/barcode4j-light-2.2.0-SNAPSHOT/META-INF/MANIFEST.MF
+5
-0
pom.properties
...INF/maven/net.sf.barcode4j/barcode4j-light/pom.properties
+7
-0
pom.xml
...T/META-INF/maven/net.sf.barcode4j/barcode4j-light/pom.xml
+39
-0
org.krysalis.barcode4j.BarcodeGenerator
...META-INF/services/org.krysalis.barcode4j.BarcodeGenerator
+16
-0
EAN128AIs.properties
.../org/krysalis/barcode4j/impl/code128/EAN128AIs.properties
+126
-0
usps-4bc-bar-to-character-table.csv
...code4j/impl/fourstate/usps-4bc-bar-to-character-table.csv
+65
-0
OCR-B 10 BT.ttf
...SHOT/org/krysalis/barcode4j/output/java2d/OCR-B 10 BT.ttf
+0
-0
QRcodeDao.xml
src/main/resources/mapper/manage/QRcodeDao.xml
+18
-0
No files found.
pom.xml
View file @
4edf0d90
...
...
@@ -272,6 +272,41 @@
<version>
1.4.7
</version>
</dependency>
<dependency>
<groupId>
org.apache.commons
</groupId>
<artifactId>
commons-lang3
</artifactId>
<version>
3.5
</version>
</dependency>
<dependency>
<groupId>
code
</groupId>
<artifactId>
code
</artifactId>
<version>
1.1
</version>
<scope>
system
</scope>
<systemPath>
${project.basedir}/src/main/resources/lib/code.jar
</systemPath>
</dependency>
<dependency>
<groupId>
barcode4j-2.2.0-SNAPSHOT
</groupId>
<artifactId>
barcode4j-2.2.0-SNAPSHOT
</artifactId>
<version>
1.1
</version>
<scope>
system
</scope>
<systemPath>
${project.basedir}/src/main/resources/lib/barcode4j-2.2.0-SNAPSHOT.jar
</systemPath>
</dependency>
<dependency>
<groupId>
barcode4j-light-2.2.0-SNAPSHOT
</groupId>
<artifactId>
barcode4j-light-2.2.0-SNAPSHOT
</artifactId>
<version>
1.1
</version>
<scope>
system
</scope>
<systemPath>
${project.basedir}/src/main/resources/lib/barcode4j-light-2.2.0-SNAPSHOT.jar
</systemPath>
</dependency>
<dependency>
<groupId>
barcode4j-spi-2.2.0-SNAPSHOT
</groupId>
<artifactId>
barcode4j-spi-2.2.0-SNAPSHOT
</artifactId>
<version>
1.1
</version>
<scope>
system
</scope>
<systemPath>
${project.basedir}/src/main/resources/lib/barcode4j-spi-2.2.0-SNAPSHOT.jar
</systemPath>
</dependency>
</dependencies>
<build>
...
...
src/main/java/io/office/modules/manage/controller/BarcodeController.java
0 → 100644
View file @
4edf0d90
This diff is collapsed.
Click to expand it.
src/main/java/io/office/modules/manage/controller/BarcodeGenerationController.java
0 → 100644
View file @
4edf0d90
package
io
.
office
.
modules
.
manage
.
controller
;
import
io.office.common.utils.R
;
import
io.office.modules.app.annotation.Login
;
import
io.office.modules.manage.entity.GS1CodeListEntity
;
import
io.office.modules.manage.service.BarcodeGenerationService
;
import
io.office.modules.manage.utils.CheckAICodeUtil
;
import
io.office.modules.manage.vo.request.CheckAIVo
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiParam
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
javax.validation.Valid
;
import
java.util.List
;
import
java.util.Map
;
/**
* ${条码生成}
*
* @author zyf
* @email
* @date 2021-12-09 15:26:10
*/
@RestController
@RequestMapping
(
"/barcodegeneration"
)
public
class
BarcodeGenerationController
{
@Autowired
private
BarcodeGenerationService
barcodeGenerationService
;
/**
* 条码生成
* @param param 条码内容
* @return pictureUrl 获取条形码地址
*/
@Login
@PostMapping
(
"/api/createQRcode"
)
public
R
createQRcode
(
@RequestBody
Map
<
String
,
String
>
param
)
{
String
url
=
this
.
barcodeGenerationService
.
createPicture
(
param
.
get
(
"content"
));
return
R
.
ok
().
put
(
"pictureUrl"
,
url
);
}
@Login
@ApiOperation
(
value
=
"SSCC方式获取GS1 AI标识符列表"
,
response
=
GS1CodeListEntity
.
class
)
@PostMapping
(
"/api/getGS1CodeListSSCC"
)
public
R
getGS1CodeListSSCC
()
{
List
<
GS1CodeListEntity
>
ais
=
barcodeGenerationService
.
getGS1CodeListSSCC
();
return
R
.
ok
().
put
(
"ais"
,
ais
);
}
@Login
@ApiOperation
(
value
=
"GRAI方式获取GS1 AI标识符"
,
response
=
GS1CodeListEntity
.
class
)
@PostMapping
(
"/api/getGS1CodeListGRAI"
)
public
R
getGS1CodeListGRAI
()
{
GS1CodeListEntity
ai
=
barcodeGenerationService
.
getGS1CodeListGRAI
();
return
R
.
ok
().
put
(
"ai"
,
ai
);
}
@Login
@ApiOperation
(
value
=
"校验GS1 AI标识符"
)
@PostMapping
(
"/api/checkGS1Code"
)
public
R
checkGS1Code
(
@ApiParam
(
required
=
true
)
@Valid
@RequestBody
CheckAIVo
body
)
{
String
result
=
CheckAICodeUtil
.
ckeckCode
(
body
.
getCode
(),
body
.
getContent
());
return
R
.
ok
().
put
(
"result"
,
result
);
}
}
src/main/java/io/office/modules/manage/controller/BikefirmController.java
View file @
4edf0d90
package
io
.
office
.
modules
.
manage
.
controller
;
import
java.math.BigDecimal
;
import
java.util.Arrays
;
import
java.util.Date
;
import
java.util.Map
;
...
...
@@ -28,7 +29,7 @@ import javax.servlet.http.HttpServletRequest;
* ${comments}
*
* @author wudi
* @email
* @email
* @date 2021-12-01 21:14:01
*/
@RestController
...
...
@@ -46,8 +47,8 @@ public class BikefirmController {
* 列表
*/
@RequestMapping
(
"/list"
)
// @RequiresPermissions("manage:bikefirm:list")
public
R
list
(
@RequestParam
Map
<
String
,
Object
>
params
){
// @RequiresPermissions("manage:bikefirm:list")
public
R
list
(
@RequestParam
Map
<
String
,
Object
>
params
)
{
PageUtils
page
=
bikefirmService
.
queryPage
(
params
);
return
R
.
ok
().
put
(
"page"
,
page
);
...
...
@@ -58,9 +59,9 @@ public class BikefirmController {
* 信息
*/
@RequestMapping
(
"/info/{id}"
)
// @RequiresPermissions("manage:bikefirm:info")
public
R
info
(
@PathVariable
(
"id"
)
Integer
id
){
BikefirmEntity
bikefirm
=
bikefirmService
.
getById
(
id
);
// @RequiresPermissions("manage:bikefirm:info")
public
R
info
(
@PathVariable
(
"id"
)
Integer
id
)
{
BikefirmEntity
bikefirm
=
bikefirmService
.
getById
(
id
);
return
R
.
ok
().
put
(
"bikefirm"
,
bikefirm
);
}
...
...
@@ -69,9 +70,9 @@ public class BikefirmController {
* 保存
*/
@RequestMapping
(
"/save"
)
// @RequiresPermissions("manage:bikefirm:save")
public
R
save
(
@RequestBody
BikefirmEntity
bikefirm
){
bikefirmService
.
save
(
bikefirm
);
// @RequiresPermissions("manage:bikefirm:save")
public
R
save
(
@RequestBody
BikefirmEntity
bikefirm
)
{
bikefirmService
.
save
(
bikefirm
);
return
R
.
ok
();
}
...
...
@@ -80,9 +81,9 @@ public class BikefirmController {
* 修改
*/
@RequestMapping
(
"/update"
)
// @RequiresPermissions("manage:bikefirm:update")
public
R
update
(
@RequestBody
BikefirmEntity
bikefirm
){
bikefirmService
.
updateById
(
bikefirm
);
// @RequiresPermissions("manage:bikefirm:update")
public
R
update
(
@RequestBody
BikefirmEntity
bikefirm
)
{
bikefirmService
.
updateById
(
bikefirm
);
return
R
.
ok
();
}
...
...
@@ -91,9 +92,9 @@ public class BikefirmController {
* 删除
*/
@RequestMapping
(
"/delete"
)
// @RequiresPermissions("manage:bikefirm:delete")
public
R
delete
(
@RequestBody
Integer
[]
ids
){
bikefirmService
.
removeByIds
(
Arrays
.
asList
(
ids
));
// @RequiresPermissions("manage:bikefirm:delete")
public
R
delete
(
@RequestBody
Integer
[]
ids
)
{
bikefirmService
.
removeByIds
(
Arrays
.
asList
(
ids
));
return
R
.
ok
();
}
...
...
@@ -103,18 +104,22 @@ public class BikefirmController {
@PostMapping
(
"/api/getBikeFirm"
)
public
R
getBikeFirm
(
@RequestBody
BikeFirmVo
bikeFirmVo
,
HttpServletRequest
request
)
{
boolean
captcha
=
sysCaptchaService
.
validate
(
bikeFirmVo
.
getUuid
(),
bikeFirmVo
.
getCaptcha
());
if
(!
captcha
)
{
if
(!
captcha
)
{
return
R
.
error
(
"验证码不正确"
);
}
SearchgtinlogEntity
searchgtinlogEntity
=
new
SearchgtinlogEntity
();
searchgtinlogEntity
.
setCreatedate
(
new
Date
());
searchgtinlogEntity
.
setIp
(
IPUtils
.
getIpAddr
(
request
));
if
(
StringUtils
.
isNotBlank
(
bikeFirmVo
.
getCode
()))
{
if
(
StringUtils
.
isNotBlank
(
bikeFirmVo
.
getCode
()))
{
try
{
new
BigDecimal
(
bikeFirmVo
.
getCode
()).
toString
();
}
catch
(
Exception
e
)
{
return
R
.
error
(
"请输入正常的企业代码!"
);
}
searchgtinlogEntity
.
setKeyword
(
bikeFirmVo
.
getCode
());
searchgtinlogEntity
.
setClassStr
(
"自行车企业代码公告查询:企业代码查询"
);
}
if
(
StringUtils
.
isNotBlank
(
bikeFirmVo
.
getFirmName
()))
{
if
(
StringUtils
.
isNotBlank
(
bikeFirmVo
.
getFirmName
()))
{
searchgtinlogEntity
.
setKeyword
(
bikeFirmVo
.
getFirmName
());
searchgtinlogEntity
.
setClassStr
(
"自行车企业代码公告查询:企业名称查询"
);
}
...
...
@@ -123,10 +128,10 @@ public class BikefirmController {
//新增查询日志
searchgtinlogService
.
save
(
searchgtinlogEntity
);
return
R
.
ok
().
put
(
"data"
,
bikefirmService
.
getBikeFirm
(
bikeFirmVo
));
}
return
R
.
ok
().
put
(
"data"
,
bikefirmService
.
getBikeFirm
(
bikeFirmVo
));
}
}
src/main/java/io/office/modules/manage/controller/ProductController.java
View file @
4edf0d90
...
...
@@ -5,6 +5,8 @@ import java.util.List;
import
java.util.Map
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
io.office.common.utils.RedisKeys
;
import
io.office.modules.app.annotation.Login
;
import
io.office.modules.manage.entity.NewsEntity
;
import
io.office.modules.sys.controller.AbstractController
;
import
io.swagger.models.auth.In
;
...
...
@@ -119,6 +121,7 @@ public class ProductController extends AbstractController {
* @param param:分页参数
* @return
*/
@Login
@RequestMapping
(
"/api/findPage"
)
// @RequiresPermissions("manage:product:findPage")
public
R
findPage
(
@RequestBody
Map
<
String
,
String
>
param
){
...
...
src/main/java/io/office/modules/manage/controller/UserFunctionBindingController.java
View file @
4edf0d90
...
...
@@ -5,6 +5,7 @@ import java.util.Arrays;
import
java.util.List
;
import
java.util.Map
;
import
io.office.modules.app.annotation.Login
;
import
io.office.modules.sys.controller.AbstractController
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -38,6 +39,7 @@ public class UserFunctionBindingController extends AbstractController {
/**
* 查询
*/
@Login
@RequestMapping
(
"/api/find"
)
public
R
find
(){
Integer
id
=
getUserId
().
intValue
();
...
...
@@ -50,6 +52,7 @@ public class UserFunctionBindingController extends AbstractController {
/**
* 修改
*/
@Login
@RequestMapping
(
"/api/update"
)
// @RequiresPermissions("manage:userfunctionbinding:update")
public
R
update
(
@RequestBody
Integer
[]
functionids
){
...
...
@@ -63,6 +66,7 @@ public class UserFunctionBindingController extends AbstractController {
/**
* 保存
*/
@Login
@RequestMapping
(
"/api/save"
)
// @RequiresPermissions("manage:userfunctionbinding:save")
public
R
save
(
@RequestBody
Integer
[]
functionids
){
...
...
@@ -78,6 +82,7 @@ public class UserFunctionBindingController extends AbstractController {
/**
* 列表
*/
@Login
@RequestMapping
(
"/api/list"
)
// @RequiresPermissions("manage:userfunctionbinding:list")
public
R
list
(
@RequestParam
Map
<
String
,
Object
>
params
){
...
...
@@ -88,6 +93,7 @@ public class UserFunctionBindingController extends AbstractController {
/**
* 信息
*/
@Login
@RequestMapping
(
"/api/info/{id}"
)
// @RequiresPermissions("manage:userfunctionbinding:info")
public
R
info
(
@PathVariable
(
"id"
)
Integer
id
){
...
...
@@ -98,6 +104,7 @@ public class UserFunctionBindingController extends AbstractController {
/**
* 删除
*/
@Login
@RequestMapping
(
"/delete"
)
// @RequiresPermissions("manage:userfunctionbinding:delete")
public
R
delete
(
@RequestBody
Integer
[]
ids
){
...
...
src/main/java/io/office/modules/manage/dao/MemberDao.java
View file @
4edf0d90
...
...
@@ -21,6 +21,9 @@ public interface MemberDao extends BaseMapper<MemberEntity> {
@Select
(
"select * from member where username=#{userName}"
)
MemberEntity
selectByName
(
@Param
(
"userName"
)
String
userName
);
@Update
(
"UPDATE member SET pass
word
= #{passWord} WHERE id = #{id}"
)
@Update
(
"UPDATE member SET pass = #{passWord} WHERE id = #{id}"
)
void
updateByIdPassWord
(
@Param
(
"id"
)
Integer
id
,
@Param
(
"passWord"
)
String
passWord
);
/*@Select("select * from member where username=#{userName} or firmcode=#{userName}")
MemberEntity selectByNameAndSn(@Param("userName") String userName);*/
}
src/main/java/io/office/modules/manage/dao/QRcodeDao.java
0 → 100644
View file @
4edf0d90
package
io
.
office
.
modules
.
manage
.
dao
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
io.office.modules.manage.entity.GS1CodeListEntity
;
import
org.apache.ibatis.annotations.Mapper
;
import
java.util.List
;
@Mapper
public
interface
QRcodeDao
extends
BaseMapper
<
GS1CodeListEntity
>
{
List
<
GS1CodeListEntity
>
getGS1CodeList
();
GS1CodeListEntity
getGS1ByMark
();
}
src/main/java/io/office/modules/manage/entity/GS1CodeListEntity.java
0 → 100644
View file @
4edf0d90
package
io
.
office
.
modules
.
manage
.
entity
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Getter
;
import
lombok.Setter
;
/**
* Created by zyf on 2021/12/10.
*/
@Setter
@Getter
@ApiModel
(
value
=
"GS1CodeList"
)
public
class
GS1CodeListEntity
{
@ApiModelProperty
(
value
=
"标识符ID"
)
public
String
id
;
@ApiModelProperty
(
value
=
"AI标识符名称"
)
public
String
codeName
;
@ApiModelProperty
(
value
=
"AI标识符编号"
)
public
String
codeValue
;
/** 是否可变长度(0 不可变 1 可变) */
@ApiModelProperty
(
value
=
"是否可变长度(0 不可变 1 可变)"
)
private
Integer
isVariable
;
//
/** 最后一位是否是校验位(0 否 1是) */
@ApiModelProperty
(
value
=
"最后一位是否是校验位(0 否 1是)"
)
private
Integer
isCheck
;
/** 最小长度 */
@ApiModelProperty
(
value
=
"最小长度"
)
private
Integer
minLength
;
/** 最大长度 */
@ApiModelProperty
(
value
=
"用户允许输入的最大长度"
)
private
Integer
maxLength
;
/** 是否是日期(0 否 1是) */
@ApiModelProperty
(
value
=
"是否是日期(0 否 1是)"
)
private
Integer
isDate
;
/** 是否包含小数位(0 不包含 1 包含) */
@ApiModelProperty
(
value
=
"是否包含小数位(0 不包含 1 包含)"
)
private
Integer
isDecimal
;
/** 是否全是数字(0 否 1 是) */
@ApiModelProperty
(
value
=
"是否全是数字(0 否 1 是)"
)
private
Integer
isNum
;
/** 格式 */
@ApiModelProperty
(
value
=
"格式"
)
private
String
format
;
/** 是否需要特殊符号 */
@ApiModelProperty
(
value
=
"是否需要特殊符号(0:否 1:是)"
)
private
Integer
isFnc1
;
/** 数据名称 */
@ApiModelProperty
(
value
=
"数据名称"
)
private
String
dataName
;
/** 输入提示 */
@ApiModelProperty
(
value
=
"输入提示"
)
private
String
prompt
;
}
src/main/java/io/office/modules/manage/service/BarcodeGenerationService.java
0 → 100644
View file @
4edf0d90
package
io
.
office
.
modules
.
manage
.
service
;
import
io.office.modules.manage.entity.GS1CodeListEntity
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
/**
* ${comments}
*
* @author zyf
* @email
* @date 2021-12-09 15:26:10
*/
@Service
public
interface
BarcodeGenerationService
{
String
createPicture
(
String
content
);
List
<
GS1CodeListEntity
>
getGS1CodeListSSCC
();
GS1CodeListEntity
getGS1CodeListGRAI
();
}
src/main/java/io/office/modules/manage/service/impl/BarcodeGenerationServiceImpl.java
0 → 100644
View file @
4edf0d90
package
io
.
office
.
modules
.
manage
.
service
.
impl
;
import
io.office.common.exception.RRException
;
import
io.office.modules.manage.dao.QRcodeDao
;
import
io.office.modules.manage.entity.GS1CodeListEntity
;
import
io.office.modules.manage.service.BarcodeGenerationService
;
import
org.apache.commons.logging.Log
;
import
org.apache.commons.logging.LogFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
@Service
(
"barcodegenerationservice"
)
public
class
BarcodeGenerationServiceImpl
implements
BarcodeGenerationService
{
@Autowired
private
QRcodeDao
qRcodeDao
;
private
final
Log
logger
=
LogFactory
.
getLog
(
getClass
());
public
static
final
String
prefix_host
=
"http://localhost:9091/office/"
;
public
static
final
String
prefix_url
=
"barcodegeneration/api/gensvg?type="
;
@Override
public
String
createPicture
(
String
content
)
{
String
url
=
""
;
if
(
content
.
length
()
>
50
)
{
throw
new
RRException
(
"最大50位!"
);
}
url
=
prefix_host
+
prefix_url
+
"ean128&msg="
+
content
+
"&fmt=png&hrsize=5pt&hrfont=song&qz=0.6cm&wf=1&mw=0.17mm&height=1cm"
;
return
url
;
}
@Override
public
List
<
GS1CodeListEntity
>
getGS1CodeListSSCC
()
{
return
this
.
qRcodeDao
.
getGS1CodeList
();
}
@Override
public
GS1CodeListEntity
getGS1CodeListGRAI
()
{
return
this
.
qRcodeDao
.
getGS1ByMark
();
}
}
src/main/java/io/office/modules/manage/service/impl/LogLoginServiceImpl.java
View file @
4edf0d90
...
...
@@ -10,6 +10,8 @@ import org.springframework.stereotype.Service;
import
java.util.Date
;
import
java.util.Map
;
import
java.util.regex.Pattern
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
...
...
@@ -29,8 +31,10 @@ public class LogLoginServiceImpl extends ServiceImpl<LogLoginDao, LogLoginEntity
@Autowired
private
LogLoginDao
logLoginDao
;
@Autowired
private
MemberDao
memberDao
;
@Override
public
PageUtils
queryPage
(
Map
<
String
,
Object
>
params
)
{
IPage
<
LogLoginEntity
>
page
=
this
.
page
(
...
...
@@ -41,6 +45,8 @@ public class LogLoginServiceImpl extends ServiceImpl<LogLoginDao, LogLoginEntity
return
new
PageUtils
(
page
);
}
@Override
public
void
login
(
Map
<
String
,
Object
>
params
,
HttpServletRequest
request
,
HttpServletResponse
response
)
{
String
userName
=
String
.
valueOf
(
params
.
get
(
"userName"
)==
null
?
""
:
params
.
get
(
"userName"
));
...
...
@@ -48,10 +54,25 @@ public class LogLoginServiceImpl extends ServiceImpl<LogLoginDao, LogLoginEntity
String
verification
=
String
.
valueOf
(
params
.
get
(
"verification"
)==
null
?
""
:
params
.
get
(
"verification"
));
//验证码
//session中获取验证码
//判断 验证码是否正确
//判断用户是否是手机号 是手机号调用 第三方接口登录 不是继续
int
userType
;
//1.业务大厅 2.网站用户
if
(
matchPhoneNumber
(
userName
)){
//TODO tgl 调用第三方登录接口
userType
=
1
;
}
else
{
userType
=
2
;
//查询Member表
MemberEntity
memberEntity
=
memberDao
.
selectByName
(
userName
);
//用户类型 www:为官网用户 条码卡:为条码卡用户
String
source
=
memberEntity
.
getSource
();
if
(!
"条码卡"
.
equals
(
source
)){
//官网用户
}
}
MemberEntity
user
=
memberDao
.
selectByName
(
userName
);
String
phone
=
user
.
getPhone
();
String
password
=
user
.
getPass
word
();
String
password
=
user
.
getPass
();
String
passwordMD5
=
MD5Util
.
md5Encrypt32Upper
(
passWord
);
//判断密码是否正确
if
(!
passwordMD5
.
equals
(
password
)){
...
...
@@ -60,4 +81,17 @@ public class LogLoginServiceImpl extends ServiceImpl<LogLoginDao, LogLoginEntity
//TODO tgl 参数不正确添加登录日志 log_login
logLoginDao
.
insert
(
new
LogLoginEntity
(
1
,
userName
,
"用户来源"
,
"条码卡号"
,
phone
,
new
Date
(),
IPUtils
.
getIpAddr
(
request
),
request
.
getRequestURL
().
toString
()));
}
/**
* 验证手机号 由于号码段不断的更新,只需要判断手机号有11位,并且全是数字以及1开头等
* @param phoneNumber 手机号码
* @return
*/
private
static
boolean
matchPhoneNumber
(
String
phoneNumber
)
{
String
regex
=
"1[358][0-9]{9}"
;
if
(
phoneNumber
==
null
||
phoneNumber
.
length
()<=
0
){
return
false
;
}
return
Pattern
.
matches
(
regex
,
phoneNumber
);
}
}
\ No newline at end of file
src/main/java/io/office/modules/manage/service/impl/MemberServiceImpl.java
View file @
4edf0d90
...
...
@@ -77,8 +77,11 @@ public class MemberServiceImpl extends ServiceImpl<MemberDao, MemberEntity> impl
String
subjoinReq
=
request
.
getSession
().
getAttribute
(
"subjoin"
)==
null
?
""
:
String
.
valueOf
(
request
.
getSession
().
getAttribute
(
"subjoin"
));
String
telReq
=
request
.
getSession
().
getAttribute
(
"tel"
)==
null
?
""
:
String
.
valueOf
(
request
.
getSession
().
getAttribute
(
"tel"
));
Long
dateReq
=
request
.
getSession
().
getAttribute
(
"date"
)==
null
?
0
:
Long
.
valueOf
(
String
.
valueOf
(
request
.
getSession
().
getAttribute
(
"date"
)));
//毫秒值
subjoinReq
=
"344942"
;
telReq
=
"13159872863"
;
long
l
=
System
.
currentTimeMillis
();
dateReq
=(
l
-
dateReq
)/
1000
;
//dateReq=(l-dateReq)/1000;
dateReq
=
30L
;
//获取验证码验证次数
TimescodeRegiEntity
timescodeRegiEntity
=
timescodeRegiDao
.
selectById
(
phone
);
if
(
timescodeRegiEntity
==
null
){
...
...
@@ -92,7 +95,7 @@ public class MemberServiceImpl extends ServiceImpl<MemberDao, MemberEntity> impl
MemberEntity
memberEntity
=
new
MemberEntity
();
memberEntity
.
setUsername
(
userName
);
//MD5加密密码
memberEntity
.
setPass
word
(
MD5Util
.
md5Encrypt32Upper
(
passWord
));
memberEntity
.
setPass
(
MD5Util
.
md5Encrypt32Upper
(
passWord
));
memberEntity
.
setEmail
(
emiail
);
memberEntity
.
setPhone
(
phone
);
memberEntity
.
setOicq
(
""
);
...
...
src/main/java/io/office/modules/manage/utils/CheckAICodeUtil.java
0 → 100644
View file @
4edf0d90
package
io
.
office
.
modules
.
manage
.
utils
;
import
io.office.common.exception.RRException
;
import
org.apache.commons.lang3.ArrayUtils
;
/**
* Created by naihe on 2019/10/21.
*/
public
class
CheckAICodeUtil
{
public
static
String
ckeckCode
(
String
ai
,
String
code
){
String
substring
=
ai
.
substring
(
0
,
2
);
Integer
intCode
=
Integer
.
valueOf
(
substring
);
if
(
intCode
<
10
){
if
(
intCode
==
0
){
if
(
code
.
length
()
!=
17
)
throw
new
RRException
(
"AI 为00 的信息需要填充17位数字"
);
return
antoFixCheckCode
(
code
);
}
else
if
(
intCode
==
1
){
if
(
code
.
length
()
!=
13
)
throw
new
RRException
(
"AI 为01 的信息需要填充13位数字"
);
return
antoFixCheckCode
(
code
);
}
else
if
(
intCode
==
2
){
if
(
code
.
length
()
!=
13
)
throw
new
RRException
(
"AI 为02 的信息需要填充13位数字"
);
return
antoFixCheckCode
(
code
);
}
}
return
code
;
}
//00 01
//返回一位校验码
private
static
String
antoFixCheckCode
(
String
gtinNo
){
//gtinNo = "0690123456789";
int
sum
=
0
;
char
[]
charArray
=
gtinNo
.
toCharArray
();
ArrayUtils
.
reverse
(
charArray
);
for
(
int
i
=
0
;
i
<
charArray
.
length
;
i
++){
char
n
=
charArray
[
i
];
int
num
=
Integer
.
parseInt
(
n
+
""
);
if
(
i
%
2
!=
0
){
sum
+=
num
;
}
else
{
sum
+=
num
*
3
;
}
}
int
ss
=
(
int
)
Math
.
ceil
(
sum
/
10
)*
10
;
if
(
ss
<
sum
){
ss
+=
10
;
}
int
checkCode
=
ss
-
sum
;
return
checkCode
+
""
;
}
public
static
void
main
(
String
[]
args
)
{
String
s
=
"0045848885699885554"
;
String
s1
=
"2121384585698"
;
System
.
out
.
println
(
antoFixCheckCode
(
s1
));
}
}
src/main/java/io/office/modules/manage/vo/request/CheckAIVo.java
0 → 100644
View file @
4edf0d90
package
io
.
office
.
modules
.
manage
.
vo
.
request
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Getter
;
import
lombok.Setter
;
import
org.hibernate.validator.constraints.NotBlank
;
import
java.io.Serializable
;
/**
* Created by zyf on 2021/12/10.
*/
@Setter
@Getter
public
class
CheckAIVo
implements
Serializable
{
@NotBlank
(
message
=
"AI标识符不能为空!!!"
)
@ApiModelProperty
(
value
=
"AI标识符"
)
public
String
code
;
@NotBlank
(
message
=
"输入的内容不能为空!!!"
)
@ApiModelProperty
(
value
=
"输入的内容"
)
public
String
content
;
}
src/main/resources/lib/barcode4j-light-2.2.0-SNAPSHOT/META-INF/MANIFEST.MF
0 → 100644
View file @
4edf0d90
Manifest-Version: 1.0
Built-By: wangll
Build-Jdk: 1.8.0_111
Created-By: Maven Integration for Eclipse
src/main/resources/lib/barcode4j-light-2.2.0-SNAPSHOT/META-INF/maven/net.sf.barcode4j/barcode4j-light/pom.properties
0 → 100644
View file @
4edf0d90
#Generated by Maven Integration for Eclipse
#Tue Jun 16 15:30:10 CST 2020
version
=
2.2.0-SNAPSHOT
groupId
=
net.sf.barcode4j
m2e.projectName
=
barcode4j-light
m2e.projectLocation
=
D
\:\\\u
5F00
\u
53D1
\u
5DE5
\u5177\\
java64
\\
barcode4j-develop
\\
barcode4j-light
artifactId
=
barcode4j-light
src/main/resources/lib/barcode4j-light-2.2.0-SNAPSHOT/META-INF/maven/net.sf.barcode4j/barcode4j-light/pom.xml
0 → 100644
View file @
4edf0d90
<?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>
<parent>
<groupId>
net.sf.barcode4j
</groupId>
<artifactId>
barcode4j-parent
</artifactId>
<version>
2.2.0-SNAPSHOT
</version>
</parent>
<artifactId>
barcode4j-light
</artifactId>
<packaging>
jar
</packaging>
<name>
barcode4j-light
</name>
<dependencies>
<dependency>
<groupId>
${project.groupId}
</groupId>
<artifactId>
barcode4j-spi
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
junit
</groupId>
<artifactId>
junit
</artifactId>
</dependency>
<!-- <dependency>
<groupId>com.google.zxing</groupId>
<artifactId>javase</artifactId>
</dependency> -->
</dependencies>
<build>
<plugins>
<plugin>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-compiler-plugin
</artifactId>
</plugin>
</plugins>
</build>
</project>
src/main/resources/lib/barcode4j-light-2.2.0-SNAPSHOT/META-INF/services/org.krysalis.barcode4j.BarcodeGenerator
0 → 100644
View file @
4edf0d90
org.krysalis.barcode4j.impl.codabar.CodabarBean
org.krysalis.barcode4j.impl.code39.Code39Bean
org.krysalis.barcode4j.impl.code128.Code128Bean
org.krysalis.barcode4j.impl.code128.EAN128Bean
org.krysalis.barcode4j.impl.int2of5.Interleaved2Of5Bean
org.krysalis.barcode4j.impl.int2of5.ITF14Bean
org.krysalis.barcode4j.impl.upcean.EAN13Bean
org.krysalis.barcode4j.impl.upcean.EAN8Bean
org.krysalis.barcode4j.impl.upcean.UPCABean
org.krysalis.barcode4j.impl.upcean.UPCEBean
org.krysalis.barcode4j.impl.postnet.POSTNETBean
org.krysalis.barcode4j.impl.fourstate.RoyalMailCBCBean
org.krysalis.barcode4j.impl.fourstate.USPSIntelligentMailBean
org.krysalis.barcode4j.impl.pdf417.PDF417Bean
org.krysalis.barcode4j.impl.datamatrix.DataMatrixBean
org.krysalis.barcode4j.impl.qr.QRCodeBean
src/main/resources/lib/barcode4j-light-2.2.0-SNAPSHOT/org/krysalis/barcode4j/impl/code128/EAN128AIs.properties
0 → 100644
View file @
4edf0d90
00
=
n17+cd
01
=
n13+cd
02
=
n13+cd
10
=
an1-20
11
=
d6
13
=
d6
15
=
d6
17
=
d6
20
=
n2
21
=
an-20
22
=
an-29
23x
=
e
230
=
n1
231
=
n10
232
=
n19
240
=
an-30
241
=
an-30
250
=
an-30
251
=
an-30
252
=
n2
30
=
n-8
310x
=
n6
311x
=
n6
312x
=
n6
313x
=
n6
314x
=
n6
315x
=
n6
316x
=
n6
32xx
=
n6
330x
=
n6
331x
=
n6
332x
=
n6
333x
=
n6
334x
=
n6
335x
=
n6
336x
=
n6
337x
=
n6
34xx
=
n6
350x
=
n6
351x
=
n6
352x
=
n6
353x
=
n6
354x
=
n6
355x
=
n6
356x
=
n6
36xx
=
n6
37
=
n-8
390x
=
n-15
391x
=
n4-18
392x
=
n-15
393x
=
n4-18
400
=
an-30
401
=
an-30
402
=
n17
403
=
an-30
# 410=n12+cd
# 411=n12+cd
# 412=n12+cd
# 413=n12+cd
# 414=n12+cd
# 415=n12+cd
410
=
n13
411
=
n13
412
=
n13
413
=
n13
414
=
n13
415
=
n13
420
=
an-9
#???420=an-20
#############################
#421=an4-12
421
=
n3+an1-9
##############
422
=
n3
8001
=
n14
8002
=
an-20
#############################
#8003=an15-30
8003
=
n13+cd+an1-16
##############
8004
=
an-30
8005
=
n6
#############################
#8006=n18
8006
=
n13+cd+n2+n2
##############
8007
=
an-30
8008
=
n9-12
8018
=
n18
8020
=
an-25
#?Typo??8020=an25
8100
=
n6
8101
=
n10
8102
=
n2
9x
=
an-30
#############################
#91=n2+n9+n2-8+cd0
#420=n5
##############
7001
=
n13
7002
=
an-30
7003
=
n10
7004
=
n-4
7005
=
an12
7006
=
n6
7007
=
d6
7008
=
an-3
7009
=
an-10
7010
=
an-2
7020
=
an-20
7021
=
an-20
7022
=
an-20
7023
=
an-30
703s
=
an4-30
710
=
an-20
711
=
an-20
712
=
an-20
713
=
an-20
714
=
an-20
242
=
n1-6
243
=
an1-20
253
=
an14-30
254
=
an1-20
255
=
n14-25
src/main/resources/lib/barcode4j-light-2.2.0-SNAPSHOT/org/krysalis/barcode4j/impl/fourstate/usps-4bc-bar-to-character-table.csv
0 → 100644
View file @
4edf0d90
1;H;2;E;3
2;B;10;A;0
3;J;12;C;8
4;F;5;G;11
5;I;9;D;1
6;A;1;F;12
7;C;5;B;8
8;E;4;J;11
9;G;3;I;10
10;D;9;H;6
11;F;11;B;4
12;I;5;C;12
13;J;10;A;2
14;H;1;G;7
15;D;6;E;9
16;A;3;I;6
17;G;4;C;7
18;B;1;J;9
19;H;10;F;2
20;E;0;D;8
21;G;2;A;4
22;I;11;B;0
23;J;8;D;12
24;C;6;H;7
25;F;1;E;10
26;B;12;G;9
27;H;3;I;0
28;F;8;J;7
29;E;6;C;10
30;D;4;A;5
31;I;4;F;7
32;H;11;B;9
33;G;0;J;6
34;A;6;E;8
35;C;1;D;2
36;F;9;I;12
37;E;11;G;1
38;J;5;H;4
39;D;3;B;2
40;A;7;C;0
41;B;3;E;1
42;G;10;D;5
43;I;7;J;4
44;C;11;F;6
45;A;8;H;12
46;E;2;I;1
47;F;10;D;0
48;J;3;A;9
49;G;5;C;4
50;H;8;B;7
51;F;0;E;5
52;C;3;A;10
53;G;12;J;2
54;D;11;B;6
55;I;8;H;9
56;F;4;A;11
57;B;5;C;2
58;J;1;E;12
59;I;3;G;6
60;H;0;D;7
61;E;7;H;5
62;A;12;B;11
63;C;9;J;0
64;G;8;F;3
65;D;10;I;2
src/main/resources/lib/barcode4j-light-2.2.0-SNAPSHOT/org/krysalis/barcode4j/output/java2d/OCR-B 10 BT.ttf
0 → 100644
View file @
4edf0d90
File added
src/main/resources/mapper/manage/QRcodeDao.xml
0 → 100644
View file @
4edf0d90
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"io.office.modules.manage.dao.QRcodeDao"
>
<select
id=
"getGS1CodeList"
resultType=
"io.office.modules.manage.entity.GS1CodeListEntity"
>
SELECT id, CONCAT(mark,'(',meaning,')') as codeName,mark codeValue, is_variable isVariable, min_length minLength, enable_max_length maxLength,
is_decimal isDecimal,is_check isCheck, is_num isNum, format, is_fnc1 isFnc1, data_name dataName ,is_date isDate, prompt
FROM gs1_standard
</select>
<select
id=
"getGS1ByMark"
resultType=
"io.office.modules.manage.entity.GS1CodeListEntity"
>
SELECT id, CONCAT(mark,'(',meaning,')') as codeName,mark codeValue, is_variable isVariable, min_length minLength, enable_max_length maxLength,
is_decimal isDecimal,is_check isCheck, is_num isNum, format, is_fnc1 isFnc1, data_name dataName ,is_date isDate, prompt
FROM gs1_standard where mark='8003'
</select>
</mapper>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment