| | |
| | | import com.zy.crm.manager.entity.Cstmr; |
| | | import com.zy.crm.manager.entity.CstmrFoll; |
| | | import com.zy.crm.manager.entity.CstmrType; |
| | | import com.zy.crm.manager.entity.Order; |
| | | import com.zy.crm.manager.service.CstmrFollService; |
| | | import com.zy.crm.manager.service.CstmrService; |
| | | import com.zy.crm.manager.service.CstmrTypeService; |
| | | import com.zy.crm.manager.service.OrderService; |
| | | import com.zy.crm.manager.utils.CompanySearchUtils; |
| | | import com.zy.crm.system.entity.Dept; |
| | | import com.zy.crm.system.entity.Dic; |
| | |
| | | private DicService dicService; |
| | | @Autowired |
| | | private DeptService deptService; |
| | | @Autowired |
| | | private OrderService orderService; |
| | | |
| | | @RequestMapping(value = "/cstmr/{id}/auth") |
| | | @ManagerAuth |
| | |
| | | @ManagerAuth(memo = "删除甲方单位") |
| | | public R delete(@RequestParam(value="ids[]") Long[] ids){ |
| | | for (Long id : ids){ |
| | | int cstmr_id = orderService.selectCount(new EntityWrapper<Order>().eq("cstmr_id", id)); |
| | | if (cstmr_id!=0){ |
| | | return R.error("存在关联跟踪项目,禁止删除!!!"); |
| | | } |
| | | cstmrService.deleteById(id); |
| | | } |
| | | return R.ok(); |
| | |
| | | @RequestMapping(value = "/cstmr/delete/one/{id}") |
| | | @ManagerAuth(memo = "删除甲方单位") |
| | | public R deleteOne(@PathVariable Long id) { |
| | | int cstmr_id = orderService.selectCount(new EntityWrapper<Order>().eq("cstmr_id", id)); |
| | | if (cstmr_id!=0){ |
| | | return R.error("存在关联跟踪项目,禁止删除!!!"); |
| | | } |
| | | cstmrService.deleteById(id); |
| | | return R.ok(); |
| | | } |