Selaa lähdekoodia

项目添加:数字化项目审核。发票功能调整

user5 1 vuosi sitten
vanhempi
commit
3874e1df67

+ 1 - 1
src/main/java/com/jeeplus/modules/projectrecord/service/ProjectRecordsService.java

@@ -1061,7 +1061,7 @@ public class ProjectRecordsService extends CrudService<ProjectRecordsDao, Projec
 						notifyRole = "审批通过";
 						//首先根据项目id查询是否已经存在报告号,若没有则生成对应报告号,否则不进行生成新的报告号
 						ReportNum reportNumber = projectReportNumDao.getByProjectId(projectRecords.getId());
-						if(null != reportNumber && StringUtils.isNotBlank(reportNumber.getNum())){
+						if(null == reportNumber){
 							//审批通过则需要给该项目添加一个报告前缀信息
 							String num = serialNumTplService.genSerialNum(UserUtils.getUser().getCompany(), "92");
 							ReportNum reportNum = new ReportNum();

+ 19 - 2
src/main/java/com/jeeplus/modules/ruralprojectrecords/service/RuralProjectRecordsService.java

@@ -776,7 +776,7 @@ public class RuralProjectRecordsService extends CrudService<RuralProjectRecordsD
 					}
 				} else if ("2".equals(projectRecords.getProjectType())) {	//造价审核
 					//预算审核、结算审核、分包审核 需要纸质归档
-					if ("2".equals(projectRecords.getAttachmentProjectSort()) || "4".equals(projectRecords.getAttachmentProjectSort()) || "7".equals(projectRecords.getAttachmentProjectSort()) || "20".equals(projectRecords.getAttachmentProjectSort())) {
+					if ("2".equals(projectRecords.getAttachmentProjectSort()) || "4".equals(projectRecords.getAttachmentProjectSort()) || "7".equals(projectRecords.getAttachmentProjectSort()) || "20".equals(projectRecords.getAttachmentProjectSort()) || "10".equals(projectRecords.getAttachmentProjectSort())) {
 						assert createBy != null;
 						projectRecords.setPaperFilingStatus("");
 						projectRecords.setProjectId(serialNumTplService.genSerialNum(createBy.getCompany(), RuralProjectRecords.SERIAL_COST_BIZCODE));
@@ -798,7 +798,7 @@ public class RuralProjectRecordsService extends CrudService<RuralProjectRecordsD
 				}
 				break;
 			case "2":
-				if("5".equals(projectRecords.getAttachmentProjectSort()) || "6".equals(projectRecords.getAttachmentProjectSort()) || "8".equals(projectRecords.getAttachmentProjectSort()) || "20".equals(projectRecords.getAttachmentProjectSort())){
+				if("5".equals(projectRecords.getAttachmentProjectSort()) || "6".equals(projectRecords.getAttachmentProjectSort()) || "8".equals(projectRecords.getAttachmentProjectSort()) || "20".equals(projectRecords.getAttachmentProjectSort()) || "10".equals(projectRecords.getAttachmentProjectSort())){
 					projectRecords.setReportedState("10");
 				}else{
 					projectRecords.setReportedState(null);
@@ -3350,6 +3350,10 @@ public class RuralProjectRecordsService extends CrudService<RuralProjectRecordsD
 		List<RuralProjectRecords> projectRecordsList = dao.getProjectRecordListByAdvent(projectRecords);
 		projectRecordsList.addAll(projectRecordsExamineList);
 		for (RuralProjectRecords info: projectRecordsList) {
+			//判定 若项目类别为 数字化项目审核 则不进行考核
+			if("10".equals(info.getAttachmentProjectSort()) && "2".equals(info.getProjectType())){
+				continue;
+			}
 			String notifyStr = null;
 			String titleStr = null;
 			//如果当前时间大于过期时间
@@ -5437,6 +5441,10 @@ public class RuralProjectRecordsService extends CrudService<RuralProjectRecordsD
 		List<RuralProjectRecords> paperArchiveProjectReportedList = dao.getPaperArchiveProjectReportedList(projectRecords);
 
 		for (RuralProjectRecords info: paperArchiveProjectReportedList) {
+			//判定 若项目类别为 数字化项目审核 则不进行考核
+			if("10".equals(info.getAttachmentProjectSort()) && "2".equals(info.getProjectType())){
+				continue;
+			}
 			String notifyStr = null;
 			String titleStr = null;
 			//如果当前时间大于过期时间
@@ -5516,6 +5524,10 @@ public class RuralProjectRecordsService extends CrudService<RuralProjectRecordsD
 
 
 		for (RuralProjectRecords info: batchArchiveProjectReportedList) {
+			//判定 若项目类别为 数字化项目审核 则不进行考核
+			if("10".equals(info.getAttachmentProjectSort()) && "2".equals(info.getProjectType())){
+				continue;
+			}
 			String notifyStr = null;
 			String titleStr = null;
 			//如果当前时间大于过期时间
@@ -5585,6 +5597,11 @@ public class RuralProjectRecordsService extends CrudService<RuralProjectRecordsD
 	public void getJudgeAdvanceWeekNotice() {
 		List<RuralProjectRecords> judgeAdvanceWeekNotice = dao.findJudgeAdvanceWeekNotice();
 		for (RuralProjectRecords info : judgeAdvanceWeekNotice) {
+			//判定 若项目类别为 数字化项目审核 则不进行考核
+			if("10".equals(info.getAttachmentProjectSort()) && "2".equals(info.getProjectType())){
+				continue;
+			}
+
 			String notifyStr = null;
 			String titleStr = null;
 			//如果当前时间大于过期时间

+ 9 - 0
src/main/java/com/jeeplus/modules/workinvoice/entity/WorkInvoice.java

@@ -93,6 +93,7 @@ public class WorkInvoice extends ActEntity<WorkInvoice> {
 
 	private String accountCheckingUserId; //对账人id
 	private String accountCheckingUserName; //对账人名称
+	private String accountCheckingArea; //对账地区
 	private List<Workattachment> workAttachments;//附件
 
 	private Integer projectFlag ;	//1:项目,0:非项目
@@ -791,4 +792,12 @@ public class WorkInvoice extends ActEntity<WorkInvoice> {
 	public void setElectronicInvoiceFlag(Integer electronicInvoiceFlag) {
 		this.electronicInvoiceFlag = electronicInvoiceFlag;
 	}
+
+	public String getAccountCheckingArea() {
+		return accountCheckingArea;
+	}
+
+	public void setAccountCheckingArea(String accountCheckingArea) {
+		this.accountCheckingArea = accountCheckingArea;
+	}
 }

+ 11 - 0
src/main/java/com/jeeplus/modules/workinvoice/entity/WorkInvoiceExport.java

@@ -92,6 +92,7 @@ public class WorkInvoiceExport extends ActEntity<WorkInvoiceExport> {
 
 	private String accountCheckingUserId; //对账人id
 	private String accountCheckingUserName; //对账人名称
+	private String accountCheckingArea; //对账地区
 	private List<Workattachment> workAttachments;//附件
 	private Double receiptMoneyD; //已收款金额
 	private Double notReceiptMoneyD; //未收款金额
@@ -602,6 +603,16 @@ public class WorkInvoiceExport extends ActEntity<WorkInvoiceExport> {
 		this.accountCheckingUserName = accountCheckingUserName;
 	}
 
+	@ExcelField(title="对账地区", align=2, sort=17)
+	public String getAccountCheckingArea() {
+		return accountCheckingArea;
+	}
+
+	public void setAccountCheckingArea(String accountCheckingArea) {
+		this.accountCheckingArea = accountCheckingArea;
+	}
+
+
 	@ExcelField(title="发票编号", align=2, sort=11)
 	public String getWidNumber() {
 		return widNumber;

+ 0 - 5
src/main/java/com/jeeplus/modules/workreimbursement/service/WorkReimbursementNewService.java

@@ -588,7 +588,6 @@ public class WorkReimbursementNewService extends CrudService<WorkReimbursementDa
 
     @Transactional(readOnly = false)
     public void updateWorkReimbursementInfo(WorkReimbursement workReimbursement) {
-        try {
             for (WorkAccount workAccount : workReimbursement.getWorkAccountList()) {
                 if(null == workAccount.getId()){
                     continue;
@@ -736,10 +735,6 @@ public class WorkReimbursementNewService extends CrudService<WorkReimbursementDa
                 }
 
             }
-        }catch (Exception e){
-            logger.info("Exception e:"+ e);
-            return;
-        }
     }
     /**
      * 审核流程

+ 25 - 7
src/main/resources/mappings/modules/workinvoice/WorkInvoiceDao.xml

@@ -427,10 +427,12 @@
 				AND a.is_invalid = #{isInvalid}
 			</if>
 			<if test="area != null and area.id != null and area.id != ''">
-				AND a.area_parent_id LIKE
+				AND (a.area_parent_id LIKE
 				<if test="dbName == 'oracle'">'%'||#{area.id}||'%'</if>
 				<if test="dbName == 'mssql'">'%'+#{area.id}+'%'</if>
 				<if test="dbName == 'mysql'">concat('%',#{area.id},'%')</if>
+				or a.area_id = #{area.id}
+				)
 			</if>
 			<if test="(accountCheckingUserId != null and accountCheckingUserId != '') or (accountCheckingUserName != null and accountCheckingUserName != '')">
 				AND (a.account_checking_user_id = #{accountCheckingUserId} or sua.name like concat('%',#{accountCheckingUserName},'%'))
@@ -462,6 +464,7 @@
 			,wid.number as "widNumber"
 			,wid.total_money as "widTotalMoney"
 
+		,sa.name as "accountCheckingArea"
 		,ifnull(( SELECT wir.receipt_date FROM work_invoice_receipt wir WHERE wir.invoice_id = a.id ORDER BY wir.receipt_date DESC LIMIT 1 ),a.receipt_money_date) AS "receiptMoneyDate",
 		ifnull((select sum(wir.money) from work_invoice_receipt wir where wir.invoice_id = a.id ),0) as "receiptMoneyD"
 		FROM work_invoice a
@@ -479,6 +482,7 @@
 		left join project_report_data prds on rpr.id = prds.project_id
 		left join work_invoice_detail wid on a.id = wid.invoice_id
 		LEFT JOIN sys_user sua ON sua.id = a.account_checking_user_id
+		left join sys_area sa on sa.id = a.area_id
 		<where>
 			a.del_flag = #{DEL_FLAG_NORMAL}
 			<if test="number != null and number != ''">
@@ -592,10 +596,12 @@
 				AND a.billing_content = #{billingContent}
 			</if>
 			<if test="area != null and area.id != null and area.id != ''">
-				AND a.area_parent_id LIKE
+				AND (a.area_parent_id LIKE
 				<if test="dbName == 'oracle'">'%'||#{area.id}||'%'</if>
 				<if test="dbName == 'mssql'">'%'+#{area.id}+'%'</if>
 				<if test="dbName == 'mysql'">concat('%',#{area.id},'%')</if>
+				or a.area_id = #{area.id}
+				)
 			</if>
 			<if test="(accountCheckingUserId != null and accountCheckingUserId != '') or (accountCheckingUserName != null and accountCheckingUserName != '')">
 				AND (a.account_checking_user_id = #{accountCheckingUserId} or sua.name like concat('%',#{accountCheckingUserName},'%'))
@@ -796,10 +802,12 @@
 				AND (a.account_checking_user_id = #{accountCheckingUserId} or sua.name like concat('%',#{accountCheckingUserName},'%'))
 			</if>
 			<if test="area != null and area.id != null and area.id != ''">
-				AND a.area_parent_id LIKE
+				AND (a.area_parent_id LIKE
 				<if test="dbName == 'oracle'">'%'||#{area.id}||'%'</if>
 				<if test="dbName == 'mssql'">'%'+#{area.id}+'%'</if>
 				<if test="dbName == 'mysql'">concat('%',#{area.id},'%')</if>
+				or a.area_id = #{area.id}
+				)
 			</if>
 			<if test="number != null and number != ''">
 				AND a.number LIKE
@@ -924,6 +932,7 @@
 		(case when a.receipt_money = '0' then '否' when a.receipt_money = '1' then '是' when a.receipt_money = '2' then '部分收款' else '否' end) as receiptMoney,
 		a.cancellation_remark as "cancellationRemark",
 		a.account_checking_user_id as "accountCheckingUserId",
+		sa.name as "accountCheckingArea",
 		a.area_id as "area.id",
 		a.new_drawer_id as "newDrawerId",
 		a.new_drawer as "newDrawer",
@@ -959,6 +968,7 @@
 		LEFT JOIN sys_user sua ON sua.id = a.account_checking_user_id
 		left join work_invoice_detail wid on a.id = wid.invoice_id
 		LEFT join sys_office so on so.id = a.office_id
+		LEFT join sys_area sa on sa.id = a.area_id
 		left join work_invoice_receipt wir on wir.invoice_id = a.id
 		<where>
 			a.del_flag = #{DEL_FLAG_NORMAL}
@@ -1155,10 +1165,12 @@
 				AND a.billing_content = #{billingContent}
 			</if>
 			<if test="area != null and area.id != null and area.id != ''">
-				AND a.area_parent_id LIKE
+				AND (a.area_parent_id LIKE
 				<if test="dbName == 'oracle'">'%'||#{area.id}||'%'</if>
 				<if test="dbName == 'mssql'">'%'+#{area.id}+'%'</if>
 				<if test="dbName == 'mysql'">concat('%',#{area.id},'%')</if>
+				or a.area_id = #{area.id}
+				)
 			</if>
 			<if test="(accountCheckingUserId != null and accountCheckingUserId != '') or (accountCheckingUserName != null and accountCheckingUserName != '')">
 				AND (a.account_checking_user_id = #{accountCheckingUserId} or acu.name like concat('%',#{accountCheckingUserName},'%'))
@@ -1310,10 +1322,12 @@
 				AND a.is_invalid = #{isInvalid}
 			</if>
 			<if test="area != null and area.id != null and area.id != ''">
-				AND a.area_parent_id LIKE
+				AND (a.area_parent_id LIKE
 				<if test="dbName == 'oracle'">'%'||#{area.id}||'%'</if>
 				<if test="dbName == 'mssql'">'%'+#{area.id}+'%'</if>
 				<if test="dbName == 'mysql'">concat('%',#{area.id},'%')</if>
+				or a.area_id = #{area.id}
+				)
 			</if>
 			<if test="(accountCheckingUserId != null and accountCheckingUserId != '') or (accountCheckingUserName != null and accountCheckingUserName != '')">
 				AND (a.account_checking_user_id = #{accountCheckingUserId} or sua.name like concat('%',#{accountCheckingUserName},'%'))
@@ -1480,10 +1494,12 @@
 				AND a.is_invalid = #{isInvalid}
 			</if>
 			<if test="area != null and area.id != null and area.id != ''">
-				AND a.area_parent_id LIKE
+				AND (a.area_parent_id LIKE
 				<if test="dbName == 'oracle'">'%'||#{area.id}||'%'</if>
 				<if test="dbName == 'mssql'">'%'+#{area.id}+'%'</if>
 				<if test="dbName == 'mysql'">concat('%',#{area.id},'%')</if>
+				or a.area_id = #{area.id}
+				)
 			</if>
 			<if test="(accountCheckingUserId != null and accountCheckingUserId != '') or (accountCheckingUserName != null and accountCheckingUserName != '')">
 				AND (a.account_checking_user_id = #{accountCheckingUserId} or sua.name like concat('%',#{accountCheckingUserName},'%'))
@@ -1992,10 +2008,12 @@
 				AND a.is_invalid = #{isInvalid}
 			</if>
 			<if test="area != null and area.id != null and area.id != ''">
-				AND a.area_parent_id LIKE
+				AND (a.area_parent_id LIKE
 				<if test="dbName == 'oracle'">'%'||#{area.id}||'%'</if>
 				<if test="dbName == 'mssql'">'%'+#{area.id}+'%'</if>
 				<if test="dbName == 'mysql'">concat('%',#{area.id},'%')</if>
+				or a.area_id = #{area.id}
+				)
 			</if>
 			<if test="(accountCheckingUserId != null and accountCheckingUserId != '') or (accountCheckingUserName != null and accountCheckingUserName != '')">
 				AND (a.account_checking_user_id = #{accountCheckingUserId} or sua.name like concat('%',#{accountCheckingUserName},'%'))

+ 2 - 2
src/main/webapp/WEB-INF/tags/table/exportEIExcel.tag

@@ -2,9 +2,9 @@
 <%@ include file="/webpage/include/taglib.jsp"%>
 <%@ attribute name="url" type="java.lang.String" required="true"%>
 <%-- 使用方法: 1.将本tag写在查询的form之前;2.传入url --%>
-<button id="btnEIExport" class="layui-btn layui-btn-sm layui-bg-blue" style="background-color: #5FB878" data-toggle="tooltip" data-placement="left" title="导出电发票报销">
+<button id="btnEIExport" class="layui-btn layui-btn-sm layui-bg-blue" style="background-color: #5FB878" data-toggle="tooltip" data-placement="left" title="导出电发票报销">
 <%--    <i class="fa fa-file-excel-o"></i>--%>
-    导出电发票报销</button>
+    导出电发票报销</button>
 <script type="text/javascript">
 $(document).ready(function() {
 

+ 2 - 0
src/main/webapp/webpage/modules/workinvoice/workInvoiceAllList.jsp

@@ -679,6 +679,7 @@
 						return "<span title='"+ d.invoiceType +"'>" + d.invoiceType + "</span>";
 					}}
 
+				,{field:'accountCheckingArea',align:'center', sort:true,title: '对账地区',  width:90}
 				,{field:'invoiceDate',align:'center', sort:true,title: '开票日期',  width:90}
 				,{field:'receiptMoneyDate',align:'center', sort:true,title: '收款日期',  width:90}
 				,{field:'receiptMoney',align:'center', title: '是否收款',  width:90,templet:function(d){
@@ -799,6 +800,7 @@
                     ,"status":"${workInvoice.invoiceState}"
 					,"widNumber":"${workInvoice.widNumber}"
 					,"widTotalMoney":"${workInvoice.widTotalMoney}"
+					,"accountCheckingArea":"${workInvoice.accountCheckingArea}"
                     ,"money":"<fmt:formatNumber value="${workInvoice.money}" pattern="##0.00"/>"
                     ,"invoiceDate":"<fmt:formatDate value="${workInvoice.invoiceDate}" pattern="yyyy-MM-dd"/>"
                     ,"receiptMoneyDate":"<fmt:formatDate value="${workInvoice.receiptMoneyDate}" pattern="yyyy-MM-dd"/>"

+ 2 - 0
src/main/webapp/webpage/modules/workinvoice/workInvoiceAllTwoList.jsp

@@ -759,6 +759,7 @@
 						return "<span title='"+ d.invoiceType +"'>" + d.invoiceType + "</span>";
 					}}
 
+				,{field:'accountCheckingArea',align:'center', sort:true,title: '对账地区',  width:90}
 				,{field:'invoiceDate',align:'center', title: '开票日期',  width:90}
 				,{field:'receiptMoneyDate',align:'center', title: '收款日期',  width:90}
 				,{field:'receiptMoney',align:'center', title: '是否收款',  width:90,templet:function(d){
@@ -874,6 +875,7 @@
 					,"widNumber":"${workInvoice.widNumber}"
 					,"widTotalMoney":"${workInvoice.widTotalMoney}"
 					,"workAccountList":"${workInvoice.workAccountList}"
+					,"accountCheckingArea":"${workInvoice.accountCheckingArea}"
 					,"workAccountListStr":${fns:toJson(workInvoice.workAccountList)}
 					,"money":"<fmt:formatNumber value="${workInvoice.money}" pattern="##0.00"/>"
                     ,"invoiceDate":"<fmt:formatDate value="${workInvoice.invoiceDate}" pattern="yyyy-MM-dd"/>"

+ 2 - 0
src/main/webapp/webpage/modules/workinvoice/workInvoiceTwoList.jsp

@@ -801,6 +801,7 @@
 						return "<span title='"+ d.invoiceType +"'>" + d.invoiceType + "</span>";
 					}}
 
+				,{field:'accountCheckingArea',align:'center', sort:true,title: '对账地区',  width:90}
 				,{field:'invoiceDate',align:'center', sort:true,title: '开票日期',  width:90}
 				,{field:'receiptMoneyDate',align:'center', sort:true,title: '收款日期',  width:90}
 				,{field:'receiptMoney',align:'center', title: '是否收款',  width:90,templet:function(d){
@@ -924,6 +925,7 @@
 					,"widTotalMoney":"${workInvoice.widTotalMoney}"
 					,"workAccountList":"${workInvoice.workAccountList}"
 					,"electronicInvoiceFlag":"${workInvoice.electronicInvoiceFlag}"
+					,"accountCheckingArea":"${workInvoice.accountCheckingArea}"
 					,"workAccountListStr":${fns:toJson(workInvoice.workAccountList)}
                     ,"money":"<fmt:formatNumber value="${workInvoice.money}" pattern="##0.00"/>"
                     ,"invoiceDate":"<fmt:formatDate value="${workInvoice.invoiceDate}" pattern="yyyy-MM-dd"/>"

+ 1 - 1
src/main/webapp/webpage/modules/workreimbursement/workReimbursementAllList.jsp

@@ -178,7 +178,7 @@
                         <shiro:hasPermission name="workreimbursement:workReimbursementAll:add">
                             <a href="javascript:void(0)" onclick="openDialogre('新增报销单', '${ctx}/workreimbursement/workReimbursementAll/form?tabId=0','95%','95%')" class="layui-btn layui-btn-sm layui-bg-blue" >&nbsp;添加</a>
                         </shiro:hasPermission>
-                        <shiro:hasPermission name="workreimbursement:workReimbursementAll:export">
+                        <shiro:hasPermission name="workreimbursement:workReimbursement:export">
                             <table:exportExcel url="${ctx}/workreimbursement/workReimbursementAll/export"></table:exportExcel><!-- 导出按钮 -->
                             <table:exportEIExcel url="${ctx}/workreimbursement/workReimbursementAll/electronicInvoiceExport"></table:exportEIExcel><!-- 导出按钮 -->
                         </shiro:hasPermission>