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

优化

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