|
@@ -319,6 +319,7 @@ public class WorkContractInfoController extends BaseController {
|
|
|
addMessage(redirectAttributes,message);
|
|
|
}
|
|
|
}catch (Exception e){
|
|
|
+ logger.error("Exception e:"+e);
|
|
|
addMessage(redirectAttributes, "审批失败");
|
|
|
}
|
|
|
if (StringUtils.isNotBlank(workContractInfo.getHome()) && "home".equals(workContractInfo.getHome())){
|
|
@@ -384,6 +385,7 @@ public class WorkContractInfoController extends BaseController {
|
|
|
String str = workContractInfoService.contractInvalidateStart(workContractInfo,reason);
|
|
|
addMessage(redirectAttributes, str);
|
|
|
}catch (Exception e){
|
|
|
+ logger.error("Exception e:"+e);
|
|
|
addMessage(redirectAttributes, "送审失败");
|
|
|
return "modules/workcontractinfo/workContractInfoList";
|
|
|
}
|
|
@@ -659,6 +661,7 @@ public class WorkContractInfoController extends BaseController {
|
|
|
addMessage(redirectAttributes, "合同变更申请已经提交");
|
|
|
}
|
|
|
} catch (Exception e) {
|
|
|
+ logger.error("Exception e:"+e);
|
|
|
addMessage(redirectAttributes, "申请提交失败!");
|
|
|
addMessage(redirectAttributes, "系统内部错误");
|
|
|
}
|
|
@@ -750,7 +753,7 @@ public class WorkContractInfoController extends BaseController {
|
|
|
*/
|
|
|
@RequestMapping(value = "saveAlterAudit")
|
|
|
public String saveAlterAudit(WorkContractInfo workContractInfo,Map<String, Object> vars, Model model, RedirectAttributes redirectAttributes,HttpServletRequest request) {
|
|
|
-// try{
|
|
|
+ try{
|
|
|
// 对不同环节的业务逻辑进行操作
|
|
|
String taskDefKey = workContractInfo.getAct().getTaskDefKey();
|
|
|
List<User> users = null;
|
|
@@ -768,9 +771,10 @@ public class WorkContractInfoController extends BaseController {
|
|
|
String str = workContractInfoService.auditAlterSave(workContractInfo,users);
|
|
|
addMessage(redirectAttributes, str);
|
|
|
// }
|
|
|
-// }catch (Exception e){
|
|
|
-// addMessage(redirectAttributes, "审批失败");
|
|
|
-// }
|
|
|
+ }catch (Exception e){
|
|
|
+ logger.error("Exception e:"+e);
|
|
|
+ addMessage(redirectAttributes, "审批失败");
|
|
|
+ }
|
|
|
model.addAttribute("workContractInfo", workContractInfo);
|
|
|
if (StringUtils.isNotBlank(workContractInfo.getHome()) && "home".equals(workContractInfo.getHome())){
|
|
|
return "redirect:" + Global.getAdminPath() + "/home/?repage";
|
|
@@ -1158,6 +1162,7 @@ public class WorkContractInfoController extends BaseController {
|
|
|
addMessage(redirectAttributes, "该合同不是送审状态,无法撤回");
|
|
|
}
|
|
|
}catch (Exception e){
|
|
|
+ logger.error("Exception e:"+e);
|
|
|
addMessage(redirectAttributes, "撤回失败");
|
|
|
}
|
|
|
return "redirect:" + Global.getAdminPath() + "/workcontractinfo/workContractInfo/?repage";
|
|
@@ -1173,6 +1178,7 @@ public class WorkContractInfoController extends BaseController {
|
|
|
addMessage(redirectAttributes, "撤回成功");
|
|
|
workContractInfoService.auditCompletionInvalidate(workContractInfo);
|
|
|
}catch (Exception e){
|
|
|
+ logger.error("Exception e:"+e);
|
|
|
addMessage(redirectAttributes, "撤回失败");
|
|
|
}
|
|
|
return "redirect:" + Global.getAdminPath() + "/workcontractinfo/workContractInfo/?repage";
|
|
@@ -1302,6 +1308,7 @@ public class WorkContractInfoController extends BaseController {
|
|
|
new ExportExcel("合同管理", WorkContractInfo.class).setDataList(page.getList()).write(response, fileName).dispose();
|
|
|
return null;
|
|
|
} catch (Exception e) {
|
|
|
+ logger.error("Exception e:"+e);
|
|
|
addMessage(redirectAttributes, "导出合同管理记录失败!失败信息:" + e.getMessage());
|
|
|
}
|
|
|
return "redirect:" + Global.getAdminPath() + "/workcontractinfo/workContractInfo/?repage";
|
|
@@ -1334,6 +1341,7 @@ public class WorkContractInfoController extends BaseController {
|
|
|
successNum++;
|
|
|
}
|
|
|
} catch (ConstraintViolationException ex) {
|
|
|
+ logger.error("Exception ex:"+ex);
|
|
|
List<String> messageList = BeanValidators.extractPropertyAndMessageAsList(ex, ": ");
|
|
|
for (String message : messageList){
|
|
|
failureMsg.append(message+"; ");
|
|
@@ -1342,6 +1350,7 @@ public class WorkContractInfoController extends BaseController {
|
|
|
workContractInfo = toWorkEntity(workContractInfo,date,"导入失败!");
|
|
|
errlist.add(workContractInfo);
|
|
|
} catch (Exception ex) {
|
|
|
+ logger.error("Exception ex:"+ex);
|
|
|
workContractInfo = toWorkEntity(workContractInfo,date,ex+"!");
|
|
|
failureNum++;
|
|
|
errlist.add(workContractInfo);
|
|
@@ -1366,8 +1375,10 @@ public class WorkContractInfoController extends BaseController {
|
|
|
InputStream inputStream = new ByteArrayInputStream(content);
|
|
|
ossUtil.uploadFile2OSS(inputStream,fileDir, fileName);
|
|
|
}catch (IOException e){
|
|
|
+ logger.error("Exception e:"+e);
|
|
|
e.printStackTrace();
|
|
|
}catch (Exception e1){
|
|
|
+ logger.error("Exception e1:"+e1);
|
|
|
e1.printStackTrace();
|
|
|
System.out.println("合同信息错误导入日志文件上传失败!");
|
|
|
}
|
|
@@ -1390,6 +1401,7 @@ public class WorkContractInfoController extends BaseController {
|
|
|
sysImportInfoService.save(sysImportInfo);
|
|
|
addMessage(redirectAttributes, "已成功导入 " + successNum + " 条合同信息记录" + failureMsg);
|
|
|
} catch (Exception e) {
|
|
|
+ logger.error("Exception e:"+e);
|
|
|
addMessage(redirectAttributes, "导入合同信息失败!失败信息:" + e.getMessage());
|
|
|
}
|
|
|
return "redirect:" + Global.getAdminPath() + "/workcontractinfo/workContractInfo/?repage";
|
|
@@ -1408,6 +1420,7 @@ public class WorkContractInfoController extends BaseController {
|
|
|
new ExportExcel(true,"合同管理数据", WorkContractInfo.class, 1).setDataList(list).write(response, fileName,agent).dispose();
|
|
|
return null;
|
|
|
} catch (Exception e) {
|
|
|
+ logger.error("Exception e:"+e);
|
|
|
addMessage(redirectAttributes, "导入模板下载失败!失败信息:" + e.getMessage());
|
|
|
}
|
|
|
return "redirect:" + Global.getAdminPath() + "/workcontractinfo/workContractInfo/?repage";
|
|
@@ -1442,6 +1455,7 @@ public class WorkContractInfoController extends BaseController {
|
|
|
searchLabel = URLDecoder.decode(searchLabel, "UTF-8");
|
|
|
searchKey = URLDecoder.decode(searchKey, "UTF-8");
|
|
|
} catch (UnsupportedEncodingException e) {
|
|
|
+ logger.error("Exception e:"+e);
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
model.addAttribute("labelNames", fieldLabels.split("\\|"));
|
|
@@ -1473,6 +1487,7 @@ public class WorkContractInfoController extends BaseController {
|
|
|
searchLabel1 = URLDecoder.decode(searchLabel1, "UTF-8");
|
|
|
searchKey1 = URLDecoder.decode(searchKey1, "UTF-8");
|
|
|
} catch (UnsupportedEncodingException e) {
|
|
|
+ logger.error("Exception e:"+e);
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
model.addAttribute("labelNames", fieldLabels.split("\\|"));
|
|
@@ -1561,7 +1576,7 @@ public class WorkContractInfoController extends BaseController {
|
|
|
workClientAttachments.addAll(workClientAttachmentList);
|
|
|
workContractInfo.setWorkAttachments(workClientAttachments);
|
|
|
}
|
|
|
-// try{
|
|
|
+ try{
|
|
|
// 对不同环节的业务逻辑进行操作
|
|
|
List<User> users = null;
|
|
|
if ("bmzr".equals(taskDefKey)){
|
|
@@ -1578,9 +1593,10 @@ public class WorkContractInfoController extends BaseController {
|
|
|
String str = workContractInfoService.auditSave(workContractInfo, VarStr.CONTRACT_STATUS,users);
|
|
|
addMessage(redirectAttributes, str);
|
|
|
// }
|
|
|
-// }catch (Exception e){
|
|
|
-// addMessage(redirectAttributes, "审批失败");
|
|
|
-// }
|
|
|
+ }catch (Exception e){
|
|
|
+ logger.error("Exception e:"+e);
|
|
|
+ addMessage(redirectAttributes, "审批失败");
|
|
|
+ }
|
|
|
if (StringUtils.isNotBlank(workContractInfo.getHome()) && "home".equals(workContractInfo.getHome())){
|
|
|
return "redirect:" + Global.getAdminPath() + "/home/?repage";
|
|
|
}else {
|
|
@@ -1599,7 +1615,7 @@ public class WorkContractInfoController extends BaseController {
|
|
|
public String saveAuditCompletion(WorkContractInfo workContractInfo, Model model,
|
|
|
RedirectAttributes redirectAttributes) {
|
|
|
String taskDefKey = workContractInfo.getAct().getTaskDefKey();
|
|
|
-// try{
|
|
|
+ try{
|
|
|
// 对不同环节的业务逻辑进行操作
|
|
|
List<User> users = null;
|
|
|
if ("bmzr".equals(taskDefKey)){
|
|
@@ -1614,9 +1630,10 @@ public class WorkContractInfoController extends BaseController {
|
|
|
String str = workContractInfoService.saveAuditCompletion(workContractInfo, VarStr.CONTRACT_STATUS,users);
|
|
|
addMessage(redirectAttributes, str);
|
|
|
// }
|
|
|
-// }catch (Exception e){
|
|
|
-// addMessage(redirectAttributes, "审批失败");
|
|
|
-// }
|
|
|
+ }catch (Exception e){
|
|
|
+ logger.error("Exception e:"+e);
|
|
|
+ addMessage(redirectAttributes, "审批失败");
|
|
|
+ }
|
|
|
if (StringUtils.isNotBlank(workContractInfo.getHome()) && "home".equals(workContractInfo.getHome())){
|
|
|
return "redirect:" + Global.getAdminPath() + "/home/?repage";
|
|
|
}else {
|
|
@@ -1666,6 +1683,7 @@ public class WorkContractInfoController extends BaseController {
|
|
|
in.close();
|
|
|
out.close();
|
|
|
}catch (IOException e){
|
|
|
+ logger.error("Exception e:"+e);
|
|
|
e.printStackTrace();
|
|
|
}finally {
|
|
|
if (out != null) {
|
|
@@ -1793,6 +1811,7 @@ public class WorkContractInfoController extends BaseController {
|
|
|
searchLabel = URLDecoder.decode(searchLabel, "UTF-8");
|
|
|
searchKey = URLDecoder.decode(searchKey, "UTF-8");
|
|
|
} catch (UnsupportedEncodingException e) {
|
|
|
+ logger.error("Exception e:"+e);
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
model.addAttribute("labelNames", fieldLabels.split("\\|"));
|
|
@@ -2023,6 +2042,7 @@ public class WorkContractInfoController extends BaseController {
|
|
|
new ExportExcel("合同一览表", WorkContractListInfo.class).setDataList(list).write(response, fileName).dispose();
|
|
|
return null;
|
|
|
} catch (Exception e) {
|
|
|
+ logger.error("Exception e:"+e);
|
|
|
addMessage(redirectAttributes, "导出合同管理记录失败!失败信息:" + e.getMessage());
|
|
|
}
|
|
|
return "redirect:" + Global.getAdminPath() + "/workcontractinfo/workContractInfo/workContractList/?repage";
|