| | |
| | | import com.core.exception.CoolException; |
| | | import com.zy.crm.common.web.BaseController; |
| | | import com.zy.crm.manager.controller.result.FollowerTableVo; |
| | | 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.entity.*; |
| | | import com.zy.crm.manager.service.*; |
| | | import com.zy.crm.manager.utils.CompanySearchUtils; |
| | | import com.zy.crm.system.entity.Dept; |
| | | import com.zy.crm.system.entity.Dic; |
| | |
| | | private CstmrService cstmrService; |
| | | @Autowired |
| | | private CstmrTypeService cstmrTypeService; |
| | | @Autowired |
| | | private CstmrGradeService cstmrGradeService; |
| | | @Autowired |
| | | private DicService dicService; |
| | | @Autowired |
| | |
| | | throw new CoolException("第" + i + "行客户类别不合法,请重新导入"); |
| | | } |
| | | cstmr.setCstmrType(cstmrType.getId()); |
| | | |
| | | CstmrGrade cstmrGrade = cstmrGradeService.selectByName(hostId, type); |
| | | if (null == cstmrGrade) { |
| | | throw new CoolException("第" + i + "行客户等级不合法,请重新导入"); |
| | | } |
| | | cstmr.setCstmrGrade(cstmrGrade.getId()); |
| | | // 客户关系 |
| | | cstmr.setRela(dataFormatter.formatCellValue(row.getCell(3))); |
| | | // 电话 |
| | |
| | | import com.zy.crm.manager.entity.CstmrGrade; |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | @Mapper |
| | | @Repository |
| | | public interface CstmrGradeMapper extends BaseMapper<CstmrGrade> { |
| | | CstmrGrade selectByName(@Param("hostId") Long hostId, @Param("name") String name); |
| | | |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | |
| | | public interface CstmrGradeService extends IService<CstmrGrade> { |
| | | CstmrGrade selectByName(Long hostId, String name); |
| | | |
| | | } |
| | |
| | | |
| | | @Service("cstmrGradeService") |
| | | public class CstmrGradeServiceImpl extends ServiceImpl<CstmrGradeMapper, CstmrGrade> implements CstmrGradeService { |
| | | |
| | | @Override |
| | | public CstmrGrade selectByName(Long hostId, String name) { |
| | | return this.baseMapper.selectByName(hostId, name); |
| | | } |
| | | } |
| | |
| | | |
| | | </resultMap> |
| | | |
| | | <select id="selectByName" resultMap="BaseResultMap"> |
| | | select top 1 * |
| | | from man_cstmr_grade |
| | | where 1=1 |
| | | and name = #{name} |
| | | <if test="hostId != null"> |
| | | and host_id = #{hostId} |
| | | </if> |
| | | </select> |
| | | </mapper> |
| | |
| | | <result column="dept_id" property="deptId" /> |
| | | <result column="user_id" property="userId" /> |
| | | <result column="cstmr_type" property="cstmrType" /> |
| | | <result column="cstmr_grade" property="cstmrGrade" /> |
| | | <result column="uuid" property="uuid" /> |
| | | <result column="name" property="name" /> |
| | | <result column="simple" property="simple" /> |
| | |
| | | <result column="credit_code" property="creditCode" /> |
| | | <result column="issue_time" property="issueTime" /> |
| | | <result column="company_type" property="companyType" /> |
| | | <result column="company_grade" property="companyGrade" /> |
| | | <result column="company_person" property="companyPerson" /> |
| | | <result column="company_status" property="companyStatus" /> |
| | | <result column="reg_money" property="regMoney" /> |
| | |
| | | ,{field: 'weeklyDailyReality', align: 'center',title: '行程',hide : false, toolbar: '#tbLookReality'} |
| | | ,{field: 'remarks', align: 'left',title: '备注', hide: false, templet:function(d){return emptyShow(d.remarks)}} |
| | | ,{field: 'cstmrType$', align: 'left',title: '客户类别', hide: false} |
| | | ,{field: 'cstmrGrade$', align: 'left',title: '客户类别', hide: false} |
| | | ,{field: 'cstmrGrade$', align: 'left',title: '客户等级', hide: false} |
| | | ,{field: 'industry', align: 'left',title: '客户行业', hide: false} |
| | | ,{field: 'productCategory', align: 'left',title: '产品类型', hide: false} |
| | | ,{field: 'userId$', align: 'left',title: '添加人员', hide: true} |
| | |
| | | {type: 'numbers'} |
| | | // ,{field: 'weeklyDay$', align: 'center',title: '星期'} |
| | | ,{field: 'dailyTime$',width : 120, align: 'center',title: '日期'} |
| | | ,{field: 'workContent', align: 'center', title: '工作内容', edit:false} |
| | | ,{field: 'workPurpose', title: '工作目的', edit:false} |
| | | ,{field: 'workContent', align: 'center', title: '工作内容及目的', edit:false} |
| | | // ,{field: 'workPurpose', title: '工作目的', edit:false} |
| | | ,{field: 'comment', title: '评论', edit:false} |
| | | ,{field: 'weeklyMatter', title: '需协助事项', edit:false} |
| | | // ,{field: 'dailyTime$', align: 'center',title: '日报日期'} |
| | |
| | | ,{field: 'weeklyDailyReality', align: 'center',title: '行程',hide : false, toolbar: '#tbLookReality'} |
| | | ,{field: 'remarks', align: 'left',title: '备注', hide: false, templet:function(d){return emptyShow(d.remarks)}} |
| | | ,{field: 'cstmrType$', align: 'left',title: '客户类别', hide: false} |
| | | ,{field: 'cstmrGrade$', align: 'left',title: '客户等级', hide: false} |
| | | ,{field: 'industry', align: 'left',title: '客户行业', hide: false} |
| | | ,{field: 'productCategory', align: 'left',title: '产品类型', hide: false} |
| | | ,{field: 'userId$', align: 'left',title: '添加人员', hide: true} |
| | |
| | | {type: 'numbers'} |
| | | // ,{field: 'weeklyDay$', align: 'center',title: '星期'} |
| | | ,{field: 'dailyTime$',width : 120, align: 'center',title: '日期'} |
| | | ,{field: 'workContent', align: 'center', title: '工作内容', edit:false} |
| | | ,{field: 'workPurpose', title: '工作目的', edit:false} |
| | | ,{field: 'workContent', align: 'center', title: '工作内容及目的', edit:false} |
| | | // ,{field: 'workPurpose', title: '工作目的', edit:false} |
| | | ,{field: 'comment', title: '评论', edit:false} |
| | | ,{field: 'weeklyMatter', title: '需协助事项', edit:false} |
| | | // ,{field: 'dailyTime$', align: 'center',title: '日报日期'} |