|  |  | 
 |  |  | 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(); | 
 |  |  |     } | 
 
 |  |  | 
 |  |  |         // size: 'sm', | 
 |  |  |         skin: 'line', | 
 |  |  |         cols: [[ | 
 |  |  |             {type: 'checkbox'} | 
 |  |  |             // {type: 'checkbox'} | 
 |  |  |             // ,{field: 'id', align: 'center',title: 'ID'} | 
 |  |  |             // ,{field: 'hostId$', align: 'center',title: '所属商户'} | 
 |  |  |             ,{field: 'name', align: 'left',title: '客户名称', style: 'color: #1890ff;cursor:pointer', event: 'more', width: 350} | 
 |  |  |             // ,{field: 'hostId$', align: 'center',title: '所属商户'}, | 
 |  |  |             {field: 'name', align: 'left',title: '客户名称', style: 'color: #1890ff;cursor:pointer', event: 'more', width: 350} | 
 |  |  |             ,{field: 'simple', align: 'left',title: '客户简称', hide: true} | 
 |  |  |             ,{field: 'uuid', align: 'left',title: '客户代号'} | 
 |  |  |             ,{field: 'addr', align: 'left',title: '详细地址', templet:function(d){return emptyShow(d.addr)}} |