Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
A
Aidea
Project
Project
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
sa_aidea
Aidea
Commits
fb78ecff
Commit
fb78ecff
authored
Oct 10, 2020
by
卜远杰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
产品详情入库单
parent
e52229cc
Hide whitespace changes
Inline
Side-by-side
Showing
42 changed files
with
5286 additions
and
0 deletions
+5286
-0
pom.xml
aidea-modules/pom.xml
+8
-0
pom.xml
aidea-modules/product-classify-module-web/pom.xml
+29
-0
productclassifyform.html
...pp/WEB-INF/views/productclassify/productclassifyform.html
+322
-0
productclassifylist.html
...pp/WEB-INF/views/productclassify/productclassifylist.html
+338
-0
pom.xml
aidea-modules/product-classify-module/pom.xml
+22
-0
ProductclassifyMapper.java
...com/cftech/productclassify/dao/ProductclassifyMapper.java
+24
-0
ProductclassifyMapper.xml
.../com/cftech/productclassify/dao/ProductclassifyMapper.xml
+201
-0
Productclassify.java
...ava/com/cftech/productclassify/model/Productclassify.java
+71
-0
ProductclassifyService.java
...ftech/productclassify/service/ProductclassifyService.java
+28
-0
ProductclassifyServiceImpl.java
...ductclassify/service/impl/ProductclassifyServiceImpl.java
+46
-0
ProductclassifyController.java
...cftech/productclassify/web/ProductclassifyController.java
+276
-0
pom.xml
aidea-modules/product-detail-module-web/pom.xml
+30
-0
productDetailform.html
...webapp/WEB-INF/views/productDetail/productDetailform.html
+194
-0
productDetaillist.html
...webapp/WEB-INF/views/productDetail/productDetaillist.html
+332
-0
pom.xml
aidea-modules/product-detail-module/pom.xml
+22
-0
ProductDetailMapper.java
...ava/com/cftech/productdetail/dao/ProductDetailMapper.java
+14
-0
ProductDetailMapper.xml
...java/com/cftech/productdetail/dao/ProductDetailMapper.xml
+193
-0
ProductDetail.java
...in/java/com/cftech/productdetail/model/ProductDetail.java
+72
-0
ProductDetailService.java
...om/cftech/productdetail/service/ProductDetailService.java
+15
-0
ProductDetailServiceImpl.java
.../productdetail/service/impl/ProductDetailServiceImpl.java
+31
-0
ProductDetailController.java
...com/cftech/productdetail/web/ProductDetailController.java
+187
-0
pom.xml
aidea-modules/product-into-wareroom-module-web/pom.xml
+29
-0
productIntoWareroomform.html
...NF/views/productIntoWareroom/productIntoWareroomform.html
+194
-0
productIntoWareroomlist.html
...NF/views/productIntoWareroom/productIntoWareroomlist.html
+340
-0
pom.xml
aidea-modules/product-into-wareroom-module/pom.xml
+22
-0
ProductIntoWareroomMapper.java
...ch/productintowareroom/dao/ProductIntoWareroomMapper.java
+14
-0
ProductIntoWareroomMapper.xml
...ech/productintowareroom/dao/ProductIntoWareroomMapper.xml
+172
-0
ProductIntoWareroom.java
...cftech/productintowareroom/model/ProductIntoWareroom.java
+64
-0
ProductIntoWareroomService.java
...oductintowareroom/service/ProductIntoWareroomService.java
+15
-0
ProductIntoWareroomServiceImpl.java
...wareroom/service/impl/ProductIntoWareroomServiceImpl.java
+31
-0
ProductIntoWareroomController.java
...roductintowareroom/web/ProductIntoWareroomController.java
+190
-0
pom.xml
aidea-modules/product-module-web/pom.xml
+29
-0
productform.html
...eb/src/main/webapp/WEB-INF/views/product/productform.html
+428
-0
productlist.html
...eb/src/main/webapp/WEB-INF/views/product/productlist.html
+385
-0
pom.xml
aidea-modules/product-module/pom.xml
+41
-0
ProductMapper.java
...e/src/main/java/com/cftech/product/dao/ProductMapper.java
+14
-0
ProductMapper.xml
...le/src/main/java/com/cftech/product/dao/ProductMapper.xml
+269
-0
Product.java
...odule/src/main/java/com/cftech/product/model/Product.java
+149
-0
ProductService.java
.../main/java/com/cftech/product/service/ProductService.java
+19
-0
ProductServiceImpl.java
...a/com/cftech/product/service/impl/ProductServiceImpl.java
+137
-0
ProductController.java
...c/main/java/com/cftech/product/web/ProductController.java
+265
-0
pom.xml
portal-web/pom.xml
+24
-0
No files found.
aidea-modules/pom.xml
View file @
fb78ecff
...
@@ -14,6 +14,14 @@
...
@@ -14,6 +14,14 @@
<modules>
<modules>
<module>
consult-module
</module>
<module>
consult-module
</module>
<module>
consult-module-web
</module>
<module>
consult-module-web
</module>
<module>
product-classify-module
</module>
<module>
product-classify-module-web
</module>
<module>
product-detail-module
</module>
<module>
product-detail-module-web
</module>
<module>
product-into-wareroom-module
</module>
<module>
product-into-wareroom-module-web
</module>
<module>
product-module
</module>
<module>
product-module-web
</module>
</modules>
</modules>
<dependencies>
<dependencies>
...
...
aidea-modules/product-classify-module-web/pom.xml
0 → 100644
View file @
fb78ecff
<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/maven-v4_0_0.xsd"
>
<parent>
<artifactId>
aidea-modules
</artifactId>
<groupId>
com.cftech
</groupId>
<version>
1.0-SNAPSHOT
</version>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<artifactId>
product-classify-module-web
</artifactId>
<packaging>
war
</packaging>
<name>
product-classify-module-web Maven Webapp
</name>
<url>
http://maven.apache.org
</url>
<dependencies>
<dependency>
<groupId>
junit
</groupId>
<artifactId>
junit
</artifactId>
<version>
3.8.1
</version>
<scope>
test
</scope>
</dependency>
<dependency>
<groupId>
com.cftech
</groupId>
<artifactId>
product-classify-module
</artifactId>
<version>
1.0-SNAPSHOT
</version>
</dependency>
</dependencies>
<build>
<finalName>
product-classify-module-web
</finalName>
</build>
</project>
aidea-modules/product-classify-module-web/src/main/webapp/WEB-INF/views/productclassify/productclassifyform.html
0 → 100644
View file @
fb78ecff
<!DOCTYPE html>
<!--[if IE 8]>
<html lang="en" class="ie8 no-js"> <![endif]-->
<!--[if IE 9]>
<html lang="en" class="ie9 no-js"> <![endif]-->
<!--[if !IE]><!-->
<html>
<!--<![endif]-->
<!-- BEGIN HEAD -->
<head>
<base
href=
"#springUrl('/assets/adminlte/')"
/>
<meta
charset=
"utf-8"
>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge"
>
<title>
工作台
</title>
<!-- Tell the browser to be responsive to screen width -->
<meta
content=
"width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"
name=
"viewport"
>
<!-- Bootstrap 3.3.5 -->
<link
rel=
"stylesheet"
href=
"bootstrap/css/bootstrap.min.css"
>
<!-- Font Awesome -->
<link
rel=
"stylesheet"
href=
"plugins/font-awesome/css/font-awesome.min.css"
>
<!-- Ionicons -->
<link
rel=
"stylesheet"
href=
"plugins/ionicons/css/ionicons.min.css"
>
<!-- DataTables -->
<link
rel=
"stylesheet"
href=
"plugins/datatables/dataTables.bootstrap.css"
>
<!-- Theme style -->
<link
rel=
"stylesheet"
href=
"dist/css/AdminLTE.min.css"
>
<!-- AdminLTE Skins. Choose a skin from the css/skins
folder instead of downloading all of them to reduce the load. -->
<link
rel=
"stylesheet"
href=
"dist/css/skins/_all-skins.min.css"
>
<!-- iCheck -->
<link
rel=
"stylesheet"
href=
"plugins/iCheck/flat/blue.css"
>
<!-- Date Picker -->
<link
rel=
"stylesheet"
href=
"plugins/datepicker/datepicker3.css"
>
<!-- Daterange picker -->
<link
rel=
"stylesheet"
href=
"plugins/daterangepicker/daterangepicker-bs3.css"
>
<!-- bootstrap wysihtml5 - text editor -->
<link
rel=
"stylesheet"
href=
"plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css"
>
<!--validate css-->
<link
rel=
"stylesheet"
href=
"plugins/jquery-validation/css/validate.css"
>
<!-- ztree css -->
<link
rel=
"stylesheet"
href=
"plugins/ztree/css/metroStyle/metroStyle.css"
type=
"text/css"
/>
<!--fileinput css-->
<link
rel=
"stylesheet"
href=
"plugins/bootstrap-fileinput/bootstrap-fileinput.css"
>
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
<link
rel=
"stylesheet"
href=
"common/css/uePicPicker.css"
>
</head>
<!-- END HEAD -->
<body
class=
"hold-transition skin-blue sidebar-mini"
>
<div
class=
"wrapper"
>
<div
class=
"content-wrapper"
style=
"margin-left:0;"
>
<section
class=
"content-header"
>
<h1>
产品分类管理
<small>
产品分类
</small>
</h1>
<ol
class=
"breadcrumb"
>
<li><a
href=
"#"
><i
class=
"fa fa-dashboard"
></i>
首页
</a></li>
<li><a
class=
"active"
>
产品分类
</a></li>
</ol>
</section>
<!-- Main content -->
<section
class=
"content"
>
<div
class=
"row"
>
<div
class=
"col-xs-12"
>
<!-- general form elements disabled -->
<div
class=
"box box-primary"
>
<form
role=
"form"
id=
"myForm"
>
<input
name=
"id"
value=
"$!{data.id}"
hidden=
"true"
/>
<div
class=
"box-body"
>
</div>
<div
class=
"form-group form-md-line-input col-md-12"
>
<label>
上级分类
</label>
<div
class=
"input-group"
>
<input
type=
"text"
id=
"parentId"
name=
"parentId"
value=
"$!{data.parentId}"
class=
"form-control"
style=
"display: none"
>
<input
type=
"text"
id=
"parentName"
name=
"parentName"
value=
"$!{data.parentName}"
class=
"form-control"
required=
"required"
disabled
>
<span
class=
"input-group-btn"
>
<button
type=
"button"
id=
"parentSelect"
class=
"btn btn-info btn-flat"
>
选择
</button>
</span>
</div>
</div>
<div
class=
"form-group form-md-line-input col-md-12"
>
<label>
产品分类名称
</label>
<input
type=
"text"
required
class=
"form-control pull-right"
value=
"$!{data.classifyName}"
maxlength=
"500"
required
name=
"classifyName"
placeholder=
"产品分类名称"
>
</div>
<div
class=
"form-group form-md-line-input col-md-12"
>
<label>
产品分类编码
</label>
<input
type=
"text"
class=
"form-control pull-right"
readonly
value=
"$!{data.classifyNumber}"
maxlength=
"500"
name=
"classifyNumber"
placeholder=
"产品分类编码"
>
</div>
<div
class=
"form-group form-md-line-input col-md-12"
>
<label>
序号
</label>
<input
type=
"text"
required
class=
"form-control pull-right"
value=
"$!{data.sort}"
maxlength=
"500"
required
name=
"sort"
placeholder=
"序号"
>
</div>
<div
class=
"form-group form-md-line-input col-md-12"
id=
"img"
>
</div>
<div
class=
"form-group form-md-line-input col-md-12"
>
<label>
是否推荐
</label>
#if($data.whetherRecommend == '是')
<input
type=
"radio"
name=
"whetherRecommend"
value=
"是"
checked=
"true"
/>
是
<input
type=
"radio"
name=
"whetherRecommend"
value=
"否"
/>
否
#elseif($data.whetherRecommend == '否')
<input
type=
"radio"
name=
"whetherRecommend"
value=
"是"
/>
是
<input
type=
"radio"
name=
"whetherRecommend"
value=
"否"
checked=
"true"
/>
否
#else
<input
type=
"radio"
name=
"whetherRecommend"
value=
"是"
checked=
"true"
/>
是
<input
type=
"radio"
name=
"whetherRecommend"
value=
"否"
/>
否
#end
</div>
<input
type=
"text"
style=
"display: none"
name=
"_csrf"
value=
"${_csrf.token}"
/>
<input
type=
"text"
style=
"display: none"
name=
"_csrf_header"
value=
"${_csrf.headerName}"
/>
<div
class=
"form-group form-md-line-input col-md-12"
>
<label>
备注
</label>
<textarea
type=
"text"
class=
"form-control pull-right"
maxlength=
"500"
name=
"description"
placeholder=
"备注"
>
$!{data.description}
</textarea>
</div>
<div
class=
"box-footer"
>
#if($shiro.hasPermission("qy:productclassify:edit"))
<input
class=
"btn btn-primary"
id=
"save"
value=
"保存"
type=
"submit"
>
#end
<a
href=
"#springUrl('/a/productclassify/list')"
class=
"btn btn-default"
>
取消
</a>
</div>
</form>
<!-- /.box-body -->
</div>
<!-- /.box -->
</div>
<!-- /.col -->
</div>
<!-- /.row -->
</section>
<!-- /.content -->
</div>
<!-- /.content-wrapper -->
<!-- Add the sidebar's background. This div must be placed
immediately after the control sidebar -->
<div
class=
"control-sidebar-bg"
></div>
</div>
<!-- ./wrapper -->
<script
src=
"plugins/jQuery/jQuery-2.1.4.min.js"
></script>
<!-- Bootstrap 3.3.5 -->
<script
src=
"bootstrap/js/bootstrap.min.js"
></script>
<!-- DataTables -->
<script
src=
"plugins/datatables/jquery.dataTables.min.js"
></script>
<script
src=
"plugins/datatables/extensions/i18n/lanauage_ch.js"
></script>
<script
src=
"plugins/datatables/dataTables.bootstrap.min.js"
></script>
<!-- SlimScroll -->
<script
src=
"plugins/slimScroll/jquery.slimscroll.min.js"
></script>
<!-- FastClick -->
<script
src=
"plugins/fastclick/fastclick.min.js"
></script>
<!--fileinput js-->
<script
src=
"plugins/bootstrap-fileinput/bootstrap-fileinput.js"
></script>
<!-- ztree -->
<script
src=
"plugins/ztree/js/jquery.ztree.all.min.js"
type=
"text/javascript"
></script>
<!-- AdminLTE App -->
<script
src=
"dist/js/app.min.js"
></script>
<script
src=
"plugins/bootstrap-maxlength/bootstrap-maxlength.min.js"
type=
"text/javascript"
></script>
<script
src=
"plugins/security/sha256.js"
type=
"text/javascript"
></script>
<script
src=
"plugins/jquery-validation/js/jquery.validate.min.js"
></script>
<script
src=
"js/jquery.form.min.js"
></script>
<script
type=
"text/javascript"
charset=
"utf-8"
src=
"plugins/ueditor-min-1.4.3/ueditor.config.js"
></script>
<script
type=
"text/javascript"
charset=
"utf-8"
src=
"plugins/ueditor-min-1.4.3/ueditor.all.js"
></script>
<script
type=
"text/javascript"
charset=
"utf-8"
src=
"plugins/ueditor-min-1.4.3/lang/zh-cn/zh-cn.js"
></script>
<script
src=
"common/js/cfapp.js"
></script>
<script
src=
"js/jquery.serializejson.js"
></script>
<script
src=
"plugins/jquery-validation/js/localization/messages_zh.js"
></script>
<script
src=
"plugins/Sortable/Sortable.min.js"
></script>
<script
src=
"common/component/uePicPicker.js"
></script>
<!-- END PAGE LEVEL PLUGINS -->
<script>
$
().
ready
(
function
()
{
Cfapp
.
init
();
recdTypeAdd
.
init
();
initPicsSel
();
});
var
coverPP
=
null
;
var
initPicsSel
=
function
()
{
var
smallimg
=
"$!{data.classifyImg}"
;
coverPP
=
new
uePicPicker
({
tarId
:
'img'
,
title
:
'banner图'
,
sizeDes
:
'205*202'
,
max
:
1
,
datas
:
smallimg
==
''
?
null
:
smallimg
.
split
(
","
),
success
:
null
});
coverPP
.
init
();
};
var
sSource
=
"#springUrl('/a/productclassify/treeData')"
;
var
recdTypeAdd
=
function
()
{
var
initForm
=
function
()
{
var
initFormCtrl
=
function
()
{
bindEvent
();
};
var
bindEvent
=
function
()
{
$
(
'#parentSelect'
).
on
(
'click'
,
function
()
{
Cfapp
.
treeSingleSelect
({
title
:
'上级分类选择'
,
url
:
sSource
,
displayFields
:
'parentName'
,
storeFields
:
'parentId'
,
success
:
function
()
{
console
.
log
(
'success'
);
},
cancel
:
function
()
{
console
.
log
(
'cancel'
);
}
})
});
$
(
"#myForm"
).
validate
({
rules
:
{},
messages
:
{},
submitHandler
:
function
(
form
)
{
var
data
=
$
(
"#myForm"
).
serializeJSON
();
var
classifyImg
=
coverPP
.
getStringValues
().
split
(
','
)[
0
];
var
flag
=
true
;
if
(
classifyImg
==
''
){
flag
=
false
;
Cfapp
.
alert
({
message
:
"请上传图片"
,
btntext
:
"确定"
,
success
:
function
()
{
return
false
;
}
});
}
if
(
flag
){
data
.
classifyImg
=
classifyImg
;
$
(
"#save"
).
attr
(
"disabled"
,
true
);
$
.
post
(
"#springUrl('/a/productclassify/formData')"
,
data
,
function
(
returnobj
)
{
$
(
"#save"
).
attr
(
"disabled"
,
false
);
if
(
returnobj
.
errorNo
==
2
)
{
//保存成功
Cfapp
.
confirm
({
message
:
"添加成功"
,
btnoktext
:
"继续添加"
,
btncanceltext
:
"关闭"
,
success
:
function
()
{
location
.
href
=
"#springUrl('/a/productclassify/form')"
;
},
cancel
:
function
()
{
location
.
href
=
"#springUrl('/a/productclassify/list')"
;
}
});
}
else
if
(
returnobj
.
errorNo
==
0
)
{
//修改成功
Cfapp
.
alert
({
message
:
"更新成功"
,
btntext
:
"确定"
,
success
:
function
()
{
location
.
href
=
"#springUrl('/a/productclassify/list')"
;
}
});
}
else
{
Cfapp
.
alert
({
message
:
"创建失败"
,
btntext
:
"确定"
,
success
:
function
()
{
location
.
href
=
"#springUrl('/a/productclassify/list')"
;
}
});
}
});
}
}
})
}
initFormCtrl
();
}
return
{
//main function to initiate the module
init
:
function
()
{
initForm
();
}
};
}();
</script>
</body>
<!-- END BODY -->
</html>
\ No newline at end of file
aidea-modules/product-classify-module-web/src/main/webapp/WEB-INF/views/productclassify/productclassifylist.html
0 → 100644
View file @
fb78ecff
<!DOCTYPE html>
<!--[if IE 8]>
<html lang="en" class="ie8 no-js"> <![endif]-->
<!--[if IE 9]>
<html lang="en" class="ie9 no-js"> <![endif]-->
<!--[if !IE]><!-->
<html>
<!--<![endif]-->
<!-- BEGIN HEAD -->
<head>
<base
href=
"#springUrl('/assets/adminlte/')"
/>
<meta
charset=
"utf-8"
>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge"
>
<title>
工作台
</title>
<!-- Tell the browser to be responsive to screen width -->
<meta
content=
"width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"
name=
"viewport"
>
<!-- Bootstrap 3.3.5 -->
<link
rel=
"stylesheet"
href=
"bootstrap/css/bootstrap.min.css"
>
<!-- Font Awesome -->
<link
rel=
"stylesheet"
href=
"plugins/font-awesome/css/font-awesome.min.css"
>
<!-- Ionicons -->
<link
rel=
"stylesheet"
href=
"plugins/ionicons/css/ionicons.min.css"
>
<!-- DataTables -->
<link
rel=
"stylesheet"
href=
"plugins/datatables/dataTables.bootstrap.css"
>
<!-- Theme style -->
<link
rel=
"stylesheet"
href=
"dist/css/AdminLTE.min.css"
>
<!-- AdminLTE Skins. Choose a skin from the css/skins
folder instead of downloading all of them to reduce the load. -->
<link
rel=
"stylesheet"
href=
"dist/css/skins/_all-skins.min.css"
>
<!-- iCheck -->
<link
rel=
"stylesheet"
href=
"plugins/iCheck/flat/blue.css"
>
<!-- Morris chart -->
<link
rel=
"stylesheet"
href=
"plugins/morris/morris.css"
>
<!-- jvectormap -->
<link
rel=
"stylesheet"
href=
"plugins/jvectormap/jquery-jvectormap-1.2.2.css"
>
<!-- Date Picker -->
<link
rel=
"stylesheet"
href=
"plugins/datepicker/datepicker3.css"
>
<!-- Daterange picker -->
<link
rel=
"stylesheet"
href=
"plugins/daterangepicker/daterangepicker-bs3.css"
>
<link
rel=
"stylesheet"
href=
"plugins\bootstrap-fileinput\fileinput.min.css"
>
<!-- bootstrap wysihtml5 - text editor -->
<link
rel=
"stylesheet"
href=
"plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css"
>
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body
class=
"hold-transition skin-blue sidebar-mini"
>
<div
class=
"wrapper"
>
<div
class=
"content-wrapper"
style=
"margin-left:0;"
>
<div
id=
"importExcelDiv"
></div>
<section
class=
"content-header"
>
<h1>
产品分类管理
<small>
产品分类
</small>
</h1>
<ol
class=
"breadcrumb"
>
<li><a><i
class=
"fa fa-dashboard"
></i>
首页
</a></li>
<li><a
class=
"active"
>
产品分类管理列表
</a></li>
</ol>
</section>
<!-- Main content -->
<section
class=
"content"
>
<div
class=
"row"
>
<div
class=
"col-xs-12"
>
<div
class=
"box"
>
<div
class=
"box-header"
>
<form
id=
"seachTableForm"
action=
"#springUrl('/a/productclassify/list')"
method=
"get"
>
<div
class=
"col-xs-2"
>
<input
type=
"text"
class=
"form-control "
name=
"classifyName"
placeholder=
"产品分类名称"
>
</div>
<div
class=
"col-xs-5"
>
<button
type=
"button"
class=
"search btn btn-primary"
>
搜索
</button>
#if($shiro.hasPermission("qy:productclassify:edit"))
<a
href=
"#springUrl('/a/productclassify/form')"
class=
"btn btn-primary"
>
新增
</a>
<a
onclick=
"importExcel();"
class=
"btn btn-primary"
>
导入
</a>
#end
</div>
</form>
</div>
<!-- /.box-header -->
<div
class=
"box-body"
>
<table
id=
"table"
class=
"table table-bordered table-striped"
>
<thead>
<tr>
<td
hidden=
"true"
>
Id
</td>
<td>
产品分类名称
</td>
<td>
产品分类编码
</td>
<td>
序号
</td>
<td>
banner图
</td>
<td>
是否推荐
</td>
<td>
备注
</td>
<th>
创建时间
</th>
<th>
操作
</th>
</tr>
</thead>
<tbody
id=
"tablebody"
>
</tbody>
</table>
</div>
<!-- /.box-body -->
</div>
<!-- /.box -->
</div>
<!-- /.col -->
</div>
<!-- /.row -->
</section>
<!-- /.content -->
</div>
<!-- /.content-wrapper -->
<!-- Add the sidebar's background. This div must be placed
immediately after the control sidebar -->
<div
class=
"control-sidebar-bg"
></div>
</div>
<!-- ./wrapper -->
<!-- jQuery 2.1.4 -->
<script
src=
"plugins/jQuery/jQuery-2.1.4.min.js"
></script>
<!-- Bootstrap 3.3.5 -->
<script
src=
"bootstrap/js/bootstrap.min.js"
></script>
<!-- DataTables -->
<script
src=
"plugins/datatables/jquery.dataTables.min.js"
></script>
<script
src=
"plugins/datatables/extensions/i18n/lanauage_ch.js"
></script>
<script
src=
"plugins/datatables/dataTables.bootstrap.min.js"
></script>
<!-- SlimScroll -->
<script
src=
"plugins/slimScroll/jquery.slimscroll.min.js"
></script>
<script
src=
"plugins/datepicker/bootstrap-datepicker.js"
></script>
<script
src=
"plugins/datepicker/locales/bootstrap-datepicker.zh-CN.js"
></script>
<!-- FastClick -->
<script
src=
"plugins/fastclick/fastclick.min.js"
></script>
<!--fileinput js-->
<script
src=
"plugins\bootstrap-fileinput\fileinput.js"
></script>
<script
src=
"plugins/bootstrap-fileinput/zh.js"
></script>
<script
src=
"plugins/bootstrap-fileinput/zh2.js"
></script>
<!-- AdminLTE App -->
<script
src=
"dist/js/app.min.js"
></script>
<script
type=
"text/javascript"
src=
"plugins/jquery-validation/js/jquery.validate.min.js"
></script>
<!-- AdminLTE for demo purposes -->
<script>
var
csrfheader
=
{
name
:
'_csrf_header'
,
value
:
'${_csrf.headerName}'
};
var
csrftoken
=
{
name
:
'_csrf'
,
value
:
'${_csrf.token}'
};
</script>
<script
src=
"common/js/cfapp.js"
></script>
<script>
function
formatDates
(
now
)
{
var
now
=
new
Date
(
now
);
var
year
=
now
.
getFullYear
();
var
month
=
now
.
getMonth
()
+
1
;
var
date
=
now
.
getDate
();
var
hour
=
now
.
getHours
();
var
minute
=
now
.
getMinutes
();
var
second
=
now
.
getSeconds
();
return
year
+
"-"
+
month
+
"-"
+
date
+
" "
+
hour
+
":"
+
minute
+
":"
+
second
;
}
function
seachTable
()
{
var
sSource
=
"#springUrl('/a/productclassify/listData')"
;
var
aoData
=
{
iDisplayStart
:
1
,
iDosplayLength
:
10
}
var
retrieveData
=
function
(
sSource
,
aoData
,
fnCallback
)
{
$
(
"#seachTableForm input"
).
each
(
function
()
{
var
params
=
{
name
:
$
(
this
).
attr
(
"name"
),
value
:
$
(
this
).
val
()
};
aoData
.
push
(
params
);
})
$
.
ajax
({
"type"
:
"GET"
,
"url"
:
sSource
,
"dataType"
:
"json"
,
"data"
:
aoData
,
//以json格式传递
"success"
:
fnCallback
});
};
$
(
'#table'
).
DataTable
({
"lengthChange"
:
false
,
"searching"
:
false
,
"ordering"
:
false
,
"bFiltered"
:
false
,
"bStateSave"
:
true
,
// save datatable state(pagination, sort, etc) in cookie.
"bProcessing"
:
true
,
"bServerSide"
:
true
,
"sAjaxSource"
:
sSource
,
"fnServerData"
:
retrieveData
,
"pagingType"
:
"full_numbers"
,
"aoColumns"
:
[
{
"mData"
:
"id"
},
{
"mData"
:
"classifyName"
},
{
"mData"
:
"classifyNumber"
},
{
"mData"
:
"sort"
},
{
"mData"
:
"classifyImg"
},
{
"mData"
:
"whetherRecommend"
},
{
"mData"
:
"description"
},
{
"mData"
:
"createTime"
},
{
"mData"
:
"id"
}],
"aoColumnDefs"
:
[
{
// set default column settings
'visible'
:
false
,
'targets'
:
[
0
]
},
{
"aTargets"
:[
4
],
"mData"
:
"classifyImg"
,
"mRender"
:
function
(
a
,
b
,
c
,
d
){
return
"<img src='"
+
a
+
"' style='width: 80px;height: 80px;'>"
;
}
},
{
"aTargets"
:
[
7
],
"mData"
:
"createTime"
,
"mRender"
:
function
(
a
,
b
,
c
,
d
)
{
return
formatDates
(
a
,
"yyyy-MM-dd HH:mm:ss"
);
}
},
{
"aTargets"
:
[
8
],
"mData"
:
"id"
,
"mRender"
:
function
(
a
,
b
,
c
,
d
)
{
//a表示id对应的值,c表示当前记录行对象
var
html
=
'#if($shiro.hasPermission("qy:productclassify:edit"))'
;
//
html
+=
'<a href="#springUrl("/a/productclassify/form?id='
+
a
+
'")" data-id="'
+
a
+
'" data-action="view" class="btn green">修改</a>'
;
html
+=
'<a href="javascript:void(0);" data-id="'
+
a
+
'" data-action="remove" onclick="removeData('
+
a
+
')" class="btn red">删除</a>'
;
html
+=
'#end'
;
return
html
;
}
}
]
});
}
jQuery
(
document
).
ready
(
function
()
{
seachTable
();
$
(
'.datepicker'
).
datepicker
({
show
:
true
,
format
:
'yyyy-mm-dd'
,
autoclose
:
true
,
language
:
'zh-CN'
,
todayBtn
:
'linked'
,
clearBtn
:
'linked'
});
$
(
'.search'
).
click
(
function
()
{
$
(
"#table"
).
dataTable
().
fnClearTable
();
});
});
Cfapp
.
init
();
function
removeData
(
data
)
{
Cfapp
.
confirm
({
message
:
"确定要删除吗"
,
btnoktext
:
"确定"
,
btncanceltext
:
"取消"
,
success
:
function
()
{
$
.
ajax
({
type
:
"POST"
,
url
:
"#springUrl('/a/productclassify/delete')"
,
data
:
{
id
:
data
,
_csrfheader
:
csrfheader
.
value
,
_csrf
:
csrftoken
.
value
},
dataType
:
"json"
,
success
:
function
(
data
)
{
if
(
data
.
errorNo
==
0
)
{
Cfapp
.
alert
({
message
:
"删除成功"
,
btntext
:
"确定"
,
success
:
function
()
{
location
.
href
=
"#springUrl('/a/productclassify/list')"
;
}
});
}
},
error
:
function
()
{
}
})
},
cancel
:
function
()
{
$
(
".modal-backdrop"
).
fadeOut
();
}
});
}
function
importExcel
()
{
var
templateExcelUrl
=
"#springUrl('/a/productclassify/templateExcel')"
;
var
importExcelUrl
=
"#springUrl('/a/productclassify/importExcel')?_csrf_header="
+
csrfheader
.
value
+
"&_csrf="
+
csrftoken
.
value
;
Cfapp
.
importExcel
({
title
:
'产品分类导入'
,
importurl
:
importExcelUrl
,
templateurl
:
templateExcelUrl
,
cancel
:
function
()
{
},
success
:
function
(
retjson
)
{
location
.
href
=
"#springUrl('/a/productclassify/list')"
;
}
});
}
</script>
</body>
</html>
aidea-modules/product-classify-module/pom.xml
0 → 100644
View file @
fb78ecff
<?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"
>
<parent>
<artifactId>
aidea-modules
</artifactId>
<groupId>
com.cftech
</groupId>
<version>
1.0-SNAPSHOT
</version>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<artifactId>
product-classify-module
</artifactId>
<dependencies>
<dependency>
<groupId>
com.cftech
</groupId>
<artifactId>
sys-module
</artifactId>
<version>
1.0-SNAPSHOT
</version>
<scope>
compile
</scope>
</dependency>
</dependencies>
</project>
\ No newline at end of file
aidea-modules/product-classify-module/src/main/java/com/cftech/productclassify/dao/ProductclassifyMapper.java
0 → 100644
View file @
fb78ecff
package
com
.
cftech
.
productclassify
.
dao
;
import
com.cftech.productclassify.model.Productclassify
;
import
com.cftech.core.generic.GenericDao
;
import
java.util.List
;
import
java.util.Map
;
/**
* 产品分类Mapper
*
* @author Buyj
* @date: 2020-09-22 18:06
*/
public
interface
ProductclassifyMapper
extends
GenericDao
<
Productclassify
>
{
/**
* 查产品分类
* @param params
* @return
*/
List
<
Productclassify
>
fetchTreeByPage
(
Map
<
String
,
Object
>
params
);
}
\ No newline at end of file
aidea-modules/product-classify-module/src/main/java/com/cftech/productclassify/dao/ProductclassifyMapper.xml
0 → 100644
View file @
fb78ecff
<?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=
"com.cftech.productclassify.dao.ProductclassifyMapper"
>
<resultMap
id=
"resultMap"
type=
"com.cftech.productclassify.model.Productclassify"
>
<id
column=
"id"
property=
"id"
/>
<result
column=
"classify_name"
property=
"classifyName"
/>
<result
column=
"classify_number"
property=
"classifyNumber"
/>
<result
column=
"classify_img"
property=
"classifyImg"
/>
<result
column=
"sort"
property=
"sort"
/>
<result
column=
"whether_recommend"
property=
"whetherRecommend"
/>
<result
column=
"parent_id"
property=
"parentId"
/>
<result
column=
"parentName"
property=
"parentName"
/>
<result
column=
"accounts_id"
property=
"accountsId"
/>
<result
column=
"del_flag"
property=
"delFlag"
/>
<result
column=
"status"
property=
"status"
/>
<result
column=
"create_time"
property=
"createTime"
/>
<result
column=
"update_time"
property=
"updateTime"
/>
<result
column=
"description"
property=
"description"
/>
<result
column=
"create_by"
property=
"createBy"
/>
<result
column=
"update_by"
property=
"updateBy"
/>
</resultMap>
<sql
id=
"sqlWhere"
>
<if
test=
"conds!=null"
>
<trim
prefix=
"WHERE"
prefixOverrides=
"AND|OR"
>
<foreach
collection=
"conds.conds"
index=
"index"
item=
"cond"
>
${cond.linkType}
<if
test=
"cond.condType == 'EQUAL'"
>
${cond.param} = #{cond.value}
</if>
<if
test=
"cond.condType == 'NOTEQUAL'"
>
${cond.param}
<>
#{cond.value}
</if>
<if
test=
"cond.condType == 'GREATEQUAL'"
>
${cond.param}
>
= #{cond.value}
</if>
<if
test=
"cond.condType == 'GREATTHAN'"
>
${cond.param}
>
#{cond.value}
</if>
<if
test=
"cond.condType == 'LESSEQUAL'"
>
${cond.param}
<
= #{cond.value}
</if>
<if
test=
"cond.condType == 'LESSTHAN'"
>
${cond.param}
<
#{cond.value}
</if>
<if
test=
"cond.condType == 'BETWEEN'"
>
${cond.param} BETWEEN #{cond.startValue} AND
#{cond.endValue}
</if>
<if
test=
"cond.condType == 'ISNULL'"
>
${cond.param} IS NULL
</if>
<if
test=
"cond.condType == 'NOTNULL'"
>
${cond.param} IS NOT NULL
</if>
<if
test=
"cond.condType == 'LIKE'"
>
${cond.param} LIKE #{cond.value}
</if>
<if
test=
"cond.condType == 'IN'"
>
${cond.param} IN
<foreach
item=
"item"
index=
"index"
collection=
"cond.value"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</if>
</foreach>
</trim>
</if>
</sql>
<sql
id=
"sqlColumns"
>
id,
classify_name,
classify_number,
classify_img,
sort,
whether_recommend,
parent_id,
accounts_id,
del_flag,
status,
create_time,
update_time,
description,
create_by,
update_by
</sql>
<insert
id=
"save"
parameterType=
"com.cftech.productclassify.model.Productclassify"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
insert into t_aidea_product_classify
(
<include
refid=
"sqlColumns"
/>
)
values
(
#{id, jdbcType=BIGINT},
#{classifyName, jdbcType=VARCHAR},
#{classifyNumber, jdbcType=VARCHAR},
#{classifyImg, jdbcType=VARCHAR},
#{sort, jdbcType=VARCHAR},
#{whetherRecommend, jdbcType=VARCHAR},
#{parentId, jdbcType=VARCHAR},
#{accountsId, jdbcType=BIGINT},
#{delFlag, jdbcType=TINYINT},
#{status, jdbcType=VARCHAR},
now(),
now(),
#{description, jdbcType=VARCHAR},
#{createBy, jdbcType=BIGINT},
#{updateBy, jdbcType=BIGINT}
)
</insert>
<select
id=
"fetchTreeByPage"
parameterType=
"java.util.Map"
resultMap=
"resultMap"
>
SELECT
<include
refid=
"sqlColumns"
/>
FROM t_aidea_product_classify
<include
refid=
"sqlWhere"
/>
<if
test=
"sort!=null"
>
ORDER BY ${sort.param} ${sort.type}
</if>
<if
test=
"limit>0"
>
limit #{offset},#{limit}
</if>
</select>
<select
id=
"fetchById"
parameterType=
"java.lang.Long"
resultMap=
"resultMap"
>
SELECT
<include
refid=
"sqlColumns"
/>
FROM t_aidea_product_classify t
WHERE t.id=#{id}
</select>
<select
id=
"count"
parameterType=
"java.util.Map"
resultType=
"java.lang.Integer"
>
SELECT
COUNT(1)
FROM
t_aidea_product_classify a
LEFT JOIN t_aidea_product_classify b ON b.id = a.parent_id
AND b.del_flag = '0'
<include
refid=
"sqlWhere"
/>
</select>
<select
id=
"fetchSearchByPage"
parameterType=
"java.util.Map"
resultMap=
"resultMap"
>
SELECT
a.id id,
a.classify_name classifyName,
a.classify_number classifyNumber,
a.classify_img classifyImg,
a.sort sort,
a.whether_recommend whetherRecommend,
a.parent_id parentId,
a.del_flag delFlag,
a.create_time createTime,
a.update_time updateTime,
a.description description,
a.create_by crateBy,
a.update_by updateBy,
b.classify_name parentName
FROM
t_aidea_product_classify a
LEFT JOIN t_aidea_product_classify b ON b.id = a.parent_id
AND b.del_flag = '0'
<include
refid=
"sqlWhere"
/>
<if
test=
"sort!=null"
>
ORDER BY ${sort.param} ${sort.type}
</if>
<if
test=
"limit>0"
>
limit #{offset},#{limit}
</if>
</select>
<update
id=
"update"
parameterType=
"com.cftech.productclassify.model.Productclassify"
>
update t_aidea_product_classify
<set>
<if
test=
"id != null"
>
id = #{id, jdbcType=BIGINT},
</if>
<if
test=
"classifyName != null"
>
classify_name = #{classifyName, jdbcType=VARCHAR},
</if>
<if
test=
"classifyNumber != null"
>
classify_number = #{classifyNumber, jdbcType=VARCHAR},
</if>
<if
test=
"classifyImg != null"
>
classify_img = #{classifyImg, jdbcType=VARCHAR},
</if>
<if
test=
"sort != null"
>
sort = #{sort, jdbcType=VARCHAR},
</if>
<if
test=
"whetherRecommend != null"
>
whether_recommend = #{whetherRecommend, jdbcType=VARCHAR},
</if>
<if
test=
"parentId != null"
>
parent_id = #{parentId, jdbcType=VARCHAR},
</if>
<if
test=
"accountsId != null"
>
accounts_id = #{accountsId, jdbcType=BIGINT},
</if>
<if
test=
"delFlag != null"
>
del_flag = #{delFlag, jdbcType=TINYINT},
</if>
<if
test=
"status != null"
>
status = #{status, jdbcType=VARCHAR},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime, jdbcType=TIMESTAMP},
</if>
<if
test=
"description != null"
>
description = #{description, jdbcType=VARCHAR},
</if>
<if
test=
"createBy != null"
>
create_by = #{createBy, jdbcType=BIGINT},
</if>
<if
test=
"updateBy != null"
>
update_by = #{updateBy, jdbcType=BIGINT},
</if>
</set>
where id=#{id,jdbcType=BIGINT}
</update>
<update
id=
"delete"
parameterType=
"java.lang.Long"
>
update t_aidea_product_classify set del_flag=1 where id=#{id,jdbcType=BIGINT}
</update>
</mapper>
\ No newline at end of file
aidea-modules/product-classify-module/src/main/java/com/cftech/productclassify/model/Productclassify.java
0 → 100644
View file @
fb78ecff
package
com
.
cftech
.
productclassify
.
model
;
import
com.cftech.core.poi.ExportConfig
;
import
lombok.Data
;
import
org.apache.cxf.jaxws.handler.types.CString
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* 产品分类
*
* @author Buyj
* @date: 2020-09-22 18:06
*/
@Data
public
class
Productclassify
implements
Serializable
{
/* 主键id */
private
Long
id
;
/* 分类名称 */
@ExportConfig
(
value
=
"分类名称"
,
width
=
100
,
showLevel
=
2
)
private
String
classifyName
;
/* 分类编码 */
@ExportConfig
(
value
=
"分类编码"
,
width
=
100
,
showLevel
=
2
)
private
String
classifyNumber
;
/* 分类banner图 */
@ExportConfig
(
value
=
"分类banner图"
,
width
=
100
,
showLevel
=
1
)
private
String
classifyImg
;
/* 序号 */
@ExportConfig
(
value
=
"序号"
,
width
=
100
,
showLevel
=
2
)
private
String
sort
;
/* 是否推荐 */
@ExportConfig
(
value
=
"是否推荐(是/否)"
,
width
=
200
,
showLevel
=
2
)
private
String
whetherRecommend
;
/**
* 父级ID
*/
private
String
parentId
;
/**
* 父级ID 对应的产品分类名称
*/
@ExportConfig
(
value
=
"父级编码(不填默认为第一级)"
,
width
=
300
,
showLevel
=
2
)
private
String
parentName
;
/**
* 父级编码
*/
private
String
parentNumber
;
/* 所属的账号 */
private
Long
accountsId
;
/* 删除标识 */
private
boolean
delFlag
;
/* 状态 */
private
String
status
;
/* 创建时间 */
private
Date
createTime
;
/* 更新时间 */
private
Date
updateTime
;
/* 备注 */
private
String
description
;
/* 创建人 */
private
Long
createBy
;
/* 更新人 */
private
Long
updateBy
;
public
Productclassify
()
{
this
.
delFlag
=
false
;
this
.
status
=
"0"
;
}
}
\ No newline at end of file
aidea-modules/product-classify-module/src/main/java/com/cftech/productclassify/service/ProductclassifyService.java
0 → 100644
View file @
fb78ecff
package
com
.
cftech
.
productclassify
.
service
;
import
com.cftech.core.sql.Conds
;
import
com.cftech.core.sql.Sort
;
import
com.cftech.productclassify.model.Productclassify
;
import
com.cftech.core.generic.GenericService
;
import
java.util.List
;
import
java.util.Map
;
/**
* 产品分类Service
*
* @author Buyj
* @date: 2020-09-22 18:06
*/
public
interface
ProductclassifyService
extends
GenericService
<
Productclassify
>
{
/**
* 查找产品分类
* @param conds
* @param sort
* @param pageNo
* @param pageSize
* @return
*/
List
<
Productclassify
>
fetchTreeByPage
(
Conds
conds
,
Sort
sort
,
int
pageNo
,
int
pageSize
);
}
aidea-modules/product-classify-module/src/main/java/com/cftech/productclassify/service/impl/ProductclassifyServiceImpl.java
0 → 100644
View file @
fb78ecff
package
com
.
cftech
.
productclassify
.
service
.
impl
;
import
com.cftech.core.sql.Sort
;
import
com.cftech.productclassify.model.Productclassify
;
import
com.cftech.productclassify.dao.ProductclassifyMapper
;
import
com.cftech.productclassify.service.ProductclassifyService
;
import
com.cftech.core.generic.GenericDao
;
import
com.cftech.core.generic.GenericServiceImpl
;
import
com.cftech.core.sql.Conds
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Qualifier
;
import
org.springframework.stereotype.Service
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
/**
* 产品分类ServiceImpl
*
* @author Buyj
* @date: 2020-09-22 18:06
*/
@Service
(
"productclassifyService"
)
public
class
ProductclassifyServiceImpl
extends
GenericServiceImpl
<
Productclassify
>
implements
ProductclassifyService
{
@Autowired
@Qualifier
(
"productclassifyMapper"
)
private
ProductclassifyMapper
productclassifyMapper
;
@Override
public
GenericDao
<
Productclassify
>
getGenericMapper
()
{
return
productclassifyMapper
;
}
@Override
public
List
<
Productclassify
>
fetchTreeByPage
(
Conds
conds
,
Sort
sort
,
int
pageNo
,
int
pageSize
)
{
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"conds"
,
conds
);
params
.
put
(
"offset"
,
pageNo
>
0
?
pageNo
:
0
);
params
.
put
(
"limit"
,
pageSize
>
0
?
pageSize
:
0
);
params
.
put
(
"sort"
,
sort
);
return
productclassifyMapper
.
fetchTreeByPage
(
params
);
}
}
\ No newline at end of file
aidea-modules/product-classify-module/src/main/java/com/cftech/productclassify/web/ProductclassifyController.java
0 → 100644
View file @
fb78ecff
package
com
.
cftech
.
productclassify
.
web
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.cftech.base.codingrule.utils.CodingruleUtils
;
import
com.cftech.core.util.SystemConfig
;
import
com.cftech.productclassify.model.Productclassify
;
import
com.cftech.productclassify.service.ProductclassifyService
;
import
com.cftech.core.poi.ExcelKit
;
import
com.cftech.core.scope.OrderType
;
import
com.cftech.core.sql.Conds
;
import
com.cftech.core.sql.Sort
;
import
com.cftech.core.util.Constants
;
import
com.cftech.sys.security.PermissionSign
;
import
com.cftech.sys.security.UserUtils
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.ui.Model
;
import
org.springframework.util.StringUtils
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.springframework.web.multipart.MultipartFile
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.File
;
import
java.io.IOException
;
import
java.util.List
;
/**
* 产品分类Controller
* <p>
* 权限字符串说明:
* 查看:public static final String PRODUCTCLASSIFY_VIEW = "qy:productclassify:view"
* 查看:public static final String PRODUCTCLASSIFY_EDIT = "qy:productclassify:edit"
*
* @author Buyj
* @date: 2020-09-22 18:06
*/
@Slf4j
@Controller
@RequestMapping
(
"/a/productclassify"
)
public
class
ProductclassifyController
{
public
static
final
String
PRODUCTCLASSIFY_VIEW
=
"qy:productclassify:view"
;
public
static
final
String
PRODUCTCLASSIFY_EDIT
=
"qy:productclassify:edit"
;
@Autowired
private
ProductclassifyService
productclassifyService
;
@Autowired
private
CodingruleUtils
codingruleUtils
;
private
static
final
String
fatherName
=
SystemConfig
.
p
.
getProperty
(
"PRODUCT_CLASSIFY_FATHER_NAME"
);
//列表页面
@RequiresPermissions
(
value
=
PRODUCTCLASSIFY_VIEW
)
@RequestMapping
(
"/list"
)
public
String
list
(
HttpServletRequest
request
,
Model
model
)
{
Long
accountId
=
UserUtils
.
getmpaccounts
(
request
);
model
.
addAttribute
(
"accountId"
,
accountId
);
return
"productclassify/productclassifylist"
;
}
//编辑页面(新增、修改)
@RequiresPermissions
(
value
=
PRODUCTCLASSIFY_VIEW
)
@RequestMapping
(
"/form"
)
public
String
form
(
HttpServletRequest
request
,
String
id
,
Model
model
)
{
if
(!
StringUtils
.
isEmpty
(
id
))
{
Productclassify
productclassify
=
productclassifyService
.
fetchById
(
id
);
if
(
productclassify
!=
null
&&
productclassify
.
getParentId
().
equals
(
"0"
)){
productclassify
.
setParentName
(
fatherName
);
}
else
{
productclassify
.
setParentName
(
productclassifyService
.
fetchById
(
productclassify
.
getParentId
()).
getClassifyName
());
}
model
.
addAttribute
(
"data"
,
productclassify
);
}
return
"productclassify/productclassifyform"
;
}
//提交数据(新增、修改)
@RequiresPermissions
(
value
=
PRODUCTCLASSIFY_EDIT
)
@RequestMapping
(
"/formData"
)
@ResponseBody
public
JSONObject
formData
(
Productclassify
productclassify
,
Model
model
,
HttpServletRequest
request
)
{
Long
accountsId
=
UserUtils
.
getmpaccounts
(
request
);
JSONObject
rtnJson
=
new
JSONObject
();
try
{
if
(
productclassify
!=
null
&&
productclassify
.
getId
()
!=
null
)
{
productclassify
.
setUpdateBy
(
UserUtils
.
getUser
().
getId
());
productclassifyService
.
update
(
productclassify
);
rtnJson
.
put
(
"errorNo"
,
0
);
}
else
{
productclassify
.
setClassifyNumber
(
codingruleUtils
.
getNumber
(
accountsId
,
Productclassify
.
class
.
getName
()));
productclassify
.
setAccountsId
(
accountsId
);
productclassify
.
setDelFlag
(
false
);
productclassify
.
setAccountsId
(
UserUtils
.
getmpaccounts
(
request
));
productclassify
.
setCreateBy
(
UserUtils
.
getUser
().
getId
());
productclassify
.
setUpdateBy
(
UserUtils
.
getUser
().
getId
());
productclassifyService
.
save
(
productclassify
);
rtnJson
.
put
(
"errorNo"
,
2
);
}
}
catch
(
Exception
e
)
{
rtnJson
.
put
(
"errorNo"
,
1
);
}
return
rtnJson
;
}
//获取列表数据
@RequiresPermissions
(
value
=
PRODUCTCLASSIFY_VIEW
)
@RequestMapping
(
value
=
"/listData"
)
@ResponseBody
public
JSONObject
listData
(
int
iDisplayStart
,
int
iDisplayLength
,
Productclassify
productclassify
,
HttpServletRequest
request
)
{
Long
accountsId
=
UserUtils
.
getmpaccounts
(
request
);
Conds
conds
=
new
Conds
();
conds
.
equal
(
"a.del_flag"
,
Constants
.
DEL_FLAG_0
);
conds
.
equal
(
"a.accounts_id"
,
accountsId
);
if
(!
StringUtils
.
isEmpty
(
productclassify
.
getClassifyName
()))
{
conds
.
like
(
"a.classify_name"
,
productclassify
.
getClassifyName
());
}
Sort
sort
=
new
Sort
(
"a.sort"
,
OrderType
.
DESC
);
List
<
Productclassify
>
list
=
productclassifyService
.
fetchSearchByPage
(
conds
,
sort
,
iDisplayStart
,
iDisplayLength
);
Integer
counts
=
productclassifyService
.
count
(
conds
);
JSONObject
rtnJson
=
new
JSONObject
();
rtnJson
.
put
(
"iTotalRecords"
,
counts
);
rtnJson
.
put
(
"iTotalDisplayRecords"
,
counts
);
rtnJson
.
put
(
"aaData"
,
list
);
return
rtnJson
;
}
//删除数据
@RequiresPermissions
(
value
=
PRODUCTCLASSIFY_EDIT
)
@RequestMapping
(
"/delete"
)
@ResponseBody
public
JSONObject
delete
(
String
id
)
{
JSONObject
rtnJosn
=
new
JSONObject
();
try
{
productclassifyService
.
delete
(
id
);
rtnJosn
.
put
(
"errorNo"
,
0
);
}
catch
(
Exception
e
)
{
rtnJosn
.
put
(
"errorNo"
,
1
);
}
return
rtnJosn
;
}
@RequestMapping
(
"/exportExcel"
)
@RequiresPermissions
(
value
=
PRODUCTCLASSIFY_VIEW
)
public
void
exportExcel
(
HttpServletRequest
request
,
HttpServletResponse
response
)
{
Long
accountId
=
UserUtils
.
getmpaccounts
(
request
);
Sort
sort
=
new
Sort
(
"create_time"
,
OrderType
.
ASC
);
Conds
conds
=
new
Conds
();
conds
.
equal
(
"del_flag"
,
0
);
conds
.
equal
(
"accounts_id"
,
accountId
);
List
<
Productclassify
>
list
=
productclassifyService
.
fetchSearchByPage
(
conds
,
sort
,
0
,
0
);
ExcelKit
.
$Export
(
Productclassify
.
class
,
response
).
toExcel
(
list
,
"产品分类信息"
);
}
@RequestMapping
(
"/templateExcel"
)
@RequiresPermissions
(
value
=
PRODUCTCLASSIFY_VIEW
)
public
void
templateExcel
(
HttpServletRequest
request
,
HttpServletResponse
response
)
{
ExcelKit
.
$Export
(
Productclassify
.
class
,
response
).
toExcel
(
null
,
"产品分类信息"
);
}
@RequestMapping
(
"/importExcel"
)
@RequiresPermissions
(
value
=
PRODUCTCLASSIFY_EDIT
)
@ResponseBody
public
JSONObject
importExcel
(
HttpServletRequest
request
,
MultipartFile
file
,
Model
model
)
{
JSONObject
retJson
=
new
JSONObject
();
Long
accountId
=
UserUtils
.
getmpaccounts
(
request
);
StringBuffer
classifyNumber
=
new
StringBuffer
();
StringBuffer
classifyParent
=
new
StringBuffer
();
if
(
file
==
null
)
{
retJson
.
put
(
"errorNo"
,
"1"
);
retJson
.
put
(
"errorMsg"
,
"未选择导入文件"
);
return
retJson
;
}
// 构造临时路径来存储上传的文件
String
uploadPath
=
System
.
getProperty
(
"java.io.tmpdir"
);
File
uploadDir
=
new
File
(
uploadPath
);
if
(!
uploadDir
.
exists
())
{
uploadDir
.
mkdir
();
}
String
fileName
=
file
.
getOriginalFilename
();
String
filePath
=
uploadPath
+
File
.
separator
+
fileName
;
File
storeFile
=
new
File
(
filePath
);
try
{
file
.
transferTo
(
storeFile
);
ExcelKit
.
$Import
().
readExcel
(
storeFile
,
rowData
->
{
Conds
conds
=
null
;
Productclassify
productclassify
=
new
Productclassify
();
if
(!
StringUtils
.
isEmpty
(
rowData
.
get
(
1
))){
//获取产品分类编码 查看编码是否重复
conds
=
new
Conds
();
conds
.
equal
(
"a.classify_number"
,
rowData
.
get
(
1
));
conds
.
equal
(
"a.del_flag"
,
"0"
);
Productclassify
productClassfyStr
=
productclassifyService
.
fetchSearchByConds
(
conds
);
//不为空则产品分类编码已存在
if
(
productClassfyStr
!=
null
){
classifyNumber
.
append
(
" '"
+
rowData
.
get
(
1
)+
"', "
);
return
;
}
else
{
productclassify
.
setClassifyNumber
(
rowData
.
get
(
1
));
}
}
if
(!
StringUtils
.
isEmpty
(
rowData
.
get
(
4
))){
conds
=
new
Conds
();
conds
.
equal
(
"a.classify_number"
,
rowData
.
get
(
4
));
conds
.
equal
(
"a.del_flag"
,
"0"
);
Productclassify
productClassifyParent
=
productclassifyService
.
fetchSearchByConds
(
conds
);
if
(
productClassifyParent
==
null
){
//父级编码不存在
classifyParent
.
append
(
" '"
+
rowData
.
get
(
4
)+
"', "
);
return
;
}
else
{
productclassify
.
setParentId
(
String
.
valueOf
(
productClassifyParent
.
getId
()));
}
}
else
{
productclassify
.
setParentId
(
"0"
);
}
//productclassify.setClassifyNumber(codingruleUtils.getNumber(accountId,Productclassify.class.getName()));
productclassify
.
setAccountsId
(
accountId
);
productclassify
.
setClassifyName
(
rowData
.
get
(
0
));
productclassify
.
setSort
(
rowData
.
get
(
2
));
productclassify
.
setWhetherRecommend
(
rowData
.
get
(
3
));
productclassifyService
.
save
(
productclassify
);
});
}
catch
(
IOException
e
)
{
log
.
error
(
e
.
getMessage
());
}
retJson
.
put
(
"errorNo"
,
"0"
);
if
(
classifyNumber
.
length
()
>
0
){
retJson
.
put
(
"errorMsg"
,
"部分产品分类导入失败,原因:产品分类编码重复:"
+
classifyNumber
.
toString
());
}
else
if
(
classifyParent
.
length
()
>
0
){
retJson
.
put
(
"errorMsg"
,
"部分产品分类导入失败,原因:产品分类父级编码不存在:"
+
classifyParent
.
toString
());
}
else
{
retJson
.
put
(
"errorMsg"
,
"导入成功"
);
}
return
retJson
;
}
@RequestMapping
(
"treeData"
)
@ResponseBody
public
JSONObject
getTreeData
(
HttpServletRequest
request
)
{
JSONObject
rtnJson
=
new
JSONObject
();
JSONArray
array
=
new
JSONArray
();
Sort
sort
=
new
Sort
(
"parent_id"
,
OrderType
.
ASC
);
Conds
conds
=
new
Conds
();
conds
.
equal
(
"del_flag"
,
0
);
conds
.
equal
(
"accounts_id"
,
UserUtils
.
getmpaccounts
(
request
));
List
<
Productclassify
>
papercategories
=
productclassifyService
.
fetchTreeByPage
(
conds
,
sort
,
0
,
0
);
JSONObject
t
=
new
JSONObject
();
t
.
put
(
"id"
,
0
);
t
.
put
(
"pId"
,
-
1
);
t
.
put
(
"name"
,
fatherName
);
t
.
put
(
"open"
,
true
);
array
.
add
(
t
);
for
(
Productclassify
productclassify
:
papercategories
)
{
JSONObject
tmp
=
new
JSONObject
();
tmp
.
put
(
"id"
,
productclassify
.
getId
());
tmp
.
put
(
"pId"
,
productclassify
.
getParentId
());
tmp
.
put
(
"name"
,
productclassify
.
getClassifyName
());
array
.
add
(
tmp
);
}
rtnJson
.
put
(
"aaData"
,
array
);
return
rtnJson
;
}
}
aidea-modules/product-detail-module-web/pom.xml
0 → 100644
View file @
fb78ecff
<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/maven-v4_0_0.xsd"
>
<parent>
<artifactId>
aidea-modules
</artifactId>
<groupId>
com.cftech
</groupId>
<version>
1.0-SNAPSHOT
</version>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<artifactId>
product-detail-module-web
</artifactId>
<packaging>
war
</packaging>
<name>
product-detail-module-web Maven Webapp
</name>
<url>
http://maven.apache.org
</url>
<dependencies>
<dependency>
<groupId>
junit
</groupId>
<artifactId>
junit
</artifactId>
<version>
3.8.1
</version>
<scope>
test
</scope>
</dependency>
<dependency>
<groupId>
com.cftech
</groupId>
<artifactId>
product-detail-module
</artifactId>
<version>
1.0-SNAPSHOT
</version>
</dependency>
</dependencies>
<build>
<finalName>
product-detail-module-web
</finalName>
</build>
</project>
aidea-modules/product-detail-module-web/src/main/webapp/WEB-INF/views/productDetail/productDetailform.html
0 → 100644
View file @
fb78ecff
<!DOCTYPE html>
<!--[if IE 8]>
<html lang="en" class="ie8 no-js"> <![endif]-->
<!--[if IE 9]>
<html lang="en" class="ie9 no-js"> <![endif]-->
<!--[if !IE]><!-->
<html>
<!--<![endif]-->
<!-- BEGIN HEAD -->
<head>
<base
href=
"#springUrl('/assets/adminlte/')"
/>
<meta
charset=
"utf-8"
>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge"
>
<title>
工作台
</title>
<!-- Tell the browser to be responsive to screen width -->
<meta
content=
"width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"
name=
"viewport"
>
<!-- Bootstrap 3.3.5 -->
<link
rel=
"stylesheet"
href=
"bootstrap/css/bootstrap.min.css"
>
<!-- Font Awesome -->
<link
rel=
"stylesheet"
href=
"plugins/font-awesome/css/font-awesome.min.css"
>
<!-- Ionicons -->
<link
rel=
"stylesheet"
href=
"plugins/ionicons/css/ionicons.min.css"
>
<!-- DataTables -->
<link
rel=
"stylesheet"
href=
"plugins/datatables/dataTables.bootstrap.css"
>
<!-- Theme style -->
<link
rel=
"stylesheet"
href=
"dist/css/AdminLTE.min.css"
>
<!-- AdminLTE Skins. Choose a skin from the css/skins
folder instead of downloading all of them to reduce the load. -->
<link
rel=
"stylesheet"
href=
"dist/css/skins/_all-skins.min.css"
>
<!-- iCheck -->
<link
rel=
"stylesheet"
href=
"plugins/iCheck/flat/blue.css"
>
<!-- Date Picker -->
<link
rel=
"stylesheet"
href=
"plugins/datepicker/datepicker3.css"
>
<!-- Daterange picker -->
<link
rel=
"stylesheet"
href=
"plugins/daterangepicker/daterangepicker-bs3.css"
>
<!-- bootstrap wysihtml5 - text editor -->
<link
rel=
"stylesheet"
href=
"plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css"
>
<!--validate css-->
<link
rel=
"stylesheet"
href=
"plugins/jquery-validation/css/validate.css"
>
<!--fileinput css-->
<link
rel=
"stylesheet"
href=
"plugins/bootstrap-fileinput/bootstrap-fileinput.css"
>
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<!-- END HEAD -->
<body
class=
"hold-transition skin-blue sidebar-mini"
>
<div
class=
"wrapper"
>
<div
class=
"content-wrapper"
style=
"margin-left:0;"
>
<section
class=
"content-header"
>
<h1>
产品详情管理
<small>
产品详情
</small>
</h1>
<ol
class=
"breadcrumb"
>
<li><a
href=
"#"
><i
class=
"fa fa-dashboard"
></i>
首页
</a></li>
<li><a
class=
"active"
>
产品详情
</a></li>
</ol>
</section>
<!-- Main content -->
<section
class=
"content"
>
<div
class=
"row"
>
<div
class=
"col-xs-12"
>
<!-- general form elements disabled -->
<div
class=
"box box-primary"
>
<form
role=
"form"
id=
"myForm"
>
<input
name=
"id"
value=
"$!{data.id}"
hidden=
"true"
/>
<div
class=
"box-body"
>
</div>
<div
class=
"box-footer"
>
#if($shiro.hasPermission("qy:productDetail:edit"))
<input
class=
"btn btn-primary"
id=
"save"
value=
"保存"
type=
"submit"
>
#end
<a
href=
"#springUrl('/a/productDetail/list')"
class=
"btn btn-default"
>
取消
</a>
</div>
</form>
<!-- /.box-body -->
</div>
<!-- /.box -->
</div>
<!-- /.col -->
</div>
<!-- /.row -->
</section>
<!-- /.content -->
</div>
<!-- /.content-wrapper -->
<!-- Add the sidebar's background. This div must be placed
immediately after the control sidebar -->
<div
class=
"control-sidebar-bg"
></div>
</div>
<!-- ./wrapper -->
<script
src=
"plugins/jQuery/jQuery-2.1.4.min.js"
></script>
<!-- Bootstrap 3.3.5 -->
<script
src=
"bootstrap/js/bootstrap.min.js"
></script>
<!-- DataTables -->
<script
src=
"plugins/datatables/jquery.dataTables.min.js"
></script>
<script
src=
"plugins/datatables/extensions/i18n/lanauage_ch.js"
></script>
<script
src=
"plugins/datatables/dataTables.bootstrap.min.js"
></script>
<!-- SlimScroll -->
<script
src=
"plugins/slimScroll/jquery.slimscroll.min.js"
></script>
<!-- FastClick -->
<script
src=
"plugins/fastclick/fastclick.min.js"
></script>
<!--fileinput js-->
<script
src=
"plugins/bootstrap-fileinput/bootstrap-fileinput.js"
></script>
<!-- AdminLTE App -->
<script
src=
"dist/js/app.min.js"
></script>
<script
src=
"plugins/bootstrap-maxlength/bootstrap-maxlength.min.js"
type=
"text/javascript"
></script>
<script
src=
"plugins/security/sha256.js"
type=
"text/javascript"
></script>
<script
src=
"plugins/jquery-validation/js/jquery.validate.min.js"
></script>
<script
src=
"js/jquery.form.min.js"
></script>
<script
type=
"text/javascript"
charset=
"utf-8"
src=
"plugins/ueditor-min-1.4.3/ueditor.config.js"
></script>
<script
type=
"text/javascript"
charset=
"utf-8"
src=
"plugins/ueditor-min-1.4.3/ueditor.all.js"
></script>
<script
type=
"text/javascript"
charset=
"utf-8"
src=
"plugins/ueditor-min-1.4.3/lang/zh-cn/zh-cn.js"
></script>
<script
src=
"common/js/cfapp.js"
></script>
<!-- END PAGE LEVEL PLUGINS -->
<script>
$
().
ready
(
function
()
{
Cfapp
.
init
();
recdTypeAdd
.
init
();
});
var
recdTypeAdd
=
function
()
{
var
initForm
=
function
()
{
var
initFormCtrl
=
function
()
{
bindEvent
();
};
var
bindEvent
=
function
()
{
$
(
"#myForm"
).
validate
({
rules
:
{},
messages
:
{},
submitHandler
:
function
(
form
)
{
$
(
"#save"
).
attr
(
"disabled"
,
true
);
$
.
getJSON
(
"#springUrl('/a/productDetail/formData')"
,
$
(
"#myForm"
).
serialize
(),
function
(
returnobj
)
{
$
(
"#save"
).
attr
(
"disabled"
,
false
);
if
(
returnobj
.
errorNo
==
2
)
{
//保存成功
Cfapp
.
confirm
({
message
:
"添加成功"
,
btnoktext
:
"继续添加"
,
btncanceltext
:
"关闭"
,
success
:
function
()
{
location
.
href
=
"#springUrl('/a/productDetail/form')"
;
},
cancel
:
function
()
{
location
.
href
=
"#springUrl('/a/productDetail/list')"
;
}
});
}
else
if
(
returnobj
.
errorNo
==
0
)
{
//修改成功
Cfapp
.
alert
({
message
:
"更新成功"
,
btntext
:
"确定"
,
success
:
function
()
{
location
.
href
=
"#springUrl('/a/productDetail/list')"
;
}
});
}
else
{
Cfapp
.
alert
({
message
:
"创建失败"
,
btntext
:
"确定"
,
success
:
function
()
{
location
.
href
=
"#springUrl('/a/productDetail/list')"
;
}
});
}
});
}
})
}
initFormCtrl
();
}
return
{
//main function to initiate the module
init
:
function
()
{
initForm
();
}
};
}();
</script>
</body>
<!-- END BODY -->
</html>
\ No newline at end of file
aidea-modules/product-detail-module-web/src/main/webapp/WEB-INF/views/productDetail/productDetaillist.html
0 → 100644
View file @
fb78ecff
<!DOCTYPE html>
<!--[if IE 8]>
<html lang="en" class="ie8 no-js"> <![endif]-->
<!--[if IE 9]>
<html lang="en" class="ie9 no-js"> <![endif]-->
<!--[if !IE]><!-->
<html>
<!--<![endif]-->
<!-- BEGIN HEAD -->
<head>
<base
href=
"#springUrl('/assets/adminlte/')"
/>
<meta
charset=
"utf-8"
>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge"
>
<title>
工作台
</title>
<!-- Tell the browser to be responsive to screen width -->
<meta
content=
"width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"
name=
"viewport"
>
<!-- Bootstrap 3.3.5 -->
<link
rel=
"stylesheet"
href=
"bootstrap/css/bootstrap.min.css"
>
<!-- Font Awesome -->
<link
rel=
"stylesheet"
href=
"plugins/font-awesome/css/font-awesome.min.css"
>
<!-- Ionicons -->
<link
rel=
"stylesheet"
href=
"plugins/ionicons/css/ionicons.min.css"
>
<!-- DataTables -->
<link
rel=
"stylesheet"
href=
"plugins/datatables/dataTables.bootstrap.css"
>
<!-- Theme style -->
<link
rel=
"stylesheet"
href=
"dist/css/AdminLTE.min.css"
>
<!-- AdminLTE Skins. Choose a skin from the css/skins
folder instead of downloading all of them to reduce the load. -->
<link
rel=
"stylesheet"
href=
"dist/css/skins/_all-skins.min.css"
>
<!-- iCheck -->
<link
rel=
"stylesheet"
href=
"plugins/iCheck/flat/blue.css"
>
<!-- Morris chart -->
<link
rel=
"stylesheet"
href=
"plugins/morris/morris.css"
>
<!-- jvectormap -->
<link
rel=
"stylesheet"
href=
"plugins/jvectormap/jquery-jvectormap-1.2.2.css"
>
<!-- Date Picker -->
<link
rel=
"stylesheet"
href=
"plugins/datepicker/datepicker3.css"
>
<!-- Daterange picker -->
<link
rel=
"stylesheet"
href=
"plugins/daterangepicker/daterangepicker-bs3.css"
>
<link
rel=
"stylesheet"
href=
"plugins\bootstrap-fileinput\fileinput.min.css"
>
<!-- bootstrap wysihtml5 - text editor -->
<link
rel=
"stylesheet"
href=
"plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css"
>
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body
class=
"hold-transition skin-blue sidebar-mini"
>
<div
class=
"wrapper"
>
<div
class=
"content-wrapper"
style=
"margin-left:0;"
>
<div
id=
"importExcelDiv"
></div>
<section
class=
"content-header"
>
<h1>
产品详情管理
<small>
产品详情
</small>
</h1>
<ol
class=
"breadcrumb"
>
<li><a><i
class=
"fa fa-dashboard"
></i>
首页
</a></li>
<li><a
class=
"active"
>
产品详情管理列表
</a></li>
</ol>
</section>
<!-- Main content -->
<section
class=
"content"
>
<div
class=
"row"
>
<div
class=
"col-xs-12"
>
<div
class=
"box"
>
<div
class=
"box-header"
>
<form
id=
"seachTableForm"
action=
"#springUrl('/a/productDetail/list')"
method=
"get"
>
<div
class=
"col-xs-2"
>
<input
type=
"text"
class=
"form-control "
name=
"productName"
placeholder=
"产品名称"
>
</div>
<div
class=
"col-xs-5"
>
<button
type=
"button"
class=
"search btn btn-primary"
>
搜索
</button>
#if($shiro.hasPermission("qy:productDetail:edit"))
<a
href=
"#springUrl('/a/productDetail/exportExcel')"
class=
"btn btn-primary"
>
导出
</a>
#end
</div>
</form>
</div>
<!-- /.box-header -->
<div
class=
"box-body"
>
<table
id=
"table"
class=
"table table-bordered table-striped"
>
<thead>
<tr>
<td
hidden=
"true"
>
Id
</td>
<td>
产品详情编码
</td>
<td>
物料编码
</td>
<td>
产品编码
</td>
<td>
产品名称
</td>
<td>
产品分类编码
</td>
<td>
入库编码
</td>
<td>
出库编码
</td>
<td>
订单编码
</td>
<td>
物流编码
</td>
<td>
是否出售
</td>
<th>
创建时间
</th>
<th>
操作
</th>
</tr>
</thead>
<tbody
id=
"tablebody"
>
</tbody>
</table>
</div>
<!-- /.box-body -->
</div>
<!-- /.box -->
</div>
<!-- /.col -->
</div>
<!-- /.row -->
</section>
<!-- /.content -->
</div>
<!-- /.content-wrapper -->
<!-- Add the sidebar's background. This div must be placed
immediately after the control sidebar -->
<div
class=
"control-sidebar-bg"
></div>
</div>
<!-- ./wrapper -->
<!-- jQuery 2.1.4 -->
<script
src=
"plugins/jQuery/jQuery-2.1.4.min.js"
></script>
<!-- Bootstrap 3.3.5 -->
<script
src=
"bootstrap/js/bootstrap.min.js"
></script>
<!-- DataTables -->
<script
src=
"plugins/datatables/jquery.dataTables.min.js"
></script>
<script
src=
"plugins/datatables/extensions/i18n/lanauage_ch.js"
></script>
<script
src=
"plugins/datatables/dataTables.bootstrap.min.js"
></script>
<!-- SlimScroll -->
<script
src=
"plugins/slimScroll/jquery.slimscroll.min.js"
></script>
<script
src=
"plugins/datepicker/bootstrap-datepicker.js"
></script>
<script
src=
"plugins/datepicker/locales/bootstrap-datepicker.zh-CN.js"
></script>
<!-- FastClick -->
<script
src=
"plugins/fastclick/fastclick.min.js"
></script>
<!--fileinput js-->
<script
src=
"plugins\bootstrap-fileinput\fileinput.js"
></script>
<script
src=
"plugins/bootstrap-fileinput/zh.js"
></script>
<script
src=
"plugins/bootstrap-fileinput/zh2.js"
></script>
<!-- AdminLTE App -->
<script
src=
"dist/js/app.min.js"
></script>
<script
type=
"text/javascript"
src=
"plugins/jquery-validation/js/jquery.validate.min.js"
></script>
<!-- AdminLTE for demo purposes -->
<script
src=
"common/js/cfapp.js"
></script>
<script>
function
formatDates
(
now
)
{
var
now
=
new
Date
(
now
);
var
year
=
now
.
getFullYear
();
var
month
=
now
.
getMonth
()
+
1
;
var
date
=
now
.
getDate
();
var
hour
=
now
.
getHours
();
var
minute
=
now
.
getMinutes
();
var
second
=
now
.
getSeconds
();
return
year
+
"-"
+
month
+
"-"
+
date
+
" "
+
hour
+
":"
+
minute
+
":"
+
second
;
}
function
seachTable
()
{
var
sSource
=
"#springUrl('/a/productDetail/listData')"
;
var
aoData
=
{
iDisplayStart
:
1
,
iDosplayLength
:
10
}
var
retrieveData
=
function
(
sSource
,
aoData
,
fnCallback
)
{
$
(
"#seachTableForm input"
).
each
(
function
()
{
var
params
=
{
name
:
$
(
this
).
attr
(
"name"
),
value
:
$
(
this
).
val
()
};
aoData
.
push
(
params
);
})
$
.
ajax
({
"type"
:
"GET"
,
"url"
:
sSource
,
"dataType"
:
"json"
,
"data"
:
aoData
,
//以json格式传递
"success"
:
fnCallback
});
};
$
(
'#table'
).
DataTable
({
"lengthChange"
:
false
,
"searching"
:
false
,
"ordering"
:
false
,
"bFiltered"
:
false
,
"bStateSave"
:
true
,
// save datatable state(pagination, sort, etc) in cookie.
"bProcessing"
:
true
,
"bServerSide"
:
true
,
"sAjaxSource"
:
sSource
,
"fnServerData"
:
retrieveData
,
"pagingType"
:
"full_numbers"
,
"aoColumns"
:
[
{
"mData"
:
"id"
},
{
"mData"
:
"productDetailNumber"
},
{
"mData"
:
"materielNumber"
},{
"mData"
:
"productNumber"
},{
"mData"
:
"productName"
},{
"mData"
:
"productClassifyNumber"
},{
"mData"
:
"intoWareroomNumber"
},{
"mData"
:
"outWareroomNumber"
},{
"mData"
:
"orderNumber"
},{
"mData"
:
"logisticsNumber"
},{
"mData"
:
"whetherSell"
},
{
"mData"
:
"createTime"
},
{
"mData"
:
"id"
}],
"aoColumnDefs"
:
[
{
// set default column settings
'visible'
:
false
,
'targets'
:
[
0
]
},
{
"aTargets"
:
[
11
],
"mData"
:
"createTime"
,
"mRender"
:
function
(
a
,
b
,
c
,
d
)
{
return
formatDates
(
a
,
"yyyy-MM-dd HH:mm:ss"
);
}
},{
"aTargets"
:
[
12
],
"mData"
:
"id"
,
"mRender"
:
function
(
a
,
b
,
c
,
d
)
{
var
html
=
'#if($shiro.hasPermission("qy:productDetail:edit"))'
;
//
// html += '
<
a
href
=
"#springUrl("
/
a
/
productIntoWareroom
/
form
?
id
=
' + a + '
")"
data
-
id
=
"' + a + '"
data
-
action
=
"view"
class
=
"btn green"
>
修改
<
/a>'
;
html
+=
'<a href="javascript:void(0);" data-id="'
+
a
+
'" data-action="remove" onclick="removeData('
+
a
+
')" class="btn red">删除</a>'
;
html
+=
'#end'
;
return
html
;
}
},
]
});
}
jQuery
(
document
).
ready
(
function
()
{
seachTable
();
$
(
'.datepicker'
).
datepicker
({
show
:
true
,
format
:
'yyyy-mm-dd'
,
autoclose
:
true
,
language
:
'zh-CN'
,
todayBtn
:
'linked'
,
clearBtn
:
'linked'
});
$
(
'.search'
).
click
(
function
()
{
$
(
"#table"
).
dataTable
().
fnClearTable
();
});
});
Cfapp
.
init
();
function
removeData
(
data
)
{
Cfapp
.
confirm
({
message
:
"确定要删除吗"
,
btnoktext
:
"确定"
,
btncanceltext
:
"取消"
,
success
:
function
()
{
$
.
ajax
({
type
:
"POST"
,
url
:
"#springUrl('/a/productDetail/delete')"
,
data
:
{
id
:
data
},
dataType
:
"json"
,
success
:
function
(
data
)
{
if
(
data
.
errorNo
==
0
)
{
Cfapp
.
alert
({
message
:
"删除成功"
,
btntext
:
"确定"
,
success
:
function
()
{
location
.
href
=
"#springUrl('/a/productDetail/list')"
;
}
});
}
},
error
:
function
()
{
}
})
},
cancel
:
function
()
{
$
(
".modal-backdrop"
).
fadeOut
();
}
});
}
function
importExcel
()
{
var
templateExcelUrl
=
"#springUrl('/a/productDetail/templateExcel')"
;
var
importExcelUrl
=
"#springUrl('/a/productDetail/importExcel')"
;
Cfapp
.
importExcel
({
title
:
'产品详情导入'
,
importurl
:
importExcelUrl
,
templateurl
:
templateExcelUrl
,
cancel
:
function
()
{
},
success
:
function
()
{
}
});
}
</script>
</body>
</html>
aidea-modules/product-detail-module/pom.xml
0 → 100644
View file @
fb78ecff
<?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"
>
<parent>
<artifactId>
aidea-modules
</artifactId>
<groupId>
com.cftech
</groupId>
<version>
1.0-SNAPSHOT
</version>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<artifactId>
product-detail-module
</artifactId>
<dependencies>
<dependency>
<groupId>
com.cftech
</groupId>
<artifactId>
sys-module
</artifactId>
<version>
1.0-SNAPSHOT
</version>
<scope>
compile
</scope>
</dependency>
</dependencies>
</project>
\ No newline at end of file
aidea-modules/product-detail-module/src/main/java/com/cftech/productdetail/dao/ProductDetailMapper.java
0 → 100644
View file @
fb78ecff
package
com
.
cftech
.
productdetail
.
dao
;
import
com.cftech.productdetail.model.ProductDetail
;
import
com.cftech.core.generic.GenericDao
;
/**
* 产品详情Mapper
*
* @author Buyj
* @date: 2020-09-28 17:08
*/
public
interface
ProductDetailMapper
extends
GenericDao
<
ProductDetail
>
{
}
\ No newline at end of file
aidea-modules/product-detail-module/src/main/java/com/cftech/productdetail/dao/ProductDetailMapper.xml
0 → 100644
View file @
fb78ecff
<?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=
"com.cftech.productdetail.dao.ProductDetailMapper"
>
<resultMap
id=
"resultMap"
type=
"com.cftech.productdetail.model.ProductDetail"
>
<id
column=
"id"
property=
"id"
/>
<result
column=
"product_detail_number"
property=
"productDetailNumber"
/>
<result
column=
"materiel_number"
property=
"materielNumber"
/>
<result
column=
"product_number"
property=
"productNumber"
/>
<result
column=
"product_name"
property=
"productName"
/>
<result
column=
"product_classify_number"
property=
"productClassifyNumber"
/>
<result
column=
"into_wareroom_number"
property=
"intoWareroomNumber"
/>
<result
column=
"out_wareroom_number"
property=
"outWareroomNumber"
/>
<result
column=
"order_number"
property=
"orderNumber"
/>
<result
column=
"logistics_number"
property=
"logisticsNumber"
/>
<result
column=
"whether_sell"
property=
"whetherSell"
/>
<result
column=
"accounts_id"
property=
"accountsId"
/>
<result
column=
"del_flag"
property=
"delFlag"
/>
<result
column=
"status"
property=
"status"
/>
<result
column=
"create_time"
property=
"createTime"
/>
<result
column=
"update_time"
property=
"updateTime"
/>
<result
column=
"description"
property=
"description"
/>
<result
column=
"create_by"
property=
"createBy"
/>
<result
column=
"update_by"
property=
"updateBy"
/>
</resultMap>
<sql
id=
"sqlWhere"
>
<if
test=
"conds!=null"
>
<trim
prefix=
"WHERE"
prefixOverrides=
"AND|OR"
>
<foreach
collection=
"conds.conds"
index=
"index"
item=
"cond"
>
${cond.linkType}
<if
test=
"cond.condType == 'EQUAL'"
>
${cond.param} = #{cond.value}
</if>
<if
test=
"cond.condType == 'NOTEQUAL'"
>
${cond.param}
<>
#{cond.value}
</if>
<if
test=
"cond.condType == 'GREATEQUAL'"
>
${cond.param}
>
= #{cond.value}
</if>
<if
test=
"cond.condType == 'GREATTHAN'"
>
${cond.param}
>
#{cond.value}
</if>
<if
test=
"cond.condType == 'LESSEQUAL'"
>
${cond.param}
<
= #{cond.value}
</if>
<if
test=
"cond.condType == 'LESSTHAN'"
>
${cond.param}
<
#{cond.value}
</if>
<if
test=
"cond.condType == 'BETWEEN'"
>
${cond.param} BETWEEN #{cond.startValue} AND
#{cond.endValue}
</if>
<if
test=
"cond.condType == 'ISNULL'"
>
${cond.param} IS NULL
</if>
<if
test=
"cond.condType == 'NOTNULL'"
>
${cond.param} IS NOT NULL
</if>
<if
test=
"cond.condType == 'LIKE'"
>
${cond.param} LIKE #{cond.value}
</if>
<if
test=
"cond.condType == 'IN'"
>
${cond.param} IN
<foreach
item=
"item"
index=
"index"
collection=
"cond.value"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</if>
</foreach>
</trim>
</if>
</sql>
<sql
id=
"sqlColumns"
>
id,
product_detail_number,
materiel_number,
product_number,
product_name,
product_classify_number,
into_wareroom_number,
out_wareroom_number,
order_number,
logistics_number,
whether_sell,
accounts_id,
del_flag,
status,
create_time,
update_time,
description,
create_by,
update_by
</sql>
<insert
id=
"save"
parameterType=
"com.cftech.productdetail.model.ProductDetail"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
insert into t_aidea_product_detail
(
<include
refid=
"sqlColumns"
/>
)
values
(
#{id, jdbcType=BIGINT},
#{productDetailNumber, jdbcType=VARCHAR},
#{materielNumber, jdbcType=VARCHAR},
#{productNumber, jdbcType=VARCHAR},
#{productName, jdbcType=VARCHAR},
#{productClassifyNumber, jdbcType=VARCHAR},
#{intoWareroomNumber, jdbcType=VARCHAR},
#{outWareroomNumber, jdbcType=VARCHAR},
#{orderNumber, jdbcType=VARCHAR},
#{logisticsNumber, jdbcType=VARCHAR},
#{whetherSell, jdbcType=VARCHAR},
#{accountsId, jdbcType=BIGINT},
#{delFlag, jdbcType=TINYINT},
#{status, jdbcType=VARCHAR},
now(),
now(),
#{description, jdbcType=VARCHAR},
#{createBy, jdbcType=BIGINT},
#{updateBy, jdbcType=BIGINT}
)
</insert>
<select
id=
"fetchById"
parameterType=
"java.lang.Long"
resultMap=
"resultMap"
>
SELECT
<include
refid=
"sqlColumns"
/>
FROM t_aidea_product_detail t
WHERE t.id=#{id}
</select>
<select
id=
"count"
parameterType=
"java.util.Map"
resultType=
"java.lang.Integer"
>
SELECT COUNT(1) FROM t_aidea_product_detail
<include
refid=
"sqlWhere"
/>
</select>
<select
id=
"fetchSearchByPage"
parameterType=
"java.util.Map"
resultMap=
"resultMap"
>
SELECT
<include
refid=
"sqlColumns"
/>
FROM t_aidea_product_detail
<include
refid=
"sqlWhere"
/>
<if
test=
"sort!=null"
>
ORDER BY ${sort.param} ${sort.type}
</if>
<if
test=
"limit>0"
>
limit #{offset},#{limit}
</if>
</select>
<update
id=
"update"
parameterType=
"com.cftech.productdetail.model.ProductDetail"
>
update t_aidea_product_detail
<set>
<if
test=
"id != null"
>
id = #{id, jdbcType=BIGINT},
</if>
<if
test=
"productDetailNumber != null"
>
product_detail_number = #{productDetailNumber, jdbcType=VARCHAR},
</if>
<if
test=
"materielNumber != null"
>
materiel_number = #{materielNumber, jdbcType=VARCHAR},
</if>
<if
test=
"productNumber != null"
>
product_number = #{productNumber, jdbcType=VARCHAR},
</if>
<if
test=
"productName != null"
>
product_name = #{productName, jdbcType=VARCHAR},
</if>
<if
test=
"productClassifyNumber != null"
>
product_classify_number = #{productClassifyNumber, jdbcType=VARCHAR},
</if>
<if
test=
"intoWareroomNumber != null"
>
into_wareroom_number = #{intoWareroomNumber, jdbcType=VARCHAR},
</if>
<if
test=
"outWareroomNumber != null"
>
out_wareroom_number = #{outWareroomNumber, jdbcType=VARCHAR},
</if>
<if
test=
"orderNumber != null"
>
order_number = #{orderNumber, jdbcType=VARCHAR},
</if>
<if
test=
"logisticsNumber != null"
>
logistics_number = #{logisticsNumber, jdbcType=VARCHAR},
</if>
<if
test=
"whetherSell != null"
>
whether_sell = #{whetherSell, jdbcType=VARCHAR},
</if>
<if
test=
"accountsId != null"
>
accounts_id = #{accountsId, jdbcType=BIGINT},
</if>
<if
test=
"delFlag != null"
>
del_flag = #{delFlag, jdbcType=TINYINT},
</if>
<if
test=
"status != null"
>
status = #{status, jdbcType=VARCHAR},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime, jdbcType=TIMESTAMP},
</if>
<if
test=
"description != null"
>
description = #{description, jdbcType=VARCHAR},
</if>
<if
test=
"createBy != null"
>
create_by = #{createBy, jdbcType=BIGINT},
</if>
<if
test=
"updateBy != null"
>
update_by = #{updateBy, jdbcType=BIGINT},
</if>
</set>
where id=#{id,jdbcType=BIGINT}
</update>
<update
id=
"delete"
parameterType=
"java.lang.Long"
>
update t_aidea_product_detail set del_flag=1 where id=#{id,jdbcType=BIGINT}
</update>
</mapper>
\ No newline at end of file
aidea-modules/product-detail-module/src/main/java/com/cftech/productdetail/model/ProductDetail.java
0 → 100644
View file @
fb78ecff
package
com
.
cftech
.
productdetail
.
model
;
import
com.cftech.core.poi.ExportConfig
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* 产品详情
*
* @author Buyj
* @date: 2020-09-28 17:08
*/
@Data
public
class
ProductDetail
implements
Serializable
{
/* 主键id */
private
Long
id
;
/* 产品详情编码 */
@ExportConfig
(
value
=
"产品详情编码"
,
width
=
150
,
showLevel
=
1
)
private
String
productDetailNumber
;
/* 物料编码 */
@ExportConfig
(
value
=
"物料编码"
,
width
=
100
,
showLevel
=
1
)
private
String
materielNumber
;
/* 产品编码 */
@ExportConfig
(
value
=
"产品编码"
,
width
=
100
,
showLevel
=
1
)
private
String
productNumber
;
/* 产品名称 */
@ExportConfig
(
value
=
"产品名称"
,
width
=
100
,
showLevel
=
1
)
private
String
productName
;
/* 产品分类编码 */
@ExportConfig
(
value
=
"产品分类编码"
,
width
=
150
,
showLevel
=
1
)
private
String
productClassifyNumber
;
/* 入库编码 */
@ExportConfig
(
value
=
"入库编码"
,
width
=
100
,
showLevel
=
1
)
private
String
intoWareroomNumber
;
/* 出库编码 */
@ExportConfig
(
value
=
"出库编码"
,
width
=
100
,
showLevel
=
1
)
private
String
outWareroomNumber
;
/* 订单编码 */
@ExportConfig
(
value
=
"订单编码"
,
width
=
100
,
showLevel
=
1
)
private
String
orderNumber
;
/* 物流编码 */
@ExportConfig
(
value
=
"物流编码"
,
width
=
100
,
showLevel
=
1
)
private
String
logisticsNumber
;
/* 是否出售 */
@ExportConfig
(
value
=
"是否出售"
,
width
=
100
,
showLevel
=
1
)
private
String
whetherSell
;
/* 所属的账号 */
private
Long
accountsId
;
/* 删除标识 */
private
boolean
delFlag
;
/* 状态 */
private
String
status
;
/* 创建时间 */
private
Date
createTime
;
/* 更新时间 */
private
Date
updateTime
;
/* 备注 */
private
String
description
;
/* 创建人 */
private
Long
createBy
;
/* 更新人 */
private
Long
updateBy
;
public
ProductDetail
()
{
this
.
delFlag
=
false
;
this
.
status
=
"0"
;
}
}
\ No newline at end of file
aidea-modules/product-detail-module/src/main/java/com/cftech/productdetail/service/ProductDetailService.java
0 → 100644
View file @
fb78ecff
package
com
.
cftech
.
productdetail
.
service
;
import
com.cftech.productdetail.model.ProductDetail
;
import
com.cftech.core.generic.GenericService
;
/**
* 产品详情Service
*
* @author Buyj
* @date: 2020-09-28 17:08
*/
public
interface
ProductDetailService
extends
GenericService
<
ProductDetail
>
{
}
aidea-modules/product-detail-module/src/main/java/com/cftech/productdetail/service/impl/ProductDetailServiceImpl.java
0 → 100644
View file @
fb78ecff
package
com
.
cftech
.
productdetail
.
service
.
impl
;
import
com.cftech.productdetail.model.ProductDetail
;
import
com.cftech.productdetail.dao.ProductDetailMapper
;
import
com.cftech.productdetail.service.ProductDetailService
;
import
com.cftech.core.generic.GenericDao
;
import
com.cftech.core.generic.GenericServiceImpl
;
import
com.cftech.core.sql.Conds
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Qualifier
;
import
org.springframework.stereotype.Service
;
/**
* 产品详情ServiceImpl
*
* @author Buyj
* @date: 2020-09-28 17:08
*/
@Service
(
"productDetailService"
)
public
class
ProductDetailServiceImpl
extends
GenericServiceImpl
<
ProductDetail
>
implements
ProductDetailService
{
@Autowired
@Qualifier
(
"productDetailMapper"
)
private
ProductDetailMapper
productDetailMapper
;
@Override
public
GenericDao
<
ProductDetail
>
getGenericMapper
()
{
return
productDetailMapper
;
}
}
\ No newline at end of file
aidea-modules/product-detail-module/src/main/java/com/cftech/productdetail/web/ProductDetailController.java
0 → 100644
View file @
fb78ecff
package
com
.
cftech
.
productdetail
.
web
;
import
com.alibaba.fastjson.JSONObject
;
import
com.cftech.productdetail.model.ProductDetail
;
import
com.cftech.productdetail.service.ProductDetailService
;
import
com.cftech.core.poi.ExcelKit
;
import
com.cftech.core.scope.OrderType
;
import
com.cftech.core.sql.Conds
;
import
com.cftech.core.sql.Sort
;
import
com.cftech.core.util.Constants
;
import
com.cftech.sys.security.PermissionSign
;
import
com.cftech.sys.security.UserUtils
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.ui.Model
;
import
org.springframework.util.StringUtils
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.springframework.web.multipart.MultipartFile
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.File
;
import
java.io.IOException
;
import
java.util.List
;
/**
* 产品详情Controller
* <p>
* 权限字符串说明:
* 查看:public static final String PRODUCTDETAIL_VIEW = "qy:productDetail:view"
* 查看:public static final String PRODUCTDETAIL_EDIT = "qy:productDetail:edit"
*
* @author Buyj
* @date: 2020-09-28 17:08
*/
@Slf4j
@Controller
@RequestMapping
(
"/a/productDetail"
)
public
class
ProductDetailController
{
public
static
final
String
PRODUCTDETAIL_VIEW
=
"qy:productDetail:view"
;
public
static
final
String
PRODUCTDETAIL_EDIT
=
"qy:productDetail:edit"
;
@Autowired
private
ProductDetailService
productDetailService
;
//列表页面
@RequiresPermissions
(
value
=
PRODUCTDETAIL_VIEW
)
@RequestMapping
(
"/list"
)
public
String
list
(
HttpServletRequest
request
,
Model
model
)
{
Long
accountId
=
UserUtils
.
getmpaccounts
(
request
);
model
.
addAttribute
(
"accountId"
,
accountId
);
return
"productDetail/productDetaillist"
;
}
//编辑页面(新增、修改)
@RequiresPermissions
(
value
=
PRODUCTDETAIL_VIEW
)
@RequestMapping
(
"/form"
)
public
String
form
(
HttpServletRequest
request
,
String
id
,
Model
model
)
{
if
(!
StringUtils
.
isEmpty
(
id
))
{
ProductDetail
productDetail
=
productDetailService
.
fetchById
(
id
);
model
.
addAttribute
(
"data"
,
productDetail
);
}
return
"productDetail/productDetailform"
;
}
//提交数据(新增、修改)
@RequiresPermissions
(
value
=
PRODUCTDETAIL_EDIT
)
@RequestMapping
(
"/formData"
)
@ResponseBody
public
JSONObject
formData
(
ProductDetail
productDetail
,
Model
model
,
HttpServletRequest
request
)
{
Long
accountsId
=
UserUtils
.
getmpaccounts
(
request
);
JSONObject
rtnJson
=
new
JSONObject
();
try
{
if
(
productDetail
!=
null
&&
productDetail
.
getId
()
!=
null
)
{
productDetail
.
setUpdateBy
(
UserUtils
.
getUser
().
getId
());
productDetailService
.
update
(
productDetail
);
rtnJson
.
put
(
"errorNo"
,
0
);
}
else
{
productDetail
.
setAccountsId
(
accountsId
);
productDetail
.
setDelFlag
(
false
);
productDetail
.
setAccountsId
(
UserUtils
.
getmpaccounts
(
request
));
productDetail
.
setCreateBy
(
UserUtils
.
getUser
().
getId
());
productDetail
.
setUpdateBy
(
UserUtils
.
getUser
().
getId
());
productDetailService
.
save
(
productDetail
);
rtnJson
.
put
(
"errorNo"
,
2
);
}
}
catch
(
Exception
e
)
{
rtnJson
.
put
(
"errorNo"
,
1
);
}
return
rtnJson
;
}
//获取列表数据
@RequiresPermissions
(
value
=
PRODUCTDETAIL_VIEW
)
@RequestMapping
(
value
=
"/listData"
)
@ResponseBody
public
JSONObject
listData
(
int
iDisplayStart
,
int
iDisplayLength
,
ProductDetail
productDetail
,
HttpServletRequest
request
)
{
Long
accountsId
=
UserUtils
.
getmpaccounts
(
request
);
Conds
conds
=
new
Conds
();
conds
.
equal
(
"del_flag"
,
Constants
.
DEL_FLAG_0
);
conds
.
equal
(
"accounts_id"
,
accountsId
);
if
(!
StringUtils
.
isEmpty
(
productDetail
.
getProductName
())){
conds
.
equal
(
"product_name"
,
productDetail
.
getProductName
());
}
Sort
sort
=
new
Sort
(
"create_time"
,
OrderType
.
DESC
);
List
<
ProductDetail
>
list
=
productDetailService
.
fetchSearchByPage
(
conds
,
sort
,
iDisplayStart
,
iDisplayLength
);
Integer
counts
=
productDetailService
.
count
(
conds
);
JSONObject
rtnJson
=
new
JSONObject
();
rtnJson
.
put
(
"iTotalRecords"
,
counts
);
rtnJson
.
put
(
"iTotalDisplayRecords"
,
counts
);
rtnJson
.
put
(
"aaData"
,
list
);
return
rtnJson
;
}
//删除数据
@RequiresPermissions
(
value
=
PRODUCTDETAIL_EDIT
)
@RequestMapping
(
"/delete"
)
@ResponseBody
public
JSONObject
delete
(
String
id
)
{
JSONObject
rtnJosn
=
new
JSONObject
();
try
{
productDetailService
.
delete
(
id
);
rtnJosn
.
put
(
"errorNo"
,
0
);
}
catch
(
Exception
e
)
{
rtnJosn
.
put
(
"errorNo"
,
1
);
}
return
rtnJosn
;
}
@RequestMapping
(
"/exportExcel"
)
@RequiresPermissions
(
value
=
PRODUCTDETAIL_VIEW
)
public
void
exportExcel
(
HttpServletRequest
request
,
HttpServletResponse
response
)
{
Long
accountId
=
UserUtils
.
getmpaccounts
(
request
);
Sort
sort
=
new
Sort
(
"create_time"
,
OrderType
.
ASC
);
Conds
conds
=
new
Conds
();
conds
.
equal
(
"del_flag"
,
0
);
conds
.
equal
(
"accounts_id"
,
accountId
);
List
<
ProductDetail
>
list
=
productDetailService
.
fetchSearchByPage
(
conds
,
sort
,
0
,
0
);
ExcelKit
.
$Export
(
ProductDetail
.
class
,
response
).
toExcel
(
list
,
"产品详情信息"
);
}
@RequestMapping
(
"/templateExcel"
)
@RequiresPermissions
(
value
=
PRODUCTDETAIL_VIEW
)
public
void
templateExcel
(
HttpServletRequest
request
,
HttpServletResponse
response
)
{
ExcelKit
.
$Export
(
ProductDetail
.
class
,
response
).
toExcel
(
null
,
"产品详情信息"
);
}
@RequestMapping
(
"/importExcel"
)
@RequiresPermissions
(
value
=
PRODUCTDETAIL_EDIT
)
public
String
importExcel
(
HttpServletRequest
request
,
MultipartFile
file
,
Model
model
)
{
Long
accountId
=
UserUtils
.
getmpaccounts
(
request
);
if
(
file
==
null
)
{
return
list
(
request
,
model
);
}
// 构造临时路径来存储上传的文件
String
uploadPath
=
System
.
getProperty
(
"java.io.tmpdir"
);
File
uploadDir
=
new
File
(
uploadPath
);
if
(!
uploadDir
.
exists
())
{
uploadDir
.
mkdir
();
}
String
fileName
=
file
.
getOriginalFilename
();
String
filePath
=
uploadPath
+
File
.
separator
+
fileName
;
File
storeFile
=
new
File
(
filePath
);
try
{
file
.
transferTo
(
storeFile
);
ExcelKit
.
$Import
().
setEmptyCellValue
(
""
).
readExcel
(
storeFile
,
rowData
->
{
if
(!
StringUtils
.
isEmpty
(
rowData
.
get
(
0
)))
{
ProductDetail
productDetail
=
new
ProductDetail
();
productDetail
.
setAccountsId
(
accountId
);
productDetailService
.
save
(
productDetail
);
}
});
}
catch
(
IOException
e
)
{
log
.
error
(
e
.
getMessage
());
}
return
list
(
request
,
model
);
}
}
aidea-modules/product-into-wareroom-module-web/pom.xml
0 → 100644
View file @
fb78ecff
<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/maven-v4_0_0.xsd"
>
<parent>
<artifactId>
aidea-modules
</artifactId>
<groupId>
com.cftech
</groupId>
<version>
1.0-SNAPSHOT
</version>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<artifactId>
product-into-wareroom-module-web
</artifactId>
<packaging>
war
</packaging>
<name>
product-into-wareroom-module-web Maven Webapp
</name>
<url>
http://maven.apache.org
</url>
<dependencies>
<dependency>
<groupId>
junit
</groupId>
<artifactId>
junit
</artifactId>
<version>
3.8.1
</version>
<scope>
test
</scope>
</dependency>
<dependency>
<groupId>
com.cftech
</groupId>
<artifactId>
product-into-wareroom-module
</artifactId>
<version>
1.0-SNAPSHOT
</version>
</dependency>
</dependencies>
<build>
<finalName>
product-into-wareroom-module-web
</finalName>
</build>
</project>
aidea-modules/product-into-wareroom-module-web/src/main/webapp/WEB-INF/views/productIntoWareroom/productIntoWareroomform.html
0 → 100644
View file @
fb78ecff
<!DOCTYPE html>
<!--[if IE 8]>
<html lang="en" class="ie8 no-js"> <![endif]-->
<!--[if IE 9]>
<html lang="en" class="ie9 no-js"> <![endif]-->
<!--[if !IE]><!-->
<html>
<!--<![endif]-->
<!-- BEGIN HEAD -->
<head>
<base
href=
"#springUrl('/assets/adminlte/')"
/>
<meta
charset=
"utf-8"
>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge"
>
<title>
工作台
</title>
<!-- Tell the browser to be responsive to screen width -->
<meta
content=
"width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"
name=
"viewport"
>
<!-- Bootstrap 3.3.5 -->
<link
rel=
"stylesheet"
href=
"bootstrap/css/bootstrap.min.css"
>
<!-- Font Awesome -->
<link
rel=
"stylesheet"
href=
"plugins/font-awesome/css/font-awesome.min.css"
>
<!-- Ionicons -->
<link
rel=
"stylesheet"
href=
"plugins/ionicons/css/ionicons.min.css"
>
<!-- DataTables -->
<link
rel=
"stylesheet"
href=
"plugins/datatables/dataTables.bootstrap.css"
>
<!-- Theme style -->
<link
rel=
"stylesheet"
href=
"dist/css/AdminLTE.min.css"
>
<!-- AdminLTE Skins. Choose a skin from the css/skins
folder instead of downloading all of them to reduce the load. -->
<link
rel=
"stylesheet"
href=
"dist/css/skins/_all-skins.min.css"
>
<!-- iCheck -->
<link
rel=
"stylesheet"
href=
"plugins/iCheck/flat/blue.css"
>
<!-- Date Picker -->
<link
rel=
"stylesheet"
href=
"plugins/datepicker/datepicker3.css"
>
<!-- Daterange picker -->
<link
rel=
"stylesheet"
href=
"plugins/daterangepicker/daterangepicker-bs3.css"
>
<!-- bootstrap wysihtml5 - text editor -->
<link
rel=
"stylesheet"
href=
"plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css"
>
<!--validate css-->
<link
rel=
"stylesheet"
href=
"plugins/jquery-validation/css/validate.css"
>
<!--fileinput css-->
<link
rel=
"stylesheet"
href=
"plugins/bootstrap-fileinput/bootstrap-fileinput.css"
>
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<!-- END HEAD -->
<body
class=
"hold-transition skin-blue sidebar-mini"
>
<div
class=
"wrapper"
>
<div
class=
"content-wrapper"
style=
"margin-left:0;"
>
<section
class=
"content-header"
>
<h1>
产品入库单管理
<small>
产品入库单
</small>
</h1>
<ol
class=
"breadcrumb"
>
<li><a
href=
"#"
><i
class=
"fa fa-dashboard"
></i>
首页
</a></li>
<li><a
class=
"active"
>
产品入库单
</a></li>
</ol>
</section>
<!-- Main content -->
<section
class=
"content"
>
<div
class=
"row"
>
<div
class=
"col-xs-12"
>
<!-- general form elements disabled -->
<div
class=
"box box-primary"
>
<form
role=
"form"
id=
"myForm"
>
<input
name=
"id"
value=
"$!{data.id}"
hidden=
"true"
/>
<div
class=
"box-body"
>
</div>
<div
class=
"box-footer"
>
#if($shiro.hasPermission("qy:productIntoWareroom:edit"))
<input
class=
"btn btn-primary"
id=
"save"
value=
"保存"
type=
"submit"
>
#end
<a
href=
"#springUrl('/a/productIntoWareroom/list')"
class=
"btn btn-default"
>
取消
</a>
</div>
</form>
<!-- /.box-body -->
</div>
<!-- /.box -->
</div>
<!-- /.col -->
</div>
<!-- /.row -->
</section>
<!-- /.content -->
</div>
<!-- /.content-wrapper -->
<!-- Add the sidebar's background. This div must be placed
immediately after the control sidebar -->
<div
class=
"control-sidebar-bg"
></div>
</div>
<!-- ./wrapper -->
<script
src=
"plugins/jQuery/jQuery-2.1.4.min.js"
></script>
<!-- Bootstrap 3.3.5 -->
<script
src=
"bootstrap/js/bootstrap.min.js"
></script>
<!-- DataTables -->
<script
src=
"plugins/datatables/jquery.dataTables.min.js"
></script>
<script
src=
"plugins/datatables/extensions/i18n/lanauage_ch.js"
></script>
<script
src=
"plugins/datatables/dataTables.bootstrap.min.js"
></script>
<!-- SlimScroll -->
<script
src=
"plugins/slimScroll/jquery.slimscroll.min.js"
></script>
<!-- FastClick -->
<script
src=
"plugins/fastclick/fastclick.min.js"
></script>
<!--fileinput js-->
<script
src=
"plugins/bootstrap-fileinput/bootstrap-fileinput.js"
></script>
<!-- AdminLTE App -->
<script
src=
"dist/js/app.min.js"
></script>
<script
src=
"plugins/bootstrap-maxlength/bootstrap-maxlength.min.js"
type=
"text/javascript"
></script>
<script
src=
"plugins/security/sha256.js"
type=
"text/javascript"
></script>
<script
src=
"plugins/jquery-validation/js/jquery.validate.min.js"
></script>
<script
src=
"js/jquery.form.min.js"
></script>
<script
type=
"text/javascript"
charset=
"utf-8"
src=
"plugins/ueditor-min-1.4.3/ueditor.config.js"
></script>
<script
type=
"text/javascript"
charset=
"utf-8"
src=
"plugins/ueditor-min-1.4.3/ueditor.all.js"
></script>
<script
type=
"text/javascript"
charset=
"utf-8"
src=
"plugins/ueditor-min-1.4.3/lang/zh-cn/zh-cn.js"
></script>
<script
src=
"common/js/cfapp.js"
></script>
<!-- END PAGE LEVEL PLUGINS -->
<script>
$
().
ready
(
function
()
{
Cfapp
.
init
();
recdTypeAdd
.
init
();
});
var
recdTypeAdd
=
function
()
{
var
initForm
=
function
()
{
var
initFormCtrl
=
function
()
{
bindEvent
();
};
var
bindEvent
=
function
()
{
$
(
"#myForm"
).
validate
({
rules
:
{},
messages
:
{},
submitHandler
:
function
(
form
)
{
$
(
"#save"
).
attr
(
"disabled"
,
true
);
$
.
getJSON
(
"#springUrl('/a/productIntoWareroom/formData')"
,
$
(
"#myForm"
).
serialize
(),
function
(
returnobj
)
{
$
(
"#save"
).
attr
(
"disabled"
,
false
);
if
(
returnobj
.
errorNo
==
2
)
{
//保存成功
Cfapp
.
confirm
({
message
:
"添加成功"
,
btnoktext
:
"继续添加"
,
btncanceltext
:
"关闭"
,
success
:
function
()
{
location
.
href
=
"#springUrl('/a/productIntoWareroom/form')"
;
},
cancel
:
function
()
{
location
.
href
=
"#springUrl('/a/productIntoWareroom/list')"
;
}
});
}
else
if
(
returnobj
.
errorNo
==
0
)
{
//修改成功
Cfapp
.
alert
({
message
:
"更新成功"
,
btntext
:
"确定"
,
success
:
function
()
{
location
.
href
=
"#springUrl('/a/productIntoWareroom/list')"
;
}
});
}
else
{
Cfapp
.
alert
({
message
:
"创建失败"
,
btntext
:
"确定"
,
success
:
function
()
{
location
.
href
=
"#springUrl('/a/productIntoWareroom/list')"
;
}
});
}
});
}
})
}
initFormCtrl
();
}
return
{
//main function to initiate the module
init
:
function
()
{
initForm
();
}
};
}();
</script>
</body>
<!-- END BODY -->
</html>
\ No newline at end of file
aidea-modules/product-into-wareroom-module-web/src/main/webapp/WEB-INF/views/productIntoWareroom/productIntoWareroomlist.html
0 → 100644
View file @
fb78ecff
<!DOCTYPE html>
<!--[if IE 8]>
<html lang="en" class="ie8 no-js"> <![endif]-->
<!--[if IE 9]>
<html lang="en" class="ie9 no-js"> <![endif]-->
<!--[if !IE]><!-->
<html>
<!--<![endif]-->
<!-- BEGIN HEAD -->
<head>
<base
href=
"#springUrl('/assets/adminlte/')"
/>
<meta
charset=
"utf-8"
>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge"
>
<title>
工作台
</title>
<!-- Tell the browser to be responsive to screen width -->
<meta
content=
"width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"
name=
"viewport"
>
<!-- Bootstrap 3.3.5 -->
<link
rel=
"stylesheet"
href=
"bootstrap/css/bootstrap.min.css"
>
<!-- Font Awesome -->
<link
rel=
"stylesheet"
href=
"plugins/font-awesome/css/font-awesome.min.css"
>
<!-- Ionicons -->
<link
rel=
"stylesheet"
href=
"plugins/ionicons/css/ionicons.min.css"
>
<!-- DataTables -->
<link
rel=
"stylesheet"
href=
"plugins/datatables/dataTables.bootstrap.css"
>
<!-- Theme style -->
<link
rel=
"stylesheet"
href=
"dist/css/AdminLTE.min.css"
>
<!-- AdminLTE Skins. Choose a skin from the css/skins
folder instead of downloading all of them to reduce the load. -->
<link
rel=
"stylesheet"
href=
"dist/css/skins/_all-skins.min.css"
>
<!-- iCheck -->
<link
rel=
"stylesheet"
href=
"plugins/iCheck/flat/blue.css"
>
<!-- Morris chart -->
<link
rel=
"stylesheet"
href=
"plugins/morris/morris.css"
>
<!-- jvectormap -->
<link
rel=
"stylesheet"
href=
"plugins/jvectormap/jquery-jvectormap-1.2.2.css"
>
<!-- Date Picker -->
<link
rel=
"stylesheet"
href=
"plugins/datepicker/datepicker3.css"
>
<!-- Daterange picker -->
<link
rel=
"stylesheet"
href=
"plugins/daterangepicker/daterangepicker-bs3.css"
>
<link
rel=
"stylesheet"
href=
"plugins\bootstrap-fileinput\fileinput.min.css"
>
<!-- bootstrap wysihtml5 - text editor -->
<link
rel=
"stylesheet"
href=
"plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css"
>
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body
class=
"hold-transition skin-blue sidebar-mini"
>
<div
class=
"wrapper"
>
<div
class=
"content-wrapper"
style=
"margin-left:0;"
>
<div
id=
"importExcelDiv"
></div>
<section
class=
"content-header"
>
<h1>
产品入库单管理
<small>
产品入库单
</small>
</h1>
<ol
class=
"breadcrumb"
>
<li><a><i
class=
"fa fa-dashboard"
></i>
首页
</a></li>
<li><a
class=
"active"
>
产品入库单管理列表
</a></li>
</ol>
</section>
<!-- Main content -->
<section
class=
"content"
>
<div
class=
"row"
>
<div
class=
"col-xs-12"
>
<div
class=
"box"
>
<div
class=
"box-header"
>
<form
id=
"seachTableForm"
action=
"#springUrl('/a/productIntoWareroom/list')"
method=
"get"
>
<div
class=
"col-xs-2"
>
<input
type=
"text"
class=
"form-control "
name=
"intoWareroomNumber"
placeholder=
"入库编码"
>
</div>
<div
class=
"col-xs-2"
>
<div
class=
"input-group date"
>
<div
class=
"input-group-addon"
>
<i
class=
"fa fa-calendar"
></i>
</div>
<input
type=
"text"
class=
"form-control pull-right datepicker"
value=
"$!{startTime}"
name=
"startTime"
placeholder=
"入库时间"
readonly=
"readonly"
>
</div>
</div>
<div
class=
"col-xs-5"
>
<button
type=
"button"
class=
"search btn btn-primary"
>
搜索
</button>
#if($shiro.hasPermission("qy:productIntoWareroom:edit"))
<!-- <a href="#springUrl('/a/productIntoWareroom/form')" class="btn btn-primary">新增</a>-->
<a
href=
"#springUrl('/a/productIntoWareroom/exportExcel')"
class=
"btn btn-primary"
>
导出
</a>
<!-- <a onclick="importExcel();" class="btn btn-primary">导入</a>-->
#end
</div>
</form>
</div>
<!-- /.box-header -->
<div
class=
"box-body"
>
<table
id=
"table"
class=
"table table-bordered table-striped"
>
<thead>
<tr>
<td
hidden=
"true"
>
Id
</td>
<td>
入库编码
</td>
<td>
商品分类编码
</td>
<td>
商品SKU码
</td>
<td>
商品编码
</td>
<td>
商品名称
</td>
<td>
商品数量
</td>
<th>
创建时间
</th>
<th>
操作
</th>
</tr>
</thead>
<tbody
id=
"tablebody"
>
</tbody>
</table>
</div>
<!-- /.box-body -->
</div>
<!-- /.box -->
</div>
<!-- /.col -->
</div>
<!-- /.row -->
</section>
<!-- /.content -->
</div>
<!-- /.content-wrapper -->
<!-- Add the sidebar's background. This div must be placed
immediately after the control sidebar -->
<div
class=
"control-sidebar-bg"
></div>
</div>
<!-- ./wrapper -->
<!-- jQuery 2.1.4 -->
<script
src=
"plugins/jQuery/jQuery-2.1.4.min.js"
></script>
<!-- Bootstrap 3.3.5 -->
<script
src=
"bootstrap/js/bootstrap.min.js"
></script>
<!-- DataTables -->
<script
src=
"plugins/datatables/jquery.dataTables.min.js"
></script>
<script
src=
"plugins/datatables/extensions/i18n/lanauage_ch.js"
></script>
<script
src=
"plugins/datatables/dataTables.bootstrap.min.js"
></script>
<!-- SlimScroll -->
<script
src=
"plugins/slimScroll/jquery.slimscroll.min.js"
></script>
<script
src=
"plugins/datepicker/bootstrap-datepicker.js"
></script>
<script
src=
"plugins/datepicker/locales/bootstrap-datepicker.zh-CN.js"
></script>
<!-- FastClick -->
<script
src=
"plugins/fastclick/fastclick.min.js"
></script>
<!--fileinput js-->
<script
src=
"plugins\bootstrap-fileinput\fileinput.js"
></script>
<script
src=
"plugins/bootstrap-fileinput/zh.js"
></script>
<script
src=
"plugins/bootstrap-fileinput/zh2.js"
></script>
<!-- AdminLTE App -->
<script
src=
"dist/js/app.min.js"
></script>
<script
type=
"text/javascript"
src=
"plugins/jquery-validation/js/jquery.validate.min.js"
></script>
<!-- AdminLTE for demo purposes -->
<script
src=
"common/js/cfapp.js"
></script>
<script>
function
formatDates
(
now
)
{
var
now
=
new
Date
(
now
);
var
year
=
now
.
getFullYear
();
var
month
=
now
.
getMonth
()
+
1
;
var
date
=
now
.
getDate
();
var
hour
=
now
.
getHours
();
var
minute
=
now
.
getMinutes
();
var
second
=
now
.
getSeconds
();
return
year
+
"-"
+
month
+
"-"
+
date
+
" "
+
hour
+
":"
+
minute
+
":"
+
second
;
}
function
seachTable
()
{
var
sSource
=
"#springUrl('/a/productIntoWareroom/listData')"
;
var
aoData
=
{
iDisplayStart
:
1
,
iDosplayLength
:
10
}
var
retrieveData
=
function
(
sSource
,
aoData
,
fnCallback
)
{
$
(
"#seachTableForm input"
).
each
(
function
()
{
var
params
=
{
name
:
$
(
this
).
attr
(
"name"
),
value
:
$
(
this
).
val
()
};
aoData
.
push
(
params
);
})
$
.
ajax
({
"type"
:
"GET"
,
"url"
:
sSource
,
"dataType"
:
"json"
,
"data"
:
aoData
,
//以json格式传递
"success"
:
fnCallback
});
};
$
(
'#table'
).
DataTable
({
"lengthChange"
:
false
,
"searching"
:
false
,
"ordering"
:
false
,
"bFiltered"
:
false
,
"bStateSave"
:
true
,
// save datatable state(pagination, sort, etc) in cookie.
"bProcessing"
:
true
,
"bServerSide"
:
true
,
"sAjaxSource"
:
sSource
,
"fnServerData"
:
retrieveData
,
"pagingType"
:
"full_numbers"
,
"aoColumns"
:
[
{
"mData"
:
"id"
},
{
"mData"
:
"intoWareroomNumber"
},
{
"mData"
:
"productClassifyNumber"
},
{
"mData"
:
"productSkuNumber"
},
{
"mData"
:
"productNumber"
},
{
"mData"
:
"productName"
},
{
"mData"
:
"productAmount"
},
{
"mData"
:
"createTime"
},
{
"mData"
:
"id"
}],
"aoColumnDefs"
:
[
{
// set default column settings
'visible'
:
false
,
'targets'
:
[
0
]
},
{
"aTargets"
:
[
7
],
"mData"
:
"createTime"
,
"mRender"
:
function
(
a
,
b
,
c
,
d
)
{
return
formatDates
(
a
,
"yyyy-MM-dd HH:mm:ss"
);
}
},
{
"aTargets"
:
[
8
],
"mData"
:
"id"
,
"mRender"
:
function
(
a
,
b
,
c
,
d
)
{
var
html
=
'#if($shiro.hasPermission("qy:productIntoWareroom:edit"))'
;
//
// html += '
<
a
href
=
"#springUrl("
/
a
/
productIntoWareroom
/
form
?
id
=
' + a + '
")"
data
-
id
=
"' + a + '"
data
-
action
=
"view"
class
=
"btn green"
>
修改
<
/a>'
;
html
+=
'<a href="javascript:void(0);" data-id="'
+
a
+
'" data-action="remove" onclick="removeData('
+
a
+
')" class="btn red">删除</a>'
;
html
+=
'#end'
;
return
html
;
}
},
]
});
}
jQuery
(
document
).
ready
(
function
()
{
seachTable
();
$
(
'.datepicker'
).
datepicker
({
show
:
true
,
format
:
'yyyy-mm-dd'
,
autoclose
:
true
,
language
:
'zh-CN'
,
todayBtn
:
'linked'
,
clearBtn
:
'linked'
});
$
(
'.search'
).
click
(
function
()
{
$
(
"#table"
).
dataTable
().
fnClearTable
();
});
});
Cfapp
.
init
();
function
removeData
(
data
)
{
Cfapp
.
confirm
({
message
:
"确定要删除吗"
,
btnoktext
:
"确定"
,
btncanceltext
:
"取消"
,
success
:
function
()
{
$
.
ajax
({
type
:
"POST"
,
url
:
"#springUrl('/a/productIntoWareroom/delete')"
,
data
:
{
id
:
data
},
dataType
:
"json"
,
success
:
function
(
data
)
{
if
(
data
.
errorNo
==
0
)
{
Cfapp
.
alert
({
message
:
"删除成功"
,
btntext
:
"确定"
,
success
:
function
()
{
location
.
href
=
"#springUrl('/a/productIntoWareroom/list')"
;
}
});
}
},
error
:
function
()
{
}
})
},
cancel
:
function
()
{
$
(
".modal-backdrop"
).
fadeOut
();
}
});
}
function
importExcel
()
{
var
templateExcelUrl
=
"#springUrl('/a/productIntoWareroom/templateExcel')"
;
var
importExcelUrl
=
"#springUrl('/a/productIntoWareroom/importExcel')"
;
Cfapp
.
importExcel
({
title
:
'产品入库单导入'
,
importurl
:
importExcelUrl
,
templateurl
:
templateExcelUrl
,
cancel
:
function
()
{
},
success
:
function
()
{
}
});
}
</script>
</body>
</html>
aidea-modules/product-into-wareroom-module/pom.xml
0 → 100644
View file @
fb78ecff
<?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"
>
<parent>
<artifactId>
aidea-modules
</artifactId>
<groupId>
com.cftech
</groupId>
<version>
1.0-SNAPSHOT
</version>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<artifactId>
product-into-wareroom-module
</artifactId>
<dependencies>
<dependency>
<groupId>
com.cftech
</groupId>
<artifactId>
sys-module
</artifactId>
<version>
1.0-SNAPSHOT
</version>
<scope>
compile
</scope>
</dependency>
</dependencies>
</project>
\ No newline at end of file
aidea-modules/product-into-wareroom-module/src/main/java/com/cftech/productintowareroom/dao/ProductIntoWareroomMapper.java
0 → 100644
View file @
fb78ecff
package
com
.
cftech
.
productintowareroom
.
dao
;
import
com.cftech.productintowareroom.model.ProductIntoWareroom
;
import
com.cftech.core.generic.GenericDao
;
/**
* 产品入库单Mapper
*
* @author Buyj
* @date: 2020-09-27 17:38
*/
public
interface
ProductIntoWareroomMapper
extends
GenericDao
<
ProductIntoWareroom
>
{
}
\ No newline at end of file
aidea-modules/product-into-wareroom-module/src/main/java/com/cftech/productintowareroom/dao/ProductIntoWareroomMapper.xml
0 → 100644
View file @
fb78ecff
<?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=
"com.cftech.productintowareroom.dao.ProductIntoWareroomMapper"
>
<resultMap
id=
"resultMap"
type=
"com.cftech.productintowareroom.model.ProductIntoWareroom"
>
<id
column=
"id"
property=
"id"
/>
<result
column=
"into_wareroom_number"
property=
"intoWareroomNumber"
/>
<result
column=
"out_wareroom_number"
property=
"outWareroomNumber"
/>
<result
column=
"product_sku_number"
property=
"productSkuNumber"
/>
<result
column=
"product_number"
property=
"productNumber"
/>
<result
column=
"product_name"
property=
"productName"
/>
<result
column=
"product_amount"
property=
"productAmount"
/>
<result
column=
"accounts_id"
property=
"accountsId"
/>
<result
column=
"del_flag"
property=
"delFlag"
/>
<result
column=
"status"
property=
"status"
/>
<result
column=
"create_time"
property=
"createTime"
/>
<result
column=
"update_time"
property=
"updateTime"
/>
<result
column=
"description"
property=
"description"
/>
<result
column=
"create_by"
property=
"createBy"
/>
<result
column=
"update_by"
property=
"updateBy"
/>
<result
column=
"product_classify_number"
property=
"productClassifyNumber"
/>
</resultMap>
<sql
id=
"sqlWhere"
>
<if
test=
"conds!=null"
>
<trim
prefix=
"WHERE"
prefixOverrides=
"AND|OR"
>
<foreach
collection=
"conds.conds"
index=
"index"
item=
"cond"
>
${cond.linkType}
<if
test=
"cond.condType == 'EQUAL'"
>
${cond.param} = #{cond.value}
</if>
<if
test=
"cond.condType == 'NOTEQUAL'"
>
${cond.param}
<>
#{cond.value}
</if>
<if
test=
"cond.condType == 'GREATEQUAL'"
>
${cond.param}
>
= #{cond.value}
</if>
<if
test=
"cond.condType == 'GREATTHAN'"
>
${cond.param}
>
#{cond.value}
</if>
<if
test=
"cond.condType == 'LESSEQUAL'"
>
${cond.param}
<
= #{cond.value}
</if>
<if
test=
"cond.condType == 'LESSTHAN'"
>
${cond.param}
<
#{cond.value}
</if>
<if
test=
"cond.condType == 'BETWEEN'"
>
${cond.param} BETWEEN #{cond.startValue} AND
#{cond.endValue}
</if>
<if
test=
"cond.condType == 'ISNULL'"
>
${cond.param} IS NULL
</if>
<if
test=
"cond.condType == 'NOTNULL'"
>
${cond.param} IS NOT NULL
</if>
<if
test=
"cond.condType == 'LIKE'"
>
${cond.param} LIKE #{cond.value}
</if>
<if
test=
"cond.condType == 'IN'"
>
${cond.param} IN
<foreach
item=
"item"
index=
"index"
collection=
"cond.value"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</if>
</foreach>
</trim>
</if>
</sql>
<sql
id=
"sqlColumns"
>
id,
into_wareroom_number,
out_wareroom_number,
product_sku_number,
product_number,
product_name,
product_amount,
accounts_id,
del_flag,
status,
create_time,
update_time,
description,
create_by,
update_by,
product_classify_number
</sql>
<insert
id=
"save"
parameterType=
"com.cftech.productintowareroom.model.ProductIntoWareroom"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
insert into t_aidea_product_into_wareroom
(
<include
refid=
"sqlColumns"
/>
)
values
(
#{id, jdbcType=BIGINT},
#{intoWareroomNumber, jdbcType=VARCHAR},
#{outWareroomNumber, jdbcType=VARCHAR},
#{productSkuNumber, jdbcType=VARCHAR},
#{productNumber, jdbcType=VARCHAR},
#{productName, jdbcType=VARCHAR},
#{productAmount, jdbcType=BIGINT},
#{accountsId, jdbcType=BIGINT},
#{delFlag, jdbcType=TINYINT},
#{status, jdbcType=VARCHAR},
now(),
now(),
#{description, jdbcType=VARCHAR},
#{createBy, jdbcType=BIGINT},
#{updateBy, jdbcType=BIGINT},
#{productClassifyNumber,jdbcType=VARCHAR}
)
</insert>
<select
id=
"fetchById"
parameterType=
"java.lang.Long"
resultMap=
"resultMap"
>
SELECT
<include
refid=
"sqlColumns"
/>
FROM t_aidea_product_into_wareroom t
WHERE t.id=#{id}
</select>
<select
id=
"count"
parameterType=
"java.util.Map"
resultType=
"java.lang.Integer"
>
SELECT COUNT(1) FROM t_aidea_product_into_wareroom
<include
refid=
"sqlWhere"
/>
</select>
<select
id=
"fetchSearchByPage"
parameterType=
"java.util.Map"
resultMap=
"resultMap"
>
SELECT
<include
refid=
"sqlColumns"
/>
FROM t_aidea_product_into_wareroom
<include
refid=
"sqlWhere"
/>
<if
test=
"sort!=null"
>
ORDER BY ${sort.param} ${sort.type}
</if>
<if
test=
"limit>0"
>
limit #{offset},#{limit}
</if>
</select>
<update
id=
"update"
parameterType=
"com.cftech.productintowareroom.model.ProductIntoWareroom"
>
update t_aidea_product_into_wareroom
<set>
<if
test=
"id != null"
>
id = #{id, jdbcType=BIGINT},
</if>
<if
test=
"intoWareroomNumber != null"
>
into_wareroom_number = #{intoWareroomNumber, jdbcType=VARCHAR},
</if>
<if
test=
"outWareroomNumber != null"
>
out_wareroom_number = #{outWareroomNumber, jdbcType=VARCHAR},
</if>
<if
test=
"productSkuNumber != null"
>
product_sku_number = #{productSkuNumber, jdbcType=VARCHAR},
</if>
<if
test=
"productNumber != null"
>
product_number = #{productNumber, jdbcType=VARCHAR},
</if>
<if
test=
"productName != null"
>
product_name = #{productName, jdbcType=VARCHAR},
</if>
<if
test=
"productAmount != null"
>
product_amount = #{productAmount, jdbcType=BIGINT},
</if>
<if
test=
"accountsId != null"
>
accounts_id = #{accountsId, jdbcType=BIGINT},
</if>
<if
test=
"delFlag != null"
>
del_flag = #{delFlag, jdbcType=TINYINT},
</if>
<if
test=
"status != null"
>
status = #{status, jdbcType=VARCHAR},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime, jdbcType=TIMESTAMP},
</if>
<if
test=
"description != null"
>
description = #{description, jdbcType=VARCHAR},
</if>
<if
test=
"createBy != null"
>
create_by = #{createBy, jdbcType=BIGINT},
</if>
<if
test=
"updateBy != null"
>
update_by = #{updateBy, jdbcType=BIGINT},
</if>
</set>
where id=#{id,jdbcType=BIGINT}
</update>
<update
id=
"delete"
parameterType=
"java.lang.Long"
>
update t_aidea_product_into_wareroom set del_flag=1 where id=#{id,jdbcType=BIGINT}
</update>
</mapper>
\ No newline at end of file
aidea-modules/product-into-wareroom-module/src/main/java/com/cftech/productintowareroom/model/ProductIntoWareroom.java
0 → 100644
View file @
fb78ecff
package
com
.
cftech
.
productintowareroom
.
model
;
import
com.cftech.core.poi.ExportConfig
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* 产品入库单
*
* @author Buyj
* @date: 2020-09-27 17:38
*/
@Data
public
class
ProductIntoWareroom
implements
Serializable
{
/* 主键id */
private
Long
id
;
/* 入库编码 */
@ExportConfig
(
value
=
"入库编码"
,
width
=
150
,
showLevel
=
1
)
private
String
intoWareroomNumber
;
/* 出库编码 */
private
String
outWareroomNumber
;
/* 商品SKU码 */
@ExportConfig
(
value
=
"商品SKU码"
,
width
=
150
,
showLevel
=
1
)
private
String
productSkuNumber
;
/* 商品编码 */
@ExportConfig
(
value
=
"商品编码"
,
width
=
150
,
showLevel
=
1
)
private
String
productNumber
;
/* 商品名称 */
@ExportConfig
(
value
=
"商品名称"
,
width
=
150
,
showLevel
=
1
)
private
String
productName
;
/* 商品数量 */
@ExportConfig
(
value
=
"商品数量"
,
width
=
150
,
showLevel
=
1
)
private
Long
productAmount
;
/**
* 商品分类编码
*/
@ExportConfig
(
value
=
"商品分类编码"
,
width
=
150
,
showLevel
=
1
)
private
String
productClassifyNumber
;
/* 所属的账号 */
private
Long
accountsId
;
/* 删除标识 */
private
boolean
delFlag
;
/* 状态 */
private
String
status
;
/* 创建时间 */
private
Date
createTime
;
/* 更新时间 */
private
Date
updateTime
;
/* 备注 */
private
String
description
;
/* 创建人 */
private
Long
createBy
;
/* 更新人 */
private
Long
updateBy
;
public
ProductIntoWareroom
()
{
this
.
delFlag
=
false
;
this
.
status
=
"0"
;
}
}
\ No newline at end of file
aidea-modules/product-into-wareroom-module/src/main/java/com/cftech/productintowareroom/service/ProductIntoWareroomService.java
0 → 100644
View file @
fb78ecff
package
com
.
cftech
.
productintowareroom
.
service
;
import
com.cftech.productintowareroom.model.ProductIntoWareroom
;
import
com.cftech.core.generic.GenericService
;
/**
* 产品入库单Service
*
* @author Buyj
* @date: 2020-09-27 17:38
*/
public
interface
ProductIntoWareroomService
extends
GenericService
<
ProductIntoWareroom
>
{
}
aidea-modules/product-into-wareroom-module/src/main/java/com/cftech/productintowareroom/service/impl/ProductIntoWareroomServiceImpl.java
0 → 100644
View file @
fb78ecff
package
com
.
cftech
.
productintowareroom
.
service
.
impl
;
import
com.cftech.productintowareroom.model.ProductIntoWareroom
;
import
com.cftech.productintowareroom.dao.ProductIntoWareroomMapper
;
import
com.cftech.productintowareroom.service.ProductIntoWareroomService
;
import
com.cftech.core.generic.GenericDao
;
import
com.cftech.core.generic.GenericServiceImpl
;
import
com.cftech.core.sql.Conds
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Qualifier
;
import
org.springframework.stereotype.Service
;
/**
* 产品入库单ServiceImpl
*
* @author Buyj
* @date: 2020-09-27 17:38
*/
@Service
(
"productIntoWareroomService"
)
public
class
ProductIntoWareroomServiceImpl
extends
GenericServiceImpl
<
ProductIntoWareroom
>
implements
ProductIntoWareroomService
{
@Autowired
@Qualifier
(
"productIntoWareroomMapper"
)
private
ProductIntoWareroomMapper
productIntoWareroomMapper
;
@Override
public
GenericDao
<
ProductIntoWareroom
>
getGenericMapper
()
{
return
productIntoWareroomMapper
;
}
}
\ No newline at end of file
aidea-modules/product-into-wareroom-module/src/main/java/com/cftech/productintowareroom/web/ProductIntoWareroomController.java
0 → 100644
View file @
fb78ecff
package
com
.
cftech
.
productintowareroom
.
web
;
import
com.alibaba.fastjson.JSONObject
;
import
com.cftech.productintowareroom.model.ProductIntoWareroom
;
import
com.cftech.productintowareroom.service.ProductIntoWareroomService
;
import
com.cftech.core.poi.ExcelKit
;
import
com.cftech.core.scope.OrderType
;
import
com.cftech.core.sql.Conds
;
import
com.cftech.core.sql.Sort
;
import
com.cftech.core.util.Constants
;
import
com.cftech.sys.security.PermissionSign
;
import
com.cftech.sys.security.UserUtils
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.ui.Model
;
import
org.springframework.util.StringUtils
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.springframework.web.multipart.MultipartFile
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.File
;
import
java.io.IOException
;
import
java.util.List
;
/**
* 产品入库单Controller
* <p>
* 权限字符串说明:
* 查看:public static final String PRODUCTINTOWAREROOM_VIEW = "qy:productIntoWareroom:view"
* 查看:public static final String PRODUCTINTOWAREROOM_EDIT = "qy:productIntoWareroom:edit"
*
* @author Buyj
* @date: 2020-09-27 17:38
*/
@Slf4j
@Controller
@RequestMapping
(
"/a/productIntoWareroom"
)
public
class
ProductIntoWareroomController
{
public
static
final
String
PRODUCTINTOWAREROOM_VIEW
=
"qy:productIntoWareroom:view"
;
public
static
final
String
PRODUCTINTOWAREROOM_EDIT
=
"qy:productIntoWareroom:edit"
;
@Autowired
private
ProductIntoWareroomService
productIntoWareroomService
;
//列表页面
@RequiresPermissions
(
value
=
PRODUCTINTOWAREROOM_VIEW
)
@RequestMapping
(
"/list"
)
public
String
list
(
HttpServletRequest
request
,
Model
model
)
{
Long
accountId
=
UserUtils
.
getmpaccounts
(
request
);
model
.
addAttribute
(
"accountId"
,
accountId
);
return
"productIntoWareroom/productIntoWareroomlist"
;
}
//编辑页面(新增、修改)
@RequiresPermissions
(
value
=
PRODUCTINTOWAREROOM_VIEW
)
@RequestMapping
(
"/form"
)
public
String
form
(
HttpServletRequest
request
,
String
id
,
Model
model
)
{
if
(!
StringUtils
.
isEmpty
(
id
))
{
ProductIntoWareroom
productIntoWareroom
=
productIntoWareroomService
.
fetchById
(
id
);
model
.
addAttribute
(
"data"
,
productIntoWareroom
);
}
return
"productIntoWareroom/productIntoWareroomform"
;
}
//提交数据(新增、修改)
@RequiresPermissions
(
value
=
PRODUCTINTOWAREROOM_EDIT
)
@RequestMapping
(
"/formData"
)
@ResponseBody
public
JSONObject
formData
(
ProductIntoWareroom
productIntoWareroom
,
Model
model
,
HttpServletRequest
request
)
{
Long
accountsId
=
UserUtils
.
getmpaccounts
(
request
);
JSONObject
rtnJson
=
new
JSONObject
();
try
{
if
(
productIntoWareroom
!=
null
&&
productIntoWareroom
.
getId
()
!=
null
)
{
productIntoWareroom
.
setUpdateBy
(
UserUtils
.
getUser
().
getId
());
productIntoWareroomService
.
update
(
productIntoWareroom
);
rtnJson
.
put
(
"errorNo"
,
0
);
}
else
{
productIntoWareroom
.
setAccountsId
(
accountsId
);
productIntoWareroom
.
setDelFlag
(
false
);
productIntoWareroom
.
setAccountsId
(
UserUtils
.
getmpaccounts
(
request
));
productIntoWareroom
.
setCreateBy
(
UserUtils
.
getUser
().
getId
());
productIntoWareroom
.
setUpdateBy
(
UserUtils
.
getUser
().
getId
());
productIntoWareroomService
.
save
(
productIntoWareroom
);
rtnJson
.
put
(
"errorNo"
,
2
);
}
}
catch
(
Exception
e
)
{
rtnJson
.
put
(
"errorNo"
,
1
);
}
return
rtnJson
;
}
//获取列表数据
@RequiresPermissions
(
value
=
PRODUCTINTOWAREROOM_VIEW
)
@RequestMapping
(
value
=
"/listData"
)
@ResponseBody
public
JSONObject
listData
(
int
iDisplayStart
,
int
iDisplayLength
,
ProductIntoWareroom
productIntoWareroom
,
HttpServletRequest
request
,
String
startTime
)
{
Long
accountsId
=
UserUtils
.
getmpaccounts
(
request
);
Conds
conds
=
new
Conds
();
conds
.
equal
(
"del_flag"
,
Constants
.
DEL_FLAG_0
);
conds
.
equal
(
"accounts_id"
,
accountsId
);
if
(!
StringUtils
.
isEmpty
(
productIntoWareroom
.
getIntoWareroomNumber
())){
conds
.
like
(
"into_wareroom_number"
,
productIntoWareroom
.
getIntoWareroomNumber
());
}
if
(!
StringUtils
.
isEmpty
(
startTime
)){
conds
.
equal
(
"DATE_FORMAT(create_time,'%Y-%m-%d')"
,
startTime
);
}
Sort
sort
=
new
Sort
(
"create_time"
,
OrderType
.
DESC
);
List
<
ProductIntoWareroom
>
list
=
productIntoWareroomService
.
fetchSearchByPage
(
conds
,
sort
,
iDisplayStart
,
iDisplayLength
);
Integer
counts
=
productIntoWareroomService
.
count
(
conds
);
JSONObject
rtnJson
=
new
JSONObject
();
rtnJson
.
put
(
"iTotalRecords"
,
counts
);
rtnJson
.
put
(
"iTotalDisplayRecords"
,
counts
);
rtnJson
.
put
(
"aaData"
,
list
);
return
rtnJson
;
}
//删除数据
@RequiresPermissions
(
value
=
PRODUCTINTOWAREROOM_EDIT
)
@RequestMapping
(
"/delete"
)
@ResponseBody
public
JSONObject
delete
(
String
id
)
{
JSONObject
rtnJosn
=
new
JSONObject
();
try
{
productIntoWareroomService
.
delete
(
id
);
rtnJosn
.
put
(
"errorNo"
,
0
);
}
catch
(
Exception
e
)
{
rtnJosn
.
put
(
"errorNo"
,
1
);
}
return
rtnJosn
;
}
@RequestMapping
(
"/exportExcel"
)
@RequiresPermissions
(
value
=
PRODUCTINTOWAREROOM_VIEW
)
public
void
exportExcel
(
HttpServletRequest
request
,
HttpServletResponse
response
)
{
Long
accountId
=
UserUtils
.
getmpaccounts
(
request
);
Sort
sort
=
new
Sort
(
"create_time"
,
OrderType
.
ASC
);
Conds
conds
=
new
Conds
();
conds
.
equal
(
"del_flag"
,
0
);
conds
.
equal
(
"accounts_id"
,
accountId
);
List
<
ProductIntoWareroom
>
list
=
productIntoWareroomService
.
fetchSearchByPage
(
conds
,
sort
,
0
,
0
);
ExcelKit
.
$Export
(
ProductIntoWareroom
.
class
,
response
).
toExcel
(
list
,
"产品入库单信息"
);
}
@RequestMapping
(
"/templateExcel"
)
@RequiresPermissions
(
value
=
PRODUCTINTOWAREROOM_VIEW
)
public
void
templateExcel
(
HttpServletRequest
request
,
HttpServletResponse
response
)
{
ExcelKit
.
$Export
(
ProductIntoWareroom
.
class
,
response
).
toExcel
(
null
,
"产品入库单信息"
);
}
@RequestMapping
(
"/importExcel"
)
@RequiresPermissions
(
value
=
PRODUCTINTOWAREROOM_EDIT
)
public
String
importExcel
(
HttpServletRequest
request
,
MultipartFile
file
,
Model
model
)
{
Long
accountId
=
UserUtils
.
getmpaccounts
(
request
);
if
(
file
==
null
)
{
return
list
(
request
,
model
);
}
// 构造临时路径来存储上传的文件
String
uploadPath
=
System
.
getProperty
(
"java.io.tmpdir"
);
File
uploadDir
=
new
File
(
uploadPath
);
if
(!
uploadDir
.
exists
())
{
uploadDir
.
mkdir
();
}
String
fileName
=
file
.
getOriginalFilename
();
String
filePath
=
uploadPath
+
File
.
separator
+
fileName
;
File
storeFile
=
new
File
(
filePath
);
try
{
file
.
transferTo
(
storeFile
);
ExcelKit
.
$Import
().
setEmptyCellValue
(
""
).
readExcel
(
storeFile
,
rowData
->
{
if
(!
StringUtils
.
isEmpty
(
rowData
.
get
(
0
)))
{
ProductIntoWareroom
productIntoWareroom
=
new
ProductIntoWareroom
();
productIntoWareroom
.
setAccountsId
(
accountId
);
productIntoWareroomService
.
save
(
productIntoWareroom
);
}
});
}
catch
(
IOException
e
)
{
log
.
error
(
e
.
getMessage
());
}
return
list
(
request
,
model
);
}
}
aidea-modules/product-module-web/pom.xml
0 → 100644
View file @
fb78ecff
<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/maven-v4_0_0.xsd"
>
<parent>
<artifactId>
aidea-modules
</artifactId>
<groupId>
com.cftech
</groupId>
<version>
1.0-SNAPSHOT
</version>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<artifactId>
product-module-web
</artifactId>
<packaging>
war
</packaging>
<name>
product-module-web Maven Webapp
</name>
<url>
http://maven.apache.org
</url>
<dependencies>
<dependency>
<groupId>
junit
</groupId>
<artifactId>
junit
</artifactId>
<version>
3.8.1
</version>
<scope>
test
</scope>
</dependency>
<dependency>
<groupId>
com.cftech
</groupId>
<artifactId>
product-module
</artifactId>
<version>
1.0-SNAPSHOT
</version>
</dependency>
</dependencies>
<build>
<finalName>
product-module-web
</finalName>
</build>
</project>
aidea-modules/product-module-web/src/main/webapp/WEB-INF/views/product/productform.html
0 → 100644
View file @
fb78ecff
<!DOCTYPE html>
<!--[if IE 8]>
<html lang="en" class="ie8 no-js"> <![endif]-->
<!--[if IE 9]>
<html lang="en" class="ie9 no-js"> <![endif]-->
<!--[if !IE]><!-->
<html>
<!--<![endif]-->
<!-- BEGIN HEAD -->
<head>
<base
href=
"#springUrl('/assets/adminlte/')"
/>
<meta
charset=
"utf-8"
>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge"
>
<title>
工作台
</title>
<!-- Tell the browser to be responsive to screen width -->
<meta
content=
"width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"
name=
"viewport"
>
<!-- Bootstrap 3.3.5 -->
<link
rel=
"stylesheet"
href=
"bootstrap/css/bootstrap.min.css"
>
<!-- Font Awesome -->
<link
rel=
"stylesheet"
href=
"plugins/font-awesome/css/font-awesome.min.css"
>
<!-- Ionicons -->
<link
rel=
"stylesheet"
href=
"plugins/ionicons/css/ionicons.min.css"
>
<!-- DataTables -->
<link
rel=
"stylesheet"
href=
"plugins/datatables/dataTables.bootstrap.css"
>
<!-- Theme style -->
<link
rel=
"stylesheet"
href=
"dist/css/AdminLTE.min.css"
>
<!-- AdminLTE Skins. Choose a skin from the css/skins
folder instead of downloading all of them to reduce the load. -->
<link
rel=
"stylesheet"
href=
"dist/css/skins/_all-skins.min.css"
>
<!-- iCheck -->
<link
rel=
"stylesheet"
href=
"plugins/iCheck/flat/blue.css"
>
<!-- Date Picker -->
<link
rel=
"stylesheet"
href=
"plugins/datepicker/datepicker3.css"
>
<!-- Daterange picker -->
<link
rel=
"stylesheet"
href=
"plugins/daterangepicker/daterangepicker-bs3.css"
>
<!-- bootstrap wysihtml5 - text editor -->
<link
rel=
"stylesheet"
href=
"plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css"
>
<!--validate css-->
<link
rel=
"stylesheet"
href=
"plugins/jquery-validation/css/validate.css"
>
<!--fileinput css-->
<link
rel=
"stylesheet"
href=
"plugins/bootstrap-fileinput/bootstrap-fileinput.css"
>
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
<link
rel=
"stylesheet"
href=
"common/css/uePicPicker.css"
>
</head>
<!-- END HEAD -->
<body
class=
"hold-transition skin-blue sidebar-mini"
>
<div
class=
"wrapper"
>
<div
class=
"content-wrapper"
style=
"margin-left:0;"
>
<section
class=
"content-header"
>
<h1>
产品管理
<small>
产品
</small>
</h1>
<ol
class=
"breadcrumb"
>
<li><a
href=
"#"
><i
class=
"fa fa-dashboard"
></i>
首页
</a></li>
<li><a
class=
"active"
>
产品
</a></li>
</ol>
</section>
<!-- Main content -->
<section
class=
"content"
>
<div
class=
"row"
>
<div
class=
"col-xs-12"
>
<!-- general form elements disabled -->
<div
class=
"box box-primary"
>
<form
role=
"form"
id=
"myForm"
>
<input
name=
"id"
value=
"$!{data.id}"
hidden=
"true"
/>
<div
class=
"box-body"
>
</div>
<div
class=
"form-group form-md-line-input col-md-12"
>
<label>
所属分类
</label>
<div
class=
"input-group"
>
<input
type=
"text"
name=
"classifyId"
id=
"classifyId"
value=
"$!{data.classifyId}"
class=
"form-control"
style=
"display: none"
>
<input
type=
"text"
id=
"classifyName"
name=
"classifyName"
value=
"$!{data.classifyName}"
class=
"form-control"
disabled
>
<span
class=
"input-group-btn"
>
<button
type=
"button"
id=
"columnSelect"
class=
"btn btn-info btn-flat"
>
选择
</button>
</span>
</div>
</div>
<div
class=
"form-group form-md-line-input col-md-12"
id=
"img"
>
</div>
<div
class=
"form-group form-md-line-input col-md-12"
id=
"imgDetail"
>
</div>
<div
class=
"form-group form-md-line-input col-md-12"
>
<label>
产品名称
</label>
<input
type=
"text"
required
class=
"form-control pull-right"
value=
"$!{data.productName}"
maxlength=
"500"
required
name=
"productName"
placeholder=
"产品名称"
>
</div>
<div
class=
"form-group form-md-line-input col-md-12"
>
<label>
通用名
</label>
<input
type=
"text"
required
class=
"form-control pull-right"
value=
"$!{data.commonName}"
maxlength=
"500"
required
name=
"commonName"
placeholder=
"通用名"
>
</div>
<div
class=
"form-group form-md-line-input col-md-12"
>
<label>
剂型
</label>
<input
type=
"text"
required
class=
"form-control pull-right"
value=
"$!{data.dosagaFrom}"
maxlength=
"500"
required
name=
"dosagaFrom"
placeholder=
"剂型"
>
</div>
<div
class=
"form-group form-md-line-input col-md-12"
>
<label>
规格
</label>
<input
type=
"text"
required
class=
"form-control pull-right"
value=
"$!{data.format}"
maxlength=
"500"
required
name=
"format"
placeholder=
"规格"
>
</div>
<div
class=
"form-group form-md-line-input col-md-12"
>
<label>
批准文号
</label>
<input
type=
"text"
required
class=
"form-control pull-right"
value=
"$!{data.approveNumber}"
maxlength=
"500"
required
name=
"approveNumber"
placeholder=
"批准文号"
>
</div>
<div
class=
"form-group form-md-line-input col-md-12"
>
<label>
生产企业
</label>
<input
type=
"text"
required
class=
"form-control pull-right"
value=
"$!{data.manufacturer}"
maxlength=
"500"
required
name=
"manufacturer"
placeholder=
"生产企业"
>
</div>
<div
class=
"form-group form-md-line-input col-md-12"
>
<label>
推荐计量
</label>
<input
type=
"text"
required
class=
"form-control pull-right"
value=
"$!{data.recommendMeasure}"
maxlength=
"500"
required
name=
"recommendMeasure"
placeholder=
"推荐计量"
>
</div>
<div
class=
"form-group form-md-line-input col-md-12"
>
<label>
药品简介
</label>
<textarea
type=
"text"
required
class=
"form-control pull-right"
value=
""
maxlength=
"500"
required
name=
"description"
placeholder=
"药品简介"
>
$!{data.description}
</textarea>
</div>
<div
class=
"form-group form-md-line-input col-md-12"
>
<label>
温馨提示
</label>
<input
type=
"text"
required
class=
"form-control pull-right"
value=
"$!{data.tips}"
maxlength=
"500"
required
name=
"tips"
placeholder=
"温馨提示"
>
</div>
<div
class=
"form-group form-md-line-input col-md-12"
>
<label>
服用类型
</label>
<select
name=
"takeType"
class=
"form-control pull-right"
>
<option
label=
"天"
value=
"天"
>
天
</option>
<option
label=
"周"
value=
"周"
#
if
($
data
.
takeType =
=
'周')
selected
#
end
>
周
</option>
<option
label=
"月"
value=
"月"
#
if
($
data
.
takeType =
=
'月')
selected
#
end
>
月
</option>
</select>
</div>
<div
class=
"form-group form-md-line-input col-md-12"
>
<label>
服用频率
</label>
<input
type=
"text"
required
class=
"form-control pull-right"
value=
"$!{data.takeFrequency}"
maxlength=
"500"
required
name=
"takeFrequency"
placeholder=
"服用频率"
>
</div>
<div
class=
"form-group form-md-line-input col-md-12"
>
<label>
服用数量
</label>
<input
type=
"text"
required
class=
"form-control pull-right"
value=
"$!{data.takeAmount}"
maxlength=
"200"
required
name=
"takeAmount"
placeholder=
"服用数量"
>
</div>
<div
class=
"form-group form-md-line-input col-md-12"
>
<label>
库存
</label>
<input
type=
"text"
class=
"form-control pull-right"
value=
"$!{data.stock}"
maxlength=
"200"
readonly
name=
"stock"
placeholder=
"库存"
>
</div>
<div
class=
"form-group form-md-line-input col-md-12"
>
<label>
价格
</label>
<input
type=
"text"
required
class=
"form-control pull-right"
value=
"$!{data.price}"
maxlength=
"200"
required
name=
"price"
placeholder=
"价格"
>
</div>
<div
class=
"form-group form-md-line-input col-md-12"
>
<label>
是否为处方药
</label>
<select
name=
"isRs"
class=
"form-control pull-right"
>
<option
label=
"是"
value=
"是"
#
if
($
data
.
isRs =
=
'是')
selected
#
end
>
是
</option>
<option
label=
"否"
value=
"否"
#
if
($
data
.
isRs =
=
'否')
selected
#
end
>
否
</option>
</select>
</div>
<input
type=
"text"
style=
"display: none"
name=
"_csrf"
value=
"${_csrf.token}"
/>
<input
type=
"text"
style=
"display: none"
name=
"_csrf_header"
value=
"${_csrf.headerName}"
/>
<div
class=
"box-footer"
>
#if($shiro.hasPermission("qy:product:edit"))
<input
class=
"btn btn-primary"
id=
"save"
value=
"保存"
type=
"submit"
>
#end
<a
href=
"#springUrl('/a/product/list')"
class=
"btn btn-default"
>
取消
</a>
</div>
</form>
<!-- /.box-body -->
</div>
<!-- /.box -->
</div>
<!-- /.col -->
</div>
<!-- /.row -->
</section>
<!-- /.content -->
</div>
<!-- /.content-wrapper -->
<!-- Add the sidebar's background. This div must be placed
immediately after the control sidebar -->
<div
class=
"control-sidebar-bg"
></div>
</div>
<!-- ./wrapper -->
<script
src=
"plugins/jQuery/jQuery-2.1.4.min.js"
></script>
<!-- Bootstrap 3.3.5 -->
<script
src=
"bootstrap/js/bootstrap.min.js"
></script>
<!-- DataTables -->
<script
src=
"plugins/datatables/jquery.dataTables.min.js"
></script>
<script
src=
"plugins/datatables/extensions/i18n/lanauage_ch.js"
></script>
<script
src=
"plugins/datatables/dataTables.bootstrap.min.js"
></script>
<!-- SlimScroll -->
<script
src=
"plugins/slimScroll/jquery.slimscroll.min.js"
></script>
<!-- FastClick -->
<script
src=
"plugins/fastclick/fastclick.min.js"
></script>
<!--fileinput js-->
<script
src=
"plugins/bootstrap-fileinput/bootstrap-fileinput.js"
></script>
<!-- AdminLTE App -->
<script
src=
"dist/js/app.min.js"
></script>
<script
src=
"plugins/bootstrap-maxlength/bootstrap-maxlength.min.js"
type=
"text/javascript"
></script>
<script
src=
"plugins/security/sha256.js"
type=
"text/javascript"
></script>
<script
src=
"plugins/jquery-validation/js/jquery.validate.min.js"
></script>
<script
src=
"js/jquery.form.min.js"
></script>
<script
type=
"text/javascript"
charset=
"utf-8"
src=
"plugins/ueditor-min-1.4.3/ueditor.config.js"
></script>
<script
type=
"text/javascript"
charset=
"utf-8"
src=
"plugins/ueditor-min-1.4.3/ueditor.all.js"
></script>
<script
type=
"text/javascript"
charset=
"utf-8"
src=
"plugins/ueditor-min-1.4.3/lang/zh-cn/zh-cn.js"
></script>
<script
src=
"common/js/cfapp.js"
></script>
<script
src=
"js/jquery.serializejson.js"
></script>
<script
src=
"plugins/jquery-validation/js/localization/messages_zh.js"
></script>
<script
src=
"plugins/Sortable/Sortable.min.js"
></script>
<script
src=
"common/component/uePicPicker.js"
></script>
<!-- END PAGE LEVEL PLUGINS -->
<script>
$
().
ready
(
function
()
{
Cfapp
.
init
();
recdTypeAdd
.
init
();
initPicsSel
();
initPicsSelDetail
();
});
var
coverPP
=
null
;
var
coverPPDetail
=
null
;
var
initPicsSel
=
function
()
{
var
smallimg
=
"$!{data.productImg}"
;
coverPP
=
new
uePicPicker
({
tarId
:
'img'
,
title
:
'产品Banner图'
,
sizeDes
:
'205*202'
,
max
:
1
,
datas
:
smallimg
==
''
?
null
:
smallimg
.
split
(
","
),
success
:
null
});
coverPP
.
init
();
};
var
initPicsSelDetail
=
function
()
{
var
smallimg
=
"$!{data.productImgDetail}"
;
coverPPDetail
=
new
uePicPicker
({
tarId
:
'imgDetail'
,
title
:
'产品详情图'
,
sizeDes
:
'205*202'
,
max
:
3
,
datas
:
smallimg
==
''
?
null
:
smallimg
.
split
(
","
),
success
:
null
});
coverPPDetail
.
init
();
};
var
classify
=
"#springUrl('/a/productclassify/listData')"
;
$
(
"#columnSelect"
).
click
(
function
()
{
Cfapp
.
f7
({
dataUrl
:
classify
,
checkType
:
'single'
,
// 多选为multi
title
:
"选择产品分类"
,
btnoktext
:
"确定"
,
btncanceltext
:
"取消"
,
columns
:
[
'选择'
,
'产品分类名称'
,
'产品分类图片'
],
isSearch
:
'0'
,
searchColumns
:
[
"classifyName"
],
//搜索的字段名称
searchColumnsRemarks
:
[
'产品分类名称'
],
//搜索的字段备注
aoColumns
:
[{
"mData"
:
"id"
},
{
"mData"
:
"classifyName"
},
{
"mData"
:
"classifyImg"
}],
aoColumnDefs
:
[{
"aTargets"
:
[
0
],
"mData"
:
"id"
,
"mRender"
:
function
(
a
,
b
,
c
,
d
)
{
return
'<input type="radio" id="'
+
a
+
'" name="sel" data-value="'
+
a
+
'" data-name="'
+
c
.
classifyName
+
'">'
;
}
},
{
"aTargets"
:
[
2
],
"mData"
:
"classifyImg"
,
"mRender"
:
function
(
a
,
b
,
c
,
d
)
{
//a表示createtime对应的值,c表示当前记录行对象
return
"<img src='"
+
a
+
"' style='width: 80px;height:80px;' />"
;
}
}],
success
:
function
()
{
},
cancel
:
function
()
{
},
storeFields
:
'classifyId'
,
// 储存的字段
displayFields
:
'classifyName'
})
});
var
recdTypeAdd
=
function
()
{
var
initForm
=
function
()
{
var
initFormCtrl
=
function
()
{
bindEvent
();
};
var
bindEvent
=
function
()
{
$
(
"#myForm"
).
validate
({
rules
:
{},
messages
:
{},
submitHandler
:
function
(
form
)
{
$
(
"#save"
).
attr
(
"disabled"
,
true
);
var
data
=
$
(
"#myForm"
).
serializeJSON
();
var
productImg
=
coverPP
.
getStringValues
().
split
(
','
)[
0
];
var
productImgDetail
=
coverPPDetail
.
getStringValues
();
data
.
productImg
=
productImg
;
data
.
productImgDetail
=
productImgDetail
;
$
.
post
(
"#springUrl('/a/product/formData')"
,
data
,
function
(
returnobj
)
{
$
(
"#save"
).
attr
(
"disabled"
,
false
);
if
(
returnobj
.
errorNo
==
2
)
{
//保存成功
Cfapp
.
confirm
({
message
:
"添加成功"
,
btnoktext
:
"继续添加"
,
btncanceltext
:
"关闭"
,
success
:
function
()
{
location
.
href
=
"#springUrl('/a/product/form')"
;
},
cancel
:
function
()
{
location
.
href
=
"#springUrl('/a/product/list')"
;
}
});
}
else
if
(
returnobj
.
errorNo
==
0
)
{
//修改成功
Cfapp
.
alert
({
message
:
"更新成功"
,
btntext
:
"确定"
,
success
:
function
()
{
location
.
href
=
"#springUrl('/a/product/list')"
;
}
});
}
else
{
Cfapp
.
alert
({
message
:
"创建失败"
,
btntext
:
"确定"
,
success
:
function
()
{
location
.
href
=
"#springUrl('/a/product/list')"
;
}
});
}
});
}
})
}
initFormCtrl
();
}
return
{
//main function to initiate the module
init
:
function
()
{
initForm
();
}
};
}();
</script>
</body>
<!-- END BODY -->
</html>
\ No newline at end of file
aidea-modules/product-module-web/src/main/webapp/WEB-INF/views/product/productlist.html
0 → 100644
View file @
fb78ecff
<!DOCTYPE html>
<!--[if IE 8]>
<html lang="en" class="ie8 no-js"> <![endif]-->
<!--[if IE 9]>
<html lang="en" class="ie9 no-js"> <![endif]-->
<!--[if !IE]><!-->
<html>
<!--<![endif]-->
<!-- BEGIN HEAD -->
<head>
<base
href=
"#springUrl('/assets/adminlte/')"
/>
<meta
charset=
"utf-8"
>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge"
>
<title>
工作台
</title>
<!-- Tell the browser to be responsive to screen width -->
<meta
content=
"width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"
name=
"viewport"
>
<!-- Bootstrap 3.3.5 -->
<link
rel=
"stylesheet"
href=
"bootstrap/css/bootstrap.min.css"
>
<!-- Font Awesome -->
<link
rel=
"stylesheet"
href=
"plugins/font-awesome/css/font-awesome.min.css"
>
<!-- Ionicons -->
<link
rel=
"stylesheet"
href=
"plugins/ionicons/css/ionicons.min.css"
>
<!-- DataTables -->
<link
rel=
"stylesheet"
href=
"plugins/datatables/dataTables.bootstrap.css"
>
<!-- Theme style -->
<link
rel=
"stylesheet"
href=
"dist/css/AdminLTE.min.css"
>
<!-- AdminLTE Skins. Choose a skin from the css/skins
folder instead of downloading all of them to reduce the load. -->
<link
rel=
"stylesheet"
href=
"dist/css/skins/_all-skins.min.css"
>
<!-- iCheck -->
<link
rel=
"stylesheet"
href=
"plugins/iCheck/flat/blue.css"
>
<!-- Morris chart -->
<link
rel=
"stylesheet"
href=
"plugins/morris/morris.css"
>
<!-- jvectormap -->
<link
rel=
"stylesheet"
href=
"plugins/jvectormap/jquery-jvectormap-1.2.2.css"
>
<!-- Date Picker -->
<link
rel=
"stylesheet"
href=
"plugins/datepicker/datepicker3.css"
>
<!-- Daterange picker -->
<link
rel=
"stylesheet"
href=
"plugins/daterangepicker/daterangepicker-bs3.css"
>
<link
rel=
"stylesheet"
href=
"plugins\bootstrap-fileinput\fileinput.min.css"
>
<!-- bootstrap wysihtml5 - text editor -->
<link
rel=
"stylesheet"
href=
"plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css"
>
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body
class=
"hold-transition skin-blue sidebar-mini"
>
<div
class=
"wrapper"
>
<div
class=
"content-wrapper"
style=
"margin-left:0;"
>
<div
id=
"importExcelDiv"
></div>
<section
class=
"content-header"
>
<h1>
产品管理
<small>
产品
</small>
</h1>
<ol
class=
"breadcrumb"
>
<li><a><i
class=
"fa fa-dashboard"
></i>
首页
</a></li>
<li><a
class=
"active"
>
产品管理列表
</a></li>
</ol>
</section>
<!-- Main content -->
<section
class=
"content"
>
<div
class=
"row"
>
<div
class=
"col-xs-12"
>
<div
class=
"box"
>
<div
class=
"box-header"
>
<form
id=
"seachTableForm"
action=
"#springUrl('/a/product/list')"
method=
"get"
>
<div
class=
"col-xs-2"
>
<input
type=
"text"
class=
"form-control "
name=
"productName"
placeholder=
"产品名称"
>
</div>
<div
class=
"col-xs-2"
>
<input
type=
"text"
class=
"form-control "
name=
"classifyName"
placeholder=
"产品分类名称"
>
</div>
<div
class=
"col-xs-5"
>
<button
type=
"button"
class=
"search btn btn-primary"
>
搜索
</button>
#if($shiro.hasPermission("qy:product:edit"))
<a
href=
"#springUrl('/a/product/form')"
class=
"btn btn-primary"
>
新增
</a>
<a
href=
"#springUrl('/a/product/exportExcel')"
class=
"btn btn-primary"
>
导出
</a>
<a
onclick=
"importExcel();"
class=
"btn btn-primary"
>
导入
</a>
#end
</div>
</form>
</div>
<!-- /.box-header -->
<div
class=
"box-body"
>
<table
id=
"table"
class=
"table table-bordered table-striped"
>
<thead>
<tr>
<td
hidden=
"true"
>
Id
</td>
<td>
产品分类名称
</td>
<td>
产品名称
</td>
<td>
产品编码
</td>
<td>
产品图片
</td>
<td>
通用名
</td>
<td>
剂型
</td>
<td>
规格
</td>
<td>
批准文号
</td>
<td>
生产企业
</td>
<td>
温馨提示
</td>
<td>
服用类型
</td>
<td>
服用频率
</td>
<td>
服用数量
</td>
<td>
库存
</td>
<td>
价格
</td>
<th>
是否为处方药
</th>
<th>
创建时间
</th>
<th>
操作
</th>
</tr>
</thead>
<tbody
id=
"tablebody"
>
</tbody>
</table>
</div>
<!-- /.box-body -->
</div>
<!-- /.box -->
</div>
<!-- /.col -->
</div>
<!-- /.row -->
</section>
<!-- /.content -->
</div>
<!-- /.content-wrapper -->
<!-- Add the sidebar's background. This div must be placed
immediately after the control sidebar -->
<div
class=
"control-sidebar-bg"
></div>
</div>
<!-- ./wrapper -->
<!-- jQuery 2.1.4 -->
<script
src=
"plugins/jQuery/jQuery-2.1.4.min.js"
></script>
<!-- Bootstrap 3.3.5 -->
<script
src=
"bootstrap/js/bootstrap.min.js"
></script>
<!-- DataTables -->
<script
src=
"plugins/datatables/jquery.dataTables.min.js"
></script>
<script
src=
"plugins/datatables/extensions/i18n/lanauage_ch.js"
></script>
<script
src=
"plugins/datatables/dataTables.bootstrap.min.js"
></script>
<!-- SlimScroll -->
<script
src=
"plugins/slimScroll/jquery.slimscroll.min.js"
></script>
<script
src=
"plugins/datepicker/bootstrap-datepicker.js"
></script>
<script
src=
"plugins/datepicker/locales/bootstrap-datepicker.zh-CN.js"
></script>
<!-- FastClick -->
<script
src=
"plugins/fastclick/fastclick.min.js"
></script>
<!--fileinput js-->
<script
src=
"plugins\bootstrap-fileinput\fileinput.js"
></script>
<script
src=
"plugins/bootstrap-fileinput/zh.js"
></script>
<script
src=
"plugins/bootstrap-fileinput/zh2.js"
></script>
<!-- AdminLTE App -->
<script
src=
"dist/js/app.min.js"
></script>
<script
type=
"text/javascript"
src=
"plugins/jquery-validation/js/jquery.validate.min.js"
></script>
<!-- AdminLTE for demo purposes -->
<script>
var
csrfheader
=
{
name
:
'_csrf_header'
,
value
:
'${_csrf.headerName}'
};
var
csrftoken
=
{
name
:
'_csrf'
,
value
:
'${_csrf.token}'
};
</script>
<script
src=
"common/js/cfapp.js"
></script>
<script>
function
formatDates
(
now
)
{
var
now
=
new
Date
(
now
);
var
year
=
now
.
getFullYear
();
var
month
=
now
.
getMonth
()
+
1
;
var
date
=
now
.
getDate
();
var
hour
=
now
.
getHours
();
var
minute
=
now
.
getMinutes
();
var
second
=
now
.
getSeconds
();
return
year
+
"-"
+
month
+
"-"
+
date
+
" "
+
hour
+
":"
+
minute
+
":"
+
second
;
}
function
seachTable
()
{
var
sSource
=
"#springUrl('/a/product/listData')"
;
var
aoData
=
{
iDisplayStart
:
1
,
iDosplayLength
:
10
}
var
retrieveData
=
function
(
sSource
,
aoData
,
fnCallback
)
{
$
(
"#seachTableForm input"
).
each
(
function
()
{
var
params
=
{
name
:
$
(
this
).
attr
(
"name"
),
value
:
$
(
this
).
val
()
};
aoData
.
push
(
params
);
})
$
.
ajax
({
"type"
:
"GET"
,
"url"
:
sSource
,
"dataType"
:
"json"
,
"data"
:
aoData
,
//以json格式传递
"success"
:
fnCallback
});
};
$
(
'#table'
).
DataTable
({
"lengthChange"
:
false
,
"searching"
:
false
,
"ordering"
:
false
,
"bFiltered"
:
false
,
"bStateSave"
:
true
,
// save datatable state(pagination, sort, etc) in cookie.
"bProcessing"
:
true
,
"bServerSide"
:
true
,
"sAjaxSource"
:
sSource
,
"fnServerData"
:
retrieveData
,
"pagingType"
:
"full_numbers"
,
"aoColumns"
:
[
{
"mData"
:
"id"
},
{
"mData"
:
"classifyName"
},
{
"mData"
:
"productName"
},
{
"mData"
:
"productNumber"
},
{
"mData"
:
"productImg"
},
{
"mData"
:
"commonName"
},
{
"mData"
:
"dosagaFrom"
},
{
"mData"
:
"format"
},
{
"mData"
:
"approveNumber"
},
{
"mData"
:
"manufacturer"
},
{
"mData"
:
"tips"
},
{
"mData"
:
"takeType"
},
{
"mData"
:
"takeFrequency"
},
{
"mData"
:
"takeAmount"
},
{
"mData"
:
"stock"
},
{
"mData"
:
"price"
},
{
"mData"
:
"isRs"
},
{
"mData"
:
"createTime"
},
{
"mData"
:
"id"
}],
"aoColumnDefs"
:
[
{
// set default column settings
'visible'
:
false
,
'targets'
:
[
0
]
},
{
"aTargets"
:[
4
],
"mData"
:
"productImg"
,
"mRender"
:
function
(
a
,
b
,
c
,
d
){
return
"<img src='"
+
a
+
"' style='width: 80px;height: 80px;'>"
;
}
},
{
"aTargets"
:
[
17
],
"mData"
:
"createTime"
,
"mRender"
:
function
(
a
,
b
,
c
,
d
)
{
return
formatDates
(
a
,
"yyyy-MM-dd HH:mm:ss"
);
}
},
{
"aTargets"
:
[
18
],
"mData"
:
"id"
,
"mRender"
:
function
(
a
,
b
,
c
,
d
)
{
var
html
=
'#if($shiro.hasPermission("qy:product:edit"))'
;
//
html
+=
'<a href="#springUrl("/a/product/form?id='
+
a
+
'")" data-id="'
+
a
+
'" data-action="view" class="btn green">修改</a>'
;
html
+=
'<a href="javascript:void(0);" data-id="'
+
a
+
'" data-action="remove" onclick="removeData('
+
a
+
')" class="btn red">删除</a>'
;
html
+=
'#end'
;
return
html
;
}
}
]
});
}
jQuery
(
document
).
ready
(
function
()
{
seachTable
();
$
(
'.datepicker'
).
datepicker
({
show
:
true
,
format
:
'yyyy-mm-dd'
,
autoclose
:
true
,
language
:
'zh-CN'
,
todayBtn
:
'linked'
,
clearBtn
:
'linked'
});
$
(
'.search'
).
click
(
function
()
{
$
(
"#table"
).
dataTable
().
fnClearTable
();
});
});
Cfapp
.
init
();
function
removeData
(
data
)
{
Cfapp
.
confirm
({
message
:
"确定要删除吗"
,
btnoktext
:
"确定"
,
btncanceltext
:
"取消"
,
success
:
function
()
{
$
.
ajax
({
type
:
"POST"
,
url
:
"#springUrl('/a/product/delete')"
,
"data"
:
{
id
:
data
,
_csrfheader
:
csrfheader
.
value
,
_csrf
:
csrftoken
.
value
},
dataType
:
"json"
,
success
:
function
(
data
)
{
if
(
data
.
errorNo
==
0
)
{
Cfapp
.
alert
({
message
:
"删除成功"
,
btntext
:
"确定"
,
success
:
function
()
{
location
.
href
=
"#springUrl('/a/product/list')"
;
}
});
}
},
error
:
function
()
{
}
})
},
cancel
:
function
()
{
$
(
".modal-backdrop"
).
fadeOut
();
}
});
}
function
importExcel
()
{
var
templateExcelUrl
=
"#springUrl('/a/product/templateExcel')"
;
var
importExcelUrl
=
"#springUrl('/a/product/importExcel')?_csrf_header="
+
csrfheader
.
value
+
"&_csrf="
+
csrftoken
.
value
;
Cfapp
.
importExcel
({
title
:
'产品导入'
,
importurl
:
importExcelUrl
,
templateurl
:
templateExcelUrl
,
cancel
:
function
()
{
},
success
:
function
()
{
location
.
href
=
"#springUrl('/a/product/list')"
;
}
});
}
</script>
</body>
</html>
aidea-modules/product-module/pom.xml
0 → 100644
View file @
fb78ecff
<?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"
>
<parent>
<artifactId>
aidea-modules
</artifactId>
<groupId>
com.cftech
</groupId>
<version>
1.0-SNAPSHOT
</version>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<artifactId>
product-module
</artifactId>
<dependencies>
<dependency>
<groupId>
com.cftech
</groupId>
<artifactId>
sys-module
</artifactId>
<version>
1.0-SNAPSHOT
</version>
<scope>
compile
</scope>
</dependency>
<dependency>
<groupId>
com.cftech
</groupId>
<artifactId>
product-classify-module
</artifactId>
<version>
1.0-SNAPSHOT
</version>
<scope>
compile
</scope>
</dependency>
<dependency>
<groupId>
com.cftech
</groupId>
<artifactId>
product-into-wareroom-module
</artifactId>
<version>
1.0-SNAPSHOT
</version>
<scope>
compile
</scope>
</dependency>
<dependency>
<groupId>
com.cftech
</groupId>
<artifactId>
product-detail-module
</artifactId>
<version>
1.0-SNAPSHOT
</version>
<scope>
compile
</scope>
</dependency>
</dependencies>
</project>
\ No newline at end of file
aidea-modules/product-module/src/main/java/com/cftech/product/dao/ProductMapper.java
0 → 100644
View file @
fb78ecff
package
com
.
cftech
.
product
.
dao
;
import
com.cftech.product.model.Product
;
import
com.cftech.core.generic.GenericDao
;
/**
* 产品Mapper
*
* @author Buyj
* @date: 2020-09-24 15:07
*/
public
interface
ProductMapper
extends
GenericDao
<
Product
>
{
}
\ No newline at end of file
aidea-modules/product-module/src/main/java/com/cftech/product/dao/ProductMapper.xml
0 → 100644
View file @
fb78ecff
<?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=
"com.cftech.product.dao.ProductMapper"
>
<resultMap
id=
"resultMap"
type=
"com.cftech.product.model.Product"
>
<id
column=
"id"
property=
"id"
/>
<result
column=
"classify_id"
property=
"classifyId"
/>
<result
column=
"product_name"
property=
"productName"
/>
<result
column=
"common_name"
property=
"commonName"
/>
<result
column=
"dosaga_from"
property=
"dosagaFrom"
/>
<result
column=
"format"
property=
"format"
/>
<result
column=
"approve_number"
property=
"approveNumber"
/>
<result
column=
"manufacturer"
property=
"manufacturer"
/>
<result
column=
"recommend_measure"
property=
"recommendMeasure"
/>
<result
column=
"tips"
property=
"tips"
/>
<result
column=
"take_type"
property=
"takeType"
/>
<result
column=
"take_frequency"
property=
"takeFrequency"
/>
<result
column=
"take_amount"
property=
"takeAmount"
/>
<result
column=
"stock"
property=
"stock"
/>
<result
column=
"price"
property=
"price"
/>
<result
column=
"product_img"
property=
"productImg"
/>
<result
column=
"accounts_id"
property=
"accountsId"
/>
<result
column=
"del_flag"
property=
"delFlag"
/>
<result
column=
"status"
property=
"status"
/>
<result
column=
"create_time"
property=
"createTime"
/>
<result
column=
"update_time"
property=
"updateTime"
/>
<result
column=
"description"
property=
"description"
/>
<result
column=
"create_by"
property=
"createBy"
/>
<result
column=
"update_by"
property=
"updateBy"
/>
<result
column=
"product_number"
property=
"productNumber"
/>
<result
column=
"product_img_detail"
property=
"productImgDetail"
/>
<result
column=
"is_rs"
property=
"isRs"
/>
</resultMap>
<sql
id=
"sqlWhere"
>
<if
test=
"conds!=null"
>
<trim
prefix=
"WHERE"
prefixOverrides=
"AND|OR"
>
<foreach
collection=
"conds.conds"
index=
"index"
item=
"cond"
>
${cond.linkType}
<if
test=
"cond.condType == 'EQUAL'"
>
${cond.param} = #{cond.value}
</if>
<if
test=
"cond.condType == 'NOTEQUAL'"
>
${cond.param}
<>
#{cond.value}
</if>
<if
test=
"cond.condType == 'GREATEQUAL'"
>
${cond.param}
>
= #{cond.value}
</if>
<if
test=
"cond.condType == 'GREATTHAN'"
>
${cond.param}
>
#{cond.value}
</if>
<if
test=
"cond.condType == 'LESSEQUAL'"
>
${cond.param}
<
= #{cond.value}
</if>
<if
test=
"cond.condType == 'LESSTHAN'"
>
${cond.param}
<
#{cond.value}
</if>
<if
test=
"cond.condType == 'BETWEEN'"
>
${cond.param} BETWEEN #{cond.startValue} AND
#{cond.endValue}
</if>
<if
test=
"cond.condType == 'ISNULL'"
>
${cond.param} IS NULL
</if>
<if
test=
"cond.condType == 'NOTNULL'"
>
${cond.param} IS NOT NULL
</if>
<if
test=
"cond.condType == 'LIKE'"
>
${cond.param} LIKE #{cond.value}
</if>
<if
test=
"cond.condType == 'IN'"
>
${cond.param} IN
<foreach
item=
"item"
index=
"index"
collection=
"cond.value"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</if>
</foreach>
</trim>
</if>
</sql>
<sql
id=
"sqlColumns"
>
id,
classify_id,
product_name,
common_name,
dosaga_from,
format,
approve_number,
manufacturer,
recommend_measure,
tips,
take_type,
take_frequency,
take_amount,
stock,
price,
product_img,
accounts_id,
del_flag,
status,
create_time,
update_time,
description,
create_by,
update_by,
product_number,
product_img_detail,
is_rs
</sql>
<insert
id=
"save"
parameterType=
"com.cftech.product.model.Product"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
insert into t_aidea_product
(
<include
refid=
"sqlColumns"
/>
)
values
(
#{id, jdbcType=BIGINT},
#{classifyId, jdbcType=VARCHAR},
#{productName, jdbcType=VARCHAR},
#{commonName, jdbcType=VARCHAR},
#{dosagaFrom, jdbcType=VARCHAR},
#{format, jdbcType=VARCHAR},
#{approveNumber, jdbcType=VARCHAR},
#{manufacturer, jdbcType=VARCHAR},
#{recommendMeasure, jdbcType=VARCHAR},
#{tips, jdbcType=VARCHAR},
#{takeType , jdbcType=VARCHAR},
#{takeFrequency, jdbcType=VARCHAR},
#{takeAmount, jdbcType=VARCHAR},
#{stock, jdbcType=BIGINT},
#{price, jdbcType=DOUBLE},
#{productImg, jdbcType=VARCHAR},
#{accountsId, jdbcType=BIGINT},
#{delFlag, jdbcType=TINYINT},
#{status, jdbcType=VARCHAR},
now(),
now(),
#{description, jdbcType=VARCHAR},
#{createBy, jdbcType=BIGINT},
#{updateBy, jdbcType=BIGINT},
#{productNumber,jdbcType=VARCHAR},
#{productImgDetail,jdbcType=VARCHAR},
#{isRs,jdbcType=VARCHAR}
)
</insert>
<select
id=
"fetchById"
parameterType=
"java.lang.Long"
resultMap=
"resultMap"
>
SELECT
<include
refid=
"sqlColumns"
/>
FROM t_aidea_product t
WHERE t.id=#{id}
</select>
<select
id=
"count"
parameterType=
"java.util.Map"
resultType=
"java.lang.Integer"
>
SELECT COUNT(1) FROM t_aidea_product a
LEFT JOIN t_aidea_product_classify b ON a.classify_id = b.id
AND b.del_flag = '0'
<include
refid=
"sqlWhere"
/>
</select>
<select
id=
"fetchSearchByPage"
parameterType=
"java.util.Map"
resultMap=
"resultMap"
>
SELECT
a.id id,
a.classify_id classfyId,
b.classify_name classifyName,
a.product_name productName,
a.common_name commonName,
a.dosaga_from dosagaFrom,
a.format format,
a.approve_number approveNumber,
a.manufacturer manufacturer,
a.recommend_measure recommendMeasure,
a.tips tips,
a.take_type takeType,
a.take_frequency takeFrequency,
a.take_amount takeAmount,
a.stock stock,
a.price price,
a.product_img productImg,
a.accounts_id accountsId,
a.del_flag delFlag,
a.STATUS,
a.create_time createTime,
a.update_time updateTime,
a.description,
a.create_by createBy,
a.update_by updateBy,
a.product_number productNumber,
a.is_rs isRs
FROM
t_aidea_product a
LEFT JOIN t_aidea_product_classify b ON a.classify_id = b.id
AND b.del_flag = '0'
<include
refid=
"sqlWhere"
/>
<if
test=
"sort!=null"
>
ORDER BY ${sort.param} ${sort.type}
</if>
<if
test=
"limit>0"
>
limit #{offset},#{limit}
</if>
</select>
<update
id=
"update"
parameterType=
"com.cftech.product.model.Product"
>
update t_aidea_product
<set>
<if
test=
"id != null"
>
id = #{id, jdbcType=BIGINT},
</if>
<if
test=
"classifyId != null"
>
classify_id = #{classifyId, jdbcType=VARCHAR},
</if>
<if
test=
"productName != null"
>
product_name = #{productName, jdbcType=VARCHAR},
</if>
<if
test=
"commonName != null"
>
common_name = #{commonName, jdbcType=VARCHAR},
</if>
<if
test=
"dosagaFrom != null"
>
dosaga_from = #{dosagaFrom, jdbcType=VARCHAR},
</if>
<if
test=
"format != null"
>
format = #{format, jdbcType=VARCHAR},
</if>
<if
test=
"approveNumber != null"
>
approve_number = #{approveNumber, jdbcType=VARCHAR},
</if>
<if
test=
"manufacturer != null"
>
manufacturer = #{manufacturer, jdbcType=VARCHAR},
</if>
<if
test=
"recommendMeasure != null"
>
recommend_measure = #{recommendMeasure, jdbcType=VARCHAR},
</if>
<if
test=
"tips != null"
>
tips = #{tips, jdbcType=VARCHAR},
</if>
<if
test=
"takeType != null"
>
take_type = #{takeType, jdbcType=VARCHAR},
</if>
<if
test=
"takeFrequency != null"
>
take_frequency = #{takeFrequency, jdbcType=VARCHAR},
</if>
<if
test=
"takeAmount != null"
>
take_amount = #{takeAmount, jdbcType=VARCHAR},
</if>
<if
test=
"stock != null"
>
stock = #{stock, jdbcType=BIGINT},
</if>
<if
test=
"price != null"
>
price = #{price, jdbcType=DOUBLE},
</if>
<if
test=
"productImg != null"
>
product_img = #{productImg, jdbcType=VARCHAR},
</if>
<if
test=
"accountsId != null"
>
accounts_id = #{accountsId, jdbcType=BIGINT},
</if>
<if
test=
"delFlag != null"
>
del_flag = #{delFlag, jdbcType=TINYINT},
</if>
<if
test=
"status != null"
>
status = #{status, jdbcType=VARCHAR},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime, jdbcType=TIMESTAMP},
</if>
<if
test=
"description != null"
>
description = #{description, jdbcType=VARCHAR},
</if>
<if
test=
"createBy != null"
>
create_by = #{createBy, jdbcType=BIGINT},
</if>
<if
test=
"updateBy != null"
>
update_by = #{updateBy, jdbcType=BIGINT},
</if>
<if
test=
"productImgDetail != null"
>
product_img_detail = #{productImgDetail, jdbcType=VARCHAR},
</if>
<if
test=
"isRs != null"
>
is_rs = #{isRs, jdbcType=VARCHAR},
</if>
</set>
where id=#{id,jdbcType=BIGINT}
</update>
<update
id=
"delete"
parameterType=
"java.lang.Long"
>
update t_aidea_product set del_flag=1 where id=#{id,jdbcType=BIGINT}
</update>
</mapper>
\ No newline at end of file
aidea-modules/product-module/src/main/java/com/cftech/product/model/Product.java
0 → 100644
View file @
fb78ecff
package
com
.
cftech
.
product
.
model
;
import
com.cftech.core.poi.ExportConfig
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* 产品
*
* @author Buyj
* @date: 2020-09-24 15:07
*/
@Data
public
class
Product
implements
Serializable
{
/**
* 主键id
*/
private
Long
id
;
/**
* 产品分类ID
*/
private
String
classifyId
;
/**
* 产品分类编码
*/
@ExportConfig
(
value
=
"产品分类编码"
,
width
=
150
,
showLevel
=
2
)
private
String
classifyNumber
;
/**
* 产品分类名称
*/
@ExportConfig
(
value
=
"产品分类名称"
,
width
=
150
,
showLevel
=
1
)
private
String
classifyName
;
/**
* 产品编码
*/
@ExportConfig
(
value
=
"产品编码"
,
width
=
100
)
private
String
productNumber
;
/**
* 产品名称
*/
@ExportConfig
(
value
=
"产品名称"
,
width
=
100
)
private
String
productName
;
/**
* 通用名
*/
@ExportConfig
(
value
=
"通用名"
,
width
=
100
)
private
String
commonName
;
/**
*剂型
*/
@ExportConfig
(
value
=
"剂型"
,
width
=
100
)
private
String
dosagaFrom
;
/**
*规格
*/
@ExportConfig
(
value
=
"规格"
,
width
=
100
)
private
String
format
;
/**
*批准文号
*/
@ExportConfig
(
value
=
"批准文号"
,
width
=
100
)
private
String
approveNumber
;
/**
*生产企业
*/
@ExportConfig
(
value
=
"生产企业"
,
width
=
100
)
private
String
manufacturer
;
/**
*推荐计量
*/
@ExportConfig
(
value
=
"推荐计量"
,
width
=
100
)
private
String
recommendMeasure
;
/**
* 药品简介
*/
@ExportConfig
(
value
=
"药品简介"
,
width
=
150
)
private
String
description
;
/**
*温馨提示
*/
@ExportConfig
(
value
=
"温馨提示"
,
width
=
100
)
private
String
tips
;
/**
* 服用类型
*/
@ExportConfig
(
value
=
"服用类型(天/周/月)"
,
width
=
200
)
private
String
takeType
;
/**
*服用频率
*/
@ExportConfig
(
value
=
"服用频率"
,
width
=
100
)
private
String
takeFrequency
;
/**
*服用次数
*/
@ExportConfig
(
value
=
"服用数量"
,
width
=
100
)
private
String
takeAmount
;
/**
*库存
*/
@ExportConfig
(
value
=
"库存"
,
width
=
100
)
private
Long
stock
;
/**
*价格
*/
@ExportConfig
(
value
=
"价格"
,
width
=
100
)
private
Double
price
;
/**
* 是否为处方药
*/
@ExportConfig
(
value
=
"是否为处方药(是/否)"
,
width
=
200
)
private
String
isRs
;
/**
* 产品详情图
*/
private
String
productImgDetail
;
/**
*产品图片
*/
private
String
productImg
;
/* 所属的账号 */
private
Long
accountsId
;
/* 删除标识 */
private
boolean
delFlag
;
/* 状态 */
private
String
status
;
/* 创建时间 */
private
Date
createTime
;
/* 更新时间 */
private
Date
updateTime
;
/* 创建人 */
private
Long
createBy
;
/* 更新人 */
private
Long
updateBy
;
public
Product
()
{
this
.
delFlag
=
false
;
this
.
status
=
"0"
;
}
}
\ No newline at end of file
aidea-modules/product-module/src/main/java/com/cftech/product/service/ProductService.java
0 → 100644
View file @
fb78ecff
package
com
.
cftech
.
product
.
service
;
import
com.cftech.product.model.Product
;
import
com.cftech.core.generic.GenericService
;
/**
* 产品Service
*
* @author Buyj
* @date: 2020-09-24 15:07
*/
public
interface
ProductService
extends
GenericService
<
Product
>
{
/**
* 商品导入
* @param product
*/
boolean
saveProduct
(
Product
product
);
}
aidea-modules/product-module/src/main/java/com/cftech/product/service/impl/ProductServiceImpl.java
0 → 100644
View file @
fb78ecff
package
com
.
cftech
.
product
.
service
.
impl
;
import
com.cftech.base.codingrule.utils.CodingruleUtils
;
import
com.cftech.core.util.StringUtils
;
import
com.cftech.product.model.Product
;
import
com.cftech.product.dao.ProductMapper
;
import
com.cftech.product.service.ProductService
;
import
com.cftech.core.generic.GenericDao
;
import
com.cftech.core.generic.GenericServiceImpl
;
import
com.cftech.core.sql.Conds
;
import
com.cftech.productdetail.dao.ProductDetailMapper
;
import
com.cftech.productdetail.model.ProductDetail
;
import
com.cftech.productintowareroom.dao.ProductIntoWareroomMapper
;
import
com.cftech.productintowareroom.model.ProductIntoWareroom
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Qualifier
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.math.BigDecimal
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
/**
* 产品ServiceImpl
*
* @author Buyj
* @date: 2020-09-24 15:07
*/
@Service
(
"productService"
)
public
class
ProductServiceImpl
extends
GenericServiceImpl
<
Product
>
implements
ProductService
{
@Autowired
@Qualifier
(
"productMapper"
)
private
ProductMapper
productMapper
;
@Autowired
private
ProductIntoWareroomMapper
productIntoWareroomMapper
;
@Autowired
private
ProductDetailMapper
productDetailMapper
;
@Autowired
private
CodingruleUtils
codingruleUtils
;
@Override
public
GenericDao
<
Product
>
getGenericMapper
()
{
return
productMapper
;
}
/**
* 保存导入商品信息并生成商品入库单记录和商品明细记录
* @param product
*/
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
boolean
saveProduct
(
Product
product
){
// 1、保存商品实体 根据商品编码判断该商品是否存在 存在则更新 不存在则新增
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
Conds
conds
=
new
Conds
();
conds
.
equal
(
"a.product_number"
,
product
.
getProductNumber
());
conds
.
equal
(
"a.del_flag"
,
0
);
params
.
put
(
"conds"
,
conds
);
List
<
Product
>
listProduct
=
productMapper
.
fetchSearchByPage
(
params
);
if
(
listProduct
.
size
()
>
0
){
Product
productEntity
=
listProduct
.
get
(
0
);
if
(
StringUtils
.
isNotBlank
(
product
.
getClassifyNumber
())){
productEntity
.
setClassifyNumber
(
product
.
getClassifyNumber
());
}
if
(
StringUtils
.
isNotBlank
(
product
.
getProductName
())){
productEntity
.
setProductName
(
product
.
getProductName
());
}
if
(
StringUtils
.
isNotBlank
(
product
.
getCommonName
())){
productEntity
.
setCommonName
(
product
.
getCommonName
());
}
if
(
StringUtils
.
isNotBlank
(
product
.
getDosagaFrom
())){
productEntity
.
setDosagaFrom
(
product
.
getDosagaFrom
());
}
if
(
StringUtils
.
isNotBlank
(
product
.
getFormat
())){
productEntity
.
setFormat
(
product
.
getFormat
());
}
if
(
StringUtils
.
isNotBlank
(
product
.
getApproveNumber
())){
productEntity
.
setApproveNumber
(
product
.
getApproveNumber
());
}
if
(
StringUtils
.
isNotBlank
(
product
.
getManufacturer
())){
productEntity
.
setManufacturer
(
product
.
getManufacturer
());
}
if
(
StringUtils
.
isNoneBlank
(
product
.
getRecommendMeasure
())){
productEntity
.
setRecommendMeasure
(
product
.
getRecommendMeasure
());
}
if
(
StringUtils
.
isNoneBlank
(
product
.
getDescription
())){
productEntity
.
setDescription
(
product
.
getDescription
());
}
if
(
StringUtils
.
isNoneBlank
(
product
.
getTips
())){
productEntity
.
setTips
(
product
.
getTips
());
}
if
(
StringUtils
.
isNoneBlank
(
product
.
getTakeType
())){
productEntity
.
setTakeType
(
product
.
getTakeType
());
}
if
(
StringUtils
.
isNotBlank
(
product
.
getTakeFrequency
())){
productEntity
.
setTakeFrequency
(
product
.
getTakeFrequency
());
}
if
(
StringUtils
.
isNotBlank
(
product
.
getTakeAmount
())){
productEntity
.
setTakeAmount
(
product
.
getTakeAmount
());
}
if
(
StringUtils
.
isNotBlank
(
String
.
valueOf
(
product
.
getStock
()))){
productEntity
.
setStock
((
new
BigDecimal
(
productEntity
.
getStock
()).
add
(
new
BigDecimal
(
product
.
getStock
()))).
longValue
());
}
if
(
StringUtils
.
isNotBlank
(
String
.
valueOf
(
product
.
getPrice
()))){
productEntity
.
setPrice
(
product
.
getPrice
());
}
if
(
StringUtils
.
isNotBlank
(
product
.
getIsRs
()))
{
productEntity
.
setIsRs
(
product
.
getIsRs
());
}
productMapper
.
update
(
productEntity
);
}
else
{
productMapper
.
save
(
product
);
}
System
.
out
.
println
(
Product
.
class
.
getName
());
// 2、 生成入库单
ProductIntoWareroom
productIntoWareroom
=
new
ProductIntoWareroom
();
productIntoWareroom
.
setAccountsId
(
product
.
getAccountsId
());
//todo 入库单编号
String
ruKuNumber
=
codingruleUtils
.
getNumber
(
product
.
getAccountsId
(),
ProductIntoWareroom
.
class
.
getName
());
productIntoWareroom
.
setIntoWareroomNumber
(
ruKuNumber
);
//todo 商品SKU码
productIntoWareroom
.
setProductSkuNumber
(
"SKU"
);
productIntoWareroom
.
setProductNumber
(
product
.
getProductNumber
());
productIntoWareroom
.
setProductName
(
product
.
getProductName
());
productIntoWareroom
.
setProductAmount
(
product
.
getStock
());
productIntoWareroom
.
setProductClassifyNumber
(
product
.
getClassifyNumber
());
productIntoWareroom
.
setCreateBy
(
product
.
getCreateBy
());
productIntoWareroom
.
setUpdateBy
(
product
.
getUpdateBy
());
productIntoWareroomMapper
.
save
(
productIntoWareroom
);
// 3、生成商品明细表
ProductDetail
productDetail
=
null
;
if
(
product
.
getStock
()
!=
null
&&
product
.
getStock
()
>
0
){
for
(
int
i
=
0
;
i
<
product
.
getStock
().
intValue
();
i
++){
productDetail
=
new
ProductDetail
();
productDetail
.
setAccountsId
(
product
.
getAccountsId
());
//todo 产品详情编码
productDetail
.
setProductDetailNumber
(
codingruleUtils
.
getNumber
(
product
.
getAccountsId
(),
ProductDetail
.
class
.
getName
()));
//todo 物料编码
productDetail
.
setMaterielNumber
(
codingruleUtils
.
getNumber
(
product
.
getAccountsId
(),
"com.cftech.productmaterie.model.Materie"
));
productDetail
.
setProductNumber
(
product
.
getProductNumber
());
productDetail
.
setProductName
(
product
.
getProductName
());
productDetail
.
setProductClassifyNumber
(
product
.
getClassifyNumber
());
productDetail
.
setIntoWareroomNumber
(
ruKuNumber
);
productDetail
.
setWhetherSell
(
"否"
);
productDetail
.
setCreateBy
(
product
.
getCreateBy
());
productDetail
.
setUpdateBy
(
product
.
getUpdateBy
());
productDetailMapper
.
save
(
productDetail
);
}
}
return
true
;
}
}
\ No newline at end of file
aidea-modules/product-module/src/main/java/com/cftech/product/web/ProductController.java
0 → 100644
View file @
fb78ecff
package
com
.
cftech
.
product
.
web
;
import
com.alibaba.fastjson.JSONObject
;
import
com.cftech.base.codingrule.utils.CodingruleUtils
;
import
com.cftech.product.model.Product
;
import
com.cftech.product.service.ProductService
;
import
com.cftech.core.poi.ExcelKit
;
import
com.cftech.core.scope.OrderType
;
import
com.cftech.core.sql.Conds
;
import
com.cftech.core.sql.Sort
;
import
com.cftech.core.util.Constants
;
import
com.cftech.productclassify.model.Productclassify
;
import
com.cftech.productclassify.service.ProductclassifyService
;
import
com.cftech.sys.security.PermissionSign
;
import
com.cftech.sys.security.UserUtils
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.ui.Model
;
import
org.springframework.util.StringUtils
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.springframework.web.multipart.MultipartFile
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.File
;
import
java.io.IOException
;
import
java.util.List
;
/**
* 产品Controller
* <p>
* 权限字符串说明:
* 查看:public static final String PRODUCT_VIEW = "qy:product:view"
* 查看:public static final String PRODUCT_EDIT = "qy:product:edit"
*
* @author Buyj
* @date: 2020-09-24 15:07
*/
@Slf4j
@Controller
@RequestMapping
(
"/a/product"
)
public
class
ProductController
{
public
static
final
String
PRODUCT_VIEW
=
"qy:product:view"
;
public
static
final
String
PRODUCT_EDIT
=
"qy:product:edit"
;
@Autowired
private
ProductService
productService
;
@Autowired
private
ProductclassifyService
productclassifyService
;
@Autowired
private
CodingruleUtils
codingruleUtils
;
//列表页面
@RequiresPermissions
(
value
=
PRODUCT_VIEW
)
@RequestMapping
(
"/list"
)
public
String
list
(
HttpServletRequest
request
,
Model
model
)
{
Long
accountId
=
UserUtils
.
getmpaccounts
(
request
);
model
.
addAttribute
(
"accountId"
,
accountId
);
return
"product/productlist"
;
}
//编辑页面(新增、修改)
@RequiresPermissions
(
value
=
PRODUCT_VIEW
)
@RequestMapping
(
"/form"
)
public
String
form
(
HttpServletRequest
request
,
String
id
,
Model
model
)
{
if
(!
StringUtils
.
isEmpty
(
id
))
{
Product
product
=
productService
.
fetchById
(
id
);
if
(!
StringUtils
.
isEmpty
(
product
.
getClassifyId
()))
{
product
.
setClassifyName
(
productclassifyService
.
fetchById
(
product
.
getClassifyId
()).
getClassifyName
());
}
model
.
addAttribute
(
"data"
,
product
);
}
return
"product/productform"
;
}
//提交数据(新增、修改)
@RequiresPermissions
(
value
=
PRODUCT_EDIT
)
@RequestMapping
(
"/formData"
)
@ResponseBody
public
JSONObject
formData
(
Product
product
,
Model
model
,
HttpServletRequest
request
)
{
Long
accountsId
=
UserUtils
.
getmpaccounts
(
request
);
JSONObject
rtnJson
=
new
JSONObject
();
try
{
if
(
product
!=
null
&&
product
.
getId
()
!=
null
)
{
product
.
setUpdateBy
(
UserUtils
.
getUser
().
getId
());
productService
.
update
(
product
);
rtnJson
.
put
(
"errorNo"
,
0
);
}
else
{
product
.
setAccountsId
(
accountsId
);
product
.
setDelFlag
(
false
);
product
.
setProductNumber
(
codingruleUtils
.
getNumber
(
accountsId
,
Product
.
class
.
getName
()));
product
.
setAccountsId
(
UserUtils
.
getmpaccounts
(
request
));
product
.
setCreateBy
(
UserUtils
.
getUser
().
getId
());
product
.
setUpdateBy
(
UserUtils
.
getUser
().
getId
());
product
.
setStock
(
0L
);
productService
.
save
(
product
);
rtnJson
.
put
(
"errorNo"
,
2
);
}
}
catch
(
Exception
e
)
{
rtnJson
.
put
(
"errorNo"
,
1
);
}
return
rtnJson
;
}
//获取列表数据
@RequiresPermissions
(
value
=
PRODUCT_VIEW
)
@RequestMapping
(
value
=
"/listData"
)
@ResponseBody
public
JSONObject
listData
(
int
iDisplayStart
,
int
iDisplayLength
,
Product
product
,
HttpServletRequest
request
)
{
Long
accountsId
=
UserUtils
.
getmpaccounts
(
request
);
Conds
conds
=
new
Conds
();
conds
.
equal
(
"a.del_flag"
,
Constants
.
DEL_FLAG_0
);
conds
.
equal
(
"a.accounts_id"
,
accountsId
);
if
(!
StringUtils
.
isEmpty
(
product
.
getProductName
())){
conds
.
like
(
"a.product_name"
,
product
.
getProductName
());
}
if
(!
StringUtils
.
isEmpty
(
product
.
getClassifyName
())){
conds
.
like
(
"b.classify_name"
,
product
.
getClassifyName
());
}
Sort
sort
=
new
Sort
(
"a.create_time"
,
OrderType
.
DESC
);
List
<
Product
>
list
=
productService
.
fetchSearchByPage
(
conds
,
sort
,
iDisplayStart
,
iDisplayLength
);
Integer
counts
=
productService
.
count
(
conds
);
JSONObject
rtnJson
=
new
JSONObject
();
rtnJson
.
put
(
"iTotalRecords"
,
counts
);
rtnJson
.
put
(
"iTotalDisplayRecords"
,
counts
);
rtnJson
.
put
(
"aaData"
,
list
);
return
rtnJson
;
}
//删除数据
@RequiresPermissions
(
value
=
PRODUCT_EDIT
)
@RequestMapping
(
"/delete"
)
@ResponseBody
public
JSONObject
delete
(
String
id
)
{
JSONObject
rtnJosn
=
new
JSONObject
();
try
{
productService
.
delete
(
id
);
rtnJosn
.
put
(
"errorNo"
,
0
);
}
catch
(
Exception
e
)
{
rtnJosn
.
put
(
"errorNo"
,
1
);
}
return
rtnJosn
;
}
@RequestMapping
(
"/exportExcel"
)
@RequiresPermissions
(
value
=
PRODUCT_VIEW
)
public
void
exportExcel
(
HttpServletRequest
request
,
HttpServletResponse
response
,
Product
product
)
{
Long
accountId
=
UserUtils
.
getmpaccounts
(
request
);
Conds
conds
=
new
Conds
();
conds
.
equal
(
"a.del_flag"
,
0
);
conds
.
equal
(
"a.accounts_id"
,
accountId
);
if
(!
StringUtils
.
isEmpty
(
product
.
getProductName
())){
conds
.
like
(
"a.product_name"
,
product
.
getProductName
());
}
if
(!
StringUtils
.
isEmpty
(
product
.
getClassifyName
())){
conds
.
like
(
"a.classify_name"
,
product
.
getClassifyName
());
}
Sort
sort
=
new
Sort
(
"a.create_time"
,
OrderType
.
DESC
);
List
<
Product
>
list
=
productService
.
fetchSearchByPage
(
conds
,
sort
,
0
,
0
);
ExcelKit
.
$Export
(
Product
.
class
,
response
).
toExcel
(
list
,
"产品信息"
);
}
@RequestMapping
(
"/templateExcel"
)
@RequiresPermissions
(
value
=
PRODUCT_VIEW
)
public
void
templateExcel
(
HttpServletRequest
request
,
HttpServletResponse
response
)
{
ExcelKit
.
$Export
(
Product
.
class
,
response
).
toExcel
(
null
,
"产品信息"
);
}
@RequestMapping
(
"/importExcel"
)
@RequiresPermissions
(
value
=
PRODUCT_EDIT
)
@ResponseBody
public
JSONObject
importExcel
(
HttpServletRequest
request
,
MultipartFile
file
,
Model
model
)
{
JSONObject
retJson
=
new
JSONObject
();
StringBuffer
sbClassify
=
new
StringBuffer
();
boolean
classify
=
true
;
Long
accountId
=
UserUtils
.
getmpaccounts
(
request
);
if
(
file
==
null
)
{
retJson
.
put
(
"errorNo"
,
"1"
);
retJson
.
put
(
"errorMsg"
,
"未选择导入文件"
);
return
retJson
;
}
// 构造临时路径来存储上传的文件
String
uploadPath
=
System
.
getProperty
(
"java.io.tmpdir"
);
File
uploadDir
=
new
File
(
uploadPath
);
if
(!
uploadDir
.
exists
())
{
uploadDir
.
mkdir
();
}
String
fileName
=
file
.
getOriginalFilename
();
String
filePath
=
uploadPath
+
File
.
separator
+
fileName
;
File
storeFile
=
new
File
(
filePath
);
try
{
file
.
transferTo
(
storeFile
);
ExcelKit
.
$Import
().
setEmptyCellValue
(
""
).
readExcel
(
storeFile
,
rowData
->
{
Product
product
=
new
Product
();
if
(!
StringUtils
.
isEmpty
(
rowData
.
get
(
0
))){
Conds
conds
=
new
Conds
();
conds
.
equal
(
"a.classify_number"
,
rowData
.
get
(
0
));
conds
.
equal
(
"a.del_flag"
,
"0"
);
Productclassify
productClassifyParent
=
productclassifyService
.
fetchSearchByConds
(
conds
);
if
(
productClassifyParent
!=
null
){
//产品分类ID
product
.
setClassifyId
(
String
.
valueOf
(
productClassifyParent
.
getId
()));
product
.
setClassifyNumber
(
rowData
.
get
(
0
));
}
}
product
.
setAccountsId
(
accountId
);
//产品编码
product
.
setProductNumber
(
rowData
.
get
(
1
));
//产品名称
product
.
setProductName
(
rowData
.
get
(
2
));
// 通用名
product
.
setCommonName
(
rowData
.
get
(
3
));
//剂型
product
.
setDosagaFrom
(
rowData
.
get
(
4
));
//规格
product
.
setFormat
(
rowData
.
get
(
5
));
//批准文号
product
.
setApproveNumber
(
rowData
.
get
(
6
));
//生产企业
product
.
setManufacturer
(
rowData
.
get
(
7
));
//推荐计量
product
.
setRecommendMeasure
(
rowData
.
get
(
8
));
//药品简介
product
.
setDescription
(
rowData
.
get
(
9
));
//温馨提示
product
.
setTips
(
rowData
.
get
(
10
));
//服用类型
product
.
setTakeType
(
rowData
.
get
(
11
));
//服用频率
product
.
setTakeFrequency
(
rowData
.
get
(
12
));
//服用数量
product
.
setTakeAmount
(
rowData
.
get
(
13
));
//库存
product
.
setStock
(
Long
.
valueOf
(
rowData
.
get
(
14
)));
//价格
product
.
setPrice
(
Double
.
valueOf
(
rowData
.
get
(
15
)));
//是否为处方药
product
.
setIsRs
(
rowData
.
get
(
16
));
product
.
setCreateBy
(
UserUtils
.
getUser
().
getId
());
product
.
setUpdateBy
(
UserUtils
.
getUser
().
getId
());
productService
.
saveProduct
(
product
);
});
}
catch
(
IOException
e
)
{
log
.
error
(
e
.
getMessage
());
}
retJson
.
put
(
"errorNo"
,
"0"
);
retJson
.
put
(
"errorMsg"
,
"导入成功"
);
return
retJson
;
}
}
portal-web/pom.xml
View file @
fb78ecff
...
@@ -238,6 +238,30 @@
...
@@ -238,6 +238,30 @@
<version>
1.0-SNAPSHOT
</version>
<version>
1.0-SNAPSHOT
</version>
<type>
war
</type>
<type>
war
</type>
</dependency>
</dependency>
<dependency>
<groupId>
com.cftech
</groupId>
<artifactId>
product-classify-module-web
</artifactId>
<version>
1.0-SNAPSHOT
</version>
<type>
war
</type>
</dependency>
<dependency>
<groupId>
com.cftech
</groupId>
<artifactId>
product-module-web
</artifactId>
<version>
1.0-SNAPSHOT
</version>
<type>
war
</type>
</dependency>
<dependency>
<groupId>
com.cftech
</groupId>
<artifactId>
product-into-wareroom-module-web
</artifactId>
<version>
1.0-SNAPSHOT
</version>
<type>
war
</type>
</dependency>
<dependency>
<groupId>
com.cftech
</groupId>
<artifactId>
product-detail-module-web
</artifactId>
<version>
1.0-SNAPSHOT
</version>
<type>
war
</type>
</dependency>
<!--<dependency>
<!--<dependency>
<groupId>com.cftech</groupId>
<groupId>com.cftech</groupId>
<artifactId>fours-job-module</artifactId>
<artifactId>fours-job-module</artifactId>
...
...
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