|
@@ -1117,6 +1117,25 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
|
|
|
//删除日报的日志
|
|
|
reportLogMapper.delete(new QueryWrapper<ReportLog>().eq("creator_id", userId).eq("create_date", date));
|
|
|
}
|
|
|
+ if(company.getId()==862){
|
|
|
+ String url = "http://183.194.0.98:3202/api/web-server/controlCenter/billRejected";
|
|
|
+ HttpHeaders headers = new HttpHeaders();
|
|
|
+ headers.setContentType(MediaType.APPLICATION_JSON);
|
|
|
+ headers.add("token",getTokenOfYiWei());
|
|
|
+ JSONObject body=new JSONObject();
|
|
|
+ body.put("type","EXPENSE");
|
|
|
+ body.put("billNo","GS"+reportList.get(0).getCreatorId()+reportList.get(0).getCreateDate());
|
|
|
+ HttpEntity<String> requestEntity = new HttpEntity<String>(body.toJSONString(), headers);
|
|
|
+ ResponseEntity<String> responseEntity = this.restTemplate.exchange(url,
|
|
|
+ HttpMethod.POST, requestEntity, String.class);
|
|
|
+ if (responseEntity.getStatusCode() == HttpStatus.OK) {
|
|
|
+ String resp = responseEntity.getBody();
|
|
|
+ JSONObject json = JSONObject.parseObject(resp);
|
|
|
+ if(json.getIntValue("status")==0){
|
|
|
+ JSONArray jsonArray = json.getJSONArray("data");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
return httpRespMsg;
|
|
|
}
|
|
|
|
|
@@ -1669,7 +1688,7 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
|
|
|
if (updateReportList.size() > 0) {
|
|
|
updateBatchById(updateReportList);
|
|
|
}
|
|
|
-/* if(company.getId()==862){
|
|
|
+ if(company.getId()==862){
|
|
|
String url = "http://183.194.0.98:3202/api/web-server/controlCenter/billApproved";
|
|
|
HttpHeaders headers = new HttpHeaders();
|
|
|
headers.setContentType(MediaType.APPLICATION_JSON);
|
|
@@ -1687,7 +1706,7 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
|
|
|
JSONArray jsonArray = json.getJSONArray("data");
|
|
|
}
|
|
|
}
|
|
|
- }*/
|
|
|
+ }
|
|
|
}else if(timeType.getReportAuditType() == 5){
|
|
|
List<Report> updateReportList = new ArrayList<>();
|
|
|
//项目所属BU审核
|
|
@@ -2180,7 +2199,7 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
|
|
|
}
|
|
|
updateBatchById(newList);
|
|
|
}
|
|
|
-/* if(company.getId()==862){
|
|
|
+ if(company.getId()==862){
|
|
|
String url = "http://183.194.0.98:3202/api/web-server/controlCenter/billRejected";
|
|
|
HttpHeaders headers = new HttpHeaders();
|
|
|
headers.setContentType(MediaType.APPLICATION_JSON);
|
|
@@ -2198,7 +2217,7 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
|
|
|
JSONArray jsonArray = json.getJSONArray("data");
|
|
|
}
|
|
|
}
|
|
|
- }*/
|
|
|
+ }
|
|
|
List<Integer> collect = rList.stream().map(Report::getProjectId).collect(Collectors.toList());
|
|
|
List<Project> projectList = projectMapper.selectList(new QueryWrapper<Project>().in("id", collect));
|
|
|
String pNames = projectList.stream().map(Project::getProjectName).collect(Collectors.joining(", ", "[", "]"));
|
|
@@ -3236,6 +3255,7 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
|
|
|
List<Integer> ids = ListUtil.convertIntegerIdsArrayToList(reportIds);
|
|
|
int cnt = 0;
|
|
|
List<SysRichFunction> functionList = sysFunctionMapper.getRoleFunctions(user.getRoleId(), "审核全员日报");
|
|
|
+ List<Report> reportList = reportMapper.selectList(new QueryWrapper<Report>().in("id", ids));
|
|
|
for (Integer reportId : ids) {
|
|
|
Report report = new Report();
|
|
|
report.setState(3);//待提交,即草稿状态
|
|
@@ -3258,6 +3278,25 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ if(user.getCompanyId()==862){
|
|
|
+ String url = "http://183.194.0.98:3202/api/web-server/controlCenter/billRejected";
|
|
|
+ HttpHeaders headers = new HttpHeaders();
|
|
|
+ headers.setContentType(MediaType.APPLICATION_JSON);
|
|
|
+ headers.add("token",getTokenOfYiWei());
|
|
|
+ JSONObject body=new JSONObject();
|
|
|
+ body.put("type","EXPENSE");
|
|
|
+ body.put("billNo","GS"+reportList.get(0).getCreatorId()+reportList.get(0).getCreateDate());
|
|
|
+ HttpEntity<String> requestEntity = new HttpEntity<String>(body.toJSONString(), headers);
|
|
|
+ ResponseEntity<String> responseEntity = this.restTemplate.exchange(url,
|
|
|
+ HttpMethod.POST, requestEntity, String.class);
|
|
|
+ if (responseEntity.getStatusCode() == HttpStatus.OK) {
|
|
|
+ String resp = responseEntity.getBody();
|
|
|
+ JSONObject json = JSONObject.parseObject(resp);
|
|
|
+ if(json.getIntValue("status")==0){
|
|
|
+ JSONArray jsonArray = json.getJSONArray("data");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
if (cnt == 0) {
|
|
|
//msg.setError("只有待审核状态的报告才能撤回");
|
|
|
msg.setError(MessageUtils.message("finance.revokeReport"));
|
|
@@ -4480,16 +4519,16 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
|
|
|
if(first.isPresent()){
|
|
|
if(audit.getMsg().contains("提交了")){
|
|
|
int i = audit.getMsg().indexOf("提");
|
|
|
- String substring = audit.getMsg().substring(0, i + 1);
|
|
|
- msg = time+" " + audit.getMsg().replaceAll(substring,"$userName"+first.get().getCorpwxUserid()+"$");
|
|
|
+ String substring = audit.getMsg().substring(0, i);
|
|
|
+ msg = time+" " + audit.getMsg().replaceAll(substring,"\\$userName="+first.get().getCorpwxUserid()+"\\$");
|
|
|
}else if(audit.getMsg().contains("审核通过了")){
|
|
|
int i = audit.getMsg().indexOf("审");
|
|
|
- String substring = audit.getMsg().substring(0, i + 1);
|
|
|
- msg = time+" " + audit.getMsg().replaceAll(substring,"$userName"+first.get().getCorpwxUserid()+"$");
|
|
|
+ String substring = audit.getMsg().substring(0, i);
|
|
|
+ msg = time+" " + audit.getMsg().replaceAll(substring,"\\$userName="+first.get().getCorpwxUserid()+"\\$");
|
|
|
}else if(audit.getMsg().contains("驳回了")) {
|
|
|
int i = audit.getMsg().indexOf("驳");
|
|
|
- String substring = audit.getMsg().substring(0, i + 1);
|
|
|
- msg = time+" " + audit.getMsg().replaceAll(substring,"$userName"+first.get().getCorpwxUserid()+"$");
|
|
|
+ String substring = audit.getMsg().substring(0, i);
|
|
|
+ msg = time+" " + audit.getMsg().replaceAll(substring,"\\$userName="+first.get().getCorpwxUserid()+"\\$");
|
|
|
}
|
|
|
}
|
|
|
}else {
|