Commit 6fa30d42 by 杨卫

Merge remote-tracking branch 'origin/v5.5.1' into v5.5.1

2 parents f5dc7849 8f5b37ed
...@@ -32,7 +32,7 @@ import java.util.stream.Collectors; ...@@ -32,7 +32,7 @@ import java.util.stream.Collectors;
* @Version 1.0 * @Version 1.0
*/ */
@Slf4j @Slf4j
@ElasticJobConf(name = "DailyReportUnsubmittedSummaryJob", cron = "0 23 * * * ?", description = "工作日报未填写统计推送", overwrite = false) @ElasticJobConf(name = "DailyReportUnsubmittedSummaryJob", cron = "0 0 23 * * ?", description = "工作日报未填写统计推送", overwrite = false)
public class DailyReportUnsubmittedSummaryJob implements SimpleJob { public class DailyReportUnsubmittedSummaryJob implements SimpleJob {
@Autowired @Autowired
...@@ -83,7 +83,7 @@ public class DailyReportUnsubmittedSummaryJob implements SimpleJob { ...@@ -83,7 +83,7 @@ public class DailyReportUnsubmittedSummaryJob implements SimpleJob {
Integer count = 0; Integer count = 0;
String unsubmittedStaffName = "无"; String unsubmittedStaffName = "无";
DigitalManagementStaffRecordDTO staffRecordDTO = new DigitalManagementStaffRecordDTO(); DigitalManagementStaffRecordDTO staffRecordDTO = new DigitalManagementStaffRecordDTO();
staffRecordDTO.setTemplateCode(templateService.getRegionalTemplateCode()); staffRecordDTO.setTemplateCode(templateCode);
staffRecordDTO.setStartTime(DateUtils.getStartTimeOfDay(new Date())); staffRecordDTO.setStartTime(DateUtils.getStartTimeOfDay(new Date()));
staffRecordDTO.setEndTime(new Date()); staffRecordDTO.setEndTime(new Date());
// 今日未提交员工 // 今日未提交员工
......
...@@ -24,7 +24,7 @@ public interface DigitalManagementTemplateMapper extends OreMapper<DigitalManage ...@@ -24,7 +24,7 @@ public interface DigitalManagementTemplateMapper extends OreMapper<DigitalManage
* @param date * @param date
* @return * @return
*/ */
DigitalManagementTemplate queryUserTemplate(@Param("uuid") String uuid, @Param("date") Date date); DigitalManagementTemplate queryUserTemplate(@Param("uuid") String uuid, @Param("date") Date date, @Param("excludeTempCode") String excludeTempCode);
/** /**
* 查找用户指定日期关联的模板 * 查找用户指定日期关联的模板
......
...@@ -251,7 +251,7 @@ public class DigitalManagementStaffRecordService { ...@@ -251,7 +251,7 @@ public class DigitalManagementStaffRecordService {
private DigitalManagementStaffRecordDTO getStaffRecordTemplateInfo(Integer loginRole, String uuid, Date date, String templateCode) { private DigitalManagementStaffRecordDTO getStaffRecordTemplateInfo(Integer loginRole, String uuid, Date date, String templateCode) {
DigitalManagementTemplate template; DigitalManagementTemplate template;
if (StringUtils.isBlank(templateCode)) { if (StringUtils.isNotBlank(templateCode)) {
template = templateMapper.findByCode(templateCode); template = templateMapper.findByCode(templateCode);
}else { }else {
template = templateService.getTemplateByStaffUuid(loginRole, uuid, date); template = templateService.getTemplateByStaffUuid(loginRole, uuid, date);
......
...@@ -514,7 +514,8 @@ public class DigitalManagementTemplateService { ...@@ -514,7 +514,8 @@ public class DigitalManagementTemplateService {
switch (loginRole){ switch (loginRole){
// 区域运营角色,查询圈人 // 区域运营角色,查询圈人
case DigitalManagementConstants.LOGIN_ROLE_REGIONAL_SUPERVISION: case DigitalManagementConstants.LOGIN_ROLE_REGIONAL_SUPERVISION:
DigitalManagementTemplate template = templateMapper.queryUserTemplate(uuid, date); // 排除一下轻改日报模板
DigitalManagementTemplate template = templateMapper.queryUserTemplate(uuid, date, getLightChangeTemplateCode());
if (template == null) { if (template == null) {
return null; return null;
} }
......
...@@ -84,6 +84,9 @@ ...@@ -84,6 +84,9 @@
SELECT r2.template_code as template_code, max(r2.id) as id SELECT r2.template_code as template_code, max(r2.id) as id
FROM digital_management_template_staff_ref r2 FROM digital_management_template_staff_ref r2
where r2.deleted_flag = 'N' where r2.deleted_flag = 'N'
<if test="excludeTempCode != null and excludeTempCode != ''">
and r2.template_code != #{excludeTempCode}
</if>
and r2.effective_date &lt;= date(#{date}) and r2.effective_date &lt;= date(#{date})
group by r2.template_code group by r2.template_code
) temp on temp.template_code = r1.template_code ) temp on temp.template_code = r1.template_code
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!