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
564e454d
Commit
564e454d
authored
Oct 14, 2020
by
卜远杰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
商品详情增加图片展示
parent
45e02fac
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
74 additions
and
20 deletions
+74
-20
pom.xml
aidea-modules/pom.xml
+1
-3
productDetaillist.html
...webapp/WEB-INF/views/productDetail/productDetaillist.html
+16
-3
ProductDetailMapper.xml
...java/com/cftech/productdetail/dao/ProductDetailMapper.xml
+30
-4
ProductDetail.java
...in/java/com/cftech/productdetail/model/ProductDetail.java
+8
-0
ProductDetailController.java
...com/cftech/productdetail/web/ProductDetailController.java
+4
-4
Product.java
...odule/src/main/java/com/cftech/product/model/Product.java
+4
-0
ProductServiceImpl.java
...a/com/cftech/product/service/impl/ProductServiceImpl.java
+2
-3
ProductController.java
...c/main/java/com/cftech/product/web/ProductController.java
+7
-1
pom.xml
portal-web/pom.xml
+2
-2
No files found.
aidea-modules/pom.xml
View file @
564e454d
...
...
@@ -22,9 +22,7 @@
<module>
product-into-wareroom-module-web
</module>
<module>
product-module
</module>
<module>
product-module-web
</module>
<module>
order-module
</module>
<module>
order-module-web
</module>
<module>
order-module
</module>
</modules>
<dependencies>
...
...
aidea-modules/product-detail-module-web/src/main/webapp/WEB-INF/views/productDetail/productDetaillist.html
View file @
564e454d
...
...
@@ -99,7 +99,9 @@
<td>
物料编码
</td>
<td>
产品编码
</td>
<td>
产品名称
</td>
<td>
产品图片
</td>
<td>
产品分类编码
</td>
<td>
产品分类名称
</td>
<td>
入库编码
</td>
<td>
出库编码
</td>
<td>
订单编码
</td>
...
...
@@ -212,8 +214,12 @@
"mData"
:
"productNumber"
},{
"mData"
:
"productName"
},{
"mData"
:
"productImg"
},{
"mData"
:
"productClassifyNumber"
},{
"mData"
:
"classifyName"
},{
"mData"
:
"intoWareroomNumber"
},{
...
...
@@ -239,16 +245,23 @@
'visible'
:
false
,
'targets'
:
[
0
]
},
{
"aTargets"
:[
5
],
"mData"
:
"productImg"
,
"mRender"
:
function
(
a
,
b
,
c
,
d
){
return
"<img src='"
+
a
+
"' style='width: 80px;height: 80px;'>"
;
}
},
{
"aTargets"
:
[
1
1
],
"aTargets"
:
[
1
3
],
"mData"
:
"createTime"
,
"mRender"
:
function
(
a
,
b
,
c
,
d
)
{
return
formatDates
(
a
,
"yyyy-MM-dd HH:mm:ss"
);
}
},{
"aTargets"
:
[
1
2
],
"aTargets"
:
[
1
4
],
"mData"
:
"outWareroomTime"
,
"mRender"
:
function
(
a
,
b
,
c
,
d
)
{
if
(
a
==
null
||
a
==
""
){
...
...
@@ -259,7 +272,7 @@
}
},{
"aTargets"
:
[
1
3
],
"aTargets"
:
[
1
5
],
"mData"
:
"id"
,
"mRender"
:
function
(
a
,
b
,
c
,
d
)
{
var
html
=
'#if($shiro.hasPermission("qy:productDetail:edit"))'
;
//
...
...
aidea-modules/product-detail-module/src/main/java/com/cftech/productdetail/dao/ProductDetailMapper.xml
View file @
564e454d
...
...
@@ -103,7 +103,7 @@
#{description, jdbcType=VARCHAR},
#{createBy, jdbcType=BIGINT},
#{updateBy, jdbcType=BIGINT},
#{outWareroomTime, jdbc
=DATETIME
}
#{outWareroomTime, jdbc
Type=TIMESTAMP
}
)
</insert>
...
...
@@ -115,15 +115,41 @@
</select>
<select
id=
"count"
parameterType=
"java.util.Map"
resultType=
"java.lang.Integer"
>
SELECT COUNT(1) FROM t_aidea_product_detail
SELECT COUNT(1) FROM t_aidea_product_detail d
LEFT JOIN t_aidea_product p on d.product_number = p.product_number and p.del_flag = 0
LEFT JOIN t_aidea_product_classify c on d.product_classify_number = c.classify_number and c.del_flag = 0
<include
refid=
"sqlWhere"
/>
</select>
<select
id=
"fetchSearchByPage"
parameterType=
"java.util.Map"
resultMap=
"resultMap"
>
SELECT
<include
refid=
"sqlColumns"
/>
FROM t_aidea_product_detail
d.id id,
d.product_detail_number productDetailNumber,
d.materiel_number materielNumber,
d.product_number productNumber,
d.product_name productName,
d.product_classify_number productClassifyNumber,
d.into_wareroom_number intoWareroomNumber,
d.out_wareroom_number outWareroomNumber,
d.order_number orderNumber,
d.logistics_number logisticsNumber,
d.whether_sell whetherSell,
d.accounts_id accountsId,
d.del_flag delFlag,
d.STATUS,
d.create_time createTime,
d.update_time updateTime,
d.description description,
d.create_by createBy,
d.update_by updateBy,
d.out_wareroom_time outWareroomTime,
p.product_img productImg,
c.classify_name classifyName
FROM
t_aidea_product_detail d
LEFT JOIN t_aidea_product p on d.product_number = p.product_number and p.del_flag = 0
LEFT JOIN t_aidea_product_classify c on d.product_classify_number = c.classify_number and c.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>
...
...
aidea-modules/product-detail-module/src/main/java/com/cftech/productdetail/model/ProductDetail.java
View file @
564e454d
...
...
@@ -52,6 +52,14 @@ public class ProductDetail implements Serializable {
*/
@ExportConfig
(
value
=
"出库时间"
,
width
=
100
,
showLevel
=
1
)
private
Date
outWareroomTime
;
/**
* 产品图片
*/
private
String
productImg
;
/**
* 产品分类名称
*/
private
String
classifyName
;
/* 所属的账号 */
private
Long
accountsId
;
/* 删除标识 */
...
...
aidea-modules/product-detail-module/src/main/java/com/cftech/productdetail/web/ProductDetailController.java
View file @
564e454d
...
...
@@ -103,12 +103,12 @@ public class ProductDetailController {
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
);
conds
.
equal
(
"d
.d
el_flag"
,
Constants
.
DEL_FLAG_0
);
conds
.
equal
(
"
d.
accounts_id"
,
accountsId
);
if
(!
StringUtils
.
isEmpty
(
productDetail
.
getProductName
())){
conds
.
equal
(
"product_name"
,
productDetail
.
getProductName
());
conds
.
equal
(
"
d.
product_name"
,
productDetail
.
getProductName
());
}
Sort
sort
=
new
Sort
(
"create_time"
,
OrderType
.
DESC
);
Sort
sort
=
new
Sort
(
"
d.
create_time"
,
OrderType
.
DESC
);
List
<
ProductDetail
>
list
=
productDetailService
.
fetchSearchByPage
(
conds
,
sort
,
iDisplayStart
,
iDisplayLength
);
Integer
counts
=
productDetailService
.
count
(
conds
);
...
...
aidea-modules/product-module/src/main/java/com/cftech/product/model/Product.java
View file @
564e454d
...
...
@@ -125,6 +125,10 @@ public class Product implements Serializable {
*产品图片
*/
private
String
productImg
;
/**
* 入库编码
*/
private
String
ruKuNumber
;
/* 所属的账号 */
private
Long
accountsId
;
/* 删除标识 */
...
...
aidea-modules/product-module/src/main/java/com/cftech/product/service/impl/ProductServiceImpl.java
View file @
564e454d
...
...
@@ -95,8 +95,7 @@ public class ProductServiceImpl extends GenericServiceImpl<Product> implements P
// 2、 生成入库单
ProductIntoWareroom
productIntoWareroom
=
new
ProductIntoWareroom
();
productIntoWareroom
.
setAccountsId
(
product
.
getAccountsId
());
String
ruKuNumber
=
codingruleUtils
.
getNumber
(
product
.
getAccountsId
(),
ProductIntoWareroom
.
class
.
getName
());
productIntoWareroom
.
setIntoWareroomNumber
(
ruKuNumber
);
productIntoWareroom
.
setIntoWareroomNumber
(
product
.
getRuKuNumber
());
productIntoWareroom
.
setProductSkuNumber
(
"SKU"
);
productIntoWareroom
.
setProductNumber
(
product
.
getProductNumber
());
productIntoWareroom
.
setProductName
(
product
.
getProductName
());
...
...
@@ -117,7 +116,7 @@ public class ProductServiceImpl extends GenericServiceImpl<Product> implements P
productDetail
.
setProductNumber
(
product
.
getProductNumber
());
productDetail
.
setProductName
(
product
.
getProductName
());
productDetail
.
setProductClassifyNumber
(
product
.
getClassifyNumber
());
productDetail
.
setIntoWareroomNumber
(
ruKuNumber
);
productDetail
.
setIntoWareroomNumber
(
product
.
getRuKuNumber
()
);
productDetail
.
setWhetherSell
(
"否"
);
productDetail
.
setCreateBy
(
product
.
getCreateBy
());
productDetail
.
setUpdateBy
(
product
.
getUpdateBy
());
...
...
aidea-modules/product-module/src/main/java/com/cftech/product/web/ProductController.java
View file @
564e454d
...
...
@@ -11,6 +11,7 @@ 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.productintowareroom.model.ProductIntoWareroom
;
import
com.cftech.sys.security.PermissionSign
;
import
com.cftech.sys.security.UserUtils
;
import
lombok.extern.slf4j.Slf4j
;
...
...
@@ -186,6 +187,7 @@ public class ProductController {
StringBuffer
sbClassify
=
new
StringBuffer
();
boolean
classify
=
true
;
Long
accountId
=
UserUtils
.
getmpaccounts
(
request
);
String
ruKuNumber
=
codingruleUtils
.
getNumber
(
accountId
,
ProductIntoWareroom
.
class
.
getName
());
if
(
file
==
null
)
{
retJson
.
put
(
"errorNo"
,
"1"
);
retJson
.
put
(
"errorMsg"
,
"未选择导入文件"
);
...
...
@@ -250,9 +252,13 @@ public class ProductController {
product
.
setStock
(
Long
.
valueOf
(
rowData
.
get
(
14
)));
}
//价格
if
(!
StringUtils
.
isEmpty
(
rowData
.
get
(
15
))){
product
.
setPrice
(
Double
.
valueOf
(
rowData
.
get
(
15
)));
}
//是否为处方药
product
.
setIsRs
(
rowData
.
get
(
16
));
//生成本次导入的入库编码
product
.
setRuKuNumber
(
ruKuNumber
);
product
.
setCreateBy
(
UserUtils
.
getUser
().
getId
());
product
.
setUpdateBy
(
UserUtils
.
getUser
().
getId
());
productService
.
saveProduct
(
product
);
...
...
portal-web/pom.xml
View file @
564e454d
...
...
@@ -274,12 +274,12 @@
<version>
1.0-SNAPSHOT
</version>
<type>
war
</type>
</dependency>
<dependency>
<
!--<
dependency>
<groupId>com.cftech</groupId>
<artifactId>order-module-web</artifactId>
<version>1.0-SNAPSHOT</version>
<type>war</type>
</dependency>
</dependency>
-->
</dependencies>
<build>
<finalName>
portal-web
</finalName>
...
...
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