Przeglądaj źródła

缴费项目改造

zouxuan 2 lat temu
rodzic
commit
dcc983e483

+ 31 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/CooperationShareProfitDao.java

@@ -0,0 +1,31 @@
+package com.ym.mec.biz.dal.dao;
+
+import com.ym.mec.biz.dal.entity.CooperationShareProfitDto;
+import com.ym.mec.common.dal.BaseDAO;
+import com.ym.mec.biz.dal.entity.CooperationShareProfit;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+import java.util.Map;
+
+public interface CooperationShareProfitDao extends BaseDAO<Integer, CooperationShareProfit> {
+
+
+    /**
+    * @description: 获取已添加分润记录的乐团
+     * @param musicGroupIds
+    * @return java.util.List<java.lang.String>
+    * @author zx
+    * @date 2022/10/20 11:00
+    */
+    List<String> queryNotShare(@Param("musicGroupIds") List<String> musicGroupIds);
+
+
+    List<CooperationShareProfit> initShareProfit(@Param("musicGroupIds") List<String> musicGroupIds);
+
+    void batchInsert(@Param("profits") List<CooperationShareProfit> profits);
+
+    int countDto(Map<String, Object> params);
+
+    List<CooperationShareProfitDto> queryDtoPage(Map<String, Object> params);
+}

+ 1 - 1
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/SysPositionDao.java

@@ -12,5 +12,5 @@ import java.util.Set;
 public interface SysPositionDao extends BaseDAO<Integer, SysPosition> {
 
 
-    List<Map<Integer, String>> findMapByIds(@Param("positionIds") Collection<Integer> positionIds);
+    List<Map<Integer, String>> findMapByIds();
 }

+ 142 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/CooperationShareProfit.java

@@ -0,0 +1,142 @@
+package com.ym.mec.biz.dal.entity;
+
+import io.swagger.annotations.ApiModelProperty;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+
+/**
+ * 对应数据库表(cooperation_share_profit):
+ */
+public class CooperationShareProfit {
+
+	private Integer id;
+	
+	private Integer organId;
+	
+	private Integer cooperationId;
+	
+	private String musicGroupId;
+	
+	@ApiModelProperty(value = "乐器数量", required = false)
+	private Integer musicalNum;
+	
+	@ApiModelProperty(value = "分润总额", required = false)
+	private java.math.BigDecimal totalAmount;
+	
+	@ApiModelProperty(value = "付款状态PAID_COMPLETED(\"已缴费\"), NON_PAYMENT(\"未缴费\")", required = false)
+	private String paymentStatus = "NON_PAYMENT";
+	
+	@ApiModelProperty(value = "交易流水号", required = false)
+	private String paymentNo;
+	
+	@ApiModelProperty(value = "备注", required = false)
+	private String memo;
+
+	@ApiModelProperty(value = "凭证", required = false)
+	private String credentials;
+	
+	private java.util.Date createTime;
+	
+	private java.util.Date updateTime;
+
+	public String getCredentials() {
+		return credentials;
+	}
+
+	public void setCredentials(String credentials) {
+		this.credentials = credentials;
+	}
+
+	public void setId(Integer id){
+		this.id = id;
+	}
+	
+	public Integer getId(){
+		return this.id;
+	}
+			
+	public void setOrganId(Integer organId){
+		this.organId = organId;
+	}
+	
+	public Integer getOrganId(){
+		return this.organId;
+	}
+			
+	public void setCooperationId(Integer cooperationId){
+		this.cooperationId = cooperationId;
+	}
+	
+	public Integer getCooperationId(){
+		return this.cooperationId;
+	}
+			
+	public void setMusicGroupId(String musicGroupId){
+		this.musicGroupId = musicGroupId;
+	}
+	
+	public String getMusicGroupId(){
+		return this.musicGroupId;
+	}
+			
+	public void setMusicalNum(Integer musicalNum){
+		this.musicalNum = musicalNum;
+	}
+	
+	public Integer getMusicalNum(){
+		return this.musicalNum;
+	}
+			
+	public void setTotalAmount(java.math.BigDecimal totalAmount){
+		this.totalAmount = totalAmount;
+	}
+	
+	public java.math.BigDecimal getTotalAmount(){
+		return this.totalAmount;
+	}
+			
+	public void setPaymentStatus(String paymentStatus){
+		this.paymentStatus = paymentStatus;
+	}
+	
+	public String getPaymentStatus(){
+		return this.paymentStatus;
+	}
+			
+	public void setPaymentNo(String paymentNo){
+		this.paymentNo = paymentNo;
+	}
+	
+	public String getPaymentNo(){
+		return this.paymentNo;
+	}
+			
+	public void setMemo(String memo){
+		this.memo = memo;
+	}
+	
+	public String getMemo(){
+		return this.memo;
+	}
+			
+	public void setCreateTime(java.util.Date createTime){
+		this.createTime = createTime;
+	}
+	
+	public java.util.Date getCreateTime(){
+		return this.createTime;
+	}
+			
+	public void setUpdateTime(java.util.Date updateTime){
+		this.updateTime = updateTime;
+	}
+	
+	public java.util.Date getUpdateTime(){
+		return this.updateTime;
+	}
+			
+	@Override
+	public String toString() {
+		return ToStringBuilder.reflectionToString(this);
+	}
+
+}

+ 65 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/CooperationShareProfitDto.java

@@ -0,0 +1,65 @@
+package com.ym.mec.biz.dal.entity;
+
+import io.swagger.annotations.ApiModelProperty;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+
+/**
+ * 对应数据库表(cooperation_share_profit):
+ */
+public class CooperationShareProfitDto extends CooperationShareProfit{
+
+	@ApiModelProperty(value = "分部", required = false)
+	private String organName;
+
+	@ApiModelProperty(value = "合作单位", required = false)
+	private String cooperationName;
+
+	@ApiModelProperty(value = "乐团名称", required = false)
+	private String musicGroupName;
+
+	@ApiModelProperty(value = "乐团主管", required = false)
+	private Integer educationUserId;
+
+	@ApiModelProperty(value = "乐团主管", required = false)
+	private String educationUserName;
+
+	public String getOrganName() {
+		return organName;
+	}
+
+	public void setOrganName(String organName) {
+		this.organName = organName;
+	}
+
+	public String getCooperationName() {
+		return cooperationName;
+	}
+
+	public void setCooperationName(String cooperationName) {
+		this.cooperationName = cooperationName;
+	}
+
+	public String getMusicGroupName() {
+		return musicGroupName;
+	}
+
+	public void setMusicGroupName(String musicGroupName) {
+		this.musicGroupName = musicGroupName;
+	}
+
+	public Integer getEducationUserId() {
+		return educationUserId;
+	}
+
+	public void setEducationUserId(Integer educationUserId) {
+		this.educationUserId = educationUserId;
+	}
+
+	public String getEducationUserName() {
+		return educationUserName;
+	}
+
+	public void setEducationUserName(String educationUserName) {
+		this.educationUserName = educationUserName;
+	}
+}

+ 44 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/page/CooperationShareProfitQueryInfo.java

@@ -0,0 +1,44 @@
+package com.ym.mec.biz.dal.page;
+
+import com.ym.mec.common.page.QueryInfo;
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+* @author zx
+* @date 2021/9/26 15:52
+*/
+public class CooperationShareProfitQueryInfo extends QueryInfo {
+
+    @ApiModelProperty(value = "分部",required = false)
+    private String organId;
+
+    @ApiModelProperty(value = "合作单位编号",required = false)
+    private Integer cooperationOrganId;
+
+    @ApiModelProperty(value = "付款状态",required = false)
+    private String paymentStatus;
+
+    public String getOrganId() {
+        return organId;
+    }
+
+    public void setOrganId(String organId) {
+        this.organId = organId;
+    }
+
+    public Integer getCooperationOrganId() {
+        return cooperationOrganId;
+    }
+
+    public void setCooperationOrganId(Integer cooperationOrganId) {
+        this.cooperationOrganId = cooperationOrganId;
+    }
+
+    public String getPaymentStatus() {
+        return paymentStatus;
+    }
+
+    public void setPaymentStatus(String paymentStatus) {
+        this.paymentStatus = paymentStatus;
+    }
+}

+ 18 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/CooperationShareProfitService.java

@@ -0,0 +1,18 @@
+package com.ym.mec.biz.service;
+
+import com.ym.mec.biz.dal.entity.CooperationShareProfit;
+import com.ym.mec.biz.dal.entity.CooperationShareProfitDto;
+import com.ym.mec.common.page.PageInfo;
+import com.ym.mec.common.page.QueryInfo;
+import com.ym.mec.common.service.BaseService;
+
+import java.util.List;
+
+public interface CooperationShareProfitService extends BaseService<Integer, CooperationShareProfit> {
+
+    PageInfo<CooperationShareProfitDto> queryDtoPage(QueryInfo queryInfo);
+
+    void init(List<Long> courseIds);
+
+    void addCredentials(CooperationShareProfit profit);
+}

+ 103 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/impl/CooperationShareProfitServiceImpl.java

@@ -0,0 +1,103 @@
+package com.ym.mec.biz.service.impl;
+
+import com.ym.mec.biz.dal.dao.CourseScheduleDao;
+import com.ym.mec.biz.dal.dao.TeacherDao;
+import com.ym.mec.biz.dal.entity.CooperationShareProfitDto;
+import com.ym.mec.biz.dal.entity.CourseSchedule;
+import com.ym.mec.common.dal.BaseDAO;
+import com.ym.mec.common.exception.BizException;
+import com.ym.mec.common.page.PageInfo;
+import com.ym.mec.common.page.QueryInfo;
+import com.ym.mec.util.collection.MapUtil;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import com.ym.mec.common.service.impl.BaseServiceImpl;
+import com.ym.mec.biz.dal.entity.CooperationShareProfit;
+import com.ym.mec.biz.service.CooperationShareProfitService;
+import com.ym.mec.biz.dal.dao.CooperationShareProfitDao;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.util.CollectionUtils;
+
+import java.util.*;
+import java.util.stream.Collectors;
+
+@Service
+public class CooperationShareProfitServiceImpl extends BaseServiceImpl<Integer, CooperationShareProfit>  implements CooperationShareProfitService {
+	
+	@Autowired
+	private CooperationShareProfitDao cooperationShareProfitDao;
+	@Autowired
+	private CourseScheduleDao courseScheduleDao;
+	@Autowired
+	private TeacherDao teacherDao;
+
+	@Override
+	public BaseDAO<Integer, CooperationShareProfit> getDAO() {
+		return cooperationShareProfitDao;
+	}
+
+	@Override
+	@Transactional(rollbackFor = Exception.class)
+	public PageInfo<CooperationShareProfitDto> queryDtoPage(QueryInfo queryInfo){
+		PageInfo<CooperationShareProfitDto> pageInfo = new PageInfo<>(queryInfo.getPage(), queryInfo.getRows());
+		Map<String, Object> params = new HashMap<>();
+		MapUtil.populateMap(params, queryInfo);
+
+		List<CooperationShareProfitDto> dataList = null;
+		int count = cooperationShareProfitDao.countDto(params);
+		if (count > 0) {
+			pageInfo.setTotal(count);
+			params.put("offset", pageInfo.getOffset());
+			dataList = cooperationShareProfitDao.queryDtoPage(params);
+			List<Integer> eduUserIds = dataList.stream().map(e -> e.getEducationUserId()).distinct().collect(Collectors.toList());
+			Map<Integer, String> eduNameMap = MapUtil.convertMybatisMap(teacherDao.queryNameByIdList(eduUserIds));
+			Map<Integer, String> organNameMap = getMap("organization", "id_", "name_", true,queryInfo.getTenantId(), Integer.class, String.class);
+			Map<Integer, String> groupNameMap = getMap("music_group", "id_", "name_", true,queryInfo.getTenantId(), Integer.class, String.class);
+			for (CooperationShareProfitDto dto : dataList) {
+				dto.setEducationUserName(eduNameMap.get(dto.getEducationUserId()));
+				dto.setOrganName(organNameMap.get(dto.getOrganId()));
+				dto.setMusicGroupName(groupNameMap.get(dto.getMusicGroupId()));
+			}
+		}
+		if (count == 0) {
+			dataList = new ArrayList<>();
+		}
+		pageInfo.setRows(dataList);
+		return pageInfo;
+	}
+
+	@Override
+	@Transactional(rollbackFor = Exception.class)
+	public void init(List<Long> courseIds) {
+		if(CollectionUtils.isEmpty(courseIds)){
+			return;
+		}
+		List<CourseSchedule> courseSchedules = courseScheduleDao.findByCourseScheduleIds(courseIds);
+		List<String> musicGroupIds = courseSchedules.stream().map(e -> e.getMusicGroupId()).distinct().collect(Collectors.toList());
+		musicGroupIds.removeAll(cooperationShareProfitDao.queryNotShare(musicGroupIds));
+		if(CollectionUtils.isEmpty(musicGroupIds)){
+			return;
+		}
+		List<CooperationShareProfit> profits = cooperationShareProfitDao.initShareProfit(musicGroupIds);
+		if(CollectionUtils.isEmpty(profits)){
+			return;
+		}
+		cooperationShareProfitDao.batchInsert(profits);
+	}
+
+	@Override
+	@Transactional(rollbackFor = Exception.class)
+	public void addCredentials(CooperationShareProfit profit) {
+		CooperationShareProfit shareProfit = Optional.
+				ofNullable(cooperationShareProfitDao.get(profit.getId())).orElseThrow(()->new BizException("分润信息不存在"));
+		if(StringUtils.equals(shareProfit.getPaymentStatus(),"PAID_COMPLETED")){
+			throw new BizException("操作失败:请勿重复录入");
+		}
+		shareProfit.setCredentials(profit.getCredentials());
+		shareProfit.setPaymentNo(profit.getPaymentNo());
+		shareProfit.setMemo(profit.getMemo());
+		shareProfit.setPaymentStatus("PAID_COMPLETED");
+		cooperationShareProfitDao.update(shareProfit);
+	}
+}

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

@@ -56,7 +56,7 @@ public class SysEmployeePositionServiceImpl extends BaseServiceImpl<Integer, Sys
 		if(organPosition != null && organPosition.size() > 0){
 			Map<Integer, List<SimpleUserDto>> collect = organPosition.stream().collect(Collectors.groupingBy(e -> e.getPositionId()));
 			Map<String,List<SimpleUserDto>> resultMap = new HashMap<>(collect.size());
-			Map<Integer,String> positionNameMap = MapUtil.convertMybatisMap(positionDao.findMapByIds(collect.keySet()));
+			Map<Integer,String> positionNameMap = MapUtil.convertMybatisMap(positionDao.findMapByIds());
 			collect.keySet().forEach(e->resultMap.put(positionNameMap.get(e),collect.get(e)));
 			return resultMap;
 		}

+ 126 - 0
mec-biz/src/main/resources/config/mybatis/CooperationShareProfitMapper.xml

@@ -0,0 +1,126 @@
+<?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.CooperationShareProfitDao">
+	
+	<resultMap type="com.ym.mec.biz.dal.entity.CooperationShareProfit" id="CooperationShareProfit">
+		<result column="id_" property="id" />
+		<result column="organ_id_" property="organId" />
+		<result column="cooperation_id_" property="cooperationId" />
+		<result column="music_group_id_" property="musicGroupId" />
+		<result column="musical_num_" property="musicalNum" />
+		<result column="total_amount_" property="totalAmount" />
+		<result column="payment_status_" property="paymentStatus" />
+		<result column="payment_no_" property="paymentNo" />
+		<result column="memo_" property="memo" />
+		<result column="credentials_" property="credentials" />
+		<result column="create_time_" property="createTime" />
+		<result column="update_time_" property="updateTime" />
+	</resultMap>
+	
+	<!-- 根据主键查询一条记录 -->
+	<select id="get" resultMap="CooperationShareProfit" >
+		SELECT * FROM cooperation_share_profit WHERE id_ = #{id} 
+	</select>
+	
+	<!-- 全查询 -->
+	<select id="findAll" resultMap="CooperationShareProfit">
+		SELECT * FROM cooperation_share_profit ORDER BY id_
+	</select>
+	
+	<!-- 向数据库增加一条记录 -->
+	<insert id="insert" parameterType="com.ym.mec.biz.dal.entity.CooperationShareProfit" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
+		INSERT INTO cooperation_share_profit (organ_id_,cooperation_id_,music_group_id_,musical_num_,total_amount_,payment_status_,payment_no_,memo_,create_time_,update_time_)
+		VALUES(#{organId},#{cooperationId},#{musicGroupId},#{musicalNum},#{totalAmount},#{paymentStatus},#{paymentNo},#{memo},NOW(),NOW())
+	</insert>
+	<insert id="batchInsert">
+		INSERT INTO cooperation_share_profit (organ_id_,cooperation_id_,music_group_id_,musical_num_,total_amount_,
+		                                      payment_status_,payment_no_,memo_,create_time_,update_time_)
+		VALUES
+		<foreach collection="profits" item="bean" separator=",">
+			(#{bean.organId},#{bean.cooperationId},#{bean.musicGroupId},#{bean.musicalNum},#{bean.totalAmount},
+			 #{bean.paymentStatus},NOW(),NOW())
+		</foreach>
+	</insert>
+
+	<!-- 根据主键查询一条记录 -->
+	<update id="update" parameterType="com.ym.mec.biz.dal.entity.CooperationShareProfit">
+		UPDATE cooperation_share_profit <set>
+		<if test="paymentNo != null">
+		payment_no_ = #{paymentNo},
+		</if>
+		<if test="paymentStatus != null">
+		payment_status_ = #{paymentStatus},
+		</if>
+		<if test="memo != null">
+		memo_ = #{memo},
+		</if>
+		update_time_ = NOW()
+	</set> WHERE id_ = #{id}
+	</update>
+	
+	<!-- 根据主键删除一条记录 -->
+	<delete id="delete" >
+		DELETE FROM cooperation_share_profit WHERE id_ = #{id} 
+	</delete>
+	
+	<!-- 分页查询 -->
+	<select id="queryPage" resultMap="CooperationShareProfit" parameterType="map">
+		SELECT * FROM cooperation_share_profit ORDER BY id_ <include refid="global.limit"/>
+	</select>
+	
+	<!-- 查询当前表的总记录数 -->
+	<select id="queryCount" resultType="int">
+		SELECT COUNT(*) FROM cooperation_share_profit
+	</select>
+	<select id="queryNotShare" resultType="java.lang.String">
+		select music_group_id_ from cooperation_share_profit where music_group_id_ IN
+		<foreach collection="musicGroupIds" item="id" open="(" close=")">
+			#{id}
+		</foreach>
+	</select>
+	<select id="initShareProfit" resultMap="CooperationShareProfit">
+		select spo.organ_id_,mg.cooperation_organ_id_ cooperation_id_,sr.music_group_id_,COUNT(distinct spod.id_) musical_num_,
+		SUM(CASE WHEN spod.price_ IS NULL THEN 0 ELSE spod.price_ END) total_amount_ from student_registration sr
+			   left join music_group mg ON mg.id_ = sr.music_group_id_
+			   left join music_group_payment_calender mgpc ON mgpc.id_ = sr.music_group_payment_calender_id_
+			   left join student_payment_order spo ON spo.calender_id_ = sr.music_group_payment_calender_id_
+			   left join student_payment_order_detail spod ON spod.payment_order_id_ = spo.id_
+		where sr.music_group_status_ = 'NORMAL' AND mgpc.payment_type_ = 'MUSIC_APPLY' AND sr.music_group_id_ IN
+		<foreach collection="musicGroupIds" item="id" open="(" close=")">
+			#{id}
+		</foreach>
+		  AND spo.type_ = 'APPLY' AND spo.status_ = 'SUCCESS' AND spod.type_ = 'ORGAN_SHARE_PROFIT'
+	</select>
+	<resultMap id="CooperationShareProfitDto" type="com.ym.mec.biz.dal.entity.CooperationShareProfitDto" extends="CooperationShareProfit">
+		<result property="educationUserId" column="education_user_id_"/>
+		<result property="cooperationName" column="cooperation_organ_name_"/>
+	</resultMap>
+	<sql id="queryDtoPageSql">
+		<where>
+			<if test="organId != null and organId != ''">
+				AND FIND_IN_SET(csp.organ_id_,#{organId})
+			</if>
+			<if test="cooperationOrganId != null">
+				AND csp.cooperation_id_ = #{cooperationOrganId}
+			</if>
+			<if test="paymentStatus != null and paymentStatus != ''">
+				AND csp.payment_status_ = #{paymentStatus}
+			</if>
+		</where>
+	</sql>
+	<select id="countDto" resultType="java.lang.Integer">
+		SELECT COUNT(csp.id_) FROM cooperation_share_profit csp
+		<include refid="queryDtoPageSql"/>
+	</select>
+	<select id="queryDtoPage" resultMap="CooperationShareProfitDto">
+		SELECT csp.*,co.education_user_id_,co.name_ cooperation_organ_name_ FROM cooperation_share_profit csp
+		left join cooperation_organ co ON co.id_ = csp.cooperation_id_
+		<include refid="queryDtoPageSql"/>
+		ORDER BY csp.id_
+		<include refid="global.limit"/>
+	</select>
+</mapper>

+ 41 - 0
mec-web/src/main/java/com/ym/mec/web/controller/CooperationShareProfitController.java

@@ -0,0 +1,41 @@
+package com.ym.mec.web.controller;
+
+import com.ym.mec.biz.dal.entity.CooperationShareProfit;
+import com.ym.mec.biz.dal.entity.CooperationShareProfitDto;
+import com.ym.mec.biz.dal.page.CooperationShareProfitQueryInfo;
+import com.ym.mec.biz.service.CooperationShareProfitService;
+import com.ym.mec.common.controller.BaseController;
+import com.ym.mec.common.entity.HttpResponseResult;
+import com.ym.mec.common.page.PageInfo;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+@RequestMapping("cooperationShareProfit")
+@Api(tags = "合作单位分润")
+@RestController
+public class CooperationShareProfitController extends BaseController {
+
+    @Autowired
+    private CooperationShareProfitService cooperationShareProfitService;
+
+    @ApiOperation(value = "获取合作单位分润列表")
+    @PostMapping("/queryPage")
+    @PreAuthorize("@pcs.hasPermissions('cooperationShareProfit/queryPage')")
+    public HttpResponseResult<PageInfo<CooperationShareProfitDto>> queryPage(@RequestBody CooperationShareProfitQueryInfo queryInfo) throws Exception {
+        return succeed(cooperationShareProfitService.queryDtoPage(queryInfo));
+    }
+
+    @ApiOperation(value = "添加付款凭证")
+    @PostMapping("/addCredentials")
+    @PreAuthorize("@pcs.hasPermissions('cooperationShareProfit/addCredentials')")
+    public HttpResponseResult addCredentials(@RequestBody CooperationShareProfit profit) throws Exception {
+        cooperationShareProfitService.addCredentials(profit);
+        return succeed();
+    }
+}

+ 4 - 1
mec-web/src/main/java/com/ym/mec/web/controller/TaskController.java

@@ -120,6 +120,8 @@ public class TaskController extends BaseController {
     private TempLittleArtistTrainingCampService tempLittleArtistTrainingCampService;
     @Autowired
     private OperatingReportNewService operatingReportNewService;
+    @Autowired
+    private CooperationShareProfitService cooperationShareProfitService;
 
 	//每月经营报表
 	@GetMapping(value = "/operatingReportMonth")
@@ -243,6 +245,8 @@ public class TaskController extends BaseController {
 		courseEventSource.courseStatusChange(courseIds);
 		courseIds = courseScheduleService.updateCourseScheduleToUnderway();
 		courseEventSource.courseStatusChange(courseIds);
+		//更新合作单位分润
+		cooperationShareProfitService.init(courseIds);
 		//发送定时群消息
 		imSendGroupMessageService.sendTimedMessages();
 		//更新乐团课统计信息
@@ -260,7 +264,6 @@ public class TaskController extends BaseController {
 	public void stopVipGroupWithNoCreate() {
 		vipGroupService.stopVipGroupWithNoCreate(null);
 	}
-
 	@GetMapping("/pushNoSignOutMessage")
 	// 推送未签退消息提醒
 	public void pushNoSignOutMessage() {