|
|
@@ -13,7 +13,6 @@ import com.shkpr.service.customgateway.core.utils.CommTool;
|
|
|
import com.shkpr.service.customgateway.core.utils.ExcelUtil;
|
|
|
import org.apache.commons.collections4.CollectionUtils;
|
|
|
import org.apache.commons.collections4.MapUtils;
|
|
|
-import org.apache.commons.lang3.ArrayUtils;
|
|
|
import org.springframework.stereotype.Controller;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
|
@@ -71,7 +70,6 @@ public class CustomerController {
|
|
|
public ResultResponse<String> customerInfoImport(HttpServletRequest request
|
|
|
, @RequestHeader(value = Api.HEADER_CLIENT_TYPE, required = false) String strClientType
|
|
|
, @RequestHeader(value = Api.HEADER_USER_AGENT, required = false) String strUserAgent
|
|
|
- , @RequestParam(value = "meterType", required = false) Short meterType
|
|
|
, @RequestParam(value = "file", required = false) MultipartFile file) throws SelfException {
|
|
|
//初始化序列
|
|
|
requestSeq.putIfAbsent(Api.URI_XXX_CUSTOMER_INFO_IMPORT, new AtomicInteger(0));
|
|
|
@@ -79,7 +77,7 @@ public class CustomerController {
|
|
|
final String requestURI = request.getRequestURI();
|
|
|
final String strPlatform = CommTool.getPlatformByAgent(strClientType, strUserAgent);
|
|
|
//参数校验
|
|
|
- if (meterType == null || file == null || file.isEmpty() || !ArrayUtils.contains(CustomerMeterType.codes(), meterType))
|
|
|
+ if (file == null || file.isEmpty())
|
|
|
throw new SelfException(ResponseCode.STATUS_ERROR_JSON_FORMAT.getCode() + ""
|
|
|
, String.format(Api.EXCEPTION_FORMAT
|
|
|
, strPlatform
|
|
|
@@ -109,8 +107,6 @@ public class CustomerController {
|
|
|
//获取数据
|
|
|
List<CustomerInfo> dates = dataEntry.getValue().stream()
|
|
|
.peek(info -> {
|
|
|
- //表类型
|
|
|
- info.setMeterType(meterType);
|
|
|
//抄表周期
|
|
|
info.setReadCycle(CustomerReadType.getCode(info.getReadCycleName()));
|
|
|
//表状态
|