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
b6de9ca9
Commit
b6de9ca9
authored
Oct 30, 2020
by
卜远杰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
产品分类改成多选-01
parent
28731320
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
8 deletions
+11
-8
ConsultSheetController.java
...a/com/cftech/consultsheet/web/ConsultSheetController.java
+1
-0
ProductMapper.xml
...le/src/main/java/com/cftech/product/dao/ProductMapper.xml
+1
-0
Product.java
...odule/src/main/java/com/cftech/product/model/Product.java
+4
-4
ProductController.java
...c/main/java/com/cftech/product/web/ProductController.java
+5
-4
No files found.
aidea-modules/consult-module/src/main/java/com/cftech/consultsheet/web/ConsultSheetController.java
View file @
b6de9ca9
...
@@ -4,6 +4,7 @@ package com.cftech.consultsheet.web;
...
@@ -4,6 +4,7 @@ package com.cftech.consultsheet.web;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.cftech.accounts.service.MpAccountsService
;
import
com.cftech.accounts.service.MpAccountsService
;
import
com.cftech.addresst.model.Address
;
import
com.cftech.addresst.model.Address
;
import
com.cftech.addresst.service.AddressService
;
import
com.cftech.addresst.service.AddressService
;
import
com.cftech.base.codingrule.utils.CodingruleUtils
;
import
com.cftech.base.codingrule.utils.CodingruleUtils
;
...
...
aidea-modules/product-module/src/main/java/com/cftech/product/dao/ProductMapper.xml
View file @
b6de9ca9
...
@@ -204,6 +204,7 @@
...
@@ -204,6 +204,7 @@
t_aidea_product a
t_aidea_product a
LEFT JOIN t_aidea_product_classify b ON a.classify_id = b.id
LEFT JOIN t_aidea_product_classify b ON a.classify_id = b.id
AND b.del_flag = '0'
AND b.del_flag = '0'
<include
refid=
"sqlWhere"
/>
<if
test=
"sort!=null"
>
ORDER BY ${sort.param} ${sort.type}
</if>
<if
test=
"sort!=null"
>
ORDER BY ${sort.param} ${sort.type}
</if>
<if
test=
"limit>0"
>
limit #{offset},#{limit}
</if>
<if
test=
"limit>0"
>
limit #{offset},#{limit}
</if>
</select>
</select>
...
...
aidea-modules/product-module/src/main/java/com/cftech/product/model/Product.java
View file @
b6de9ca9
...
@@ -26,18 +26,18 @@ public class Product implements Serializable {
...
@@ -26,18 +26,18 @@ public class Product implements Serializable {
/**
/**
* 产品分类编码
* 产品分类编码
*/
*/
@ExportConfig
(
value
=
"产品分类编码(多个分类用英文逗号隔开
)"
,
width
=
20
0
,
showLevel
=
2
)
@ExportConfig
(
value
=
"产品分类编码(多个分类用英文逗号隔开
,必填字段)"
,
width
=
25
0
,
showLevel
=
2
)
private
String
classifyNumber
;
private
String
classifyNumber
;
/**
/**
* 产品分类名称
* 产品分类名称
*/
*/
@ExportConfig
(
value
=
"产品分类名称"
,
width
=
150
,
showLevel
=
1
)
@ExportConfig
(
value
=
"产品分类名称
(必填字段)
"
,
width
=
150
,
showLevel
=
1
)
private
String
classifyName
;
private
String
classifyName
;
/**
/**
* 产品编码
* 产品编码
*/
*/
@ExportConfig
(
value
=
"产品编码"
,
width
=
100
)
@ExportConfig
(
value
=
"产品编码
(必填字段)
"
,
width
=
100
)
private
String
productNumber
;
private
String
productNumber
;
/**
/**
* 产品名称
* 产品名称
...
@@ -103,7 +103,7 @@ public class Product implements Serializable {
...
@@ -103,7 +103,7 @@ public class Product implements Serializable {
/**
/**
*库存
*库存
*/
*/
@ExportConfig
(
value
=
"库存"
,
width
=
100
)
@ExportConfig
(
value
=
"库存
(必填字段)
"
,
width
=
100
)
private
Long
stock
;
private
Long
stock
;
/**
/**
*价格
*价格
...
...
aidea-modules/product-module/src/main/java/com/cftech/product/web/ProductController.java
View file @
b6de9ca9
...
@@ -226,14 +226,15 @@ public class ProductController {
...
@@ -226,14 +226,15 @@ public class ProductController {
}
}
product
.
setAccountsId
(
accountId
);
product
.
setAccountsId
(
accountId
);
//产品编码
//产品编码
product
.
setProductNumber
(
rowData
.
get
(
1
));
Conds
conds
=
new
Conds
();
Conds
conds
=
new
Conds
();
conds
.
equal
(
"
product_number"
,
rowData
.
get
(
1
));
conds
.
equal
(
"
a.product_number"
,
rowData
.
get
(
1
).
trim
(
));
conds
.
equal
(
"del_flag"
,
0
);
conds
.
equal
(
"
a.
del_flag"
,
0
);
Product
listProduct
=
productService
.
fetchSearchByConds
(
conds
);
Product
listProduct
=
productService
.
fetchSearchByConds
(
conds
);
if
(
listProduct
==
null
){
if
(
listProduct
==
null
){
sbProduct
.
append
(
rowData
.
get
(
1
));
sbProduct
.
append
(
rowData
.
get
(
1
));
return
;
return
;
}
else
{
product
.
setProductNumber
(
rowData
.
get
(
1
).
trim
());
}
}
//产品名称
//产品名称
product
.
setProductName
(
rowData
.
get
(
2
));
product
.
setProductName
(
rowData
.
get
(
2
));
...
@@ -287,7 +288,7 @@ public class ProductController {
...
@@ -287,7 +288,7 @@ public class ProductController {
if
(
sbClassify
.
length
()>
0
){
if
(
sbClassify
.
length
()>
0
){
retJson
.
put
(
"errorMsg"
,
"部分导入失败,产品编码有:"
+
sbClassify
.
toString
()+
"; 失败原因:库存不能为空或者为负数"
);
retJson
.
put
(
"errorMsg"
,
"部分导入失败,产品编码有:"
+
sbClassify
.
toString
()+
"; 失败原因:库存不能为空或者为负数"
);
}
else
if
(
sbProduct
.
length
()
>
0
){
}
else
if
(
sbProduct
.
length
()
>
0
){
retJson
.
put
(
"errorMsg"
,
"部分导入失败,产品编码有:"
+
sb
Classify
.
toString
()+
"; 失败原因:错误产品编码"
);
retJson
.
put
(
"errorMsg"
,
"部分导入失败,产品编码有:"
+
sb
Product
.
toString
()+
"; 失败原因:错误产品编码"
);
}
else
{
}
else
{
retJson
.
put
(
"errorMsg"
,
"导入成功"
);
retJson
.
put
(
"errorMsg"
,
"导入成功"
);
}
}
...
...
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