hangao
20918 5 months ago
parent e809daa7e6
commit 64852799e0

@ -2,6 +2,10 @@ package com.ruoyi.system.domain;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
@ -13,16 +17,20 @@ import com.ruoyi.common.core.domain.BaseEntity;
* @author ruoyi
* @date 2024-04-11
*/
@Data
@Getter
@Setter
@ToString
public class TdTrain extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** ID */
private Long ID;
private Long id;
/** 人员名称 */
@Excel(name = "人员名称")
private String USERNAME;
private String username;
/** 单位名称 */
@Excel(name = "单位名称")
@ -71,11 +79,11 @@ public class TdTrain extends BaseEntity
/** 所属地市 */
@Excel(name = "所属地市")
private String AREAID;
private String areaid;
/** 所属区县 */
@Excel(name = "所属区县")
private String FRAMEWORK;
private String framework;
/** 培训人员 */
@Excel(name = "培训人员")
@ -92,11 +100,11 @@ public class TdTrain extends BaseEntity
/** 部门 */
@Excel(name = "部门")
private String PART;
private String part;
/** 培训评价 */
@Excel(name = "培训评价")
private String TRAININFO;
private String traininfo;
public Long getDeptId() {
return deptId;
@ -111,211 +119,211 @@ public class TdTrain extends BaseEntity
*/
private Long deptId;
public void setID(Long ID)
{
this.ID = ID;
}
public Long getID()
{
return ID;
}
public void setUSERNAME(String USERNAME)
{
this.USERNAME = USERNAME;
}
public String getUSERNAME()
{
return USERNAME;
}
public void setDeptName(String deptName)
{
this.deptName = deptName;
}
public String getDeptName()
{
return deptName;
}
public void setTrainType(String trainType)
{
this.trainType = trainType;
}
public String getTrainType()
{
return trainType;
}
public void setTrainSubject(String trainSubject)
{
this.trainSubject = trainSubject;
}
public String getTrainSubject()
{
return trainSubject;
}
public void setTrainAddress(String trainAddress)
{
this.trainAddress = trainAddress;
}
public String getTrainAddress()
{
return trainAddress;
}
public void setTrainDate(Date trainDate)
{
this.trainDate = trainDate;
}
public Date getTrainDate()
{
return trainDate;
}
public void setCreateStaffid(String createStaffid)
{
this.createStaffid = createStaffid;
}
public String getCreateStaffid()
{
return createStaffid;
}
public void setCreateDepartid(String createDepartid)
{
this.createDepartid = createDepartid;
}
public String getCreateDepartid()
{
return createDepartid;
}
public void setCreateDate(Date createDate)
{
this.createDate = createDate;
}
public Date getCreateDate()
{
return createDate;
}
public void setUpdateDepartid(String updateDepartid)
{
this.updateDepartid = updateDepartid;
}
public String getUpdateDepartid()
{
return updateDepartid;
}
public void setUpdateStaffid(String updateStaffid)
{
this.updateStaffid = updateStaffid;
}
public String getUpdateStaffid()
{
return updateStaffid;
}
public void setUpdateDate(Date updateDate)
{
this.updateDate = updateDate;
}
public Date getUpdateDate()
{
return updateDate;
}
public void setAREAID(String AREAID)
{
this.AREAID = AREAID;
}
public String getAREAID()
{
return AREAID;
}
public void setFRAMEWORK(String FRAMEWORK)
{
this.FRAMEWORK = FRAMEWORK;
}
public String getFRAMEWORK()
{
return FRAMEWORK;
}
public void setTrainName(String trainName)
{
this.trainName = trainName;
}
public String getTrainName()
{
return trainName;
}
public void setTrainState(Long trainState)
{
this.trainState = trainState;
}
public Long getTrainState()
{
return trainState;
}
public void setTrainTimeend(Date trainTimeend)
{
this.trainTimeend = trainTimeend;
}
public Date getTrainTimeend()
{
return trainTimeend;
}
public void setPART(String PART)
{
this.PART = PART;
}
public String getPART()
{
return PART;
}
public void setTRAININFO(String TRAININFO)
{
this.TRAININFO = TRAININFO;
}
public String getTRAININFO()
{
return TRAININFO;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("ID", getID())
.append("USERNAME", getUSERNAME())
.append("deptName", getDeptName())
.append("trainType", getTrainType())
.append("trainSubject", getTrainSubject())
.append("trainAddress", getTrainAddress())
.append("trainDate", getTrainDate())
.append("createStaffid", getCreateStaffid())
.append("createDepartid", getCreateDepartid())
.append("createDate", getCreateDate())
.append("updateDepartid", getUpdateDepartid())
.append("updateStaffid", getUpdateStaffid())
.append("updateDate", getUpdateDate())
.append("AREAID", getAREAID())
.append("FRAMEWORK", getFRAMEWORK())
.append("trainName", getTrainName())
.append("trainState", getTrainState())
.append("trainTimeend", getTrainTimeend())
.append("PART", getPART())
.append("TRAININFO", getTRAININFO())
.append("deptId", getDeptId())
.toString();
}
// public void setID(Long ID)
// {
// this.ID = ID;
// }
//
// public Long getID()
// {
// return ID;
// }
// public void setUSERNAME(String USERNAME)
// {
// this.USERNAME = USERNAME;
// }
//
// public String getUSERNAME()
// {
// return USERNAME;
// }
// public void setDeptName(String deptName)
// {
// this.deptName = deptName;
// }
//
// public String getDeptName()
// {
// return deptName;
// }
// public void setTrainType(String trainType)
// {
// this.trainType = trainType;
// }
//
// public String getTrainType()
// {
// return trainType;
// }
// public void setTrainSubject(String trainSubject)
// {
// this.trainSubject = trainSubject;
// }
//
// public String getTrainSubject()
// {
// return trainSubject;
// }
// public void setTrainAddress(String trainAddress)
// {
// this.trainAddress = trainAddress;
// }
//
// public String getTrainAddress()
// {
// return trainAddress;
// }
// public void setTrainDate(Date trainDate)
// {
// this.trainDate = trainDate;
// }
//
// public Date getTrainDate()
// {
// return trainDate;
// }
// public void setCreateStaffid(String createStaffid)
// {
// this.createStaffid = createStaffid;
// }
//
// public String getCreateStaffid()
// {
// return createStaffid;
// }
// public void setCreateDepartid(String createDepartid)
// {
// this.createDepartid = createDepartid;
// }
//
// public String getCreateDepartid()
// {
// return createDepartid;
// }
// public void setCreateDate(Date createDate)
// {
// this.createDate = createDate;
// }
//
// public Date getCreateDate()
// {
// return createDate;
// }
// public void setUpdateDepartid(String updateDepartid)
// {
// this.updateDepartid = updateDepartid;
// }
//
// public String getUpdateDepartid()
// {
// return updateDepartid;
// }
// public void setUpdateStaffid(String updateStaffid)
// {
// this.updateStaffid = updateStaffid;
// }
//
// public String getUpdateStaffid()
// {
// return updateStaffid;
// }
// public void setUpdateDate(Date updateDate)
// {
// this.updateDate = updateDate;
// }
//
// public Date getUpdateDate()
// {
// return updateDate;
// }
// public void setAREAID(String AREAID)
// {
// this.AREAID = AREAID;
// }
//
// public String getAREAID()
// {
// return AREAID;
// }
// public void setFRAMEWORK(String FRAMEWORK)
// {
// this.FRAMEWORK = FRAMEWORK;
// }
//
// public String getFRAMEWORK()
// {
// return FRAMEWORK;
// }
// public void setTrainName(String trainName)
// {
// this.trainName = trainName;
// }
//
// public String getTrainName()
// {
// return trainName;
// }
// public void setTrainState(Long trainState)
// {
// this.trainState = trainState;
// }
//
// public Long getTrainState()
// {
// return trainState;
// }
// public void setTrainTimeend(Date trainTimeend)
// {
// this.trainTimeend = trainTimeend;
// }
//
// public Date getTrainTimeend()
// {
// return trainTimeend;
// }
// public void setPART(String PART)
// {
// this.PART = PART;
// }
//
// public String getPART()
// {
// return PART;
// }
// public void setTRAININFO(String TRAININFO)
// {
// this.TRAININFO = TRAININFO;
// }
//
// public String getTRAININFO()
// {
// return TRAININFO;
// }
//
// @Override
// public String toString() {
// return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
// .append("ID", getID())
// .append("USERNAME", getUSERNAME())
// .append("deptName", getDeptName())
// .append("trainType", getTrainType())
// .append("trainSubject", getTrainSubject())
// .append("trainAddress", getTrainAddress())
// .append("trainDate", getTrainDate())
// .append("createStaffid", getCreateStaffid())
// .append("createDepartid", getCreateDepartid())
// .append("createDate", getCreateDate())
// .append("updateDepartid", getUpdateDepartid())
// .append("updateStaffid", getUpdateStaffid())
// .append("updateDate", getUpdateDate())
// .append("AREAID", getAREAID())
// .append("FRAMEWORK", getFRAMEWORK())
// .append("trainName", getTrainName())
// .append("trainState", getTrainState())
// .append("trainTimeend", getTrainTimeend())
// .append("PART", getPART())
// .append("TRAININFO", getTRAININFO())
// .append("deptId", getDeptId())
// .toString();
// }
}

@ -5,93 +5,93 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<mapper namespace="com.ruoyi.system.mapper.TdTrainMapper">
<resultMap type="TdTrain" id="TdTrainResult">
<result property="ID" column="ID" />
<result property="USERNAME" column="USERNAME" />
<result property="deptName" column="DEPT_NAME" />
<result property="trainType" column="TRAIN_TYPE" />
<result property="trainSubject" column="TRAIN_SUBJECT" />
<result property="trainAddress" column="TRAIN_ADDRESS" />
<result property="trainDate" column="TRAIN_DATE" />
<result property="createStaffid" column="CREATE_STAFFID" />
<result property="createDepartid" column="CREATE_DEPARTID" />
<result property="createDate" column="CREATE_DATE" />
<result property="updateDepartid" column="UPDATE_DEPARTID" />
<result property="updateStaffid" column="UPDATE_STAFFID" />
<result property="updateDate" column="UPDATE_DATE" />
<result property="AREAID" column="AREAID" />
<result property="FRAMEWORK" column="FRAMEWORK" />
<result property="trainName" column="TRAIN_NAME" />
<result property="trainState" column="TRAIN_STATE" />
<result property="trainTimeend" column="TRAIN_TIMEEND" />
<result property="PART" column="PART" />
<result property="TRAININFO" column="TRAININFO" />
<result property="id" column="id" />
<result property="username" column="username" />
<result property="deptName" column="dept_name" />
<result property="trainType" column="train_type" />
<result property="trainSubject" column="train_subject" />
<result property="trainAddress" column="train_address" />
<result property="trainDate" column="train_date" />
<result property="createStaffid" column="create_staffid" />
<result property="createDepartid" column="create_departid" />
<result property="createDate" column="create_date" />
<result property="updateDepartid" column="update_departid" />
<result property="updateStaffid" column="update_staffid" />
<result property="updateDate" column="update_date" />
<result property="areaid" column="areaid" />
<result property="framework" column="framework" />
<result property="trainName" column="train_name" />
<result property="trainState" column="train_state" />
<result property="trainTimeend" column="train_timeend" />
<result property="part" column="part" />
<result property="traininfo" column="traininfo" />
<result property="deptId" column="dept_id" jdbcType="INTEGER"/>
</resultMap>
<sql id="selectTdTrainVo">
select ID, USERNAME, DEPT_NAME, TRAIN_TYPE, TRAIN_SUBJECT, TRAIN_ADDRESS, TRAIN_DATE, CREATE_STAFFID, CREATE_DEPARTID, CREATE_DATE, UPDATE_DEPARTID, UPDATE_STAFFID, UPDATE_DATE, AREAID, FRAMEWORK, TRAIN_NAME, TRAIN_STATE, TRAIN_TIMEEND, PART, TRAININFO,dept_id from td_train d
select id, username, dept_name, train_type, train_subject, train_address, train_date, create_staffid, create_departid, create_date, update_departid, update_staffid, update_date, areaid, framework, train_name, train_state, train_timeend, part, traininfo,dept_id from td_train d
</sql>
<select id="selectTdTrainList" parameterType="TdTrain" resultMap="TdTrainResult">
<include refid="selectTdTrainVo"/>
<where>
<if test="USERNAME != null and USERNAME != ''"> and USERNAME like concat('%', #{USERNAME}, '%')</if>
<if test="deptName != null and deptName != ''"> and DEPT_NAME like concat('%', #{deptName}, '%')</if>
<if test="trainType != null and trainType != ''"> and TRAIN_TYPE = #{trainType}</if>
<if test="trainSubject != null and trainSubject != ''"> and TRAIN_SUBJECT = #{trainSubject}</if>
<if test="trainAddress != null and trainAddress != ''"> and TRAIN_ADDRESS = #{trainAddress}</if>
<if test="trainDate != null "> and TRAIN_DATE = #{trainDate}</if>
<if test="createStaffid != null and createStaffid != ''"> and CREATE_STAFFID = #{createStaffid}</if>
<if test="createDepartid != null and createDepartid != ''"> and CREATE_DEPARTID = #{createDepartid}</if>
<if test="createDate != null "> and CREATE_DATE = #{createDate}</if>
<if test="updateDepartid != null and updateDepartid != ''"> and UPDATE_DEPARTID = #{updateDepartid}</if>
<if test="updateStaffid != null and updateStaffid != ''"> and UPDATE_STAFFID = #{updateStaffid}</if>
<if test="updateDate != null "> and UPDATE_DATE = #{updateDate}</if>
<if test="AREAID != null and AREAID != ''"> and AREAID = #{AREAID}</if>
<if test="FRAMEWORK != null and FRAMEWORK != ''"> and FRAMEWORK = #{FRAMEWORK}</if>
<if test="trainName != null and trainName != ''"> and TRAIN_NAME like concat('%', #{trainName}, '%')</if>
<if test="trainState != null "> and TRAIN_STATE = #{trainState}</if>
<if test="trainTimeend != null "> and TRAIN_TIMEEND = #{trainTimeend}</if>
<if test="PART != null and PART != ''"> and PART = #{PART}</if>
<if test="TRAININFO != null and TRAININFO != ''"> and TRAININFO = #{TRAININFO}</if>
<if test="username != null and username != ''"> and username like concat('%', #{USERNAME}, '%')</if>
<if test="deptName != null and deptName != ''"> and dept_name like concat('%', #{deptName}, '%')</if>
<if test="trainType != null and trainType != ''"> and train_type = #{trainType}</if>
<if test="trainSubject != null and trainSubject != ''"> and train_subject = #{trainSubject}</if>
<if test="trainAddress != null and trainAddress != ''"> and train_address = #{trainAddress}</if>
<if test="trainDate != null "> and train_date = #{trainDate}</if>
<if test="createStaffid != null and createStaffid != ''"> and create_staffid = #{createStaffid}</if>
<if test="createDepartid != null and createDepartid != ''"> and create_departid = #{createDepartid}</if>
<if test="createDate != null "> and create_date = #{createDate}</if>
<if test="updateDepartid != null and updateDepartid != ''"> and update_departid = #{updateDepartid}</if>
<if test="updateStaffid != null and updateStaffid != ''"> and update_staffid = #{updateStaffid}</if>
<if test="updateDate != null "> and update_date = #{updateDate}</if>
<if test="areaid != null and areaid != ''"> and areaid = #{areaid}</if>
<if test="framework != null and framework != ''"> and framework = #{framework}</if>
<if test="trainName != null and trainName != ''"> and train_name like concat('%', #{trainName}, '%')</if>
<if test="trainState != null "> and train_state = #{trainState}</if>
<if test="trainTimeend != null "> and train_timeend = #{trainTimeend}</if>
<if test="part != null and part != ''"> and part = #{part}</if>
<if test="traininfo != null and traininfo != ''"> and traininfo = #{traininfo}</if>
<if test="deptId != null and deptId != ''"> and dept_id = #{deptId}</if>
<!-- 数据范围过滤 -->
${params.dataScope}
</where>
order by CREATE_DATE desc
order by create_date desc
</select>
<select id="selectTdTrainByID" parameterType="Long" resultMap="TdTrainResult">
<include refid="selectTdTrainVo"/>
where ID = #{ID}
where id = #{id}
</select>
<insert id="insertTdTrain" parameterType="TdTrain" useGeneratedKeys="true" keyProperty="ID">
<insert id="insertTdTrain" parameterType="TdTrain" useGeneratedKeys="true" keyProperty="id">
insert into td_train
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="USERNAME != null">USERNAME,</if>
<if test="deptName != null">DEPT_NAME,</if>
<if test="trainType != null">TRAIN_TYPE,</if>
<if test="trainSubject != null">TRAIN_SUBJECT,</if>
<if test="trainAddress != null">TRAIN_ADDRESS,</if>
<if test="trainDate != null">TRAIN_DATE,</if>
<if test="createStaffid != null">CREATE_STAFFID,</if>
<if test="createDepartid != null">CREATE_DEPARTID,</if>
<if test="createDate != null">CREATE_DATE,</if>
<if test="updateDepartid != null">UPDATE_DEPARTID,</if>
<if test="updateStaffid != null">UPDATE_STAFFID,</if>
<if test="updateDate != null">UPDATE_DATE,</if>
<if test="AREAID != null and AREAID != ''">AREAID,</if>
<if test="FRAMEWORK != null">FRAMEWORK,</if>
<if test="trainName != null">TRAIN_NAME,</if>
<if test="trainState != null">TRAIN_STATE,</if>
<if test="trainTimeend != null">TRAIN_TIMEEND,</if>
<if test="PART != null">PART,</if>
<if test="TRAININFO != null">TRAININFO,</if>
<if test="username != null">username,</if>
<if test="deptName != null">dept_name,</if>
<if test="trainType != null">train_type,</if>
<if test="trainSubject != null">train_subject,</if>
<if test="trainAddress != null">train_address,</if>
<if test="trainDate != null">train_date,</if>
<if test="createStaffid != null">create_staffid,</if>
<if test="createDepartid != null">create_departid,</if>
<if test="createDate != null">create_date,</if>
<if test="updateDepartid != null">update_departid,</if>
<if test="updateStaffid != null">update_staffid,</if>
<if test="updateDate != null">update_date,</if>
<if test="areaid != null and areaid != ''">areaid,</if>
<if test="framework != null">framework,</if>
<if test="trainName != null">train_name,</if>
<if test="trainState != null">train_state,</if>
<if test="trainTimeend != null">train_timeend,</if>
<if test="part != null">part,</if>
<if test="traininfo != null">traininfo,</if>
<if test="deptId != null">dept_id,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="USERNAME != null">#{USERNAME},</if>
<if test="username != null">#{username},</if>
<if test="deptName != null">#{deptName},</if>
<if test="trainType != null">#{trainType},</if>
<if test="trainSubject != null">#{trainSubject},</if>
@ -103,13 +103,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateDepartid != null">#{updateDepartid},</if>
<if test="updateStaffid != null">#{updateStaffid},</if>
<if test="updateDate != null">#{updateDate},</if>
<if test="AREAID != null and AREAID != ''">#{AREAID},</if>
<if test="FRAMEWORK != null">#{FRAMEWORK},</if>
<if test="areaid != null and areaid != ''">#{areaid},</if>
<if test="framework != null">#{framework},</if>
<if test="trainName != null">#{trainName},</if>
<if test="trainState != null">#{trainState},</if>
<if test="trainTimeend != null">#{trainTimeend},</if>
<if test="PART != null">#{PART},</if>
<if test="TRAININFO != null">#{TRAININFO},</if>
<if test="part != null">#{part},</if>
<if test="traininfo != null">#{traininfo},</if>
<if test="deptId != null">#{deptId},</if>
</trim>
</insert>
@ -117,47 +117,47 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<update id="updateTdTrain" parameterType="TdTrain">
update td_train
<trim prefix="SET" suffixOverrides=",">
<if test="USERNAME != null">USERNAME = #{USERNAME},</if>
<if test="deptName != null">DEPT_NAME = #{deptName},</if>
<if test="trainType != null">TRAIN_TYPE = #{trainType},</if>
<if test="trainSubject != null">TRAIN_SUBJECT = #{trainSubject},</if>
<if test="trainAddress != null">TRAIN_ADDRESS = #{trainAddress},</if>
<if test="trainDate != null">TRAIN_DATE = #{trainDate},</if>
<if test="createStaffid != null">CREATE_STAFFID = #{createStaffid},</if>
<if test="createDepartid != null">CREATE_DEPARTID = #{createDepartid},</if>
<if test="createDate != null">CREATE_DATE = #{createDate},</if>
<if test="updateDepartid != null">UPDATE_DEPARTID = #{updateDepartid},</if>
<if test="updateStaffid != null">UPDATE_STAFFID = #{updateStaffid},</if>
<if test="updateDate != null">UPDATE_DATE = #{updateDate},</if>
<if test="AREAID != null and AREAID != ''">AREAID = #{AREAID},</if>
<if test="FRAMEWORK != null">FRAMEWORK = #{FRAMEWORK},</if>
<if test="trainName != null">TRAIN_NAME = #{trainName},</if>
<if test="trainState != null">TRAIN_STATE = #{trainState},</if>
<if test="trainTimeend != null">TRAIN_TIMEEND = #{trainTimeend},</if>
<if test="PART != null">PART = #{PART},</if>
<if test="TRAININFO != null">TRAININFO = #{TRAININFO},</if>
<if test="username != null">username = #{username},</if>
<if test="deptName != null">dept_name = #{deptName},</if>
<if test="trainType != null">train_type = #{trainType},</if>
<if test="trainSubject != null">train_subject = #{trainSubject},</if>
<if test="trainAddress != null">train_address = #{trainAddress},</if>
<if test="trainDate != null">train_date = #{trainDate},</if>
<if test="createStaffid != null">create_staffid = #{createStaffid},</if>
<if test="createDepartid != null">create_departid = #{createDepartid},</if>
<if test="createDate != null">create_date = #{createDate},</if>
<if test="updateDepartid != null">update_departid = #{updateDepartid},</if>
<if test="updateStaffid != null">update_staffid = #{updateStaffid},</if>
<if test="updateDate != null">update_date = #{updateDate},</if>
<if test="areaid != null and areaid != ''">areaid = #{areaid},</if>
<if test="framework != null">framework = #{framework},</if>
<if test="trainName != null">train_name = #{trainName},</if>
<if test="trainState != null">train_state = #{trainState},</if>
<if test="trainTimeend != null">train_timeend = #{trainTimeend},</if>
<if test="part != null">part = #{part},</if>
<if test="traininfo != null">traininfo = #{traininfo},</if>
<if test="deptId != null">dept_id = #{deptId},</if>
</trim>
where ID = #{ID}
where id = #{id}
</update>
<delete id="deleteTdTrainByID" parameterType="Long">
delete from td_train where ID = #{ID}
delete from td_train where id = #{id}
</delete>
<delete id="deleteTdTrainByIDs" parameterType="String">
delete from td_train where ID in
<foreach item="ID" collection="array" open="(" separator="," close=")">
#{ID}
delete from td_train where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
<select id="selectCountList" resultType="com.ruoyi.system.domain.count.TrainCountDTO">
SELECT
count(1) as total,
SUM (CASE WHEN TRAIN_STATE = 2 THEN 1 ELSE 0 END) AS dsh,
SUM (CASE WHEN TRAIN_STATE = 0 THEN 1 ELSE 0 END) AS shtg,
SUM (CASE WHEN TRAIN_STATE = 1 THEN 1 ELSE 0 END) AS shwtg
SUM (CASE WHEN train_state = 2 THEN 1 ELSE 0 END) AS dsh,
SUM (CASE WHEN train_state = 0 THEN 1 ELSE 0 END) AS shtg,
SUM (CASE WHEN train_state = 1 THEN 1 ELSE 0 END) AS shwtg
from td_train
</select>

Loading…
Cancel
Save