ソースを参照

Merge remote-tracking branch 'origin/master'

周箭河 5 年 前
コミット
152b18264f

+ 2 - 13
mec-biz/src/main/java/com/ym/mec/biz/dal/dto/FinancialExpenditureDto.java

@@ -5,15 +5,12 @@ import io.swagger.annotations.ApiModelProperty;
 
 public class FinancialExpenditureDto extends FinancialExpenditure {
 
-    @ApiModelProperty(value = "批次号",required = false)
+    @ApiModelProperty(value = "分部",required = false)
     private String organName;
 
-    @ApiModelProperty(value = "批次号",required = false)
+    @ApiModelProperty(value = "合作单位",required = false)
     private String cooperationName;
 
-    @ApiModelProperty(value = "批次号",required = false)
-    private String realName;
-
     public String getOrganName() {
         return organName;
     }
@@ -29,12 +26,4 @@ public class FinancialExpenditureDto extends FinancialExpenditure {
     public void setCooperationName(String cooperationName) {
         this.cooperationName = cooperationName;
     }
-
-    public String getRealName() {
-        return realName;
-    }
-
-    public void setRealName(String realName) {
-        this.realName = realName;
-    }
 }

+ 11 - 10
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/FinancialExpenditure.java

@@ -3,6 +3,7 @@ package com.ym.mec.biz.dal.entity;
 import com.ym.mec.biz.dal.enums.ExpenditureTypeEnum;
 import com.ym.mec.biz.dal.enums.FeeProjectEnum;
 import io.swagger.annotations.ApiModelProperty;
+
 import java.math.BigDecimal;
 import java.util.Date;
 
@@ -28,8 +29,8 @@ public class FinancialExpenditure {
 	@ApiModelProperty(value = "学校/合作单位",required = false)
 	private Integer cooperationOrganId;
 	/**  */
-	@ApiModelProperty(value = "申请人编号",required = false)
-	private Integer applyUserId;
+	@ApiModelProperty(value = "申请人",required = false)
+	private String applyUser;
 
 	@ApiModelProperty(value = "支出类型(1:固定费用、2:变动费用:3:业务退费)",required = false)
 	private ExpenditureTypeEnum type;
@@ -55,6 +56,14 @@ public class FinancialExpenditure {
 	/**  */
 	private Integer delFlag;
 
+	public String getApplyUser() {
+		return applyUser;
+	}
+
+	public void setApplyUser(String applyUser) {
+		this.applyUser = applyUser;
+	}
+
 	public FeeProjectEnum getFeeProject() {
 		return feeProject;
 	}
@@ -111,14 +120,6 @@ public class FinancialExpenditure {
 		this.cooperationOrganId = cooperationOrganId;
 	}
 
-	public Integer getApplyUserId() {
-		return applyUserId;
-	}
-
-	public void setApplyUserId(Integer applyUserId) {
-		this.applyUserId = applyUserId;
-	}
-
 	public BigDecimal getAmount() {
 		return amount;
 	}

+ 0 - 11
mec-biz/src/main/java/com/ym/mec/biz/dal/page/FinancialExpenditureQueryInfo.java

@@ -20,9 +20,6 @@ public class FinancialExpenditureQueryInfo extends QueryInfo {
     @ApiModelProperty(value = "学校/合作单位",required = false)
     private Integer cooperationOrganId;
     /**  */
-    @ApiModelProperty(value = "申请人编号",required = false)
-    private Integer applyUserId;
-    /**  */
     @ApiModelProperty(value = "费用项目",required = false)
     private Integer feeProject;
     /**  */
@@ -91,14 +88,6 @@ public class FinancialExpenditureQueryInfo extends QueryInfo {
         this.cooperationOrganId = cooperationOrganId;
     }
 
-    public Integer getApplyUserId() {
-        return applyUserId;
-    }
-
-    public void setApplyUserId(Integer applyUserId) {
-        this.applyUserId = applyUserId;
-    }
-
     public String getStartTime() {
         return startTime;
     }

+ 0 - 14
mec-biz/src/main/java/com/ym/mec/biz/service/impl/FinancialExpenditureServiceImpl.java

@@ -81,20 +81,6 @@ public class FinancialExpenditureServiceImpl extends BaseServiceImpl<Long, Finan
 						continue;
 					}
 					String columnValue = columns.get(s);
-					if (columnValue.equals("phone")) {
-						if(StringUtils.isEmpty(row.get(s).toString())){
-							LOGGER.error("支出记录导入异常:手机号不可为空 param:{}",objectMap);
-							continue valueIsNull;
-						}else {
-							Integer integer = phoneMap.get(row.get(s));
-							if(integer == null){
-								LOGGER.error("支出记录导入异常:手机号校验失败 param:{}",objectMap);
-								continue valueIsNull;
-							}else {
-								objectMap.put("applyUserId", integer);
-							}
-						}
-					}
 					if (columnValue.equals("type")) {
 						for (ExpenditureTypeEnum expenditureType : ExpenditureTypeEnum.values()) {
 							if (expenditureType.getDesc().equals(row.get(s).toString())) {

+ 9 - 17
mec-biz/src/main/resources/config/mybatis/FinancialExpenditureMapper.xml

@@ -13,7 +13,7 @@
         <result column="dingtalk_process_no_" property="dingtalkProcessNo"/>
         <result column="organ_id_" property="organId"/>
         <result column="cooperation_organ_id_" property="cooperationOrganId"/>
-        <result column="apply_user_id_" property="applyUserId"/>
+        <result column="apply_user_" property="applyUser"/>
         <result column="type_" property="type" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
         <result column="fee_project_" property="feeProject" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
         <result column="amount_" property="amount"/>
@@ -39,19 +39,19 @@
     <insert id="insert" parameterType="com.ym.mec.biz.dal.entity.FinancialExpenditure" useGeneratedKeys="true" keyColumn="id"
             keyProperty="id">
         INSERT INTO financial_expenditure (batch_no_,financial_process_no_,dingtalk_process_no_,
-        organ_id_,cooperation_organ_id_,apply_user_id_,amount_,item_detail_,payment_time_,cause_,create_time_,update_time_,fee_project_,type_)
-        VALUES(#{batchNo},#{financialProcessNo},#{dingtalkProcessNo},#{organId},#{cooperationOrganId},#{applyUserId},#{amount},
+        organ_id_,cooperation_organ_id_,apply_user_,amount_,item_detail_,payment_time_,cause_,create_time_,update_time_,fee_project_,type_)
+        VALUES(#{batchNo},#{financialProcessNo},#{dingtalkProcessNo},#{organId},#{cooperationOrganId},#{applyUser},#{amount},
         #{itemDetail},#{paymentTime},#{cause},now(),now(),#{feeProject,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
         #{type,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler})
     </insert>
 
     <insert id="batchInsert">
         INSERT INTO financial_expenditure (batch_no_,financial_process_no_,dingtalk_process_no_,
-        organ_id_,cooperation_organ_id_,apply_user_id_,amount_,item_detail_,payment_time_,cause_,create_time_,update_time_,fee_project_,type_)
+        organ_id_,cooperation_organ_id_,apply_user_,amount_,item_detail_,payment_time_,cause_,create_time_,update_time_,fee_project_,type_)
         VALUES
         <foreach collection="financialExpenditures" item="item" separator=",">
             (#{item.batchNo},#{item.financialProcessNo},#{item.dingtalkProcessNo},#{item.organId},
-            #{item.cooperationOrganId},#{item.applyUserId},#{item.amount},
+            #{item.cooperationOrganId},#{item.applyUser},#{item.amount},
             #{item.itemDetail},#{item.paymentTime},#{item.cause},now(),now(),
             #{item.feeProject,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
             #{item.type,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler})
@@ -83,8 +83,8 @@
             <if test="cooperationOrganId != null">
                 cooperation_organ_id_ = #{cooperationOrganId},
             </if>
-            <if test="applyUserId != null">
-                apply_user_id_ = #{applyUserId},
+            <if test="applyUser != null">
+                apply_user_ = #{applyUser},
             </if>
             <if test="amount != null">
                 amount_ = #{amount},
@@ -131,7 +131,7 @@
             </if>
             <if test="search != null and search != ''">
                 AND (fe.batch_no_ LIKE CONCAT('%',#{search},'%') OR fe.financial_process_no_ LIKE CONCAT('%',#{search},'%')
-                OR fe.dingtalk_process_no_ LIKE CONCAT('%',#{search},'%') OR su.real_name_ LIKE CONCAT('%',#{search},'%'))
+                OR fe.dingtalk_process_no_ LIKE CONCAT('%',#{search},'%') OR fe.apply_user_ LIKE CONCAT('%',#{search},'%'))
             </if>
             <if test="organId != null">
                 AND fe.organ_id_ = #{organId}
@@ -139,9 +139,6 @@
             <if test="cooperationOrganId != null">
                 AND fe.cooperation_organ_id_ = #{cooperationOrganId}
             </if>
-            <if test="applyUserId != null">
-                AND fe.apply_user_id_ = #{applyUserId}
-            </if>
             <if test="startTime != null and startTime != ''">
                 AND DATE_FORMAT(fe.payment_time_,'%Y%m%d') &gt;= #{startTime}
             </if>
@@ -156,7 +153,6 @@
         SELECT fe.*,o.name_ organ_name_,co.name_ cooperation_name_,su.real_name_
         FROM financial_expenditure fe
         LEFT JOIN organization o ON o.id_ = fe.organ_id_
-        LEFT JOIN sys_user su ON su.id_ = fe.apply_user_id_
         LEFT JOIN cooperation_organ co ON co.id_ = fe.cooperation_organ_id_
         <include refid="queryPageSql"/>
         <include refid="global.limit"/>
@@ -165,26 +161,22 @@
     <!-- 查询当前表的总记录数 -->
     <select id="queryCount" resultType="int">
 		SELECT COUNT(DISTINCT fe.id_) FROM financial_expenditure fe
-        LEFT JOIN sys_user su ON su.id_ = fe.apply_user_id_
         <include refid="queryPageSql"/>
 	</select>
 
     <resultMap type="com.ym.mec.biz.dal.dto.FinancialExpenditureDto" id="FinancialExpenditureDto" extends="FinancialExpenditure">
         <result column="organ_name_" property="organName"/>
         <result column="cooperation_name_" property="cooperationName"/>
-        <result column="real_name_" property="realName"/>
     </resultMap>
 
     <select id="findFinancialExpenditureCount" resultType="java.lang.Integer">
         SELECT COUNT(DISTINCT fe.id_) FROM financial_expenditure fe
-        LEFT JOIN sys_user su ON su.id_ = fe.apply_user_id_
         <include refid="queryPageSql"/>
     </select>
     <select id="queryFinancialExpenditurePage" resultMap="FinancialExpenditureDto">
-        SELECT fe.*,o.name_ organ_name_,co.name_ cooperation_name_,su.real_name_
+        SELECT fe.*,o.name_ organ_name_,co.name_ cooperation_name_
         FROM financial_expenditure fe
         LEFT JOIN organization o ON o.id_ = fe.organ_id_
-        LEFT JOIN sys_user su ON su.id_ = fe.apply_user_id_
         LEFT JOIN cooperation_organ co ON co.id_ = fe.cooperation_organ_id_
         <include refid="queryPageSql"/>
         <include refid="global.limit"/>

BIN
mec-web/src/main/resources/excelTemplate/财务支出导入模板.xls