Browse Source

Merge remote-tracking branch 'origin/master'

[user3] 3 years atrás
parent
commit
32c17dcd02

+ 8 - 1
src/main/java/com/jeeplus/modules/workreimbursement/dao/WorkAccountDao.java

@@ -20,4 +20,11 @@ public interface WorkAccountDao extends CrudDao<WorkAccount> {
     public int deleteAudits(WorkAccount workAccount);
     public int insertAudits(WorkAccount workAccount);
     public List<WorkAccountAudit> findByWorkAccount(WorkAccount workAccount);
-}
+
+    /**
+     * 根据id查询parentIds信息
+     * @param id
+     * @return
+     */
+    String getParentIdsById(String id);
+}

+ 11 - 2
src/main/java/com/jeeplus/modules/workreimbursement/entity/WorkAccount.java

@@ -20,9 +20,10 @@ import java.util.List;
  * @version 2017-05-02
  */
 public class WorkAccount extends DataEntity<WorkAccount> {
-	
+
 	private static final long serialVersionUID = 1L;
 	private String type;		// 报销类别
+	private String typeParentIds;		// 报销类别父节点信息
 	private String typeName;		// 报销类别
 	private String financialSubjects;		// 财务科目
 	private String financialSubjectss;		// 财务科目
@@ -221,4 +222,12 @@ public class WorkAccount extends DataEntity<WorkAccount> {
 	public void setReimbursementUserId(String reimbursementUserId) {
 		this.reimbursementUserId = reimbursementUserId;
 	}
-}
+
+	public String getTypeParentIds() {
+		return typeParentIds;
+	}
+
+	public void setTypeParentIds(String typeParentIds) {
+		this.typeParentIds = typeParentIds;
+	}
+}

+ 27 - 0
src/main/java/com/jeeplus/modules/workreimbursement/entity/WorkReimbursement.java

@@ -34,6 +34,7 @@ public class WorkReimbursement extends ActEntity<WorkReimbursement> {
 	private String processInstanceId; // 流程实例编号
 	private String number;		// 报销编号
 	private String businessType;		// 业务类型
+	private String businessTypeParentIds;		// 业务类型父节点信息
 	private String businessTypeName;		// 业务类型
 	private String officeId;		// 报销人的部门编号   项目登记人的信息
 	private String submitterId;		// 报销人 项目登记人
@@ -69,6 +70,8 @@ public class WorkReimbursement extends ActEntity<WorkReimbursement> {
 	private Integer notifyFlag; //代办判定条件
 	private String notifyId; //代办判定条件
 	private String accountType;
+	private String beginReimbursementPrice;		//报销开始金额
+	private String endReimbursementPrice;		//报销结束金额
 	public String getCreateOffice() {
 		return createOffice;
 	}
@@ -575,4 +578,28 @@ public class WorkReimbursement extends ActEntity<WorkReimbursement> {
 	public void setSubmitterOfficeName(String submitterOfficeName) {
 		this.submitterOfficeName = submitterOfficeName;
 	}
+
+	public String getBusinessTypeParentIds() {
+		return businessTypeParentIds;
+	}
+
+	public void setBusinessTypeParentIds(String businessTypeParentIds) {
+		this.businessTypeParentIds = businessTypeParentIds;
+	}
+
+	public String getBeginReimbursementPrice() {
+		return beginReimbursementPrice;
+	}
+
+	public void setBeginReimbursementPrice(String beginReimbursementPrice) {
+		this.beginReimbursementPrice = beginReimbursementPrice;
+	}
+
+	public String getEndReimbursementPrice() {
+		return endReimbursementPrice;
+	}
+
+	public void setEndReimbursementPrice(String endReimbursementPrice) {
+		this.endReimbursementPrice = endReimbursementPrice;
+	}
 }

+ 6 - 0
src/main/java/com/jeeplus/modules/workreimbursement/service/WorkReimbursementAllService.java

@@ -247,6 +247,12 @@ public class WorkReimbursementAllService extends CrudService<WorkReimbursementDa
             officeIdList.add(workReimbursement.getOfficeId());
             workReimbursement.setOfficeIdList(officeIdList);
         }
+
+        if(StringUtils.isNotBlank(workReimbursement.getBusinessType())){
+            //查询报销类型parentIds
+            workReimbursement.setBusinessTypeParentIds(workReimbursement.getBusinessType()+",");
+        }
+
         workReimbursement.setCreateBy(UserUtils.getUser());
         int count = dao.queryCount(workReimbursement);
         page.setCount(count);

+ 4 - 1
src/main/java/com/jeeplus/modules/workreimbursement/service/WorkReimbursementService.java

@@ -260,7 +260,10 @@ public class WorkReimbursementService extends CrudService<WorkReimbursementDao,
             officeIdList.add(workReimbursement.getOfficeId());
             workReimbursement.setOfficeIdList(officeIdList);
         }
-
+        if(StringUtils.isNotBlank(workReimbursement.getBusinessType())){
+            //查询报销类型parentIds
+            workReimbursement.setBusinessTypeParentIds(workReimbursement.getBusinessType()+",");
+        }
 
         int count = dao.queryCount(workReimbursement);
         page.setCount(count);

+ 25 - 19
src/main/resources/mappings/modules/workreimbursement/WorkAccountDao.xml

@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.jeeplus.modules.workreimbursement.dao.WorkAccountDao">
-    
+
 	<sql id="workAccountColumns">
 		a.id AS "id",
 		a.type AS "type",
@@ -24,13 +24,13 @@
 		a.reimburse_remarks as "reimburseRemarks",
 		a.reimbursement_name as "reimbursementUserId"
 	</sql>
-	
+
 	<sql id="workAccountJoins">
 	</sql>
-	
-    
+
+
 	<select id="get" resultType="WorkAccount" >
-		SELECT 
+		SELECT
 			<include refid="workAccountColumns"/>
 		,su.name as "reimbursementName"
 		,so.name as "officeId"
@@ -46,9 +46,9 @@
 		left join work_reimbursement_type_info t on a.type = t.id
 		WHERE a.id = #{id}
 	</select>
-	
+
 	<select id="findList" resultType="WorkAccount" >
-		SELECT 
+		SELECT
 			<include refid="workAccountColumns"/>
 			,su.name as "reimbursementName"
 			,so.name as "officeId"
@@ -88,13 +88,13 @@
 	</select>
 
 	<select id="findAllList" resultType="WorkAccount" >
-		SELECT 
+		SELECT
 			<include refid="workAccountColumns"/>
 		FROM work_account a
 		<include refid="workAccountJoins"/>
 		<where>
 			a.del_flag = #{DEL_FLAG_NORMAL}
-		</where>		
+		</where>
 		<choose>
 			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
 				ORDER BY ${page.orderBy}
@@ -104,7 +104,7 @@
 			</otherwise>
 		</choose>
 	</select>
-	
+
 	<insert id="insert">
 		INSERT INTO work_account(
 			id,
@@ -165,7 +165,7 @@
 		DELETE FROM work_account_audit
 		WHERE work_account_id = #{id}
 	</update>
-	
+
 	<update id="update">
 		UPDATE work_account SET
 		<if test="type != null and type != ''">
@@ -213,8 +213,8 @@
 			update_date = #{updateDate}
 		WHERE id = #{id}
 	</update>
-	
-	
+
+
 	<!--物理删除-->
 	<update id="delete">
 		DELETE FROM work_account
@@ -227,10 +227,10 @@
 			</otherwise>
 		</choose>
 	</update>
-	
+
 	<!--逻辑删除-->
 	<update id="deleteByLogic">
-		UPDATE work_account SET 
+		UPDATE work_account SET
 			del_flag = #{DEL_FLAG_DELETE}
 		<choose>
 			<when test="id !=null and id != ''">
@@ -241,11 +241,17 @@
 			</otherwise>
 		</choose>
 	</update>
-	
-	
+
+
 	<!-- 根据实体名称和字段名称和字段值获取唯一记录 -->
 	<select id="findUniqueByProperty" resultType="WorkAccount" statementType="STATEMENT">
 		select * FROM work_account  where ${propertyName} = '${value}'
 	</select>
-	
-</mapper>
+
+
+	<!-- 根据id查询parentIds信息 -->
+	<select id="getParentIdsById" resultType="java.lang.String">
+		select parent_ids as "parentIds" from work_reimbursement_type_info where id = #{id}
+	</select>
+
+</mapper>

+ 14 - 2
src/main/resources/mappings/modules/workreimbursement/WorkReimbursementDao.xml

@@ -115,11 +115,17 @@
 				AND wa.reimbursement_name = #{submitterId}
 			</if>
 			<if test="businessType != null and businessType != ''">
-				AND wa.type = #{businessType}
+				AND (wa.type = #{businessType} or wa.type in (select id from work_reimbursement_type_info where parent_ids like concat('%',#{businessTypeParentIds},'%')))
 			</if>
 			<if test="projectName != null and projectName != ''">
 				AND pd.number like concat('%',#{projectName},'%')
 			</if>
+			<if test="beginReimbursementPrice != '' and beginReimbursementPrice != null">
+				AND a.money >= #{beginReimbursementPrice}
+			</if>
+			<if test="endReimbursementPrice != '' and endReimbursementPrice != null">
+				AND a.money &lt;= #{endReimbursementPrice}
+			</if>
 			<if test="sqlMap.dsf !=null and sqlMap.dsf!=''">
 				and (${sqlMap.dsf}
 				or wa.reimbursement_name = #{createBy.id})
@@ -178,11 +184,17 @@
 				AND wa.reimbursement_name = #{submitterId}
 			</if>
 			<if test="businessType != null and businessType != ''">
-				AND wa.type = #{businessType}
+				AND (wa.type = #{businessType} or wa.type in (select id from work_reimbursement_type_info where parent_ids like concat('%',#{businessTypeParentIds},'%')))
 			</if>
 			<if test="projectName != null and projectName != ''">
 				AND pd.number like concat('%',#{projectName},'%')
 			</if>
+			<if test="beginReimbursementPrice != '' and beginReimbursementPrice != null">
+				AND a.money >= #{beginReimbursementPrice}
+			</if>
+			<if test="endReimbursementPrice != '' and endReimbursementPrice != null">
+				AND a.money &lt;= #{endReimbursementPrice}
+			</if>
 			<if test="sqlMap.dsf !=null and sqlMap.dsf!=''">
 				and (${sqlMap.dsf}
 				or wa.reimbursement_name = #{createBy.id})

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

@@ -120,7 +120,7 @@
                         <div class="layui-item query athird">
                             <label class="layui-form-label">报销类别:</label>
                             <div class="layui-input-block with-icon">
-                                <sys:treeselectAccessory id="type" name="businessType" value="${workReimbursement.businessTypeName}" labelName="businessTypeName" labelValue="${workReimbursement.businessTypeName}"
+                                <sys:treeselectAccessory id="type" name="businessType" value="${workReimbursement.businessType}" labelName="businessTypeName" labelValue="${workReimbursement.businessTypeName}"
                                                          cssStyle="background-color:#fff" title="报销类别" url="/reimbursementType/reimbursementType/treeData" extId=""  cssClass="form-control  layui-input" allowClear="true" notAllowSelectParent="true"/>
 
                                     <%--                                <sys:treeselect id="officeId" name="officeId" value="${workReimbursement.officeId}" labelName="officeName" labelValue="${workReimbursement.officeName}"--%>
@@ -128,6 +128,16 @@
                             </div>
                         </div>
                         <div class="layui-item query athird">
+                            <label class="layui-form-label double-line">报销金额:</label>
+                            <div class="layui-input-block with-icon">
+                                <input id="beginReimbursementPrice" placeholder="(元)" name="beginReimbursementPrice" type="text" value="${workReimbursement.beginReimbursementPrice}" maxlength="10" class="form-control layui-input query-group" onkeyup="value=value.replace(/[^\d]/g,'')"/>
+                                </input>
+                                <span class="group-sep">-</span>
+                                <input id="endReimbursementPrice"  placeholder="(元)" name="endReimbursementPrice" type="text" value="${workReimbursement.endReimbursementPrice}"  maxlength="10" class="form-control layui-input query-group" onkeyup="value=value.replace(/[^\d]/g,'')"/>
+                                </input>
+                            </div>
+                        </div>
+                        <div class="layui-item query athird">
                             <label class="layui-form-label">报告号:</label>
                             <div class="layui-input-block with-icon">
                                 <input id="projectName" placeholder="请输入报告号" name="projectName" type="text" maxlength="20" class="form-control layui-input" value="${workReimbursement.projectName}"/>

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

@@ -176,7 +176,7 @@
                         <div class="layui-item query athird">
                             <label class="layui-form-label">报销类别:</label>
                             <div class="layui-input-block with-icon">
-                                <sys:treeselectAccessory id="type" name="businessType" value="${workReimbursement.businessTypeName}" labelName="businessTypeName" labelValue="${workReimbursement.businessTypeName}"
+                                <sys:treeselectAccessory id="type" name="businessType" value="${workReimbursement.businessType}" labelName="businessTypeName" labelValue="${workReimbursement.businessTypeName}"
                                                          cssStyle="background-color:#fff" title="报销类别" url="/reimbursementType/reimbursementType/treeData" extId=""  cssClass="form-control  layui-input" allowClear="true" notAllowSelectParent="true"/>
 
 <%--                                <sys:treeselect id="officeId" name="officeId" value="${workReimbursement.officeId}" labelName="officeName" labelValue="${workReimbursement.officeName}"--%>
@@ -184,6 +184,16 @@
                             </div>
                         </div>
                         <div class="layui-item query athird">
+                            <label class="layui-form-label double-line">报销金额:</label>
+                            <div class="layui-input-block with-icon">
+                                <input id="beginReimbursementPrice" placeholder="(元)" name="beginReimbursementPrice" type="text" value="${workReimbursement.beginReimbursementPrice}" maxlength="10" class="form-control layui-input query-group" onkeyup="value=value.replace(/[^\d]/g,'')"/>
+                                </input>
+                                <span class="group-sep">-</span>
+                                <input id="endReimbursementPrice"  placeholder="(元)" name="endReimbursementPrice" type="text" value="${workReimbursement.endReimbursementPrice}"  maxlength="10" class="form-control layui-input query-group" onkeyup="value=value.replace(/[^\d]/g,'')"/>
+                                </input>
+                            </div>
+                        </div>
+                        <div class="layui-item query athird">
                             <label class="layui-form-label">报告号:</label>
                             <div class="layui-input-block with-icon">
                                 <input id="projectName" placeholder="请输入报告号" name="projectName" type="text" maxlength="20" class="form-control layui-input" value="${workReimbursement.projectName}"/>