diff --git a/src/main/java/com/zzjee/api/TokenController.java b/src/main/java/com/zzjee/api/TokenController.java index 90d80854..67db727a 100644 --- a/src/main/java/com/zzjee/api/TokenController.java +++ b/src/main/java/com/zzjee/api/TokenController.java @@ -286,18 +286,22 @@ public class TokenController { @RequestMapping(value = "/getuser/{username}", method = RequestMethod.GET) @ResponseBody @ApiOperation(value="根据username获取用户信息",notes="根据username获取用户信息",httpMethod="GET",produces="application/json") - public ResponseMessage getuser(@ApiParam(required=true,name="username",value="username")@PathVariable("username") String username) { - TSUser task = systemService.findUniqueByProperty(TSUser.class,"userName",username); - if (task == null) { - FxjOtherLoginEntity fxjOtherLoginEntity = userService.findUniqueByProperty(FxjOtherLoginEntity.class, "otherid", username); - if (fxjOtherLoginEntity != null) { - task = systemService.findUniqueByProperty(TSUser.class,"userName",fxjOtherLoginEntity.getUsername()); - } - } - if (task == null) { -// task = systemService.findUniqueByProperty(TSUser.class,"userName",ResourceUtil.getConfigByName("mini.user")); - return org.jeecgframework.jwt.util.Result.error("获取用户信息失败"); - } + public ResponseMessage getuser(@ApiParam(required=true,name="username",value="username")@PathVariable("username") String username, + @ApiParam(required=false,name="password",value="password")@RequestParam String password) { +// TSUser task = systemService.findUniqueByProperty(TSUser.class,"userName",username); +// if (task == null) { +// FxjOtherLoginEntity fxjOtherLoginEntity = userService.findUniqueByProperty(FxjOtherLoginEntity.class, "otherid", username); +// if (fxjOtherLoginEntity != null) { +// task = systemService.findUniqueByProperty(TSUser.class,"userName",fxjOtherLoginEntity.getUsername()); +// } +// } +// if (task == null) { +//// task = systemService.findUniqueByProperty(TSUser.class,"userName",ResourceUtil.getConfigByName("mini.user")); +// return org.jeecgframework.jwt.util.Result.error("获取用户信息失败"); +// } + + TSUser task = userService.checkUserExits(username, password); + if(!StringUtil.isEmpty(task.getDepartid())){ TSDepart tsDepart = systemService.get(TSDepart.class,task.getDepartid()); if(tsDepart!=null){ diff --git a/src/main/java/com/zzjee/api/wmomController.java b/src/main/java/com/zzjee/api/wmomController.java index 4b9f3ba6..bc27e942 100644 --- a/src/main/java/com/zzjee/api/wmomController.java +++ b/src/main/java/com/zzjee/api/wmomController.java @@ -10,6 +10,8 @@ import java.util.Map; import javax.servlet.http.HttpServletRequest; +import com.zzjee.wave.entity.WaveToDownEntity; +import com.zzjee.wave.entity.WaveToFjEntity; import org.apache.log4j.Logger; import org.jeecgframework.core.common.hibernate.qbc.CriteriaQuery; import org.jeecgframework.core.util.ExceptionUtil; @@ -250,4 +252,101 @@ public class wmomController { return Result.success(list, Long.parseLong(resultList2.get(0).get("count").toString())); } + + @RequestMapping(value = "/listwavedown/{username}", method = RequestMethod.GET) + @ResponseBody + @ApiOperation(value = "获取波次下架信息", produces = "application/json", httpMethod = "GET") + public ResponseMessage> listwavedown(@PathVariable("username") String username, + @RequestParam int pageNumber, @RequestParam int pageSize, + HttpServletRequest request) { + CriteriaQuery query = new CriteriaQuery(WaveToDownEntity.class); + try { + + if(StringUtil.isNotEmpty(request.getParameter("binId"))){ + query.like("binId","%"+request.getParameter("binId")+"%"); + } + if(StringUtil.isNotEmpty(request.getParameter("goodsId"))){ + query.like("goodsId","%"+request.getParameter("goodsId")+"%"); + } + if(StringUtil.isNotEmpty(request.getParameter("waveId"))){ + query.like("waveId","%"+request.getParameter("waveId")+"%"); + } + if(StringUtil.isNotEmpty(request.getParameter("firstRq"))){ + query.like("firstRq","%"+request.getParameter("firstRq")+"%"); + } + + } catch (Exception e) { + } + query.add(); + List listsize = this.systemService.getListByCriteriaQuery(query, false); + query.setCurPage(pageNumber <= 0 ? 1 : pageNumber); + query.setPageSize(pageSize < 1 ? 1 : pageSize); + query.add(); + Map map = new HashMap(); + map.put("binId", "asc"); + query.setOrder(map); + List list = this.systemService.getListByCriteriaQuery(query, true); + return Result.success(list, (long) listsize.size()); + } + + @RequestMapping(value = "/listwavefj/{username}", method = RequestMethod.GET) + @ResponseBody + @ApiOperation(value = "获取波次分拣信息", produces = "application/json", httpMethod = "GET") + public ResponseMessage> listwavefj(@PathVariable("username") String username, + @RequestParam int pageNumber, @RequestParam int pageSize, + HttpServletRequest request) { + CriteriaQuery query = new CriteriaQuery(WaveToFjEntity.class); + try { + + if(StringUtil.isNotEmpty(request.getParameter("binId"))){ + query.like("binId","%"+request.getParameter("binId")+"%"); + } + if(StringUtil.isNotEmpty(request.getParameter("goodsId"))){ + query.like("goodsId","%"+request.getParameter("goodsId")+"%"); + } + if(StringUtil.isNotEmpty(request.getParameter("waveId"))){ + query.like("waveId","%"+request.getParameter("waveId")+"%"); + } + if(StringUtil.isNotEmpty(request.getParameter("firstRq"))){ + query.like("firstRq","%"+request.getParameter("firstRq")+"%"); + } + + } catch (Exception e) { + } + query.add(); + List listsize = this.systemService.getListByCriteriaQuery(query, false); + query.setCurPage(pageNumber <= 0 ? 1 : pageNumber); + query.setPageSize(pageSize < 1 ? 1 : pageSize); + query.add(); + Map map = new HashMap(); + map.put("binId", "asc"); + query.setOrder(map); + List list = this.systemService.getListByCriteriaQuery(query, true); + return Result.success(list, (long) listsize.size()); + } + + + + @RequestMapping(value = "/listwavedownsave/{username}", method = RequestMethod.GET) + @ResponseBody + @ApiOperation(value = "获取波次下架信息保存", produces = "application/json", httpMethod = "GET") + public ResponseMessage listwavedownsave(@PathVariable("username") String username, + @RequestParam String ids, @RequestParam String savestr1, + HttpServletRequest request) { + + return Result.success("波次下架保存成功"); + } + + @RequestMapping(value = "/listwavefjsave/{username}", method = RequestMethod.GET) + @ResponseBody + @ApiOperation(value = "获取波次分拣信息保存", produces = "application/json", httpMethod = "GET") + public ResponseMessage listwavefjsave(@PathVariable("username") String username, + @RequestParam String ids, @RequestParam String savestr1, + HttpServletRequest request) { + + return Result.success("波次分拣保存成功"); + + } + + } diff --git a/src/main/java/com/zzjee/wmapi/controller/wmBaseController.java b/src/main/java/com/zzjee/wmapi/controller/wmBaseController.java index dea0da5c..7e454d81 100644 --- a/src/main/java/com/zzjee/wmapi/controller/wmBaseController.java +++ b/src/main/java/com/zzjee/wmapi/controller/wmBaseController.java @@ -245,4 +245,7 @@ public class wmBaseController extends BaseController { D0.setObj(listerp); return new ResponseEntity(D0, HttpStatus.OK); } + + + }