|
|
@@ -18,6 +18,7 @@ import org.springframework.web.bind.annotation.PostMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import com.mokamrp.privates.controller.BaseController;
|
|
|
+
|
|
|
import javax.validation.Valid;
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.HashMap;
|
|
|
@@ -50,16 +51,17 @@ public class FosterwxStationBindBoxController extends BaseController<FosterwxSta
|
|
|
*/
|
|
|
|
|
|
@PostMapping("/list")
|
|
|
- public Object list(@Valid @RequestBody GetForsterwxStationBindBoxHandle getForsterwxStationBindBoxHandle, BindingResult bindingResult){
|
|
|
+ public Object list(@Valid @RequestBody GetForsterwxStationBindBoxHandle getForsterwxStationBindBoxHandle, BindingResult bindingResult) {
|
|
|
if (bindingResult.hasErrors()) {
|
|
|
return AjaxResult.error(HttpStatus.ERROR, bindingResult.getFieldError().getDefaultMessage());
|
|
|
}
|
|
|
- Map<String,Object> res = fosterwxStationBindBoxService.getList(getForsterwxStationBindBoxHandle);
|
|
|
+ Map<String, Object> res = fosterwxStationBindBoxService.getList(getForsterwxStationBindBoxHandle);
|
|
|
return AjaxResult.success(res);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 导入
|
|
|
+ *
|
|
|
* @param file
|
|
|
* @param authUser
|
|
|
* @return
|
|
|
@@ -73,13 +75,14 @@ public class FosterwxStationBindBoxController extends BaseController<FosterwxSta
|
|
|
feild.put(2, "ghId");
|
|
|
feild.put(3, "boxName");
|
|
|
feild.put(4, "scope");
|
|
|
+ feild.put(5, "remark");
|
|
|
List<Map<String, String>> row;
|
|
|
- VoltaHandle<ArrayList<Map<String,String>>> voltaRes = Analysis.analysis(file, feild);
|
|
|
- if (voltaRes.getErr() != null){
|
|
|
+ VoltaHandle<ArrayList<Map<String, String>>> voltaRes = Analysis.analysis(file, feild);
|
|
|
+ if (voltaRes.getErr() != null) {
|
|
|
return AjaxResult.error(voltaRes.getErr());
|
|
|
}
|
|
|
row = voltaRes.getData();
|
|
|
- Boolean res = fosterwxStationBindBoxService.importData(row,authUser);
|
|
|
+ Boolean res = fosterwxStationBindBoxService.importData(row, authUser);
|
|
|
return AjaxResult.success(HttpMsg.importSuccess);
|
|
|
}
|
|
|
|