| | |
| | | @RequestParam Map<String, Object> param){ |
| | | EntityWrapper<PriSales> wrapper = new EntityWrapper<>(); |
| | | wrapper.setSqlSelect("id,title,create_time as createTime,settle,filepath,item_id as itemId,order_num as orderNum,template_name as templateName,user_id as userId,update_user_id as updateUserId,update_time as updateTime,in_order_num as inOrderNum,member_id as memberId"); |
| | | wrapper.in("member_id", getUserRoleBelongsToUserId("allopen")); |
| | | // wrapper.in("member_id", getUserRoleBelongsToUserId("allopen")); |
| | | excludeTrash(param); |
| | | convert(param, wrapper); |
| | | allLike(PriSales.class, param.keySet(), wrapper, condition); |
| | | wrapper.or().eq("member_id",getUserId()); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} |
| | | return R.ok(priSalesService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | } |
| | |
| | | private <T> void convert(Map<String, Object> map, EntityWrapper<T> wrapper){ |
| | | boolean signUserId = false; |
| | | boolean signDeptId = false; |
| | | boolean signHostId = false; |
| | | for (Map.Entry<String, Object> entry : map.entrySet()){ |
| | | if (entry.getKey().equals("dept_id")){ |
| | | signDeptId = true; |
| | | if (String.valueOf(entry.getValue()).equals("19")){ |
| | | signHostId = true; |
| | | } |
| | | } |
| | | } |
| | | for (Map.Entry<String, Object> entry : map.entrySet()){ |
| | |
| | | } |
| | | if (!signUserId && !signDeptId){ |
| | | wrapper.eq("user_id", getUserId()); |
| | | } |
| | | if (signHostId){ |
| | | wrapper.or().eq("host_id",1); |
| | | } |
| | | } |
| | | |
| | |
| | | initNames.add("提交产品费用明细"); |
| | | initNames.add("部门经理审核"); |
| | | initNames.add("业务员确认"); |
| | | priSales.setSettleMsg(JSON.toJSONString(SettleDto.initSalesPricing(manager,getUser(),initNames,3))); |
| | | priSales.setSettleMsg(JSON.toJSONString(SettleDto.initSalesPricing(manager,getUser(),getUser(),initNames,3))); |
| | | |
| | | //设置项目流程 |
| | | plan.setStep(3); |
| | |
| | | public R query(String condition) { |
| | | EntityWrapper<PriSales> wrapper = new EntityWrapper<>(); |
| | | wrapper.like("id", condition); |
| | | wrapper.in("member_id", getUserRoleBelongsToUserId("allopen")); |
| | | wrapper.in("user_id", getUserRoleBelongsToUserId("allopen")); |
| | | Page<PriSales> page = priSalesService.selectPage(new Page<>(0, 10), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (PriSales priSales : page.getRecords()){ |