ljx hace 4 años
padre
commit
fcecc5a34f

+ 17 - 1
src/main/java/com/imed/costaccount/model/CostIncomeGroup.java

@@ -15,7 +15,7 @@ import java.math.BigDecimal;
  * 
  * @author KCYG
  * @email KCYG@xinxicom
- * @date 2021-08-10 09:54:43
+ * @date 2021-08-10 13:50:52
  */
 @Data
 @Accessors(chain = true)
@@ -34,18 +34,34 @@ public class CostIncomeGroup implements Serializable {
 	 * 开单科室的Code
 	 */
 	private String openDepartmentCode;
+	/**
+	 * 开单科室名称
+	 */
+	private String openDepartmentName;
 	/**
 	 * 开单责任中心的Code
 	 */
 	private String openResponsibilityCode;
+	/**
+	 * 开单责任中心名称
+	 */
+	private String openResponsibilityName;
 	/**
 	 * 执行科室的Code
 	 */
 	private String startDepartmentCode;
+	/**
+	 * 执行科室名称
+	 */
+	private String startDepartmentName;
 	/**
 	 * 执行责任中心的Code
 	 */
 	private String startResponsibilityCode;
+	/**
+	 * 执行责任中心名称
+	 */
+	private String startResponsibilityName;
 	/**
 	 * 成本项目的Code
 	 */

+ 5 - 35
src/main/resources/mapper/CostIncomeGroupMapper.xml

@@ -3,13 +3,17 @@
 
 <mapper namespace="com.imed.costaccount.mapper.CostIncomeGroupMapper">
 
-    <!-- 可根据自己的需求,是否要使用 -->
+	<!-- 可根据自己的需求,是否要使用 -->
     <resultMap type="com.imed.costaccount.model.CostIncomeGroup" id="costIncomeGroupMap">
         <result property="id" column="id"/>
         <result property="openDepartmentCode" column="open_department_code"/>
+        <result property="openDepartmentName" column="open_department_name"/>
         <result property="openResponsibilityCode" column="open_responsibility_code"/>
+        <result property="openResponsibilityName" column="open_responsibility_name"/>
         <result property="startDepartmentCode" column="start_department_code"/>
+        <result property="startDepartmentName" column="start_department_name"/>
         <result property="startResponsibilityCode" column="start_responsibility_code"/>
+        <result property="startResponsibilityName" column="start_responsibility_name"/>
         <result property="productCode" column="product_code"/>
         <result property="productName" column="product_name"/>
         <result property="accountCode" column="account_code"/>
@@ -34,40 +38,6 @@
         <result property="createTime" column="create_time"/>
         <result property="deleteTime" column="delete_time"/>
     </resultMap>
-    <sql id="Base_Column_List">
-        id
-        , open_department_code, open_responsibility_code, start_department_code, start_responsibility_code, product_code, account_code, is_income,
-    open_department_amount, start_department_amount, amount, hosp_id, date_year, date_month, create_time,
-    delete_time
-    </sql>
-
-    <select id="countMoney" resultType="com.imed.costaccount.model.vo.CostIncomeGroupAllAmountVO">
-        select
-        <include refid="Base_Column_List"/>
-        ,group_concat(amount) as addMoney
-        from cost_income_group
-        group by open_department_code , start_department_code , product_code;
-    </select>
-
-    <select id="getCollections" resultType="com.imed.costaccount.model.vo.CollectionVO">
-        select  date_year as `year`, date_month as `month`, sum(amount) as amount
-        from cost_income_group
-        where hosp_id = #{hospId} and delete_time = 0
-        <if test="date != null and date != ''">
-            and date_year = YEAR(concat(#{date},'01')) and date_month = MONTH(concat(#{date},'01'))
-        </if>
-        group by date_month, date_year
-        limit #{startIndex},#{pageSize}
-    </select>
-
-    <select id="getCollectionCount" resultType="java.lang.Integer">
-        select count(*)
-        from cost_income_group
-        where hosp_id = #{hospId} and delete_time = 0
-        <if test="date != null and date != ''">
-            and date_year = YEAR(concat(#{date},'01')) and date_month = MONTH(concat(#{date},'01'))
-        </if>
-    </select>
 
 
 </mapper>