diff --git a/README.md b/README.md index 30f2f9f..fd8aef6 100644 --- a/README.md +++ b/README.md @@ -129,7 +129,7 @@ V1.4 2021-03-28 V1.5 2021-05-05 - 1.0 集成开源积木报表 - - 可在线设计各类报表(表格类报表和图表类报表)。 + - 可在线设计各类报表(表格类报表和图表类报表) - 2.0 新增业务管理模块 - 新增客户准入流程,添加客户流入客户公海,发起准入流程,准入客户进入客户私海,可业务员拜访跟进,未准入客户进入黑名单 - 原数据大屏并入业务管理 @@ -137,6 +137,7 @@ V1.5 2021-05-05 - 4.0 在线邮件更改为站内邮件,不在调用邮件发送功能,便于系统内用户沟通,跟进业务 - 5.0 修复流程父角色查询所属子角色异常情况 - 6.0 修复添加用户时部门树筛选异常 + - 7.0 新增Snow社区在线文档(地址见友情链接) ## 未来规划 @@ -160,6 +161,7 @@ V1.5 2021-05-05 ## 友情链接 - 博客:http://snowblog.shop.csj361.com - 若依:http://ruoyi.vip + - 在线文档:http://47.114.7.28:9527 ## 最后,特别感谢若依系统提供框架 diff --git a/pom.xml b/pom.xml index 593be10..ea09455 100644 --- a/pom.xml +++ b/pom.xml @@ -28,7 +28,7 @@ 3.9.1 2.5 1.3.3 - 3.17 + 4.1.2 1.7 6.4.1 dingtalk-SNAPSHOT diff --git a/snow-admin/pom.xml b/snow-admin/pom.xml index adb41d0..4f1d247 100644 --- a/snow-admin/pom.xml +++ b/snow-admin/pom.xml @@ -22,11 +22,6 @@ org.springframework.boot spring-boot-starter-thymeleaf - - org.apache.commons - commons-lang3 - 3.10 - org.jeecgframework.jimureport diff --git a/snow-admin/src/main/java/com/snow/web/controller/dingtalk/ThirdOauthController.java b/snow-admin/src/main/java/com/snow/web/controller/dingtalk/ThirdOauthController.java index 651c4d4..e243940 100644 --- a/snow-admin/src/main/java/com/snow/web/controller/dingtalk/ThirdOauthController.java +++ b/snow-admin/src/main/java/com/snow/web/controller/dingtalk/ThirdOauthController.java @@ -73,37 +73,33 @@ public class ThirdOauthController extends BaseController { { String appId= iSysConfigService.selectConfigByKey("ding.login.appid"); String appSecret= iSysConfigService.selectConfigByKey("ding.login.appSecret"); - String url="http://workflow.vaiwan.com/third/oauth/dingTalkLogin"; + String redirectUri= iSysConfigService.selectConfigByKey("ding.login.redirectUri"); AuthRequest authRequest = new AuthDingTalkRequest(AuthConfig.builder() .clientId(appId) .clientSecret(appSecret) - .redirectUri(url) + .redirectUri(redirectUri) .build()); String authorizeUrl = authRequest.authorize(AuthStateUtils.createState()); ServletUtils.getResponse().sendRedirect(authorizeUrl); } /** - * 回调结果 + * 钉钉回调 */ @SuppressWarnings("unchecked") @GetMapping("/dingTalkLogin") - public Object callbackAuth(@PathVariable("source") String source, AuthCallback callback, HttpServletRequest request) + public Object callbackAuth(AuthCallback callback, HttpServletRequest request) { - if (StringUtils.isEmpty(source)) - { - return new ModelAndView("error/unauth"); - } - + String source="dingtalk"; String appId= iSysConfigService.selectConfigByKey("ding.login.appid"); String appSecret= iSysConfigService.selectConfigByKey("ding.login.appSecret"); - String url="http://workflow.vaiwan.com/third/oauth/dingTalkLogin"; + String redirectUri= iSysConfigService.selectConfigByKey("ding.login.redirectUri"); AuthRequest authRequest = new AuthDingTalkRequest(AuthConfig.builder() .clientId(appId) .clientSecret(appSecret) - .redirectUri(url) + .redirectUri(redirectUri) .build()); AuthResponse response = authRequest.login(callback); if (response.ok()) @@ -121,7 +117,7 @@ public class ThirdOauthController extends BaseController { authUser.setUuid(source + response.getData().getUuid()); authUser.setUserId(ShiroUtils.getUserId()); authUser.setUserName(response.getData().getNickname()); - authUser.setLoginName(response.getData().getUsername()); + authUser.setLoginName(ShiroUtils.getLoginName()); authUser.setEmail(response.getData().getEmail()); authUser.setSource(source); userMapper.insertAuthUser(authUser); diff --git a/snow-admin/src/main/java/com/snow/web/controller/system/SysOaRegionController.java b/snow-admin/src/main/java/com/snow/web/controller/system/SysOaRegionController.java index 600972b..bb0b0ca 100644 --- a/snow-admin/src/main/java/com/snow/web/controller/system/SysOaRegionController.java +++ b/snow-admin/src/main/java/com/snow/web/controller/system/SysOaRegionController.java @@ -2,6 +2,7 @@ package com.snow.web.controller.system; import java.util.List; +import com.snow.common.core.page.TableDataInfo; import com.snow.system.domain.RegionTreeVO; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.beans.factory.annotation.Autowired; @@ -41,7 +42,7 @@ public class SysOaRegionController extends BaseController @GetMapping() public String region() { - return prefix + "/region"; + return prefix + "/area"; } /** @@ -50,10 +51,18 @@ public class SysOaRegionController extends BaseController @RequiresPermissions("system:region:list") @PostMapping("/list") @ResponseBody - public List list(SysOaRegion sysOaRegion) + public TableDataInfo list(SysOaRegion sysOaRegion) { - List list = sysOaRegionService.selectSysOaRegionList(sysOaRegion); - return list; + startPage(); + if(StringUtils.isEmpty(sysOaRegion.getName())){ + List list = sysOaRegionService.selectSysOaRegionList(sysOaRegion); + return getDataTable(list); + }else { + SysOaRegion sysOaRegionName=new SysOaRegion(); + sysOaRegionName.setName(sysOaRegion.getName()); + List list = sysOaRegionService.selectSysOaRegionList(sysOaRegionName); + return getDataTable(list); + } } /** @@ -73,7 +82,7 @@ public class SysOaRegionController extends BaseController /** * 新增地区 */ - @GetMapping(value = { "/add/{code}", "/add/" }) + @GetMapping(value = { "/add/{code}", "/add" }) public String add(@PathVariable(value = "code", required = false) Long code, ModelMap mmap) { if (StringUtils.isNotNull(code)) diff --git a/snow-admin/src/main/java/com/snow/web/controller/system/SysProfileController.java b/snow-admin/src/main/java/com/snow/web/controller/system/SysProfileController.java index d5ae6a5..c40441a 100644 --- a/snow-admin/src/main/java/com/snow/web/controller/system/SysProfileController.java +++ b/snow-admin/src/main/java/com/snow/web/controller/system/SysProfileController.java @@ -1,6 +1,8 @@ package com.snow.web.controller.system; +import com.snow.common.core.page.TableDataInfo; import com.snow.framework.storage.StorageService; +import com.snow.system.domain.SysAuthUser; import com.snow.system.domain.SysFile; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -25,6 +27,8 @@ import com.snow.framework.util.ShiroUtils; import com.snow.system.domain.SysUser; import com.snow.system.service.ISysUserService; +import java.util.List; + /** * 个人信息 业务处理 * @@ -55,11 +59,20 @@ public class SysProfileController extends BaseController { SysUser user = ShiroUtils.getSysUser(); mmap.put("user", user); + mmap.put("auths", userService.selectAuthUserListByUserId(user.getUserId())); mmap.put("roleGroup", userService.selectUserRoleGroup(user.getUserId())); mmap.put("postGroup", userService.selectUserPostGroup(user.getUserId())); return prefix + "/profile"; } + @PostMapping("/list") + @ResponseBody + public TableDataInfo getAuthUserList(){ + SysUser user = ShiroUtils.getSysUser(); + List sysAuthUsers = userService.selectAuthUserListByUserId(user.getUserId()); + return getDataTable(sysAuthUsers); + } + @GetMapping("/checkPassword") @ResponseBody public boolean checkPassword(String password) diff --git a/snow-admin/src/main/java/com/snow/web/controller/system/SysSyncLogController.java b/snow-admin/src/main/java/com/snow/web/controller/system/SysSyncLogController.java index e056555..11724ae 100644 --- a/snow-admin/src/main/java/com/snow/web/controller/system/SysSyncLogController.java +++ b/snow-admin/src/main/java/com/snow/web/controller/system/SysSyncLogController.java @@ -67,7 +67,6 @@ public class SysSyncLogController extends BaseController ExcelUtil util = new ExcelUtil(SysDingtalkSyncLog.class); return util.exportExcel(list, "log"); } - /** * 新增钉钉同步日志记录 */ diff --git a/snow-admin/src/main/resources/application-druid.yml b/snow-admin/src/main/resources/application-druid.yml index d650d32..e12ba98 100644 --- a/snow-admin/src/main/resources/application-druid.yml +++ b/snow-admin/src/main/resources/application-druid.yml @@ -6,9 +6,9 @@ spring: druid: # 主库数据源 master: - url: jdbc:mysql://localhost:3306/snow-dev?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8 - username: root - password: root + url: jdbc:mysql://rm-bp1j1554xv1qs04295o.mysql.rds.aliyuncs.com:3306/snow-dev?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8 + username: cloud_root + password: Jin!152377 # 从库数据源 slave: # 从数据源开关/默认关闭 diff --git a/snow-admin/src/main/resources/static/img/dingtalk.png b/snow-admin/src/main/resources/static/img/dingtalk.png deleted file mode 100644 index a30c7e5..0000000 Binary files a/snow-admin/src/main/resources/static/img/dingtalk.png and /dev/null differ diff --git a/snow-admin/src/main/resources/static/ruoyi/js/common.js b/snow-admin/src/main/resources/static/ruoyi/js/common.js index 59a14d2..c093992 100644 --- a/snow-admin/src/main/resources/static/ruoyi/js/common.js +++ b/snow-admin/src/main/resources/static/ruoyi/js/common.js @@ -103,7 +103,53 @@ $(function() { }); }); } - + //时间 带时分秒的 + if ($(".datetime-input").length > 0) { + layui.use('laydate', function () { + var com = layui.laydate; + $(".datetime-input").each(function (index, item) { + var time = $(item); + // 控制控件外观 + var type = time.attr("data-type") || 'datetime'; + // 控制回显格式 + var format = time.attr("data-format") || 'yyyy-MM-dd HH:mm:ss'; + // 控制日期控件按钮 + var buttons = time.attr("data-btn") || 'clear|now|confirm', newBtnArr = []; + // 日期控件选择完成后回调处理 + var callback = time.attr("data-callback") || {}; + if (buttons) { + if (buttons.indexOf("|") > 0) { + var btnArr = buttons.split("|"), btnLen = btnArr.length; + for (var j = 0; j < btnLen; j++) { + if ("clear" === btnArr[j] || "now" === btnArr[j] || "confirm" === btnArr[j]) { + newBtnArr.push(btnArr[j]); + } + } + } else { + if ("clear" === buttons || "now" === buttons || "confirm" === buttons) { + newBtnArr.push(buttons); + } + } + } else { + newBtnArr = ['clear', 'now', 'confirm']; + } + com.render({ + elem: item, + theme: 'molv', + trigger: 'click', + type: type, + format: format, + btns: newBtnArr, + done: function (value, data) { + if (typeof window[callback] != 'undefined' + && window[callback] instanceof Function) { + window[callback](value, data); + } + } + }); + }); + }); + } // laydate time-input 时间控件绑定 if ($(".time-input").length > 0) { layui.use('laydate', function () { diff --git a/snow-admin/src/main/resources/templates/system/customer/edit.html b/snow-admin/src/main/resources/templates/system/customer/edit.html index ac51f01..a09afb1 100644 --- a/snow-admin/src/main/resources/templates/system/customer/edit.html +++ b/snow-admin/src/main/resources/templates/system/customer/edit.html @@ -32,12 +32,14 @@
+ -
diff --git a/snow-admin/src/main/resources/templates/system/leave/add.html b/snow-admin/src/main/resources/templates/system/leave/add.html index 4cdb4fe..46b45ee 100644 --- a/snow-admin/src/main/resources/templates/system/leave/add.html +++ b/snow-admin/src/main/resources/templates/system/leave/add.html @@ -17,15 +17,15 @@
- +
- - + +
@@ -33,8 +33,9 @@
- - + + +
diff --git a/snow-admin/src/main/resources/templates/system/leave/edit.html b/snow-admin/src/main/resources/templates/system/leave/edit.html index 468a03a..b18d532 100644 --- a/snow-admin/src/main/resources/templates/system/leave/edit.html +++ b/snow-admin/src/main/resources/templates/system/leave/edit.html @@ -1,7 +1,7 @@ - + @@ -18,22 +18,22 @@
- +
- +
- - + +
@@ -41,8 +41,7 @@
- - +
@@ -59,7 +58,7 @@
- +
@@ -108,6 +107,8 @@ $(this).fileinput('_initFileActions'); }); + + function formatBetweenTime(date1,date2) { var date3 = date2.getTime() - date1.getTime() //时间差的毫秒数 console.log(date3) @@ -131,15 +132,10 @@ \ No newline at end of file diff --git a/snow-admin/src/main/resources/templates/system/log/log.html b/snow-admin/src/main/resources/templates/system/log/log.html index 8e3384f..2e8be5f 100644 --- a/snow-admin/src/main/resources/templates/system/log/log.html +++ b/snow-admin/src/main/resources/templates/system/log/log.html @@ -38,16 +38,16 @@
  • -
  • - + - - +
  •  搜索 @@ -145,10 +145,10 @@ field: 'deptName', title: '部门名称' }, - { + /* { field: 'operIp', title: '主机地址' - }, + },*/ { field: 'operLocation', title: '操作地点' @@ -175,10 +175,10 @@ align: 'center', formatter: function(value, row, index) { var actions = []; - if(row.status==1){ + /* if(row.status==1){ actions.push('手工同步 '); } - +*/ actions.push('删除 '); diff --git a/snow-admin/src/main/resources/templates/system/region/area.html b/snow-admin/src/main/resources/templates/system/region/area.html new file mode 100644 index 0000000..31a7b2c --- /dev/null +++ b/snow-admin/src/main/resources/templates/system/region/area.html @@ -0,0 +1,160 @@ + + + + + + + + +
    +
    +
    +
    + 省市区 +
    +
    + + + + +
    +
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    + + +
    + +
    +
    +
    + + + +
    +
    +
    +
    +
    +
    + + + + + + \ No newline at end of file diff --git a/snow-admin/src/main/resources/templates/system/user/profile/profile.html b/snow-admin/src/main/resources/templates/system/user/profile/profile.html index 7acd18f..75d127d 100644 --- a/snow-admin/src/main/resources/templates/system/user/profile/profile.html +++ b/snow-admin/src/main/resources/templates/system/user/profile/profile.html @@ -148,14 +148,9 @@

    你可以绑定以下第三方帐号用于DingFlow系统

    - - + + DingTalk - - WeiXin @@ -329,9 +324,8 @@ // 第三方授权列表 $(function() { - var auths = [[${auths}]] var options = { - data: auths, + url:"/system/user/profile/list", sidePagination: "client", showSearch: false, showRefresh: false, @@ -374,6 +368,8 @@ }] }; $.table.init(options); + + }); // 解除绑定 @@ -381,7 +377,7 @@ $.modal.confirm("您确定要解除" + source + "的账号绑定吗?", function() { $.ajax({ type: "post", - url: ctx + "/third/oauth/unlock", + url: "/third/oauth/unlock", data: { "authId": authId }, success: function(r) { if (r.code == web_status.SUCCESS) { diff --git a/snow-common/pom.xml b/snow-common/pom.xml index 31f686d..560a244 100644 --- a/snow-common/pom.xml +++ b/snow-common/pom.xml @@ -149,6 +149,14 @@ org.apache.httpcomponents httpclient + + + + commons-lang + commons-lang + 2.6 + + \ No newline at end of file diff --git a/snow-common/src/main/java/com/snow/common/enums/DingTalkListenerType.java b/snow-common/src/main/java/com/snow/common/enums/DingTalkListenerType.java index e41b4f5..178b2b1 100644 --- a/snow-common/src/main/java/com/snow/common/enums/DingTalkListenerType.java +++ b/snow-common/src/main/java/com/snow/common/enums/DingTalkListenerType.java @@ -7,6 +7,7 @@ package com.snow.common.enums; * @date 2020/9/18 10:18 */ public enum DingTalkListenerType { + DEPARTMENT_CREATE(1, 2,"org_dept_create"), DEPARTMENT_UPDATE(2, 2,"org_dept_modify"), @@ -17,7 +18,7 @@ public enum DingTalkListenerType { USER_DELETE(3,1,"user_leave_org"), - CALL_BACK_CHECK_URL(1,10, "check_url"), + CALL_BACK_CHECK_URL(1,10, "回调check_url"), CALL_BACK_REGISTER(1,10, "回调注册"), diff --git a/snow-flowable/src/main/java/com/snow/flowable/listener/common/SendMessageEventLister.java b/snow-flowable/src/main/java/com/snow/flowable/listener/common/SendMessageEventLister.java index 567a311..06e12e5 100644 --- a/snow-flowable/src/main/java/com/snow/flowable/listener/common/SendMessageEventLister.java +++ b/snow-flowable/src/main/java/com/snow/flowable/listener/common/SendMessageEventLister.java @@ -145,7 +145,7 @@ public class SendMessageEventLister extends AbstractEventListener { //根据任务ID获取任务获选人 - TaskEntity entity = (TaskEntity) event.getEntity(); + /* TaskEntity entity = (TaskEntity) event.getEntity(); Set flowCandidates = getFlowCandidates(entity); if(CollectionUtils.isNotEmpty(flowCandidates)){ MessageEventDTO messageEventDTO=new MessageEventDTO(MessageEventType.TASK_TODO.getCode()); @@ -153,7 +153,7 @@ public class SendMessageEventLister extends AbstractEventListener { messageEventDTO.setMessageEventType(MessageEventType.TASK_TODO); messageEventDTO.setMessageOutsideId(entity.getId()); applicationContext.publishEvent(messageEventDTO); - } + }*/ } diff --git a/snow-system/src/main/java/com/snow/system/domain/SysDingtalkSyncLog.java b/snow-system/src/main/java/com/snow/system/domain/SysDingtalkSyncLog.java index 7a8ce5f..6278d19 100644 --- a/snow-system/src/main/java/com/snow/system/domain/SysDingtalkSyncLog.java +++ b/snow-system/src/main/java/com/snow/system/domain/SysDingtalkSyncLog.java @@ -33,7 +33,7 @@ public class SysDingtalkSyncLog extends BaseEntity private String title; /** 模块类型(0其它 1用户 2部门 3角色 10回调) */ - @Excel(name = "模块类型", readConverterExp = "0=其它,1=用户,2=部门,3=角色,1=0回调") + @Excel(name = "模块类型", readConverterExp = "0=其它,1=用户,2=部门,3=角色,1=回调") private Integer moduleType; /** 业务类型(0其它 1新增 2修改 3删除) */ diff --git a/snow-system/src/main/java/com/snow/system/domain/SysOaLeave.java b/snow-system/src/main/java/com/snow/system/domain/SysOaLeave.java index 2982b84..957d63e 100644 --- a/snow-system/src/main/java/com/snow/system/domain/SysOaLeave.java +++ b/snow-system/src/main/java/com/snow/system/domain/SysOaLeave.java @@ -22,7 +22,9 @@ public class SysOaLeave extends BaseEntity /** id */ private Integer id; - + /** 请假单号 */ + @Excel(name = "请假单号") + private String leaveNo; /** 请假名称 */ @Excel(name = "请假名称") private String name; @@ -32,17 +34,17 @@ public class SysOaLeave extends BaseEntity private String reason; /** 开始时间 */ - @Excel(name = "开始时间", width = 30, dateFormat = "yyyy-MM-dd") + @Excel(name = "开始时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") private Date startTime; /** 结束时间 */ - @Excel(name = "结束时间", width = 30, dateFormat = "yyyy-MM-dd") + @Excel(name = "结束时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") private Date endTime; /** 流程状态(0--待审批,1-审批中,2--审批通过,3--已驳回) */ - @Excel(name = "流程状态", readConverterExp = "0=--待审批,1-审批中,2--审批通过,3--已驳回") + @Excel(name = "流程状态", readConverterExp = "0=待审批,1=审批中,2=审批通过,3=已驳回") private Integer processStatus; /** 流程实例ID */ @@ -59,9 +61,7 @@ public class SysOaLeave extends BaseEntity /** 附件 */ @Excel(name = "附件") private String fileUrl; - /** 请假单号 */ - @Excel(name = "请假单号") - private String leaveNo; + /** * 请假时长 */ diff --git a/snow-system/src/main/java/com/snow/system/mapper/SysUserMapper.java b/snow-system/src/main/java/com/snow/system/mapper/SysUserMapper.java index 3cfea29..0e538a2 100644 --- a/snow-system/src/main/java/com/snow/system/mapper/SysUserMapper.java +++ b/snow-system/src/main/java/com/snow/system/mapper/SysUserMapper.java @@ -167,7 +167,7 @@ public interface SysUserMapper /** * 根据用户编号查询授权列表 * - * @param loginName 登录账户 + * @param userId 登录账户 * @return 授权列表 */ public List selectAuthUserListByUserId(Long userId); diff --git a/snow-system/src/main/resources/mapper/system/SysDingtalkSyncLogMapper.xml b/snow-system/src/main/resources/mapper/system/SysDingtalkSyncLogMapper.xml index 6628610..400258e 100644 --- a/snow-system/src/main/resources/mapper/system/SysDingtalkSyncLogMapper.xml +++ b/snow-system/src/main/resources/mapper/system/SysDingtalkSyncLogMapper.xml @@ -47,7 +47,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and status = #{status} and oper_time = #{operTime} and log_type = #{logType} + + AND date_format(oper_time,'%y%m%d') >= date_format(#{params.beginTime},'%y%m%d') + + + AND date_format(oper_time,'%y%m%d') <= date_format(#{params.endTime},'%y%m%d') + + order by oper_time desc