소스 검색

Merge remote-tracking branch 'origin/master'

Joburgess 5 년 전
부모
커밋
e6416a1310
30개의 변경된 파일1367개의 추가작업 그리고 206개의 파일을 삭제
  1. 9 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/EmployeeInfoDao.java
  2. 12 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/FinancialExpenditureDao.java
  3. 0 11
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/GoodsCategoryDao.java
  4. 309 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/entity/EmployeeInfo.java
  5. 162 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/entity/FinancialExpenditure.java
  6. 11 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/entity/StudentPaymentOrderDetail.java
  7. 7 6
      mec-biz/src/main/java/com/ym/mec/biz/dal/entity/Teacher.java
  8. 65 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/page/EmployeeInfoQueryInfo.java
  9. 8 0
      mec-biz/src/main/java/com/ym/mec/biz/service/EmployeeInfoService.java
  10. 21 0
      mec-biz/src/main/java/com/ym/mec/biz/service/FinancialExpenditureService.java
  11. 23 0
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/EmployeeInfoServiceImpl.java
  12. 118 0
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/FinancialExpenditureServiceImpl.java
  13. 4 2
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/GoodsServiceImpl.java
  14. 38 151
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/MusicGroupServiceImpl.java
  15. 45 17
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentRegistrationServiceImpl.java
  16. 185 0
      mec-biz/src/main/resources/config/mybatis/EmployeeInfoMapper.xml
  17. 112 0
      mec-biz/src/main/resources/config/mybatis/FinancialExpenditureMapper.xml
  18. 0 3
      mec-biz/src/main/resources/config/mybatis/GoodsCategoryMapper.xml
  19. 10 0
      mec-common/common-core/src/main/java/com/ym/mec/common/service/BaseService.java
  20. 49 0
      mec-common/common-core/src/main/java/com/ym/mec/common/service/impl/BaseServiceImpl.java
  21. 1 0
      mec-im/src/main/java/com/ym/common/ErrorEnum.java
  22. 4 0
      mec-im/src/main/java/com/ym/service/Impl/RoomServiceImpl.java
  23. 9 0
      mec-teacher/src/main/java/com/ym/mec/teacher/controller/TeacherCourseScheduleController.java
  24. 10 9
      mec-util/src/main/java/com/ym/mec/util/excel/IniFileUtil.java
  25. 57 0
      mec-web/src/main/java/com/ym/mec/web/controller/EmployeeInfoController.java
  26. 45 0
      mec-web/src/main/java/com/ym/mec/web/controller/FinancialExpenditureController.java
  27. 29 7
      mec-web/src/main/java/com/ym/mec/web/controller/ImportController.java
  28. 24 0
      mec-web/src/main/resources/columnMapper.ini
  29. BIN
      mec-web/src/main/resources/excelTemplate/商品导入模板.xls
  30. BIN
      mec-web/src/main/resources/excelTemplate/财务支出导入模板.xls

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

@@ -0,0 +1,9 @@
+package com.ym.mec.biz.dal.dao;
+
+import com.ym.mec.biz.dal.entity.EmployeeInfo;
+import com.ym.mec.common.dal.BaseDAO;
+
+public interface EmployeeInfoDao extends BaseDAO<Long, EmployeeInfo> {
+
+	
+}

+ 12 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/FinancialExpenditureDao.java

@@ -0,0 +1,12 @@
+package com.ym.mec.biz.dal.dao;
+
+import com.ym.mec.biz.dal.entity.FinancialExpenditure;
+import com.ym.mec.common.dal.BaseDAO;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+public interface FinancialExpenditureDao extends BaseDAO<Long, FinancialExpenditure> {
+
+    void batchInsert(@Param("financialExpenditures") List<FinancialExpenditure> financialExpenditures);
+}

+ 0 - 11
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/GoodsCategoryDao.java

@@ -18,15 +18,4 @@ public interface GoodsCategoryDao extends BaseDAO<Integer, GoodsCategory> {
      * @return
      */
     List<GoodsCategory> findByParentId(@Param("parentId") Integer parentId, @Param("delFlag") YesOrNoEnum yesOrNoEnum);
-
-    /**
-     * @describe 获取商品分类
-     * @apiNote 时光荏苒,认真工作的时间总是过得很快,而我、享受这一刻!
-     * @author zouxuan
-     * @date 2020/9/4
-     * @time 14:05
-     * @param :
-     * @return java.util.List<java.util.Map<java.lang.Integer,java.lang.String>>
-     */
-    List<Map<String, Integer>> queryCategotyMap();
 }

+ 309 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/EmployeeInfo.java

@@ -0,0 +1,309 @@
+package com.ym.mec.biz.dal.entity;
+
+import io.swagger.annotations.ApiModelProperty;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+
+import com.ym.mec.biz.dal.enums.JobNatureEnum;
+import com.ym.mec.biz.dal.enums.JobTypeEnum;
+
+/**
+ * 对应数据库表(employee_info):
+ */
+public class EmployeeInfo {
+
+	/**  */
+	private Long id;
+
+	@ApiModelProperty(value = "姓名", required = false)
+	private String realName;
+
+	@ApiModelProperty(value = "手机号码", required = false)
+	private String mobileNo;
+
+	@ApiModelProperty(value = "微信号", required = false)
+	private String wechatNo;
+
+	@ApiModelProperty(value = "身份证号", required = false)
+	private String idCard;
+
+	@ApiModelProperty(value = "年龄", required = false)
+	private Integer age;
+
+	@ApiModelProperty(value = "性别", required = false)
+	private boolean gender;
+
+	@ApiModelProperty(value = "出生年月日", required = false)
+	private java.util.Date birthdate;
+
+	@ApiModelProperty(value = "紧急联系人姓名", required = false)
+	private String emergencyContactName;
+
+	@ApiModelProperty(value = "紧急联系人关系", required = false)
+	private String emergencyContactRelation;
+
+	@ApiModelProperty(value = "紧急联系人电话", required = false)
+	private String emergencyContactPhone;
+
+	@ApiModelProperty(value = "所在城市", required = false)
+	private String liveCity;
+
+	@ApiModelProperty(value = "意向城市", required = false)
+	private String intentionCity;
+
+	@ApiModelProperty(value = "教育背景(时间,学历,毕业院校", required = false)
+	private String educationalBackground;
+
+	@ApiModelProperty(value = "声部", required = false)
+	private Integer subjectId;
+
+	@ApiModelProperty(value = "是否评估", required = false)
+	private boolean isInterviewed;
+
+	@ApiModelProperty(value = "其他综合情况", required = false)
+	private String otherComment;
+
+	@ApiModelProperty(value = "入职日期", required = false)
+	private java.util.Date entryDate;
+	
+	@ApiModelProperty(value = "分部", required = false)
+	private Integer organId;
+
+	@ApiModelProperty(value = "职位", required = false)
+	private JobTypeEnum position;
+
+	@ApiModelProperty(value = "工作性质(全职/兼职)", required = false)
+	private JobNatureEnum jobNature;
+
+	@ApiModelProperty(value = "是否是试用期", required = false)
+	private boolean isProbationPeriod;
+
+	@ApiModelProperty(value = "银行卡号", required = false)
+	private String bankCardNo;
+
+	@ApiModelProperty(value = "开户行", required = false)
+	private String bankAddress;
+
+	@ApiModelProperty(value = "离职日期", required = false)
+	private java.util.Date resignationDate;
+
+	/**  */
+	private java.util.Date createTime;
+
+	/**  */
+	private java.util.Date updateTime;
+
+	public void setId(Long id) {
+		this.id = id;
+	}
+
+	public Long getId() {
+		return this.id;
+	}
+
+	public void setRealName(String realName) {
+		this.realName = realName;
+	}
+
+	public String getRealName() {
+		return this.realName;
+	}
+
+	public void setMobileNo(String mobileNo) {
+		this.mobileNo = mobileNo;
+	}
+
+	public String getMobileNo() {
+		return this.mobileNo;
+	}
+
+	public void setWechatNo(String wechatNo) {
+		this.wechatNo = wechatNo;
+	}
+
+	public String getWechatNo() {
+		return this.wechatNo;
+	}
+
+	public void setIdCard(String idCard) {
+		this.idCard = idCard;
+	}
+
+	public String getIdCard() {
+		return this.idCard;
+	}
+
+	public void setAge(Integer age) {
+		this.age = age;
+	}
+
+	public Integer getAge() {
+		return this.age;
+	}
+
+	public void setGender(boolean gender) {
+		this.gender = gender;
+	}
+
+	public boolean isGender() {
+		return this.gender;
+	}
+
+	public void setBirthdate(java.util.Date birthdate) {
+		this.birthdate = birthdate;
+	}
+
+	public java.util.Date getBirthdate() {
+		return this.birthdate;
+	}
+
+	public void setEmergencyContactName(String emergencyContactName) {
+		this.emergencyContactName = emergencyContactName;
+	}
+
+	public String getEmergencyContactName() {
+		return this.emergencyContactName;
+	}
+
+	public void setEmergencyContactRelation(String emergencyContactRelation) {
+		this.emergencyContactRelation = emergencyContactRelation;
+	}
+
+	public String getEmergencyContactRelation() {
+		return this.emergencyContactRelation;
+	}
+
+	public void setEmergencyContactPhone(String emergencyContactPhone) {
+		this.emergencyContactPhone = emergencyContactPhone;
+	}
+
+	public String getEmergencyContactPhone() {
+		return this.emergencyContactPhone;
+	}
+
+	public void setLiveCity(String liveCity) {
+		this.liveCity = liveCity;
+	}
+
+	public String getLiveCity() {
+		return this.liveCity;
+	}
+
+	public void setIntentionCity(String intentionCity) {
+		this.intentionCity = intentionCity;
+	}
+
+	public String getIntentionCity() {
+		return this.intentionCity;
+	}
+
+	public void setEducationalBackground(String educationalBackground) {
+		this.educationalBackground = educationalBackground;
+	}
+
+	public String getEducationalBackground() {
+		return this.educationalBackground;
+	}
+
+	public void setSubjectId(Integer subjectId) {
+		this.subjectId = subjectId;
+	}
+
+	public Integer getSubjectId() {
+		return this.subjectId;
+	}
+
+	public void setIsInterviewed(boolean isInterviewed) {
+		this.isInterviewed = isInterviewed;
+	}
+
+	public boolean isIsInterviewed() {
+		return this.isInterviewed;
+	}
+
+	public void setOtherComment(String otherComment) {
+		this.otherComment = otherComment;
+	}
+
+	public String getOtherComment() {
+		return this.otherComment;
+	}
+
+	public void setEntryDate(java.util.Date entryDate) {
+		this.entryDate = entryDate;
+	}
+
+	public java.util.Date getEntryDate() {
+		return this.entryDate;
+	}
+
+	public void setPosition(JobTypeEnum position) {
+		this.position = position;
+	}
+
+	public JobTypeEnum getPosition() {
+		return this.position;
+	}
+
+	public void setJobNature(JobNatureEnum jobNature) {
+		this.jobNature = jobNature;
+	}
+
+	public JobNatureEnum getJobNature() {
+		return this.jobNature;
+	}
+
+	public void setIsProbationPeriod(boolean isProbationPeriod) {
+		this.isProbationPeriod = isProbationPeriod;
+	}
+
+	public boolean isIsProbationPeriod() {
+		return this.isProbationPeriod;
+	}
+
+	public void setBankCardNo(String bankCardNo) {
+		this.bankCardNo = bankCardNo;
+	}
+
+	public String getBankCardNo() {
+		return this.bankCardNo;
+	}
+
+	public void setBankAddress(String bankAddress) {
+		this.bankAddress = bankAddress;
+	}
+
+	public String getBankAddress() {
+		return this.bankAddress;
+	}
+
+	public void setResignationDate(java.util.Date resignationDate) {
+		this.resignationDate = resignationDate;
+	}
+
+	public java.util.Date getResignationDate() {
+		return this.resignationDate;
+	}
+
+	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);
+	}
+
+}

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

@@ -0,0 +1,162 @@
+package com.ym.mec.biz.dal.entity;
+
+import io.swagger.annotations.ApiModelProperty;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * 对应数据库表(financial_expenditure):
+ */
+public class FinancialExpenditure {
+
+	private Integer id;
+	/**  */
+	@ApiModelProperty(value = "批次号",required = false)
+	private String batchNo;
+	/**  */
+	@ApiModelProperty(value = "财务流程编号",required = false)
+	private String financialProcessNo;
+	/**  */
+	@ApiModelProperty(value = "钉钉流程编号",required = false)
+	private String dingtalkProcessNo;
+	/**  */
+	@ApiModelProperty(value = "分部",required = false)
+	private Integer organId;
+	/**  */
+	@ApiModelProperty(value = "学校/合作单位",required = false)
+	private Integer cooperationOrganId;
+	/**  */
+	@ApiModelProperty(value = "申请人编号",required = false)
+	private Integer applyUserId;
+	/**  */
+	@ApiModelProperty(value = "费用",required = false)
+	private BigDecimal amount;
+	/**  */
+	@ApiModelProperty(value = "费用明细",required = false)
+	private String itemDetail;
+	/**  */
+	@ApiModelProperty(value = "支付时间",required = false)
+	private Date paymentTime;
+	/**  */
+	@ApiModelProperty(value = "事由",required = false)
+	private String cause;
+	/**  */
+	private Date createTime;
+	/**  */
+	private Date updateTime;
+	/**  */
+	private Integer delFlag;
+
+	public Integer getId() {
+		return id;
+	}
+
+	public void setId(Integer id) {
+		this.id = id;
+	}
+
+	public String getBatchNo() {
+		return batchNo;
+	}
+
+	public void setBatchNo(String batchNo) {
+		this.batchNo = batchNo;
+	}
+
+	public String getFinancialProcessNo() {
+		return financialProcessNo;
+	}
+
+	public void setFinancialProcessNo(String financialProcessNo) {
+		this.financialProcessNo = financialProcessNo;
+	}
+
+	public String getDingtalkProcessNo() {
+		return dingtalkProcessNo;
+	}
+
+	public void setDingtalkProcessNo(String dingtalkProcessNo) {
+		this.dingtalkProcessNo = dingtalkProcessNo;
+	}
+
+	public Integer getOrganId() {
+		return organId;
+	}
+
+	public void setOrganId(Integer organId) {
+		this.organId = organId;
+	}
+
+	public Integer getCooperationOrganId() {
+		return cooperationOrganId;
+	}
+
+	public void setCooperationOrganId(Integer cooperationOrganId) {
+		this.cooperationOrganId = cooperationOrganId;
+	}
+
+	public Integer getApplyUserId() {
+		return applyUserId;
+	}
+
+	public void setApplyUserId(Integer applyUserId) {
+		this.applyUserId = applyUserId;
+	}
+
+	public BigDecimal getAmount() {
+		return amount;
+	}
+
+	public void setAmount(BigDecimal amount) {
+		this.amount = amount;
+	}
+
+	public String getItemDetail() {
+		return itemDetail;
+	}
+
+	public void setItemDetail(String itemDetail) {
+		this.itemDetail = itemDetail;
+	}
+
+	public Date getPaymentTime() {
+		return paymentTime;
+	}
+
+	public void setPaymentTime(Date paymentTime) {
+		this.paymentTime = paymentTime;
+	}
+
+	public String getCause() {
+		return cause;
+	}
+
+	public void setCause(String cause) {
+		this.cause = cause;
+	}
+
+	public Date getCreateTime() {
+		return createTime;
+	}
+
+	public void setCreateTime(Date createTime) {
+		this.createTime = createTime;
+	}
+
+	public Date getUpdateTime() {
+		return updateTime;
+	}
+
+	public void setUpdateTime(Date updateTime) {
+		this.updateTime = updateTime;
+	}
+
+	public Integer getDelFlag() {
+		return delFlag;
+	}
+
+	public void setDelFlag(Integer delFlag) {
+		this.delFlag = delFlag;
+	}
+}

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

@@ -42,6 +42,9 @@ public class StudentPaymentOrderDetail {
 	//购买方式
 	private KitGroupPurchaseTypeEnum kitGroupPurchaseType;
 
+	//商品成本价
+	private String goodsPrices;
+
 	public void setId(Long id){
 		this.id = id;
 	}
@@ -110,4 +113,12 @@ public class StudentPaymentOrderDetail {
 	public void setKitGroupPurchaseType(KitGroupPurchaseTypeEnum kitGroupPurchaseType) {
 		this.kitGroupPurchaseType = kitGroupPurchaseType;
 	}
+
+	public String getGoodsPrices() {
+		return goodsPrices;
+	}
+
+	public void setGoodsPrices(String goodsPrices) {
+		this.goodsPrices = goodsPrices;
+	}
 }

+ 7 - 6
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/Teacher.java

@@ -1,17 +1,18 @@
 package com.ym.mec.biz.dal.entity;
 
-import com.ym.mec.auth.api.entity.SysUser;
-import com.ym.mec.biz.dal.enums.JobNatureEnum;
-import com.ym.mec.biz.dal.enums.JobTypeEnum;
-import com.ym.mec.biz.dal.enums.ProbationPeriodEnum;
-import com.ym.mec.biz.dal.enums.YesOrNoEnum;
 import io.swagger.annotations.ApiModelProperty;
-import org.apache.commons.lang3.builder.ToStringBuilder;
 
 import java.math.BigDecimal;
 import java.util.Date;
 import java.util.List;
 
+import org.apache.commons.lang3.builder.ToStringBuilder;
+
+import com.ym.mec.auth.api.entity.SysUser;
+import com.ym.mec.biz.dal.enums.JobNatureEnum;
+import com.ym.mec.biz.dal.enums.JobTypeEnum;
+import com.ym.mec.biz.dal.enums.ProbationPeriodEnum;
+
 /**
  * 对应数据库表(teacher):
  */

+ 65 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/page/EmployeeInfoQueryInfo.java

@@ -0,0 +1,65 @@
+package com.ym.mec.biz.dal.page;
+
+import io.swagger.annotations.ApiModelProperty;
+
+import com.ym.mec.biz.dal.enums.JobNatureEnum;
+import com.ym.mec.biz.dal.enums.JobTypeEnum;
+import com.ym.mec.common.page.QueryInfo;
+
+public class EmployeeInfoQueryInfo extends QueryInfo {
+
+	@ApiModelProperty(value = "姓名/编号/手机号", required = false)
+	private String userNameOrIdOrMobile;
+
+	@ApiModelProperty(value = "分部", required = false)
+	private Integer organId;
+
+	@ApiModelProperty(value = "声部", required = false)
+	private Integer subjectId;
+
+	@ApiModelProperty(value = "职位", required = false)
+	private JobTypeEnum position;
+
+	@ApiModelProperty(value = "工作性质(全职/兼职)", required = false)
+	private JobNatureEnum jobNature;
+
+	public String getUserNameOrIdOrMobile() {
+		return userNameOrIdOrMobile;
+	}
+
+	public void setUserNameOrIdOrMobile(String userNameOrIdOrMobile) {
+		this.userNameOrIdOrMobile = userNameOrIdOrMobile;
+	}
+
+	public Integer getOrganId() {
+		return organId;
+	}
+
+	public void setOrganId(Integer organId) {
+		this.organId = organId;
+	}
+
+	public Integer getSubjectId() {
+		return subjectId;
+	}
+
+	public void setSubjectId(Integer subjectId) {
+		this.subjectId = subjectId;
+	}
+
+	public JobTypeEnum getPosition() {
+		return position;
+	}
+
+	public void setPosition(JobTypeEnum position) {
+		this.position = position;
+	}
+
+	public JobNatureEnum getJobNature() {
+		return jobNature;
+	}
+
+	public void setJobNature(JobNatureEnum jobNature) {
+		this.jobNature = jobNature;
+	}
+}

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

@@ -0,0 +1,8 @@
+package com.ym.mec.biz.service;
+
+import com.ym.mec.biz.dal.entity.EmployeeInfo;
+import com.ym.mec.common.service.BaseService;
+
+public interface EmployeeInfoService extends BaseService<Long, EmployeeInfo> {
+
+}

+ 21 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/FinancialExpenditureService.java

@@ -0,0 +1,21 @@
+package com.ym.mec.biz.service;
+
+import com.ym.mec.biz.dal.entity.FinancialExpenditure;
+import com.ym.mec.common.service.BaseService;
+import org.springframework.web.multipart.MultipartFile;
+
+import java.io.IOException;
+import java.util.List;
+
+public interface FinancialExpenditureService extends BaseService<Long, FinancialExpenditure> {
+    /**
+     * @describe 导入财务支出
+     * @apiNote 时光荏苒,认真工作的时间总是过得很快,而我、享受这一刻!
+     * @author zouxuan
+     * @date 2020/9/7
+     * @time 18:31
+     * @param file:
+     * @return java.lang.Object
+     */
+    List<FinancialExpenditure> importFinancialExpenditure(MultipartFile file) throws IOException;
+}

+ 23 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/impl/EmployeeInfoServiceImpl.java

@@ -0,0 +1,23 @@
+package com.ym.mec.biz.service.impl;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import com.ym.mec.biz.dal.dao.EmployeeInfoDao;
+import com.ym.mec.biz.dal.entity.EmployeeInfo;
+import com.ym.mec.biz.service.EmployeeInfoService;
+import com.ym.mec.common.dal.BaseDAO;
+import com.ym.mec.common.service.impl.BaseServiceImpl;
+
+@Service
+public class EmployeeInfoServiceImpl extends BaseServiceImpl<Long, EmployeeInfo>  implements EmployeeInfoService {
+	
+	@Autowired
+	private EmployeeInfoDao employeeInfoDao;
+
+	@Override
+	public BaseDAO<Long, EmployeeInfo> getDAO() {
+		return employeeInfoDao;
+	}
+	
+}

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

@@ -0,0 +1,118 @@
+package com.ym.mec.biz.service.impl;
+
+
+import com.alibaba.fastjson.JSONObject;
+import com.ym.mec.biz.dal.dao.FinancialExpenditureDao;
+import com.ym.mec.biz.dal.entity.FinancialExpenditure;
+import com.ym.mec.biz.service.FinancialExpenditureService;
+import com.ym.mec.common.dal.BaseDAO;
+import com.ym.mec.common.exception.BizException;
+import com.ym.mec.common.service.impl.BaseServiceImpl;
+import com.ym.mec.util.excel.IniFileUtil;
+import com.ym.mec.util.excel.POIUtil;
+import org.apache.commons.lang3.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.core.io.ClassPathResource;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.web.multipart.MultipartFile;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+@Service
+public class FinancialExpenditureServiceImpl extends BaseServiceImpl<Long, FinancialExpenditure> implements FinancialExpenditureService {
+	
+	@Autowired
+	private FinancialExpenditureDao financialExpenditureDao;
+
+	@Override
+	public BaseDAO<Long, FinancialExpenditure> getDAO() {
+		return financialExpenditureDao;
+	}
+
+	private static final Logger LOGGER = LoggerFactory.getLogger(FinancialExpenditureServiceImpl.class);
+
+	@Override
+	@Transactional(rollbackFor = Exception.class)
+	public List<FinancialExpenditure> importFinancialExpenditure(MultipartFile file) throws IOException {
+		Map<String, List<Map<String, Object>>> sheetsListMap = POIUtil.importExcel(file.getInputStream(), 2, file.getOriginalFilename());
+		String fileName = file.getOriginalFilename().split("\\.")[0];
+		InputStream inputStream = new ClassPathResource("columnMapper.ini").getInputStream();
+		Map<String,String> columns = IniFileUtil.readIniFile(inputStream,fileName);
+		List<FinancialExpenditure> financialExpenditures = new ArrayList<>();
+		Map<String, Integer> organMap = getMap("organization", "name_", "id_", true, String.class, Integer.class);
+		Map<String, Integer> cooperationOrganMap = getMap("cooperation_organ", "name_", "id_", true, String.class, Integer.class);
+		Map<String, Integer> phoneMap = getMap("sys_user", "phone_", "id_", true, String.class, Integer.class);
+		for (String e : sheetsListMap.keySet()) {
+			List<Map<String, Object>> sheet = sheetsListMap.get(e);
+			valueIsNull: for (Map<String, Object> row : sheet) {
+				if (row.size() == 0){
+					continue;
+				}
+				JSONObject objectMap = new JSONObject();
+				for (String s : row.keySet()) {
+					if(!columns.containsKey(s)){
+						continue;
+					}
+					String columnValue = columns.get(s);
+					if (columnValue.equals("phone")) {
+						if(StringUtils.isEmpty(row.get(s).toString())){
+							LOGGER.error("商品导入异常:手机号不可为空 param:{}",objectMap);
+							continue valueIsNull;
+						}else {
+							Integer integer = phoneMap.get(row.get(s));
+							if(integer == null){
+								LOGGER.error("商品导入异常:手机号校验失败 param:{}",objectMap);
+								continue valueIsNull;
+							}else {
+								objectMap.put("applyUserId", integer);
+							}
+						}
+					}
+					if (columnValue.equals("amount")) {
+						if(StringUtils.isEmpty(row.get(s).toString())){
+							LOGGER.error("商品导入异常:费用不可为空 param:{}",objectMap);
+							continue valueIsNull;
+						}else {
+							objectMap.put("amount", row.get(s));
+						}
+					}
+					if (columnValue.equals("organName") && StringUtils.isNotEmpty(row.get(s).toString())) {
+						Integer integer = organMap.get(row.get(s));
+						if(integer == null){
+							LOGGER.error("商品导入异常:分部校验失败 param:{}",objectMap);
+						}else {
+							objectMap.put("organId", integer);
+						}
+					}
+					if (columnValue.equals("cooperationOrganName") && StringUtils.isNotEmpty(row.get(s).toString())) {
+						Integer integer = cooperationOrganMap.get(row.get(s));
+						if(integer == null){
+							LOGGER.error("商品导入异常:合作单位校验失败 param:{}",objectMap);
+						}else {
+							objectMap.put("cooperationOrganId", integer);
+						}
+					}
+					objectMap.put(columnValue, row.get(s));
+				}
+				FinancialExpenditure financialExpenditure = null;
+				try {
+					financialExpenditure = JSONObject.parseObject(objectMap.toJSONString(),FinancialExpenditure.class);
+					financialExpenditures.add(financialExpenditure);
+				} catch (Exception ex) {
+					throw new BizException("导入数据出错");
+				}
+			}
+		}
+		if(financialExpenditures.size() != 0){
+			financialExpenditureDao.batchInsert(financialExpenditures);
+		}
+		return financialExpenditures;
+	}
+}

+ 4 - 2
mec-biz/src/main/java/com/ym/mec/biz/service/impl/GoodsServiceImpl.java

@@ -70,9 +70,11 @@ public class GoodsServiceImpl extends BaseServiceImpl<Integer, Goods>  implement
 	public List<Goods> importGoods(MultipartFile file) throws Exception {
 		Map<String, List<Map<String, Object>>> sheetsListMap = POIUtil.importExcel(file.getInputStream(), 2, file.getOriginalFilename());
 		InputStream inputStream = new ClassPathResource("columnMapper.ini").getInputStream();
-		Map<String,String> columns = IniFileUtil.readIniFile(inputStream);
+		String fileName = file.getOriginalFilename().split(".")[0];
+		Map<String,String> columns = IniFileUtil.readIniFile(inputStream,fileName);
 		List<Goods> goodsList = new ArrayList<>();
-		Map<String, Integer> map = MapUtil.convertIntegerMap(goodsCategoryDao.queryCategotyMap());
+//		Map<String, Integer> map = MapUtil.convertIntegerMap(goodsCategoryDao.queryCategotyMap());
+		Map<String, Integer> map = getMap("goods_category","name_","id_",true,String.class,Integer.class);
 		for (String e : sheetsListMap.keySet()) {
 			List<Map<String, Object>> sheet = sheetsListMap.get(e);
 			valueIsNull: for (Map<String, Object> row : sheet) {

+ 38 - 151
mec-biz/src/main/java/com/ym/mec/biz/service/impl/MusicGroupServiceImpl.java

@@ -408,9 +408,6 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
         }
         orderAmount = orderAmount.add(courseFee);
 
-        BigDecimal instrumentFee = BigDecimal.ZERO;
-        BigDecimal accessoriesFee = BigDecimal.ZERO;
-        BigDecimal otherFee = BigDecimal.ZERO;
         BigDecimal remitFee = BigDecimal.ZERO;
 
         //乐器及打包辅件
@@ -428,13 +425,6 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
                 musicGroupSubjectGoodsGroup.setPrice(orderDetail.getPrice());
                 musicGroupSubjectGoodsGroup.setKitGroupPurchaseType(orderDetail.getKitGroupPurchaseType());
                 goodsGroups.add(musicGroupSubjectGoodsGroup);
-                if (musicGroupSubjectGoodsGroup.getType().equals(GoodsType.INSTRUMENT)) {
-                    instrumentFee = instrumentFee.add(orderDetail.getPrice());
-                } else if (musicGroupSubjectGoodsGroup.getType().equals(GoodsType.ACCESSORIES)) {
-                    accessoriesFee = accessoriesFee.add(orderDetail.getPrice());
-                } else {
-                    otherFee = otherFee.add(orderDetail.getPrice());
-                }
 
                 orderAmount = orderAmount.add(orderDetail.getPrice());
             }
@@ -449,13 +439,6 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
                     goodsGroup.setPrice(new BigDecimal(0));
                 }
                 orderAmount = orderAmount.add(goodsGroup.getPrice());
-                if (goodsGroup.getType().equals(GoodsType.INSTRUMENT)) {
-                    instrumentFee = instrumentFee.add(goodsGroup.getPrice());
-                } else if (goodsGroup.getType().equals(GoodsType.ACCESSORIES)) {
-                    accessoriesFee = accessoriesFee.add(goodsGroup.getPrice());
-                } else {
-                    otherFee = otherFee.add(goodsGroup.getPrice());
-                }
                 //团购乐器减免课程费用
                 if (goodsGroup.getType().equals(GoodsType.INSTRUMENT) && goodsGroup.getRemissionCourseFee() != null && musicOneSubjectClassPlan.getKitGroupPurchaseType().equals(KitGroupPurchaseTypeEnum.GROUP)) {//团购
                     orderAmount = orderAmount.subtract(goodsGroup.getRemissionCourseFee());
@@ -468,37 +451,19 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
             for (MusicGroupSubjectGoodsGroup goodsGroup : goodsGroups) {
                 Map<String, BigDecimal> groupType = JSONObject.parseObject(goodsGroup.getKitGroupPurchaseTypeJson(), new TypeReference<Map<String, BigDecimal>>() {
                 });
-                if (goodsGroup.getType().equals(GoodsType.INSTRUMENT) && registerPayDto.getGoodsGroups().get(goodsGroup.getId()).equals("GROUP")) {
-                    if (!groupType.containsKey("GROUP")) {
-                        throw new BizException("乐器提供方式不存在");
+                if (goodsGroup.getType().equals(GoodsType.INSTRUMENT)) {
+                    String kitGroupPurchaseType = registerPayDto.getGoodsGroups().get(goodsGroup.getId());
+                    if (!groupType.containsKey(kitGroupPurchaseType)) {
+                        throw new BizException("乐器提供方式不存在,请核查");
                     }
-                    goodsGroup.setKitGroupPurchaseType(KitGroupPurchaseTypeEnum.GROUP);
-                    remitFee = groupType.get("GROUP");
-                }
-                if (goodsGroup.getType().equals(GoodsType.INSTRUMENT) && registerPayDto.getGoodsGroups().get(goodsGroup.getId()).equals("LEASE")) {
-                    if (!groupType.containsKey("LEASE")) {
-                        throw new BizException("乐器提供方式不存在");
+                    if (!kitGroupPurchaseType.equals("GROUP")) {
+                        goodsGroup.setPrice(kitGroupPurchaseType.equals("FREE") ? new BigDecimal(0) : goodsGroup.getDepositFee());
                     }
-                    goodsGroup.setPrice(goodsGroup.getDepositFee());
-                    goodsGroup.setKitGroupPurchaseType(KitGroupPurchaseTypeEnum.LEASE);
-                    remitFee = groupType.get("LEASE");
-                }
-                if (goodsGroup.getType().equals(GoodsType.INSTRUMENT) && registerPayDto.getGoodsGroups().get(goodsGroup.getId()).equals("FREE")) {
-                    if (!groupType.containsKey("FREE")) {
-                        throw new BizException("乐器提供方式不存在");
-                    }
-                    goodsGroup.setPrice(new BigDecimal(0));
-                    goodsGroup.setKitGroupPurchaseType(KitGroupPurchaseTypeEnum.FREE);
-                    remitFee = groupType.get("FREE");
-                }
-                if (goodsGroup.getType().equals(GoodsType.INSTRUMENT)) {
-                    instrumentFee = instrumentFee.add(goodsGroup.getPrice());
-                } else if (goodsGroup.getType().equals(GoodsType.ACCESSORIES)) {
-                    accessoriesFee = accessoriesFee.add(goodsGroup.getPrice());
-                } else {
-                    otherFee = otherFee.add(goodsGroup.getPrice());
+                    goodsGroup.setKitGroupPurchaseType(KitGroupPurchaseTypeEnum.valueOf(kitGroupPurchaseType));
+                    remitFee = groupType.get(kitGroupPurchaseType);
                 }
                 orderAmount = orderAmount.add(goodsGroup.getPrice());
+                goodsGroup.setGoodsList(goodsService.findGoodsByIds(goodsGroup.getGoodsIdList()));
             }
             orderAmount = orderAmount.subtract(remitFee);
         }
@@ -509,7 +474,6 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
             goodsList = goodsService.findGoodsByIds(registerPayDto.getGoodsIds());
             for (Goods goods : goodsList) {
                 orderAmount = orderAmount.add(goods.getGroupPurchasePrice());
-                accessoriesFee = accessoriesFee.add(goods.getGroupPurchasePrice());
             }
         }
 
@@ -519,7 +483,6 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
             otherGoodsList = goodsService.findGoodsByIds(registerPayDto.getOtherGoodsIds());
             for (Goods goods : otherGoodsList) {
                 orderAmount = orderAmount.add(goods.getGroupPurchasePrice());
-                otherFee = otherFee.add(goods.getGroupPurchasePrice());
             }
         }
         if (amount.compareTo(orderAmount) != 0) {
@@ -572,27 +535,6 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
             return notifyMap;
         }
 
-        //分类费用 course,instrument,accessories,other
-        Map<String, BigDecimal> classFee = new HashMap<>();
-        classFee.put("course", courseFee);
-        classFee.put("instrument", instrumentFee);
-        classFee.put("accessories", accessoriesFee);
-        classFee.put("other", otherFee);
-        BigDecimal classFeeAmount = courseFee.add(instrumentFee).add(accessoriesFee).add(otherFee);
-
-        if (amount.compareTo(classFeeAmount) < 0) {
-            BigDecimal subAmount = classFeeAmount.subtract(amount);
-            for (Map.Entry<String, BigDecimal> feeEntry : classFee.entrySet()) {
-                if (subAmount.compareTo(feeEntry.getValue()) > 0) {
-                    classFee.put(feeEntry.getKey(), BigDecimal.ZERO);
-                    subAmount = subAmount.subtract(feeEntry.getValue());
-                } else {
-                    classFee.put(feeEntry.getKey(), feeEntry.getValue().subtract(subAmount));
-                    break;
-                }
-            }
-        }
-
         String orderSubject = "乐团报名";
         String receiver = "register";
         if (musicGroup.getOwnershipType() != null && musicGroup.getOwnershipType().equals(CooperationOrgan.OwnershipType.COOPERATION)) {
@@ -646,9 +588,6 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
         }
         orderAmount = orderAmount.add(courseFee);
 
-        BigDecimal instrumentFee = BigDecimal.ZERO;
-        BigDecimal accessoriesFee = BigDecimal.ZERO;
-        BigDecimal otherFee = BigDecimal.ZERO;
         BigDecimal remitFee = BigDecimal.ZERO;
 
         //乐器及打包辅件
@@ -667,13 +606,6 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
                 musicGroupSubjectGoodsGroup.setKitGroupPurchaseType(orderDetail.getKitGroupPurchaseType());
                 goodsGroups.add(musicGroupSubjectGoodsGroup);
 
-                if (musicGroupSubjectGoodsGroup.getType().equals(GoodsType.INSTRUMENT)) {
-                    instrumentFee = instrumentFee.add(orderDetail.getPrice());
-                } else if (musicGroupSubjectGoodsGroup.getType().equals(GoodsType.ACCESSORIES)) {
-                    accessoriesFee = accessoriesFee.add(orderDetail.getPrice());
-                } else {
-                    otherFee = otherFee.add(orderDetail.getPrice());
-                }
                 orderAmount = orderAmount.add(orderDetail.getPrice());
             }
         } else if (StringUtils.isNoneBlank(registerPayDto.getGoodsGroupIds())) {
@@ -685,15 +617,8 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
                 if (goodsGroup.getType().equals(GoodsType.INSTRUMENT) && musicOneSubjectClassPlan.getKitGroupPurchaseType().equals(KitGroupPurchaseTypeEnum.FREE)) {
                     goodsGroup.setPrice(new BigDecimal(0));
                 }
-
                 orderAmount = orderAmount.add(goodsGroup.getPrice());
-                if (goodsGroup.getType().equals(GoodsType.INSTRUMENT)) {
-                    instrumentFee = instrumentFee.add(goodsGroup.getPrice());
-                } else if (goodsGroup.getType().equals(GoodsType.ACCESSORIES)) {
-                    accessoriesFee = accessoriesFee.add(goodsGroup.getPrice());
-                } else {
-                    otherFee = otherFee.add(goodsGroup.getPrice());
-                }
+
                 //团购乐器减免课程费用
                 if (goodsGroup.getType().equals(GoodsType.INSTRUMENT) && goodsGroup.getRemissionCourseFee() != null && musicOneSubjectClassPlan.getKitGroupPurchaseType().equals(KitGroupPurchaseTypeEnum.GROUP)) {//团购
                     orderAmount = orderAmount.subtract(goodsGroup.getRemissionCourseFee());
@@ -706,37 +631,19 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
             for (MusicGroupSubjectGoodsGroup goodsGroup : goodsGroups) {
                 Map<String, BigDecimal> groupType = JSONObject.parseObject(goodsGroup.getKitGroupPurchaseTypeJson(), new TypeReference<Map<String, BigDecimal>>() {
                 });
-                if (goodsGroup.getType().equals(GoodsType.INSTRUMENT) && registerPayDto.getGoodsGroups().get(goodsGroup.getId()).equals("GROUP")) {
-                    if (!groupType.containsKey("GROUP")) {
-                        throw new BizException("乐器提供方式不存在");
+                if (goodsGroup.getType().equals(GoodsType.INSTRUMENT)) {
+                    String kitGroupPurchaseType = registerPayDto.getGoodsGroups().get(goodsGroup.getId());
+                    if (!groupType.containsKey(kitGroupPurchaseType)) {
+                        throw new BizException("乐器提供方式不存在,请核查");
                     }
-                    goodsGroup.setKitGroupPurchaseType(KitGroupPurchaseTypeEnum.GROUP);
-                    remitFee = groupType.get("GROUP");
-                }
-                if (goodsGroup.getType().equals(GoodsType.INSTRUMENT) && registerPayDto.getGoodsGroups().get(goodsGroup.getId()).equals("LEASE")) {
-                    if (!groupType.containsKey("LEASE")) {
-                        throw new BizException("乐器提供方式不存在");
+                    if (!kitGroupPurchaseType.equals("GROUP")) {
+                        goodsGroup.setPrice(kitGroupPurchaseType.equals("FREE") ? new BigDecimal(0) : goodsGroup.getDepositFee());
                     }
-                    goodsGroup.setPrice(goodsGroup.getDepositFee());
-                    goodsGroup.setKitGroupPurchaseType(KitGroupPurchaseTypeEnum.LEASE);
-                    remitFee = groupType.get("LEASE");
-                }
-                if (goodsGroup.getType().equals(GoodsType.INSTRUMENT) && registerPayDto.getGoodsGroups().get(goodsGroup.getId()).equals("FREE")) {
-                    if (!groupType.containsKey("FREE")) {
-                        throw new BizException("乐器提供方式不存在");
-                    }
-                    goodsGroup.setPrice(new BigDecimal(0));
-                    goodsGroup.setKitGroupPurchaseType(KitGroupPurchaseTypeEnum.FREE);
-                    remitFee = groupType.get("FREE");
-                }
-                if (goodsGroup.getType().equals(GoodsType.INSTRUMENT)) {
-                    instrumentFee = instrumentFee.add(goodsGroup.getPrice());
-                } else if (goodsGroup.getType().equals(GoodsType.ACCESSORIES)) {
-                    accessoriesFee = accessoriesFee.add(goodsGroup.getPrice());
-                } else {
-                    otherFee = otherFee.add(goodsGroup.getPrice());
+                    goodsGroup.setKitGroupPurchaseType(KitGroupPurchaseTypeEnum.valueOf(kitGroupPurchaseType));
+                    remitFee = groupType.get(kitGroupPurchaseType);
                 }
                 orderAmount = orderAmount.add(goodsGroup.getPrice());
+                goodsGroup.setGoodsList(goodsService.findGoodsByIds(goodsGroup.getGoodsIdList()));
             }
             orderAmount = orderAmount.subtract(remitFee);
         }
@@ -747,7 +654,6 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
             goodsList = goodsService.findGoodsByIds(registerPayDto.getGoodsIds());
             for (Goods goods : goodsList) {
                 orderAmount = orderAmount.add(goods.getGroupPurchasePrice());
-                accessoriesFee = accessoriesFee.add(goods.getGroupPurchasePrice());
             }
         }
 
@@ -757,7 +663,6 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
             otherGoodsList = goodsService.findGoodsByIds(registerPayDto.getOtherGoodsIds());
             for (Goods goods : otherGoodsList) {
                 orderAmount = orderAmount.add(goods.getGroupPurchasePrice());
-                otherFee = otherFee.add(goods.getGroupPurchasePrice());
             }
         }
         if (amount.compareTo(orderAmount) != 0) {
@@ -811,26 +716,6 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
             return notifyMap;
         }
 
-        //分类费用 course,instrument,accessories,other
-        Map<String, BigDecimal> classFee = new HashMap<>();
-        classFee.put("course", courseFee);
-        classFee.put("instrument", instrumentFee);
-        classFee.put("accessories", accessoriesFee);
-        classFee.put("other", otherFee);
-        BigDecimal classFeeAmount = courseFee.add(instrumentFee).add(accessoriesFee).add(otherFee);
-
-        if (amount.compareTo(classFeeAmount) < 0) {
-            BigDecimal subAmount = classFeeAmount.subtract(amount);
-            for (Map.Entry<String, BigDecimal> feeEntry : classFee.entrySet()) {
-                if (subAmount.compareTo(feeEntry.getValue()) > 0) {
-                    classFee.put(feeEntry.getKey(), BigDecimal.ZERO);
-                    subAmount = subAmount.subtract(feeEntry.getValue());
-                } else {
-                    classFee.put(feeEntry.getKey(), feeEntry.getValue().subtract(subAmount));
-                    break;
-                }
-            }
-        }
         String orderSubject = "乐团报名";
         String receiver = "register";
         if (musicGroup.getOwnershipType() != null && musicGroup.getOwnershipType().equals(CooperationOrgan.OwnershipType.COOPERATION)) {
@@ -920,7 +805,9 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
         updateExpectedNumDtos.forEach(e -> {
             MusicGroupSubjectPlan musicGroupSubjectPlan = musicGroupSubjectPlanDao.get(e.getMusicGroupSubjectPlanId());
             musicGroupSubjectPlan.setExpectedStudentNum(e.getExpectedStudentNum());
-            musicGroupSubjectPlanDao.update(musicGroupSubjectPlan);
+            if (musicGroupSubjectPlanDao.update(musicGroupSubjectPlan) <= 0) {
+                throw new BizException("更新失败,请重试");
+            }
         });
     }
 
@@ -1264,30 +1151,30 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
     }
 
     @Override
-	public boolean deleteMusicGroup(String musicGroupId) {
+    public boolean deleteMusicGroup(String musicGroupId) {
 
         MusicGroup musicGroup = musicGroupDao.get(musicGroupId);
-        
-        if(musicGroup == null){
-        	throw new BizException("乐团不存在");
+
+        if (musicGroup == null) {
+            throw new BizException("乐团不存在");
         }
-        
-        if(musicGroup.getDelFlag() == true){
-        	throw new BizException("乐团已删除");
+
+        if (musicGroup.getDelFlag() == true) {
+            throw new BizException("乐团已删除");
         }
-        
+
         if (musicGroup.getStatus() != MusicGroupStatusEnum.CANCELED) {
             throw new BizException("乐团当前状态是{},不能删除", musicGroup.getStatus().getMsg());
         }
-        
+
         musicGroup.setUpdateTime(new Date());
         musicGroup.setDelFlag(true);
         musicGroupDao.update(musicGroup);
-        
-		return true;
-	}
 
-	@Override
+        return true;
+    }
+
+    @Override
     @Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
     public boolean pauseMusicGroup(String musicGroupId) {
         SysUser sysUser = sysUserFeignService.queryUserInfo();
@@ -1950,9 +1837,9 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
             musicGroupPageInfo = queryPage(queryInfo);
         }
         List<MusicGroup> musicGroupList = musicGroupPageInfo.getRows();
-        
-        if(musicGroupList == null || musicGroupList.size() == 0){
-        	return musicGroupPageInfo;
+
+        if (musicGroupList == null || musicGroupList.size() == 0) {
+            return musicGroupPageInfo;
         }
         // 获取学校编号列表
 //        Set<Integer> schoolIds = musicGroupList.stream().map(e -> e.getSchoolId()).collect(Collectors.toSet());

+ 45 - 17
mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentRegistrationServiceImpl.java

@@ -1,5 +1,6 @@
 package com.ym.mec.biz.service.impl;
 
+import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONObject;
 import com.ym.mec.auth.api.client.SysUserFeignService;
 import com.ym.mec.auth.api.entity.SysUser;
@@ -105,7 +106,7 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
 
         List<StudentApplyDetailDto> dataList = null;
         int count = studentRegistrationDao.queryStudentDetailCount(params);
-        if(queryInfo.getIsExport() && count > 50000){
+        if (queryInfo.getIsExport() && count > 50000) {
             throw new BizException("数据集太大,不能导出.最大数据集不能超过50000");
         }
         if (count > 0) {
@@ -301,6 +302,15 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
         //乐器及打包辅件
         if (goodsGroups != null && goodsGroups.size() > 0) {
             for (MusicGroupSubjectGoodsGroup goodsGroup : goodsGroups) {
+                List<Map<String, Object>> goodsPrices = new ArrayList<>();
+                for (Goods goods : goodsGroup.getGoodsList()) {
+                    HashMap<String, Object> goodsPrice = new HashMap<>();
+                    goodsPrice.put("id", goods.getId());
+                    goodsPrice.put("discountPrice", goods.getDiscountPrice());
+                    goodsPrice.put("agreeCostPrice", goods.getAgreeCostPrice());
+                    goodsPrices.add(goodsPrice);
+                }
+
                 StudentPaymentOrderDetail studentPaymentOrderDetail4goodsGroup = new StudentPaymentOrderDetail();
                 OrderDetailTypeEnum type = null;
                 if (goodsGroup.getType().equals(GoodsType.INSTRUMENT)) {
@@ -310,6 +320,7 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
                 } else if (goodsGroup.getType().equals(GoodsType.OTHER)) {
                     type = OrderDetailTypeEnum.TEACHING;
                 }
+                studentPaymentOrderDetail4goodsGroup.setGoodsPrices(JSON.toJSONString(goodsPrices));
                 studentPaymentOrderDetail4goodsGroup.setType(type);
                 studentPaymentOrderDetail4goodsGroup.setPrice(goodsGroup.getPrice());
                 studentPaymentOrderDetail4goodsGroup.setGoodsIdList(goodsGroup.getGoodsIdList());
@@ -323,9 +334,17 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
 
         //单独辅件
         if (goodsList != null && goodsList.size() > 0) {
+            List<Map<String, Object>> goodsPrices = new ArrayList<>();
             for (Goods goods : goodsList) {
+                HashMap<String, Object> goodsPrice = new HashMap<>();
+                goodsPrice.put("id", goods.getId());
+                goodsPrice.put("discountPrice", goods.getDiscountPrice());
+                goodsPrice.put("agreeCostPrice", goods.getAgreeCostPrice());
+                goodsPrices.add(goodsPrice);
+
                 StudentPaymentOrderDetail studentPaymentOrderDetail4goods = new StudentPaymentOrderDetail();
                 OrderDetailTypeEnum orderDetailType = goods.getType().equals(GoodsType.INSTRUMENT) ? OrderDetailTypeEnum.MUSICAL : OrderDetailTypeEnum.ACCESSORIES;
+                studentPaymentOrderDetail4goods.setGoodsPrices(JSON.toJSONString(goodsPrices));
                 studentPaymentOrderDetail4goods.setType(orderDetailType);
                 studentPaymentOrderDetail4goods.setPrice(goods.getGroupPurchasePrice());
                 studentPaymentOrderDetail4goods.setGoodsIdList(goods.getId().toString());
@@ -337,8 +356,17 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
         }
         //单独教谱
         if (otherGoodsList != null && otherGoodsList.size() > 0) {
+            List<Map<String, Object>> goodsPrices = new ArrayList<>();
+
             for (Goods goods : otherGoodsList) {
+                HashMap<String, Object> goodsPrice = new HashMap<>();
+                goodsPrice.put("id", goods.getId());
+                goodsPrice.put("discountPrice", goods.getDiscountPrice());
+                goodsPrice.put("agreeCostPrice_", goods.getAgreeCostPrice());
+                goodsPrices.add(goodsPrice);
+
                 StudentPaymentOrderDetail studentPaymentOrderDetail4otherGoods = new StudentPaymentOrderDetail();
+                studentPaymentOrderDetail4otherGoods.setGoodsPrices(JSON.toJSONString(goodsPrices));
                 studentPaymentOrderDetail4otherGoods.setType(OrderDetailTypeEnum.TEACHING);
                 studentPaymentOrderDetail4otherGoods.setPrice(goods.getGroupPurchasePrice());
                 studentPaymentOrderDetail4otherGoods.setGoodsIdList(goods.getId().toString());
@@ -515,7 +543,7 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
                 sysUser.setBirthdate(studentRegistration.getBirthdate());
                 teacherDao.addSysUser(sysUser);
                 userId = sysUser.getId();
-                studentDao.insert(new Student(userId,studentRegistration.getSubjectId().toString()));
+                studentDao.insert(new Student(userId, studentRegistration.getSubjectId().toString()));
                 //添加用户现金账户
                 sysUserCashAccountDao.insert(new SysUserCashAccount(userId, "CNY"));
                 //添加用户电子签章账户
@@ -536,25 +564,25 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
                 teacherDao.updateUser(sysUser);
                 userId = sysUser.getId();
                 Student student = studentDao.get(userId);
-                if(student == null){
-                    studentDao.insert(new Student(userId,studentRegistration.getSubjectId().toString()));
-                }else if(StringUtils.isEmpty(student.getSubjectIdList())){
+                if (student == null) {
+                    studentDao.insert(new Student(userId, studentRegistration.getSubjectId().toString()));
+                } else if (StringUtils.isEmpty(student.getSubjectIdList())) {
                     student.setSubjectIdList(studentRegistration.getSubjectId().toString());
                     student.setUpdateTime(date);
                     studentDao.update(student);
-                }else if(StringUtils.isNotEmpty(student.getSubjectIdList())){
+                } else if (StringUtils.isNotEmpty(student.getSubjectIdList())) {
                     String[] split = student.getSubjectIdList().split(",");
                     List<String> list = new ArrayList<>(Arrays.asList(split));
-                    if(!list.contains(studentRegistration.getSubjectId())){
+                    if (!list.contains(studentRegistration.getSubjectId().toString())) {
                         list.add(studentRegistration.getSubjectId().toString());
-                        student.setSubjectIdList(StringUtils.join(list,","));
+                        student.setSubjectIdList(StringUtils.join(list, ","));
                         student.setUpdateTime(date);
                         studentDao.update(student);
                     }
                 }
             }
             MusicGroupStudentFee studentFeeDaoByUser = musicGroupStudentFeeDao.findByUser(userId, musicGroupId);
-            if(studentFeeDaoByUser != null){
+            if (studentFeeDaoByUser != null) {
                 throw new BizException("该学员已存在");
             }
             studentRegistration.setActualSubjectId(studentRegistration.getSubjectId());
@@ -625,8 +653,8 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
             MusicGroupStudentFee musicGroupStudentFee = new MusicGroupStudentFee(musicGroupId,
                     userId, studentRegistration.getSubjectId(), studentAddDto.getCourseFee(),
                     null, studentAddDto.getTemporaryCourseFee(), paymentStatus);
-            if(musicGroup.getFeeType() != null && musicGroup.getFeeType() != MusicGroupPaymentCalender.FeeType.OFFLINE && musicGroupStudentFee.getTemporaryCourseFee().doubleValue() * 100 == 0){
-            	musicGroupStudentFee.setRemainNetworkClassTimes(musicGroupStudentFee.getRemainNetworkClassTimes() + 1);
+            if (musicGroup.getFeeType() != null && musicGroup.getFeeType() != MusicGroupPaymentCalender.FeeType.OFFLINE && musicGroupStudentFee.getTemporaryCourseFee().doubleValue() * 100 == 0) {
+                musicGroupStudentFee.setRemainNetworkClassTimes(musicGroupStudentFee.getRemainNetworkClassTimes() + 1);
             }
             musicGroupStudentFeeDao.insert(musicGroupStudentFee);
 //            musicGroupStudentFeeDao.insert(new MusicGroupStudentFee(musicGroupId,
@@ -764,7 +792,7 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
         //成功报名状态变更
         StudentRegistration studentRegistration = studentRegistrationDao.queryByUserIdAndMusicGroupId(studentPaymentOrder.getUserId(), studentPaymentOrder.getMusicGroupId());
 
-        if(studentRegistration.getPaymentStatus().equals(PaymentStatusEnum.YES)){
+        if (studentRegistration.getPaymentStatus().equals(PaymentStatusEnum.YES)) {
             return studentPaymentOrder;
         }
         MusicGroupSubjectPlan musicOneSubjectClassPlan = musicGroupSubjectPlanService.getMusicOneSubjectClassPlan(studentRegistration.getMusicGroupId(), studentRegistration.getActualSubjectId());
@@ -772,7 +800,7 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
         if (studentPaymentOrder.getStatus().equals(DealStatusEnum.SUCCESS)) {
 
             MusicGroup musicGroup = musicGroupDao.get(studentRegistration.getMusicGroupId());
-            
+
             if (studentRegistration.getTemporaryCourseFee() != null) {
                 studentRegistration.setTemporaryCourseFee(new BigDecimal(0));
             }
@@ -790,8 +818,8 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
                 musicGroupStudentFee.setLatestPaidTime(nowDate);
                 musicGroupStudentFee.setPaymentStatus(MusicGroupStudentFee.PaymentStatus.PAID_COMPLETED);
                 musicGroupStudentFee.setTemporaryCourseFee(BigDecimal.ZERO);
-                if(musicGroup.getFeeType() != null && musicGroup.getFeeType() != MusicGroupPaymentCalender.FeeType.OFFLINE){
-                	musicGroupStudentFee.setRemainNetworkClassTimes(musicGroupStudentFee.getRemainNetworkClassTimes() + 1);
+                if (musicGroup.getFeeType() != null && musicGroup.getFeeType() != MusicGroupPaymentCalender.FeeType.OFFLINE) {
+                    musicGroupStudentFee.setRemainNetworkClassTimes(musicGroupStudentFee.getRemainNetworkClassTimes() + 1);
                 }
                 musicGroupStudentFee.setUpdateTime(nowDate);
                 musicGroupStudentFeeDao.update(musicGroupStudentFee);
@@ -857,8 +885,8 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
                 // 商品协议(租赁时候有)
                 StudentPaymentOrderDetail applyOrderMusical = studentPaymentOrderDetailService.findApplyOrderMusical(studentPaymentOrder.getId());
                 if (applyOrderMusical != null && applyOrderMusical.getKitGroupPurchaseType() != null && applyOrderMusical.getKitGroupPurchaseType().equals(KitGroupPurchaseTypeEnum.LEASE)) {
-                        contractService.transferGoodsContract(studentPaymentOrder.getUserId(), studentPaymentOrder.getMusicGroupId(),
-                                applyOrderMusical.getGoodsIdList(), applyOrderMusical.getKitGroupPurchaseType());
+                    contractService.transferGoodsContract(studentPaymentOrder.getUserId(), studentPaymentOrder.getMusicGroupId(),
+                            applyOrderMusical.getGoodsIdList(), applyOrderMusical.getKitGroupPurchaseType());
                 }
             } catch (Exception e) {
                 LOGGER.error("协议生成失败", e);

+ 185 - 0
mec-biz/src/main/resources/config/mybatis/EmployeeInfoMapper.xml

@@ -0,0 +1,185 @@
+<?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.EmployeeInfoDao">
+
+	<resultMap type="com.ym.mec.biz.dal.entity.EmployeeInfo" id="EmployeeInfo">
+		<result column="id_" property="id" />
+		<result column="real_name_" property="realName" />
+		<result column="mobile_no_" property="mobileNo" />
+		<result column="wechat_no_" property="wechatNo" />
+		<result column="id_card_" property="idCard" />
+		<result column="age_" property="age" />
+		<result column="gender_" property="gender" />
+		<result column="birthdate_" property="birthdate" />
+		<result column="emergency_contact_name_" property="emergencyContactName" />
+		<result column="emergency_contact_relation_" property="emergencyContactRelation" />
+		<result column="emergency_contact_phone_" property="emergencyContactPhone" />
+		<result column="live_city_" property="liveCity" />
+		<result column="intention_city_" property="intentionCity" />
+		<result column="educational_background_" property="educationalBackground" />
+		<result column="subject_id_" property="subjectId" />
+		<result column="is_interviewed_" property="isInterviewed" />
+		<result column="other_comment_" property="otherComment" />
+		<result column="entry_date_" property="entryDate" />
+		<result column="position_" property="position" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler" />
+		<result column="job_nature_" property="jobNature" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler" />
+		<result column="is_probation_period_" property="isProbationPeriod" />
+		<result column="bank_card_no_" property="bankCardNo" />
+		<result column="bank_address_" property="bankAddress" />
+		<result column="resignation_date_" property="resignationDate" />
+		<result column="organ_id_" property="organId" />
+		<result column="create_time_" property="createTime" />
+		<result column="update_time_" property="updateTime" />
+	</resultMap>
+
+	<!-- 根据主键查询一条记录 -->
+	<select id="get" resultMap="EmployeeInfo">
+		SELECT * FROM
+		employee_info WHERE id_ = #{id}
+	</select>
+
+	<!-- 全查询 -->
+	<select id="findAll" resultMap="EmployeeInfo">
+		SELECT * FROM employee_info ORDER
+		BY id_
+	</select>
+
+	<!-- 向数据库增加一条记录 -->
+	<insert id="insert" parameterType="com.ym.mec.biz.dal.entity.EmployeeInfo"
+		useGeneratedKeys="true" keyColumn="id" keyProperty="id">
+		<!-- <selectKey resultClass="int" keyProperty="id" > SELECT SEQ_WSDEFINITION_ID.nextval 
+			AS ID FROM DUAL </selectKey> -->
+		INSERT INTO employee_info
+		(id_,real_name_,mobile_no_,wechat_no_,id_card_,age_,gender_,birthdate_,emergency_contact_name_,emergency_contact_relation_,emergency_contact_phone_,live_city_,intention_city_,educational_background_,subject_id_,is_interviewed_,other_comment_,entry_date_,organ_id_,position_,job_nature_,is_probation_period_,bank_card_no_,bank_address_,resignation_date_,create_time_,update_time_)
+		VALUES(#{id},#{realName},#{mobileNo},#{wechatNo},#{idCard},#{age},#{gender},#{birthdate},#{emergencyContactName},#{emergencyContactRelation},#{emergencyContactPhone},#{liveCity},#{intentionCity},#{educationalBackground},#{subjectId},#{isInterviewed},#{otherComment},#{entryDate},#{organId},#{position,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{jobNature,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{isProbationPeriod},#{bankCardNo},#{bankAddress},#{resignationDate},#{createTime},#{updateTime})
+	</insert>
+
+	<!-- 根据主键查询一条记录 -->
+	<update id="update" parameterType="com.ym.mec.biz.dal.entity.EmployeeInfo">
+		UPDATE employee_info
+		<set>
+			<if test="isProbationPeriod != null">
+				is_probation_period_ = #{isProbationPeriod},
+			</if>
+			<if test="subjectId != null">
+				subject_id_ = #{subjectId},
+			</if>
+			<if test="gender != null">
+				gender_ = #{gender},
+			</if>
+			<if test="entryDate != null">
+				entry_date_ = #{entryDate},
+			</if>
+			<if test="otherComment != null">
+				other_comment_ = #{otherComment},
+			</if>
+			<if test="jobNature != null">
+				job_nature_ = #{jobNature,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
+			</if>
+			<if test="educationalBackground != null">
+				educational_background_ = #{educationalBackground},
+			</if>
+			<if test="emergencyContactPhone != null">
+				emergency_contact_phone_ = #{emergencyContactPhone},
+			</if>
+			<if test="resignationDate != null">
+				resignation_date_ = #{resignationDate},
+			</if>
+			<if test="position != null">
+				position_ = #{position,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
+			</if>
+			<if test="updateTime != null">
+				update_time_ = #{updateTime},
+			</if>
+			<if test="emergencyContactRelation != null">
+				emergency_contact_relation_ = #{emergencyContactRelation},
+			</if>
+			<if test="id != null">
+				id_ = #{id},
+			</if>
+			<if test="bankCardNo != null">
+				bank_card_no_ = #{bankCardNo},
+			</if>
+			<if test="realName != null">
+				real_name_ = #{realName},
+			</if>
+			<if test="idCard != null">
+				id_card_ = #{idCard},
+			</if>
+			<if test="age != null">
+				age_ = #{age},
+			</if>
+			<if test="liveCity != null">
+				live_city_ = #{liveCity},
+			</if>
+			<if test="intentionCity != null">
+				intention_city_ = #{intentionCity},
+			</if>
+			<if test="createTime != null">
+				create_time_ = #{createTime},
+			</if>
+			<if test="wechatNo != null">
+				wechat_no_ = #{wechatNo},
+			</if>
+			<if test="isInterviewed != null">
+				is_interviewed_ = #{isInterviewed},
+			</if>
+			<if test="mobileNo != null">
+				mobile_no_ = #{mobileNo},
+			</if>
+			<if test="emergencyContactName != null">
+				emergency_contact_name_ = #{emergencyContactName},
+			</if>
+			<if test="birthdate != null">
+				birthdate_ = #{birthdate},
+			</if>
+			<if test="bankAddress != null">
+				bank_address_ = #{bankAddress},
+			</if>
+			<if test="organId != null">
+				organ_id_ = #{organId},
+			</if>
+		</set>
+		WHERE id_ = #{id}
+	</update>
+
+	<!-- 根据主键删除一条记录 -->
+	<delete id="delete">
+		DELETE FROM employee_info WHERE id_ = #{id}
+	</delete>
+	
+	<sql id="queryPageMap">
+		<where>
+			<if test="organId != null">
+            	AND organ_id_ = #{organId}
+	        </if>
+	        <if test="userNameOrIdOrMobile != null">
+	            AND (su.real_name_ LIKE CONCAT('%',#{search},'%') OR su.phone_ LIKE CONCAT('%',#{search},'%') OR t.id_ = #{search})
+	        </if>
+	        <if test="subjectId != null">
+	            AND subject_id_ = #{subjectId}
+	        </if>
+	        <if test="position != null">
+	            AND position_ = #{position,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
+	        </if>
+	        <if test="jobNature != null">
+	            AND job_nature_ = #{jobNature,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
+	        </if>
+		</where>
+    </sql>
+
+	<!-- 分页查询 -->
+	<select id="queryPage" resultMap="EmployeeInfo" parameterType="map">
+		SELECT * FROM employee_info 
+        <include refid="queryPageMap"/>
+		ORDER BY id_
+		<include refid="global.limit" />
+	</select>
+
+	<!-- 查询当前表的总记录数 -->
+	<select id="queryCount" resultType="int">
+		SELECT COUNT(*) FROM employee_info
+        <include refid="queryPageMap"/>
+	</select>
+</mapper>

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

@@ -0,0 +1,112 @@
+<?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.FinancialExpenditureDao">
+
+    <resultMap type="com.ym.mec.biz.dal.entity.FinancialExpenditure" id="FinancialExpenditure">
+        <result column="id_" property="id"/>
+        <result column="batch_no_" property="batchNo"/>
+        <result column="financial_process_no_" property="financialProcessNo"/>
+        <result column="dingtalk_process_no_" property="dingtalkProcessNo"/>
+        <result column="organ_id_" property="organId"/>
+        <result column="cooperation_organ_id_" property="cooperationOrganId"/>
+        <result column="apply_user_id_" property="applyUserId"/>
+        <result column="amount_" property="amount"/>
+        <result column="item_detail_" property="itemDetail"/>
+        <result column="payment_time_" property="paymentTime"/>
+        <result column="del_flag_" property="delFlag"/>
+        <result column="cause_" property="cause"/>
+        <result column="create_time_" property="createTime"/>
+        <result column="update_time_" property="updateTime"/>
+    </resultMap>
+
+    <!-- 根据主键查询一条记录 -->
+    <select id="get" resultMap="FinancialExpenditure">
+		SELECT * FROM financial_expenditure WHERE id_ = #{id}
+	</select>
+
+    <!-- 全查询 -->
+    <select id="findAll" resultMap="FinancialExpenditure">
+		SELECT * FROM financial_expenditure WHERE del_flag_ = 0 ORDER BY id_
+	</select>
+
+    <!-- 向数据库增加一条记录 -->
+    <insert id="insert" parameterType="com.ym.mec.biz.dal.entity.FinancialExpenditure" useGeneratedKeys="true" keyColumn="id"
+            keyProperty="id">
+        INSERT INTO financial_expenditure (batch_no_,financial_process_no_,dingtalk_process_no_,
+        organ_id_,cooperation_organ_id_,apply_user_id_,amount_,item_detail_,payment_time_,cause_,create_time_,update_time_)
+        VALUES(#{batchNo},#{financialProcessNo},#{dingtalkProcessNo},#{organId},#{cooperationOrganId},#{applyUserId},#{amount},
+        #{itemDetail},#{paymentTime},#{cause},now(),now())
+    </insert>
+    <insert id="batchInsert">
+        INSERT INTO financial_expenditure (batch_no_,financial_process_no_,dingtalk_process_no_,
+        organ_id_,cooperation_organ_id_,apply_user_id_,amount_,item_detail_,payment_time_,cause_,create_time_,update_time_)
+        VALUES
+        <foreach collection="financialExpenditures" item="item" separator=",">
+            (#{item.batchNo},#{item.financialProcessNo},#{item.dingtalkProcessNo},#{item.organId},#{item.cooperationOrganId},#{item.applyUserId},#{item.amount},
+            #{item.itemDetail},#{item.paymentTime},#{item.cause},now(),now())
+        </foreach>
+    </insert>
+
+    <!-- 根据主键查询一条记录 -->
+    <update id="update" parameterType="com.ym.mec.biz.dal.entity.FinancialExpenditure">
+        UPDATE charge_type
+        <set>
+            <if test="delFlag != null">
+                del_flag_ = #{delFlag},
+            </if>
+            <if test="batchNo != null">
+                batch_no_ = #{batchNo},
+            </if>
+            <if test="financialProcessNo != null">
+                financial_process_no_ = #{financialProcessNo},
+            </if>
+            <if test="dingtalkProcessNo != null">
+                dingtalk_process_no_ = #{dingtalkProcessNo},
+            </if>
+            <if test="organId != null">
+                organ_id_ = #{organId},
+            </if>
+            <if test="cooperationOrganId != null">
+                cooperation_organ_id_ = #{cooperationOrganId},
+            </if>
+            <if test="applyUserId != null">
+                apply_user_id_ = #{applyUserId},
+            </if>
+            <if test="amount != null">
+                amount_ = #{amount},
+            </if>
+            <if test="itemDetail != null">
+                item_detail_ = #{itemDetail},
+            </if>
+            <if test="paymentTime != null">
+                payment_time_ = #{paymentTime},
+            </if>
+            <if test="cause != null">
+                cause_ = #{cause},
+            </if>
+            update_time_ = NOW()
+        </set>
+        WHERE id_ = #{id}
+    </update>
+
+    <!-- 根据主键删除一条记录 -->
+    <delete id="delete">
+		UPDATE charge_type SET del_flag_ = 1 WHERE id_ = #{id}
+	</delete>
+
+    <!-- 分页查询 -->
+    <select id="queryPage" resultMap="FinancialExpenditure" parameterType="map">
+        SELECT * FROM financial_expenditure
+        WHERE del_flag_ = 0
+        <include refid="global.limit"/>
+    </select>
+
+    <!-- 查询当前表的总记录数 -->
+    <select id="queryCount" resultType="int">
+		SELECT COUNT(*) FROM financial_expenditure WHERE del_flag_ = 0
+	</select>
+</mapper>

+ 0 - 3
mec-biz/src/main/resources/config/mybatis/GoodsCategoryMapper.xml

@@ -105,7 +105,4 @@
     <select id="findByParentId" resultMap="GoodsCategory">
         SELECT * FROM goods_category WHERE parent_id_ = #{parentId} AND del_flag_ = #{delFlag,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
     </select>
-    <select id="queryCategotyMap" resultType="java.util.Map">
-        SELECT id_ 'value',name_ 'key' FROM goods_category WHERE del_flag_ = 0
-    </select>
 </mapper>

+ 10 - 0
mec-common/common-core/src/main/java/com/ym/mec/common/service/BaseService.java

@@ -91,5 +91,15 @@ public interface BaseService<PK extends Serializable, T> {
 	 */
 	<K extends List, Y, Z> Map<Y,Z> getMap(String tableName, String columnKey, String columnValue, K ids, Class<Y> keyType, Class<Z> valueType);
 
+	/**
+	 * @describe 获取columnKey-columnValue集合
+	 * @author Joburgess
+	 * @date 2020.06.23
+	 * @param columnKey: key所对应的列名
+	 * @param columnValue: value所对应的列名
+	 * @return java.util.List<java.util.Map>
+	 */
+	<K extends List, Y, Z> Map<Y,Z> getMap(String tableName, String columnKey, String columnValue,Boolean hasDelFlag, Class<Y> keyType, Class<Z> valueType);
+
 
 }

+ 49 - 0
mec-common/common-core/src/main/java/com/ym/mec/common/service/impl/BaseServiceImpl.java

@@ -164,4 +164,53 @@ public abstract class BaseServiceImpl<PK extends Serializable, T> implements Bas
 
 		return result;
 	}
+
+
+	@Override
+	public <K extends List, Y, Z> Map<Y,Z> getMap(String tableName, String columnKey, String columnValue,Boolean hasDelFlag, Class<Y> keyType, Class<Z> valueType){
+		StringBuffer sql=new StringBuffer();
+		Map<Y,Z> result=new HashMap();
+		try {
+			SqlSession sqlSession = sqlSessionFactory.openSession();
+			Connection connection = sqlSession.getConnection();
+			sql.append("SELECT ").append(columnKey).append(",").append(columnValue).append(" FROM ").append(tableName);
+			if(hasDelFlag){
+				sql.append(" WHERE del_flag_ = 0");
+			}
+			PreparedStatement ps = connection.prepareStatement(sql.toString());
+			ResultSet resultSet = ps.executeQuery();
+			while (resultSet.next()){
+				Y key;
+				Z value;
+				if(keyType.isAssignableFrom(BigDecimal.class)){
+					key = (Y) BigDecimal.class.getDeclaredConstructor(String.class).newInstance(resultSet.getString(1));
+				}else if(keyType.isAssignableFrom(String.class)){
+					key = (Y) resultSet.getString(1);
+				}else{
+					key = (Y) keyType.getMethod("valueOf", String.class).invoke(null,resultSet.getString(1));
+				}
+				if(valueType.isAssignableFrom(BigDecimal.class)){
+					value = (Z) BigDecimal.class.getDeclaredConstructor(String.class).newInstance(resultSet.getString(2));
+				}else if(valueType.isAssignableFrom(String.class)){
+					value = (Z) resultSet.getString(2);
+				}else{
+					value = (Z) valueType.getMethod("valueOf", String.class).invoke(null,resultSet.getString(2));
+				}
+				result.put(key, value);
+			}
+			if(resultSet!=null){
+				resultSet.close();
+			}
+			if(ps!=null){
+				ps.close();
+			}
+			if(sqlSession!=null){
+				sqlSession.close();
+			}
+		} catch (Exception e) {
+			e.printStackTrace();
+		}
+
+		return result;
+	}
 }

+ 1 - 0
mec-im/src/main/java/com/ym/common/ErrorEnum.java

@@ -17,6 +17,7 @@ public enum ErrorEnum {
     ERR_IM_TOKEN_ERROR(10, "IM token error"),
     ERR_CREATE_ROOM_ERROR(11, "Create room error"),
     ERR_JOIN_ROOM_ERROR(12, "Join room error"),
+    JOIN_ROOM_ERROR(35, "Join room error"),
     ERR_MESSAGE_ERROR(13, "IM Message send error"),
 
 

+ 4 - 0
mec-im/src/main/java/com/ym/service/Impl/RoomServiceImpl.java

@@ -22,6 +22,7 @@ import com.ym.mec.biz.dal.entity.TeacherAttendance;
 import com.ym.mec.biz.dal.enums.GroupType;
 import com.ym.mec.biz.dal.enums.SignStatusEnum;
 import com.ym.mec.biz.dal.enums.StudentAttendanceStatusEnum;
+import com.ym.mec.biz.dal.enums.TeachModeEnum;
 import com.ym.mec.biz.service.StudentAttendanceService;
 import com.ym.mec.biz.service.SysConfigService;
 import com.ym.mec.biz.service.TeacherAttendanceService;
@@ -124,6 +125,9 @@ public class RoomServiceImpl implements RoomService {
         String userId = sysUser.getId().toString();
         Teacher teacher = teacherDao.get(Integer.parseInt(userId));
         CourseSchedule courseSchedule = courseScheduleDao.get(Long.parseLong(roomId));
+        if(courseSchedule.getTeachMode() == TeachModeEnum.OFFLINE){
+            throw new ApiException(ErrorEnum.JOIN_ROOM_ERROR, "加入房间失败,请前往线下教室");
+        }
         if(teacher != null && userId.equals(courseSchedule.getActualTeacherId())){
             courseScheduleStudentPaymentDao.adjustPlayMidi(Long.parseLong(roomId),null,null);
             userName = sysUser.getRealName();

+ 9 - 0
mec-teacher/src/main/java/com/ym/mec/teacher/controller/TeacherCourseScheduleController.java

@@ -4,6 +4,7 @@ import com.ym.mec.auth.api.client.SysUserFeignService;
 import com.ym.mec.auth.api.entity.SysUser;
 import com.ym.mec.biz.dal.dao.ClassGroupStudentMapperDao;
 import com.ym.mec.biz.dal.dao.StudentAttendanceDao;
+import com.ym.mec.biz.dal.dto.BatchInsertCoursesDto;
 import com.ym.mec.biz.dal.dto.ClassDateAdjustDto;
 import com.ym.mec.biz.dal.dto.CourseScheduleDto;
 import com.ym.mec.biz.dal.dto.TeacherRemarkCommitDto;
@@ -30,6 +31,7 @@ import io.swagger.annotations.ApiParam;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.http.HttpStatus;
 import org.springframework.http.MediaType;
+import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.web.bind.annotation.*;
 
 import java.text.SimpleDateFormat;
@@ -166,6 +168,13 @@ public class TeacherCourseScheduleController extends BaseController {
         return succeed(studentAttendanceService.getCurrentCourseStudents(queryInfo));
     }
 
+    @ApiOperation(value = "课程批量调整")
+    @PostMapping("/batchUpdateCourseSchedule")
+    public Object batchUpdateCourseSchedule(@RequestBody BatchInsertCoursesDto batchInsertCoursesDto){
+        scheduleService.batchUpdateCourseSchedule(batchInsertCoursesDto);
+        return succeed();
+    }
+
     @ApiOperation(value = "课时调整")
     @PostMapping(value = "/classStartDateAdjust",consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
     public Object classStartDateAdjust(ClassDateAdjustDto classDateAdjustDto){

+ 10 - 9
mec-util/src/main/java/com/ym/mec/util/excel/IniFileUtil.java

@@ -60,7 +60,7 @@ public class IniFileUtil {
      * @throws InvalidFileFormatException
      * @throws IOException
      */
-    public static Map<String,String> readIniFile(InputStream inputStream) throws InvalidFileFormatException, IOException {
+    public static Map<String,String> readIniFile(InputStream inputStream,String fileName) throws InvalidFileFormatException, IOException {
         Ini ini = new Ini();
         try {
             ini.load(inputStream);
@@ -70,14 +70,15 @@ public class IniFileUtil {
             inputStream.close();
         }
 
-        Collection<Section> sections = ini.values();
-        for (Section section : sections) {
-            Map<String,String> map = new HashMap<>(section.entrySet().size());
-            for (Entry<String, String> entry : section.entrySet()) {
-                map.put(entry.getKey(),entry.getValue());
-            }
-            return map;
+//        Collection<Section> sections = ini.values();
+        Section section = ini.get(fileName);
+//        for (Section section : sections) {
+        Map<String,String> map = new HashMap<>(section.entrySet().size());
+        for (Entry<String, String> entry : section.entrySet()) {
+            map.put(entry.getKey(),entry.getValue());
         }
-        return new HashMap<>();
+        return map;
+//        }
+//        return new HashMap<>();
     }
 }

+ 57 - 0
mec-web/src/main/java/com/ym/mec/web/controller/EmployeeInfoController.java

@@ -0,0 +1,57 @@
+package com.ym.mec.web.controller;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+
+import java.util.Date;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.GetMapping;
+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;
+
+import com.ym.mec.biz.dal.entity.EmployeeInfo;
+import com.ym.mec.biz.dal.page.EmployeeInfoQueryInfo;
+import com.ym.mec.biz.service.EmployeeInfoService;
+import com.ym.mec.common.controller.BaseController;
+
+@RequestMapping("employeeInfo")
+@Api(tags = "员工信息服务")
+@RestController
+public class EmployeeInfoController extends BaseController {
+
+    @Autowired
+    private EmployeeInfoService employeeInfoService;
+
+    @ApiOperation(value = "新增员工信息")
+    @PostMapping("/insert")
+    @PreAuthorize("@pcs.hasPermissions('employeeInfo/insert')")
+    public Object insert(@RequestBody EmployeeInfo employeeInfo) {
+    	Date date = new Date();
+    	employeeInfo.setUpdateTime(date);
+    	employeeInfo.setCreateTime(date);
+    	employeeInfoService.insert(employeeInfo);
+        return succeed();
+    }
+
+    @ApiOperation(value = "修改员工信息")
+    @PostMapping("/update")
+    @PreAuthorize("@pcs.hasPermissions('employeeInfo/update')")
+    public Object update(@RequestBody EmployeeInfo employeeInfo) {
+    	Date date = new Date();
+    	employeeInfo.setUpdateTime(date);
+    	employeeInfoService.update(employeeInfo);
+        return succeed();
+    }
+
+    @ApiOperation(value = "分页查询员工列表")
+    @GetMapping("/queryPage")
+    @PreAuthorize("@pcs.hasPermissions('employeeInfo/queryPage')")
+    public Object queryPage(EmployeeInfoQueryInfo queryInfo) {
+        return succeed(employeeInfoService.queryPage(queryInfo));
+    }
+
+}

+ 45 - 0
mec-web/src/main/java/com/ym/mec/web/controller/FinancialExpenditureController.java

@@ -0,0 +1,45 @@
+package com.ym.mec.web.controller;
+
+import com.ym.mec.biz.dal.entity.FinancialExpenditure;
+import com.ym.mec.biz.service.FinancialExpenditureService;
+import com.ym.mec.common.controller.BaseController;
+import com.ym.mec.common.page.QueryInfo;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+@RequestMapping("financialExpenditure")
+@Api(tags = "财务支出服务")
+@RestController
+public class FinancialExpenditureController extends BaseController {
+
+    @Autowired
+    private FinancialExpenditureService financialExpenditureService;
+
+    @ApiOperation(value = "修改财务支出")
+    @PostMapping("/update")
+    @PreAuthorize("@pcs.hasPermissions('financialExpenditure/update')")
+    public Object upSet(@RequestBody FinancialExpenditure financialExpenditure) {
+        financialExpenditureService.update(financialExpenditure);
+        return succeed();
+    }
+
+    @ApiOperation(value = "删除财务支出")
+    @PostMapping("/del/{id}")
+    @PreAuthorize("@pcs.hasPermissions('financialExpenditure/del')")
+    public Object del(@ApiParam(value = "财务支出编号", required = true) @PathVariable("id") Long id) {
+        financialExpenditureService.delete(id);
+        return succeed();
+    }
+
+    @ApiOperation(value = "分页查询财务支出列表")
+    @GetMapping("/queryPage")
+    @PreAuthorize("@pcs.hasPermissions('financialExpenditure/queryPage')")
+    public Object queryPage(QueryInfo queryInfo) {
+        return succeed(financialExpenditureService.queryPage(queryInfo));
+    }
+
+}

+ 29 - 7
mec-web/src/main/java/com/ym/mec/web/controller/ImportController.java

@@ -1,6 +1,8 @@
 package com.ym.mec.web.controller;
 
+import com.ym.mec.biz.dal.entity.FinancialExpenditure;
 import com.ym.mec.biz.dal.entity.Goods;
+import com.ym.mec.biz.service.FinancialExpenditureService;
 import com.ym.mec.biz.service.GoodsService;
 import com.ym.mec.common.controller.BaseController;
 import com.ym.mec.common.entity.HttpResponseResult;
@@ -28,23 +30,43 @@ public class ImportController extends BaseController {
 
     @Autowired
     private GoodsService goodsService;
+    @Autowired
+    private FinancialExpenditureService financialExpenditureService;
 
     @ApiOperation(value = "导入商品")
     @PostMapping(value = "goods")
     @PreAuthorize("@pcs.hasPermissions('import/goods')")
-    public HttpResponseResult<List<Goods>> importExamSong(@RequestParam("file") MultipartFile file) throws Exception {
+    public HttpResponseResult<List<Goods>> importGoods(@RequestParam("file") MultipartFile file) throws Exception {
         return succeed(goodsService.importGoods(file));
     }
 
-    @ApiOperation(value = "获取商品导入模板")
-    @GetMapping(value = "getGoodsTemplate")
-    @PreAuthorize("@pcs.hasPermissions('import/getGoodsTemplate')")
-    public void getGoodsTemplate(HttpServletResponse response) throws IOException {
-        InputStream inputStream = new ClassPathResource("excelTemplate/goods.xls").getInputStream();
+    @ApiOperation(value = "导入财务支出")
+    @PostMapping(value = "financialExpenditure")
+    @PreAuthorize("@pcs.hasPermissions('import/financialExpenditure')")
+    public HttpResponseResult<List<FinancialExpenditure>> importFinancialExpenditure(@RequestParam("file") MultipartFile file) throws Exception {
+        return succeed(financialExpenditureService.importFinancialExpenditure(file));
+    }
+
+    @ApiOperation(value = "下载导入模板")
+    @GetMapping(value = "downloadTemplate")
+    @PreAuthorize("@pcs.hasPermissions('import/downloadTemplate')")
+    public void getGoodsTemplate(HttpServletResponse response,String templateType) throws IOException {
+        String templateName = null;
+        switch (templateType){
+            case "goods":
+                templateName = "商品导入模板";
+                break;
+            case "financialExpenditure":
+                templateName = "财务支出导入模板";
+                break;
+            default:
+                templateName = "商品导入模板";
+        }
+        InputStream inputStream = new ClassPathResource("excelTemplate/" + templateName + ".xls").getInputStream();
         OutputStream outputStream = response.getOutputStream();
         try {
             response.setContentType("application/octet-stream");
-            response.setHeader("Content-Disposition", "attachment;filename=goods-" + DateUtil.getDate(new Date()) + ".xls");
+            response.setHeader("Content-Disposition", "attachment;filename=" + templateName + "-" + DateUtil.getDate(new Date()) + ".xls");
             response.flushBuffer();
             outputStream = response.getOutputStream();
             IOUtils.copy(inputStream, outputStream);

+ 24 - 0
mec-web/src/main/resources/columnMapper.ini

@@ -0,0 +1,24 @@
+[商品导入模板]
+品牌 = brand
+商品名称 = name
+商品类型 = type
+商品分类 = goodsCategoryName
+商品型号 = specification
+商品价格 = marketPrice
+商品团购价 = groupPurchasePrice
+商品采购价 = discountPrice
+商品图片(插入一张图片) = image
+商品描述 = desc
+协议成本价 = agreeCostPrice
+
+[财务支出导入模板]
+批次号 = batchNo
+财务流程编号 = financialProcessNo
+钉钉流程编号 = dingtalkProcessNo
+分部 = organName
+合作单位 = cooperationOrganName
+申请人(手机号) = phone
+费用 = amount
+费用明细 = itemDetail
+支付时间 = paymentTime
+事由 = cause

BIN
mec-web/src/main/resources/excelTemplate/商品导入模板.xls


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