xinyb
7 天以前 f632e7d7c25d8a86b1f6718f467bfef0d3c09058
CRM邮箱功能调整
6个文件已修改
1 文件已重命名
109 ■■■■ 已修改文件
src/com/yc/crm/custom/action/CustomController.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/com/yc/crm/custom/entity/T480601Entity.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/com/yc/crm/custom/service/CustomIfc.java 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/com/yc/crm/custom/service/CustomImpl.java 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/com/yc/crm/mail/action/MailAccount.java 65 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/com/yc/crm/mail/action/MailFolder.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/com/yc/crm/mail/service/MailFolderImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/com/yc/crm/custom/action/CustomController.java
@@ -1,6 +1,6 @@
package com.yc.crm.custom.action;
import com.yc.crm.custom.entity.T480601HEntity;
import com.yc.crm.custom.entity.T480601Entity;
import com.yc.crm.custom.service.CustomIfc;
import com.yc.crm.mail.entity.MailModuleEntity;
import com.yc.crm.mail.util.AllBackMsg;
@@ -68,7 +68,7 @@
     * @return
     */
    @PostMapping("/saveCustom.do")
    public AllBackMsg saveCustom(@RequestBody T480601HEntity custom, HttpServletRequest request, HttpServletResponse response) throws Exception {
    public AllBackMsg saveCustom(@RequestBody T480601Entity custom, HttpServletRequest request, HttpServletResponse response) throws Exception {
        AllBackMsg msg = new AllBackMsg();
        try {
            HttpSession session = request.getSession();
@@ -106,7 +106,7 @@
     * @return
     */
    @PostMapping("/updateCustom.do")
    public AllBackMsg updateCustom(@RequestBody T480601HEntity custom, HttpServletRequest request, HttpServletResponse response) throws Exception {
    public AllBackMsg updateCustom(@RequestBody T480601Entity custom, HttpServletRequest request, HttpServletResponse response) throws Exception {
        AllBackMsg msg = new AllBackMsg();
        try {
            HttpSession session = request.getSession();
src/com/yc/crm/custom/entity/T480601Entity.java
File was renamed from src/com/yc/crm/custom/entity/T480601HEntity.java
@@ -15,7 +15,7 @@
 * @Description:客户
 */
@Data
public class T480601HEntity {
public class T480601Entity {
//    private String docCode;//单号
//    private Integer formId;//功能号
////    private String userCode;//用户
@@ -159,8 +159,8 @@
    private Integer pageCount;
    private String ccCode;
    private String ccName;
    private  List<FileEntity> files;
    private List<AuditEntity> auditRecords;
    private  List<FileEntity> files;//附件
    private List<AuditEntity> auditRecords;//审计实体
    private Integer systemFlag;//系统标签
    private Integer cluesStatusFlag;//线索状态
}
src/com/yc/crm/custom/service/CustomIfc.java
@@ -1,6 +1,6 @@
package com.yc.crm.custom.service;
import com.yc.crm.custom.entity.T480601HEntity;
import com.yc.crm.custom.entity.T480601Entity;
import java.util.List;
@@ -10,14 +10,14 @@
     *
     * @param custom
     */
    abstract String saveCustom(T480601HEntity custom);
    abstract String saveCustom(T480601Entity custom);
    /**
     * 修改客户
     * @param custom
     * @return
     */
    abstract Integer updateCustom(T480601HEntity custom);
    abstract Integer updateCustom(T480601Entity custom);
    /**
     * 删除客户
@@ -32,7 +32,7 @@
     * @param userCode
     * @return
     */
    abstract List<T480601HEntity> getCustomList(String userCode);
    abstract List<T480601Entity> getCustomList(String userCode);
    /**
     * 查询客户详情
@@ -40,5 +40,5 @@
     * @param userCode
     * @return
     */
    abstract T480601HEntity getCustomInfo(String docCode,String userCode);
    abstract T480601Entity getCustomInfo(String docCode, String userCode);
}
src/com/yc/crm/custom/service/CustomImpl.java
@@ -2,7 +2,7 @@
import com.yc.action.grid.GridUtils;
import com.yc.crm.clues.entity.T482103Entity;
import com.yc.crm.custom.entity.T480601HEntity;
import com.yc.crm.custom.entity.T480601Entity;
import com.yc.service.BaseService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@@ -20,11 +20,11 @@
public class CustomImpl extends BaseService implements CustomIfc {
    @Transactional(rollbackFor = Exception.class)
    @Override
    public String saveCustom(T480601HEntity custom) {
    public String saveCustom(T480601Entity custom) {
        String sql = "set nocount on\n";
        try {
            sql += "declare @docCode varchar(50) \n";
            sql += "exec sp_newdoccode 482101," + GridUtils.prossSqlParm(custom.getEnterCode()) + ",@docCode output \n";
            sql += "exec sp_newdoccode t480601," + GridUtils.prossSqlParm(custom.getEnterCode()) + ",@docCode output \n";
            sql += "insert into t480601H(formId,docDate,periodId,docStatus,companyId,companyName,enterCode,enterName,enterDate," +
                    "postCode,postName,postDate,cltCode,cltName,country,province,city,district,street) " +
                    "values (" + custom.getFormId() + ",convert(varchar(10),getdate(),120),convert(varchar(7),getdate(),120),0," +
@@ -52,7 +52,7 @@
    }
    @Transactional(rollbackFor = Exception.class)
    @Override
    public Integer updateCustom(T480601HEntity custom) {
    public Integer updateCustom(T480601Entity custom) {
        String sql = "set nocunt on \n";
        try {
            sql += "update t480601H set modifyCode=" + GridUtils.prossSqlParm(custom.getEnterCode()) + ",modifyName=" + GridUtils.prossSqlParm(custom.getEnterName()) + "," +
@@ -79,7 +79,7 @@
    }
    @Override
    public List<T480601HEntity> getCustomList(String userCode) {
    public List<T480601Entity> getCustomList(String userCode) {
        try {
            return null;
        } catch (Exception e) {
@@ -88,7 +88,7 @@
    }
    @Override
    public T480601HEntity getCustomInfo(String docCode, String userCode) {
    public T480601Entity getCustomInfo(String docCode, String userCode) {
        try {
            return null;
        } catch (Exception e) {
src/com/yc/crm/mail/action/MailAccount.java
@@ -411,7 +411,7 @@
    }
    /**
     * 检测绑定是否有效
     * 检测绑定是否已经存在(是否已绑定)
     *
     * @param email
     * @param request
@@ -596,6 +596,69 @@
        return errorMsg;
    }
    /**
     * 常规查询
     * @param request
     * @param response
     * @return
     */
    @GetMapping("/getConvention.do")
    public AllBackMsg getConvention(HttpServletRequest request, HttpServletResponse response) {
        AllBackMsg msg = new AllBackMsg();
        try {
            HttpSession session = request.getSession();
            String userCode = (String) session.getAttribute(SessionKey.USERCODE);
            if (StringUtils.isBlank(userCode)) {
                msg.setFail("登录用户已过期,请检查");
                return msg;
            }
            DataSourceEntity dataSource = MultiDataSource.getDataSourceMap(request);//获取数据源
            SpObserver.setDBtoInstance("_" + dataSource.getDbId());
            //根据当前用户查询绑定的邮箱信息
        } catch (MessagingException e) {
            msg.setFail(e.getCause() != null ? e.getCause().getMessage() : e.getMessage());
        } catch (Exception e) {
            msg.setFail(e.getCause() != null ? e.getCause().getMessage() : e.getMessage());
        } finally {
            SpObserver.setDBtoInstance();
        }
        return msg;
    }
    /**
     * 常规更新
     * @param request
     * @param response
     * @return
     */
    @GetMapping("/updateConvention.do")
    public AllBackMsg updateConvention(HttpServletRequest request, HttpServletResponse response) {
        AllBackMsg msg = new AllBackMsg();
        try {
            HttpSession session = request.getSession();
            String userCode = (String) session.getAttribute(SessionKey.USERCODE);
            if (StringUtils.isBlank(userCode)) {
                msg.setFail("登录用户已过期,请检查");
                return msg;
            }
            DataSourceEntity dataSource = MultiDataSource.getDataSourceMap(request);//获取数据源
            SpObserver.setDBtoInstance("_" + dataSource.getDbId());
            //根据当前用户查询绑定的邮箱信息
        } catch (MessagingException e) {
            msg.setFail(e.getCause() != null ? e.getCause().getMessage() : e.getMessage());
        } catch (Exception e) {
            msg.setFail(e.getCause() != null ? e.getCause().getMessage() : e.getMessage());
        } finally {
            SpObserver.setDBtoInstance();
        }
        return msg;
    }
    private T482102Entity getMailConfigProperties(T482102Entity t482102) {
        try {
            String email = t482102.getEmail();
src/com/yc/crm/mail/action/MailFolder.java
@@ -207,7 +207,9 @@
                            folderEntity.setRowId(y.getRowId());
                            folderEntity.setParentRowId(y.getParentRowId());
                            folderEntity.setTreeControl(y.getTreeControl());
                            folderEntity.setList(getFolderList(t482107, y.getRowId()));
                            if (!y.getRowId().equals(y.getParentRowId())) {
                                folderEntity.setList(getFolderList(t482107, y.getRowId()));
                            }
                            folder.add(folderEntity);
                        }
                    }
@@ -238,7 +240,9 @@
                            folder1.setKey(y.getRowId());
                            folder1.setParentKey(y.getParentRowId());
                            folder1.setName(y.getFolderName());
                            folder1.setList(getFolderModule(t482107, y.getRowId()));
                            if (!y.getRowId().equals(y.getParentRowId())) {
                                folder1.setList(getFolderModule(t482107, y.getRowId()));
                            }
                            folder.add(folder1);
                        }
                    } else {
src/com/yc/crm/mail/service/MailFolderImpl.java
@@ -45,7 +45,7 @@
            sql += "update t482107 set folder_name=" + GridUtils.prossSqlParm(folder.getFolderName()) +
                    ",sort_id=" + folder.getSortId() + ",update_time=getdate() " + //",rowId=" + GridUtils.prossSqlParm(folder.getRowId()) +
                    ",treeControl=" + GridUtils.prossSqlParm(folder.getTreeControl()) + ",parentRowId=" + GridUtils.prossSqlParm(folder.getParentRowId()) +
                    "where folder_id=" + folder.getFolderId() + " and userCode=" + GridUtils.prossSqlParm(folder.getUserCode()) + "\n";
                    " where folder_id=" + folder.getFolderId() + " and userCode=" + GridUtils.prossSqlParm(folder.getUserCode()) + "\n";
            sql += "select @@ROWCOUNT";
            return jdbcTemplate.queryForObject(sql, Integer.class);
        } catch (Exception e) {