Commit 205a5162 authored by zhuxiang's avatar zhuxiang
Browse files

优化

parent 09ff5406
......@@ -6,16 +6,10 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.platform.utils.StringUtils;
import com.ruzhoukj.sms.common.Constant;
import com.ruzhoukj.sms.dao.ReportDataInfoDao;
import com.ruzhoukj.sms.entity.DeptEntity;
import com.ruzhoukj.sms.entity.ReportDataInfoEntity;
import com.ruzhoukj.sms.entity.UserEntity;
import com.ruzhoukj.sms.entity.UserPerformanceEntity;
import com.ruzhoukj.sms.entity.*;
import com.ruzhoukj.sms.model.dto.ReportDataInfoDTO;
import com.ruzhoukj.sms.model.vo.ReportDataInfoVO;
import com.ruzhoukj.sms.service.DeptService;
import com.ruzhoukj.sms.service.ReportDataInfoService;
import com.ruzhoukj.sms.service.UserPerformanceService;
import com.ruzhoukj.sms.service.UserService;
import com.ruzhoukj.sms.service.*;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
......@@ -40,6 +34,8 @@ public class ReportDataInfoServiceImpl extends ServiceImpl<ReportDataInfoDao, Re
private ReportDataInfoService reportDataInfoService;
@Resource
private UserPerformanceService userPerformanceService;
@Resource
private ReportTemplateService reportTemplateService;
@Override
public List<ReportDataInfoVO> queryList(ReportDataInfoDTO reportDataInfoDTO) {
......@@ -48,6 +44,9 @@ public class ReportDataInfoServiceImpl extends ServiceImpl<ReportDataInfoDao, Re
@Override
public void countPerformance(ReportDataInfoEntity reportDataInfoEntity) {
//查看模板信息
ReportTemplateEntity reportTemplateEntity = reportTemplateService.getById(reportDataInfoEntity.getTemplateId());
if(reportTemplateEntity != null && reportTemplateEntity.getType().equals("绩效")) {
//查看已填写完成,未计算的绩效
String content = reportDataInfoEntity.getAllContent();
// 解析JSON字符串为JSONArray
......@@ -94,12 +93,14 @@ public class ReportDataInfoServiceImpl extends ServiceImpl<ReportDataInfoDao, Re
userPerformanceEntity.setReportDataId(reportDataInfoEntity.getId());
userPerformanceService.save(userPerformanceEntity);
reportDataInfoEntity.setStatus("4");
reportDataInfoEntity.setId(reportDataInfoEntity.getId());
reportDataInfoService.updateById(reportDataInfoEntity);
}
} else {
System.out.println("No data available in the JSON array.");
}
}else{
reportDataInfoEntity.setStatus("3");
}
reportDataInfoService.updateById(reportDataInfoEntity);
}
/**
......@@ -136,7 +137,7 @@ public class ReportDataInfoServiceImpl extends ServiceImpl<ReportDataInfoDao, Re
public boolean submit(String id) {
//查看信息
ReportDataInfoEntity reportDataInfoEntity = getById(id);
if (reportDataInfoEntity != null) {
if (reportDataInfoEntity == null) {
return Boolean.FALSE;
}
//查看被处理人信息
......
......@@ -13,7 +13,7 @@
r.year year,
r.month month,
r.key_value keyValue,
r.
r.actor_user actorUser,
u.name userName,
r.status status
from
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment