|
@@ -0,0 +1,756 @@
|
|
|
|
+/**
|
|
|
|
+ * Copyright © 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
|
|
|
|
+ */
|
|
|
|
+package com.jeeplus.modules.workreimbursement.service;
|
|
|
|
+
|
|
|
|
+import com.google.common.collect.Lists;
|
|
|
|
+import com.google.common.collect.Maps;
|
|
|
|
+import com.jeeplus.common.service.CrudService;
|
|
|
|
+import com.jeeplus.common.utils.StringUtils;
|
|
|
|
+import com.jeeplus.modules.act.service.ActTaskService;
|
|
|
|
+import com.jeeplus.modules.act.utils.ActUtils;
|
|
|
|
+import com.jeeplus.modules.projectrecord.dao.WorkProjectUserDao;
|
|
|
|
+import com.jeeplus.modules.serialnum.service.SerialNumTplService;
|
|
|
|
+import com.jeeplus.modules.sys.entity.Office;
|
|
|
|
+import com.jeeplus.modules.sys.entity.User;
|
|
|
|
+import com.jeeplus.modules.sys.service.OfficeService;
|
|
|
|
+import com.jeeplus.modules.sys.service.WorkattachmentService;
|
|
|
|
+import com.jeeplus.modules.sys.utils.UserUtils;
|
|
|
|
+import com.jeeplus.modules.workactivity.dao.WorkActivityProcessDao;
|
|
|
|
+import com.jeeplus.modules.workactivity.entity.Activity;
|
|
|
|
+import com.jeeplus.modules.workactivity.entity.WorkActivityProcess;
|
|
|
|
+import com.jeeplus.modules.workactivity.service.ActivityService;
|
|
|
|
+import com.jeeplus.modules.workactivity.service.WorkActivityProcessService;
|
|
|
|
+import com.jeeplus.modules.workactivitymenu.entity.WorkActivityMenu;
|
|
|
|
+import com.jeeplus.modules.workactivitymenu.service.WorkActivityMenuService;
|
|
|
|
+import com.jeeplus.modules.workclientinfo.dao.WorkClientAttachmentDao;
|
|
|
|
+import com.jeeplus.modules.workclientinfo.entity.WorkClientAttachment;
|
|
|
|
+import com.jeeplus.modules.workloan.dao.WorkLoanDao;
|
|
|
|
+import com.jeeplus.modules.workloan.entity.WorkLoan;
|
|
|
|
+import com.jeeplus.modules.workloan.service.WorkLoanService;
|
|
|
|
+import com.jeeplus.modules.workprojectnotify.entity.WorkProjectNotify;
|
|
|
|
+import com.jeeplus.modules.workprojectnotify.service.WorkProjectNotifyService;
|
|
|
|
+import com.jeeplus.modules.workprojectnotify.util.UtilNotify;
|
|
|
|
+import com.jeeplus.modules.workreimbursement.dao.ReimbursementVATTaxDao;
|
|
|
|
+import com.jeeplus.modules.workreimbursement.dao.WorkAccountDao;
|
|
|
|
+import com.jeeplus.modules.workreimbursement.dao.WorkReimbursementDao;
|
|
|
|
+import com.jeeplus.modules.workreimbursement.dao.WorkReimbursementReplenishDao;
|
|
|
|
+import com.jeeplus.modules.workreimbursement.entity.*;
|
|
|
|
+import com.jeeplus.modules.workreimbursement.utils.VarStr;
|
|
|
|
+import com.jeeplus.modules.workreimbursementback.dao.WorkReimbursementBackDao;
|
|
|
|
+import com.jeeplus.modules.workreimbursementback.entity.WorkReimbursementBack;
|
|
|
|
+import com.jeeplus.modules.workrepay.dao.WorkRepayDao;
|
|
|
|
+import com.jeeplus.modules.workrepay.entity.WorkRepay;
|
|
|
|
+import org.activiti.engine.*;
|
|
|
|
+import org.activiti.engine.runtime.ProcessInstance;
|
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
+import org.springframework.stereotype.Service;
|
|
|
|
+import org.springframework.transaction.annotation.Transactional;
|
|
|
|
+
|
|
|
|
+import java.util.*;
|
|
|
|
+
|
|
|
|
+/**
|
|
|
|
+ * 财务报销Service
|
|
|
|
+ * @author 孟祥越
|
|
|
|
+ * @version 2017-05-02
|
|
|
|
+ */
|
|
|
|
+@Service
|
|
|
|
+@Transactional(readOnly = true)
|
|
|
|
+public class WorkReimbursementReplenishService extends CrudService<WorkReimbursementReplenishDao, WorkReimbursementReplenish> {
|
|
|
|
+ @Autowired
|
|
|
|
+ private WorkReimbursementReplenishDao workReimbursementReplenishDao;
|
|
|
|
+ @Autowired
|
|
|
|
+ private WorkReimbursementDao workReimbursementDao;
|
|
|
|
+ @Autowired
|
|
|
|
+ private WorkActivityProcessDao workActivityProcessDao;
|
|
|
|
+ @Autowired
|
|
|
|
+ private WorkAccountDao workAccountDao;
|
|
|
|
+ @Autowired
|
|
|
|
+ private RuntimeService runtimeService;
|
|
|
|
+ @Autowired
|
|
|
|
+ protected TaskService taskService;
|
|
|
|
+ @Autowired
|
|
|
|
+ protected HistoryService historyService;
|
|
|
|
+ @Autowired
|
|
|
|
+ protected RepositoryService repositoryService;
|
|
|
|
+ @Autowired
|
|
|
|
+ private IdentityService identityService;
|
|
|
|
+ @Autowired
|
|
|
|
+ private WorkClientAttachmentDao workClientAttachmentDao;
|
|
|
|
+ @Autowired
|
|
|
|
+ private WorkattachmentService workattachmentService;
|
|
|
|
+ @Autowired
|
|
|
|
+ private WorkLoanService workLoanService;
|
|
|
|
+
|
|
|
|
+ @Autowired
|
|
|
|
+ private ActTaskService actTaskService;
|
|
|
|
+
|
|
|
|
+ @Autowired
|
|
|
|
+ private WorkProjectNotifyService workProjectNotifyService;
|
|
|
|
+ @Autowired
|
|
|
|
+ private WorkActivityMenuService workActivityMenuService;
|
|
|
|
+ @Autowired
|
|
|
|
+ private WorkActivityProcessService workActivityProcessService;
|
|
|
|
+ @Autowired
|
|
|
|
+ private ActivityService activityService;
|
|
|
|
+ @Autowired
|
|
|
|
+ private ReimbursementVATTaxDao reimbursementVATTaxDao;
|
|
|
|
+ @Autowired
|
|
|
|
+ private WorkProjectUserDao workProjectUserDao;
|
|
|
|
+ @Autowired
|
|
|
|
+ private SerialNumTplService serialNumTplService;
|
|
|
|
+ @Autowired
|
|
|
|
+ private OfficeService officeService;
|
|
|
|
+ @Autowired
|
|
|
|
+ private WorkReimbursementBackDao workReimbursementBackDao;
|
|
|
|
+ @Autowired
|
|
|
|
+ private WorkLoanDao workLoanDao;
|
|
|
|
+
|
|
|
|
+ private static byte[] SYN_BYTE = new byte[0];
|
|
|
|
+
|
|
|
|
+ @SuppressWarnings("unchecked")
|
|
|
|
+ public WorkReimbursementReplenish get(String id) {
|
|
|
|
+ WorkReimbursementReplenish workReimbursement = super.get(id);
|
|
|
|
+ if(null != workReimbursement){
|
|
|
|
+ //添加当前文件服务器类型
|
|
|
|
+ workReimbursement.setUploadMode(uploadMode);
|
|
|
|
+ //数据处理(如果为阿里云文件服务器,则对查看的路径进行处理)
|
|
|
|
+ workattachmentService.clientAttachmentManageOnUrl(workReimbursement.getWorkAttachments());
|
|
|
|
+ }
|
|
|
|
+ return workReimbursement;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 数电发票报销文件补充流程(侯媛媛发起,流程发起人审核,再回到侯媛媛结束)
|
|
|
|
+ * @param workReimbursement
|
|
|
|
+ * @param variables
|
|
|
|
+ */
|
|
|
|
+ @Transactional(readOnly = false)
|
|
|
|
+ public String replenishInvoiceReimbursementSave(WorkReimbursementReplenish workReimbursementReplenish,WorkReimbursement workReimbursement,Map<String, Object> variables,String processInstanceId) {
|
|
|
|
+ User user = UserUtils.getUser();
|
|
|
|
+
|
|
|
|
+ //流程数据保存到关联表中
|
|
|
|
+ super.save(workReimbursementReplenish);
|
|
|
|
+ workReimbursement.setReimbursementType("1");
|
|
|
|
+ workReimbursementDao.update(workReimbursement);
|
|
|
|
+ String str = "";
|
|
|
|
+ Office office = officeService.get(workReimbursementReplenish.getOfficeId());
|
|
|
|
+
|
|
|
|
+ str = "报销【" + workReimbursement.getNumber() + "】补充文件待确认" + ",报销总金额:"+workReimbursement.getMoney();
|
|
|
|
+ String title = "报销【" + workReimbursement.getNumber() + "】补充文件待确认";
|
|
|
|
+ //replenishWorkReimbursementAttachmentInfo(workReimbursement);
|
|
|
|
+ // 用来设置启动流程的人员ID,引擎会自动把用户ID保存到activiti:initiator中
|
|
|
|
+ identityService.setAuthenticatedUserId(user.getId());
|
|
|
|
+ // 启动流程
|
|
|
|
+ String businessKey = workReimbursementReplenish.getId().toString();
|
|
|
|
+ WorkActivityMenu workActivityMenu = workActivityMenuService.findByParentAndOffice("ggh3125f1f194c82bdea93555c750906", office);
|
|
|
|
+ // 启动流程
|
|
|
|
+ String processType = workActivityMenu.getProcessType();
|
|
|
|
+ StringBuffer buffer = new StringBuffer();
|
|
|
|
+ Activity activity = new Activity();
|
|
|
|
+ WorkProjectNotify workProjectNotify = UtilNotify
|
|
|
|
+ .saveNotify(workReimbursementReplenish.getId(),
|
|
|
|
+ null,
|
|
|
|
+ workReimbursementReplenish.getCompanyId(),
|
|
|
|
+ title,
|
|
|
|
+ str,
|
|
|
|
+ "111",
|
|
|
|
+ "0",
|
|
|
|
+ "待审批",
|
|
|
|
+ ""
|
|
|
|
+ );
|
|
|
|
+ List<User> users = new ArrayList<>();
|
|
|
|
+ List<User> bxrbcs = new ArrayList<>();
|
|
|
|
+ //获取报销发起人信息
|
|
|
|
+ User createUser = UserUtils.get(workReimbursement.getCreateBy().getId());
|
|
|
|
+ if(null != createUser){
|
|
|
|
+ bxrbcs.add(createUser);
|
|
|
|
+ }
|
|
|
|
+ //财务员工
|
|
|
|
+ List<User> fpglys = UserUtils.getByRoleActivityEnname("dzfpbxshybxsd",3,office.getId(),"5",workReimbursementReplenish.getCreateBy());
|
|
|
|
+ if (StringUtils.isNotBlank(workActivityMenu.getId())) {
|
|
|
|
+ workProjectNotify.setNotifyRole("");
|
|
|
|
+ workActivityMenu = workActivityMenuService.get(workActivityMenu.getId());
|
|
|
|
+ List<Activity> activities = workActivityMenu.getActivities();
|
|
|
|
+ for (Activity a : activities) {
|
|
|
|
+ String encount = a.getEncount();
|
|
|
|
+ String enlist = a.getEnlist();
|
|
|
|
+ if (a.getRole()!=null && StringUtils.isNotBlank(a.getRole().getEnname())){
|
|
|
|
+ List enusers = UserUtils.getByRoleActivityEnnames(a.getRole().getEnname(),office.getId(),"8",workReimbursementReplenish.getCreateBy());
|
|
|
|
+ if (enusers.size()==0){
|
|
|
|
+ workReimbursementReplenish.setStatus("1");
|
|
|
|
+ super.save(workReimbursementReplenish);
|
|
|
|
+ return "流程审批人不能为空,角色"+a.getRole().getName()+"下无用户,请联系管理员!";
|
|
|
|
+ }
|
|
|
|
+ variables.put(enlist, enusers);
|
|
|
|
+ variables.put(encount, enusers.size());
|
|
|
|
+ }
|
|
|
|
+ if (a.getDelFlag().equals("0") && a.getCount() == 1) {
|
|
|
|
+ activity = a;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ buffer.append(activity.getRole().getEnname());
|
|
|
|
+ if (activity != null && StringUtils.isNotBlank(activity.getId())) {
|
|
|
|
+ //角色审批
|
|
|
|
+ if (StringUtils.isNotBlank(activity.getRole().getEnname())) {
|
|
|
|
+ users = UserUtils.getByRoleActivityEnnames(activity.getRole().getEnname(),office.getId(),"8",workReimbursementReplenish.getCreateBy());
|
|
|
|
+ }
|
|
|
|
+ //人员审批
|
|
|
|
+ if (StringUtils.isNotBlank(activity.getUser().getId())) {
|
|
|
|
+ users.add(activity.getUser());
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ workProjectNotify.setId("");
|
|
|
|
+ } else {
|
|
|
|
+ if (bxrbcs.size()==0 ){
|
|
|
|
+ workReimbursementReplenish.setStatus("1");
|
|
|
|
+ super.save(workReimbursementReplenish);
|
|
|
|
+ }
|
|
|
|
+ if (bxrbcs.size()==0){
|
|
|
|
+ return "流程审批人不能为空,该报销未找到报销人,请联系管理员!";
|
|
|
|
+ }
|
|
|
|
+ variables.put("bxrbcCount",bxrbcs.size());
|
|
|
|
+ variables.put("bxrbcList",bxrbcs);
|
|
|
|
+ processType = "workReimbursementReplenish";
|
|
|
|
+ users.addAll(bxrbcs);
|
|
|
|
+ }
|
|
|
|
+ for (User u : users){
|
|
|
|
+ workProjectNotify.setUser(u);
|
|
|
|
+ workProjectNotify.setId("");
|
|
|
|
+ workProjectNotify.setNotifyRole("报销人补充");
|
|
|
|
+ workProjectNotifyService.save(workProjectNotify);
|
|
|
|
+ Map<String,Object> extras = new HashMap<>();
|
|
|
|
+ extras.put("type","7002");
|
|
|
|
+ extras.put("id",workProjectNotify.getId());
|
|
|
|
+ extras.put("procDefKey","111");
|
|
|
|
+ UserUtils.pushInfoToApp(title,str,extras,u.getId());
|
|
|
|
+ UserUtils.pushIm(u.getId(),str);
|
|
|
|
+ }
|
|
|
|
+ variables.put("type", processType);
|
|
|
|
+ variables.put("busId", businessKey);
|
|
|
|
+ variables.put("title", "审批单:" + workReimbursement.getNumber());//设置标题;
|
|
|
|
+
|
|
|
|
+ ProcessInstance processInstance = runtimeService.startProcessInstanceByKey(processType, businessKey, variables);
|
|
|
|
+ workReimbursementReplenish.setProcessInstance(processInstance);
|
|
|
|
+ if (StringUtils.isNotBlank(processInstanceId)) {
|
|
|
|
+ workActivityProcessService.updateProcessInstanceId(processInstance.getId(),processInstanceId);
|
|
|
|
+ workActivityProcessService.deleteProcessInstanceId(processInstanceId);
|
|
|
|
+ workActivityProcessService.deleteProcessIdAuditUsers(processInstanceId);
|
|
|
|
+ }
|
|
|
|
+ // 更新流程实例ID
|
|
|
|
+ workReimbursementReplenish.setProcessInstanceId(processInstance.getId());
|
|
|
|
+ workReimbursementReplenishDao.updateProcessInstanceId(workReimbursementReplenish);
|
|
|
|
+ //通知添加流程实例ID
|
|
|
|
+ workProjectNotify.setProcessInstanceId(processInstance.getId());
|
|
|
|
+ workProjectNotifyService.save(workProjectNotify);
|
|
|
|
+ List<Activity> list = workActivityMenu.getActivities();
|
|
|
|
+ if (list != null && list.size() != 0) {
|
|
|
|
+ workActivityProcessService.saveList(list, processInstance.getId());
|
|
|
|
+ } else {
|
|
|
|
+ WorkActivityProcess workActivityProcess = new WorkActivityProcess();
|
|
|
|
+ workActivityProcess.setProcessKey("workReimbursementReplenish");
|
|
|
|
+ workActivityProcess.setCount(1);
|
|
|
|
+ workActivityProcess.setProcessInstanceId(processInstance.getId());
|
|
|
|
+ workActivityProcess.setIsApproval("0");
|
|
|
|
+ workActivityProcessService.save(workActivityProcess);
|
|
|
|
+ workActivityProcess.setCount(2);
|
|
|
|
+ workActivityProcess.setId("");
|
|
|
|
+ workActivityProcessService.save(workActivityProcess);
|
|
|
|
+ workActivityProcessService.insertAuditsByType(bxrbcs,processInstance.getId(),1,1);
|
|
|
|
+ workActivityProcessService.insertAuditsByType(fpglys,processInstance.getId(),2,0);
|
|
|
|
+ }
|
|
|
|
+ logger.debug("start process of {key={}, bkey={}, pid={}, variables={}}", new Object[]{
|
|
|
|
+ ActUtils.PD_REIMBURSEMENT[0], businessKey, processInstance.getId(), variables});
|
|
|
|
+ return "";
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 补充附件
|
|
|
|
+ * @param workReimbursement
|
|
|
|
+ */
|
|
|
|
+ @Transactional(readOnly = false)
|
|
|
|
+ public void replenishWorkReimbursementAttachmentInfo(WorkReimbursement workReimbursement) {
|
|
|
|
+ for (ReimbursementVATTax reimbursementVATTax : workReimbursement.getReimbursementVATTaxes()) {
|
|
|
|
+ //普通报销 发票信息
|
|
|
|
+ reimbursementVATTax.setReimbursementType("0");
|
|
|
|
+ if (ReimbursementVATTax.DEL_FLAG_NORMAL.equals(reimbursementVATTax.getDelFlag())) {
|
|
|
|
+ reimbursementVATTax.setWorkReimbursement(workReimbursement);
|
|
|
|
+ if (StringUtils.isBlank(reimbursementVATTax.getId()) && StringUtils.isNotBlank(reimbursementVATTax.getInvoiceCode())) {
|
|
|
|
+ reimbursementVATTax.preInsert();
|
|
|
|
+ reimbursementVATTaxDao.insert(reimbursementVATTax);
|
|
|
|
+ } else {
|
|
|
|
+ reimbursementVATTax.preUpdate();
|
|
|
|
+ reimbursementVATTaxDao.update(reimbursementVATTax);
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ reimbursementVATTaxDao.delete(reimbursementVATTax);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ for (ReimbursementVATTax reimbursementVATTax : workReimbursement.getReimbursementElectronicInvoiceVATTaxes()) {
|
|
|
|
+ //电子发票报销 发票信息
|
|
|
|
+ reimbursementVATTax.setReimbursementType("1");
|
|
|
|
+ if (ReimbursementVATTax.DEL_FLAG_NORMAL.equals(reimbursementVATTax.getDelFlag())) {
|
|
|
|
+ reimbursementVATTax.setWorkReimbursement(workReimbursement);
|
|
|
|
+ if (StringUtils.isBlank(reimbursementVATTax.getId()) && StringUtils.isNotBlank(reimbursementVATTax.getInvoiceNumber())) {
|
|
|
|
+ reimbursementVATTax.preInsert();
|
|
|
|
+ reimbursementVATTaxDao.insert(reimbursementVATTax);
|
|
|
|
+ } else {
|
|
|
|
+ reimbursementVATTax.preUpdate();
|
|
|
|
+ reimbursementVATTaxDao.update(reimbursementVATTax);
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ reimbursementVATTaxDao.delete(reimbursementVATTax);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ //附件信息
|
|
|
|
+ for (WorkClientAttachment workClientAttachment : workReimbursement.getWorkAttachments()) {
|
|
|
|
+ if (workClientAttachment.getId() == null) {
|
|
|
|
+ continue;
|
|
|
|
+ }
|
|
|
|
+ if (WorkClientAttachment.DEL_FLAG_NORMAL.equals(workClientAttachment.getDelFlag())) {
|
|
|
|
+ workClientAttachment.setAttachmentId(workReimbursement.getId());
|
|
|
|
+ workClientAttachment.setAttachmentFlag(workClientAttachment.getAttachmentFlag());
|
|
|
|
+ workClientAttachment.setAttachmentUser(UserUtils.getUser().getId());
|
|
|
|
+ if (StringUtils.isBlank(workClientAttachment.getId()) || "null".equals(workClientAttachment.getId())) {
|
|
|
|
+ workattachmentService.insertOnWorkClientAttachment(workClientAttachment);
|
|
|
|
+ } else {
|
|
|
|
+ workattachmentService.updateOnWorkClientAttachment(workClientAttachment);
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ workClientAttachmentDao.delete(workClientAttachment);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 审核流程
|
|
|
|
+ * @param workReimbursement
|
|
|
|
+ */
|
|
|
|
+ @Transactional(readOnly = false)
|
|
|
|
+ public String auditReimbursementReplenishSave(WorkReimbursementReplenish workReimbursementReplenish,WorkReimbursement workReimbursement,List<User> auditUsers) {
|
|
|
|
+ String str = "";
|
|
|
|
+ String userName = UserUtils.get(workReimbursementReplenish.getCreateBy().getId()).getName();
|
|
|
|
+ Office office = officeService.get(workReimbursementReplenish.getOfficeId());
|
|
|
|
+ String title = "报销【" + workReimbursement.getNumber() + "】补充文件待审批";
|
|
|
|
+ if (workReimbursement.getProject()!= null && StringUtils.isNotBlank(workReimbursement.getProject().getId())){
|
|
|
|
+ str = "报销申请编号:"+workReimbursement.getNumber()+",报销项目:"+workReimbursement.getProject().getProjectName()+",报销费用合计:"+workReimbursement.getMoney()+",报销人:"+userName+",所属部门:"+office.getName();
|
|
|
|
+ }else {
|
|
|
|
+ str = "报销申请编号:"+workReimbursement.getNumber()+",非项目报销,报销费用合计:"+workReimbursement.getMoney()+",报销人:"+userName+",所属部门:"+office.getName();
|
|
|
|
+ }
|
|
|
|
+ // 对不同环节的业务逻辑进行操作
|
|
|
|
+ String taskDefKey = workReimbursementReplenish.getAct().getTaskDefKey();
|
|
|
|
+ if (!"modifyApply".equals(taskDefKey) && !taskDefKey.contains("audit") ) {
|
|
|
|
+ actTaskService.claim(workReimbursementReplenish.getAct().getTaskId(), UserUtils.getUser().getId());
|
|
|
|
+ replenishWorkReimbursementAttachmentInfo(workReimbursement);
|
|
|
|
+ }else{
|
|
|
|
+ workReimbursementReplenish.getAct().setFlag("yes");
|
|
|
|
+ if("modifyApply".equals(taskDefKey)) {
|
|
|
|
+ replenishWorkReimbursementAttachmentInfo(workReimbursement);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ String comment = "";
|
|
|
|
+ if (workReimbursementReplenish.getStatus().equals("4")){
|
|
|
|
+ comment = ("yes".equals(workReimbursementReplenish.getAct().getFlag())?"[重新申请] ":"[已撤销] ");
|
|
|
|
+ }else {
|
|
|
|
+ comment = ("yes".equals(workReimbursementReplenish.getAct().getFlag())?"[同意] ":"[驳回] ");
|
|
|
|
+ if(StringUtils.isNotBlank(workReimbursementReplenish.getAct().getComment())){
|
|
|
|
+ comment = comment + workReimbursementReplenish.getAct().getComment();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ //yes 的时候状态为审核通过 否则为未通过
|
|
|
|
+ //1 审核中 2 未通过
|
|
|
|
+ workReimbursementReplenish.setStatus(("yes".equals(workReimbursementReplenish.getAct().getFlag()) ? "2" : "4"));
|
|
|
|
+ Map<String, Object> vars = Maps.newHashMap();
|
|
|
|
+ //业务逻辑对应的条件表达式
|
|
|
|
+ String exp = "";
|
|
|
|
+ String taskCount = "";
|
|
|
|
+ String notifyRole = "";
|
|
|
|
+ int key = 0;
|
|
|
|
+ String enname = "";
|
|
|
|
+ List<Activity> activitieList = activityService.getByProcessInstanceId(workReimbursementReplenish.getProcessInstanceId());
|
|
|
|
+ WorkActivityMenu workActivityMenu = new WorkActivityMenu();
|
|
|
|
+ if (activitieList != null && activitieList.size() != 0) {
|
|
|
|
+ Iterator<Activity> iterator = activitieList.iterator();
|
|
|
|
+ while (iterator.hasNext()){
|
|
|
|
+ Activity activityInfo = iterator.next();
|
|
|
|
+ if (!"workReimbursementReplenish".equals(activityInfo.getProcessKey())){
|
|
|
|
+ iterator.remove();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ workActivityMenu.setProcessType(activitieList.get(0).getProcessKey());
|
|
|
|
+ workActivityMenu.setActivities(activitieList);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ WorkActivityProcess workActivityProcess = new WorkActivityProcess();
|
|
|
|
+ WorkActivityProcess selectProcess = new WorkActivityProcess();
|
|
|
|
+ selectProcess.setProcessInstanceId(workReimbursementReplenish.getProcessInstanceId());
|
|
|
|
+ List<WorkActivityProcess> workActivityProcesses = workActivityProcessService.findList(selectProcess);
|
|
|
|
+ List<Activity> activities = workActivityMenu.getActivities();
|
|
|
|
+ if (StringUtils.isNotBlank(workActivityMenu.getProcessType()) && !workActivityMenu.getProcessType().equals("workReimbursementReplenish")) {
|
|
|
|
+ key = 1;
|
|
|
|
+ for (int i = 0; i < workActivityProcesses.size(); i++) {
|
|
|
|
+ WorkActivityProcess activityProcess = workActivityProcesses.get(i);
|
|
|
|
+ if (taskDefKey.equals(activityProcess.getActivityTask()) && !taskDefKey.equals("modifyApply")) {
|
|
|
|
+ taskCount = activityProcess.getCount()+"";
|
|
|
|
+ workActivityProcess = activityProcess;
|
|
|
|
+ if (!workActivityProcess.getIsApproval().equals("0")) {
|
|
|
|
+ workActivityProcess.setId("");
|
|
|
|
+ }
|
|
|
|
+ exp = "pass";
|
|
|
|
+ if (!"yes".equals(workReimbursementReplenish.getAct().getFlag())) {
|
|
|
|
+ workReimbursementReplenish.setStatus("4");
|
|
|
|
+ workActivityProcess.setIsApproval("2");
|
|
|
|
+ String returnBack = "-1";
|
|
|
|
+ for (Activity activity : activities) {
|
|
|
|
+ if (activity.getCount() == activityProcess.getCount()) {
|
|
|
|
+ returnBack = activity.getReturnBack();
|
|
|
|
+ notifyRole = activity.getName();
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if (returnBack.equals("0")) {
|
|
|
|
+ workActivityProcess.setId("");
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ } else {
|
|
|
|
+ workActivityProcess.setIsApproval("1");
|
|
|
|
+ }
|
|
|
|
+ }else if(taskDefKey.equals("modifyApply")){
|
|
|
|
+ notifyRole = "调整报销";
|
|
|
|
+ taskCount = "0";
|
|
|
|
+ exp = "pass";
|
|
|
|
+ workActivityProcess.setId("");
|
|
|
|
+ workActivityProcess.setCount(0);
|
|
|
|
+ if (!"yes".equals(workReimbursementReplenish.getAct().getFlag())) {
|
|
|
|
+ workReimbursementReplenish.setStatus("3");
|
|
|
|
+ workActivityProcess.setIsApproval("2");
|
|
|
|
+ } else {
|
|
|
|
+ workActivityProcess.setIsApproval("1");
|
|
|
|
+ }
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ workActivityMenu.setProcessType("workReimbursementReplenish");
|
|
|
|
+ for (int i = 0; i < workActivityProcesses.size(); i++) {
|
|
|
|
+ WorkActivityProcess activityProcess = workActivityProcesses.get(i);
|
|
|
|
+ String count = activityProcess.getCount() + "";
|
|
|
|
+ workActivityProcess = activityProcess;
|
|
|
|
+ if (!workActivityProcess.getIsApproval().equals("0")) {
|
|
|
|
+ workActivityProcess.setId("");
|
|
|
|
+ }
|
|
|
|
+ // 审核环节
|
|
|
|
+ if ("bxrbc".equals(taskDefKey) && count.contains("1")) {
|
|
|
|
+ taskCount = "1";
|
|
|
|
+ exp = "pass";
|
|
|
|
+ if ("yes".equals(workReimbursementReplenish.getAct().getFlag())) {
|
|
|
|
+ //修改数电发票附件信息
|
|
|
|
+ replenishWorkReimbursementAttachmentInfo(workReimbursement);
|
|
|
|
+ workActivityProcessService.insertAuditsByType(auditUsers,workReimbursementReplenish.getProcessInstanceId(),2,1);
|
|
|
|
+ notifyRole = "财务审核";
|
|
|
|
+ workActivityProcess.setIsApproval("1");
|
|
|
|
+ enname = "fpglys";
|
|
|
|
+ vars.put("fpglysList", auditUsers);
|
|
|
|
+ vars.put("fpglyscount",auditUsers.size());
|
|
|
|
+ } else {
|
|
|
|
+ notifyRole = "调整报销";
|
|
|
|
+ workActivityProcess.setIsApproval("2");
|
|
|
|
+ }
|
|
|
|
+ break;
|
|
|
|
+ } else if ("fpglys".equals(taskDefKey) && count.contains("2")) {
|
|
|
|
+ taskCount = "2";
|
|
|
|
+ exp = "pass";
|
|
|
|
+ if ("yes".equals(workReimbursementReplenish.getAct().getFlag())) {
|
|
|
|
+ notifyRole = "审批通过";
|
|
|
|
+ workActivityProcess.setIsApproval("1");
|
|
|
|
+ } else {
|
|
|
|
+ notifyRole = "调整报销";
|
|
|
|
+ workActivityProcess.setIsApproval("2");
|
|
|
|
+ }
|
|
|
|
+ break;
|
|
|
|
+ } else if ("modifyApply".equals(taskDefKey)&& count.contains("0")) {
|
|
|
|
+ taskCount = "0";
|
|
|
|
+ notifyRole = "财务审批";
|
|
|
|
+ exp = "pass";
|
|
|
|
+ workActivityProcess.setCount(0);
|
|
|
|
+ enname = "bmzr";
|
|
|
|
+ if (!"yes".equals(workReimbursementReplenish.getAct().getFlag())) {
|
|
|
|
+ workReimbursementReplenish.setStatus("3");
|
|
|
|
+ }
|
|
|
|
+ break;
|
|
|
|
+ } else if ("apply_end".equals(taskDefKey)) {
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ // 设置意见
|
|
|
|
+ workReimbursementReplenish.getAct().setComment(("yes".equals(workReimbursementReplenish.getAct().getFlag()) ? "[同意] " : "[驳回] ") + workReimbursementReplenish.getAct().getComment());
|
|
|
|
+ workReimbursementReplenish.preUpdate();
|
|
|
|
+ // 提交流程任务
|
|
|
|
+ vars.put(exp, "yes".equals(workReimbursementReplenish.getAct().getFlag()) ? true : false);
|
|
|
|
+ vars.put("passs", true);
|
|
|
|
+ workActivityProcessService.updateProcess(workActivityProcess,workActivityMenu,key,taskCount,workReimbursementReplenish.getProcessInstanceId(),taskDefKey,"modifyApply",workReimbursementReplenish.getAct().getFlag(),comment, activities);
|
|
|
|
+ // 提交流程任务
|
|
|
|
+ actTaskService.complete(workReimbursementReplenish.getAct().getTaskId(), workReimbursementReplenish.getAct().getProcInsId(), workReimbursementReplenish.getAct().getComment(), vars);
|
|
|
|
+ boolean state = actTaskService.isProcessEnd(workReimbursementReplenish.getAct().getProcInsId());
|
|
|
|
+ List<User> users = new ArrayList<>();
|
|
|
|
+ List<User> userList = new ArrayList<>();
|
|
|
|
+ if (!state) {
|
|
|
|
+ title = "报销【" + workReimbursement.getNumber() + "】申请通过";
|
|
|
|
+ str = "报销【" + workReimbursement.getNumber() + "】申请通过,经办人:" + userName+",总金额:"+workReimbursement.getMoney();
|
|
|
|
+ users.add(workReimbursementReplenish.getCreateBy());
|
|
|
|
+ if ("yes".equals(workReimbursementReplenish.getAct().getFlag())) {
|
|
|
|
+
|
|
|
|
+ Set<String> set = new HashSet();
|
|
|
|
+ //添加经办人人员id
|
|
|
|
+ set.add(workReimbursementReplenish.getCreateBy().getId());
|
|
|
|
+ //获取通知需要的经办人和报销人人员信息
|
|
|
|
+ List<User> informUser = Lists.newArrayList();
|
|
|
|
+ for (String userId: set) {
|
|
|
|
+ informUser.add(UserUtils.get(userId));
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ workReimbursementReplenish.setStatus("5");
|
|
|
|
+ WorkProjectNotify notify = new WorkProjectNotify();
|
|
|
|
+ notify.setNotifyId(workReimbursementReplenish.getId());
|
|
|
|
+ userList = workProjectNotifyService.readByNotifyId(notify);
|
|
|
|
+ //遍历需要通知的人员信息 进行通知(经办人和报销人员)
|
|
|
|
+ for (User user: informUser) {
|
|
|
|
+ workProjectNotifyService
|
|
|
|
+ .save(UtilNotify
|
|
|
|
+ .saveNotify(workReimbursementReplenish.getId(),
|
|
|
|
+ user,
|
|
|
|
+ workReimbursementReplenish.getCompanyId(),
|
|
|
|
+ title,
|
|
|
|
+ str,
|
|
|
|
+ "111",
|
|
|
|
+ "0",
|
|
|
|
+ "待通知",
|
|
|
|
+ notifyRole));
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ } else {
|
|
|
|
+ WorkProjectNotify notify = new WorkProjectNotify();
|
|
|
|
+ notify.setNotifyId(workReimbursementReplenish.getId());
|
|
|
|
+ userList = workProjectNotifyService.readByNotifyId(notify);
|
|
|
|
+ if (StringUtils.isNotBlank(workReimbursementReplenish.getStatus()) && !workReimbursementReplenish.getStatus().equals("3")){
|
|
|
|
+ workReimbursementReplenish.setStatus("4");
|
|
|
|
+ workProjectNotifyService
|
|
|
|
+ .save(UtilNotify
|
|
|
|
+ .saveNotify(workReimbursementReplenish.getId(),
|
|
|
|
+ workReimbursementReplenish.getCreateBy(),
|
|
|
|
+ workReimbursementReplenish.getCompanyId(),
|
|
|
|
+ title,
|
|
|
|
+ str,
|
|
|
|
+ "111",
|
|
|
|
+ "0",
|
|
|
|
+ "待通知",
|
|
|
|
+ notifyRole));
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ workActivityProcessService.deleteProcessIdAuditUsers(workReimbursementReplenish.getProcessInstanceId());
|
|
|
|
+ } else {
|
|
|
|
+ if (StringUtils.isNotBlank(workActivityMenu.getProcessType()) && !workActivityMenu.getProcessType().equals("workReimbursementReplenish")) {
|
|
|
|
+ WorkProjectNotify notify = new WorkProjectNotify();
|
|
|
|
+ notify.setNotifyId(workReimbursementReplenish.getId());
|
|
|
|
+ userList = workProjectNotifyService.readByNotifyId(notify);
|
|
|
|
+ //users.addAll(userList);
|
|
|
|
+ WorkProjectNotify workProjectNotify = UtilNotify
|
|
|
|
+ .saveNotify(workReimbursementReplenish.getId(),
|
|
|
|
+ new User(),
|
|
|
|
+ workReimbursementReplenish.getCompanyId(),
|
|
|
|
+ title,
|
|
|
|
+ str,
|
|
|
|
+ "111",
|
|
|
|
+ "0",
|
|
|
|
+ "待审批",
|
|
|
|
+ notifyRole);
|
|
|
|
+ List<WorkProjectNotify> workProjectNotifys = activityService.getByFlagAndTaskDefKeyList(
|
|
|
|
+ activities,
|
|
|
|
+ workProjectNotify,
|
|
|
|
+ taskDefKey,
|
|
|
|
+ workReimbursementReplenish.getAct().getFlag(),
|
|
|
|
+ taskCount,
|
|
|
|
+ workReimbursementReplenish.getCreateBy(),
|
|
|
|
+ workReimbursementReplenish.getOfficeId(),
|
|
|
|
+ "8");
|
|
|
|
+ for (WorkProjectNotify workProjectNotify1:workProjectNotifys){
|
|
|
|
+ users.add(workProjectNotify1.getUser());
|
|
|
|
+ workProjectNotify1.setId("");
|
|
|
|
+ workProjectNotify1.setIsNewRecord(false);
|
|
|
|
+ workProjectNotifyService
|
|
|
|
+ .save(workProjectNotify1);
|
|
|
|
+ if (!"modifyApply".equals(taskDefKey)){
|
|
|
|
+ Map<String,Object> extras = new HashMap<>();
|
|
|
|
+ if ("cw".equals(taskDefKey) || "cn".equals(taskDefKey) ){
|
|
|
|
+ extras.put("type","7001");
|
|
|
|
+ }else {
|
|
|
|
+ extras.put("type","7002");
|
|
|
|
+ }
|
|
|
|
+ extras.put("id",workProjectNotify.getId());
|
|
|
|
+ extras.put("procDefKey","111");
|
|
|
|
+ UserUtils.pushInfoToApp(title,str,extras,workProjectNotify1.getUser().getId());
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ } else {
|
|
|
|
+ if (!"yes".equals(workReimbursementReplenish.getAct().getFlag())) {//驳回待办
|
|
|
|
+ title = "报销【" + workReimbursement.getNumber() + "】申请被驳回";
|
|
|
|
+ str = "报销【" + workReimbursement.getNumber() + "】申请被驳回,请选择重新申请或作废";
|
|
|
|
+ WorkProjectNotify notify = new WorkProjectNotify();
|
|
|
|
+ notify.setNotifyId(workReimbursementReplenish.getId());
|
|
|
|
+ userList = workProjectNotifyService.readByNotifyId(notify);
|
|
|
|
+ //users.addAll(userList);
|
|
|
|
+ workProjectNotifyService
|
|
|
|
+ .save(UtilNotify
|
|
|
|
+ .saveNotify(workReimbursementReplenish.getId(),
|
|
|
|
+ workReimbursementReplenish.getCreateBy(),
|
|
|
|
+ workReimbursementReplenish.getCompanyId(),
|
|
|
|
+ title,
|
|
|
|
+ str,
|
|
|
|
+ "111",
|
|
|
|
+ "0",
|
|
|
|
+ "重新申请",
|
|
|
|
+ notifyRole));
|
|
|
|
+ users.add( workReimbursementReplenish.getCreateBy());
|
|
|
|
+ } else {
|
|
|
|
+ if (StringUtils.isNotBlank(enname)) {//驳回重新申请待办
|
|
|
|
+ title = "报销【" + workReimbursement.getNumber() + "】申请待审批";
|
|
|
|
+ str = "报销【" + workReimbursement.getNumber() + "】申请待审批,经办人:" + userName+",总金额:"+workReimbursement.getMoney();
|
|
|
|
+ WorkProjectNotify notify = new WorkProjectNotify();
|
|
|
|
+ notify.setNotifyId(workReimbursementReplenish.getId());
|
|
|
|
+ userList = workProjectNotifyService.readByNotifyId(notify);
|
|
|
|
+ //users.addAll(userList1);
|
|
|
|
+ WorkProjectNotify workProjectNotify = UtilNotify
|
|
|
|
+ .saveNotify(workReimbursementReplenish.getId(),
|
|
|
|
+ new User(),
|
|
|
|
+ workReimbursementReplenish.getCompanyId(),
|
|
|
|
+ title,
|
|
|
|
+ str,
|
|
|
|
+ "111",
|
|
|
|
+ "0",
|
|
|
|
+ "待审批",
|
|
|
|
+ notifyRole);
|
|
|
|
+ users.addAll(auditUsers);
|
|
|
|
+ for (User user1:auditUsers){
|
|
|
|
+ workProjectNotify.setId("");
|
|
|
|
+ workProjectNotify.setUser(user1);
|
|
|
|
+ workProjectNotify.setIsNewRecord(false);
|
|
|
|
+ workProjectNotifyService
|
|
|
|
+ .save(workProjectNotify);
|
|
|
|
+ if (!"modifyApply".equals(taskDefKey)){
|
|
|
|
+ Map<String,Object> extras = new HashMap<>();
|
|
|
|
+ if ("cw".equals(taskDefKey) || "cn".equals(taskDefKey) ){
|
|
|
|
+ extras.put("type","7001");
|
|
|
|
+ }else {
|
|
|
|
+ extras.put("type","7002");
|
|
|
|
+ }
|
|
|
|
+ extras.put("id",workProjectNotify.getId());
|
|
|
|
+ extras.put("procDefKey","102");
|
|
|
|
+ UserUtils.pushInfoToApp(title,str,extras,user1.getId());
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }else {
|
|
|
|
+ WorkProjectNotify notify = new WorkProjectNotify();
|
|
|
|
+ notify.setNotifyId(workReimbursementReplenish.getId());
|
|
|
|
+ userList = workProjectNotifyService.readByNotifyId(notify);
|
|
|
|
+ users.addAll(userList);
|
|
|
|
+ users.add(workReimbursementReplenish.getCreateBy());
|
|
|
|
+ workProjectNotifyService
|
|
|
|
+ .save(UtilNotify
|
|
|
|
+ .saveNotify(workReimbursementReplenish.getId(),
|
|
|
|
+ workReimbursementReplenish.getCreateBy(),
|
|
|
|
+ workReimbursementReplenish.getCompanyId(),
|
|
|
|
+ title,
|
|
|
|
+ str,
|
|
|
|
+ "111",
|
|
|
|
+ "0",
|
|
|
|
+ "重新申请",
|
|
|
|
+ notifyRole));
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if (users!=null && users.size()!=0) {
|
|
|
|
+ for (User u : users) {
|
|
|
|
+ UserUtils.pushIm(u.getId(),str);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if (userList!=null && userList.size()!=0) {
|
|
|
|
+ for (User u : userList) {
|
|
|
|
+ UserUtils.pushMeIm(u.getId());
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ workReimbursementReplenishDao.update(workReimbursementReplenish);
|
|
|
|
+ return "保存审核意见成功!";
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 报销作废:强制撤销
|
|
|
|
+ * @param workReimbursementReplenish
|
|
|
|
+ */
|
|
|
|
+ @Transactional(readOnly = false)
|
|
|
|
+ public void cancelInvalidate(WorkReimbursementReplenish workReimbursementReplenish) {
|
|
|
|
+ String invalidateProcessInstanceId = workReimbursementReplenish.getProcessInstanceId();
|
|
|
|
+ try {
|
|
|
|
+ //将流程图中尚未走到的task的流程追踪信息逻辑删除,添加一条"撤销"流程追踪信息
|
|
|
|
+ WorkActivityProcess process = new WorkActivityProcess();
|
|
|
|
+ process.setProcessInstanceId(workReimbursementReplenish.getProcessInstanceId());
|
|
|
|
+ process.setIsApproval("0");
|
|
|
|
+ //List<WorkActivityProcess> processList1 = workActivityProcessService.findByProcInsId(process);
|
|
|
|
+ WorkActivityProcess workActivityProcess = new WorkActivityProcess();
|
|
|
|
+ workActivityProcess.setProcessInstanceId(workReimbursementReplenish.getProcessInstanceId());
|
|
|
|
+ List<WorkActivityProcess> processList = workActivityProcessService.findList(workActivityProcess);
|
|
|
|
+ WorkProjectNotify notify = new WorkProjectNotify();
|
|
|
|
+ notify.setNotifyId(workReimbursementReplenish.getId());
|
|
|
|
+ List<User> userList = workProjectNotifyService.readByNotifyId(notify);
|
|
|
|
+ if (userList!=null && userList.size()!=0) {
|
|
|
|
+ for (User u : userList) {
|
|
|
|
+ User user = UserUtils.get(u.getId());
|
|
|
|
+ UserUtils.pushMeIm(user.getId());
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if(processList!=null && processList.size()>0){
|
|
|
|
+ for (int i =0;i<processList.size();i++) {
|
|
|
|
+ WorkActivityProcess p = processList.get(i);
|
|
|
|
+ if(StringUtils.isNotBlank(p.getIsApproval()) && "0".equals(p.getIsApproval())){
|
|
|
|
+ p.setDelFlag("1");
|
|
|
|
+ p.setIsApproval("-1");
|
|
|
|
+ workActivityProcessDao.updateDelFlagAndIsApproval(p);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ WorkActivityProcess pro = new WorkActivityProcess();
|
|
|
|
+ pro.setId("");
|
|
|
|
+ pro.setDelFlag("0");
|
|
|
|
+ pro.preInsert();
|
|
|
|
+ pro.setRemarks("[强制撤销]");
|
|
|
|
+ pro.setProcessKey(processList.get(0).getProcessKey());
|
|
|
|
+ pro.setIsApproval("1");
|
|
|
|
+ pro.setProcessInstanceId(processList.get(0).getProcessInstanceId());
|
|
|
|
+ pro.setCount(0);
|
|
|
|
+ workActivityProcessDao.insert(pro);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ //结束该流程,设为"撤销"状态
|
|
|
|
+ actTaskService.endProcessInstance(invalidateProcessInstanceId,"报销文件补充-强制撤销");
|
|
|
|
+ workReimbursementReplenish.setStatus("3");
|
|
|
|
+ workReimbursementReplenish.preUpdate();
|
|
|
|
+ workReimbursementReplenishDao.update(workReimbursementReplenish);
|
|
|
|
+ }catch (ActivitiObjectNotFoundException e){
|
|
|
|
+ System.err.println("撤销报销补充异常,因为这个流程已不存在!");
|
|
|
|
+ e.printStackTrace();
|
|
|
|
+ logger.error("Exception e:"+e);
|
|
|
|
+ }
|
|
|
|
+ catch (Exception e) {
|
|
|
|
+ e.printStackTrace();
|
|
|
|
+ logger.error("Exception e:"+e);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+}
|