Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gic-store
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
base_platform_enterprise
gic-store
Commits
f8bf496a
Commit
f8bf496a
authored
Sep 09, 2020
by
zhiwj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码规范
parent
ed6d9ad3
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
0 additions
and
93 deletions
+0
-93
ClerkImportController.java
...a/com/gic/store/web/controller/ClerkImportController.java
+0
-3
StoreController.java
...in/java/com/gic/store/web/controller/StoreController.java
+0
-2
StoreDictController.java
...ava/com/gic/store/web/controller/StoreDictController.java
+0
-27
StoreImportController.java
...a/com/gic/store/web/controller/StoreImportController.java
+0
-38
StoreTagController.java
...java/com/gic/store/web/controller/StoreTagController.java
+0
-3
ExcelUtils.java
...web/src/main/java/com/gic/store/web/utils/ExcelUtils.java
+0
-20
No files found.
gic-store-web/src/main/java/com/gic/store/web/controller/ClerkImportController.java
View file @
f8bf496a
...
...
@@ -72,9 +72,6 @@ public class ClerkImportController {
"attachment; filename="
+
new
String
(
fileName
.
getBytes
(
"gbk"
),
"ISO-8859-1"
));
fo
=
response
.
getOutputStream
();
// String rootPath = request.getSession().getServletContext().getRealPath("/");
// String filePath = "excel/store_tag_batch_import.xlsx";
// in = new FileInputStream(new File(rootPath + filePath));
in
=
this
.
getClass
().
getClassLoader
().
getResourceAsStream
(
"excel/clerk_batch_import.xlsx"
);
byte
[]
b
=
new
byte
[
1024
];
int
len
=
0
;
...
...
gic-store-web/src/main/java/com/gic/store/web/controller/StoreController.java
View file @
f8bf496a
...
...
@@ -358,7 +358,6 @@ public class StoreController extends DownloadUtils {
public
RestResponse
countMemberInStore
(
Integer
storeId
)
{
Integer
enterpriseId
=
UserDetailUtils
.
getUserDetail
().
getEnterpriseId
();
Integer
storeInfoId
=
storeApiService
.
getStoreById
(
enterpriseId
,
storeId
).
getResult
().
getStoreInfoId
();
// ServiceResponse<Boolean> serviceResponse = storeUpdateApiService.hasMemberByMainStore(enterpriseId, storeInfoId);
ServiceResponse
<
Long
>
serviceResponse
=
this
.
storeUpdateApiService
.
memberByMainStore
(
enterpriseId
,
storeInfoId
);
return
ResultControllerUtils
.
commonResult
(
serviceResponse
);
}
...
...
@@ -631,7 +630,6 @@ public class StoreController extends DownloadUtils {
List
<
String
>
list
=
storeInfoList
.
stream
().
map
(
e
->
e
.
getStoreInfoId
().
toString
()).
collect
(
Collectors
.
toList
());
Integer
storeInfoId
=
storeApiService
.
getStoreById
(
UserDetailUtils
.
getUserDetail
().
getEnterpriseId
(),
toStoreId
).
getResult
().
getStoreInfoId
();
// List<String> list = Arrays.asList(storeId.split(","));
StoreBatchUpdateDTO
storeBatchUpdateDTO
=
new
StoreBatchUpdateDTO
();
storeBatchUpdateDTO
.
setEnterpriseId
(
UserDetailUtils
.
getUserDetail
().
getEnterpriseId
());
storeBatchUpdateDTO
.
setSourceStoreInfoIdList
(
list
);
...
...
gic-store-web/src/main/java/com/gic/store/web/controller/StoreDictController.java
View file @
f8bf496a
...
...
@@ -142,22 +142,6 @@ public class StoreDictController {
@RequestMapping
(
"save-status-type"
)
@ResponseBody
public
RestResponse
saveStoreStatusAndStoreType
(
String
storeStatus
,
String
storeType
){
/* AuditLogDTO auditLogDTO = new AuditLogDTO();
// 商户id
auditLogDTO.setEnterpriseId(UserDetailUtils.getUserDetail().getEnterpriseId());
// 申请人id
auditLogDTO.setApplyUserId(UserDetailUtils.getUserDetail().getUserId());
// 申请的受审项 在运营平台配置
auditLogDTO.setProjectItemCode(Constants.PROJECT_ITEM_SAVE_STATUS_TYPE_APPLY);
// 额外信息 必须是json
JSONObject jsonObject = new JSONObject();
// 自定义的信息
jsonObject.put("enterpriseId", UserDetailUtils.getUserDetail().getEnterpriseId());
jsonObject.put("storeStatus", storeStatus);
jsonObject.put("storeType", storeType);
auditLogDTO.setExtraInfo(jsonObject.toJSONString());
ServiceResponse<Void> serviceResponse = auditLogApiService.apply(auditLogDTO);
return ResultControllerUtils.commonResult(serviceResponse);*/
Integer
enterpriseId
=
UserDetailUtils
.
getUserDetail
().
getEnterpriseId
();
String
key
=
"storeStatusAndType:"
+
enterpriseId
;
Object
cache
=
RedisUtil
.
getCache
(
key
);
...
...
@@ -193,17 +177,6 @@ public class StoreDictController {
if
(
cache
!=
null
){
return
RestResponse
.
failure
(
ErrorCode
.
SYSTEM_ERROR
.
getCode
(),
"请稍后重试,修改间隔为24个小时"
);
}
/*AuditLogDTO auditLogDTO = new AuditLogDTO();
auditLogDTO.setEnterpriseId(1129);
auditLogDTO.setApplyUserId(124);
auditLogDTO.setProjectItemCode(Constants.PROJECT_ITEM_RISK_MODE_APPLY);
JSONObject jsonObject = new JSONObject();
// 自定义的信息
jsonObject.put("enterpriseId", enterpriseId);
jsonObject.put("values", values);
jsonObject.put("userId", userId);
auditLogDTO.setExtraInfo(jsonObject.toJSONString());
auditLogApiService.apply(auditLogDTO);*/
RedisUtil
.
setCache
(
key
,
1
,
24L
,
TimeUnit
.
HOURS
);
ServiceResponse
serviceResponse
=
this
.
storeDictApiService
.
saveStoreField
(
enterpriseId
,
values
,
userId
);
if
(
serviceResponse
.
isSuccess
()){
...
...
gic-store-web/src/main/java/com/gic/store/web/controller/StoreImportController.java
View file @
f8bf496a
...
...
@@ -243,45 +243,7 @@ public class StoreImportController {
Integer
enterpriseId
=
UserDetailUtils
.
getUserDetail
().
getEnterpriseId
();
String
uuId
=
request
.
getParameter
(
"uuId"
);
// String url = GlobalVar.ctxPropertiesMap.get("batch.task.url").replace("\\", "") + "/task-allocation/queryTask.json";
// HashMap<String, String> param = new HashMap<>(4);
// param.put("enterpriseId", enterpriseId.toString());
// param.put("taskType", Constants.STORE_BATCH_IMPORT_TASK_TYPE.toString());
// param.put("status", "1,2,3,4");
// String result = HttpClientUtil.doPost(url, param);
Map
<
String
,
Object
>
data
=
storeImportApiService
.
getStoreBatchProcess
(
enterpriseId
,
uuId
,
page
.
getCurrentPage
(),
page
.
getPageSize
()).
getResult
();
// Map<String, Object> data = new HashMap<String, Object>(8);
// if (StringUtils.isNotBlank(result)) {
// JSONObject resultObj = JSONObject.parseObject(result);
// JSONArray jsonArr = JSONArray.parseArray(resultObj.getString("list"));
// if (null != jsonArr) {
// if (jsonArr.size() > 0) {
// for (int i = 0; i < jsonArr.size(); i++) {
// JSONObject jsonObj = jsonArr.getJSONObject(i);
// int taskTotal = jsonObj.getIntValue("taskTotal");
// int taskExecNum = jsonObj.getIntValue("taskExecNum");
// int taskFailNum = jsonObj.getIntValue("taskFailNum");
// String taskSignKey = jsonObj.getString("taskSignKey");
// if (uuId.equals(taskSignKey)) {
// data.put("taskTotal", taskTotal);
// data.put("taskExecNum", taskExecNum);
// data.put("taskFailNum", taskFailNum);
// if ((taskTotal - taskFailNum) > 0) {
// data.put("process", taskExecNum*100 / (taskTotal - taskFailNum));
// if (taskTotal == (taskExecNum + taskFailNum)) {
// // 获取所有错误数据
// Page resultPage = storeImportApiService.listStoreTmp(enterpriseId, false, page.getCurrentPage(), page.getPageSize()).getResult();
// data.put("errorData", resultPage);
// }
// }
// }
// }
// }
// }
// }
return
RestResponse
.
success
(
data
);
}
...
...
gic-store-web/src/main/java/com/gic/store/web/controller/StoreTagController.java
View file @
f8bf496a
...
...
@@ -114,9 +114,6 @@ public class StoreTagController {
"attachment; filename="
+
new
String
(
fileName
.
getBytes
(
"gbk"
),
"ISO-8859-1"
));
fo
=
response
.
getOutputStream
();
// String rootPath = request.getSession().getServletContext().getRealPath("/");
// String filePath = "excel/store_tag_batch_import.xlsx";
// in = new FileInputStream(new File(rootPath + filePath));
in
=
this
.
getClass
().
getClassLoader
().
getResourceAsStream
(
"excel/store_tag_batch_import.xlsx"
);
byte
[]
b
=
new
byte
[
1024
];
int
len
=
0
;
...
...
gic-store-web/src/main/java/com/gic/store/web/utils/ExcelUtils.java
View file @
f8bf496a
...
...
@@ -195,20 +195,12 @@ public class ExcelUtils {
XSSFCellStyle
style
=
workbook
.
createCellStyle
();
// 设置底边框;
style
.
setBorderBottom
(
XSSFCellStyle
.
BORDER_THIN
);
// 设置底边框颜色;
// style.setBottomBorderColor(XSSFColor.BLACK.index);
// 设置左边框;
style
.
setBorderLeft
(
XSSFCellStyle
.
BORDER_THIN
);
// 设置左边框颜色;
// style.setLeftBorderColor(XSSFColor.BLACK.index);
// 设置右边框;
style
.
setBorderRight
(
XSSFCellStyle
.
BORDER_THIN
);
// 设置右边框颜色;
// style.setRightBorderColor(XSSFColor.BLACK.index);
// 设置顶边框;
style
.
setBorderTop
(
XSSFCellStyle
.
BORDER_THIN
);
// 设置顶边框颜色;
// style.setTopBorderColor(XSSFColor.BLACK.index);
// 在样式用应用设置的字体;
style
.
setFont
(
font
);
// 设置自动换行;
...
...
@@ -229,10 +221,6 @@ public class ExcelUtils {
// 设置字体
XSSFFont
font
=
workbook
.
createFont
();
// 设置字体大小
// font.setFontHeightInPoints((short)10);
// 字体加粗
// font.setBoldweight(XSSFFont.BOLDWEIGHT_BOLD);
// 设置字体名字
font
.
setFontName
(
"Courier New"
);
font
.
setColor
(
IndexedColors
.
RED
.
index
);
...
...
@@ -240,20 +228,12 @@ public class ExcelUtils {
XSSFCellStyle
style
=
workbook
.
createCellStyle
();
// 设置底边框;
style
.
setBorderBottom
(
XSSFCellStyle
.
BORDER_THIN
);
// 设置底边框颜色;
// style.setBottomBorderColor(XSSFColor.BLACK.index);
// 设置左边框;
style
.
setBorderLeft
(
XSSFCellStyle
.
BORDER_THIN
);
// 设置左边框颜色;
// style.setLeftBorderColor(XSSFColor.BLACK.index);
// 设置右边框;
style
.
setBorderRight
(
XSSFCellStyle
.
BORDER_THIN
);
// 设置右边框颜色;
// style.setRightBorderColor(XSSFColor.BLACK.index);
// 设置顶边框;
style
.
setBorderTop
(
XSSFCellStyle
.
BORDER_THIN
);
// 设置顶边框颜色;
// style.setTopBorderColor(XSSFColor.BLACK.index);
// 在样式用应用设置的字体;
style
.
setFont
(
font
);
// 设置自动换行;
...
...
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