Browse Source

Merge branch 'master' of git.dayaedu.com:yonge/mec

chengpeng 5 năm trước cách đây
mục cha
commit
b24ec5b800
26 tập tin đã thay đổi với 407 bổ sung146 xóa
  1. 9 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/MusicGroupSubjectGoodsGroupDao.java
  2. 19 1
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/StudentRegistrationDao.java
  3. 2 2
      mec-biz/src/main/java/com/ym/mec/biz/dal/dto/RegisterPayDto.java
  4. 18 6
      mec-biz/src/main/java/com/ym/mec/biz/dal/entity/MusicGroupSubjectGoodsGroup.java
  5. 9 0
      mec-biz/src/main/java/com/ym/mec/biz/service/MusicGroupSubjectGoodsGroupService.java
  6. 8 0
      mec-biz/src/main/java/com/ym/mec/biz/service/StudentRegistrationService.java
  7. 6 0
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/MusicGroupSubjectGoodsGroupServiceImpl.java
  8. 22 10
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentRegistrationServiceImpl.java
  9. 11 3
      mec-biz/src/main/resources/config/mybatis/MusicGroupSubjectGoodsGroupMapper.xml
  10. 13 11
      mec-biz/src/main/resources/config/mybatis/StudentRegistrationMapper.xml
  11. 10 3
      mec-education/src/main/java/com/ym/mec/education/controller/StudentController.java
  12. 3 3
      mec-education/src/main/java/com/ym/mec/education/entity/SysUser.java
  13. 23 0
      mec-education/src/main/java/com/ym/mec/education/req/StudentReq.java
  14. 35 0
      mec-education/src/main/java/com/ym/mec/education/resp/StudentResp.java
  15. 5 1
      mec-education/src/main/java/com/ym/mec/education/service/IClassGroupStudentMapperService.java
  16. 80 27
      mec-education/src/main/java/com/ym/mec/education/service/impl/ClassGroupStudentMapperServiceImpl.java
  17. 1 1
      mec-student/src/main/java/com/ym/mec/student/config/ResourceServerConfig.java
  18. 62 4
      mec-student/src/main/java/com/ym/mec/student/controller/MusicGroupController.java
  19. 5 1
      mec-student/src/main/java/com/ym/mec/student/controller/MusicGroupRegisterController.java
  20. 48 6
      mec-thirdparty/src/main/java/com/ym/mec/thirdparty/yqpay/YqPayUtil.java
  21. 4 0
      mec-thirdparty/src/main/java/com/ym/mec/thirdparty/yqpay/payInfo.java
  22. 0 8
      mec-workflow/src/main/java/com/ym/mec/workfow/controller/flow/ProcessController.java
  23. 1 51
      mec-workflow/src/main/java/com/ym/mec/workfow/controller/flow/TaskController.java
  24. 5 5
      mec-workflow/src/main/resources/flows/leave.snaker
  25. 3 3
      mec-workflow/src/main/resources/flows/viprefund.snaker
  26. 5 0
      workflowy/src/main/java/org/snaker/engine/model/NodeModel.java

+ 9 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/MusicGroupSubjectGoodsGroupDao.java

@@ -11,6 +11,7 @@ public interface MusicGroupSubjectGoodsGroupDao extends BaseDAO<Long, MusicGroup
 
     /**
      * 批量保存
+     *
      * @param musicGroupSubjectGoodsGroups
      * @return
      */
@@ -18,9 +19,17 @@ public interface MusicGroupSubjectGoodsGroupDao extends BaseDAO<Long, MusicGroup
 
     /**
      * 获取建团申请,声部设置已确认数据
+     *
      * @param musicGroupId
      * @param subId
      * @return
      */
     List<MusicGroupSubjectGoodsGroup> findGoodsGroup(@Param("musicGroupId") Integer musicGroupId, @Param("subId") Integer subId);
+
+    /**
+     * 根据ids获取打包商品
+     *
+     * @return
+     */
+    List<MusicGroupSubjectGoodsGroup> findGoodsGroupByIds(@Param("ids") String ids);
 }

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

@@ -72,11 +72,29 @@ public interface StudentRegistrationDao extends BaseDAO<Long, StudentRegistratio
      * @return
      */
     Integer updateByUserIdAndMusicGroupId(@Param("studentRegistration") StudentRegistration studentRegistration);
-    
+
+
+    /**
+     * 查询手机是否已注册
+     *
+     * @param musicGroupId
+     * @param parentsPhone
+     * @return
+     */
+    StudentRegistration getByPhoneAndMusicGroupId(@Param("musicGroupId") Integer musicGroupId, @Param("parentsPhone") String parentsPhone);
+
+    /**
+     * 查询用户是否存在
+     * @param phone
+     * @return
+     */
+    Map getSysUserByPhone(String phone);
+
     /**
      * 查询学生信息
      * @param userId
      * @return
      */
     StudentInfo queryStudentInfo(Integer userId);
+
 }

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

@@ -19,11 +19,11 @@ public class RegisterPayDto {
         this.registerId = registerId;
     }
 
-    public String getGoodsGroupId() {
+    public String getGoodsGroupIds() {
         return goodsGroupIds;
     }
 
-    public void setGoodsGroupId(String goodsGroupIds) {
+    public void setGoodsGroupIds(String goodsGroupIds) {
         this.goodsGroupIds = goodsGroupIds;
     }
 

+ 18 - 6
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/MusicGroupSubjectGoodsGroup.java

@@ -41,7 +41,11 @@ public class MusicGroupSubjectGoodsGroup {
 	private List<String> goodsName;
 
 	private List<Goods> goodsList;
-	
+
+	//团购减免课程费用
+	private BigDecimal remissionCourseFee;
+
+
 	/**  */
 	private java.util.Date createTime;
 	
@@ -132,11 +136,6 @@ public class MusicGroupSubjectGoodsGroup {
 		this.price = price;
 	}
 
-	@Override
-	public String toString() {
-		return ToStringBuilder.reflectionToString(this);
-	}
-
 	public List<Goods> getGoodsList() {
 		return goodsList;
 	}
@@ -144,4 +143,17 @@ public class MusicGroupSubjectGoodsGroup {
 	public void setGoodsList(List<Goods> goodsList) {
 		this.goodsList = goodsList;
 	}
+
+	public BigDecimal getRemissionCourseFee() {
+		return remissionCourseFee;
+	}
+
+	public void setRemissionCourseFee(BigDecimal remissionCourseFee) {
+		this.remissionCourseFee = remissionCourseFee;
+	}
+
+	@Override
+	public String toString() {
+		return ToStringBuilder.reflectionToString(this);
+	}
 }

+ 9 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/MusicGroupSubjectGoodsGroupService.java

@@ -2,6 +2,7 @@ package com.ym.mec.biz.service;
 
 import com.ym.mec.biz.dal.entity.MusicGroupSubjectGoodsGroup;
 import com.ym.mec.common.service.BaseService;
+import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
 
@@ -15,4 +16,12 @@ public interface MusicGroupSubjectGoodsGroupService extends BaseService<Long, Mu
      */
     List<MusicGroupSubjectGoodsGroup> findGoodsGroup(Integer musicGroupId, Integer subId);
 
+
+    /**
+     * 根据ids获取打包商品
+     *
+     * @return
+     */
+    List<MusicGroupSubjectGoodsGroup> findGoodsGroupByIds(String ids);
+
 }

+ 8 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/StudentRegistrationService.java

@@ -79,4 +79,12 @@ public interface StudentRegistrationService extends BaseService<Long, StudentReg
      */
     StudentInfo queryStudentInfo(Integer userId);
 
+    /**
+     * 查询手机是否已注册
+     * @param musicGroupId
+     * @param parentsPhone
+     * @return
+     */
+    StudentRegistration getByPhoneAndMusicGroupId(Integer musicGroupId,  String parentsPhone);
+
 }

+ 6 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/impl/MusicGroupSubjectGoodsGroupServiceImpl.java

@@ -26,4 +26,10 @@ public class MusicGroupSubjectGoodsGroupServiceImpl extends BaseServiceImpl<Long
     public List<MusicGroupSubjectGoodsGroup> findGoodsGroup(Integer musicGroupId, Integer subId) {
         return musicGroupSubjectGoodsGroupDao.findGoodsGroup(musicGroupId, subId);
     }
+
+    @Override
+    public List<MusicGroupSubjectGoodsGroup> findGoodsGroupByIds(String ids) {
+
+	    return musicGroupSubjectGoodsGroupDao.findGoodsGroupByIds(ids);
+    }
 }

+ 22 - 10
mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentRegistrationServiceImpl.java

@@ -8,6 +8,8 @@ import java.util.Map;
 
 import javax.annotation.Resource;
 
+import com.ym.mec.biz.dal.dao.TeacherDao;
+import com.ym.mec.biz.dal.entity.Teacher;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
@@ -35,7 +37,7 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
     @Resource
     private StudentRegistrationDao studentRegistrationDao;
     @Autowired
-    private SysUserFeignService sysUserFeignService;
+    private TeacherDao teacherDao;
 
     @Override
     public BaseDAO<Long, StudentRegistration> getDAO() {
@@ -103,9 +105,10 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
     @Transactional(rollbackFor = Exception.class)
     public StudentRegistration addStudent(StudentRegistration studentRegistration) {
         Date date = new Date();
-        SysUser sysUser = sysUserFeignService.queryUserByMobile(studentRegistration.getParentsPhone());
-        if (sysUser == null) {
-            sysUser = new SysUser();
+        int userId = 0;
+        Map hasUser = studentRegistrationDao.getSysUserByPhone(studentRegistration.getParentsPhone());
+        if (hasUser == null) {
+            SysUser sysUser = new SysUser();
             sysUser.setPhone(studentRegistration.getParentsPhone());
             sysUser.setCreateTime(date);
             sysUser.setUpdateTime(date);
@@ -116,15 +119,24 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
             sysUser.setOrganId(studentRegistration.getOrganId());
             sysUser.setRealName(studentRegistration.getName());
             sysUser.setIdCardNo(studentRegistration.getIdCardNo());
-            sysUserFeignService.addUser(sysUser);
+            teacherDao.addSysUser(sysUser);
+            userId = sysUser.getId();
+        } else {
+            userId = (int) hasUser.get("id_");
         }
-        studentRegistration.setUserId(sysUser.getId());
+        studentRegistration.setUserId(userId);
         studentRegistrationDao.insert(studentRegistration);
         return studentRegistration;
     }
 
-	@Override
-	public StudentInfo queryStudentInfo(Integer userId) {
-		return studentRegistrationDao.queryStudentInfo(userId);
-	}
+
+    @Override
+    public StudentRegistration getByPhoneAndMusicGroupId(Integer musicGroupId, String parentsPhone) {
+        return studentRegistrationDao.getByPhoneAndMusicGroupId(musicGroupId, parentsPhone);
+    }
+
+    @Override
+    public StudentInfo queryStudentInfo(Integer userId) {
+        return studentRegistrationDao.queryStudentInfo(userId);
+    }
 }

+ 11 - 3
mec-biz/src/main/resources/config/mybatis/MusicGroupSubjectGoodsGroupMapper.xml

@@ -14,6 +14,7 @@
         <result column="create_time_" property="createTime"/>
         <result column="update_time_" property="updateTime"/>
         <result column="price_" property="price"/>
+        <result column="remission_course_fee_" property="remissionCourseFee"/>
     </resultMap>
 
     <!-- 根据主键查询一条记录 -->
@@ -95,13 +96,20 @@
         FROM music_group_subject_goods_group
     </select>
 
-    <resultMap type="com.ym.mec.biz.dal.entity.MusicGroupSubjectGoodsGroup" extends="MusicGroupSubjectGoodsGroup" id="findGoodsGroupMap">
-        <collection property="goodsList" resultMap="com.ym.mec.biz.dal.dao.GoodsDao.Goods" columnPrefix="g_" />
+    <resultMap type="com.ym.mec.biz.dal.entity.MusicGroupSubjectGoodsGroup" extends="MusicGroupSubjectGoodsGroup"
+               id="findGoodsGroupMap">
+        <collection property="goodsList" resultMap="com.ym.mec.biz.dal.dao.GoodsDao.Goods" columnPrefix="g_"/>
     </resultMap>
     <select id="findGoodsGroup" resultMap="findGoodsGroupMap">
-        SELECT mgs.*, g.id_ g_id_,g.name_ g_name_,g.market_price_  g_market_price_,g.complement_goods_id_list_ g_complement_goods_id_list_
+        SELECT mgs.*, g.id_ g_id_,g.name_ g_name_,g.market_price_ g_market_price_,g.complement_goods_id_list_
+        g_complement_goods_id_list_
         FROM music_group_subject_goods_group mgs,goods g
         WHERE FIND_IN_SET (g.id_ ,mgs.goods_id_list_)
         AND mgs.music_group_id_ = #{musicGroupId} AND mgs.subject_id_ = #{subId}
     </select>
+
+    <!-- 根据ids获取对应分组商品 -->
+    <select id="findGoodsGroupByIds" resultMap="MusicGroupSubjectGoodsGroup">
+        SELECT * FROM music_group_subject_goods_group WHERE FIND_IN_SET(id_,#{ids})
+    </select>
 </mapper>

+ 13 - 11
mec-biz/src/main/resources/config/mybatis/StudentRegistrationMapper.xml

@@ -28,8 +28,6 @@
         <result column="parents_company_" property="parentsCompany"/>
         <result column="payment_status_" property="paymentStatus"
                 typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
-        <result column="last_payment_date_" property="lastPaymentDate"/>
-        <result column="next_payment_date_" property="nextPaymentDate"/>
     </resultMap>
     
     <resultMap type="com.ym.mec.biz.dal.dto.StudentInfo" id="StudentInfo">
@@ -77,9 +75,9 @@
     <insert id="insert" parameterType="com.ym.mec.biz.dal.entity.StudentRegistration" useGeneratedKeys="true"
             keyColumn="id" keyProperty="id">
         INSERT INTO student_registration
-        (parents_phone_,id_,user_id_,name_,music_group_id_,current_grade_,current_class_,subject_id_,is_allow_adjust_,kit_purchase_method_,remark_,create_time_,update_time_,parents_name_,parents_company_,payment_status_,last_payment_date_,next_payment_date_,actual_subject_id_)
+        (parents_phone_,id_,user_id_,name_,music_group_id_,current_grade_,current_class_,subject_id_,is_allow_adjust_,kit_purchase_method_,remark_,create_time_,update_time_,parents_name_,parents_company_,payment_status_,actual_subject_id_)
         VALUES(#{parentsPhone},#{id},#{userId},#{name},#{musicGroupId},#{currentGrade},#{currentClass},#{subjectId},#{isAllowAdjust,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{kitPurchaseMethod,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
-        #{remark},now(),now(),#{parentsName},#{parentsCompany},#{paymentStatus,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{lastPaymentDate},#{nextPaymentDate},#{subjectId})
+        #{remark},now(),now(),#{parentsName},#{parentsCompany},#{paymentStatus,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{subjectId})
     </insert>
 
     <!-- 根据主键查询一条记录 -->
@@ -92,15 +90,9 @@
             <if test="subjectId != null">
                 subject_id_ = #{subjectId},
             </if>
-            <if test="nextPaymentDate != null">
-                next_payment_date_ = #{nextPaymentDate},
-            </if>
             <if test="currentGrade != null">
                 current_grade_ = #{currentGrade},
             </if>
-            <if test="lastPaymentDate != null">
-                last_payment_date_ = #{lastPaymentDate},
-            </if>
             <if test="currentClass != null">
                 current_class_ = #{currentClass},
             </if>
@@ -246,8 +238,18 @@
     </select>
 
     <update id="updateByUserIdAndMusicGroupId" parameterType="com.ym.mec.biz.dal.entity.StudentRegistration">
-        UPDATE student_registration SET class_group_id_ = #{classGroupId} WHERE user_id_ = #{userId} AND music_group_id_ = #{musicGroupId}
+        UPDATE student_registration SET class_group_id_ = #{classGroupId} WHERE user_id_ = #{userId} AND music_group_id_
+        = #{musicGroupId}
     </update>
+
+    <!-- 根据乐团编号和手机号查询注册乐团注册信息-->
+    <select id="getByPhoneAndMusicGroupId" resultMap="StudentRegistration">
+        SELECT * FROM student_registration WHERE music_group_id_=#{musicGroupId} AND parents_phone_ = #{parentsPhone}
+    </select>
+
+    <select id="getSysUserByPhone" resultType="map">
+        SELECT * FROM sys_user WHERE phone_ = #{phone}
+    </select>
     
     <select id="queryStudentInfo" resultMap="StudentInfo">
         SELECT u.*,sr.name_,sr.current_class_,sr.current_grade_,sr.actual_subject_id_ FROM sys_user u left join student_registration  sr on u.id_ = sr.user_id_ where u.id_ = #{userId} order by sr.create_time_ desc limit 0,1

+ 10 - 3
mec-education/src/main/java/com/ym/mec/education/controller/StudentController.java

@@ -1,8 +1,9 @@
 package com.ym.mec.education.controller;
 
+import com.ym.mec.education.base.BaseResponse;
 import com.ym.mec.education.base.PageResponse;
 import com.ym.mec.education.req.ClassGroupReq;
-import com.ym.mec.education.req.TeacherReq;
+import com.ym.mec.education.req.StudentReq;
 import com.ym.mec.education.service.IClassGroupStudentMapperService;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
@@ -36,8 +37,14 @@ public class StudentController {
 
     @PostMapping("/listByTeacher")
     @ApiOperation("根据当前登录人查询对应学员名单列表")
-    public PageResponse listByTeacher(@RequestBody TeacherReq teacherReq) {
-        return groupStudentMapperService.getPageByTeacher(teacherReq);
+    public PageResponse listByTeacher(@RequestBody StudentReq studentReq) {
+        return groupStudentMapperService.getPageByTeacher(studentReq);
+    }
+
+    @PostMapping("/info")
+    @ApiOperation("根据学员id查询详情")
+    public BaseResponse info(@RequestBody StudentReq studentReq) {
+        return groupStudentMapperService.getInfo(studentReq);
     }
 
 }

+ 3 - 3
mec-education/src/main/java/com/ym/mec/education/entity/SysUser.java

@@ -87,7 +87,7 @@ public class SysUser extends Model<SysUser> {
      * 性别(0,女  1,男)
      */
     @TableField("gender_")
-    private String gender;
+    private Integer gender;
     /**
      * 民族
      */
@@ -255,11 +255,11 @@ public class SysUser extends Model<SysUser> {
         return this;
     }
 
-    public String getGender() {
+    public Integer getGender() {
         return gender;
     }
 
-    public SysUser setGender(String gender) {
+    public SysUser setGender(Integer gender) {
         this.gender = gender;
         return this;
     }

+ 23 - 0
mec-education/src/main/java/com/ym/mec/education/req/StudentReq.java

@@ -0,0 +1,23 @@
+package com.ym.mec.education.req;
+
+import com.ym.mec.education.base.BaseQuery;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+/**
+ * @program: mec
+ * @description: 学员入参
+ * @author: xw
+ * @create: 2019-10-06 17:51
+ */
+@Data
+@ApiModel(description = "学员入参")
+public class StudentReq extends BaseQuery {
+
+    @ApiModelProperty(value = "学员姓名")
+    private String studentName;
+
+    @ApiModelProperty(value = "学员编号")
+    private String studentId;
+}

+ 35 - 0
mec-education/src/main/java/com/ym/mec/education/resp/StudentResp.java

@@ -0,0 +1,35 @@
+package com.ym.mec.education.resp;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.experimental.Accessors;
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * @program: mec
+ * @description: 学员出参
+ * @author: xw
+ * @create: 2019-10-06 19:24
+ */
+@Data
+@ApiModel(description = "学员出参")
+@Accessors(chain = true)
+public class StudentResp implements Serializable {
+
+    @ApiModelProperty(value = "学员姓名")
+    private String studentName;
+    @ApiModelProperty(value = "学员性别")
+    private String studentGender;
+    @ApiModelProperty(value = "授课科目")
+    private List<String> subjectName;
+    @ApiModelProperty(value = "学校")
+    private String studentSchool;
+    @ApiModelProperty(value = "学员年级")
+    private String studentGrade;
+    @ApiModelProperty(value = "手机号(父母)")
+    private String parentsPhone;
+    @ApiModelProperty(value = "备注")
+    private String remark;
+}

+ 5 - 1
mec-education/src/main/java/com/ym/mec/education/service/IClassGroupStudentMapperService.java

@@ -2,9 +2,11 @@ package com.ym.mec.education.service;
 
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.IService;
+import com.ym.mec.education.base.BaseResponse;
 import com.ym.mec.education.base.PageResponse;
 import com.ym.mec.education.entity.ClassGroupStudentMapper;
 import com.ym.mec.education.req.ClassGroupReq;
+import com.ym.mec.education.req.StudentReq;
 import com.ym.mec.education.req.TeacherReq;
 import com.ym.mec.education.resp.ClassStudentResp;
 import java.util.List;
@@ -27,5 +29,7 @@ public interface IClassGroupStudentMapperService extends IService<ClassGroupStud
 
     Page<ClassGroupStudentMapper> selectPageByCondition(ClassGroupReq classGroupReq);
 
-    PageResponse getPageByTeacher(TeacherReq teacherReq);
+    PageResponse getPageByTeacher(StudentReq studentReq);
+
+    BaseResponse getInfo(StudentReq studentReq);
 }

+ 80 - 27
mec-education/src/main/java/com/ym/mec/education/service/impl/ClassGroupStudentMapperServiceImpl.java

@@ -6,20 +6,23 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.google.common.collect.Lists;
 import com.ym.mec.biz.dal.enums.JobTypeEnum;
+import com.ym.mec.common.enums.UserGenderEnum;
+import com.ym.mec.common.security.SecurityUtils;
+import com.ym.mec.education.base.BaseResponse;
 import com.ym.mec.education.base.PageResponse;
 import com.ym.mec.education.entity.*;
 import com.ym.mec.education.enums.TeachTypeEnum;
 import com.ym.mec.education.mapper.ClassGroupStudentMapperMapper;
 import com.ym.mec.education.req.ClassGroupReq;
-import com.ym.mec.education.req.TeacherReq;
+import com.ym.mec.education.req.StudentReq;
 import com.ym.mec.education.resp.ClassStudentResp;
 import com.ym.mec.education.resp.StudentListResp;
+import com.ym.mec.education.resp.StudentResp;
 import com.ym.mec.education.service.*;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.util.CollectionUtils;
-
 import java.util.*;
 import java.util.stream.Collectors;
 
@@ -50,7 +53,10 @@ public class ClassGroupStudentMapperServiceImpl extends ServiceImpl<ClassGroupSt
     private ISubjectService subjectService;
     @Autowired
     private IClassGroupTeacherMapperService classGroupTeacherMapperService;
-
+    @Autowired
+    private IStudentRegistrationService studentRegistrationService;
+    @Autowired
+    private ISchoolService schoolService;
 
     @Override
     public PageResponse getPage(ClassGroupReq classGroupReq) {
@@ -68,11 +74,11 @@ public class ClassGroupStudentMapperServiceImpl extends ServiceImpl<ClassGroupSt
         page.getRecords().forEach(item -> {
             SysUser sysUser = sysUserService.getById(item.getUserId());
             StudentListResp studentRegistrationResp = new StudentListResp()
-                    .setStudentName(sysUser.getRealName());
+                .setStudentName(sysUser.getRealName());
             if (Objects.nonNull(classGroup) && Objects.nonNull(classGroup.getMusicGroupId())) {
                 QueryWrapper<MusicGroupStudentFee> musicGroupStudentFeeQueryWrapper = new QueryWrapper<MusicGroupStudentFee>();
                 musicGroupStudentFeeQueryWrapper.lambda().eq(true, MusicGroupStudentFee::getMusicGroupId, classGroup.getMusicGroupId())
-                        .eq(true, MusicGroupStudentFee::getUserId, item.getUserId());
+                    .eq(true, MusicGroupStudentFee::getUserId, item.getUserId());
                 MusicGroupStudentFee musicGroupStudentFee = musicGroupStudentFeeService.getOne(musicGroupStudentFeeQueryWrapper);
                 if (Objects.nonNull(musicGroupStudentFee) && Objects.nonNull(musicGroupStudentFee.getContinuousAbsenteeismTimes())) {
                     studentRegistrationResp.setStudentAttendance("连续缺到" + musicGroupStudentFee.getContinuousAbsenteeismTimes() + "次");
@@ -105,70 +111,117 @@ public class ClassGroupStudentMapperServiceImpl extends ServiceImpl<ClassGroupSt
     }
 
     @Override
-    public PageResponse getPageByTeacher(TeacherReq teacherReq) {
-        if (Objects.isNull(teacherReq.getUserId())) {
-            return PageResponse.errorParam();
-        }
+    public PageResponse getPageByTeacher(StudentReq studentReq) {
         //判断当前登录人角色
-        Teacher teacher = teacherService.getById(teacherReq.getUserId());
+        Teacher teacher = teacherService.getById(SecurityUtils.getUser().getUserId());
         if (Objects.nonNull(teacher)) {
             //教学主管
             QueryWrapper<MusicGroup> musicGroupQueryWrapper = new QueryWrapper<>();
             if (JobTypeEnum.TEACHING.getCode().equals(teacher.getJobType())) {
                 musicGroupQueryWrapper.lambda().eq(MusicGroup::getOrganId, teacher.getOrganId())
-                        .eq(MusicGroup::getEducationalTeacherId, teacher.getId());
+                    .eq(MusicGroup::getEducationalTeacherId, teacher.getId());
             } else if (JobTypeEnum.ACADEMIC.getCode().equals(teacher.getJobType())) {
                 //教务老师
                 musicGroupQueryWrapper.lambda().eq(MusicGroup::getOrganId, teacher.getOrganId())
-                        .eq(MusicGroup::getTeamTeacherId, teacher.getId());
+                    .eq(MusicGroup::getTeamTeacherId, teacher.getId());
             }
             List<MusicGroup> musicGroupList = musicGroupService.list(musicGroupQueryWrapper);
             if (!CollectionUtils.isEmpty(musicGroupList)) {
                 QueryWrapper<ClassGroup> classGroupQueryWrapper = new QueryWrapper<>();
                 classGroupQueryWrapper.lambda().in(ClassGroup::getMusicGroupId,
-                        musicGroupList.stream().map(MusicGroup::getId).collect(Collectors.toList()));
+                    musicGroupList.stream().map(MusicGroup::getId).collect(Collectors.toList()));
                 List<ClassGroup> classGroupList = classGroupService.list(classGroupQueryWrapper);
                 if (!CollectionUtils.isEmpty(classGroupList)) {
-                    return PageResponse.success(getPage(classGroupList, teacherReq, musicGroupList));
+                    return PageResponse.success(getPage(classGroupList, studentReq, musicGroupList));
                 }
             }
             //指导老师 助教老师
             QueryWrapper<ClassGroupTeacherMapper> classGroupTeacherMapperQueryWrapper = new QueryWrapper<>();
             if (JobTypeEnum.ADVISER.getCode().equals(teacher.getJobType())) {
                 classGroupTeacherMapperQueryWrapper.lambda().eq(ClassGroupTeacherMapper::getTeacherRole, TeachTypeEnum.BISHOP.getCode())
-                        .eq(ClassGroupTeacherMapper::getUserId, teacher.getId());
+                    .eq(ClassGroupTeacherMapper::getUserId, teacher.getId());
             } else if (JobTypeEnum.ASSISTANT.getCode().equals(teacher.getJobType())) {
                 classGroupTeacherMapperQueryWrapper.lambda().eq(ClassGroupTeacherMapper::getTeacherRole, TeachTypeEnum.TEACHING.getCode())
-                        .eq(ClassGroupTeacherMapper::getUserId, teacher.getId());
+                    .eq(ClassGroupTeacherMapper::getUserId, teacher.getId());
             }
             List<ClassGroupTeacherMapper> classGroupTeacherMapperList = classGroupTeacherMapperService.list(classGroupTeacherMapperQueryWrapper);
             if (!CollectionUtils.isEmpty(classGroupTeacherMapperList)) {
                 QueryWrapper<ClassGroup> classGroupQueryWrapper = new QueryWrapper<>();
                 classGroupQueryWrapper.lambda().in(ClassGroup::getMusicGroupId, classGroupTeacherMapperList.stream().
-                        map(ClassGroupTeacherMapper::getMusicGroupId).collect(Collectors.toList()));
+                    map(ClassGroupTeacherMapper::getMusicGroupId).collect(Collectors.toList()));
                 List<ClassGroup> classGroupList = classGroupService.list(classGroupQueryWrapper);
                 if (!CollectionUtils.isEmpty(classGroupList)) {
                     musicGroupQueryWrapper.lambda().in(MusicGroup::getId, classGroupList.stream().map(ClassGroup::getMusicGroupId).collect(Collectors.toList()));
                     musicGroupList = musicGroupService.list(musicGroupQueryWrapper);
-                    return PageResponse.success(getPage(classGroupList, teacherReq, musicGroupList));
+                    return PageResponse.success(getPage(classGroupList, studentReq, musicGroupList));
                 }
             }
         }
         return PageResponse.noDataExists();
     }
 
-    private IPage<StudentListResp> getPage(List<ClassGroup> classGroupList, TeacherReq teacherReq, List<MusicGroup> musicGroupList) {
+    @Override
+    public BaseResponse getInfo(StudentReq studentReq) {
+        if (Objects.isNull(studentReq.getStudentId())) {
+            return BaseResponse.errorParam();
+        }
+        SysUser user = sysUserService.getById(studentReq.getStudentId());
+        StudentResp studentResp = new StudentResp();
+        List<String> subjectNameList = Lists.newArrayList();
+        if (Objects.nonNull(user)) {
+            studentResp.setStudentName(user.getRealName())
+                .setStudentGender(UserGenderEnum.get(user.getGender()).getDescription());
+        }
+        QueryWrapper<StudentRegistration> studentRegistrationQueryWrapper = new QueryWrapper<>();
+        studentRegistrationQueryWrapper.lambda().eq(StudentRegistration::getUserId, studentReq.getStudentId());
+        studentRegistrationService.list(studentRegistrationQueryWrapper).stream().findFirst().
+            ifPresent(studentRegistration -> studentResp.setParentsPhone(studentRegistration.getParentsPhone())
+                .setStudentGrade(studentRegistration.getCurrentGrade())
+                .setRemark(studentRegistration.getRemark()));
+        QueryWrapper<ClassGroupStudentMapper> classGroupStudentMapperQueryWrapper = new QueryWrapper<>();
+        classGroupStudentMapperQueryWrapper.lambda().eq(ClassGroupStudentMapper::getUserId, studentReq.getStudentId());
+        List<ClassGroupStudentMapper> classGroupStudentMapperList = list(classGroupStudentMapperQueryWrapper);
+        if (!CollectionUtils.isEmpty(classGroupStudentMapperList)) {
+            QueryWrapper<ClassGroup> classGroupQueryWrapper = new QueryWrapper<>();
+            classGroupQueryWrapper.lambda().in(ClassGroup::getId, classGroupStudentMapperList.stream().
+                map(ClassGroupStudentMapper::getClassGroupId).collect(Collectors.toList()));
+            List<ClassGroup> classGroupList = classGroupService.list(classGroupQueryWrapper);
+            if (!CollectionUtils.isEmpty(classGroupList)) {
+                classGroupList.forEach(classGroup -> {
+                    List<Subject> subjectList = subjectService.getSubjectList(classGroup.getSubjectIdList());
+                    if (!CollectionUtils.isEmpty(subjectList)) {
+                        subjectNameList.addAll(subjectList.stream().map(Subject::getName).collect(Collectors.toList()));
+                    }
+                });
+                //学校
+                classGroupList.stream().findFirst().ifPresent(group -> {
+                    MusicGroup musicGroup = musicGroupService.getById(group.getMusicGroupId());
+                    if (Objects.nonNull(musicGroup) && Objects.nonNull(musicGroup.getSchoolId())) {
+                        School school = schoolService.getById(musicGroup.getSchoolId());
+                        if (Objects.nonNull(school)) {
+                            studentResp.setStudentSchool(school.getName());
+                        }
+                    }
+                });
+            }
+        }
+        studentResp.setSubjectName(subjectNameList);
+        return BaseResponse.success(studentResp);
+    }
+
+    private IPage<StudentListResp> getPage(List<ClassGroup> classGroupList, StudentReq studentReq, List<MusicGroup> musicGroupList) {
         Page<StudentListResp> pageResult = new Page<>();
         ArrayList<StudentListResp> resultList = Lists.newArrayList();
         QueryWrapper<ClassGroupStudentMapper> classGroupStudentMapperQueryWrapper = new QueryWrapper<>();
         classGroupStudentMapperQueryWrapper.lambda().in(ClassGroupStudentMapper::getClassGroupId,
-                classGroupList.stream().map(ClassGroup::getId).collect(Collectors.toList()));
+            classGroupList.stream().map(ClassGroup::getId).collect(Collectors.toList()));
         List<ClassGroupStudentMapper> classGroupStudentMapperList = classGroupStudentMapperService.list(classGroupStudentMapperQueryWrapper);
         if (!CollectionUtils.isEmpty(classGroupStudentMapperList)) {
             QueryWrapper<SysUser> sysUserQueryWrapper = new QueryWrapper<>();
             sysUserQueryWrapper.lambda().in(SysUser::getId,
-                    classGroupStudentMapperList.stream().map(ClassGroupStudentMapper::getUserId).collect(Collectors.toList()));
-            Page<SysUser> sysUserPage = new Page<>(teacherReq.getPageNo(), teacherReq.getPageSize());
+                classGroupStudentMapperList.stream().map(ClassGroupStudentMapper::getUserId).collect(Collectors.toList()))
+                .like(SysUser::getRealName, studentReq.getStudentName());
+            Page<SysUser> sysUserPage = new Page<SysUser>(studentReq.getPageNo(), studentReq.getPageSize());
             IPage<SysUser> page = sysUserService.page(sysUserPage, sysUserQueryWrapper);
             if (!CollectionUtils.isEmpty(page.getRecords())) {
                 BeanUtils.copyProperties(page, pageResult);
@@ -178,16 +231,16 @@ public class ClassGroupStudentMapperServiceImpl extends ServiceImpl<ClassGroupSt
                     studentListResp.setStudentId(sysUser.getId());
                     studentListResp.setStudentName(sysUser.getRealName());
                     classGroupStudentMapperList.stream().filter
-                            (classGroupStudentMapper -> classGroupStudentMapper.getUserId().
-                                    equals(sysUser.getId())).findFirst().ifPresent(classGroupStudentMapper -> {
+                        (classGroupStudentMapper -> classGroupStudentMapper.getUserId().
+                            equals(sysUser.getId())).findFirst().ifPresent(classGroupStudentMapper -> {
                         Integer classGroupId = classGroupStudentMapper.getClassGroupId();
                         classGroupList.stream().filter(classGroup -> classGroup.getId().equals(classGroupId)).
-                                findFirst().ifPresent(classGroup -> {
+                            findFirst().ifPresent(classGroup -> {
                             Integer musicGroupId = classGroup.getMusicGroupId();
                             //连续迟到
                             QueryWrapper<MusicGroupStudentFee> musicGroupStudentFeeQueryWrapper = new QueryWrapper<MusicGroupStudentFee>();
                             musicGroupStudentFeeQueryWrapper.lambda().eq(true, MusicGroupStudentFee::getMusicGroupId, musicGroupId)
-                                    .eq(true, MusicGroupStudentFee::getUserId, sysUser.getId());
+                                .eq(true, MusicGroupStudentFee::getUserId, sysUser.getId());
                             MusicGroupStudentFee musicGroupStudentFee = musicGroupStudentFeeService.getOne(musicGroupStudentFeeQueryWrapper);
                             if (Objects.nonNull(musicGroupStudentFee)) {
                                 studentListResp.setStudentAttendance("连续旷课" + musicGroupStudentFee.getContinuousAbsenteeismTimes() + "次");
@@ -197,7 +250,7 @@ public class ClassGroupStudentMapperServiceImpl extends ServiceImpl<ClassGroupSt
                                 studentListResp.setSubjectName(subjectList.stream().map(Subject::getName).collect(Collectors.toList()));
                             }
                             finalMusicGroupList.stream().filter(musicGroup -> musicGroup.getId().equals(musicGroupId)).
-                                    findFirst().ifPresent(musicGroup -> studentListResp.setMusicGroupName(musicGroup.getName()));
+                                findFirst().ifPresent(musicGroup -> studentListResp.setMusicGroupName(musicGroup.getName()));
                         });
                     });
                     resultList.add(studentListResp);

+ 1 - 1
mec-student/src/main/java/com/ym/mec/student/config/ResourceServerConfig.java

@@ -22,7 +22,7 @@ public class ResourceServerConfig extends ResourceServerConfigurerAdapter {
 
 	@Override
 	public void configure(HttpSecurity http) throws Exception {
-		http.csrf().disable().authorizeRequests().antMatchers("/v2/api-docs", "/register/findSubByMusicGroupId","/register/findGoodsGroups").permitAll().anyRequest().authenticated().and().httpBasic();
+		http.csrf().disable().authorizeRequests().antMatchers("/v2/api-docs", "/register/getMusicGroupRegInfo","/register/add").permitAll().anyRequest().authenticated().and().httpBasic();
 	}
 
 	@Override

+ 62 - 4
mec-student/src/main/java/com/ym/mec/student/controller/MusicGroupController.java

@@ -4,8 +4,13 @@ import com.ym.mec.auth.api.client.SysUserFeignService;
 import com.ym.mec.auth.api.entity.SysUser;
 import com.ym.mec.biz.dal.dto.MusicGroupSubjectGoodsAndInfoDto;
 import com.ym.mec.biz.dal.dto.RegisterPayDto;
-import com.ym.mec.biz.service.MusicGroupService;
-import com.ym.mec.biz.service.MusicGroupSubjectPlanService;
+import com.ym.mec.biz.dal.entity.Goods;
+import com.ym.mec.biz.dal.entity.MusicGroupSubjectGoodsGroup;
+import com.ym.mec.biz.dal.entity.MusicGroupSubjectPlan;
+import com.ym.mec.biz.dal.entity.StudentRegistration;
+import com.ym.mec.biz.dal.enums.GoodsType;
+import com.ym.mec.biz.dal.enums.KitGroupPurchaseTypeEnum;
+import com.ym.mec.biz.service.*;
 import com.ym.mec.common.controller.BaseController;
 import com.ym.mec.common.entity.HttpResponseResult;
 import io.swagger.annotations.Api;
@@ -14,12 +19,16 @@ import io.swagger.annotations.ApiImplicitParams;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
+import javax.annotation.Resource;
 import javax.xml.soap.Name;
+import java.math.BigDecimal;
 import java.util.Date;
 import java.util.LinkedHashMap;
+import java.util.List;
 import java.util.Map;
 
 @RequestMapping("musicGroup")
@@ -27,12 +36,18 @@ import java.util.Map;
 @RestController
 public class MusicGroupController extends BaseController {
 
-    @Autowired
+    @Resource
     private SysUserFeignService sysUserFeignService;
     @Autowired
     private MusicGroupService musicGroupService;
     @Autowired
     private MusicGroupSubjectPlanService musicGroupSubjectPlanService;
+    @Autowired
+    private StudentRegistrationService studentRegistrationService;
+    @Autowired
+    private MusicGroupSubjectGoodsGroupService musicGroupSubjectGoodsGroupService;
+    @Autowired
+    private GoodsService goodsService;
 
     @ApiOperation("获取学生所在乐团列表")
     @GetMapping(value = "/queryUserMusicGroups")
@@ -78,7 +93,50 @@ public class MusicGroupController extends BaseController {
     @ApiOperation(value = "乐团报名支付")
     @GetMapping("/pay")
     @ApiImplicitParams({@ApiImplicitParam(name = "registerPayDto", value = "支付信息", required = true, dataType = "Integer")})
-    public HttpResponseResult pay(RegisterPayDto registerPayDto) {
+    public HttpResponseResult pay(@RequestBody RegisterPayDto registerPayDto) {
+        SysUser sysUser = sysUserFeignService.queryUserInfo();
+        StudentRegistration studentRegistration = studentRegistrationService.get(registerPayDto.getRegisterId().longValue());
+        if (!studentRegistration.getUserId().equals(sysUser.getId())) {
+            return failed("报名信息有误,请核查");
+        }
+
+        BigDecimal amount = registerPayDto.getAmount();
+
+        BigDecimal orderAmount = new BigDecimal("0");
+
+        //获取课程价格
+        MusicGroupSubjectPlan musicOneSubjectClassPlan = musicGroupSubjectPlanService.getMusicOneSubjectClassPlan(studentRegistration.getMusicGroupId(), studentRegistration.getSubjectId());
+        orderAmount.add(musicOneSubjectClassPlan.getFee());
+
+
+        //乐器及打包辅件
+        if (registerPayDto.getGoodsGroupIds() != null) {
+            List<MusicGroupSubjectGoodsGroup> goodsGroups = musicGroupSubjectGoodsGroupService.findGoodsGroupByIds(registerPayDto.getGoodsGroupIds());
+            goodsGroups.forEach(goodsGroup -> {
+                //辅件价格
+                if (goodsGroup.getType().equals(GoodsType.ACCESSORIES)) {
+                    orderAmount.add(goodsGroup.getPrice());
+                    return;
+                }
+                if (musicOneSubjectClassPlan.getKitGroupPurchaseType().equals(KitGroupPurchaseTypeEnum.LEASE)) {//租赁
+                    orderAmount.add(musicOneSubjectClassPlan.getDepositFee());
+                } else if (musicOneSubjectClassPlan.getKitGroupPurchaseType().equals(KitGroupPurchaseTypeEnum.GROUP)) {//团购
+                    orderAmount.add(goodsGroup.getPrice()).subtract(goodsGroup.getRemissionCourseFee());
+                }
+            });
+        }
+
+        //单独辅件
+        if (registerPayDto.getGoodsIds() != null) {
+            List<Goods> goodsList = goodsService.findGoodsByIds(registerPayDto.getGoodsIds());
+            goodsList.forEach(goods -> {
+                orderAmount.add(goods.getGroupPurchasePrice());
+            });
+        }
+        if (amount.compareTo(orderAmount) != 0) {
+            return failed("商品价格不符");
+        }
+
         Map<String, Object> rqMap = new LinkedHashMap<String, Object>();
         rqMap.put("merNo", "07654478");
         rqMap.put("version", "v1");

+ 5 - 1
mec-student/src/main/java/com/ym/mec/student/controller/MusicGroupRegisterController.java

@@ -42,8 +42,12 @@ public class MusicGroupRegisterController extends BaseController {
 
     @ApiOperation(value = "新增学生报名信息")
     @PostMapping("/add")
-    public Object add(StudentRegistration studentRegistration) {
+    public Object add(@RequestBody StudentRegistration studentRegistration) {
         MusicGroup musicGroup = musicGroupService.get(studentRegistration.getMusicGroupId().toString());
+        StudentRegistration register = studentRegistrationService.getByPhoneAndMusicGroupId(studentRegistration.getMusicGroupId(), studentRegistration.getParentsPhone());
+        if (register != null) {
+            return failed("该乐团您已注册,请勿重复注册");
+        }
         studentRegistration.setOrganId(musicGroup.getOrganId());
         return succeed(studentRegistrationService.addStudent(studentRegistration));
     }

+ 48 - 6
mec-thirdparty/src/main/java/com/ym/mec/thirdparty/yqpay/YqPayUtil.java

@@ -2,8 +2,8 @@ package com.ym.mec.thirdparty.yqpay;
 
 import com.alibaba.fastjson.JSON;
 
-import java.util.LinkedHashMap;
-import java.util.Map;
+import java.math.BigDecimal;
+import java.util.*;
 
 public class YqPayUtil {
 
@@ -31,10 +31,6 @@ public class YqPayUtil {
         this.requestMap = rqMap;
     }
 
-    public Map<String, Object> getRequestMap() {
-        return this.requestMap;
-    }
-
     //验签
     public static boolean verify(Map<String, Object> rsMap) {
         String sign = (String) rsMap.get("sign");
@@ -47,4 +43,50 @@ public class YqPayUtil {
         }
     }
 
+    /**
+     * 返回订单提交数据
+     * @param amount 金额
+     * @param orderNo 订单编号
+     * @param notifyUrl 异步通知地址
+     * @param returnUrl 支付返回地址
+     * @param orderSubject 订单标题
+     * @param orderBody 订单内容
+     * @return
+     * @throws Exception
+     */
+    public Map getPayMap(BigDecimal amount,String orderNo,String notifyUrl,String returnUrl,String orderSubject,String orderBody) throws Exception {
+
+//        String notifyUrl = ""; //异步通知地址
+//        String returnUrl = ""; //还回地址
+//        String orderBody = "大雅乐盟培训课程";//订单内容
+//        String orderSubject = "培训订单";//订单标题
+//        String orderNo = "2019121263844";//订单编号
+//        BigDecimal amount = new BigDecimal("654369"); //订单金额
+
+        String payUrl = "https://qyfapi.95epay.com/api/api/hPay/toPayHtml";//支付提交地址
+        String payChannels = "{\"weChatPay\":true,\"weChatPayMobile\":false,\"aliPay\":true,\"fastpayXy\":true,\"aliPayMobile\":false,\"balancePay\":false}";//支付方式配置
+
+        List<Map> tempRoutingList = new ArrayList();
+//        Map<String, Object> routingList = new HashMap<>();
+//        routingList.put("routingMerNo", routingAccount.getSellerNo());//分佣账户
+//        routingList.put("routingFee", order.getAmount().subtract((order.getAmount().multiply(new BigDecimal(0.28)).divide(new BigDecimal(100))).setScale(2, BigDecimal.ROUND_HALF_UP))); //分佣金额
+//        tempRoutingList.add(routingList);
+
+        Map<String, Object> resultMap = new LinkedHashMap<String, Object>();
+        resultMap.put("sellerNo", "0021677"); //收款商户号
+        resultMap.put("payChannels", payChannels); //支付方式
+        resultMap.put("orderBody", orderBody); //订单信息
+        resultMap.put("payAmount", amount); //支付金额
+        resultMap.put("apiPayType", "1"); //*API支付类型1-即时支付,2-担保支付,3-预授权支付*/
+        resultMap.put("tradeType", "0"); //*交易类型1—充值,0—收款*
+        resultMap.put("merMerOrderNo", orderNo); //商户订单号
+        resultMap.put("orderSubject", orderSubject); //订单标题
+        resultMap.put("returnUrl", returnUrl); //前台页面地址
+        resultMap.put("tempRoutingList", JSON.toJSONString(tempRoutingList));//分账设置
+        Map rqMap = new YqPayUtil(notifyUrl, resultMap).requestMap;
+        rqMap.put("host", payUrl);
+        return rqMap;
+    }
+
+
 }

+ 4 - 0
mec-thirdparty/src/main/java/com/ym/mec/thirdparty/yqpay/payInfo.java

@@ -0,0 +1,4 @@
+package com.ym.mec.thirdparty.yqpay;
+
+public class payInfo {
+}

+ 0 - 8
mec-workflow/src/main/java/com/ym/mec/workfow/controller/flow/ProcessController.java

@@ -16,27 +16,19 @@ package com.ym.mec.workfow.controller.flow;
 
 import java.io.IOException;
 import java.io.InputStream;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
 
 import org.apache.commons.lang.StringUtils;
 import org.snaker.engine.SnakerEngine;
 import org.snaker.engine.access.Page;
 import org.snaker.engine.access.QueryFilter;
-import org.snaker.engine.entity.HistoryTask;
 import org.snaker.engine.entity.Process;
-import org.snaker.engine.entity.Task;
-import org.snaker.engine.helper.AssertHelper;
 import org.snaker.engine.helper.StringHelper;
-import org.snaker.engine.model.ProcessModel;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PathVariable;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.ResponseBody;
 import org.springframework.web.bind.annotation.RestController;
 import org.springframework.web.multipart.MultipartFile;
 

+ 1 - 51
mec-workflow/src/main/java/com/ym/mec/workfow/controller/flow/TaskController.java

@@ -9,7 +9,6 @@ import org.apache.commons.lang.StringUtils;
 import org.snaker.engine.SnakerEngine;
 import org.snaker.engine.access.Page;
 import org.snaker.engine.access.QueryFilter;
-import org.snaker.engine.core.AccessService;
 import org.snaker.engine.entity.HistoryOrder;
 import org.snaker.engine.entity.Task;
 import org.snaker.engine.entity.WorkItem;
@@ -40,7 +39,7 @@ public class TaskController extends BaseController {
 	@Autowired
 	private SysUserFeignService SysUserFeignService;
 
-	@GetMapping(value = "home")
+	@GetMapping(value = "queryWaitList")
 	public Object homeTaskList() {
 
 		SysUser user = SysUserFeignService.queryUserInfo();
@@ -71,19 +70,6 @@ public class TaskController extends BaseController {
 		return succeed(model);
 	}
 
-	/**
-	 * 根据当前用户查询待办任务列表
-	 * @param model
-	 * @return
-	 */
-	@GetMapping(value = "queryWaitList")
-	public Object queryWaitList(Page<WorkItem> page) {
-		SysUser user = SysUserFeignService.queryUserInfo();
-
-		snakerEngine.query().getWorkItems(page, new QueryFilter().setOperator(user.getUsername()));
-		return succeed(page);
-	}
-
 	@PostMapping(value = "actor/add")
 	public Object addTaskActor(String orderId, String taskName, String operator) {
 		List<Task> tasks = snakerEngine.query().getActiveTasks(new QueryFilter().setOrderId(orderId));
@@ -119,42 +105,6 @@ public class TaskController extends BaseController {
 	}
 
 	/**
-	 * 活动任务查询列表
-	 * @param model
-	 * @return
-	 */
-	@GetMapping(value = "active/more")
-	public Object activeTaskList(Page<WorkItem> page, Integer taskType) {
-		SysUser user = SysUserFeignService.queryUserInfo();
-
-		List<String> list = new ArrayList<String>();
-		list.add(user.getUsername());
-
-		String[] assignees = new String[list.size()];
-		list.toArray(assignees);
-		snakerEngine.query().getWorkItems(page, new QueryFilter().setOperators(assignees).setTaskType(taskType));
-		return succeed(page);
-	}
-
-	/**
-	 * 活动任务查询列表
-	 * @param model
-	 * @return
-	 */
-	@GetMapping(value = "active/ccmore")
-	public Object activeCCList(Page<HistoryOrder> page) {
-		SysUser user = SysUserFeignService.queryUserInfo();
-
-		List<String> list = new ArrayList<String>();
-		list.add(user.getUsername());
-
-		String[] assignees = new String[list.size()];
-		list.toArray(assignees);
-		snakerEngine.query().getCCWorks(page, new QueryFilter().setOperators(assignees).setState(AccessService.STATE_ACTIVE));
-		return succeed(page);
-	}
-
-	/**
 	 * 活动任务的驳回
 	 * @param model
 	 * @param taskId

+ 5 - 5
mec-workflow/src/main/resources/flows/leave.snaker

@@ -4,17 +4,17 @@
 <transition g="" name="transition1" offset="0,0" to="apply"/>
 </start>
 <end displayName="end1" layout="570,124,-1,-1" name="end1"/>
-<task assignee="${applyer}" displayName="请假申请" layout="117,122,-1,-1" name="apply" performType="ANY">
+<task assignee="applyer" displayName="请假申请" layout="117,122,-1,-1" name="apply" performType="ANY">
 <transition g="" name="transition2" offset="0,0" to="approveDept"/>
 </task>
-<task assignee="${deptManager}" displayName="部门经理审批" layout="272,122,-1,-1" name="approveDept" performType="ANY">
+<task assignee="deptManager" displayName="部门经理审批" layout="272,122,-1,-1" name="approveDept" performType="ANY">
 <transition g="" name="transition3" offset="0,0" to="decision1"/>
 </task>
 <decision displayName="decision1" layout="426,124,-1,-1" name="decision1">
-<transition displayName="&lt;=5天" expr="${days &lt;= 5}" g="" name="transition4" offset="0,0" to="end1"/>
-<transition displayName="&gt;5天" expr="${days &gt; 5}" g="" name="transition5" offset="0,0" to="approveBoss"/>
+<transition displayName="&lt;=5天" expr="#days &lt;= 5" g="" name="transition4" offset="0,0" to="end1"/>
+<transition displayName="&gt;5天" expr="#days &gt; 5" g="" name="transition5" offset="0,0" to="approveBoss"/>
 </decision>
-<task assignee="${boss}" displayName="总经理审批" layout="404,231,-1,-1" name="approveBoss" performType="ANY">
+<task assignee="boss" displayName="总经理审批" layout="404,231,-1,-1" name="approveBoss" performType="ANY">
 <transition g="" name="transition6" offset="0,0" to="end1"/>
 </task>
 </process>

+ 3 - 3
mec-workflow/src/main/resources/flows/viprefund.snaker

@@ -4,13 +4,13 @@
 <transition g="" name="transition1" offset="0,0" to="apply"/>
 </start>
 <end displayName="end1" layout="785,160,-1,-1" name="end1"/>
-<task assignee="${student}" autoExecute="Y" displayName="学生申请" layout="280,158,-1,-1" name="apply" performType="ANY" taskType="Major">
+<task assignee="student" autoExecute="Y" displayName="学生申请" layout="280,158,-1,-1" name="apply" performType="ANY" taskType="Major">
 <transition g="" name="transition2" offset="0,0" to="task1"/>
 </task>
-<task assignee="${eduTeacher}" autoExecute="Y" displayName="教务老师审批" layout="425,157,-1,-1" name="task1" performType="ANY" taskType="Major">
+<task assignee="eduTeacher" autoExecute="Y" displayName="教务老师审批" layout="425,157,-1,-1" name="task1" performType="ANY" taskType="Major">
 <transition g="" name="transition3" offset="0,0" to="task2"/>
 </task>
-<task assignee="${deptManager}" autoExecute="Y" displayName="分部经理审批" layout="598,158,-1,-1" name="task2" performType="ANY" taskType="Major">
+<task assignee="deptManager" autoExecute="Y" displayName="分部经理审批" layout="598,158,-1,-1" name="task2" performType="ANY" taskType="Major">
 <transition g="" name="transition4" offset="0,0" to="end1"/>
 </task>
 </process>

+ 5 - 0
workflowy/src/main/java/org/snaker/engine/model/NodeModel.java

@@ -26,6 +26,8 @@ import org.snaker.engine.core.Execution;
 import org.snaker.engine.helper.ClassHelper;
 import org.snaker.engine.helper.StringHelper;
 
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
 /**
  * 节点元素(存在输入输出的变迁)
  * @author yuqs
@@ -40,10 +42,12 @@ public abstract class NodeModel extends BaseModel implements Action {
 	/**
 	 * 输入变迁集合
 	 */
+	@JsonIgnore
 	private List<TransitionModel> inputs = new ArrayList<TransitionModel>();
 	/**
 	 * 输出变迁集合
 	 */
+	@JsonIgnore
 	private List<TransitionModel> outputs = new ArrayList<TransitionModel>();
 	/**
 	 * layout
@@ -137,6 +141,7 @@ public abstract class NodeModel extends BaseModel implements Action {
 		return result;
 	}
 
+	@JsonIgnore
     public <T> List<T> getNextModels(Class<T> clazz) {
         List<T> models = new ArrayList<T>();
         for(TransitionModel tm : this.getOutputs()) {