|
@@ -13,6 +13,7 @@ import lombok.extern.slf4j.Slf4j;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.stereotype.Controller;
|
|
import org.springframework.stereotype.Controller;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
+import org.springframework.web.bind.annotation.RequestParam;
|
|
import org.springframework.web.bind.annotation.ResponseBody;
|
|
import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
import javax.servlet.http.HttpServletRequest;
|
|
@@ -20,7 +21,6 @@ import javax.servlet.http.HttpServletResponse;
|
|
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
- *
|
|
|
|
* @author 吴涛涛
|
|
* @author 吴涛涛
|
|
* @since 2019-07-26
|
|
* @since 2019-07-26
|
|
*/
|
|
*/
|
|
@@ -35,10 +35,10 @@ public class FactoryController {
|
|
|
|
|
|
/**
|
|
/**
|
|
* 添加/修改工厂
|
|
* 添加/修改工厂
|
|
- * @param factory
|
|
|
|
- * 参数:factoryName 工厂名 factoryArea 公司地址
|
|
|
|
- * yLng 经度 xLat 纬度
|
|
|
|
- * @param flag 0-添加,1-修改
|
|
|
|
|
|
+ *
|
|
|
|
+ * @param factory 参数:factoryName 工厂名 factoryArea 公司地址
|
|
|
|
+ * yLng 经度 xLat 纬度
|
|
|
|
+ * @param flag 0-添加,1-修改
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
@ApiOperation("添加/修改工厂")
|
|
@ApiOperation("添加/修改工厂")
|
|
@@ -47,14 +47,12 @@ public class FactoryController {
|
|
public HttpRespMsg addAndUpdateRole(Factory factory, HttpServletRequest request, Integer flag,
|
|
public HttpRespMsg addAndUpdateRole(Factory factory, HttpServletRequest request, Integer flag,
|
|
HttpServletResponse response) {
|
|
HttpServletResponse response) {
|
|
HttpRespMsg msg = new HttpRespMsg();
|
|
HttpRespMsg msg = new HttpRespMsg();
|
|
- msg = factoryService.addAndUpdateRole(factory,flag);
|
|
|
|
|
|
+ msg = factoryService.addAndUpdateRole(factory, flag);
|
|
return msg;
|
|
return msg;
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
- *
|
|
|
|
- * @param factory
|
|
|
|
- * 参数:id 工厂id
|
|
|
|
|
|
+ * @param factory 参数:id 工厂id
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
@ApiOperation("删除公司")
|
|
@ApiOperation("删除公司")
|
|
@@ -69,17 +67,16 @@ public class FactoryController {
|
|
|
|
|
|
/**
|
|
/**
|
|
* 工厂列表
|
|
* 工厂列表
|
|
- * @param keyName
|
|
|
|
- * 参数: 关键字
|
|
|
|
|
|
+ * 参数: currentPage 当前页码,pageSize 每页条数 keyName 关键字查询
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
@ApiOperation("工厂列表")
|
|
@ApiOperation("工厂列表")
|
|
@RequestMapping("/list")
|
|
@RequestMapping("/list")
|
|
@ResponseBody
|
|
@ResponseBody
|
|
- public HttpRespMsg deleteRole(String keyName, HttpServletRequest request,
|
|
|
|
- HttpServletResponse response,PageUtil page) {
|
|
|
|
|
|
+ public HttpRespMsg deleteRole(@RequestParam(required = false) String keyName, HttpServletRequest request,
|
|
|
|
+ HttpServletResponse response, PageUtil page) {
|
|
HttpRespMsg msg = new HttpRespMsg();
|
|
HttpRespMsg msg = new HttpRespMsg();
|
|
- msg.data = factoryService.pageList(page,keyName);
|
|
|
|
|
|
+ msg = factoryService.pageList(page, keyName);
|
|
return msg;
|
|
return msg;
|
|
}
|
|
}
|
|
|
|
|