|
@@ -175,6 +175,7 @@ import com.jeeplus.modules.workgoout.service.GoOutService;
|
|
import com.jeeplus.modules.workincomingmessage.entity.WorkIncomingMessage;
|
|
import com.jeeplus.modules.workincomingmessage.entity.WorkIncomingMessage;
|
|
import com.jeeplus.modules.workincomingmessage.service.WorkIncomingMessageService;
|
|
import com.jeeplus.modules.workincomingmessage.service.WorkIncomingMessageService;
|
|
import com.jeeplus.modules.workinvoice.entity.WorkInvoice;
|
|
import com.jeeplus.modules.workinvoice.entity.WorkInvoice;
|
|
|
|
+import com.jeeplus.modules.workinvoice.entity.WorkInvoiceProjectRelation;
|
|
import com.jeeplus.modules.workinvoice.service.WorkInvoiceService;
|
|
import com.jeeplus.modules.workinvoice.service.WorkInvoiceService;
|
|
import com.jeeplus.modules.workinvoicealter.entity.WorkInvoiceAlter;
|
|
import com.jeeplus.modules.workinvoicealter.entity.WorkInvoiceAlter;
|
|
import com.jeeplus.modules.workinvoicealter.service.WorkInvoiceAlterService;
|
|
import com.jeeplus.modules.workinvoicealter.service.WorkInvoiceAlterService;
|
|
@@ -2387,77 +2388,8 @@ public class WorkProjectNotifyController extends BaseController {
|
|
return "modules/workinvoice/workInvoiceExamineModify";
|
|
return "modules/workinvoice/workInvoiceExamineModify";
|
|
}
|
|
}
|
|
} else if (workProjectNotify.getType().equals("213")) { //非项目开票管理
|
|
} else if (workProjectNotify.getType().equals("213")) { //非项目开票管理
|
|
- WorkInvoice workInvoice = workInvoiceService.get(workProjectNotify.getNotifyId());
|
|
|
|
- if (StringUtils.isNotBlank(workInvoice.getId())) {
|
|
|
|
- workInvoiceService.queryDetails(workInvoice);
|
|
|
|
- }
|
|
|
|
- if (StringUtils.isNotBlank(workProjectNotify.getHome())) {
|
|
|
|
- workInvoice.setHome(workProjectNotify.getHome());
|
|
|
|
- } else {
|
|
|
|
- workInvoice.setHome("home");
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- //查询关联红冲发票的开票号
|
|
|
|
- if("1".equals(workInvoice.getRedInvoiceFlag()) && StringUtils.isNotBlank(workInvoice.getRedInvoiceRelevancyId())){
|
|
|
|
- String invoiceNumberStr = workInvoiceService.getInvoiceNumberStr(workInvoice.getRedInvoiceRelevancyId());
|
|
|
|
- workInvoice.setInvoiceNumberStr(invoiceNumberStr);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- //获取发票开户银行信息
|
|
|
|
- String bankName = workInvoiceService.getBankNameByNameOrId(workInvoice.getBank());
|
|
|
|
- if (StringUtils.isNotBlank(bankName)) {
|
|
|
|
- workInvoice.setBank(bankName);
|
|
|
|
- }
|
|
|
|
- workInvoice.setAct(getByAct(workInvoice.getProcessInstanceId()));
|
|
|
|
- String taskDefKey = workInvoice.getAct().getTaskDefKey();
|
|
|
|
- model.addAttribute("workInvoice", workInvoice);
|
|
|
|
- if (workProjectNotify.getRemarks().contains("待通知") || "view".equals(workProjectNotify.getView())) {
|
|
|
|
|
|
|
|
- List<MainDictDetail> billingContentList = DictUtils.getMainDictList("billing_content");
|
|
|
|
- for (MainDictDetail dictDetail : billingContentList) {
|
|
|
|
- if (workInvoice.getBillingContent().equals(dictDetail.getValue())) {
|
|
|
|
- workInvoice.setBillingContent(dictDetail.getLabel());
|
|
|
|
- break;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- List<MainDictDetail> receiptTypeList = DictUtils.getMainDictList("receipt_type");
|
|
|
|
- for (MainDictDetail dictDetail : receiptTypeList) {
|
|
|
|
- if (workInvoice.getChargeType().equals(dictDetail.getValue())) {
|
|
|
|
- workInvoice.setChargeType(dictDetail.getLabel());
|
|
|
|
- break;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- return "modules/workinvoice/workInvoiceView";
|
|
|
|
- } else if (workProjectNotify.getRemarks().contains("待审批") && !"1".equals(workProjectNotify.getStatus())) {
|
|
|
|
-
|
|
|
|
- List<MainDictDetail> billingContentList = DictUtils.getMainDictList("billing_content");
|
|
|
|
- for (MainDictDetail dictDetail : billingContentList) {
|
|
|
|
- if (workInvoice.getBillingContent().equals(dictDetail.getValue())) {
|
|
|
|
- workInvoice.setBillingContent(dictDetail.getLabel());
|
|
|
|
- break;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- List<MainDictDetail> receiptTypeList = DictUtils.getMainDictList("receipt_type");
|
|
|
|
- for (MainDictDetail dictDetail : receiptTypeList) {
|
|
|
|
- if (workInvoice.getChargeType().equals(dictDetail.getValue())) {
|
|
|
|
- workInvoice.setChargeType(dictDetail.getLabel());
|
|
|
|
- break;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- model.addAttribute("identification", "workinvoice");
|
|
|
|
- model.addAttribute("identificationName", "发票审核意见");
|
|
|
|
- if (StringUtils.isNotBlank(taskDefKey) && ("bmzr".equals(taskDefKey) ||
|
|
|
|
- "scbzr".equals(taskDefKey)) || "zjl".equals(taskDefKey)) {
|
|
|
|
- return "modules/workinvoice/workInvoiceNotProjectAudit";
|
|
|
|
- } else if (StringUtils.isNotBlank(taskDefKey) && "fpgly".equals(taskDefKey)) {
|
|
|
|
- workInvoice.setDrawerName(UserUtils.getUser().getName());
|
|
|
|
- workInvoice.setInvoiceDate(new Date());
|
|
|
|
- model.addAttribute("workInvoice", workInvoice);
|
|
|
|
- return "modules/workinvoice/workInvoiceNotProjectAuditEnd";
|
|
|
|
- }
|
|
|
|
- } else if (workProjectNotify.getRemarks().contains("重新申请") && !"1".equals(workProjectNotify.getStatus())) {
|
|
|
|
- return "modules/workinvoice/workInvoiceNotProjectModify";
|
|
|
|
- }
|
|
|
|
|
|
+ return this.getNotProjectWorkInvoice(workProjectNotify, model);
|
|
} else if (workProjectNotify.getType().equals("214")) { //分公司非项目开票管理
|
|
} else if (workProjectNotify.getType().equals("214")) { //分公司非项目开票管理
|
|
FilialeWorkInvoice workInvoice = filialeWorkInvoiceService.get(workProjectNotify.getNotifyId());
|
|
FilialeWorkInvoice workInvoice = filialeWorkInvoiceService.get(workProjectNotify.getNotifyId());
|
|
if (StringUtils.isNotBlank(workInvoice.getId())) {
|
|
if (StringUtils.isNotBlank(workInvoice.getId())) {
|
|
@@ -10906,4 +10838,111 @@ public class WorkProjectNotifyController extends BaseController {
|
|
return "modules/workinvoice/workInvoiceView";
|
|
return "modules/workinvoice/workInvoiceView";
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ * 业务用章申请
|
|
|
|
+ * @param workProjectNotify
|
|
|
|
+ * @param model
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ private String getNotProjectWorkInvoice(WorkProjectNotify workProjectNotify,Model model) {
|
|
|
|
+ WorkInvoice workInvoice = workInvoiceService.get(workProjectNotify.getNotifyId());
|
|
|
|
+ if (StringUtils.isNotBlank(workInvoice.getId())) {
|
|
|
|
+ workInvoiceService.queryDetails(workInvoice);
|
|
|
|
+ }
|
|
|
|
+ if (StringUtils.isNotBlank(workProjectNotify.getHome())) {
|
|
|
|
+ workInvoice.setHome(workProjectNotify.getHome());
|
|
|
|
+ } else {
|
|
|
|
+ workInvoice.setHome("home");
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ //查询关联红冲发票的开票号
|
|
|
|
+ if("1".equals(workInvoice.getRedInvoiceFlag()) && StringUtils.isNotBlank(workInvoice.getRedInvoiceRelevancyId())){
|
|
|
|
+ String invoiceNumberStr = workInvoiceService.getInvoiceNumberStr(workInvoice.getRedInvoiceRelevancyId());
|
|
|
|
+ workInvoice.setInvoiceNumberStr(invoiceNumberStr);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ //获取发票开户银行信息
|
|
|
|
+ /*String bankName = workInvoiceService.getBankNameByNameOrId(workInvoice.getBank());
|
|
|
|
+ if (StringUtils.isNotBlank(bankName)) {
|
|
|
|
+ workInvoice.setBank(bankName);
|
|
|
|
+ }*/
|
|
|
|
+ workInvoice.setAct(getByAct(workInvoice.getProcessInstanceId()));
|
|
|
|
+ String taskDefKey = workInvoice.getAct().getTaskDefKey();
|
|
|
|
+ model.addAttribute("workInvoice", workInvoice);
|
|
|
|
+ if (workProjectNotify.getRemarks().contains("待通知") || "view".equals(workProjectNotify.getView())) {
|
|
|
|
+
|
|
|
|
+ List<MainDictDetail> billingContentList = DictUtils.getMainDictList("billing_content");
|
|
|
|
+ for (MainDictDetail dictDetail : billingContentList) {
|
|
|
|
+ if (workInvoice.getBillingContent().equals(dictDetail.getValue())) {
|
|
|
|
+ workInvoice.setBillingContent(dictDetail.getLabel());
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ List<MainDictDetail> receiptTypeList = DictUtils.getMainDictList("receipt_type");
|
|
|
|
+ for (MainDictDetail dictDetail : receiptTypeList) {
|
|
|
|
+ if (workInvoice.getChargeType().equals(dictDetail.getValue())) {
|
|
|
|
+ workInvoice.setChargeType(dictDetail.getLabel());
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ //判定 项目是否是非项目,如果是非项目 是否存在合同名称,如果没有关联合同,则合同名称处以-----进行展示
|
|
|
|
+ if(workInvoice.getWorkInvoiceProjectRelationList().size()>0){
|
|
|
|
+ List<WorkInvoiceProjectRelation> workInvoiceProjectRelationList = workInvoice.getWorkInvoiceProjectRelationList();
|
|
|
|
+ for (WorkInvoiceProjectRelation workInvoiceProjectRelation : workInvoiceProjectRelationList) {
|
|
|
|
+ if(2 == workInvoiceProjectRelation.getIsProject()){
|
|
|
|
+ //判定是否存在合同信息,若不存在,则合同名称展示------
|
|
|
|
+ if(StringUtils.isBlank(workInvoiceProjectRelation.getWorkContractName())){
|
|
|
|
+ workInvoiceProjectRelation.setWorkContractName("————————————");
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ return "modules/workinvoice/workInvoiceView";
|
|
|
|
+ } else if (workProjectNotify.getRemarks().contains("待审批") && !"1".equals(workProjectNotify.getStatus())) {
|
|
|
|
+
|
|
|
|
+ List<MainDictDetail> billingContentList = DictUtils.getMainDictList("billing_content");
|
|
|
|
+ for (MainDictDetail dictDetail : billingContentList) {
|
|
|
|
+ if (workInvoice.getBillingContent().equals(dictDetail.getValue())) {
|
|
|
|
+ workInvoice.setBillingContent(dictDetail.getLabel());
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ List<MainDictDetail> receiptTypeList = DictUtils.getMainDictList("receipt_type");
|
|
|
|
+ for (MainDictDetail dictDetail : receiptTypeList) {
|
|
|
|
+ if (workInvoice.getChargeType().equals(dictDetail.getValue())) {
|
|
|
|
+ workInvoice.setChargeType(dictDetail.getLabel());
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ //判定 项目是否是非项目,如果是非项目 是否存在合同名称,如果没有关联合同,则合同名称处以-----进行展示
|
|
|
|
+ if(workInvoice.getWorkInvoiceProjectRelationList().size()>0){
|
|
|
|
+ List<WorkInvoiceProjectRelation> workInvoiceProjectRelationList = workInvoice.getWorkInvoiceProjectRelationList();
|
|
|
|
+ for (WorkInvoiceProjectRelation workInvoiceProjectRelation : workInvoiceProjectRelationList) {
|
|
|
|
+ if(2 == workInvoiceProjectRelation.getIsProject()){
|
|
|
|
+ //判定是否存在合同信息,若不存在,则合同名称展示------
|
|
|
|
+ if(StringUtils.isBlank(workInvoiceProjectRelation.getWorkContractName())){
|
|
|
|
+ workInvoiceProjectRelation.setWorkContractName("————————————");
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ model.addAttribute("identification", "workinvoice");
|
|
|
|
+ model.addAttribute("identificationName", "发票审核意见");
|
|
|
|
+ if (StringUtils.isNotBlank(taskDefKey) && ("bmzr".equals(taskDefKey) ||
|
|
|
|
+ "scbzr".equals(taskDefKey)) || "zjl".equals(taskDefKey)) {
|
|
|
|
+ return "modules/workinvoice/workInvoiceNotProjectAudit";
|
|
|
|
+ } else if (StringUtils.isNotBlank(taskDefKey) && "fpgly".equals(taskDefKey)) {
|
|
|
|
+ workInvoice.setDrawerName(UserUtils.getUser().getName());
|
|
|
|
+ workInvoice.setInvoiceDate(new Date());
|
|
|
|
+ model.addAttribute("workInvoice", workInvoice);
|
|
|
|
+ return "modules/workinvoice/workInvoiceNotProjectAuditEnd";
|
|
|
|
+ }
|
|
|
|
+ } else if (workProjectNotify.getRemarks().contains("重新申请") && !"1".equals(workProjectNotify.getStatus())) {
|
|
|
|
+ return "modules/workinvoice/workInvoiceNotProjectModify";
|
|
|
|
+ }
|
|
|
|
+ return "modules/workinvoice/workInvoiceView";
|
|
|
|
+ }
|
|
|
|
+
|
|
}
|
|
}
|