修改桩停用,小程序登录
This commit is contained in:
parent
53144e3703
commit
dab198740f
@ -52,7 +52,7 @@ public interface XhpcTerminalMapper {
|
||||
* @param xhpcTerminal 终端
|
||||
* @return 结果
|
||||
*/
|
||||
int updateXhpcTerminal(XhpcTerminal xhpcTerminal);
|
||||
int updateXhpcTerminal(@Param("name") String name,@Param("serialNumber") String serialNumber,@Param("connectorType") Integer connectorType,@Param("status") Integer status,@Param("terminalId") Long terminalId);
|
||||
|
||||
/**
|
||||
* 添加终端
|
||||
|
||||
@ -31,7 +31,7 @@ public interface IXhpcTerminalService {
|
||||
* 停用
|
||||
* @return
|
||||
*/
|
||||
AjaxResult updateStatus(Long terminalId,Integer Status);
|
||||
AjaxResult updateStatus(Long terminalId,Integer status);
|
||||
|
||||
/**
|
||||
* 查询
|
||||
|
||||
@ -61,12 +61,11 @@ public class XhpcTerminalServiceImpl extends BaseService implements IXhpcTermina
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult updateStatus(Long terminalId, Integer Status) {
|
||||
public AjaxResult updateStatus(Long terminalId, Integer status) {
|
||||
|
||||
XhpcTerminal xhpcTerminal = new XhpcTerminal();
|
||||
xhpcTerminal.setTerminalId(terminalId);
|
||||
xhpcTerminal.setStatus(Status);
|
||||
xhpcTerminalMapper.updateXhpcTerminal(xhpcTerminal);
|
||||
System.out.println(">>>>>>>>>>terminalId>>>>>>>>>"+terminalId);
|
||||
System.out.println(">>>>>>>>>>status>>>>>>>>>"+status);
|
||||
xhpcTerminalMapper.updateXhpcTerminal(null,null,null,status,terminalId);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
@ -80,12 +79,8 @@ public class XhpcTerminalServiceImpl extends BaseService implements IXhpcTermina
|
||||
@Override
|
||||
public AjaxResult updateXhpcTerminalName(Long terminalId, String name, String serialNumber,int connectorType) {
|
||||
|
||||
XhpcTerminal xhpcTerminal = xhpcTerminalMapper.selectXhpcTerminalById(terminalId);
|
||||
xhpcTerminal.setName(name);
|
||||
xhpcTerminal.setSerialNumber(serialNumber);
|
||||
xhpcTerminal.setConnectorType(connectorType);
|
||||
xhpcTerminalMapper.updateXhpcTerminal(xhpcTerminal);
|
||||
return AjaxResult.success(null);
|
||||
xhpcTerminalMapper.updateXhpcTerminal(name,serialNumber,connectorType,null,terminalId);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -118,26 +118,22 @@
|
||||
where terminal_id = #{terminalId}
|
||||
</select>
|
||||
|
||||
<update id="updateXhpcTerminal" parameterType="com.xhpc.common.domain.XhpcTerminal">
|
||||
<update id="updateXhpcTerminal">
|
||||
update xhpc_terminal
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="chargingPileId != null">charging_pile_id = #{chargingPileId},</if>
|
||||
<if test="chargingStationId != null">charging_station_id = #{chargingStationId},</if>
|
||||
<if test="name != null">name = #{name},</if>
|
||||
<if test="serialNumber != null">serial_number = #{serialNumber},</if>
|
||||
<if test="pileSerialNumber != null">pile_serial_number = #{pileSerialNumber},</if>
|
||||
<if test="gunStatus != null">gun_status = #{gunStatus},</if>
|
||||
<if test="workStatus != null">work_status = #{workStatus},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="operatorIdEvcs != null">operator_id_evcs = #{operatorIdEvcs}</if>
|
||||
<if test="connectorType != null">connector_type = #{connectorType}</if>
|
||||
</trim>
|
||||
<set>
|
||||
<if test="name != null and name !=''">
|
||||
name = #{name},
|
||||
</if>
|
||||
<if test="serialNumber != null and serialNumber !=''">
|
||||
serial_number = #{serialNumber},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
status = #{status},
|
||||
</if>
|
||||
<if test="connectorType != null">
|
||||
connector_type = #{connectorType},
|
||||
</if>
|
||||
</set>
|
||||
where terminal_id = #{terminalId}
|
||||
</update>
|
||||
|
||||
|
||||
@ -10,73 +10,67 @@ import javax.persistence.*;
|
||||
* @author yuyang
|
||||
* @date 2021-07-20
|
||||
*/
|
||||
@Table(name = "xhpc_terminal")
|
||||
@Entity
|
||||
@Table(name = "xhpc_terminal")
|
||||
public class XhpcTerminal extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 终端id
|
||||
*/
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@Column(name = "terminal_id", nullable = false)
|
||||
private Long terminalId;
|
||||
|
||||
/** 电桩id */
|
||||
@Column(name = "charging_pile_id")
|
||||
|
||||
private Long chargingPileId;
|
||||
|
||||
/** 电站id */
|
||||
@Column(name = "charging_station_id")
|
||||
|
||||
private Long chargingStationId;
|
||||
|
||||
/** 名称 */
|
||||
@Column(name = "name")
|
||||
|
||||
private String name;
|
||||
|
||||
/** 编号 */
|
||||
@Column(name = "serial_number")
|
||||
|
||||
private String serialNumber;
|
||||
|
||||
/** 电桩编号 */
|
||||
@Column(name = "pile_serial_number")
|
||||
|
||||
private String pileSerialNumber;
|
||||
|
||||
/** 插枪状态 */
|
||||
@Column(name = "gun_status", nullable = true)
|
||||
|
||||
private Integer gunStatus;
|
||||
|
||||
/** 工作状态(0离线 1故障 2空闲 3充电) */
|
||||
@Column(name = "work_status", nullable = true)
|
||||
|
||||
private Integer workStatus;
|
||||
|
||||
/** 状态(0正常 1停用) */
|
||||
@Column(name = "status", nullable = true)
|
||||
|
||||
private Integer status;
|
||||
|
||||
/** 删除标志(0代表存在 2代表删除) */
|
||||
@Column(name = "del_flag", nullable = true)
|
||||
|
||||
private Integer delFlag;
|
||||
|
||||
/** 费率模型id */
|
||||
@Column(name = "rate_model_id")
|
||||
|
||||
private Long rateModelId;
|
||||
|
||||
@Column(name = "operator_id_evcs", nullable = true)
|
||||
|
||||
private String operatorIdEvcs;
|
||||
|
||||
/**
|
||||
* 充电设备类型
|
||||
*/
|
||||
@Column(name = "connector_type", nullable = true)
|
||||
|
||||
private Integer connectorType;
|
||||
|
||||
/**
|
||||
* 电桩统计数量
|
||||
*/
|
||||
@Column(name = "number", nullable = true)
|
||||
|
||||
private Integer number;
|
||||
|
||||
public int getConnectorType() {
|
||||
@ -103,12 +97,10 @@ public class XhpcTerminal extends BaseEntity {
|
||||
}
|
||||
|
||||
public Long getTerminalId() {
|
||||
|
||||
return terminalId;
|
||||
}
|
||||
|
||||
public void setTerminalId(Long terminalId) {
|
||||
|
||||
this.terminalId = terminalId;
|
||||
}
|
||||
|
||||
@ -222,4 +214,23 @@ public class XhpcTerminal extends BaseEntity {
|
||||
this.number = number;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "XhpcTerminal{" +
|
||||
"terminalId=" + terminalId +
|
||||
", chargingPileId=" + chargingPileId +
|
||||
", chargingStationId=" + chargingStationId +
|
||||
", name='" + name + '\'' +
|
||||
", serialNumber='" + serialNumber + '\'' +
|
||||
", pileSerialNumber='" + pileSerialNumber + '\'' +
|
||||
", gunStatus=" + gunStatus +
|
||||
", workStatus=" + workStatus +
|
||||
", status=" + status +
|
||||
", delFlag=" + delFlag +
|
||||
", rateModelId=" + rateModelId +
|
||||
", operatorIdEvcs='" + operatorIdEvcs + '\'' +
|
||||
", connectorType=" + connectorType +
|
||||
", number=" + number +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user