|  |  |  | @ -1,11 +1,24 @@ | 
			
		
	
		
			
				
					|  |  |  |  | package com.glxp.api.controller.inout; | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | import cn.hutool.core.util.StrUtil; | 
			
		
	
		
			
				
					|  |  |  |  | import com.github.pagehelper.PageInfo; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.api.common.enums.ResultEnum; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.api.common.res.BaseResponse; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.api.common.util.ResultVOUtils; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.api.controller.BaseController; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.api.req.inout.IoSplitFifoInvRequest; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.api.res.PageSimpleResponse; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.api.res.inout.IoSplitInvResponse; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.api.service.inout.IoSplitFifoInvService; | 
			
		
	
		
			
				
					|  |  |  |  | import lombok.extern.slf4j.Slf4j; | 
			
		
	
		
			
				
					|  |  |  |  | import org.springframework.validation.BindingResult; | 
			
		
	
		
			
				
					|  |  |  |  | import org.springframework.web.bind.annotation.GetMapping; | 
			
		
	
		
			
				
					|  |  |  |  | import org.springframework.web.bind.annotation.PostMapping; | 
			
		
	
		
			
				
					|  |  |  |  | import org.springframework.web.bind.annotation.RequestBody; | 
			
		
	
		
			
				
					|  |  |  |  | import org.springframework.web.bind.annotation.RestController; | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | import javax.annotation.Resource; | 
			
		
	
		
			
				
					|  |  |  |  | import java.util.List; | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | @Slf4j | 
			
		
	
		
			
				
					|  |  |  |  | @RestController | 
			
		
	
	
		
			
				
					|  |  |  | @ -15,17 +28,43 @@ public class IoSplitFifoInvController extends BaseController { | 
			
		
	
		
			
				
					|  |  |  |  |     @Resource | 
			
		
	
		
			
				
					|  |  |  |  |     IoSplitFifoInvService splitFifoInvService; | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     //接口1:库存查询
 | 
			
		
	
		
			
				
					|  |  |  |  |     //      若开启了库存预警,需要在库存上有一个状态显示预警状态   1:正常;2:低库存;3:负库存
 | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     //接口2:库存预警设置
 | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     /** | 
			
		
	
		
			
				
					|  |  |  |  |      * 库存查询 | 
			
		
	
		
			
				
					|  |  |  |  |      * 若开启了库存预警,需要在库存上有一个状态显示预警状态   1:正常;2:低库存;3:负库存 | 
			
		
	
		
			
				
					|  |  |  |  |      * @return | 
			
		
	
		
			
				
					|  |  |  |  |      */ | 
			
		
	
		
			
				
					|  |  |  |  |     @GetMapping("/udiwms/ioSplit/inv/filter") | 
			
		
	
		
			
				
					|  |  |  |  |     public BaseResponse filter(IoSplitFifoInvRequest ioSplitFifoInvRequest, BindingResult bindingResult) { | 
			
		
	
		
			
				
					|  |  |  |  |         if (bindingResult.hasErrors()) { | 
			
		
	
		
			
				
					|  |  |  |  |             return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage()); | 
			
		
	
		
			
				
					|  |  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |  |         List<IoSplitInvResponse> splitCodeEntities = splitFifoInvService.filterList(ioSplitFifoInvRequest); | 
			
		
	
		
			
				
					|  |  |  |  |         for (IoSplitInvResponse ioSplitCodeResponse : splitCodeEntities) { | 
			
		
	
		
			
				
					|  |  |  |  |             if (StrUtil.isEmpty(ioSplitCodeResponse.getGgxh())) { | 
			
		
	
		
			
				
					|  |  |  |  |                 ioSplitCodeResponse.setGgxh(ioSplitCodeResponse.getBzgg()); | 
			
		
	
		
			
				
					|  |  |  |  |             } | 
			
		
	
		
			
				
					|  |  |  |  |             if (StrUtil.isEmpty(ioSplitCodeResponse.getMeasname())) { | 
			
		
	
		
			
				
					|  |  |  |  |                 ioSplitCodeResponse.setMeasname(ioSplitCodeResponse.getUseLevelUnit()); | 
			
		
	
		
			
				
					|  |  |  |  |             } | 
			
		
	
		
			
				
					|  |  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |  |         PageInfo<IoSplitInvResponse> pageInfo = new PageInfo<>(splitCodeEntities); | 
			
		
	
		
			
				
					|  |  |  |  |         PageSimpleResponse<IoSplitInvResponse> pageSimpleResponse = new PageSimpleResponse<>(); | 
			
		
	
		
			
				
					|  |  |  |  |         pageSimpleResponse.setTotal(pageInfo.getTotal()); | 
			
		
	
		
			
				
					|  |  |  |  |         pageSimpleResponse.setList(splitCodeEntities); | 
			
		
	
		
			
				
					|  |  |  |  |         return ResultVOUtils.success(pageSimpleResponse); | 
			
		
	
		
			
				
					|  |  |  |  |     } | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     /** | 
			
		
	
		
			
				
					|  |  |  |  |      * 库存预警设置 | 
			
		
	
		
			
				
					|  |  |  |  |      * @param ioSplitFifoInvRequest | 
			
		
	
		
			
				
					|  |  |  |  |      * @return | 
			
		
	
		
			
				
					|  |  |  |  |      */ | 
			
		
	
		
			
				
					|  |  |  |  |     @PostMapping("/udiwms/ioSplit/inv/remindSet") | 
			
		
	
		
			
				
					|  |  |  |  |     public BaseResponse remindSet(@RequestBody IoSplitFifoInvRequest ioSplitFifoInvRequest) { | 
			
		
	
		
			
				
					|  |  |  |  |         splitFifoInvService.remindSet(ioSplitFifoInvRequest); | 
			
		
	
		
			
				
					|  |  |  |  |         return ResultVOUtils.success(); | 
			
		
	
		
			
				
					|  |  |  |  |     } | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
	
		
			
				
					|  |  |  | 
 |