Przeglądaj źródła

合同添加统计功能
统计合同下所有开票信息

user5 1 rok temu
rodzic
commit
7cd3a72d0e

+ 14 - 14
src/main/java/com/jeeplus/modules/ruralprojectrecords/service/RuralProjectMessageNewService.java

@@ -805,8 +805,8 @@ public class RuralProjectMessageNewService extends CrudService<RuralProjectMessa
         }
         ProjectRecords projectRecords = dao.getRuralProjectRecords(projectReportData.getProject().getId());
         Office recordsOffice =officeService.get(projectRecords.getOffice());
-        String title = "项目【"+projectRecords.getProjectName()+"】报告质量复核盖章授权待审批";
-        String str =  "项目【"+projectRecords.getProjectName()+"】报告质量复核盖章授权待审批";
+        String title = "项目【"+projectRecords.getProjectName()+"】报告审定(内)签章待审批";
+        String str =  "项目【"+projectRecords.getProjectName()+"】报告审定(内)签章待审批";
         // 用来设置启动流程的人员ID,引擎会自动把用户ID保存到activiti:initiator中
         identityService.setAuthenticatedUserId(user.getId());
         // 启动流程
@@ -1775,11 +1775,11 @@ public class RuralProjectMessageNewService extends CrudService<RuralProjectMessa
             }else{
                 if ("yes".equals(flag)) {
 
-                    String titleStr = "项目【"+projectRecords.getProjectName()+"】报告质量复核盖章授权审批通过";
-                    String content = "项目【"+projectRecords.getProjectName()+"】报告质量复核盖章授权审批通过";
+                    String titleStr = "项目【"+projectRecords.getProjectName()+"】报告审定(内)签章审批通过";
+                    String content = "项目【"+projectRecords.getProjectName()+"】报告审定(内)签章审批通过";
                     if(StringUtils.isNotBlank(projectReportData.getNumber())){
-                        titleStr = "报告号:"+projectReportData.getNumber()+"。项目【"+projectRecords.getProjectName()+"】报告质量复核盖章授权审批通过";
-                        content = "报告号:"+projectReportData.getNumber()+"。项目【"+projectRecords.getProjectName()+"】报告质量复核盖章授权审批通过";
+                        titleStr = "报告号:"+projectReportData.getNumber()+"。项目【"+projectRecords.getProjectName()+"】报告审定(内)签章审批通过";
+                        content = "报告号:"+projectReportData.getNumber()+"。项目【"+projectRecords.getProjectName()+"】报告审定(内)签章审批通过";
                     }
                     str =  "报告名称:"+projectReportData.getName()+",工作内容类型:"+ WorkContentTypeController.getContentTypeName(projectReportData.getType(),"")+",项目所属部门:"+recordsOffice.getName();
                     projectReportData.setStatus("5");
@@ -1868,11 +1868,11 @@ public class RuralProjectMessageNewService extends CrudService<RuralProjectMessa
 
             } else {
                 if (!"yes".equals(flag)) {//报告驳回待办提醒
-                    title = "项目【"+ projectRecords.getProjectName()+"】新增报告质量复核盖章授权被驳回";
-                    str = "项目【"+ projectRecords.getProjectName()+"】新增报告质量复核盖章授权被驳回,请选择重新申请或删除报告";
+                    title = "项目【"+ projectRecords.getProjectName()+"】新增报告审定(内)签章被驳回";
+                    str = "项目【"+ projectRecords.getProjectName()+"】新增报告审定(内)签章被驳回,请选择重新申请或删除报告";
                     if(StringUtils.isNotBlank(projectReportData.getNumber())){
-                        title = "报告号:"+projectReportData.getNumber()+"。项目【"+projectRecords.getProjectName()+"】新增报告质量复核盖章授权被驳回";
-                        str = "报告号:"+projectReportData.getNumber()+"。项目【"+projectRecords.getProjectName()+"】新增报告质量复核盖章授权被驳回,请选择重新申请或删除报告";
+                        title = "报告号:"+projectReportData.getNumber()+"。项目【"+projectRecords.getProjectName()+"】新增报告审定(内)签章被驳回";
+                        str = "报告号:"+projectReportData.getNumber()+"。项目【"+projectRecords.getProjectName()+"】新增报告审定(内)签章被驳回,请选择重新申请或删除报告";
                     }
                     WorkProjectNotify notify = new WorkProjectNotify();
                     notify.setNotifyId(projectReportData.getId());
@@ -1891,11 +1891,11 @@ public class RuralProjectMessageNewService extends CrudService<RuralProjectMessa
                     users.add( projectReportData.getCreateBy());
                 } else {
                     if (com.jeeplus.common.utils.StringUtils.isNotBlank(enname)) {//驳回重新申请待办信息
-                        str = "项目【"+ projectRecords.getProjectName()+"】报告质量复核盖章授权待审批";
-                        title = "项目【"+ projectRecords.getProjectName()+"】报告质量复核盖章授权待审批";
+                        str = "项目【"+ projectRecords.getProjectName()+"】报告审定(内)签章待审批";
+                        title = "项目【"+ projectRecords.getProjectName()+"】报告审定(内)签章待审批";
                         if(StringUtils.isNotBlank(projectReportData.getNumber())){
-                            title = "报告号:"+projectReportData.getNumber()+"。项目【"+projectRecords.getProjectName()+"】报告质量复核盖章授权待审批";
-                            str = "报告号:"+projectReportData.getNumber()+"。项目【"+projectRecords.getProjectName()+"】报告质量复核盖章授权待审批";
+                            title = "报告号:"+projectReportData.getNumber()+"。项目【"+projectRecords.getProjectName()+"】报告审定(内)签章待审批";
+                            str = "报告号:"+projectReportData.getNumber()+"。项目【"+projectRecords.getProjectName()+"】报告审定(内)签章待审批";
                         }
                         WorkProjectNotify notify = new WorkProjectNotify();
                         notify.setNotifyId(projectReportData.getId());

+ 5 - 0
src/main/java/com/jeeplus/modules/workcontractinfo/dao/WorkContractInfoDao.java

@@ -130,4 +130,9 @@ public interface WorkContractInfoDao extends CrudDao<WorkContractInfo> {
     List<WorkContractInfo> findDepartmentContractStatementPageOverdue(@Param("workContractInfo")WorkContractInfo workContractInfo, @Param("statementCompanyComprehensiveInfo")StatementCompanyComprehensiveInfo statementCompanyComprehensiveInfo,@Param("officeIdd")String officeIdd,@Param("beginDate")String beginDate,@Param("endDate") String endDate);
     //部门级 查询超期合同信息的条数
     Integer findDepartmentContractStatementPageOverdueCount(StatementCompanyComprehensiveInfo statementCompanyComprehensiveInfo);
+
+
+    List<WorkContractInfo> getWorkContractStatisticDetailList(@Param("workContractInfo")WorkContractInfo workContractInfo);
+
+    Integer getWorkContractStatisticDetailListCount(WorkContractInfo workContractInfo);
 }

+ 119 - 0
src/main/java/com/jeeplus/modules/workcontractinfo/entity/WorkContractInfo.java

@@ -171,6 +171,21 @@ public class WorkContractInfo extends ActEntity<WorkContractInfo> {
 	private String letterOfAcceptanceFlag;     //是否上传审定单
 	private String letterOfAcceptanceRemarks;     //中标通知书描述说明
 
+
+	private String projectId;     //项目id
+	private String projectNumber;     //项目编号
+	private String reportNumber;     //报告号
+	private String invoiceId;     //发票id
+	private String invoiceNumber;     //发票编号
+	private String projectMasterName;     //项目负责人
+	private Date invoiceDate;     //开票时间
+	private String invoiceState;     //开票审核状态
+	private String invoiceStateStr;     //开票审核状态Str
+	private String invoiceMoney;     //开票金额
+	private String chargeType;     //开票收款类型
+	private String chargeTypeStr;     //开票收款类型Str
+	private String isProject;     //是否关联项目(0:否;1:是)
+
 	public String getBeginInvestmentAmount() {
 		return beginInvestmentAmount;
 	}
@@ -1263,4 +1278,108 @@ public class WorkContractInfo extends ActEntity<WorkContractInfo> {
 	public void setLetterOfAcceptanceRemarks(String letterOfAcceptanceRemarks) {
 		this.letterOfAcceptanceRemarks = letterOfAcceptanceRemarks;
 	}
+
+	public String getProjectId() {
+		return projectId;
+	}
+
+	public void setProjectId(String projectId) {
+		this.projectId = projectId;
+	}
+
+	public String getProjectNumber() {
+		return projectNumber;
+	}
+
+	public void setProjectNumber(String projectNumber) {
+		this.projectNumber = projectNumber;
+	}
+
+	public String getReportNumber() {
+		return reportNumber;
+	}
+
+	public void setReportNumber(String reportNumber) {
+		this.reportNumber = reportNumber;
+	}
+
+	public String getInvoiceId() {
+		return invoiceId;
+	}
+
+	public void setInvoiceId(String invoiceId) {
+		this.invoiceId = invoiceId;
+	}
+
+	public String getInvoiceNumber() {
+		return invoiceNumber;
+	}
+
+	public void setInvoiceNumber(String invoiceNumber) {
+		this.invoiceNumber = invoiceNumber;
+	}
+
+	public String getProjectMasterName() {
+		return projectMasterName;
+	}
+
+	public void setProjectMasterName(String projectMasterName) {
+		this.projectMasterName = projectMasterName;
+	}
+
+	public Date getInvoiceDate() {
+		return invoiceDate;
+	}
+
+	public void setInvoiceDate(Date invoiceDate) {
+		this.invoiceDate = invoiceDate;
+	}
+
+	public String getInvoiceMoney() {
+		return invoiceMoney;
+	}
+
+	public void setInvoiceMoney(String invoiceMoney) {
+		this.invoiceMoney = invoiceMoney;
+	}
+
+	public String getChargeType() {
+		return chargeType;
+	}
+
+	public void setChargeType(String chargeType) {
+		this.chargeType = chargeType;
+	}
+
+	public String getInvoiceState() {
+		return invoiceState;
+	}
+
+	public void setInvoiceState(String invoiceState) {
+		this.invoiceState = invoiceState;
+	}
+
+	public String getInvoiceStateStr() {
+		return invoiceStateStr;
+	}
+
+	public void setInvoiceStateStr(String invoiceStateStr) {
+		this.invoiceStateStr = invoiceStateStr;
+	}
+
+	public String getChargeTypeStr() {
+		return chargeTypeStr;
+	}
+
+	public void setChargeTypeStr(String chargeTypeStr) {
+		this.chargeTypeStr = chargeTypeStr;
+	}
+
+	public String getIsProject() {
+		return isProject;
+	}
+
+	public void setIsProject(String isProject) {
+		this.isProject = isProject;
+	}
 }

+ 44 - 0
src/main/java/com/jeeplus/modules/workcontractinfo/service/WorkContractInfoService.java

@@ -4162,4 +4162,48 @@ public class WorkContractInfoService extends CrudService<WorkContractInfoDao, Wo
 		page.setList(list);
 		return page;
 	}
+
+	/**
+	 * 根据合同查看合同下的所有项目以及开票信息
+	 * @param page
+	 * @param workContractInfo
+	 * @return
+	 */
+	public Page<WorkContractInfo> getWorkContractStatisticDetailList(Page<WorkContractInfo> page, WorkContractInfo workContractInfo) {
+
+		//为了方便后台 limit 的显示,将页面传入的page暂存
+		Integer oldPageNo = page.getPageNo();
+		if((page.getPageNo()-1) >= 0) {
+			page.setPageNo((page.getPageNo() - 1) * page.getPageSize());
+		}
+		int count = dao.getWorkContractStatisticDetailListCount(workContractInfo);
+		page.setCount(count);
+		workContractInfo.setPage(page);
+		List<WorkContractInfo> list = dao.getWorkContractStatisticDetailList(workContractInfo);
+		List<MainDictDetail> receiptTypeList = DictUtils.getMainDictList("receipt_type");
+
+		for (WorkContractInfo info : list) {
+			if (StringUtils.isNotBlank(info.getInvoiceState())){
+				if("5".equals(info.getInvoiceState())){
+					info.setInvoiceStateStr("已开票");
+				}else if (!"0".equals(info.getInvoiceState())) {
+					info.setInvoiceStateStr("开票中");
+				}else{
+					info.setInvoiceStateStr("未开票");
+				}
+			}
+
+			for (MainDictDetail dictDetail: receiptTypeList) {
+				if(StringUtils.isNotBlank(info.getChargeType()) && info.getChargeType().equals(dictDetail.getValue())){
+					info.setChargeTypeStr(dictDetail.getLabel());
+					break;
+				}
+			}
+		}
+		page.setCountFlag(false);
+		page.setPageNo(oldPageNo);
+
+		page.setList(list);
+		return page;
+	}
 }

+ 35 - 0
src/main/java/com/jeeplus/modules/workcontractinfo/web/WorkContractInfoController.java

@@ -22,6 +22,7 @@ import com.jeeplus.modules.act.service.ActTaskService;
 import com.jeeplus.modules.act.utils.ActUtils;
 import com.jeeplus.modules.alterinfo.entity.AlterInfo;
 import com.jeeplus.modules.alterinfo.service.AlterInfoService;
+import com.jeeplus.modules.ruralprojectrecords.entity.RuralProjectRecords;
 import com.jeeplus.modules.sys.entity.Office;
 import com.jeeplus.modules.sys.entity.Role;
 import com.jeeplus.modules.sys.entity.User;
@@ -2326,4 +2327,38 @@ public class WorkContractInfoController extends BaseController {
         }
         return "redirect:" + Global.getAdminPath() + "/workcontractinfo/workContractInfo/workContractList/?repage";
     }
+
+    /**
+     * 根据合同查看合同下的所有项目以及开票信息
+     * 传参:合同id
+     * @param workContractInfo
+     * @param model
+     * @return
+     */
+    @RequestMapping(value = "getWorkContractStatisticDetailList")
+    public String getWorkContractStatisticDetailList(WorkContractInfo workContractInfo, HttpServletRequest request, HttpServletResponse response, Model model) {
+
+        System.out.println(workContractInfo.getId());
+        Page<WorkContractInfo> page = workContractInfoService.getWorkContractStatisticDetailList(new Page<WorkContractInfo>(request, response), workContractInfo);
+
+        if(StringUtils.isNotBlank(workContractInfo.getCreateNameStr())){
+            model.addAttribute("createName", workContractInfo.getCreateNameStr());
+        }
+
+        //进行查询之后进行任何操作,返回还是查询之后的数据页面
+        /*if (StringUtils.isNotBlank(workContractInfo.getToflag())){
+            if (workContractInfo.getToflag().equals("1")){
+                request.getSession().removeAttribute("searchContractInfo");
+                WorkContractInfo search=workContractInfo;
+                request.getSession().setAttribute("searchContractInfo",search);
+            }
+        }else{
+            if (request.getSession().getAttribute("searchContractInfo")!=null){
+                workContractInfo= (WorkContractInfo) request.getSession().getAttribute("searchContractInfo");
+                model.addAttribute("workContractInfo", workContractInfo);
+            }
+        }*/
+        model.addAttribute("page", page);
+        return "modules/workcontractinfo/WorkContractStatisticDetailList";
+    }
 }

+ 2 - 2
src/main/resources/jeeplus.properties

@@ -319,9 +319,9 @@ reportedUrl = https://comp.jszj.com.cn:8031/api/addProject
 #report_internal_audit_category_id = 3117352569284948928
 ##审定内用印流程id
 #judgement_category_id = 2912238663717396786
-#审定单用印流程id(盐城)
+##审定单用印流程id(盐城)
 #approval_YC_category_id = 2933219658963918882
-#报告用印流程id(盐城)
+##报告用印流程id(盐城)
 #report_YC_category_id = 2933233335469383748
 
 #192.168.2.6签章测试参数

+ 161 - 0
src/main/resources/mappings/modules/workcontractinfo/WorkContractInfoDao.xml

@@ -2358,4 +2358,165 @@
 			</if>
 		</where>
 	</select>
+
+	<select  id="getWorkContractStatisticDetailList" resultType="WorkContractInfo">
+		select z.* from (
+			select
+				a.id as "id",
+				a.contract_num as "contractNum",
+				a.name as "name",
+				rpr.id as "projectId",
+				rpr.project_id as "projectNumber",
+				rpr.project_name as "projectName",
+				prd.number as "reportNumber",
+				wi.id as "invoiceId",
+				wi.number as "invoiceNumber",
+				wi.money as "invoiceMoney",
+				wi.charge_type as "chargeType",
+				wi.invoice_date as "invoiceDate",
+				ifnull(wi.invoice_state,0) as "invoiceState",
+				wci.name as "clientName",
+				su.name as "projectMasterName",
+				"1" as "isProject"
+			from work_contract_info a
+			left join work_client_info wci on wci.id = a.client_id and wci.del_flag = 0
+			left join rural_project_records rpr on a.id = rpr.contract_id and rpr.del_flag = 0
+			left join project_report_data prd on rpr.id = prd.project_id and prd.del_flag = 0
+			left join work_invoice_project_relation wipr on rpr.id = wipr.project_id
+			left join work_invoice wi on wi.id = wipr.invoice_id and wi.del_flag = 0
+			left join sys_user su on rpr.project_master_id = su.id
+			where a.id = #{workContractInfo.id} and a.del_flag = 0
+			union all
+			select
+				a.id as "id",
+				a.contract_num as "contractNum",
+				a.name as "name",
+				"" as "projectId",
+				"" as "projectNumber",
+				"" as "projectName",
+				"" as "reportNumber",
+				wi.id as "invoiceId",
+				wi.number as "invoiceNumber",
+				wi.money as "invoiceMoney",
+				wi.charge_type as "chargeType",
+				wi.invoice_date as "invoiceDate",
+				ifnull(wi.invoice_state,0) as "invoiceState",
+				wci.name as "clientName",
+				"" as "projectMasterName",
+				"0" as "isProject"
+			from work_contract_info a
+			left join work_client_info wci on wci.id = a.client_id and wci.del_flag = 0
+			left join work_invoice_project_relation wipr on a.id = wipr.contract_id
+			left join  work_invoice wi on wi.id = wipr.invoice_id and wi.del_flag = 0
+			where contract_id = #{workContractInfo.id} and a.del_flag = 0
+		)z
+		<where>
+			<if test="workContractInfo.projectNumber != null and workContractInfo.projectNumber != ''">
+				and z.projectNumber like concat('%', #{workContractInfo.projectNumber}, '%')
+			</if>
+			<if test="workContractInfo.projectName != null and workContractInfo.projectName != ''">
+				and z.projectName like concat('%', #{workContractInfo.projectName}, '%')
+			</if>
+			<if test="workContractInfo.reportNumber != null and workContractInfo.reportNumber != ''">
+				and z.reportNumber like concat('%', #{workContractInfo.reportNumber}, '%')
+			</if>
+			<if test="workContractInfo.invoiceNumber != null and workContractInfo.invoiceNumber != ''">
+				and z.invoiceNumber like concat('%', #{workContractInfo.invoiceNumber}, '%')
+			</if>
+			<if test="workContractInfo.invoiceState != null and workContractInfo.invoiceState != ''">
+				and z.invoiceState = #{workContractInfo.invoiceState}
+			</if>
+			<if test="workContractInfo.chargeType != null and workContractInfo.chargeType != ''">
+				and z.chargeType = #{workContractInfo.chargeType}
+			</if>
+			<if test="workContractInfo.isProject != null and workContractInfo.isProject != ''">
+				and z.isProject = #{workContractInfo.isProject}
+			</if>
+		</where>
+		<choose>
+			<when test="workContractInfo.page !=null and workContractInfo.page.orderBy != null and workContractInfo.page.orderBy != ''">
+				ORDER BY ${workContractInfo.page.orderBy}
+			</when>
+			<otherwise>
+				ORDER BY z.projectNumber desc,z.invoiceDate DESC,z.invoiceNumber DESC
+			</otherwise>
+		</choose>
+		limit ${workContractInfo.page.pageNo},${workContractInfo.page.pageSize}
+	</select>
+
+	<select  id="getWorkContractStatisticDetailListCount" resultType="integer">
+		select count(1) from (
+			select
+				a.id as "id",
+				a.contract_num as "contractNum",
+				a.name as "name",
+				rpr.id as "projectId",
+				rpr.project_id as "projectNumber",
+				rpr.project_name as "projectName",
+				prd.number as "reportNumber",
+				wi.id as "invoiceId",
+				wi.number as "invoiceNumber",
+				wi.money as "invoiceMoney",
+				wi.charge_type as "chargeType",
+				wi.invoice_date as "invoiceDate",
+				ifnull(wi.invoice_state,0) as "invoiceState",
+				wci.name as "clientName",
+				su.name as "projectMasterName",
+				"1" as "isProject"
+			from work_contract_info a
+			left join work_client_info wci on wci.id = a.client_id and wci.del_flag = 0
+			left join rural_project_records rpr on a.id = rpr.contract_id and rpr.del_flag = 0
+			left join project_report_data prd on rpr.id = prd.project_id and prd.del_flag = 0
+			left join work_invoice_project_relation wipr on rpr.id = wipr.project_id
+			left join work_invoice wi on wi.id = wipr.invoice_id and wi.del_flag = 0
+			left join sys_user su on rpr.project_master_id = su.id
+			where a.id = #{id} and a.del_flag = 0
+			union all
+			select
+				a.id as "id",
+				a.contract_num as "contractNum",
+				a.name as "name",
+				"" as "projectId",
+				"" as "projectNumber",
+				"" as "projectName",
+				"" as "reportNumber",
+				wi.id as "invoiceId",
+				wi.number as "invoiceNumber",
+				wi.money as "invoiceMoney",
+				wi.charge_type as "chargeType",
+				wi.invoice_date as "invoiceDate",
+				ifnull(wi.invoice_state,0) as "invoiceState",
+				wci.name as "clientName",
+				"" as "projectMasterName",
+				"0" as "isProject"
+			from work_contract_info a
+			left join work_client_info wci on wci.id = a.client_id and wci.del_flag = 0
+			left join work_invoice_project_relation wipr on a.id = wipr.contract_id
+			left join  work_invoice wi on wi.id = wipr.invoice_id and wi.del_flag = 0
+			where contract_id = #{id} and a.del_flag = 0
+		)z
+		<where>
+			<if test="projectNumber != null and projectNumber != ''">
+				and z.projectNumber like concat('%', #{projectNumber}, '%')
+			</if>
+			<if test="projectName != null and projectName != ''">
+				and z.projectName like concat('%', #{projectName}, '%')
+			</if>
+			<if test="reportNumber != null and reportNumber != ''">
+				and z.reportNumber like concat('%', #{reportNumber}, '%')
+			</if>
+			<if test="invoiceNumber != null and invoiceNumber != ''">
+				and z.invoiceNumber like concat('%', #{invoiceNumber}, '%')
+			</if>
+			<if test="invoiceState != null and invoiceState != ''">
+				and z.invoiceState = #{invoiceState}
+			</if>
+			<if test="chargeType != null and chargeType != ''">
+				and z.chargeType = #{chargeType}
+			</if>
+			<if test="isProject != null and isProject != ''">
+				and z.isProject = #{isProject}
+			</if>
+		</where>
+	</select>
 </mapper>

+ 1 - 1
src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/projectcontentinfo/new/judgementReport/projectRecordsJudgementForm.jsp

@@ -1243,7 +1243,7 @@
 
 			<c:if test="${projectRecords.attachmentProjectSort == 8}">
 				<div class="form-group layui-row">
-					<div class="form-group-label"><h2>审定单签章附件信息</h2></div>
+					<div class="form-group-label"><h2>审定单签章附件信息<span style="color: red;font-size: 14px"> 可上传未盖章审定单,并需经部门主任审核授权签章。该类型针对仅出审定单,不出报告项目。</span></h2></div>
 					<div class="layui-item nav-btns">
 						<a id="attachment_btn" class="nav-btn nav-btn-add" title="添加附件"><i class="fa fa-plus"></i>&nbsp;添加附件</a>
 						<a class="nav-btn nav-btn-export" title="下载模板"  onclick="window.location.href='${ctx}/ruralProject/ruralCostProjectMessageNew/downloadTemplate';"><i class="fa fa-download"></i>&nbsp;下载模板</a>

+ 1 - 1
src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/projectcontentinfo/new/judgementReport/projectRecordsJudgementMessageAudit.jsp

@@ -1128,7 +1128,7 @@
 
 					<c:if test="${attachmentProjectSort == 8}">
 					<div class="form-group layui-row">
-						<div class="form-group-label"><h2>审定单签章附件信息</h2></div>
+						<div class="form-group-label"><h2>审定单签章附件信息<span style="color: red;font-size: 14px"> 可上传未盖章审定单,并需经部门主任审核授权签章。该类型针对仅出审定单,不出报告项目。</span></h2></div>
 						<div class="layui-item layui-col-xs12" style="padding:0 16px;">
 							<table id="judgementAttachment" class="table table-bordered table-condensed details">
 								<thead>

+ 1 - 1
src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/projectcontentinfo/new/judgementReport/projectRecordsJudgementMessageModify.jsp

@@ -1114,7 +1114,7 @@
 
             <c:if test="${attachmentProjectSort == 8}">
                 <div class="form-group layui-row">
-                    <div class="form-group-label"><h2>审定单签章附件信息</h2></div>
+                    <div class="form-group-label"><h2>审定单签章附件信息<span style="color: red;font-size: 14px"> 可上传未盖章审定单,并需经部门主任审核授权签章。该类型针对仅出审定单,不出报告项目。</span></h2></div>
                     <div class="layui-item nav-btns">
                         <a id="attachment_btn" class="nav-btn nav-btn-add" title="添加附件"><i class="fa fa-plus"></i>&nbsp;添加附件</a>
                     </div>

+ 414 - 0
src/main/webapp/webpage/modules/workcontractinfo/WorkContractStatisticDetailList.jsp

@@ -0,0 +1,414 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>合同统计列表</title>
+	<meta name="decorator" content="default"/>
+	<%--<script src="${ctxStatic}/layer-v2.3/laydate/laydate.js"></script>--%>
+	<script type="text/javascript">
+        $(document).ready(function() {
+
+            //搜索框收放
+            $('#moresee').click(function(){
+                if($('#moresees').is(':visible'))
+                {
+                    $('#moresees').slideUp(0,resizeListWindow2);
+                    $('#moresee i').removeClass("glyphicon glyphicon-menu-up").addClass("glyphicon glyphicon-menu-down");
+                }else{
+                    $('#moresees').slideDown(0,resizeListWindow2);
+                    $('#moresee i').removeClass("glyphicon glyphicon-menu-down").addClass("glyphicon glyphicon-menu-up");
+                }
+            });
+            laydate.render({
+                elem: '#beginDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus', //响应事件。如果没有传入event,则按照默认的click
+                type : 'date'
+				, trigger: 'click'
+            });
+            laydate.render({
+                elem: '#endDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus', //响应事件。如果没有传入event,则按照默认的click
+                type : 'date'
+				, trigger: 'click'
+            });
+        });
+
+        function reset() {
+            $("#searchForm").resetForm();
+        }
+        function openDialog(title,url,width,height,target,formId,tableId) {
+
+            if (navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)) {//如果是移动端,就使用自适应大小弹窗
+                width = 'auto';
+                height = 'auto';
+            } else {//如果是PC端,根据用户设置的width和height显示。
+
+            }
+
+			top.layer.open({
+				type: 2,
+				area: [width, height],
+				title: title,
+				skin:"two-btns",
+				maxmin: false, //开启最大化最小化按钮
+				content: url ,
+				btn: ['确定','关闭'],
+				yes: function(index, layero){
+					var body = top.layer.getChildFrame('body', index);
+					var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+					var inputForm = body.find('#inputForm');
+					var top_iframe;
+					if(target){
+						top_iframe = target;//如果指定了iframe,则在改frame中跳转
+					}else{
+						top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+					}
+					inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+					inputForm.attr("action","${ctx}/subProject/subProject/save");//表单提交成功后,从服务器返回的url在当前tab中展示
+					var $document = iframeWin.contentWindow.document;
+
+					formSubmit2($document,formId,index,tableId);
+
+				},
+				cancel: function(index){
+				}
+			});
+        }
+
+			function formSubmit2($document,inputForm,index,tableId){
+
+				var validateForm = $($document.getElementById(inputForm)).validate({
+					submitHandler: function(form){
+						loading('正在提交,请稍等...');
+						form.submit();
+					},
+					errorContainer: "#messageBox",
+					errorPlacement: function(error, element) {
+						$($document.getElementById("#messageBox")).text("输入有误,请先更正。");
+						if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
+							error.appendTo(element.parent().parent());
+						} else {
+							error.insertAfter(element);
+						}
+					}
+				});
+				if(validateForm.form()){
+					$($document.getElementById(inputForm)).ajaxSubmit({
+						success:function(data) {
+							var d = data;
+							//输出提示信息
+							if(d.str.length>0){
+								parent.layer.msg(d.str,{icon:1});
+							}
+							window.location.reload();
+							//关闭当前页
+							top.layer.close(index)
+						}
+					});
+				}
+			}
+        function openDialogre(title,url,width,height,target,formId,tableId) {
+			if (navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)) {//如果是移动端,就使用自适应大小弹窗
+				width = 'auto';
+				height = 'auto';
+			} else {//如果是PC端,根据用户设置的width和height显示。
+
+			}
+
+			top.layer.open({
+				type: 2,
+				area: [width, height],
+				title: title,
+				skin:"two-btns",
+				maxmin: false, //开启最大化最小化按钮
+				content: url ,
+				btn: ['确定','关闭'],
+				yes: function(index, layero){
+					var body = top.layer.getChildFrame('body', index);
+					var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+					var inputForm = body.find('#inputForm');
+					var top_iframe;
+					if(target){
+						top_iframe = target;//如果指定了iframe,则在改frame中跳转
+					}else{
+						top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+					}
+					inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+					inputForm.attr("action","${ctx}/subProject/subProject/save");//表单提交成功后,从服务器返回的url在当前tab中展示
+					var $document = iframeWin.contentWindow.document;
+
+					formSubmit2($document,formId,index,tableId);
+
+				},
+				cancel: function(index){
+				}
+			});
+        }
+
+		// 确认对话框
+		function subConfirmx(mess, href, closed){
+
+			top.layer.confirm(mess, {icon: 3, title:'系统提示'}, function(index){
+				//do something
+				if (typeof href == 'function') {
+					href();
+				}else{
+					$.ajax({
+						type:"post",
+						url:href,
+						dataType:"json",
+						success:function(data){
+							if(data.success) {
+								top.layer.msg(data.str, {icon: 1});
+								window.location.reload();
+							}else {
+								top.layer.msg(data.str, {icon: 0});
+							}
+						}
+					})
+				}
+				top.layer.close(index);
+			});
+			return false;
+		}
+
+
+		//打开对话框(查看)
+		function openDialogListView(title,url,id,width,height){
+
+
+			if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
+				width='auto';
+				height='auto';
+			}else{//如果是PC端,根据用户设置的width和height显示。
+
+			}
+			$.ajax({
+				async: false,
+				url: "${ctx}/workinvoiceTwo/workinvoiceTwo/getInvoiceExist?id="+id,
+				dataType: "json",
+				success: function (data) {
+					if(data.success){
+						top.layer.open({
+							type: 2,
+							skin: 'one-btn',
+							area: [width, height],
+							title: title,
+							maxmin: true, //开启最大化最小化按钮
+							content: url ,
+							btn: ['关闭'],
+							cancel: function(index){
+							}
+						});
+					}else{
+						top.layer.msg("该发票信息已删除!", {icon: 0});
+						window.location.reload();
+					}
+				}
+			});
+
+		}
+	</script>
+	<style>
+		body{
+			background-color:transparent;
+			filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#26FFFFFF, endColorstr=#26FFFFFF);
+			color:#ffffff;
+			background-color:rgba(255,255,255,0);
+			height:100%;
+		}
+	</style>
+</head>
+<body>
+<div class="wrapper wrapper-content">
+	<sys:message content="${message}"/>
+		<div class="full-width fl">
+			<div class="layui-row contentShadow shadowLR" id="queryDiv">
+				<form:form id="searchForm" modelAttribute="workContractInfo" action="${ctx}/workcontractinfo/workContractInfo/getWorkContractStatisticDetailList?id=${workContractInfo.id}" method="post" class="form-inline">
+					<input id="id" type="hidden" value="${workContractInfo.id}"/>
+					<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
+					<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
+					<table:sortColumn id="orderBy" name="orderBy" value="${page.orderBy}" callback="sortOrRefresh();"/><!-- 支持排序 -->
+					<div class="commonQuery lw6">
+						<div class="layui-item query athird" style="width: 25%">
+							<label class="layui-form-label">项目编号:</label>
+							<div class="layui-input-block with-icon">
+								<form:input path="projectNumber" htmlEscape="false" maxlength="64"  class=" form-control  layui-input"/>
+							</div>
+						</div>
+						<div class="layui-item query athird" style="width: 25%">
+							<label class="layui-form-label">项目名称:</label>
+							<div class="layui-input-block">
+								<form:input path="projectName" htmlEscape="false" maxlength="64"  class=" form-control  layui-input"/>
+							</div>
+						</div>
+						<div class="layui-item query athird" style="width: 25%">
+							<span class="layui-form-label">关联项目:</span>
+							<div class="layui-input-block">
+								<form:select path="isProject"  class="form-control simple-select">
+									<form:option value="" label=""/>
+									<form:options items="${fns:getDictList('yes_no')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+								</form:select>
+							</div>
+						</div>
+						<div class="layui-item athird" style="width: 25%">
+							<div class="input-group">
+								<a href="#" id="moresee"><i class="glyphicon glyphicon-menu-down"></i></a>
+								<div class="layui-btn-group search-spacing">
+									<button id="searchQuery" class="layui-btn layui-btn-sm  layui-bg-blue" onclick="search()">查询</button>
+									<button id="searchReset" class="layui-btn layui-btn-sm" onclick="resetSearch()">重置</button>
+								</div>
+							</div>
+						</div>
+						<div style="    clear:both;"></div>
+					</div>
+					<div id="moresees" style="clear:both;display:none;" class="lw6">
+
+						<div class="layui-item query athird ">
+							<label class="layui-form-label">报告号:</label>
+							<div class="layui-input-block">
+								<form:input path="reportNumber" htmlEscape="false" maxlength="255"  class=" form-control layui-input"/>
+							</div>
+						</div>
+						<div class="layui-item query athird ">
+							<label class="layui-form-label">发票编号:</label>
+							<div class="layui-input-block">
+								<form:input path="invoiceNumber" htmlEscape="false" maxlength="255"  class=" form-control layui-input"/>
+							</div>
+						</div>
+						<div class="layui-item query athird ">
+							<label class="layui-form-label">开票状态:</label>
+							<div class="layui-input-block with-icon">
+								<form:select path="invoiceState" class="form-control simple-select">
+									<form:option value="" label=""/>
+									<form:option value="0" label="未开票"/>
+									<form:option value="2" label="开票中"/>
+									<form:option value="5" label="已开票"/>
+								</form:select>
+							</div>
+						</div>
+						<div class="layui-item query athird">
+							<label class="layui-form-label">收款类型:</label>
+							<div class="layui-input-block with-icon">
+								<form:select path="chargeType" class="form-control simple-select">
+									<form:option value="" label=""/>
+									<form:options items="${fns:getMainDictList('receipt_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+								</form:select>
+							</div>
+						</div>
+
+						<div style="clear:both;"></div>
+					</div>
+				</form:form>
+			</div>
+		</div>
+		<div class="full-width fl">
+			<div class="layui-form contentDetails contentShadow shadowLBR">
+				<div class="nav-btns">
+					<div class="layui-btn-group ">
+						<button class="layui-btn layui-btn-sm" data-toggle="tooltip" data-placement="left" onclick="sortOrRefresh()" title="刷新">&nbsp;刷新</button>
+					</div>
+					<div style="clear: both;"></div>
+				</div>
+				<table class="oa-table layui-table" id="contentTable1"></table>
+
+				<!-- 分页代码 -->
+				<table:page page="${page}"></table:page>
+				<div style="clear: both;"></div>
+			</div>
+		</div>
+	<div id="changewidth"></div>
+</div>
+
+<script src="${ctxStatic}/layer-v2.3/layui/layui.all.js" charset="utf-8"></script>
+<script>
+
+    layui.use('table', function(){
+        layui.table.render({
+            limit:${ page.pageSize }
+            ,elem: '#contentTable1'
+            ,page: false
+            ,cols: [[
+                // {checkbox: true, fixed: true},
+                {field:'index',align:'center', title: '序号',width:60}
+                /*,{field:'contractNum',align:'center', title: '合同编号', width:150}
+                ,{field:'name',align:'center', title: '合同名称', width:150}*/
+                ,{field:'projectNumber',align:'center', title: '项目编号', width:150}
+                ,{field:'projectName',align:'center', title: '项目名称',templet:function(d){
+                        return "<a class=\"attention-info\" title=\"" + d.projectName + "\" href=\"javascript:void(0);\" onclick=\"openDialogView('查看项目信息', '${ctx}/subProject/subProject/view?id=" + d.id +"','95%', '95%')\">" + d.projectName + "</a>";
+                    }}
+				,{field:'reportNumber',align:'center', title: '报告号', width:150}
+				,{field:'clientName',align:'center', title: '委托方', width:150}
+				,{field:'projectMasterName',align:'center', title: '项目责任人', width:100}
+				,{field:'invoiceNumber',align:'center', title: '开票编号', width:120,templet:function(d){
+						return "<a class=\"attention-info\" title=\""+ d.invoiceNumber +"\"href=\"javascript:void(0);\" onclick=\"openDialogListView('查看发票信息', '${ctx}/workinvoiceAll/workInvoiceAll/form?id=" + d.invoiceId + "&tabId=1','"+ d.invoiceId +"','95%', '95%')\">" + d.invoiceNumber + "</a>";
+					}}
+				,{field:'invoiceStateStr',align:'center', title: '开票状态', width:100,templet:function(d){
+					if(d.invoiceState == "1" || d.invoiceState == "2" || d.invoiceState == "3" || d.invoiceState == "4"){
+						return "<a class=\"attention-info\" title=\""+ d.invoiceStateStr +"\"href=\"javascript:void(0);\" onclick=\"openDialogListView('查看发票信息', '${ctx}/workinvoiceAll/workInvoiceAll/form?id=" + d.invoiceId + "&tabId=1','"+ d.invoiceId +"','95%', '95%')\" style=\"color:#5cb85c\">" + d.invoiceStateStr + "</a>";
+					}else if(d.invoiceState == "5"){
+						return "<a class=\"attention-info\" title=\""+ d.invoiceStateStr +"\"href=\"javascript:void(0);\" onclick=\"openDialogListView('查看发票信息', '${ctx}/workinvoiceAll/workInvoiceAll/form?id=" + d.invoiceId + "&tabId=1','"+ d.invoiceId +"','95%', '95%')\" style=\"color:#1e9fff\">" + d.invoiceStateStr + "</a>";
+					}else{
+
+						return "<font >"+d.invoiceStateStr+"</font>";
+					}
+
+					}}
+				,{field:'chargeTypeStr',align:'center', title: '发票收款类型', width:120,templet:function(d){
+						if(d.chargeType == "1"){
+							return "<a class=\"attention-info\" title=\""+ d.chargeTypeStr +"\"href=\"javascript:void(0);\" onclick=\"openDialogListView('查看发票信息', '${ctx}/workinvoiceAll/workInvoiceAll/form?id=" + d.invoiceId + "&tabId=1','"+ d.invoiceId +"','95%', '95%')\" style=\"color:#ff5722\">" + d.chargeTypeStr + "</a>";
+						}else if(d.chargeType == "2"){
+							return "<a class=\"attention-info\" title=\""+ d.chargeTypeStr +"\"href=\"javascript:void(0);\" onclick=\"openDialogListView('查看发票信息', '${ctx}/workinvoiceAll/workInvoiceAll/form?id=" + d.invoiceId + "&tabId=1','"+ d.invoiceId +"','95%', '95%')\" style=\"color:#1e9fff\">" + d.chargeTypeStr + "</a>";
+						}else{
+
+							return "<font >"+d.chargeTypeStr+"</font>";
+						}
+
+					}}
+				,{field:'invoiceMoney',align:'center', title: '发票金额汇总', width:120}
+				,{field:'invoiceDate',align:'center', title: '发票收款时间', width:120}
+            ]]
+            ,data: [
+                <c:if test="${ not empty page.list}">
+                <c:forEach items="${page.list}" var="workContractInfo" varStatus="index">
+                <c:if test="${index.index != 0}">,</c:if>
+                {
+                    "index":"${index.index+1}"
+                    ,"id":"${workContractInfo.id}"
+					,"name":"<c:out value="${workContractInfo.name}" escapeXml="true"/>"
+                    ,"contractNum":"${workContractInfo.contractNum}"
+                    ,"projectId":"${workContractInfo.projectId}"
+                    ,"projectNumber":"${workContractInfo.projectNumber}"
+                    ,"projectName":"<c:out value="${workContractInfo.projectName}" escapeXml="true"/>"
+					,"projectMasterName":"${workContractInfo.projectMasterName}"
+					,"reportNumber":"${workContractInfo.reportNumber}"
+                    ,"clientName":"${workContractInfo.clientName}"
+
+                    ,"invoiceId":"${workContractInfo.invoiceId}"
+                    ,"invoiceNumber":"${workContractInfo.invoiceNumber}"
+                    ,"chargeType":"${workContractInfo.chargeType}"
+                    ,"chargeTypeStr":"${workContractInfo.chargeTypeStr}"
+                    ,"invoiceMoney":"${workContractInfo.invoiceMoney}"
+                    ,"invoiceDate":"<fmt:formatDate value="${workContractInfo.invoiceDate}" pattern="yyyy-MM-dd"/>"
+					,"invoiceState":"${workContractInfo.invoiceState}"
+					,"invoiceStateStr":"${workContractInfo.invoiceStateStr}"
+				}
+                </c:forEach>
+                </c:if>
+            ]
+            // ,even: true
+            // ,height: 315
+        });
+    })
+
+    resizeListTable();
+    $("a").on("click",addLinkVisied);
+</script>
+<script>
+    resizeListWindow2();
+    $(window).resize(function(){
+        resizeListWindow2();
+    });
+</script>
+</body>
+</html>

+ 4 - 1
src/main/webapp/webpage/modules/workcontractinfo/workContractInfoAllList.jsp

@@ -856,8 +856,11 @@
 								xml +="<a href=\"javascript:void(0)\" onclick=\"openDialogreplay('重新申请归档', '${ctx}/workContractBorrow/workContractBorrow/form?id=" + d.borrowId + "&tabId=3','95%','95%')\" class=\"op-btn op-btn-edit\" ><i class=\"fa fa-edit\"></i> 修改</a>";
 							if(d.candeleteBorrow != undefined && d.candeleteBorrow == "1")
 								xml +="<a href=\"${ctx}/workContractBorrow/workContractBorrow/delete?id=" + d.borrowId + "\" onclick=\"return confirmx('确认要删除该合同归档申请吗?', this.href)\"   class=\"op-btn op-btn-delete\"><i class=\"fa fa-trash\"></i> 删除</a>";*/
-							if(d.giveBorrow != undefined && d.giveBorrow == "1")
+							if(d.giveBorrow != undefined && d.giveBorrow == "1"){
 								xml +="<a href=\"${ctx}/workContractBorrow/workContractBorrow/updateGiveDate?id=" + d.borrowId + "&home=contractAll&pageFlag=contractAll\" onclick=\"return confirmx('确认归还该合同信息吗?', this.href)\"   class=\"layui-btn layui-btn-xs layui-bg-orange\"> 归还合同</a>";
+							}
+							//统计按钮
+							xml += "<a href=\"javascript:void(0)\" onclick=\"openDialogView('数据统计', '${ctx}/workcontractinfo/workContractInfo/getWorkContractStatisticDetailList?id="+ d.id +"','95%','95%')\" style='background-color: #1E9FFF' class=\"layui-btn layui-btn-xs\" > 统计</a>";
 						}
                         xml+="</div>"
                         return xml;

+ 4 - 1
src/main/webapp/webpage/modules/workcontractinfo/workContractInfoList.jsp

@@ -862,8 +862,11 @@
 								xml +="<a href=\"javascript:void(0)\" onclick=\"openDialogreplay('重新申请归档', '${ctx}/workContractBorrow/workContractBorrow/form?id=" + d.borrowId + "&tabId=3','95%','95%')\" class=\"op-btn op-btn-edit\" ><i class=\"fa fa-edit\"></i> 修改</a>";
 							if(d.candeleteBorrow != undefined && d.candeleteBorrow == "1")
 								xml +="<a href=\"${ctx}/workContractBorrow/workContractBorrow/delete?id=" + d.borrowId + "\" onclick=\"return confirmx('确认要删除该合同归档申请吗?', this.href)\"   class=\"op-btn op-btn-delete\"><i class=\"fa fa-trash\"></i> 删除</a>";*/
-							if(d.giveBorrow != undefined && d.giveBorrow == "1")
+							if(d.giveBorrow != undefined && d.giveBorrow == "1"){
 								xml +="<a href=\"${ctx}/workContractBorrow/workContractBorrow/updateGiveDate?id=" + d.borrowId + "&home=contract\" onclick=\"return confirmx('确认归还该合同信息吗?', this.href)\"   class=\"layui-btn layui-btn-xs layui-bg-orange\"> 归还合同</a>";
+							}
+							//统计按钮
+							xml += "<a href=\"javascript:void(0)\" onclick=\"openDialogView('数据统计', '${ctx}/workcontractinfo/workContractInfo/getWorkContractStatisticDetailList?id="+ d.id +"','95%','95%')\" style='background-color: #1E9FFF' class=\"layui-btn layui-btn-xs\" > 统计</a>";
 						}
                         //作废和删除
 						if (d.cancel != undefined && d.cancel == "1"){