Browse Source

qxm-BPM发送企业微信人员管理

qxm 3 years ago
parent
commit
1848a1c9df

+ 140 - 0
suishenbang-order/src/main/java/com/dgtly/order/controller/BpmWxNoticeOrgController.java

@@ -0,0 +1,140 @@
+package com.dgtly.order.controller;
+
+import java.util.List;
+
+import com.dgtly.framework.util.ShiroUtils;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.ModelMap;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+import com.dgtly.common.annotation.Log;
+import com.dgtly.common.enums.BusinessType;
+import com.dgtly.order.domain.BpmWxNoticeOrg;
+import com.dgtly.order.service.IBpmWxNoticeOrgService;
+import com.dgtly.common.core.controller.BaseController;
+import com.dgtly.common.core.domain.AjaxResult;
+import com.dgtly.common.utils.poi.ExcelUtil;
+import com.dgtly.common.core.page.TableDataInfo;
+import org.springframework.web.multipart.MultipartFile;
+
+/**
+ * 企微人员发送Controller
+ * 
+ * @author dgtly
+ * @date 2021-08-26
+ */
+@Controller
+@RequestMapping("/order/wxNoticeOrg")
+public class BpmWxNoticeOrgController extends BaseController
+{
+    private String prefix = "order/wxNoticeOrg";
+
+    @Autowired
+    private IBpmWxNoticeOrgService bpmWxNoticeOrgService;
+
+    @RequiresPermissions("order:wxNoticeOrg:view")
+    @GetMapping()
+    public String wxNoticeOrg()
+    {
+        return prefix + "/wxNoticeOrg";
+    }
+
+    /**
+     * 查询企微人员发送列表
+     */
+    @RequiresPermissions("order:wxNoticeOrg:list")
+    @PostMapping("/list")
+    @ResponseBody
+    public TableDataInfo list(BpmWxNoticeOrg bpmWxNoticeOrg)
+    {
+        startPage();
+        List<BpmWxNoticeOrg> list = bpmWxNoticeOrgService.selectBpmWxNoticeOrgList(bpmWxNoticeOrg);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出企微人员发送列表
+     */
+    @RequiresPermissions("order:wxNoticeOrg:export")
+    @PostMapping("/export")
+    @ResponseBody
+    public AjaxResult export(BpmWxNoticeOrg bpmWxNoticeOrg)
+    {
+        List<BpmWxNoticeOrg> list = bpmWxNoticeOrgService.selectBpmWxNoticeOrgList(bpmWxNoticeOrg);
+        ExcelUtil<BpmWxNoticeOrg> util = new ExcelUtil<BpmWxNoticeOrg>(BpmWxNoticeOrg.class);
+        return util.exportExcel(list, "企微人员发送消息列表");
+    }
+
+    @RequiresPermissions("order:wxNoticeOrg:import")
+    @PostMapping("/importData")
+    @ResponseBody
+    public AjaxResult importData(MultipartFile file) throws Exception
+    {
+        ExcelUtil<BpmWxNoticeOrg> util = new ExcelUtil<BpmWxNoticeOrg>(BpmWxNoticeOrg.class);
+        List<BpmWxNoticeOrg> wxNoticeOrgList = util.importExcel(file.getInputStream());
+        String operName = ShiroUtils.getSysUser().getLoginName();
+        String msg = bpmWxNoticeOrgService.importBpmWxNoticeOrg(wxNoticeOrgList, operName);
+        return AjaxResult.success(msg);
+    }
+
+    /**
+     * 新增企微人员发送
+     */
+    @GetMapping("/add")
+    public String add()
+    {
+        return prefix + "/add";
+    }
+
+    /**
+     * 新增保存企微人员发送
+     */
+    @RequiresPermissions("order:wxNoticeOrg:add")
+    @Log(title = "企微人员发送", businessType = BusinessType.INSERT)
+    @PostMapping("/add")
+    @ResponseBody
+    public AjaxResult addSave(BpmWxNoticeOrg bpmWxNoticeOrg)
+    {
+        return toAjax(bpmWxNoticeOrgService.insertBpmWxNoticeOrg(bpmWxNoticeOrg));
+    }
+
+    /**
+     * 修改企微人员发送
+     */
+    @GetMapping("/edit/{id}")
+    public String edit(@PathVariable("id") Long id, ModelMap mmap)
+    {
+        BpmWxNoticeOrg bpmWxNoticeOrg = bpmWxNoticeOrgService.selectBpmWxNoticeOrgById(id);
+        mmap.put("bpmWxNoticeOrg", bpmWxNoticeOrg);
+        return prefix + "/edit";
+    }
+
+    /**
+     * 修改保存企微人员发送
+     */
+    @RequiresPermissions("order:wxNoticeOrg:edit")
+    @Log(title = "企微人员发送", businessType = BusinessType.UPDATE)
+    @PostMapping("/edit")
+    @ResponseBody
+    public AjaxResult editSave(BpmWxNoticeOrg bpmWxNoticeOrg)
+    {
+        return toAjax(bpmWxNoticeOrgService.updateBpmWxNoticeOrg(bpmWxNoticeOrg));
+    }
+
+    /**
+     * 删除企微人员发送
+     */
+    @RequiresPermissions("order:wxNoticeOrg:remove")
+    @Log(title = "企微人员发送", businessType = BusinessType.DELETE)
+    @PostMapping( "/remove")
+    @ResponseBody
+    public AjaxResult remove(String ids)
+    {
+        return toAjax(bpmWxNoticeOrgService.deleteBpmWxNoticeOrgByIds(ids));
+    }
+}

+ 109 - 0
suishenbang-order/src/main/java/com/dgtly/order/domain/BpmWxNoticeOrg.java

@@ -0,0 +1,109 @@
+package com.dgtly.order.domain;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.dgtly.common.annotation.Excel;
+import com.dgtly.common.core.domain.BaseEntity;
+
+/**
+ * 企微人员发送对象 bpm_wx_notice_org
+ * 
+ * @author dgtly
+ * @date 2021-08-26
+ */
+public class BpmWxNoticeOrg extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 主键id */
+    private Long id;
+
+    /** 是否删除 */
+    private Long isDelete;
+
+    /** 组织架构名称 */
+    @Excel(name = "组织架构名称(必须准确)*")
+    private String orgName;
+
+    /** 组织代码 */
+    private String orgCode;
+
+    /** 用户域账号 */
+    @Excel(name = "用户域账号(必须准确)*")
+    private String account;
+
+    /** 用户姓名 */
+    @Excel(name = "用户姓名")
+    private String userName;
+
+    public void setId(Long id) 
+    {
+        this.id = id;
+    }
+
+    public Long getId() 
+    {
+        return id;
+    }
+    public void setIsDelete(Long isDelete) 
+    {
+        this.isDelete = isDelete;
+    }
+
+    public Long getIsDelete() 
+    {
+        return isDelete;
+    }
+    public void setOrgName(String orgName) 
+    {
+        this.orgName = orgName;
+    }
+
+    public String getOrgName() 
+    {
+        return orgName;
+    }
+    public void setOrgCode(String orgCode) 
+    {
+        this.orgCode = orgCode;
+    }
+
+    public String getOrgCode() 
+    {
+        return orgCode;
+    }
+    public void setAccount(String account) 
+    {
+        this.account = account;
+    }
+
+    public String getAccount() 
+    {
+        return account;
+    }
+    public void setUserName(String userName) 
+    {
+        this.userName = userName;
+    }
+
+    public String getUserName() 
+    {
+        return userName;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("createBy", getCreateBy())
+            .append("createTime", getCreateTime())
+            .append("updateBy", getUpdateBy())
+            .append("updateTime", getUpdateTime())
+            .append("isDelete", getIsDelete())
+            .append("orgName", getOrgName())
+            .append("orgCode", getOrgCode())
+            .append("account", getAccount())
+            .append("userName", getUserName())
+            .toString();
+    }
+}

+ 67 - 0
suishenbang-order/src/main/java/com/dgtly/order/mapper/BpmWxNoticeOrgMapper.java

@@ -0,0 +1,67 @@
+package com.dgtly.order.mapper;
+
+import com.dgtly.order.domain.BpmWxNoticeOrg;
+
+import java.util.List;
+
+
+/**
+ * 企微人员发送Mapper接口
+ * 
+ * @author dgtly
+ * @date 2021-08-26
+ */
+public interface BpmWxNoticeOrgMapper 
+{
+    /**
+     * 查询企微人员发送
+     * 
+     * @param id 企微人员发送ID
+     * @return 企微人员发送
+     */
+    public BpmWxNoticeOrg selectBpmWxNoticeOrgById(Long id);
+
+    /**
+     * 查询企微人员发送列表
+     * 
+     * @param bpmWxNoticeOrg 企微人员发送
+     * @return 企微人员发送集合
+     */
+    public List<BpmWxNoticeOrg> selectBpmWxNoticeOrgList(BpmWxNoticeOrg bpmWxNoticeOrg);
+
+    /**
+     * 新增企微人员发送
+     * 
+     * @param bpmWxNoticeOrg 企微人员发送
+     * @return 结果
+     */
+    public int insertBpmWxNoticeOrg(BpmWxNoticeOrg bpmWxNoticeOrg);
+
+    /**
+     * 修改企微人员发送
+     * 
+     * @param bpmWxNoticeOrg 企微人员发送
+     * @return 结果
+     */
+    public int updateBpmWxNoticeOrg(BpmWxNoticeOrg bpmWxNoticeOrg);
+
+    /**
+     * 删除企微人员发送
+     * 
+     * @param id 企微人员发送ID
+     * @return 结果
+     */
+    public int deleteBpmWxNoticeOrgById(Long id);
+
+    /**
+     * 批量删除企微人员发送
+     * 
+     * @param ids 需要删除的数据ID
+     * @return 结果
+     */
+    public int deleteBpmWxNoticeOrgByIds(String[] ids);
+
+    String selectMetaDiySalesorgtreeOrgCode(String orgName);
+
+    BpmWxNoticeOrg selectBpmWxNoticeOrgByAccount(String account);
+}

+ 64 - 0
suishenbang-order/src/main/java/com/dgtly/order/service/IBpmWxNoticeOrgService.java

@@ -0,0 +1,64 @@
+package com.dgtly.order.service;
+
+import com.dgtly.order.domain.BpmWxNoticeOrg;
+
+import java.util.List;
+
+/**
+ * 企微人员发送Service接口
+ * 
+ * @author dgtly
+ * @date 2021-08-26
+ */
+public interface IBpmWxNoticeOrgService 
+{
+    /**
+     * 查询企微人员发送
+     * 
+     * @param id 企微人员发送ID
+     * @return 企微人员发送
+     */
+    public BpmWxNoticeOrg selectBpmWxNoticeOrgById(Long id);
+
+    /**
+     * 查询企微人员发送列表
+     * 
+     * @param bpmWxNoticeOrg 企微人员发送
+     * @return 企微人员发送集合
+     */
+    public List<BpmWxNoticeOrg> selectBpmWxNoticeOrgList(BpmWxNoticeOrg bpmWxNoticeOrg);
+
+    /**
+     * 新增企微人员发送
+     * 
+     * @param bpmWxNoticeOrg 企微人员发送
+     * @return 结果
+     */
+    public int insertBpmWxNoticeOrg(BpmWxNoticeOrg bpmWxNoticeOrg);
+
+    /**
+     * 修改企微人员发送
+     * 
+     * @param bpmWxNoticeOrg 企微人员发送
+     * @return 结果
+     */
+    public int updateBpmWxNoticeOrg(BpmWxNoticeOrg bpmWxNoticeOrg);
+
+    /**
+     * 批量删除企微人员发送
+     * 
+     * @param ids 需要删除的数据ID
+     * @return 结果
+     */
+    public int deleteBpmWxNoticeOrgByIds(String ids);
+
+    /**
+     * 删除企微人员发送信息
+     * 
+     * @param id 企微人员发送ID
+     * @return 结果
+     */
+    public int deleteBpmWxNoticeOrgById(Long id);
+
+    String importBpmWxNoticeOrg(List<BpmWxNoticeOrg> wxNoticeOrgList, String operName);
+}

+ 166 - 0
suishenbang-order/src/main/java/com/dgtly/order/service/impl/BpmWxNoticeOrgServiceImpl.java

@@ -0,0 +1,166 @@
+package com.dgtly.order.service.impl;
+
+import java.util.List;
+
+import com.dgtly.common.exception.BusinessException;
+import com.dgtly.common.utils.DateUtils;
+import com.dgtly.common.utils.StringUtils;
+import com.dgtly.order.domain.BpmWxNoticeOrg;
+import com.dgtly.order.mapper.BpmWxNoticeOrgMapper;
+import com.dgtly.order.service.IBpmWxNoticeOrgService;
+import com.dgtly.system.domain.SysUser;
+import com.dgtly.system.mapper.SysUserMapper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.dgtly.common.core.text.Convert;
+
+/**
+ * 企微人员发送Service业务层处理
+ * 
+ * @author dgtly
+ * @date 2021-08-26
+ */
+@Service
+public class BpmWxNoticeOrgServiceImpl implements IBpmWxNoticeOrgService
+{
+    private static final Logger log = LoggerFactory.getLogger(BpmWxNoticeOrgServiceImpl.class);
+    @Autowired
+    private BpmWxNoticeOrgMapper bpmWxNoticeOrgMapper;
+    @Autowired
+    private SysUserMapper userMapper;
+
+
+    /**
+     * 查询企微人员发送
+     * 
+     * @param id 企微人员发送ID
+     * @return 企微人员发送
+     */
+    @Override
+    public BpmWxNoticeOrg selectBpmWxNoticeOrgById(Long id)
+    {
+        return bpmWxNoticeOrgMapper.selectBpmWxNoticeOrgById(id);
+    }
+
+    /**
+     * 查询企微人员发送列表
+     * 
+     * @param bpmWxNoticeOrg 企微人员发送
+     * @return 企微人员发送
+     */
+    @Override
+    public List<BpmWxNoticeOrg> selectBpmWxNoticeOrgList(BpmWxNoticeOrg bpmWxNoticeOrg)
+    {
+        return bpmWxNoticeOrgMapper.selectBpmWxNoticeOrgList(bpmWxNoticeOrg);
+    }
+
+    /**
+     * 新增企微人员发送
+     * 
+     * @param bpmWxNoticeOrg 企微人员发送
+     * @return 结果
+     */
+    @Override
+    public int insertBpmWxNoticeOrg(BpmWxNoticeOrg bpmWxNoticeOrg)
+    {
+        bpmWxNoticeOrg.setCreateTime(DateUtils.getNowDate());
+        return bpmWxNoticeOrgMapper.insertBpmWxNoticeOrg(bpmWxNoticeOrg);
+    }
+
+    /**
+     * 修改企微人员发送
+     * 
+     * @param bpmWxNoticeOrg 企微人员发送
+     * @return 结果
+     */
+    @Override
+    public int updateBpmWxNoticeOrg(BpmWxNoticeOrg bpmWxNoticeOrg)
+    {
+        bpmWxNoticeOrg.setUpdateTime(DateUtils.getNowDate());
+        return bpmWxNoticeOrgMapper.updateBpmWxNoticeOrg(bpmWxNoticeOrg);
+    }
+
+    /**
+     * 删除企微人员发送对象
+     * 
+     * @param ids 需要删除的数据ID
+     * @return 结果
+     */
+    @Override
+    public int deleteBpmWxNoticeOrgByIds(String ids)
+    {
+        return bpmWxNoticeOrgMapper.deleteBpmWxNoticeOrgByIds(Convert.toStrArray(ids));
+    }
+
+    /**
+     * 删除企微人员发送信息
+     * 
+     * @param id 企微人员发送ID
+     * @return 结果
+     */
+    @Override
+    public int deleteBpmWxNoticeOrgById(Long id)
+    {
+        return bpmWxNoticeOrgMapper.deleteBpmWxNoticeOrgById(id);
+    }
+
+    /*导入数据*/
+    @Override
+    public String importBpmWxNoticeOrg(List<BpmWxNoticeOrg> wxNoticeOrgList, String operName) {
+        if (StringUtils.isNull(wxNoticeOrgList) || wxNoticeOrgList.size() == 0)
+        {
+            throw new BusinessException("导入用户数据不能为空!");
+        }
+
+        int successNum = 0;
+        int failureNum = 0;
+        StringBuilder successMsg = new StringBuilder();
+        StringBuilder failureMsg = new StringBuilder();
+
+        for (BpmWxNoticeOrg bn: wxNoticeOrgList) {
+            try {
+                /*验证用户是否存*/
+                BpmWxNoticeOrg wxNoticeOrg = bpmWxNoticeOrgMapper.selectBpmWxNoticeOrgByAccount(bn.getAccount());
+                if(StringUtils.isNull(wxNoticeOrg)){
+                    /*查询orgcode*/
+                    String orgcode =  bpmWxNoticeOrgMapper.selectMetaDiySalesorgtreeOrgCode(bn.getOrgName());
+                    /*查询用户名*/
+                    SysUser user = userMapper.selectUserByLoginName(bn.getAccount());
+                    if (orgcode != null && user != null){
+                        bn.setOrgCode(orgcode);
+                        bn.setUserName(user.getUserName());
+                        bn.setCreateBy(operName);
+                        insertBpmWxNoticeOrg(bn);
+                        successNum++;
+                        successMsg.append("<br/>" + successNum + "、账号 " + bn.getAccount() + " 导入成功");
+                    }else{
+                        failureNum++;
+                        failureMsg.append("<br/>" + failureNum + "、序号 " + bn.getAccount() + " 组织架构或者账号不存在");
+                    }
+                }else{
+                    failureNum++;
+                    failureMsg.append("<br/>" + failureNum + "、序号 " + bn.getAccount() + " 已存在");
+                }
+            } catch (Exception e) {
+                e.printStackTrace();
+                failureNum++;
+                String msg = "<br/>" + failureNum + "、账号 " + bn.getAccount() + " 导入失败:";
+                failureMsg.append(msg + e.getMessage());
+                log.error(msg, e);
+            }
+        }
+
+        if (failureNum > 0)
+        {
+            failureMsg.insert(0, "很抱歉,导入失败!共 " + failureNum + " 条数据格式不正确,错误如下:");
+            throw new BusinessException(failureMsg.toString());
+        }
+        else
+        {
+            successMsg.insert(0, "恭喜您,数据已全部导入成功!共 " + successNum + " 条,数据如下:");
+        }
+        return successMsg.toString();
+    }
+}

+ 116 - 0
suishenbang-order/src/main/resources/mapper/order/BpmWxNoticeOrgMapper.xml

@@ -0,0 +1,116 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.dgtly.order.mapper.BpmWxNoticeOrgMapper">
+    
+    <resultMap type="BpmWxNoticeOrg" id="BpmWxNoticeOrgResult">
+        <result property="id"    column="id"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="updateTime"    column="update_time"    />
+        <result property="isDelete"    column="is_delete"    />
+        <result property="orgName"    column="org_name"    />
+        <result property="orgCode"    column="org_code"    />
+        <result property="account"    column="account"    />
+        <result property="userName"    column="user_name"    />
+    </resultMap>
+
+    <sql id="selectBpmWxNoticeOrgVo">
+        select id, create_by, create_time, update_by, update_time, is_delete, org_name, org_code, account, user_name from bpm_wx_notice_org
+    </sql>
+
+    <select id="selectBpmWxNoticeOrgList" parameterType="BpmWxNoticeOrg" resultMap="BpmWxNoticeOrgResult">
+        <include refid="selectBpmWxNoticeOrgVo"/>
+        <where>  
+            <if test="isDelete != null "> and is_delete = #{isDelete}</if>
+            <if test="orgName != null  and orgName != ''"> and org_name like concat('%', #{orgName}, '%')</if>
+            <if test="orgCode != null  and orgCode != ''"> and org_code = #{orgCode}</if>
+            <if test="account != null  and account != ''"> and account = #{account}</if>
+            <if test="userName != null  and userName != ''"> and user_name like concat('%', #{userName}, '%')</if>
+        </where>
+    </select>
+    
+    <select id="selectBpmWxNoticeOrgById" parameterType="Long" resultMap="BpmWxNoticeOrgResult">
+        <include refid="selectBpmWxNoticeOrgVo"/>
+        where id = #{id}
+    </select>
+
+    <select id="selectMetaDiySalesorgtreeOrgCode" resultType="java.lang.String">
+        SELECT
+            CASE
+            WHEN Org2name = #{orgName} THEN
+                Org2code
+            WHEN Org3name = #{orgName} THEN
+                Org3code
+            WHEN Org4name = #{orgName} THEN
+                Org4code
+            WHEN Org5name = #{orgName} THEN
+                Org5code
+            WHEN Org6name = #{orgName} THEN
+                Org6code
+            END orgCode
+        FROM
+            meta_diy_salesorgtree
+        LIMIT 1
+    </select>
+    <select id="selectBpmWxNoticeOrgByAccount" resultMap="BpmWxNoticeOrgResult">
+        <include refid="selectBpmWxNoticeOrgVo"/>
+        where account = #{account}
+    </select>
+
+    <insert id="insertBpmWxNoticeOrg" parameterType="BpmWxNoticeOrg" useGeneratedKeys="true" keyProperty="id">
+        insert into bpm_wx_notice_org
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="createBy != null  and createBy != ''">create_by,</if>
+            <if test="createTime != null ">create_time,</if>
+            <if test="updateBy != null  and updateBy != ''">update_by,</if>
+            <if test="updateTime != null ">update_time,</if>
+            <if test="isDelete != null ">is_delete,</if>
+            <if test="orgName != null  and orgName != ''">org_name,</if>
+            <if test="orgCode != null  and orgCode != ''">org_code,</if>
+            <if test="account != null  and account != ''">account,</if>
+            <if test="userName != null  and userName != ''">user_name,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="createBy != null  and createBy != ''">#{createBy},</if>
+            <if test="createTime != null ">#{createTime},</if>
+            <if test="updateBy != null  and updateBy != ''">#{updateBy},</if>
+            <if test="updateTime != null ">#{updateTime},</if>
+            <if test="isDelete != null ">#{isDelete},</if>
+            <if test="orgName != null  and orgName != ''">#{orgName},</if>
+            <if test="orgCode != null  and orgCode != ''">#{orgCode},</if>
+            <if test="account != null  and account != ''">#{account},</if>
+            <if test="userName != null  and userName != ''">#{userName},</if>
+         </trim>
+    </insert>
+
+    <update id="updateBpmWxNoticeOrg" parameterType="BpmWxNoticeOrg">
+        update bpm_wx_notice_org
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="createBy != null  and createBy != ''">create_by = #{createBy},</if>
+            <if test="createTime != null ">create_time = #{createTime},</if>
+            <if test="updateBy != null  and updateBy != ''">update_by = #{updateBy},</if>
+            <if test="updateTime != null ">update_time = #{updateTime},</if>
+            <if test="isDelete != null ">is_delete = #{isDelete},</if>
+            <if test="orgName != null  and orgName != ''">org_name = #{orgName},</if>
+            <if test="orgCode != null  and orgCode != ''">org_code = #{orgCode},</if>
+            <if test="account != null  and account != ''">account = #{account},</if>
+            <if test="userName != null  and userName != ''">user_name = #{userName},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteBpmWxNoticeOrgById" parameterType="Long">
+        delete from bpm_wx_notice_org where id = #{id}
+    </delete>
+
+    <delete id="deleteBpmWxNoticeOrgByIds" parameterType="String">
+        delete from bpm_wx_notice_org where id in 
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+    
+</mapper>

+ 50 - 0
suishenbang-order/src/main/resources/templates/order/wxNoticeOrg/add.html

@@ -0,0 +1,50 @@
+<!DOCTYPE html>
+<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
+<head>
+    <th:block th:include="include :: header('新增企微人员发送')" />
+</head>
+<body class="white-bg">
+    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
+        <form class="form-horizontal m" id="form-wxNoticeOrg-add">
+
+            <div class="form-group">    
+                <label class="col-sm-3 control-label">组织架构名称:</label>
+                <div class="col-sm-8">
+                    <input name="orgName" class="form-control" type="text">
+                </div>
+            </div>
+            <div class="form-group">    
+                <label class="col-sm-3 control-label">组织代码:</label>
+                <div class="col-sm-8">
+                    <input name="orgCode" class="form-control" type="text">
+                </div>
+            </div>
+            <div class="form-group">    
+                <label class="col-sm-3 control-label">用户域账号:</label>
+                <div class="col-sm-8">
+                    <input name="account" class="form-control" type="text">
+                </div>
+            </div>
+            <div class="form-group">    
+                <label class="col-sm-3 control-label">用户姓名:</label>
+                <div class="col-sm-8">
+                    <input name="userName" class="form-control" type="text">
+                </div>
+            </div>
+        </form>
+    </div>
+    <th:block th:include="include :: footer" />
+    <script type="text/javascript">
+        var prefix = ctx + "system/wxNoticeOrg"
+        $("#form-wxNoticeOrg-add").validate({
+            focusCleanup: true
+        });
+
+        function submitHandler() {
+            if ($.validate.form()) {
+                $.operate.save(prefix + "/add", $('#form-wxNoticeOrg-add').serialize());
+            }
+        }
+    </script>
+</body>
+</html>

+ 51 - 0
suishenbang-order/src/main/resources/templates/order/wxNoticeOrg/edit.html

@@ -0,0 +1,51 @@
+<!DOCTYPE html>
+<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
+<head>
+    <th:block th:include="include :: header('修改企微人员发送')" />
+</head>
+<body class="white-bg">
+    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
+        <form class="form-horizontal m" id="form-wxNoticeOrg-edit" th:object="${bpmWxNoticeOrg}">
+            <input name="id" th:field="*{id}" type="hidden">
+
+            <div class="form-group">    
+                <label class="col-sm-3 control-label">组织架构名称:</label>
+                <div class="col-sm-8">
+                    <input name="orgName" th:field="*{orgName}" class="form-control" type="text">
+                </div>
+            </div>
+            <div class="form-group">    
+                <label class="col-sm-3 control-label">组织代码:</label>
+                <div class="col-sm-8">
+                    <input name="orgCode" th:field="*{orgCode}" class="form-control" type="text">
+                </div>
+            </div>
+            <div class="form-group">    
+                <label class="col-sm-3 control-label">用户域账号:</label>
+                <div class="col-sm-8">
+                    <input name="account" th:field="*{account}" class="form-control" type="text">
+                </div>
+            </div>
+            <div class="form-group">    
+                <label class="col-sm-3 control-label">用户姓名:</label>
+                <div class="col-sm-8">
+                    <input name="userName" th:field="*{userName}" class="form-control" type="text">
+                </div>
+            </div>
+        </form>
+    </div>
+    <th:block th:include="include :: footer" />
+    <script type="text/javascript">
+        var prefix = ctx + "system/wxNoticeOrg";
+        $("#form-wxNoticeOrg-edit").validate({
+            focusCleanup: true
+        });
+
+        function submitHandler() {
+            if ($.validate.form()) {
+                $.operate.save(prefix + "/edit", $('#form-wxNoticeOrg-edit').serialize());
+            }
+        }
+    </script>
+</body>
+</html>

+ 126 - 0
suishenbang-order/src/main/resources/templates/order/wxNoticeOrg/wxNoticeOrg.html

@@ -0,0 +1,126 @@
+<!DOCTYPE html>
+<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
+<head>
+    <th:block th:include="include :: header('企微人员发送列表')" />
+</head>
+<body class="gray-bg">
+     <div class="container-div">
+        <div class="row">
+            <div class="col-sm-12 search-collapse">
+                <form id="formId">
+                    <div class="select-list">
+                        <ul>
+
+                            <li>
+                                <p>组织架构名称:</p>
+                                <input type="text" name="orgName"/>
+                            </li>
+                            <li>
+                                <p>组织代码:</p>
+                                <input type="text" name="orgCode"/>
+                            </li>
+                            <li>
+                                <p>用户账号:</p>
+                                <input type="text" name="account"/>
+                            </li>
+                            <li>
+                                <p>用户姓名:</p>
+                                <input type="text" name="userName"/>
+                            </li>
+                            <li>
+                                <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
+                                <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
+                            </li>
+                        </ul>
+                    </div>
+                </form>
+            </div>
+
+            <div class="btn-group-sm" id="toolbar" role="group">
+                <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="order:wxNoticeOrg:add">
+                    <i class="fa fa-plus"></i> 添加
+                </a>
+                <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="order:wxNoticeOrg:edit">
+                    <i class="fa fa-edit"></i> 修改
+                </a>
+                <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="order:wxNoticeOrg:remove">
+                    <i class="fa fa-remove"></i> 删除
+                </a>
+                <a class="btn btn-info" onclick="$.table.importExcel()" shiro:hasPermission="order:wxNoticeOrg:import">
+                    <i class="fa fa-upload"></i> 导入
+                </a>
+                <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:wxNoticeOrg:export">
+                    <i class="fa fa-download"></i> 导出
+                 </a>
+            </div>
+            <div class="col-sm-12 select-table table-striped">
+                <table id="bootstrap-table"></table>
+            </div>
+        </div>
+    </div>
+    <th:block th:include="include :: footer" />
+    <script th:inline="javascript">
+        var editFlag = [[${@permission.hasPermi('order:wxNoticeOrg:edit')}]];
+        var removeFlag = [[${@permission.hasPermi('order:wxNoticeOrg:remove')}]];
+        var prefix = ctx + "order/wxNoticeOrg";
+
+        $(function() {
+            var options = {
+                url: prefix + "/list",
+                createUrl: prefix + "/add",
+                updateUrl: prefix + "/edit/{id}",
+                removeUrl: prefix + "/remove",
+                exportUrl: prefix + "/export",
+                importUrl: prefix + "/importData",
+                modalName: "企微人员发送",
+                columns: [{
+                    checkbox: true
+                },
+                {
+                    field : 'id', 
+                    title : '主键id',
+                    visible: false
+                },
+                {
+                    field : 'orgName', 
+                    title : '组织架构名称'
+                },
+                {
+                    field : 'orgCode', 
+                    title : '组织代码'
+                },
+                {
+                    field : 'account', 
+                    title : '用户域账号'
+                },
+                {
+                    field : 'userName', 
+                    title : '用户姓名'
+                },
+                {
+                    title: '操作',
+                    align: 'center',
+                    formatter: function(value, row, index) {
+                        var actions = [];
+                        actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
+                        actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
+                        return actions.join('');
+                    }
+                }]
+            };
+            $.table.init(options);
+        });
+    </script>
+</body>
+<!-- 导入区域 -->
+<script id="importTpl" type="text/template">
+    <form enctype="multipart/form-data" class="mt20 mb10">
+        <div class="col-xs-offset-1">
+            <input type="file" id="file" name="file"/>
+            <font color="red" class="pull-left mt10">
+                提示:仅允许导入“xls”或“xlsx”格式文件!
+            </font>
+        </div>
+    </form>
+</script>
+</html>