| | |
| | | import com.zy.asrs.entity.AdjDetl; |
| | | import com.zy.asrs.service.AdjDetlService; |
| | | import com.zy.common.web.BaseController; |
| | | import com.zy.system.entity.SaasLog; |
| | | import com.zy.system.service.SaasLogService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | |
| | | @Autowired |
| | | private AdjDetlService adjDetlService; |
| | | |
| | | @Autowired |
| | | private SaasLogService saasLogService; |
| | | |
| | | @RequestMapping(value = "/adjDetl/{id}/auth") |
| | | @ManagerAuth |
| | |
| | | @RequestParam(required = false)String orderByType, |
| | | @RequestParam(required = false)String condition, |
| | | @RequestParam Map<String, Object> param){ |
| | | //以前是立库库存调整接口,后改为平库调整接口 |
| | | excludeTrash(param); |
| | | EntityWrapper<AdjDetl> wrapper = new EntityWrapper<>(); |
| | | EntityWrapper<SaasLog> wrapper = new EntityWrapper<>(); |
| | | convert(param, wrapper); |
| | | allLike(AdjDetl.class, param.keySet(), wrapper, condition); |
| | | wrapper.eq("type",2); |
| | | allLike(SaasLog.class, param.keySet(), wrapper, condition); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} |
| | | return R.ok(adjDetlService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | return R.ok(saasLogService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | |
| | | private <T> void convert(Map<String, Object> map, EntityWrapper<T> wrapper){ |