| | |
| | | package com.consum.base.controller; |
| | | |
| | | import cn.hutool.core.util.ReflectUtil; |
| | | import java.lang.reflect.Field; |
| | | import java.util.ArrayList; |
| | | import java.util.Map; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import org.apache.commons.compress.utils.Lists; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import com.consum.base.BaseController; |
| | | import com.consum.base.core.utils.CommonUtil; |
| | | import com.consum.base.core.utils.MapUtils; |
| | |
| | | import com.iplatform.model.po.S_user_core; |
| | | import com.walker.db.page.GenericPager; |
| | | import com.walker.web.ResponseValue; |
| | | import io.swagger.annotations.Api; |
| | | import org.apache.commons.compress.utils.Lists; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.lang.reflect.Field; |
| | | import java.util.ArrayList; |
| | | import java.util.Map; |
| | | import cn.hutool.core.util.ReflectUtil; |
| | | import io.swagger.annotations.Api; |
| | | |
| | | /** |
| | | * @ClassName lWarehouseFlowController |
| | |
| | | public class LWarehouseFlowController extends BaseController { |
| | | |
| | | @Resource |
| | | private LWarehouseFlowService lWarehouseFlowService; |
| | | private LWarehouseFlowService lWarehouseFlowServiceImpl; |
| | | |
| | | @GetMapping("/list") |
| | | public ResponseValue queryFormProcureList() { |
| | |
| | | if (currentUser == null) { |
| | | return ResponseValue.error("登录用户信息不存在"); |
| | | } |
| | | GenericPager<Map<String, Object>> genericPager = lWarehouseFlowService.queryBusinessFlow(param); |
| | | GenericPager<Map<String, Object>> genericPager = lWarehouseFlowServiceImpl.queryBusinessFlow(param); |
| | | ArrayList<WarehouseFlowVO> result = Lists.newArrayList(); |
| | | genericPager.getDatas().forEach(map -> { |
| | | WarehouseFlowVO warehouseFlowVO = MapUtils.convertMapToObj(MapUtils.toReplaceKeyLow(map), WarehouseFlowVO.class); |
| | | WarehouseFlowVO warehouseFlowVO = |
| | | MapUtils.convertMapToObj(MapUtils.toReplaceKeyLow(map), WarehouseFlowVO.class); |
| | | result.add(warehouseFlowVO); |
| | | }); |
| | | try { |
| | | Field fieldDatas = GenericPager.class.getDeclaredField("datas"); |
| | | // fieldDatas.setAccessible(true); |
| | | // fieldDatas.set(genericPager, result); |
| | | // fieldDatas.setAccessible(true); |
| | | // fieldDatas.set(genericPager, result); |
| | | ReflectUtil.setFieldValue(genericPager, fieldDatas, result); |
| | | } catch (Exception e) { |
| | | logger.error(e.getMessage(), e); |
| | |
| | | |
| | | return ResponseValue.success(genericPager); |
| | | } |
| | | |
| | | |
| | | @GetMapping("/detail/list") |
| | | public ResponseValue queryFormProcureList1() { |
| | |
| | | if (currentUser == null) { |
| | | return ResponseValue.error("登录用户信息不存在"); |
| | | } |
| | | GenericPager<Map<String, Object>> genericPager = lWarehouseFlowService.queryBusinessFlow(param); |
| | | GenericPager<Map<String, Object>> genericPager = lWarehouseFlowServiceImpl.queryBusinessFlow(param); |
| | | return ResponseValue.success(genericPager); |
| | | } |
| | | |
| | |
| | | if (paramAgencyId == null || !paramAgencyId.toString().startsWith(tenantId)) { |
| | | param.setAgencyId(Long.valueOf(tenantId)); |
| | | } |
| | | GenericPager<Map<String, Object>> genericPager = lWarehouseFlowService.queryTaiZhangList(param); |
| | | GenericPager<Map<String, Object>> genericPager = lWarehouseFlowServiceImpl.queryTaiZhangList(param); |
| | | return ResponseValue.success(genericPager); |
| | | } |
| | | |
| | |
| | | if (paramAgencyId == null || !paramAgencyId.toString().startsWith(tenantId)) { |
| | | param.setAgencyId(Long.valueOf(tenantId)); |
| | | } |
| | | GenericPager<Map<String, Object>> genericPager = lWarehouseFlowService.queryDeptTaiZhangList(param); |
| | | GenericPager<Map<String, Object>> genericPager = lWarehouseFlowServiceImpl.queryDeptTaiZhangList(param); |
| | | return ResponseValue.success(genericPager); |
| | | } |
| | | |