|  |  |  | @ -15,6 +15,7 @@ import com.glxp.api.controller.BaseController; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.api.dto.DictDto; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.api.entity.auth.*; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.api.entity.basic.BasicBussinessTypeEntity; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.api.entity.system.CompanyEntity; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.api.req.auth.*; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.api.req.basic.FilterBussinessTypeRequest; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.api.req.system.DeleteRequest; | 
			
		
	
	
		
			
				
					|  |  |  | @ -25,8 +26,10 @@ import com.glxp.api.res.auth.InvWarehouseThirdSysResponse; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.api.res.basic.BasicBussinessTypeResponse; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.api.service.auth.*; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.api.service.basic.IBasicBussinessTypeService; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.api.service.system.CompanyService; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.api.service.system.SystemParamConfigService; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.api.util.IntUtil; | 
			
		
	
		
			
				
					|  |  |  |  | import org.springframework.beans.BeanUtils; | 
			
		
	
		
			
				
					|  |  |  |  | import org.springframework.validation.BindingResult; | 
			
		
	
		
			
				
					|  |  |  |  | import org.springframework.web.bind.annotation.GetMapping; | 
			
		
	
		
			
				
					|  |  |  |  | import org.springframework.web.bind.annotation.PostMapping; | 
			
		
	
	
		
			
				
					|  |  |  | @ -48,6 +51,8 @@ public class InvWarehouseController extends BaseController { | 
			
		
	
		
			
				
					|  |  |  |  |     @Resource | 
			
		
	
		
			
				
					|  |  |  |  |     CustomerService customerService; | 
			
		
	
		
			
				
					|  |  |  |  |     @Resource | 
			
		
	
		
			
				
					|  |  |  |  |     CompanyService companyService; | 
			
		
	
		
			
				
					|  |  |  |  |     @Resource | 
			
		
	
		
			
				
					|  |  |  |  |     private WarehouseUserService warehouseUserService; | 
			
		
	
		
			
				
					|  |  |  |  |     @Resource | 
			
		
	
		
			
				
					|  |  |  |  |     private SystemParamConfigService systemParamConfigService; | 
			
		
	
	
		
			
				
					|  |  |  | @ -59,6 +64,8 @@ public class InvWarehouseController extends BaseController { | 
			
		
	
		
			
				
					|  |  |  |  |     private InvSpaceService invSpaceService; | 
			
		
	
		
			
				
					|  |  |  |  |     @Resource | 
			
		
	
		
			
				
					|  |  |  |  |     InvBusUserService invBusUserService; | 
			
		
	
		
			
				
					|  |  |  |  |     @Resource | 
			
		
	
		
			
				
					|  |  |  |  |     AuthWarehouseUnifyService authWarehouseUnifyService; | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     /** | 
			
		
	
		
			
				
					|  |  |  |  |      * 获取仓库列表 | 
			
		
	
	
		
			
				
					|  |  |  | @ -664,4 +671,76 @@ public class InvWarehouseController extends BaseController { | 
			
		
	
		
			
				
					|  |  |  |  |         return ResultVOUtils.success(list); | 
			
		
	
		
			
				
					|  |  |  |  |     } | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     @GetMapping("spms/sub/inv/unifyWarehouseList") | 
			
		
	
		
			
				
					|  |  |  |  |     public BaseResponse unifyWarehouseList() { | 
			
		
	
		
			
				
					|  |  |  |  |         FilterInvSubWarehouseRequest filterInvSubWarehouseRequest = new FilterInvSubWarehouseRequest(); | 
			
		
	
		
			
				
					|  |  |  |  |         filterInvSubWarehouseRequest.setUnifyUse(true); | 
			
		
	
		
			
				
					|  |  |  |  |         filterInvSubWarehouseRequest.setSpUse(true); | 
			
		
	
		
			
				
					|  |  |  |  |         List<InvWarehouseEntity> responses = invWarehouseService.unifyWarehouseList(filterInvSubWarehouseRequest); | 
			
		
	
		
			
				
					|  |  |  |  |         return ResultVOUtils.success(responses); | 
			
		
	
		
			
				
					|  |  |  |  |     } | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     /** | 
			
		
	
		
			
				
					|  |  |  |  |      * 根据仓位码获取关联用户数据 | 
			
		
	
		
			
				
					|  |  |  |  |      */ | 
			
		
	
		
			
				
					|  |  |  |  |     @AuthRuleAnnotation("") | 
			
		
	
		
			
				
					|  |  |  |  |     @PostMapping("/warehouse/inout/warehouseListByCode") | 
			
		
	
		
			
				
					|  |  |  |  |     public BaseResponse warehouseListByCode(@RequestBody @Valid FilterInvLinkDataRequest filterInvLinkDataRequest, BindingResult bindingResult) { | 
			
		
	
		
			
				
					|  |  |  |  |         if (bindingResult.hasErrors()) { | 
			
		
	
		
			
				
					|  |  |  |  |             return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage()); | 
			
		
	
		
			
				
					|  |  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |  |         List<CompanyEntity> warehouseUserList = warehouseUserService.warehouseListByCode(filterInvLinkDataRequest); | 
			
		
	
		
			
				
					|  |  |  |  |         PageInfo<CompanyEntity> pageInfo = new PageInfo<>(warehouseUserList); | 
			
		
	
		
			
				
					|  |  |  |  |         PageSimpleResponse<CompanyEntity> response = new PageSimpleResponse<>(); | 
			
		
	
		
			
				
					|  |  |  |  |         response.setList(pageInfo.getList()); | 
			
		
	
		
			
				
					|  |  |  |  |         response.setTotal(pageInfo.getTotal()); | 
			
		
	
		
			
				
					|  |  |  |  |         return ResultVOUtils.success(response); | 
			
		
	
		
			
				
					|  |  |  |  |     } | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     /** | 
			
		
	
		
			
				
					|  |  |  |  |      * 获取医院用户列表 | 
			
		
	
		
			
				
					|  |  |  |  |      * | 
			
		
	
		
			
				
					|  |  |  |  |      * @return | 
			
		
	
		
			
				
					|  |  |  |  |      */ | 
			
		
	
		
			
				
					|  |  |  |  |     @AuthRuleAnnotation("") | 
			
		
	
		
			
				
					|  |  |  |  |     @GetMapping("/warehouse/inout/selectNotSelectCustomer") | 
			
		
	
		
			
				
					|  |  |  |  |     public BaseResponse selectNotSelectCustomer(FilterInvLinkDataRequest filterInvLinkDataRequest) { | 
			
		
	
		
			
				
					|  |  |  |  |         //获取当前仓库已关联用户
 | 
			
		
	
		
			
				
					|  |  |  |  |         FilterInvLinkDataRequest temRequest = new FilterInvLinkDataRequest(); | 
			
		
	
		
			
				
					|  |  |  |  |         temRequest.setCode(filterInvLinkDataRequest.getCode()); | 
			
		
	
		
			
				
					|  |  |  |  |         List<CompanyEntity> companyEntities = warehouseUserService.warehouseListByCode(temRequest); | 
			
		
	
		
			
				
					|  |  |  |  |         List<String> customerIds = new ArrayList<>(); | 
			
		
	
		
			
				
					|  |  |  |  |         for (CompanyEntity item : companyEntities) { | 
			
		
	
		
			
				
					|  |  |  |  |             customerIds.add(item.getCustomerId()); | 
			
		
	
		
			
				
					|  |  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |  |         FilterCompanyRequest companyRequest = new FilterCompanyRequest(); | 
			
		
	
		
			
				
					|  |  |  |  |         companyRequest.setNotSelectCustomers(customerIds); | 
			
		
	
		
			
				
					|  |  |  |  |         List<CompanyEntity> companyEntities1 = companyService.filterCompany(companyRequest); | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |         PageInfo<CompanyEntity> pageInfo = new PageInfo<>(companyEntities1); | 
			
		
	
		
			
				
					|  |  |  |  |         PageSimpleResponse<CompanyEntity> response = new PageSimpleResponse<>(); | 
			
		
	
		
			
				
					|  |  |  |  |         response.setTotal(pageInfo.getTotal()); | 
			
		
	
		
			
				
					|  |  |  |  |         response.setList(companyEntities1); | 
			
		
	
		
			
				
					|  |  |  |  |         return ResultVOUtils.success(response); | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     } | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     @AuthRuleAnnotation("") | 
			
		
	
		
			
				
					|  |  |  |  |     @PostMapping("/warehouse/inout/addWarehouseCustomer") | 
			
		
	
		
			
				
					|  |  |  |  |     public BaseResponse addWarehouseCustomer(@RequestBody FilterInvLinkDataRequest filterInvLinkDataRequest) { | 
			
		
	
		
			
				
					|  |  |  |  |         warehouseUserService.addWarehouseCustomer(filterInvLinkDataRequest); | 
			
		
	
		
			
				
					|  |  |  |  |         return ResultVOUtils.success(); | 
			
		
	
		
			
				
					|  |  |  |  |     } | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     @AuthRuleAnnotation("") | 
			
		
	
		
			
				
					|  |  |  |  |     @PostMapping("/warehouse/inout/deleteWarehouseCustomer") | 
			
		
	
		
			
				
					|  |  |  |  |     public BaseResponse deleteWarehouseCustomer(@RequestBody AuthWarehouseUnify authWarehouseUnify) { | 
			
		
	
		
			
				
					|  |  |  |  |         authWarehouseUnifyService.deleteWarehouseCustomer(authWarehouseUnify); | 
			
		
	
		
			
				
					|  |  |  |  |         return ResultVOUtils.success(); | 
			
		
	
		
			
				
					|  |  |  |  |     } | 
			
		
	
		
			
				
					|  |  |  |  | } | 
			
		
	
	
		
			
				
					|  |  |  | 
 |