Browse Source

2024.8.26 三、邮件后台任务优化

四、审批规则优化
java8
yuejiayang 2 years ago
parent
commit
b719be6d49
  1. 8
      src/main/java/com/xujie/sys/common/utils/TaskUtils.java
  2. 15
      src/main/java/com/xujie/sys/modules/auth/service/Impl/AuthRuleServiceImpl.java
  3. 6
      src/main/resources/mapper/auth/AuthRuleMapper.xml

8
src/main/java/com/xujie/sys/common/utils/TaskUtils.java

@ -46,10 +46,10 @@ public class TaskUtils {
}
//添加未上传文件邮件通知定時任務
@Scheduled(cron = "${task.data.sendEmail}" )
public void sendEmail() throws MessagingException, UnsupportedEncodingException {
eamProjectService.sendEmail();
}
// @Scheduled(cron = "${task.data.sendEmail}" )
// public void sendEmail() throws MessagingException, UnsupportedEncodingException {
// eamProjectService.sendEmail();
// }
/**
* 读取Modbus数据

15
src/main/java/com/xujie/sys/modules/auth/service/Impl/AuthRuleServiceImpl.java

@ -63,13 +63,14 @@ public class AuthRuleServiceImpl extends ServiceImpl<AuthRuleMapper, AuthRuleDat
@Override
public void authRuleEdit(AuthRuleData data) {
Map<String, Object> map = new HashMap<>();
map.put("site", data.getSite());
map.put("rule_no", data.getRuleNo());
List<AuthRuleData> list = authRuleMapper.selectByMap(map);
if (list.size() > 0) {
throw new RuntimeException("该site下已存在相同的审批规则");
}
// Map<String, Object> map = new HashMap<>();
// map.put("site", data.getSite());
// map.put("bu_no", data.getBuNo());
// map.put("rule_no", data.getRuleNo());
// List<AuthRuleData> list = authRuleMapper.selectByMap(map);
// if (list.size() > 0) {
// throw new RuntimeException("该site下已存在相同的审批规则");
// }
data.setUpdateDate(new Date());
authRuleMapper.updateById(data);

6
src/main/resources/mapper/auth/AuthRuleMapper.xml

@ -21,7 +21,8 @@
create_by,
create_date,
update_by,
update_date
update_date,
CKT_MES_II_REAL.dbo.get_bu_desc(site,bu_no) as buDesc
FROM
auth_rule
WHERE
@ -39,6 +40,9 @@
<if test="query.active != null and query.active != ''">
AND active = #{query.active}
</if>
<if test="query.priority != null and query.priority != ''">
AND priority = #{query.priority}
</if>
ORDER BY id DESC
</select>
</mapper>
Loading…
Cancel
Save