| | |
| | | import com.whyc.util.HttpUtil; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | return new Response().set(1,service.searchMaxDevId(devId)); |
| | | } |
| | | |
| | | @PutMapping("monCapWH") |
| | | @ApiModelProperty(value = "标称容量KWH修改",notes = "传入battGroupId和nomCapWH") |
| | | public Response updateMonCapWH(@RequestBody Battinf inf){ |
| | | return service.updateMonCapWH(inf); |
| | | } |
| | | |
| | | } |
| | |
| | | @TableField("cellShowType") |
| | | @ApiModelProperty(" 0:铅酸 1:锂电") |
| | | private Integer cellShowType; |
| | | |
| | | @TableField("NomCapWH") |
| | | @ApiModelProperty("标称容量[KWH]") |
| | | private Float nomCapWH; |
| | | @TableField("NomCapAH") |
| | | @ApiModelProperty("标称容量AH") |
| | | private Float nomCapAH; |
| | | } |
| | |
| | | queryWrapper.select("MonVolStd", "MonCount", "cellShowType").eq("BattGroupId", battGroupId); |
| | | return battInfMapper.selectOne(queryWrapper); |
| | | } |
| | | |
| | | public Response updateMonCapWH(Battinf inf) { |
| | | Float nomCapWH = inf.getNomCapWH(); |
| | | Float nomCapAH = nomCapWH/53.5f; |
| | | UpdateWrapper<Battinf> update = Wrappers.update(); |
| | | update.set("NomCapWH",nomCapWH).set("NomCapAH",nomCapAH).eq("battGroupId",inf.getBattGroupId()); |
| | | battInfMapper.update(null,update); |
| | | return new Response().setII(1,"修改完成"); |
| | | } |
| | | } |