Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
config-server-api
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
何熠
config-server-api
Commits
73a78212
Commit
73a78212
authored
Jan 06, 2022
by
zhaoxiaolei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
上传校验
parent
c4d2be67
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
128 additions
and
76 deletions
+128
-76
CharacteristicController.java
...ch/authorization/controller/CharacteristicController.java
+5
-3
CharacteristicValueController.java
...thorization/controller/CharacteristicValueController.java
+3
-3
SuperBomPriceCalculateController.java
...rization/controller/SuperBomPriceCalculateController.java
+3
-3
CharacteristicExportDto.java
...itech/authorization/pojo/dto/CharacteristicExportDto.java
+2
-0
CharacteristicValueExportDto.java
.../authorization/pojo/dto/CharacteristicValueExportDto.java
+2
-0
CharacteristicService.java
...m/uitech/authorization/service/CharacteristicService.java
+4
-1
CharacteristicValueService.java
...ech/authorization/service/CharacteristicValueService.java
+1
-1
CharacteristicServiceImpl.java
...authorization/service/impl/CharacteristicServiceImpl.java
+51
-36
CharacteristicValueServiceImpl.java
...rization/service/impl/CharacteristicValueServiceImpl.java
+27
-14
SuperBomPriceCalculateServiceImpl.java
...ation/service/impl/SuperBomPriceCalculateServiceImpl.java
+27
-14
CharacteristicMapper.xml
src/main/resources/mapper/CharacteristicMapper.xml
+1
-0
CharacteristicValueMapper.xml
src/main/resources/mapper/CharacteristicValueMapper.xml
+2
-1
No files found.
src/main/java/cn/com/uitech/authorization/controller/CharacteristicController.java
View file @
73a78212
...
...
@@ -23,6 +23,8 @@ import org.springframework.web.multipart.MultipartFile;
import
springfox.documentation.annotations.ApiIgnore
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.IOException
;
import
java.text.ParseException
;
import
java.util.List
;
/**
...
...
@@ -115,9 +117,9 @@ public class CharacteristicController {
* @param dto
* @param response
*/
@
Pos
tMapping
(
"/exportCharacteristic"
)
@ApiOperation
(
value
=
"特征管理 导出特征"
,
notes
=
"特征管理 导出特征"
,
httpMethod
=
"
POS
T"
)
public
void
exportCharacteristic
(
@RequestBody
CharacteristicRequestParamDto
dto
,
HttpServletResponse
response
)
{
@
Ge
tMapping
(
"/exportCharacteristic"
)
@ApiOperation
(
value
=
"特征管理 导出特征"
,
notes
=
"特征管理 导出特征"
,
httpMethod
=
"
GE
T"
)
public
void
exportCharacteristic
(
CharacteristicRequestParamDto
dto
,
HttpServletResponse
response
)
throws
ParseException
,
IOException
{
characteristicService
.
exportCharacteristic
(
dto
,
response
);
}
...
...
src/main/java/cn/com/uitech/authorization/controller/CharacteristicValueController.java
View file @
73a78212
...
...
@@ -103,9 +103,9 @@ public class CharacteristicValueController {
* @param dto
* @param response
*/
@
Pos
tMapping
(
"/exportCharacteristicValue"
)
@ApiOperation
(
value
=
"特征值管理 导出特征值"
,
notes
=
"特征值管理 导出特征值"
,
httpMethod
=
"G
POST
ET"
)
public
void
exportCharacteristicValue
(
@RequestBody
CharacteristicValueRequestParamDto
dto
,
HttpServletResponse
response
){
@
Ge
tMapping
(
"/exportCharacteristicValue"
)
@ApiOperation
(
value
=
"特征值管理 导出特征值"
,
notes
=
"特征值管理 导出特征值"
,
httpMethod
=
"GET"
)
public
void
exportCharacteristicValue
(
CharacteristicValueRequestParamDto
dto
,
HttpServletResponse
response
){
characteristicValueService
.
exportCharacteristicValue
(
dto
,
response
);
}
...
...
src/main/java/cn/com/uitech/authorization/controller/SuperBomPriceCalculateController.java
View file @
73a78212
...
...
@@ -75,9 +75,9 @@ public class SuperBomPriceCalculateController {
* @param dto
* @param response
*/
@
Pos
tMapping
(
"/exportCharacteristicValuePrice"
)
@ApiOperation
(
value
=
"特征值价格管理 导出特征值价格"
,
notes
=
"特征值价格管理 导出特征值价格"
,
httpMethod
=
"
POS
T"
)
public
void
exportCharacteristicValuePrice
(
@RequestBody
CharacteristicValueExportDto
dto
,
HttpServletResponse
response
){
@
Ge
tMapping
(
"/exportCharacteristicValuePrice"
)
@ApiOperation
(
value
=
"特征值价格管理 导出特征值价格"
,
notes
=
"特征值价格管理 导出特征值价格"
,
httpMethod
=
"
GE
T"
)
public
void
exportCharacteristicValuePrice
(
CharacteristicValueExportDto
dto
,
HttpServletResponse
response
){
superBomPriceCalculateService
.
exportCharacteristicValuePrice
(
dto
,
response
);
}
...
...
src/main/java/cn/com/uitech/authorization/pojo/dto/CharacteristicExportDto.java
View file @
73a78212
...
...
@@ -27,6 +27,8 @@ public class CharacteristicExportDto implements Serializable {
*/
@FieldNameMapping
(
name
=
"superBomCode"
,
value
=
"SuperBOM"
)
private
String
superBomCode
;
@FieldNameMapping
(
name
=
"superBomName"
,
value
=
"superBomName"
)
private
String
superBomName
;
/**
* 特征编码
*/
...
...
src/main/java/cn/com/uitech/authorization/pojo/dto/CharacteristicValueExportDto.java
View file @
73a78212
...
...
@@ -23,6 +23,8 @@ public class CharacteristicValueExportDto implements Serializable{
*/
@FieldNameMapping
(
name
=
"superBomCode"
,
value
=
"SuperBOM"
)
private
String
superBomCode
;
@FieldNameMapping
(
name
=
"superBomName"
,
value
=
"superBomName"
)
private
String
superBomName
;
/**
* 特征编码
...
...
src/main/java/cn/com/uitech/authorization/service/CharacteristicService.java
View file @
73a78212
...
...
@@ -8,6 +8,9 @@ import com.github.pagehelper.PageInfo;
import
org.springframework.web.multipart.MultipartFile
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.IOException
;
import
java.io.UnsupportedEncodingException
;
import
java.text.ParseException
;
import
java.util.List
;
/**
...
...
@@ -57,7 +60,7 @@ public interface CharacteristicService {
Object
updateCharacteristicIsH3C
(
CharacteristicRequestParamDto
dto
);
void
exportCharacteristic
(
CharacteristicRequestParamDto
dto
,
HttpServletResponse
response
);
void
exportCharacteristic
(
CharacteristicRequestParamDto
dto
,
HttpServletResponse
response
)
throws
ParseException
,
IOException
;
Object
batchUpdateByUpload
(
MultipartFile
file
);
}
src/main/java/cn/com/uitech/authorization/service/CharacteristicValueService.java
View file @
73a78212
...
...
@@ -72,7 +72,7 @@ public interface CharacteristicValueService {
* @param file
* @return
*/
String
batchUpdateByUpload
(
MultipartFile
file
);
Object
batchUpdateByUpload
(
MultipartFile
file
);
/**
* @desc 询配询价 导出可用配置和OD关系表
...
...
src/main/java/cn/com/uitech/authorization/service/impl/CharacteristicServiceImpl.java
View file @
73a78212
...
...
@@ -4,6 +4,7 @@ import cn.com.uitech.authorization.exception.BizException;
import
cn.com.uitech.authorization.mapper.CharacteristicMapper
;
import
cn.com.uitech.authorization.pojo.dto.CharacteristicExportDto
;
import
cn.com.uitech.authorization.pojo.dto.CharacteristicRequestParamDto
;
import
cn.com.uitech.authorization.pojo.dto.GetProductOutDto
;
import
cn.com.uitech.authorization.pojo.entity.Characteristic
;
import
cn.com.uitech.authorization.service.CharacteristicService
;
import
cn.com.uitech.authorization.service.CtoBomService
;
...
...
@@ -29,8 +30,11 @@ import tk.mybatis.mapper.entity.Example;
import
javax.annotation.Resource
;
import
javax.servlet.ServletOutputStream
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.IOException
;
import
java.io.UnsupportedEncodingException
;
import
java.nio.charset.StandardCharsets
;
import
java.text.DecimalFormat
;
import
java.text.ParseException
;
import
java.util.*
;
/**
...
...
@@ -131,9 +135,8 @@ public class CharacteristicServiceImpl implements CharacteristicService {
}
@Override
public
void
exportCharacteristic
(
CharacteristicRequestParamDto
dto
,
HttpServletResponse
response
)
{
public
void
exportCharacteristic
(
CharacteristicRequestParamDto
dto
,
HttpServletResponse
response
)
throws
ParseException
,
IOException
{
//根据页面输入框查询要导出的数据
try
{
Date
date
=
DateUitl
.
getNowAll
();
String
format
=
DateUitl
.
format
(
date
,
"yyyy-MM-dd"
);
String
[]
split
=
format
.
split
(
"-"
);
...
...
@@ -146,11 +149,11 @@ public class CharacteristicServiceImpl implements CharacteristicService {
List
<
CharacteristicExportDto
>
excelDtos
=
new
ArrayList
<>();
HSSFWorkbook
wb
=
new
HSSFWorkbook
();
file
=
dto
.
getSuperBomCode
()
+
worktableTitle
+
".xls"
;
//根据页面输入框查询要导出的数据
priceModelList
=
characteristicMapper
.
exportCharacteristic
(
dto
);
excelDtos
=
exportStandBom
(
priceModelList
);
wb
=
exportExcelBom
(
excelDtos
);
file
=
dto
.
getSuperBomCode
()
+
priceModelList
.
get
(
0
).
getSuperBomName
()
+
"特征信息"
+
".xls"
;
String
filename
=
null
;
filename
=
new
String
(
file
.
getBytes
(
"GBK"
),
StandardCharsets
.
ISO_8859_1
);
...
...
@@ -160,9 +163,6 @@ public class CharacteristicServiceImpl implements CharacteristicService {
ServletOutputStream
outputStream
=
response
.
getOutputStream
();
wb
.
write
(
outputStream
);
outputStream
.
close
();
}
catch
(
Exception
e
)
{
throw
new
BizException
(
ApiResult
.
INTERNAL_SERVER_ERROR
,
e
.
getMessage
());
}
}
private
List
<
CharacteristicExportDto
>
exportStandBom
(
List
<
CharacteristicExportDto
>
priceModelList
)
{
...
...
@@ -299,26 +299,37 @@ public class CharacteristicServiceImpl implements CharacteristicService {
* @desc 特征管理 上传文件更新
*/
@Override
public
String
batchUpdateByUpload
(
MultipartFile
file
)
{
int
result
=
0
;
//判断文件是否为空
if
(
null
==
file
||
file
.
isEmpty
())
{
throw
new
BizException
(
ApiResult
.
API_REQ_DATA_IS_FAIL
,
"特征上传文件批量更新-上传文件为空"
);
}
//读取文件内容
List
<
CharacteristicExportDto
>
list
=
uploadExcl
(
file
);
//非空校验
if
(!
CollectionUtils
.
isEmpty
(
list
))
{
ArrayList
<
String
>
checkFileIsNull
=
checkFileIsNull
(
list
);
if
(!
CollectionUtils
.
isEmpty
(
checkFileIsNull
))
{
return
String
.
valueOf
(
checkFileIsNull
);
public
GetProductOutDto
batchUpdateByUpload
(
MultipartFile
file
)
{
GetProductOutDto
result
=
new
GetProductOutDto
();
try
{
//判断文件是否为空
if
(
null
==
file
||
file
.
isEmpty
())
{
throw
new
BizException
(
ApiResult
.
API_REQ_DATA_IS_FAIL
,
"特征上传文件批量更新-上传文件为空"
);
}
}
else
{
//读取文件内容
List
<
CharacteristicExportDto
>
list
=
uploadExcl
(
file
);
//非空校验
if
(!
CollectionUtils
.
isEmpty
(
list
))
{
ArrayList
<
String
>
checkFileIsNull
=
checkFileIsNull
(
list
);
if
(!
CollectionUtils
.
isEmpty
(
checkFileIsNull
))
{
result
.
setData
(
null
);
result
.
setMsg
(
String
.
valueOf
(
checkFileIsNull
));
result
.
setCode
(
500
);
return
result
;
}
}
else
{
}
updateData
(
list
);
result
.
setData
(
null
);
result
.
setMsg
(
"更新附件内容成功"
);
result
.
setCode
(
200
);
return
result
;
}
catch
(
Exception
e
)
{
result
.
setData
(
null
);
result
.
setMsg
(
"特征上传文件批量更新-请检查上传文件"
);
result
.
setCode
(
500
);
return
result
;
}
updateData
(
list
);
return
"更新附件内容成功"
;
}
/**
...
...
@@ -379,12 +390,11 @@ public class CharacteristicServiceImpl implements CharacteristicService {
* @return List<CharacteristicExportDto>
* @desc 解析上传文件
*/
public
List
<
CharacteristicExportDto
>
uploadExcl
(
MultipartFile
file
)
{
long
startDate
=
Calendar
.
getInstance
().
getTimeInMillis
();
List
<
CharacteristicExportDto
>
list
=
Lists
.
newArrayList
();
Workbook
wook
=
null
;
public
List
<
CharacteristicExportDto
>
uploadExcl
(
MultipartFile
file
)
throws
IOException
{
List
<
CharacteristicExportDto
>
list
=
Lists
.
newArrayList
();
try
{
Workbook
wook
=
null
;
String
filename
=
file
.
getOriginalFilename
();
if
(
filename
.
endsWith
(
"xls"
))
{
ZipSecureFile
.
setMinInflateRatio
(-
1.0d
);
...
...
@@ -400,16 +410,21 @@ public class CharacteristicServiceImpl implements CharacteristicService {
int
rows
=
sheetAt
.
getPhysicalNumberOfRows
();
for
(
int
j
=
1
;
j
<
rows
;
j
++)
{
Row
row
=
sheetAt
.
getRow
(
j
);
int
cells
=
row
.
getPhysicalNumberOfCells
();
//把每条数据封装进对象里
CharacteristicExportDto
dto
=
setCharacteristicExportDto
(
row
,
cells
);
list
.
add
(
dto
);
Integer
cells
=
row
.
getPhysicalNumberOfCells
();
if
(
cells
.
equals
(
6
))
{
//把每条数据封装进对象里
CharacteristicExportDto
dto
=
setCharacteristicExportDto
(
row
,
cells
);
list
.
add
(
dto
);
}
else
{
throw
new
BizException
(
ApiResult
.
API_REQ_DATA_IS_FAIL
,
"特征上传文件批量更新-请检查上传文件"
);
}
}
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
catch
(
Exception
e
){
throw
new
BizException
(
ApiResult
.
API_REQ_DATA_IS_FAIL
,
"特征上传文件批量更新-请检查上传文件"
);
}
long
endDate
=
Calendar
.
getInstance
().
getTimeInMillis
();
return
list
;
}
...
...
src/main/java/cn/com/uitech/authorization/service/impl/CharacteristicValueServiceImpl.java
View file @
73a78212
...
...
@@ -218,11 +218,11 @@ public class CharacteristicValueServiceImpl implements CharacteristicValueServic
List
<
CharacteristicValueExportDto
>
excelDtos
=
new
ArrayList
<>();
HSSFWorkbook
wb
=
new
HSSFWorkbook
();
file
=
dto
.
getSuperBomCode
()
+
worktableTitle
+
".xls"
;
//根据页面输入框查询要导出的数据
priceModelList
=
characteristicValueMapper
.
exportCharacteristicValue
(
dto
);
excelDtos
=
exportStandBom
(
priceModelList
);
wb
=
exportExcelBom
(
excelDtos
);
file
=
dto
.
getSuperBomCode
()
+
priceModelList
.
get
(
0
).
getSuperBomName
()
+
"特征值信息"
+
".xls"
;
String
filename
=
null
;
filename
=
new
String
(
file
.
getBytes
(
"GBK"
),
StandardCharsets
.
ISO_8859_1
);
...
...
@@ -444,8 +444,9 @@ public class CharacteristicValueServiceImpl implements CharacteristicValueServic
* @desc 特征值管理 上传文件更新
*/
@Override
public
String
batchUpdateByUpload
(
MultipartFile
file
)
{
int
result
=
0
;
public
GetProductOutDto
batchUpdateByUpload
(
MultipartFile
file
)
{
GetProductOutDto
result
=
new
GetProductOutDto
();
try
{
//判断文件是否为空
if
(
null
==
file
||
file
.
isEmpty
())
{
throw
new
BizException
(
ApiResult
.
API_REQ_DATA_IS_FAIL
,
"特征值上传文件批量更新-上传文件为空"
);
...
...
@@ -456,13 +457,23 @@ public class CharacteristicValueServiceImpl implements CharacteristicValueServic
if
(!
CollectionUtils
.
isEmpty
(
list
))
{
ArrayList
<
String
>
checkFileIsNull
=
checkFileIsNull
(
list
);
if
(!
CollectionUtils
.
isEmpty
(
checkFileIsNull
))
{
return
String
.
valueOf
(
checkFileIsNull
);
result
.
setData
(
null
);
result
.
setMsg
(
String
.
valueOf
(
checkFileIsNull
));
result
.
setCode
(
500
);
return
result
;
}
}
else
{
}
updateData
(
list
);
return
"更新附件内容成功"
;
result
.
setData
(
null
);
result
.
setMsg
(
"更新附件内容成功"
);
result
.
setCode
(
200
);
return
result
;
}
catch
(
Exception
e
)
{
result
.
setData
(
null
);
result
.
setMsg
(
"特征值上传文件批量更新-请检查上传文件"
);
result
.
setCode
(
500
);
return
result
;
}
}
...
...
@@ -528,7 +539,6 @@ public class CharacteristicValueServiceImpl implements CharacteristicValueServic
* @desc 解析上传文件
*/
public
List
<
CharacteristicValueExportDto
>
uploadExcl
(
MultipartFile
file
)
{
long
startDate
=
Calendar
.
getInstance
().
getTimeInMillis
();
List
<
CharacteristicValueExportDto
>
list
=
Lists
.
newArrayList
();
Workbook
wook
=
null
;
...
...
@@ -548,16 +558,19 @@ public class CharacteristicValueServiceImpl implements CharacteristicValueServic
int
rows
=
sheetAt
.
getPhysicalNumberOfRows
();
for
(
int
j
=
1
;
j
<
rows
;
j
++)
{
Row
row
=
sheetAt
.
getRow
(
j
);
int
cells
=
row
.
getPhysicalNumberOfCells
();
//把每条数据封装进对象里
CharacteristicValueExportDto
dto
=
setCharacteristicValueExportDto
(
row
,
cells
);
list
.
add
(
dto
);
Integer
cells
=
row
.
getPhysicalNumberOfCells
();
if
(
cells
.
equals
(
12
))
{
//把每条数据封装进对象里
CharacteristicValueExportDto
dto
=
setCharacteristicValueExportDto
(
row
,
cells
);
list
.
add
(
dto
);
}
else
{
throw
new
BizException
(
ApiResult
.
API_REQ_DATA_IS_FAIL
,
"特征值上传文件批量更新-请检查上传文件"
);
}
}
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
(
);
throw
new
BizException
(
ApiResult
.
API_REQ_DATA_IS_FAIL
,
"特征值上传文件批量更新-请检查上传文件"
);
}
long
endDate
=
Calendar
.
getInstance
().
getTimeInMillis
();
return
list
;
}
...
...
src/main/java/cn/com/uitech/authorization/service/impl/SuperBomPriceCalculateServiceImpl.java
View file @
73a78212
...
...
@@ -275,7 +275,6 @@ public class SuperBomPriceCalculateServiceImpl implements SuperBomPriceCalculate
List
<
SuperCharacterPriceInfoDto
>
excelDtos
=
new
ArrayList
<>();
HSSFWorkbook
wb
=
new
HSSFWorkbook
();
file
=
"特征值价格"
+
worktableTitle
+
".xls"
;
//根据页面输入框查询要导出的数据
priceModelList
=
superBomPriceCalculateMapper
.
exportCharacteristicValuePrice
(
dto
);
if
(
ObjectUtils
.
isEmpty
(
priceModelList
))
{
...
...
@@ -313,6 +312,7 @@ public class SuperBomPriceCalculateServiceImpl implements SuperBomPriceCalculate
excelDtos
=
exportStandBom
(
priceModelList
);
wb
=
exportExcelBom
(
excelDtos
);
file
=
priceModelList
.
get
(
0
).
getSuperBomCode
()
+
priceModelList
.
get
(
0
).
getSuperBomName
()
+
"特征值价格信息"
+
".xls"
;
String
filename
=
null
;
filename
=
new
String
(
file
.
getBytes
(
"GBK"
),
StandardCharsets
.
ISO_8859_1
);
response
.
setContentType
(
"APPLICATION/OCTET-STREAM"
);
...
...
@@ -548,8 +548,9 @@ public class SuperBomPriceCalculateServiceImpl implements SuperBomPriceCalculate
* @desc 特征值价格管理 上传文件更新
*/
@Override
public
String
batchUpdateByUpload
(
MultipartFile
file
)
{
int
result
=
0
;
public
GetProductOutDto
batchUpdateByUpload
(
MultipartFile
file
)
{
GetProductOutDto
result
=
new
GetProductOutDto
();
try
{
//判断文件是否为空
if
(
null
==
file
||
file
.
isEmpty
())
{
throw
new
BizException
(
ApiResult
.
API_REQ_DATA_IS_FAIL
,
"特征值价格上传文件批量更新-上传文件为空"
);
...
...
@@ -560,13 +561,23 @@ public class SuperBomPriceCalculateServiceImpl implements SuperBomPriceCalculate
if
(!
CollectionUtils
.
isEmpty
(
list
))
{
ArrayList
<
String
>
checkFileIsNull
=
checkFileIsNull
(
list
);
if
(!
CollectionUtils
.
isEmpty
(
checkFileIsNull
))
{
return
String
.
valueOf
(
checkFileIsNull
);
result
.
setData
(
null
);
result
.
setMsg
(
String
.
valueOf
(
checkFileIsNull
));
result
.
setCode
(
500
);
return
result
;
}
}
else
{
}
updateData
(
list
);
return
"更新附件内容成功"
;
result
.
setData
(
null
);
result
.
setMsg
(
"更新附件内容成功"
);
result
.
setCode
(
200
);
return
result
;
}
catch
(
Exception
e
)
{
result
.
setData
(
null
);
result
.
setMsg
(
"特征值价格上传文件批量更新-请检查上传文件"
);
result
.
setCode
(
500
);
return
result
;
}
}
...
...
@@ -645,7 +656,6 @@ public class SuperBomPriceCalculateServiceImpl implements SuperBomPriceCalculate
* @desc 解析上传文件
*/
public
List
<
SuperCharacterPriceInfoDto
>
uploadExcl
(
MultipartFile
file
)
{
long
startDate
=
Calendar
.
getInstance
().
getTimeInMillis
();
List
<
SuperCharacterPriceInfoDto
>
list
=
Lists
.
newArrayList
();
Workbook
wook
=
null
;
...
...
@@ -665,16 +675,19 @@ public class SuperBomPriceCalculateServiceImpl implements SuperBomPriceCalculate
int
rows
=
sheetAt
.
getPhysicalNumberOfRows
();
for
(
int
j
=
1
;
j
<
rows
;
j
++)
{
Row
row
=
sheetAt
.
getRow
(
j
);
int
cells
=
row
.
getPhysicalNumberOfCells
();
//把每条数据封装进对象里
SuperCharacterPriceInfoDto
dto
=
setCharacteristicPriceExportDto
(
row
,
cells
);
list
.
add
(
dto
);
Integer
cells
=
row
.
getPhysicalNumberOfCells
();
if
(
cells
.
equals
(
14
))
{
//把每条数据封装进对象里
SuperCharacterPriceInfoDto
dto
=
setCharacteristicPriceExportDto
(
row
,
cells
);
list
.
add
(
dto
);
}
else
{
throw
new
BizException
(
ApiResult
.
API_REQ_DATA_IS_FAIL
,
"特征值价格上传文件批量更新-请检查上传文件"
);
}
}
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
(
);
throw
new
BizException
(
ApiResult
.
API_REQ_DATA_IS_FAIL
,
"特征值价格上传文件批量更新-请检查上传文件"
);
}
long
endDate
=
Calendar
.
getInstance
().
getTimeInMillis
();
return
list
;
}
...
...
src/main/resources/mapper/CharacteristicMapper.xml
View file @
73a78212
...
...
@@ -238,6 +238,7 @@
select
sort,
a.super_bom_code as superBomCode,
b.super_bom_name as superBomName,
characteristic_code as characteristicCode,
characteristic_name as characteristicName,
unis_sales_c_name as unisSalesCName,
...
...
src/main/resources/mapper/CharacteristicValueMapper.xml
View file @
73a78212
...
...
@@ -164,6 +164,7 @@
resultType=
"cn.com.uitech.authorization.pojo.dto.CharacteristicValueExportDto"
>
SELECT DISTINCT
a.super_bom_code as superBomCode,
c.super_bom_name as superBomName,
a.Characteristic_Code as CharacteristicCode,
b.unis_Sales_C_Name as CharacteristicName,
A.Characteristic_Value_Code AS CharacteristicValueCode,
...
...
@@ -180,7 +181,7 @@
b.sort
FROM
super_characteristic_value_info
A LEFT JOIN super_characteristic_info b ON A.Characteristic_Code = b.Characteristic_Code
A LEFT JOIN super_characteristic_info b ON A.Characteristic_Code = b.Characteristic_Code
AND A.super_bom_code = B.super_bom_code
LEFT JOIN super_bom_info C ON b.super_BOM_Code = c.super_BOM_Code
<where>
<if
test=
"productClassCode!=null and productClassCode!=''"
>
...
...
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