Browse Source

Merge branch 'zx_saas_0810' of http://git.dayaedu.com/yonge/mec into master_saas

zouxuan 2 years ago
parent
commit
674063bfaa

+ 8 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/OrganCourseTypeOriginalCostDao.java

@@ -0,0 +1,8 @@
+package com.ym.mec.biz.dal.dao;
+
+import com.ym.mec.biz.dal.entity.OrganCourseTypeOriginalCost;
+import com.ym.mec.common.dal.BaseDAO;
+
+public interface OrganCourseTypeOriginalCostDao extends BaseDAO<Integer, OrganCourseTypeOriginalCost> {
+
+}

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

@@ -22,6 +22,9 @@ public class FinancialExpenditure extends BaseEntity {
 	@ApiModelProperty(value = "批次号",required = false)
 	@ApiModelProperty(value = "批次号",required = false)
 	private String batchNo;
 	private String batchNo;
 	/**  */
 	/**  */
+	@ApiModelProperty(value = "oa审批类型",required = false)
+	private Integer processId;
+	/**  */
 	@ApiModelProperty(value = "财务流程编号",required = false)
 	@ApiModelProperty(value = "财务流程编号",required = false)
 	private String financialProcessNo;
 	private String financialProcessNo;
 	/**  */
 	/**  */
@@ -101,6 +104,14 @@ public class FinancialExpenditure extends BaseEntity {
 
 
 	private boolean maintenanceFeeFlag;
 	private boolean maintenanceFeeFlag;
 
 
+	public Integer getProcessId() {
+		return processId;
+	}
+
+	public void setProcessId(Integer processId) {
+		this.processId = processId;
+	}
+
 	public Integer getApplyUserId() {
 	public Integer getApplyUserId() {
 		return applyUserId;
 		return applyUserId;
 	}
 	}

+ 2 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/MusicGroupPaymentCalenderDetail.java

@@ -31,9 +31,11 @@ public class MusicGroupPaymentCalenderDetail extends BaseEntity {
 	private java.math.BigDecimal expectAmount;
 	private java.math.BigDecimal expectAmount;
 
 
 	/** 废弃字段,如果需要查看金额,请前往订单详情 */
 	/** 废弃字段,如果需要查看金额,请前往订单详情 */
+	//经营报表需要,重新定义该字段
 	private java.math.BigDecimal expectMemberAmount = BigDecimal.ZERO;
 	private java.math.BigDecimal expectMemberAmount = BigDecimal.ZERO;
 	
 	
 	/** 废弃字段,如果需要查看金额,请前往订单详情 */
 	/** 废弃字段,如果需要查看金额,请前往订单详情 */
+	//经营报表需要,重新定义该字段,记录云教练缴费课程预收(经营报表当月,根据缴费项目锁排课程总成本)
 	private java.math.BigDecimal actualAmount;
 	private java.math.BigDecimal actualAmount;
 	
 	
 	/**  */
 	/**  */

+ 51 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/OrganCourseTypeOriginalCost.java

@@ -0,0 +1,51 @@
+package com.ym.mec.biz.dal.entity;
+
+import com.ym.mec.common.entity.BaseEntity;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.math.BigDecimal;
+
+public class OrganCourseTypeOriginalCost extends BaseEntity {
+	private Integer id;
+
+	@ApiModelProperty(value="分部")
+	private Integer organId;
+
+	@ApiModelProperty(value="课程类型")
+	private String courseType;
+
+	@ApiModelProperty(value="价值")
+	private BigDecimal price;
+
+	public Integer getId() {
+		return id;
+	}
+
+	public void setId(Integer id) {
+		this.id = id;
+	}
+
+	public Integer getOrganId() {
+		return organId;
+	}
+
+	public void setOrganId(Integer organId) {
+		this.organId = organId;
+	}
+
+	public String getCourseType() {
+		return courseType;
+	}
+
+	public void setCourseType(String courseType) {
+		this.courseType = courseType;
+	}
+
+	public BigDecimal getPrice() {
+		return price;
+	}
+
+	public void setPrice(BigDecimal price) {
+		this.price = price;
+	}
+}

+ 0 - 11
mec-biz/src/main/java/com/ym/mec/biz/service/MusicGroupPaymentCalenderService.java

@@ -150,17 +150,6 @@ public interface MusicGroupPaymentCalenderService extends BaseService<Long, Musi
 	 */
 	 */
 	MusicGroupPaymentCalender findByMusicGroupRegCalender(String musicGroupId);
 	MusicGroupPaymentCalender findByMusicGroupRegCalender(String musicGroupId);
 
 
-	/**
-	 * @describe 缴费成功后更新calender
-	 * @apiNote 时光荏苒,认真工作的时间总是过得很快,而我、享受这一刻!
-	 * @author zouxuan
-	 * @date 2020/11/3
-	 * @time 17:04
-	 * @param detailId:
-	 * @param userId:
-	 * @return com.ym.mec.biz.dal.entity.MusicGroupStudentFee
-	 */
-    MusicGroupStudentFee updateCalender(Long detailId, Integer userId);
 
 
 	/**
 	/**
 	 * @describe 推送学生待续费通知
 	 * @describe 推送学生待续费通知

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

@@ -265,6 +265,7 @@ public class FinancialExpenditureServiceImpl extends BaseServiceImpl<Long, Finan
                         financialExpenditure.setFinancialProcessNo(pWorkOrderInfo.getId().toString());
                         financialExpenditure.setFinancialProcessNo(pWorkOrderInfo.getId().toString());
                         financialExpenditure.setApplyUser(realName);
                         financialExpenditure.setApplyUser(realName);
                         financialExpenditure.setApplyUserId(pWorkOrderInfo.getCreator());
                         financialExpenditure.setApplyUserId(pWorkOrderInfo.getCreator());
+                        financialExpenditure.setProcessId(pWorkOrderInfo.getProcess());
                         List<OaColumnDto> columns = oaInputDto.getColumns();
                         List<OaColumnDto> columns = oaInputDto.getColumns();
                         if(columns != null && columns.size() > 0){
                         if(columns != null && columns.size() > 0){
                             for (OaColumnDto column : columns) {
                             for (OaColumnDto column : columns) {
@@ -434,6 +435,8 @@ public class FinancialExpenditureServiceImpl extends BaseServiceImpl<Long, Finan
                 financialExpenditure.setBatchNo(workOrderId.toString());
                 financialExpenditure.setBatchNo(workOrderId.toString());
                 financialExpenditure.setFinancialProcessNo(workOrderId.toString());
                 financialExpenditure.setFinancialProcessNo(workOrderId.toString());
                 financialExpenditure.setApplyUser(realName);
                 financialExpenditure.setApplyUser(realName);
+                financialExpenditure.setApplyUserId(pWorkOrderInfo.getCreator());
+                financialExpenditure.setProcessId(pWorkOrderInfo.getProcess());
                 Integer organId = financialExpenditureDao.getDeptId(pWorkOrderInfo.getDeptId());
                 Integer organId = financialExpenditureDao.getDeptId(pWorkOrderInfo.getDeptId());
                 Organization organization = organizationDao.get(organId);
                 Organization organization = organizationDao.get(organId);
                 if(organization != null){
                 if(organization != null){

+ 3 - 26
mec-biz/src/main/java/com/ym/mec/biz/service/impl/MusicGroupPaymentCalenderServiceImpl.java

@@ -295,6 +295,9 @@ public class MusicGroupPaymentCalenderServiceImpl extends BaseServiceImpl<Long,
         BigDecimal memberActualAmount = musicGroupPaymentCalenderMemberService.getActualAmount(musicGroupPaymentBaseCalender);
         BigDecimal memberActualAmount = musicGroupPaymentCalenderMemberService.getActualAmount(musicGroupPaymentBaseCalender);
         BigDecimal repairActualAmount = musicGroupPaymentCalenderRepairService.getActualAmount(musicGroupPaymentBaseCalender);
         BigDecimal repairActualAmount = musicGroupPaymentCalenderRepairService.getActualAmount(musicGroupPaymentBaseCalender);
         BigDecimal activityActualAmount = musicGroupPaymentCalenderActivityService.getActualAmount(musicGroupPaymentBaseCalender);
         BigDecimal activityActualAmount = musicGroupPaymentCalenderActivityService.getActualAmount(musicGroupPaymentBaseCalender);
+        if(memberActualAmount.compareTo(BigDecimal.ZERO) > 0 && (courseActualAmount.compareTo(BigDecimal.ZERO) == 0 || activityActualAmount.compareTo(BigDecimal.ZERO) == 0)){
+
+        }
 
 
         BigDecimal actualTotalAmount = courseActualAmount.add(memberActualAmount)
         BigDecimal actualTotalAmount = courseActualAmount.add(memberActualAmount)
                 .add(repairActualAmount)
                 .add(repairActualAmount)
@@ -1375,30 +1378,4 @@ public class MusicGroupPaymentCalenderServiceImpl extends BaseServiceImpl<Long,
     public MusicGroupPaymentCalender findByMusicGroupRegCalender(String musicGroupId) {
     public MusicGroupPaymentCalender findByMusicGroupRegCalender(String musicGroupId) {
         return musicGroupPaymentCalenderDao.findByMusicGroupRegCalender(musicGroupId);
         return musicGroupPaymentCalenderDao.findByMusicGroupRegCalender(musicGroupId);
     }
     }
-
-    @Transactional(rollbackFor = Exception.class, isolation = Isolation.READ_COMMITTED)
-    public MusicGroupStudentFee updateCalender(Long calenderDetailId, Integer userId) {
-        Date date = new Date();
-        MusicGroupPaymentCalenderDetail calenderDetail = musicGroupPaymentCalenderDetailDao.get(calenderDetailId);
-        MusicGroupPaymentCalender calender = this.get(calenderDetail.getMusicGroupPaymentCalenderId());
-        MusicGroupStudentFee musicGroupStudentFee = musicGroupStudentFeeDao.findByUser(userId, calender.getMusicGroupId());
-//		if(calender.getIsGiveMusicNetwork() && musicGroupStudentFee != null){
-//			//赠送网管课
-//			musicGroupStudentFee.setRemainNetworkClassTimes(musicGroupStudentFee.getRemainNetworkClassTimes() + 1);
-//		}
-        //更新学生的缴费记录状态
-        calenderDetail.setPaymentStatus(MusicGroupStudentFee.PaymentStatus.PAID_COMPLETED);
-//		calenderDetail.setActualAmount(calenderDetail.getExpectAmount().add(calenderDetail.getExpectMemberAmount()));
-        calenderDetail.setPayTime(date);
-        calenderDetail.setUpdateTime(date);
-        musicGroupPaymentCalenderDetailDao.update(calenderDetail);
-
-        //更新实际缴费人数
-        Integer actualNum = calender.getActualNum() == null ? 0 : calender.getActualNum();
-        calender.setActualNum(actualNum + 1);
-        calender.setUpdateTime(date);
-        musicGroupPaymentCalenderDao.update(calender);
-        return musicGroupStudentFee;
-    }
-
 }
 }

+ 1 - 1
mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentManageServiceImpl.java

@@ -778,7 +778,7 @@ public class StudentManageServiceImpl implements StudentManageService {
     @Override
     @Override
     public Map<String, Integer> sumStudentAttendance(Integer courseScheduleId) {
     public Map<String, Integer> sumStudentAttendance(Integer courseScheduleId) {
         CourseSchedule courseSchedule = courseScheduleDao.get(courseScheduleId.longValue());
         CourseSchedule courseSchedule = courseScheduleDao.get(courseScheduleId.longValue());
-        Map<String, Integer> sum = new HashMap<>(5);
+        Map<String, Integer> sum = new HashMap<>(7);
         Integer studentNum = scheduleStudentPaymentDao.countStudentNum(courseScheduleId);
         Integer studentNum = scheduleStudentPaymentDao.countStudentNum(courseScheduleId);
         sum.put("studentNum", studentNum);
         sum.put("studentNum", studentNum);
         Integer signInNum = studentManageDao.countStudentSignInNum(courseScheduleId, "NORMAL");
         Integer signInNum = studentManageDao.countStudentSignInNum(courseScheduleId, "NORMAL");

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

@@ -46,9 +46,9 @@
             keyColumn="id"
             keyColumn="id"
             keyProperty="id">
             keyProperty="id">
         INSERT INTO financial_expenditure (batch_no_, financial_process_no_, dingtalk_process_no_,
         INSERT INTO financial_expenditure (batch_no_, financial_process_no_, dingtalk_process_no_,
-                                           organ_id_, cooperation_organ_id_, apply_user_, apply_user_id_, amount_, item_detail_,
+                                           process_id_,organ_id_, cooperation_organ_id_, apply_user_, apply_user_id_, amount_, item_detail_,
                                            payment_time_, cause_, create_time_, update_time_, fee_project_, type_, tenant_id_)
                                            payment_time_, cause_, create_time_, update_time_, fee_project_, type_, tenant_id_)
-        VALUES (#{batchNo}, #{financialProcessNo}, #{dingtalkProcessNo}, #{organId}, #{cooperationOrganId},
+        VALUES (#{batchNo}, #{financialProcessNo}, #{dingtalkProcessNo},#{processId}, #{organId}, #{cooperationOrganId},
                 #{applyUser}, #{applyUserId}, #{amount},
                 #{applyUser}, #{applyUserId}, #{amount},
                 #{itemDetail}, #{paymentTime}, #{cause}, now(), now(),
                 #{itemDetail}, #{paymentTime}, #{cause}, now(), now(),
                 #{feeProject,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
                 #{feeProject,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
@@ -59,10 +59,10 @@
             keyColumn="id"
             keyColumn="id"
             keyProperty="id">
             keyProperty="id">
         INSERT INTO financial_expenditure (batch_no_,financial_process_no_,dingtalk_process_no_,
         INSERT INTO financial_expenditure (batch_no_,financial_process_no_,dingtalk_process_no_,
-        organ_id_,cooperation_organ_id_,apply_user_,amount_,item_detail_,payment_time_,cause_,create_time_,update_time_,fee_project_,type_,tenant_id_)
+        process_id_,organ_id_,cooperation_organ_id_,apply_user_,amount_,item_detail_,payment_time_,cause_,create_time_,update_time_,fee_project_,type_,tenant_id_)
         VALUES
         VALUES
         <foreach collection="financialExpenditures" item="item" separator=",">
         <foreach collection="financialExpenditures" item="item" separator=",">
-            (#{item.batchNo},#{item.financialProcessNo},#{item.dingtalkProcessNo},#{item.organId},
+            (#{item.batchNo},#{item.financialProcessNo},#{item.dingtalkProcessNo},#{item.organId},#{item.processId},
             #{item.cooperationOrganId},#{item.applyUser},#{item.amount},
             #{item.cooperationOrganId},#{item.applyUser},#{item.amount},
             #{item.itemDetail},#{item.paymentTime},#{item.cause},now(),now(),
             #{item.itemDetail},#{item.paymentTime},#{item.cause},now(),now(),
             #{item.feeProject,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
             #{item.feeProject,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},

+ 2 - 2
mec-biz/src/main/resources/config/mybatis/MusicGroupMapper.xml

@@ -229,8 +229,8 @@
             <if test="musicalInstrumentsProvideStatus != null">
             <if test="musicalInstrumentsProvideStatus != null">
                 musical_instruments_provide_status_ = #{musicalInstrumentsProvideStatus},
                 musical_instruments_provide_status_ = #{musicalInstrumentsProvideStatus},
             </if>
             </if>
-            <if test="musicalInstrumentsProvideDate != null AND musicalInstrumentsProvideDate != ''">
-                musical_instruments_provide_date_ = #{musicalInstrumentsProvideDate},
+            <if test="musicalInstrumentsProvideTime != null AND musicalInstrumentsProvideTime != ''">
+                musical_instruments_provide_time_ = #{musicalInstrumentsProvideTime},
             </if>
             </if>
             <if test="memberCourseShowFlag != null">
             <if test="memberCourseShowFlag != null">
                 member_course_show_flag_ = #{memberCourseShowFlag},
                 member_course_show_flag_ = #{memberCourseShowFlag},

+ 14 - 0
mec-biz/src/main/resources/config/mybatis/OrganCourseTypeOriginalCostMapper.xml

@@ -0,0 +1,14 @@
+<?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.ym.mec.biz.dal.dao.OrganCourseTypeOriginalCostDao">
+    <resultMap id="OperatingReport" type="com.ym.mec.biz.dal.entity.OrganCourseTypeOriginalCost">
+        <id column="id_" property="id"/>
+        <result column="organ_id_" property="organId"/>
+        <result column="course_type_" property="courseType"/>
+        <result column="price_" property="price"/>
+        <result column="tenant_id_" property="tenantId"/>
+    </resultMap>
+    <sql id="Base_Column_List">
+        id_, organ_id_, course_type_, price_
+    </sql>
+</mapper>