Forráskód Böngészése

发票功能提交

user5 11 hónapja
szülő
commit
02da94e283

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

@@ -113,6 +113,8 @@ public class WorkInvoice extends ActEntity<WorkInvoice> {
 	private Double notReceiptMoneyD; //未收款金额
 	private String cancellationProcessInstanceId; //作废流程实例id
 	private String cancellationState; //作废状态
+	private Date auditPassDate;
+	private Date cancellationAuditPassDate;
 
 	private Integer electronicInvoiceFlag ;	//是否已经上传电子发票信息(0:未上传;1:已上传)
 
@@ -818,4 +820,20 @@ public class WorkInvoice extends ActEntity<WorkInvoice> {
 	public void setAccountCheckingArea(String accountCheckingArea) {
 		this.accountCheckingArea = accountCheckingArea;
 	}
+
+	public Date getAuditPassDate() {
+		return auditPassDate;
+	}
+
+	public void setAuditPassDate(Date auditPassDate) {
+		this.auditPassDate = auditPassDate;
+	}
+
+	public Date getCancellationAuditPassDate() {
+		return cancellationAuditPassDate;
+	}
+
+	public void setCancellationAuditPassDate(Date cancellationAuditPassDate) {
+		this.cancellationAuditPassDate = cancellationAuditPassDate;
+	}
 }

+ 19 - 1
src/main/java/com/jeeplus/modules/workinvoice/service/WorkInvoiceAllService.java

@@ -209,7 +209,12 @@ public class WorkInvoiceAllService extends CrudService<WorkInvoiceDao, WorkInvoi
 
 	public Page<WorkInvoice> findPage(Page<WorkInvoice> page, WorkInvoice workInvoice) {
 //		workInvoice.getSqlMap().put("dsf", dataScopeFilter(workInvoice.getCurrentUser(), "o", "u","s", MenuStatusEnum.WORK_INVOICE.getValue()));
-		if(StringUtils.isNotBlank(workInvoice.getOfficeId())){
+		if("一部本部".equals(workInvoice.getOfficeId())){
+			List<String> officeIdList = Lists.newArrayList();
+			Office office = officeService.getByName("工程一部");
+			officeIdList.add(office.getId());
+			workInvoice.setOfficeIdList(officeIdList);
+		}else{
 			//查询该选择节点下所有的部门Id
 			List<String> officeIdList = officeService.getChildrenOffice(workInvoice.getOfficeId());
 			officeIdList.add(workInvoice.getOfficeId());
@@ -263,6 +268,19 @@ public class WorkInvoiceAllService extends CrudService<WorkInvoiceDao, WorkInvoi
 	 */
 	public String getSumMoney(WorkInvoice workInvoice){
 		//workInvoice.getSqlMap().put("dsf", dataScopeFilter(workInvoice.getCurrentUser(), "o", "u","s", MenuStatusEnum.WORK_INVOICE.getValue()));
+		if(StringUtils.isNotBlank(workInvoice.getOfficeId())){
+			if("一部本部".equals(workInvoice.getOfficeId())){
+				List<String> officeIdList = Lists.newArrayList();
+				Office office = officeService.getByName("工程一部");
+				officeIdList.add(office.getId());
+				workInvoice.setOfficeIdList(officeIdList);
+			}else{
+				//查询该选择节点下所有的部门Id
+				List<String> officeIdList = officeService.getChildrenOffice(workInvoice.getOfficeId());
+				officeIdList.add(workInvoice.getOfficeId());
+				workInvoice.setOfficeIdList(officeIdList);
+			}
+		}
 		workInvoice.setPage(new Page<WorkInvoice>());
 		String getSumMoney = dao.getSumMoney(workInvoice);
 		if(StringUtils.isBlank(getSumMoney)){

+ 9 - 1
src/main/java/com/jeeplus/modules/workinvoice/service/WorkInvoiceService.java

@@ -244,7 +244,12 @@ public class WorkInvoiceService extends CrudService<WorkInvoiceDao, WorkInvoice>
 
 	public Page<WorkInvoice> findPage(Page<WorkInvoice> page, WorkInvoice workInvoice) {
 		workInvoice.getSqlMap().put("dsf", invoiceDataScopeFilter(workInvoice.getCurrentUser(), "o", "u","s", MenuStatusEnum.WORK_INVOICE.getValue()));
-		if(StringUtils.isNotBlank(workInvoice.getOfficeId())){
+		if("一部本部".equals(workInvoice.getOfficeId())){
+			List<String> officeIdList = Lists.newArrayList();
+			Office office = officeService.getByName("工程一部");
+			officeIdList.add(office.getId());
+			workInvoice.setOfficeIdList(officeIdList);
+		}else{
 			//查询该选择节点下所有的部门Id
 			List<String> officeIdList = officeService.getChildrenOffice(workInvoice.getOfficeId());
 			officeIdList.add(workInvoice.getOfficeId());
@@ -1469,6 +1474,7 @@ public class WorkInvoiceService extends CrudService<WorkInvoiceDao, WorkInvoice>
 			users.add(workInvoice.getCreateBy());
 			if ("yes".equals(workInvoice.getAct().getFlag())) {
 				workInvoice.setInvoiceState("5");
+				workInvoice.setAuditPassDate(new Date());
 				WorkProjectNotify notify = new WorkProjectNotify();
 				notify.setNotifyId(workInvoice.getId());
 				userList = workProjectNotifyService.readByNotifyId(notify);
@@ -1830,6 +1836,7 @@ public class WorkInvoiceService extends CrudService<WorkInvoiceDao, WorkInvoice>
 					title = "项目【"+ projectNameStr +"】发票申请通过";
 					str = "发票金额:" + workInvoice.getMoney() + "(元)。项目【"+ projectNameStr +"】发票申请通过,发票申请编号:"+workInvoice.getNumber();
 					workInvoice.setInvoiceState("5");
+					workInvoice.setAuditPassDate(new Date());
 					WorkProjectNotify notify = new WorkProjectNotify();
 					notify.setNotifyId(workInvoice.getId());
 					userList = workProjectNotifyService.readByNotifyId(notify);
@@ -3296,6 +3303,7 @@ public class WorkInvoiceService extends CrudService<WorkInvoiceDao, WorkInvoice>
 			users.add(workInvoice.getCreateBy());
 			if ("yes".equals(workInvoice.getAct().getFlag())) {
 				workInvoice.setCancellationState("7");
+				workInvoice.setCancellationAuditPassDate(new Date());
 				WorkProjectNotify notify = new WorkProjectNotify();
 				notify.setNotifyId(workInvoice.getId());
 				userList = workProjectNotifyService.readByNotifyId(notify);

+ 6 - 0
src/main/resources/mappings/modules/workinvoice/WorkInvoiceDao.xml

@@ -1757,6 +1757,12 @@
 			actual_drawer_id = #{actualDrawerId},
 			cancellation_process_instance_id = #{cancellationProcessInstanceId},
 			cancellation_state = #{cancellationState}
+			<if test="null != auditPassDate">
+				,audit_pass_date = #{auditPassDate}
+			</if>
+			<if test="null != cancellationAuditPassDate">
+				,cancellation_audit_pass_date = #{cancellationAuditPassDate}
+			</if>
 		WHERE id = #{id}
 	</update>
 	<update id="updateDate">

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

@@ -503,7 +503,7 @@
 							<label class="layui-form-label">经办人部门:</label>
 							<div class="layui-input-block with-icon">
 								<sys:treeselect id="officeId" name="officeId" value="${workInvoice.officeId}" labelName="officeName" labelValue="${workInvoice.officeName}" cssStyle="background-color: #fff"
-												title="部门" url="/sys/office/treeDataAll?type=2" cssClass="form-control layui-input" allowClear="true" notAllowSelectParent="true"/>
+												title="部门" url="/sys/office/treeDataAll?type=6" cssClass="form-control layui-input" allowClear="true" notAllowSelectParent="true"/>
 							</div>
 						</div>
 						<div class="layui-item query athird">
@@ -690,7 +690,7 @@
 							var xml = "<span style=\"cursor:default;\" class=\"status-label status-label-" + d.receiptMoney + "\" >" + d.receiptMoney + "</span>";
 						return xml;
 					}}
-				,{field:'cancellation',align:'center', title: '是否作废',  width:80}
+				/*,{field:'cancellation',align:'center', title: '是否作废',  width:80}*/
                 ,{align:'center', title: '状态', fixed: 'right', width:70,templet:function(d){
                         <%--var st = getAuditState(d.status);--%>
 

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

@@ -770,7 +770,7 @@
 							var xml = "<span style=\"cursor:default;\" class=\"status-label status-label-" + d.receiptMoney + "\" >" + d.receiptMoney + "</span>";
 						return xml;
 					}}
-				,{field:'cancellation',align:'center', title: '是否作废',  width:80}
+				/*,{field:'cancellation',align:'center', title: '是否作废',  width:80}*/
                 ,{align:'center', title: '状态', fixed: 'right', width:70,templet:function(d){
                         <%--var st = getAuditState(d.status);--%>
 

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

@@ -630,7 +630,7 @@
 							<label class="layui-form-label">经办人部门:</label>
 							<div class="layui-input-block with-icon">
 								<sys:treeselect id="officeId" name="officeId" value="${workInvoice.officeId}" labelName="officeName" labelValue="${workInvoice.officeName}" cssStyle="background-color: #fff"
-												title="部门" url="/sys/office/treeDataAll?type=2" cssClass="form-control layui-input" allowClear="true" notAllowSelectParent="true"/>
+												title="部门" url="/sys/office/treeDataAll?type=6" cssClass="form-control layui-input" allowClear="true" notAllowSelectParent="true"/>
 							</div>
 						</div>
 						<div class="layui-item query athird">
@@ -812,7 +812,7 @@
 							var xml = "<span style=\"cursor:default;\" class=\"status-label status-label-" + d.receiptMoney + "\" >" + d.receiptMoney + "</span>";
 						return xml;
 					}}
-				,{field:'cancellation',align:'center', title: '是否作废',  width:80}
+				/*,{field:'cancellation',align:'center', title: '是否作废',  width:80}*/
 				,{field:'electronicInvoiceFlag',align:'center',fixed: 'right', title: '电子发票状态',  width:90,templet:function(d){
 						if("1" === d.electronicInvoiceFlag)
 							var xml = "<a class=\"status-label status-label-signed\" title=\"已上传\"href=\"javascript:void(0);\" onclick=\"openDialogListView('查看发票信息', '${ctx}/workinvoiceAll/workInvoiceAll/form?id=" + d.id + "&tabId=1','"+ d.id +"','95%', '95%')\">已上传</a>";
@@ -833,7 +833,7 @@
 							var xml = "<span style=\"cursor:default;\" class=\"status-label status-label-" + st.label + "\" >" + st.status + "</span>";
 						return xml;
 					}}
-				,{align:'center', title: '作废状态', fixed: 'right', width:70,templet:function(d){
+				/*,{align:'center', title: '作废状态', fixed: 'right', width:70,templet:function(d){
 						<%--var st = getAuditState(d.status);--%>
 
 						<%--var xml = "<span onclick=\"openDialogView('流程追踪', '${ctx}/workinvoice/workInvoice/getProcessOne?id=" + d.id + "','95%','95%')\" class=\"status-label status-label-" + st.label + "\" >" + st.status + "</span>";--%>
@@ -844,7 +844,7 @@
 						else
 							var xml = "<span style=\"cursor:default;\" class=\"status-label status-label-" + st.label + "\" >"+ st.status + "</span>";
 						return xml;
-					}}
+					}}*/
 				,{field:'op',align:'center',title:"操作",fixed: 'right',width:140,templet:function(d){
 						////对操作进行初始化
 						var xml="<div class=\"layui-btn-group\">";
@@ -885,7 +885,7 @@
 						if(d.cancellationFlag != undefined && d.cancellationFlag =="1")
 						{
 							xml +="<a href=\"javascript:void(0)\" onclick=\"openElectronicInvoiceDialogreplay('上传电子发票', '${ctx}/workinvoiceTwo/workinvoiceTwo/electronicInvoiceForm?id=" + d.id + "','95%','95%')\" class=\"layui-btn layui-btn-xs layui-bg-blue\" > 上传电子发票</a>";
-							xml +="<a href=\"javascript:void(0)\" onclick=\"openDialogreplay('作废发票', '${ctx}/workinvoiceTwo/workinvoiceTwo/cancellationForm?id=" + d.id + "&tabId=3','95%','95%')\" class=\"layui-btn layui-btn-xs layui-bg-red\" > 作废</a>";
+							/*xml +="<a href=\"javascript:void(0)\" onclick=\"openDialogreplay('作废发票', '${ctx}/workinvoiceTwo/workinvoiceTwo/cancellationForm?id=" + d.id + "&tabId=3','95%','95%')\" class=\"layui-btn layui-btn-xs layui-bg-red\" > 作废</a>";*/
 						}
 						if(d.conditionCanedit != undefined && d.conditionCanedit =="1")
 						{