中扬CRM客户关系管理系统
#
LSH
2023-11-24 2c7a0b5c9cded118d3c3c46211adf40fe558d67b
src/main/java/com/zy/crm/manager/controller/CstmrController.java
@@ -198,7 +198,7 @@
    }
    @RequestMapping(value = "/cstmr/add/auth")
    @ManagerAuth(memo = "添加甲方单位信息公海")
    @ManagerAuth(memo = "添加客户信息公海")
    public R add(Cstmr cstmr) {
        if (getUser().getRoleId()!=1){
            if (!getUser().getNickname().equals("陈燕")){
@@ -232,7 +232,7 @@
    }
    @RequestMapping(value = "/cstmr/add2/auth")
    @ManagerAuth(memo = "添加甲方单位信息公海")
    @ManagerAuth(memo = "添加客户信息公海")
    public R add22(Cstmr cstmr) {
        Long hostId = getHostId();
        if (cstmrService.selectByUuid(hostId, cstmr.getUuid()) != null) {
@@ -261,23 +261,23 @@
    }
    @RequestMapping(value = "/cstmr2/add/auth")
    @ManagerAuth(memo = "接取甲方单位")
    @ManagerAuth(memo = "接取客户信息")
    public R add2(Cstmr cstmr) {
        Cstmr cstmr1 = cstmrService.selectByName(getHostId(),cstmr.getName());
        if (Cools.isEmpty(cstmr1) || cstmr1.getDirector()!=null){
            return R.error("你无法接取此甲方单位!");
            return R.error("你无法接取此客户信息!");
        }
        cstmr1.setDirector(getUserId());
        cstmr.setDeptId(getDeptId());               // 所属部门
        cstmr.setUserId(getUserId());               // 所属人员
        cstmr.setUpdateBy(getUserId());
        cstmr.setUpdateTime(new Date());
        cstmr1.setDeptId(getDeptId());               // 所属部门
        cstmr1.setUserId(getUserId());               // 所属人员
        cstmr1.setUpdateBy(getUserId());
        cstmr1.setUpdateTime(new Date());
        cstmrService.updateById(cstmr1);
        return R.ok();
    }
   @RequestMapping(value = "/cstmr/update/auth")
   @ManagerAuth(memo = "更新甲方单位")
   @ManagerAuth(memo = "更新客户信息")
    public R update(Cstmr cstmr){
        if (Cools.isEmpty(cstmr) || null==cstmr.getId()){
            return R.error();
@@ -294,7 +294,7 @@
    }
    @RequestMapping(value = "/cstmr/delete/auth")
    @ManagerAuth(memo = "删除甲方单位")
    @ManagerAuth(memo = "删除客户信息")
    public R delete(@RequestParam(value="ids[]") Long[] ids){
        for (Long id : ids){
            int order = orderService.selectCount(new EntityWrapper<Order>().eq("cstmr_id", id));
@@ -307,7 +307,7 @@
    }
    @RequestMapping(value = "/cstmr/delete/one/{id}")
    @ManagerAuth(memo = "删除甲方单位")
    @ManagerAuth(memo = "删除客户信息")
    public R deleteOne(@PathVariable Long id) {
        int cstmr_id = orderService.selectCount(new EntityWrapper<Order>().eq("cstmr_id", id));
        if (cstmr_id!=0){
@@ -357,7 +357,7 @@
     * excel导入
     */
    @PostMapping(value = "/cstmr/excel/import/auth")
    @ManagerAuth(memo = "甲方单位Excel导入")
    @ManagerAuth(memo = "客户信息Excel导入")
//    @Transactional
    public R cstmrExcelImport(MultipartFile file) throws IOException {
        InputStream inStream = file.getInputStream();