| | |
| | | import com.zy.crm.manager.entity.CstmrFoll; |
| | | import com.zy.crm.manager.entity.Order; |
| | | import com.zy.crm.manager.entity.OrderFoll; |
| | | import com.zy.crm.manager.entity.Plan; |
| | | import com.zy.crm.manager.service.OrderFollService; |
| | | import com.zy.crm.manager.service.OrderService; |
| | | import com.zy.crm.manager.service.PlanService; |
| | | import com.zy.crm.system.entity.Role; |
| | | import com.zy.crm.system.entity.User; |
| | | import com.zy.crm.system.service.UserService; |
| | |
| | | |
| | | @Autowired |
| | | private OrderService orderService; |
| | | @Autowired |
| | | private PlanService planService; |
| | | |
| | | @RequestMapping(value = "/order/{id}/auth") |
| | | @ManagerAuth |
| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/order/userName/userId/auth") |
| | | @ManagerAuth(memo = "添加跟踪项目获取当前登录账号信息") |
| | | public R userNameAndUserId() { |
| | | KeyValueVo keyValueVo = new KeyValueVo(getUser().getNickname(),getUserId()); |
| | | return R.ok().add(keyValueVo); |
| | | } |
| | | |
| | | @RequestMapping(value = "/order/update/auth") |
| | | @ManagerAuth(memo = "更新跟踪项目") |
| | | public R update(Order order){ |
| | |
| | | @ManagerAuth(memo = "删除跟踪项目") |
| | | public R delete(@RequestParam(value="ids[]") Long[] ids){ |
| | | for (Long id : ids){ |
| | | int plan = planService.selectCount(new EntityWrapper<Plan>().eq("order_id", id)); |
| | | if (plan!=0){ |
| | | return R.error("存在关联的规划单,禁止删除!!!"); |
| | | } |
| | | orderService.deleteById(id); |
| | | } |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | |
| | | , role.judgeLeader() ? String.valueOf(user.getDeptId()) : null |
| | | , user.getId() |
| | | , condition |
| | | , null); |
| | | , 0); |
| | | List<KeyValueVo> vos = new ArrayList<>(); |
| | | page.getRecords().forEach(item -> vos.add(new KeyValueVo(item.getName(), item.getId()))); |
| | | return R.ok().add(vos); |