|
@@ -9,6 +9,7 @@ import com.alibaba.fastjson.JSONArray;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.alibaba.fastjson.serializer.SerializerFeature;
|
|
|
import com.google.common.collect.Lists;
|
|
|
+import com.google.gson.Gson;
|
|
|
import com.jeeplus.common.config.Global;
|
|
|
import com.jeeplus.common.oss.OSSClientUtil;
|
|
|
import com.jeeplus.common.persistence.Page;
|
|
@@ -110,6 +111,8 @@ import com.jeeplus.modules.szCenterservice.service.szCloud.SzFlowRequest;
|
|
|
import com.jeeplus.modules.szCenterservice.task.SzTaskFlowService;
|
|
|
import com.jeeplus.modules.szCenterservice.utils.SzConvertServiceUtil;
|
|
|
import com.jeeplus.modules.test.service.act.ActTestService;
|
|
|
+import com.jeeplus.modules.workOrder.dao.WorkOrderDao;
|
|
|
+import com.jeeplus.modules.workOrder.entity.WorkOrderProcessing;
|
|
|
import com.jeeplus.modules.workactivity.entity.WorkActivityProcess;
|
|
|
import com.jeeplus.modules.workactivity.service.WorkActivityProcessService;
|
|
|
import com.jeeplus.modules.workadministrativeatamp.entity.WorkAdministrativeAtamp;
|
|
@@ -229,10 +232,8 @@ import com.jeeplus.modules.workregularapply.service.WorkRegularApplyService;
|
|
|
import com.jeeplus.modules.workregularapply.service.WorkRegularScoreService;
|
|
|
import com.jeeplus.modules.workreimbur.entity.WorkReimbur;
|
|
|
import com.jeeplus.modules.workreimbur.service.WorkReimburService;
|
|
|
-import com.jeeplus.modules.workreimbursement.entity.ReimbursementVATTax;
|
|
|
-import com.jeeplus.modules.workreimbursement.entity.WorkReimbursement;
|
|
|
-import com.jeeplus.modules.workreimbursement.entity.WorkReimbursementReplenish;
|
|
|
-import com.jeeplus.modules.workreimbursement.entity.WorkReimbursementTypeInfo;
|
|
|
+import com.jeeplus.modules.workreimbursement.dao.ReimbursementVATTaxStatusDao;
|
|
|
+import com.jeeplus.modules.workreimbursement.entity.*;
|
|
|
import com.jeeplus.modules.workreimbursement.service.WorkReimbursementReplenishService;
|
|
|
import com.jeeplus.modules.workreimbursement.service.WorkReimbursementService;
|
|
|
import com.jeeplus.modules.workreimbursement.service.WorkReimbursementTypeService;
|
|
@@ -279,6 +280,7 @@ import javax.validation.ConstraintViolationException;
|
|
|
import java.text.SimpleDateFormat;
|
|
|
import java.util.*;
|
|
|
import java.util.concurrent.*;
|
|
|
+import java.util.stream.Collectors;
|
|
|
|
|
|
/**
|
|
|
* 通知Controller
|
|
@@ -607,6 +609,10 @@ public class WorkProjectNotifyController extends BaseController {
|
|
|
@Autowired
|
|
|
private SzFlowRequest flowRequest;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private ReimbursementVATTaxStatusDao reimbursementVATTaxStatusDao;
|
|
|
+
|
|
|
+
|
|
|
@ModelAttribute
|
|
|
public WorkProjectNotify get(@RequestParam(required = false) String id) {
|
|
|
WorkProjectNotify entity = null;
|
|
@@ -10623,10 +10629,42 @@ public class WorkProjectNotifyController extends BaseController {
|
|
|
|
|
|
}
|
|
|
|
|
|
+ String isChangeStatus = "0";
|
|
|
+ WorkActivityProcess workActivityProcess = new WorkActivityProcess();
|
|
|
+ workActivityProcess.setProcessInstanceId(workReimbursement.getProcessInstanceId());
|
|
|
+ workActivityProcess.setIsApproval("0");
|
|
|
+ List<WorkActivityProcess> lists = workActivityProcessService.findByProcInsIdAudit(workActivityProcess);
|
|
|
+ WorkActivityProcess workActivity = lists.get(0);
|
|
|
+ SysRoleActivity role = workActivity.getActivity().getRole();
|
|
|
+ String enname = role.getEnname();
|
|
|
+ if("cwzg".equals(enname) || "cwygevod".equals(enname)){
|
|
|
+ isChangeStatus = "1";
|
|
|
+ }
|
|
|
if(null != workReimbursement.getReimbursementElectronicInvoiceVATTaxes() && workReimbursement.getReimbursementElectronicInvoiceVATTaxes().size()>0){
|
|
|
+ List<ReimbursementVATTax> reimbursementVATTaxes = workReimbursement.getReimbursementVATTaxes();
|
|
|
+ ReimbursementVATTaxStatus reimbursementVATTaxStatus = new ReimbursementVATTaxStatus();
|
|
|
+ User currentUser = UserUtils.getUser();
|
|
|
+ reimbursementVATTaxStatus.setUserId(currentUser.getId());
|
|
|
+ reimbursementVATTaxStatus.setReimbursementId(workReimbursement.getId());
|
|
|
+ List<ReimbursementVATTaxStatus> VATTaxStatusList = reimbursementVATTaxStatusDao.findList(reimbursementVATTaxStatus);
|
|
|
+
|
|
|
+ Map<String, String> statusMap = VATTaxStatusList.stream()
|
|
|
+ .collect(Collectors.toMap(
|
|
|
+ ReimbursementVATTaxStatus::getVatTaxId, // 返回String类型
|
|
|
+ ReimbursementVATTaxStatus::getStatus,
|
|
|
+ (existing, replacement) -> existing
|
|
|
+ ));
|
|
|
//获取专业类型
|
|
|
List<MainDictDetail> certificateMajor = DictUtils.getMainDictList("invoiceReimbursementType");
|
|
|
for (ReimbursementVATTax vatTax : workReimbursement.getReimbursementElectronicInvoiceVATTaxes()) {
|
|
|
+ //判断状态
|
|
|
+ String status = statusMap.get(vatTax.getId());
|
|
|
+ if (status != null) {
|
|
|
+ vatTax.setVatTaxStatus(status);
|
|
|
+ } else {
|
|
|
+ vatTax.setVatTaxStatus("0"); // 默认字符串"0"
|
|
|
+ }
|
|
|
+
|
|
|
for (MainDictDetail dictDetail : certificateMajor) {
|
|
|
if(dictDetail.getValue().equals(vatTax.getInvoiceType())){
|
|
|
vatTax.setInvoiceTypeStr(dictDetail.getLabel());
|
|
@@ -10641,6 +10679,7 @@ public class WorkProjectNotifyController extends BaseController {
|
|
|
model.addAttribute("identification","workreimbursement");
|
|
|
model.addAttribute("identificationName","报销审核意见");
|
|
|
model.addAttribute("pageFlag",workProjectNotify.getPageFlag());
|
|
|
+ model.addAttribute("isChangeStatus",isChangeStatus);
|
|
|
/*if (workReimbursement.getAct() != null && StringUtils.isNotBlank(workReimbursement.getAct().getTaskDefKey()) && "cw".equals(workReimbursement.getAct().getTaskDefKey())) {
|
|
|
return "modules/workreimbursement/new/workReimbursementCWNewAudit";
|
|
|
}*/
|