Browse Source

新增客户档案面谈表

anderx 9 months ago
parent
commit
48d96c7e15

+ 125 - 0
src/main/java/com/goafanti/Interview/bo/UpdateUserBo.java

@@ -0,0 +1,125 @@
+package com.goafanti.Interview.bo;
+
+import com.goafanti.common.model.UserArchives;
+
+public class UpdateUserBo  extends UserArchives {
+
+    /**
+     * 跟进人编号
+     */
+    private String aid;
+    /**
+     * 次数
+     */
+    private Integer counts;
+    /**
+     * 前期沟通-客户的难处
+     */
+    private String earlyCommunication;
+    /**
+     * 客户的需求
+     */
+    private String customerDemand;
+    /**
+     * 面谈思路
+     */
+    private String interviewIdeas;
+    /**
+     * 面谈达成的目的
+     */
+    private String interviewPurpose;
+    /**
+     * 经理/上级面谈建议
+     */
+    private String interviewRecommend;
+    /**
+     * 面谈后反馈
+     */
+    private String interviewFeedback;
+    /**
+     * 后续跟进计划
+     */
+    private String followUpPlan;
+
+
+
+    public String getAid() {
+        return aid;
+    }
+
+    public void setAid(String aid) {
+        this.aid = aid;
+    }
+
+    public Integer getCounts() {
+        return counts;
+    }
+
+    public void setCounts(Integer counts) {
+        this.counts = counts;
+    }
+
+    @Override
+    public String getEarlyCommunication() {
+        return earlyCommunication;
+    }
+
+    @Override
+    public void setEarlyCommunication(String earlyCommunication) {
+        this.earlyCommunication = earlyCommunication;
+    }
+
+    @Override
+    public String getCustomerDemand() {
+        return customerDemand;
+    }
+
+    @Override
+    public void setCustomerDemand(String customerDemand) {
+        this.customerDemand = customerDemand;
+    }
+
+    @Override
+    public String getInterviewIdeas() {
+        return interviewIdeas;
+    }
+
+    @Override
+    public void setInterviewIdeas(String interviewIdeas) {
+        this.interviewIdeas = interviewIdeas;
+    }
+
+    @Override
+    public String getInterviewPurpose() {
+        return interviewPurpose;
+    }
+
+    @Override
+    public void setInterviewPurpose(String interviewPurpose) {
+        this.interviewPurpose = interviewPurpose;
+    }
+
+    public String getInterviewRecommend() {
+        return interviewRecommend;
+    }
+
+    public void setInterviewRecommend(String interviewRecommend) {
+        this.interviewRecommend = interviewRecommend;
+    }
+
+    public String getInterviewFeedback() {
+        return interviewFeedback;
+    }
+
+    public void setInterviewFeedback(String interviewFeedback) {
+        this.interviewFeedback = interviewFeedback;
+    }
+
+    public String getFollowUpPlan() {
+        return followUpPlan;
+    }
+
+    public void setFollowUpPlan(String followUpPlan) {
+        this.followUpPlan = followUpPlan;
+    }
+}

+ 91 - 0
src/main/java/com/goafanti/Interview/controller/UserArchivesInterviewController.java

@@ -0,0 +1,91 @@
+package com.goafanti.Interview.controller;
+
+import com.goafanti.Interview.bo.UpdateUserBo;
+import com.goafanti.Interview.service.UserArchivesInterviewService;
+import com.goafanti.common.bo.Result;
+import com.goafanti.common.controller.BaseController;
+import com.goafanti.common.model.UserArchivesInterview;
+import org.springframework.web.bind.annotation.*;
+
+import javax.annotation.Resource;
+
+/**
+ * 客户档案面谈表(UserArchivesInterview)表控制层
+ *
+ * @author makejava
+ * @since 2025-04-10 17:09:23
+ */
+@RestController
+@RequestMapping("/api/admin/userArchivesInterview")
+public class UserArchivesInterviewController extends BaseController {
+    /**
+     * 服务对象
+     */
+    @Resource
+    private UserArchivesInterviewService userArchivesInterviewService;
+
+
+    /**
+     * 新增数据
+     *
+     * @param userArchivesInterview 实体
+     * @return 新增结果
+     */
+    @PostMapping("/add")
+    public Result add(UserArchivesInterview userArchivesInterview) {
+        return new Result<>().data(this.userArchivesInterviewService.insert(userArchivesInterview));
+    }
+
+
+    /**
+     * 通过主键查询单条数据
+     *
+     * @param id 主键
+     * @return 单条数据
+     */
+    @GetMapping("/get")
+    public Result<UserArchivesInterview> queryById(Integer id) {
+        return new Result<>().data(this.userArchivesInterviewService.queryById(id));
+    }
+
+
+    /**
+     * 编辑数据
+     *
+     * @param userArchivesInterview 实体
+     * @return 编辑结果
+     */
+    @PostMapping("/update")
+    public Result edit(UserArchivesInterview userArchivesInterview) {
+        return new Result<>().data(this.userArchivesInterviewService.update(userArchivesInterview));
+    }
+
+    /**
+     * 删除数据
+     *
+     * @param id 主键
+     * @return 删除是否成功
+     */
+    @GetMapping("/delete")
+    public Result deleteById(Integer id) {
+        return new Result<>().data(this.userArchivesInterviewService.deleteById(id));
+    }
+
+    /**
+     * 列表查询
+     *
+     * @param in 参数
+     * @return
+     */
+    @GetMapping("/list")
+    public Result<UserArchivesInterview> list(UserArchivesInterview in, Integer pageNo, Integer pageSize) {
+        return new Result<>().data(this.userArchivesInterviewService.list(in, pageNo, pageSize));
+    }
+
+    @PutMapping("/updateUser")
+    public Result updateUser(UpdateUserBo in) {
+        return new Result<>().data(this.userArchivesInterviewService.updateUser(in));
+    }
+
+}
+

+ 56 - 0
src/main/java/com/goafanti/Interview/service/UserArchivesInterviewService.java

@@ -0,0 +1,56 @@
+package com.goafanti.Interview.service;
+
+import com.goafanti.Interview.bo.UpdateUserBo;
+import com.goafanti.common.model.UserArchivesInterview;
+
+/**
+ * 客户档案面谈表(UserArchivesInterview)表服务接口
+ *
+ * @author makejava
+ * @since 2025-04-10 17:09:23
+ */
+public interface UserArchivesInterviewService {
+
+    /**
+     * 通过ID查询单条数据
+     *
+     * @param id 主键
+     * @return 实例对象
+     */
+    UserArchivesInterview queryById(Integer id);
+
+
+    /**
+     * 新增数据
+     *
+     * @param userArchivesInterview 实例对象
+     * @return 实例对象
+     */
+    UserArchivesInterview insert(UserArchivesInterview userArchivesInterview);
+
+    /**
+     * 修改数据
+     *
+     * @param userArchivesInterview 实例对象
+     * @return 实例对象
+     */
+    UserArchivesInterview update(UserArchivesInterview userArchivesInterview);
+
+    /**
+     * 通过主键删除数据
+     *
+     * @param id 主键
+     * @return 是否成功
+     */
+    boolean deleteById(Integer id);
+
+    /**
+     * 列表数据
+     *
+     * @param in 参数
+     * @return 是否成功
+     */
+    Object list(UserArchivesInterview in, Integer pageNo, Integer pageSize);
+
+    Object updateUser(UpdateUserBo ua);
+}

+ 112 - 0
src/main/java/com/goafanti/Interview/service/impl/UserArchivesInterviewServiceImpl.java

@@ -0,0 +1,112 @@
+package com.goafanti.Interview.service.impl;
+
+import com.goafanti.Interview.bo.UpdateUserBo;
+import com.goafanti.Interview.service.UserArchivesInterviewService;
+import com.goafanti.common.dao.PublicReleaseMapper;
+import com.goafanti.common.dao.UserArchivesInterviewMapper;
+import com.goafanti.common.dao.UserArchivesMapper;
+import com.goafanti.common.model.UserArchives;
+import com.goafanti.common.model.UserArchivesInterview;
+import com.goafanti.core.mybatis.BaseMybatisDao;
+import com.goafanti.core.mybatis.page.Pagination;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * 客户档案面谈表(UserArchivesInterview)表服务实现类
+ *
+ * @author makejava
+ * @since 2025-04-10 17:09:23
+ */
+@Service("userArchivesInterviewService")
+public class UserArchivesInterviewServiceImpl extends BaseMybatisDao<UserArchivesInterviewMapper> implements UserArchivesInterviewService {
+    @Resource
+    private UserArchivesInterviewMapper userArchivesInterviewMapper;
+    @Resource
+    private UserArchivesMapper userArchivesMapper;
+    @Resource
+    private PublicReleaseMapper publicReleaseMapper;
+
+    @Override
+    public Pagination<UserArchivesInterview> list(UserArchivesInterview userArchivesInterview, Integer pageNo, Integer pageSize) {
+        Map<String, Object> params = new HashMap<>();
+        params.put("in", userArchivesInterview);
+        return (Pagination<UserArchivesInterview>) findPage("findUserArchivesInterviewList",
+                "findUserArchivesInterviewCount", params, pageNo, pageSize);
+    }
+
+
+
+    /**
+     * 通过ID查询单条数据
+     *
+     * @param id 主键
+     * @return 实例对象
+     */
+    @Override
+    public UserArchivesInterview queryById(Integer id) {
+        return this.userArchivesInterviewMapper.selectById(id);
+    }
+
+
+    /**
+     * 新增数据
+     *
+     * @param userArchivesInterview 实例对象
+     * @return 实例对象
+     */
+    @Override
+    public UserArchivesInterview insert(UserArchivesInterview userArchivesInterview) {
+        this.userArchivesInterviewMapper.insert(userArchivesInterview);
+        return userArchivesInterview;
+    }
+
+    /**
+     * 修改数据
+     *
+     * @param userArchivesInterview 实例对象
+     * @return 实例对象
+     */
+    @Override
+    public UserArchivesInterview update(UserArchivesInterview userArchivesInterview) {
+        this.userArchivesInterviewMapper.update(userArchivesInterview);
+        return this.queryById(userArchivesInterview.getId());
+    }
+
+    /**
+     * 通过主键删除数据
+     *
+     * @param id 主键
+     * @return 是否成功
+     */
+    @Override
+    public boolean deleteById(Integer id) {
+        return this.userArchivesInterviewMapper.deleteById(id) > 0;
+    }
+
+    @Override
+    public Object updateUser(UpdateUserBo in) {
+        //先修改用户档案表
+        UserArchives update = new UserArchives();
+        update.setId(in.getId());
+        update.setPatentCount(in.getPatentCount());
+        update.setInventionPatentCount(in.getInventionPatentCount());
+        update.setUtilityModelCount(in.getUtilityModelCount());
+        update.setAppearancePatentCount(in.getAppearancePatentCount());
+        update.setSoftwareWorksCount(in.getSoftwareWorksCount());
+        update.setOtherCount(in.getOtherCount());
+        update.setCompanyCount(in.getCompanyCount());
+        update.setSocialSecurityCount(in.getSocialSecurityCount());
+        update.setExternalInvestCount(in.getExternalInvestCount());
+        update.setExternalInvestIndustry(in.getExternalInvestIndustry());
+        update.setExternalInvestName(in.getExternalInvestName());
+        //第一次面谈时间
+//        publicReleaseMapper.selectByUid()
+//        update.setFirstInterviewDate();
+        userArchivesMapper.update(in);
+        return null;
+    }
+}