Commit f8bf496a by zhiwj

代码规范

parent ed6d9ad3
......@@ -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;
......
......@@ -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);
......
......@@ -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()){
......
......@@ -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);
}
......
......@@ -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;
......
......@@ -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);
// 设置自动换行;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment