添加流量计水价字段
This commit is contained in:
parent
eaca8abe80
commit
835a7bbaeb
@ -262,5 +262,34 @@ public class DeviceReportInfoController extends BaseController
|
|||||||
}
|
}
|
||||||
return AjaxResult.success("更新成功!");
|
return AjaxResult.success("更新成功!");
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 查询流量计水单价
|
||||||
|
*/
|
||||||
|
@GetMapping("/get/waterFree")
|
||||||
|
public AjaxResult getWaterPrice(String deviceNumber){
|
||||||
|
List<DeviceReportInfo> list = new LambdaQueryChainWrapper<>(deviceReportInfoMapper)
|
||||||
|
.select(DeviceReportInfo::getWaterFree)
|
||||||
|
.eq(DeviceReportInfo::getSerialNumber, deviceNumber)
|
||||||
|
.list();
|
||||||
|
if(!list.isEmpty()){
|
||||||
|
return AjaxResult.success(list.get(0).getWaterFree());
|
||||||
|
}
|
||||||
|
return AjaxResult.error("设备不存在!");
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 更新流量计水单价
|
||||||
|
*/
|
||||||
|
@PostMapping("/update/waterFree")
|
||||||
|
public AjaxResult updateWaterPrice(String deviceNumber,String waterFree){
|
||||||
|
boolean update = new LambdaUpdateChainWrapper<>(deviceReportInfoMapper)
|
||||||
|
.set(DeviceReportInfo::getWaterFree, waterFree)
|
||||||
|
.eq(DeviceReportInfo::getSerialNumber, deviceNumber)
|
||||||
|
.update();
|
||||||
|
if(!update){
|
||||||
|
return AjaxResult.error("更新失败!");
|
||||||
|
}
|
||||||
|
return AjaxResult.success("更新成功!");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -11,6 +11,7 @@ import lombok.EqualsAndHashCode;
|
|||||||
import com.fastbee.common.annotation.Excel;
|
import com.fastbee.common.annotation.Excel;
|
||||||
import com.fastbee.common.core.domain.BaseEntity;
|
import com.fastbee.common.core.domain.BaseEntity;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -185,6 +186,10 @@ public class DeviceReportInfo extends BaseEntity
|
|||||||
@ApiModelProperty("流量计型号1管段式2卡片式")
|
@ApiModelProperty("流量计型号1管段式2卡片式")
|
||||||
private Integer flowModel;
|
private Integer flowModel;
|
||||||
|
|
||||||
|
/** 水价单位元 */
|
||||||
|
@Excel(name = "水价单位元")
|
||||||
|
@ApiModelProperty("水价单位元")
|
||||||
|
private BigDecimal waterFree;
|
||||||
//----------------------------------------------------------业务字段-----------------------------------------------------------
|
//----------------------------------------------------------业务字段-----------------------------------------------------------
|
||||||
/** 是否自动审核 */
|
/** 是否自动审核 */
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user