zouxuan 4 лет назад
Родитель
Сommit
1471d02085

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

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

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

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

+ 136 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/ReplacementInstrument.java

@@ -0,0 +1,136 @@
+package com.ym.mec.biz.dal.entity;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+
+/**
+ * 对应数据库表(replacement_instrument):
+ */
+public class ReplacementInstrument {
+
+	/**  */
+	private Integer id;
+	
+	/**  */
+	private Integer subjectId;
+	
+	/** 品牌 */
+	private String brand;
+	
+	/** 型号 */
+	private String specification;
+	
+	/** 配置 */
+	private String param;
+	
+	/** 市场价 */
+	private java.math.BigDecimal marketPrice;
+	
+	/** 优惠价 */
+	private java.math.BigDecimal discountPrice;
+	
+	/** 折旧价 */
+	private java.math.BigDecimal depreciationPrice;
+	
+	/** 销售价 */
+	private java.math.BigDecimal salePrice;
+	
+	/**  */
+	private java.util.Date createTime;
+	
+	/**  */
+	private java.util.Date updateTime;
+	
+	public void setId(Integer id){
+		this.id = id;
+	}
+	
+	public Integer getId(){
+		return this.id;
+	}
+			
+	public void setSubjectId(Integer subjectId){
+		this.subjectId = subjectId;
+	}
+	
+	public Integer getSubjectId(){
+		return this.subjectId;
+	}
+			
+	public void setBrand(String brand){
+		this.brand = brand;
+	}
+	
+	public String getBrand(){
+		return this.brand;
+	}
+			
+	public void setSpecification(String specification){
+		this.specification = specification;
+	}
+	
+	public String getSpecification(){
+		return this.specification;
+	}
+			
+	public void setParam(String param){
+		this.param = param;
+	}
+	
+	public String getParam(){
+		return this.param;
+	}
+			
+	public void setMarketPrice(java.math.BigDecimal marketPrice){
+		this.marketPrice = marketPrice;
+	}
+	
+	public java.math.BigDecimal getMarketPrice(){
+		return this.marketPrice;
+	}
+			
+	public void setDiscountPrice(java.math.BigDecimal discountPrice){
+		this.discountPrice = discountPrice;
+	}
+	
+	public java.math.BigDecimal getDiscountPrice(){
+		return this.discountPrice;
+	}
+			
+	public void setDepreciationPrice(java.math.BigDecimal depreciationPrice){
+		this.depreciationPrice = depreciationPrice;
+	}
+	
+	public java.math.BigDecimal getDepreciationPrice(){
+		return this.depreciationPrice;
+	}
+			
+	public void setSalePrice(java.math.BigDecimal salePrice){
+		this.salePrice = salePrice;
+	}
+	
+	public java.math.BigDecimal getSalePrice(){
+		return this.salePrice;
+	}
+			
+	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);
+	}
+
+}

+ 147 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/ReplacementInstrumentActivity.java

@@ -0,0 +1,147 @@
+package com.ym.mec.biz.dal.entity;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+
+/**
+ * 对应数据库表(replacement_instrument_activity):
+ */
+public class ReplacementInstrumentActivity {
+
+	/**  */
+	private Integer id;
+	
+	/** 合作单位 */
+	private Integer cooperationOrganId;
+	
+	/**  */
+	private Integer userId;
+	
+	/**  */
+	private String userName;
+	
+	/**  */
+	private String grade;
+	
+	/**  */
+	private String classes;
+	
+	/**  */
+	private String mobileNo;
+	
+	/**  */
+	private Integer subjectId;
+	
+	/** 问卷结果,一题占1位,按顺序,例如110;1-是,0-否 */
+	private String questionResult;
+	
+	/** 乐器编号 */
+	private Integer instrumentsId;
+	
+	/**  */
+	private java.util.Date createTime;
+	
+	/**  */
+	private java.util.Date updateTime;
+	
+	public void setId(Integer id){
+		this.id = id;
+	}
+	
+	public Integer getId(){
+		return this.id;
+	}
+			
+	public void setCooperationOrganId(Integer cooperationOrganId){
+		this.cooperationOrganId = cooperationOrganId;
+	}
+	
+	public Integer getCooperationOrganId(){
+		return this.cooperationOrganId;
+	}
+			
+	public void setUserId(Integer userId){
+		this.userId = userId;
+	}
+	
+	public Integer getUserId(){
+		return this.userId;
+	}
+			
+	public void setUserName(String userName){
+		this.userName = userName;
+	}
+	
+	public String getUserName(){
+		return this.userName;
+	}
+			
+	public void setGrade(String grade){
+		this.grade = grade;
+	}
+	
+	public String getGrade(){
+		return this.grade;
+	}
+			
+	public void setClasses(String classes){
+		this.classes = classes;
+	}
+	
+	public String getClasses(){
+		return this.classes;
+	}
+			
+	public void setMobileNo(String mobileNo){
+		this.mobileNo = mobileNo;
+	}
+	
+	public String getMobileNo(){
+		return this.mobileNo;
+	}
+			
+	public void setSubjectId(Integer subjectId){
+		this.subjectId = subjectId;
+	}
+	
+	public Integer getSubjectId(){
+		return this.subjectId;
+	}
+			
+	public void setQuestionResult(String questionResult){
+		this.questionResult = questionResult;
+	}
+	
+	public String getQuestionResult(){
+		return this.questionResult;
+	}
+			
+	public void setInstrumentsId(Integer instrumentsId){
+		this.instrumentsId = instrumentsId;
+	}
+	
+	public Integer getInstrumentsId(){
+		return this.instrumentsId;
+	}
+			
+	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);
+	}
+
+}

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

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

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

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

+ 22 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/impl/ReplacementInstrumentActivityServiceImpl.java

@@ -0,0 +1,22 @@
+package com.ym.mec.biz.service.impl;
+
+import com.ym.mec.common.dal.BaseDAO;
+import com.ym.mec.common.service.impl.BaseServiceImpl;
+import org.springframework.beans.factory.annotation.Autowired;
+import com.ym.mec.biz.dal.entity.ReplacementInstrumentActivity;
+import com.ym.mec.biz.service.ReplacementInstrumentActivityService;
+import com.ym.mec.biz.dal.dao.ReplacementInstrumentActivityDao;
+import org.springframework.stereotype.Service;
+
+@Service
+public class ReplacementInstrumentActivityServiceImpl extends BaseServiceImpl<Integer, ReplacementInstrumentActivity> implements ReplacementInstrumentActivityService {
+	
+	@Autowired
+	private ReplacementInstrumentActivityDao replacementInstrumentActivityDao;
+
+	@Override
+	public BaseDAO<Integer, ReplacementInstrumentActivity> getDAO() {
+		return replacementInstrumentActivityDao;
+	}
+	
+}

+ 22 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/impl/ReplacementInstrumentServiceImpl.java

@@ -0,0 +1,22 @@
+package com.ym.mec.biz.service.impl;
+
+import com.ym.mec.common.dal.BaseDAO;
+import com.ym.mec.common.service.impl.BaseServiceImpl;
+import org.springframework.beans.factory.annotation.Autowired;
+import com.ym.mec.biz.dal.entity.ReplacementInstrument;
+import com.ym.mec.biz.service.ReplacementInstrumentService;
+import com.ym.mec.biz.dal.dao.ReplacementInstrumentDao;
+import org.springframework.stereotype.Service;
+
+@Service
+public class ReplacementInstrumentServiceImpl extends BaseServiceImpl<Integer, ReplacementInstrument> implements ReplacementInstrumentService {
+
+	@Autowired
+	private ReplacementInstrumentDao replacementInstrumentDao;
+
+	@Override
+	public BaseDAO<Integer, ReplacementInstrument> getDAO() {
+		return replacementInstrumentDao;
+	}
+
+}

+ 90 - 0
mec-biz/src/main/resources/config/mybatis/ReplacementInstrumentActivityMapper.xml

@@ -0,0 +1,90 @@
+<?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.ReplacementInstrumentActivityDao">
+	
+	<resultMap type="com.ym.mec.biz.dal.entity.ReplacementInstrumentActivity" id="ReplacementInstrumentActivity">
+		<result column="id_" property="id" />
+		<result column="cooperation_organ_id_" property="cooperationOrganId" />
+		<result column="user_id_" property="userId" />
+		<result column="user_name_" property="userName" />
+		<result column="grade_" property="grade" />
+		<result column="classes_" property="classes" />
+		<result column="mobile_no_" property="mobileNo" />
+		<result column="subject_id_" property="subjectId" />
+		<result column="question_result_" property="questionResult" />
+		<result column="instruments_id_" property="instrumentsId" />
+		<result column="create_time_" property="createTime" />
+		<result column="update_time_" property="updateTime" />
+	</resultMap>
+	
+	<!-- 根据主键查询一条记录 -->
+	<select id="get" resultMap="ReplacementInstrumentActivity" >
+		SELECT * FROM replacement_instrument_activity WHERE id_ = #{id} 
+	</select>
+	
+	<!-- 全查询 -->
+	<select id="findAll" resultMap="ReplacementInstrumentActivity">
+		SELECT * FROM replacement_instrument_activity ORDER BY id_
+	</select>
+	
+	<!-- 向数据库增加一条记录 -->
+	<insert id="insert" parameterType="com.ym.mec.biz.dal.entity.ReplacementInstrumentActivity" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
+		INSERT INTO replacement_instrument_activity (cooperation_organ_id_,user_id_,user_name_,grade_,classes_,mobile_no_,subject_id_,question_result_,instruments_id_,create_time_,update_time_)
+		VALUES(#{cooperationOrganId},#{userId},#{userName},#{grade},#{classes},#{mobileNo},#{subjectId},#{questionResult},#{instrumentsId},NOW(),NOW())
+	</insert>
+	
+	<!-- 根据主键查询一条记录 -->
+	<update id="update" parameterType="com.ym.mec.biz.dal.entity.ReplacementInstrumentActivity">
+		UPDATE replacement_instrument_activity <set>
+		<if test="subjectId != null">
+		subject_id_ = #{subjectId},
+		</if>
+		<if test="userId != null">
+		user_id_ = #{userId},
+		</if>
+		<if test="cooperationOrganId != null">
+		cooperation_organ_id_ = #{cooperationOrganId},
+		</if>
+		<if test="userName != null">
+		user_name_ = #{userName},
+		</if>
+		<if test="questionResult != null">
+		question_result_ = #{questionResult},
+		</if>
+		<if test="updateTime != null">
+		update_time_ = #{updateTime},
+		</if>
+		<if test="instrumentsId != null">
+		instruments_id_ = #{instrumentsId},
+		</if>
+		<if test="mobileNo != null">
+		mobile_no_ = #{mobileNo},
+		</if>
+		<if test="classes != null">
+		classes_ = #{classes},
+		</if>
+		<if test="grade != null">
+		grade_ = #{grade},
+		</if>
+		</set> WHERE id_ = #{id}
+	</update>
+	
+	<!-- 根据主键删除一条记录 -->
+	<delete id="delete" >
+		DELETE FROM replacement_instrument_activity WHERE id_ = #{id} 
+	</delete>
+	
+	<!-- 分页查询 -->
+	<select id="queryPage" resultMap="ReplacementInstrumentActivity" parameterType="map">
+		SELECT * FROM replacement_instrument_activity ORDER BY id_ <include refid="global.limit"/>
+	</select>
+	
+	<!-- 查询当前表的总记录数 -->
+	<select id="queryCount" resultType="int">
+		SELECT COUNT(*) FROM replacement_instrument_activity
+	</select>
+</mapper>

+ 86 - 0
mec-biz/src/main/resources/config/mybatis/ReplacementInstrumentMapper.xml

@@ -0,0 +1,86 @@
+<?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.ReplacementInstrumentDao">
+	
+	<resultMap type="com.ym.mec.biz.dal.entity.ReplacementInstrument" id="ReplacementInstrument">
+		<result column="id_" property="id" />
+		<result column="subject_id_" property="subjectId" />
+		<result column="brand_" property="brand" />
+		<result column="specification_" property="specification" />
+		<result column="param_" property="param" />
+		<result column="market_price_" property="marketPrice" />
+		<result column="discount_price_" property="discountPrice" />
+		<result column="depreciation_price_" property="depreciationPrice" />
+		<result column="sale_price_" property="salePrice" />
+		<result column="create_time_" property="createTime" />
+		<result column="update_time_" property="updateTime" />
+	</resultMap>
+
+	<!-- 根据主键查询一条记录 -->
+	<select id="get" resultMap="ReplacementInstrument" >
+		SELECT * FROM replacement_instrument WHERE id_ = #{id}
+	</select>
+	
+	
+	<!-- 全查询 -->
+	<select id="findAll" resultMap="ReplacementInstrument">
+		SELECT * FROM replacement_instrument
+	</select>
+	
+	<!-- 向数据库增加一条记录 -->
+	<insert id="insert" parameterType="com.ym.mec.biz.dal.entity.ReplacementInstrument" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
+		INSERT INTO replacement_instrument (subject_id_,brand_,specification_,param_,market_price_,discount_price_,depreciation_price_,sale_price_,create_time_,update_time_)
+		VALUES(#{subjectId},#{brand},#{specification},#{param},#{marketPrice},#{discountPrice},#{depreciationPrice},#{salePrice},NOW(),NOW())
+	</insert>
+
+	<update id="update" parameterType="com.ym.mec.biz.dal.entity.ReplacementInstrument">
+		UPDATE replacement_instrument <set>
+		<if test="subjectId != null">
+			subject_id_ = #{subjectId},
+		</if>
+		<if test="brand != null">
+			brand_ = #{brand},
+		</if>
+		<if test="specification != null">
+			specification_ = #{specification},
+		</if>
+		<if test="param != null">
+			param_ = #{param},
+		</if>
+		<if test="marketPrice != null">
+			market_price_ = #{marketPrice},
+		</if>
+		<if test="discountPrice != null">
+			discount_price_ = #{discountPrice},
+		</if>
+		<if test="depreciationPrice != null">
+			depreciation_price_ = #{depreciationPrice},
+		</if>
+		<if test="salePrice != null">
+			sale_price_ = #{salePrice},
+		</if>
+		<if test="updateTime != null">
+			update_time_ = #{updateTime},
+		</if>
+	</set> WHERE id_ = #{id}
+	</update>
+
+	<!-- 根据主键删除一条记录 -->
+	<delete id="delete" >
+		DELETE FROM replacement_instrument_activity WHERE id_ = #{id}
+	</delete>
+
+	<!-- 分页查询 -->
+	<select id="queryPage" resultMap="ReplacementInstrument" parameterType="map">
+		SELECT * FROM replacement_instrument <include refid="global.limit"/>
+	</select>
+	
+	<!-- 查询当前表的总记录数 -->
+	<select id="queryCount" resultType="int">
+		SELECT COUNT(*) FROM replacement_instrument
+	</select>
+</mapper>

+ 18 - 0
mec-web/src/main/java/com/ym/mec/web/controller/ReplacementInstrumentActivityController.java

@@ -0,0 +1,18 @@
+package com.ym.mec.web.controller;
+
+import com.ym.mec.biz.service.ReplacementInstrumentActivityService;
+import com.ym.mec.common.controller.BaseController;
+import io.swagger.annotations.Api;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+@RequestMapping("replacementInstrumentActivity")
+@Api(tags = "收费类型服务")
+@RestController
+public class ReplacementInstrumentActivityController extends BaseController {
+
+    @Autowired
+    private ReplacementInstrumentActivityService replacementInstrumentActivityService;
+
+}

+ 17 - 0
mec-web/src/main/java/com/ym/mec/web/controller/ReplacementInstrumentController.java

@@ -0,0 +1,17 @@
+package com.ym.mec.web.controller;
+
+import com.ym.mec.biz.service.ReplacementInstrumentService;
+import com.ym.mec.common.controller.BaseController;
+import io.swagger.annotations.Api;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+@RequestMapping("replacementInstrument")
+@Api(tags = "收费类型服务")
+@RestController
+public class ReplacementInstrumentController extends BaseController {
+
+    @Autowired
+    private ReplacementInstrumentService replacementInstrumentService;
+
+}