bug修复
This commit is contained in:
parent
42c990fc28
commit
96163bc587
@ -147,4 +147,13 @@ public class GantryCraneAlarmController {
|
||||
return Result.success(gantryCraneAlarmService.countGantryCraneAlarmWindSpeed(map));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "查询最新一条龙门吊报警数据表信息", notes = "查询最新一条龙门吊报警数据表信息", httpMethod = "POST")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "devSn", value = "设备编号", dataType = "String", paramType = "body", required = false),
|
||||
@ApiImplicitParam(name = "projectSn", value = "项目sn", dataType = "String", paramType = "body", required = false),
|
||||
})
|
||||
@PostMapping(value = "/getNewestOne")
|
||||
public Result<GantryCraneAlarm> getNewestOne(@RequestBody @ApiIgnore Map<String, Object> map) {
|
||||
return Result.success(gantryCraneAlarmService.getNewestOne(map));
|
||||
}
|
||||
}
|
||||
|
||||
@ -28,4 +28,6 @@ public interface GantryCraneAlarmMapper extends BaseMapper<GantryCraneAlarm> {
|
||||
GantryCraneAlarmTypeBo countGantryCraneAlarmType(Map<String, Object> map);
|
||||
|
||||
List<TrendVo> countGantryCraneAlarmWindSpeed(Map<String, Object> map);
|
||||
|
||||
GantryCraneAlarm getNewestOne(Map<String, Object> map);
|
||||
}
|
||||
|
||||
@ -84,4 +84,17 @@
|
||||
</if>
|
||||
group by x
|
||||
</select>
|
||||
|
||||
<select id="getNewestOne" resultType="com.zhgd.xmgl.modules.bigdevice.entity.GantryCraneAlarm">
|
||||
select * from gantry_crane_alarm
|
||||
where 1=1
|
||||
<if test="projectSn != null and projectSn != ''">
|
||||
and project_sn = #{projectSn}
|
||||
</if>
|
||||
<if test="devSn != null and devSn != ''">
|
||||
and dev_sn = #{devSn}
|
||||
</if>
|
||||
order by add_time desc
|
||||
limit 1
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
@ -27,4 +27,6 @@ public interface IGantryCraneAlarmService extends IService<GantryCraneAlarm> {
|
||||
List<SectorOneVo> countGantryCraneAlarmType(Map<String, Object> map);
|
||||
|
||||
List<TrendVo> countGantryCraneAlarmWindSpeed(Map<String, Object> map);
|
||||
|
||||
GantryCraneAlarm getNewestOne(Map<String, Object> map);
|
||||
}
|
||||
|
||||
@ -104,4 +104,9 @@ public class GantryCraneAlarmServiceImpl extends ServiceImpl<GantryCraneAlarmMap
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public GantryCraneAlarm getNewestOne(Map<String, Object> map) {
|
||||
return baseMapper.getNewestOne(map);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,27 +1,23 @@
|
||||
package com.zhgd.xmgl.modules.rt.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.zhgd.jeecg.common.api.vo.Result;
|
||||
import com.zhgd.xmgl.modules.rt.entity.RtProgressPaymentContract;
|
||||
import com.zhgd.xmgl.modules.rt.entity.vo.CountRtProgressPaymentContractVo;
|
||||
import com.zhgd.xmgl.modules.rt.service.IRtProgressPaymentContractService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
import springfox.documentation.annotations.ApiIgnore;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.zhgd.jeecg.common.api.vo.Result;
|
||||
import org.apache.commons.collections.MapUtils;
|
||||
import com.zhgd.xmgl.modules.rt.service.IRtProgressPaymentContractService;
|
||||
|
||||
import org.simpleframework.xml.core.Validate;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.apache.commons.collections.MapUtils;
|
||||
import org.simpleframework.xml.core.Validate;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import springfox.documentation.annotations.ApiIgnore;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
@ -36,104 +32,110 @@ import org.springframework.web.bind.annotation.*;
|
||||
@Slf4j
|
||||
@Api(tags = "榕图-进度款合同相关Api")
|
||||
public class RtProgressPaymentContractController {
|
||||
@Autowired
|
||||
private IRtProgressPaymentContractService rtProgressPaymentContractService;
|
||||
@Autowired
|
||||
private IRtProgressPaymentContractService rtProgressPaymentContractService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "分页列表查询榕图-进度款合同信息", notes = "分页列表查询榕图-进度款合同信息", httpMethod = "GET")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "pageNo", value = "第几页", paramType = "query", required = true, dataType = "Integer"),
|
||||
@ApiImplicitParam(name = "pageSize", value = "每页显示条数", paramType = "query", required = true, dataType = "Integer"),
|
||||
})
|
||||
@GetMapping(value = "/page")
|
||||
public Result<IPage<RtProgressPaymentContract>> queryPageList(@ApiIgnore @RequestParam HashMap<String, Object> paramMap) {
|
||||
return Result.success(rtProgressPaymentContractService.queryPageList(paramMap));
|
||||
}
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "分页列表查询榕图-进度款合同信息", notes = "分页列表查询榕图-进度款合同信息", httpMethod = "GET")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "pageNo", value = "第几页", paramType = "query", required = true, dataType = "Integer"),
|
||||
@ApiImplicitParam(name = "pageSize", value = "每页显示条数", paramType = "query", required = true, dataType = "Integer"),
|
||||
})
|
||||
@GetMapping(value = "/page")
|
||||
public Result<IPage<RtProgressPaymentContract>> queryPageList(@ApiIgnore @RequestParam HashMap<String, Object> paramMap) {
|
||||
return Result.success(rtProgressPaymentContractService.queryPageList(paramMap));
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "列表查询榕图-进度款合同信息", notes = "列表查询榕图-进度款合同信息", httpMethod = "GET")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<RtProgressPaymentContract>> queryList(@ApiIgnore @RequestParam HashMap<String, Object> paramMap) {
|
||||
return Result.success(rtProgressPaymentContractService.queryList(paramMap));
|
||||
}
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "列表查询榕图-进度款合同信息", notes = "列表查询榕图-进度款合同信息", httpMethod = "GET")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<RtProgressPaymentContract>> queryList(@ApiIgnore @RequestParam HashMap<String, Object> paramMap) {
|
||||
return Result.success(rtProgressPaymentContractService.queryList(paramMap));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param rtProgressPaymentContract
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "添加榕图-进度款合同信息", notes = "添加榕图-进度款合同信息", httpMethod = "POST")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<RtProgressPaymentContract> add(@RequestBody @Validate RtProgressPaymentContract rtProgressPaymentContract) {
|
||||
rtProgressPaymentContractService.add(rtProgressPaymentContract);
|
||||
return Result.ok();
|
||||
}
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param rtProgressPaymentContract
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "添加榕图-进度款合同信息", notes = "添加榕图-进度款合同信息", httpMethod = "POST")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<RtProgressPaymentContract> add(@RequestBody @Validate RtProgressPaymentContract rtProgressPaymentContract) {
|
||||
rtProgressPaymentContractService.add(rtProgressPaymentContract);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param rtProgressPaymentContract
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "编辑榕图-进度款合同信息", notes = "编辑榕图-进度款合同信息", httpMethod = "POST")
|
||||
@PostMapping(value = "/edit")
|
||||
public Result<RtProgressPaymentContract> edit(@RequestBody RtProgressPaymentContract rtProgressPaymentContract) {
|
||||
rtProgressPaymentContractService.edit(rtProgressPaymentContract);
|
||||
return Result.ok();
|
||||
}
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param rtProgressPaymentContract
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "编辑榕图-进度款合同信息", notes = "编辑榕图-进度款合同信息", httpMethod = "POST")
|
||||
@PostMapping(value = "/edit")
|
||||
public Result<RtProgressPaymentContract> edit(@RequestBody RtProgressPaymentContract rtProgressPaymentContract) {
|
||||
rtProgressPaymentContractService.edit(rtProgressPaymentContract);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "删除榕图-进度款合同信息", notes = "删除榕图-进度款合同信息", httpMethod = "POST")
|
||||
@ApiImplicitParam(name = "id", value = "榕图-进度款合同ID", paramType = "body", required = true, dataType = "String", example = "{\"id\":\"1\"}")
|
||||
@PostMapping(value = "/delete")
|
||||
public Result<RtProgressPaymentContract> delete(@ApiIgnore @RequestBody HashMap<String, Object> map) {
|
||||
String id = MapUtils.getString(map, "id");
|
||||
Result<RtProgressPaymentContract> result = new Result<RtProgressPaymentContract>();
|
||||
RtProgressPaymentContract rtProgressPaymentContract = rtProgressPaymentContractService.getById(id);
|
||||
if (rtProgressPaymentContract == null) {
|
||||
result.error500("未找到对应实体");
|
||||
} else {
|
||||
boolean ok = rtProgressPaymentContractService.removeById(id);
|
||||
if (ok) {
|
||||
result.success("删除成功!");
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "删除榕图-进度款合同信息", notes = "删除榕图-进度款合同信息", httpMethod = "POST")
|
||||
@ApiImplicitParam(name = "id", value = "榕图-进度款合同ID", paramType = "body", required = true, dataType = "String", example = "{\"id\":\"1\"}")
|
||||
@PostMapping(value = "/delete")
|
||||
public Result<RtProgressPaymentContract> delete(@ApiIgnore @RequestBody HashMap<String, Object> map) {
|
||||
String id = MapUtils.getString(map, "id");
|
||||
Result<RtProgressPaymentContract> result = new Result<RtProgressPaymentContract>();
|
||||
RtProgressPaymentContract rtProgressPaymentContract = rtProgressPaymentContractService.getById(id);
|
||||
if (rtProgressPaymentContract == null) {
|
||||
result.error500("未找到对应实体");
|
||||
} else {
|
||||
boolean ok = rtProgressPaymentContractService.removeById(id);
|
||||
if (ok) {
|
||||
result.success("删除成功!");
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "通过id查询榕图-进度款合同信息", notes = "通过id查询榕图-进度款合同信息", httpMethod = "GET")
|
||||
@ApiImplicitParam(name = "id", value = "榕图-进度款合同ID", paramType = "query", required = true, dataType = "Integer")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<RtProgressPaymentContract> queryById(@RequestParam(name = "id", required = true) String id) {
|
||||
Result<RtProgressPaymentContract> result = new Result<RtProgressPaymentContract>();
|
||||
RtProgressPaymentContract rtProgressPaymentContract = rtProgressPaymentContractService.getById(id);
|
||||
if (rtProgressPaymentContract == null) {
|
||||
result.error500("未找到对应实体");
|
||||
} else {
|
||||
result.setResult(rtProgressPaymentContract);
|
||||
result.setSuccess(true);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "通过id查询榕图-进度款合同信息", notes = "通过id查询榕图-进度款合同信息", httpMethod = "GET")
|
||||
@ApiImplicitParam(name = "id", value = "榕图-进度款合同ID", paramType = "query", required = true, dataType = "Integer")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<RtProgressPaymentContract> queryById(@RequestParam(name = "id", required = true) String id) {
|
||||
Result<RtProgressPaymentContract> result = new Result<RtProgressPaymentContract>();
|
||||
RtProgressPaymentContract rtProgressPaymentContract = rtProgressPaymentContractService.getById(id);
|
||||
if (rtProgressPaymentContract == null) {
|
||||
result.error500("未找到对应实体");
|
||||
} else {
|
||||
result.setResult(rtProgressPaymentContract);
|
||||
result.setSuccess(true);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@ApiOperation(value = "统计榕图-进度款合同信息", notes = "统计榕图-进度款合同信息", httpMethod = "POST")
|
||||
@ApiImplicitParam(name = "projectSn", value = "项目sn", dataType = "String", paramType = "body", required = true)
|
||||
@PostMapping(value = "/countRtProgressPaymentContract")
|
||||
public Result<CountRtProgressPaymentContractVo> countRtProgressPaymentContract(@ApiIgnore @RequestBody HashMap<String, Object> map) {
|
||||
return Result.success(rtProgressPaymentContractService.countRtProgressPaymentContract(map));
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,10 @@
|
||||
package com.zhgd.xmgl.modules.rt.entity.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class CountRtProgressPaymentContractVo {
|
||||
@ApiModelProperty("合同总金额")
|
||||
private Double totalContractPrice;
|
||||
}
|
||||
@ -1,9 +1,12 @@
|
||||
package com.zhgd.xmgl.modules.rt.mapper;
|
||||
|
||||
import com.zhgd.xmgl.modules.rt.entity.RtProgressPaymentContract;
|
||||
import com.zhgd.xmgl.modules.rt.entity.vo.CountRtProgressPaymentContractVo;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
/**
|
||||
* @Description: 榕图-进度款合同
|
||||
* @author: pds
|
||||
@ -13,4 +16,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
@Mapper
|
||||
public interface RtProgressPaymentContractMapper extends BaseMapper<RtProgressPaymentContract> {
|
||||
|
||||
CountRtProgressPaymentContractVo countRtProgressPaymentContract(HashMap<String, Object> map);
|
||||
}
|
||||
|
||||
@ -1,4 +1,10 @@
|
||||
<?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.zhgd.xmgl.modules.rt.mapper.RtProgressPaymentContractMapper">
|
||||
<select id="countRtProgressPaymentContract"
|
||||
resultType="com.zhgd.xmgl.modules.rt.entity.vo.CountRtProgressPaymentContractVo">
|
||||
select ifnull(round(sum(total_contract_price),2),0) totalContractPrice
|
||||
from rt_progress_payment_contract
|
||||
where project_sn=#{projectSn}
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
@ -3,6 +3,7 @@ package com.zhgd.xmgl.modules.rt.service;
|
||||
import com.zhgd.xmgl.modules.rt.entity.RtProgressPaymentContract;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.zhgd.xmgl.modules.rt.entity.vo.CountRtProgressPaymentContractVo;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
@ -22,4 +23,6 @@ public interface IRtProgressPaymentContractService extends IService<RtProgressPa
|
||||
void add(RtProgressPaymentContract rtProgressPaymentContract);
|
||||
|
||||
void edit(RtProgressPaymentContract rtProgressPaymentContract);
|
||||
|
||||
CountRtProgressPaymentContractVo countRtProgressPaymentContract(HashMap<String, Object> map);
|
||||
}
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
package com.zhgd.xmgl.modules.rt.service.impl;
|
||||
|
||||
import com.zhgd.xmgl.modules.rt.entity.RtProgressPaymentContract;
|
||||
import com.zhgd.xmgl.modules.rt.entity.vo.CountRtProgressPaymentContractVo;
|
||||
import com.zhgd.xmgl.modules.rt.mapper.RtProgressPaymentContractMapper;
|
||||
import com.zhgd.xmgl.modules.rt.service.IRtProgressPaymentContractService;
|
||||
import org.springframework.stereotype.Service;
|
||||
@ -66,4 +67,9 @@ public class RtProgressPaymentContractServiceImpl extends ServiceImpl<RtProgress
|
||||
public void edit(RtProgressPaymentContract rtProgressPaymentContract) {
|
||||
baseMapper.updateById(rtProgressPaymentContract);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CountRtProgressPaymentContractVo countRtProgressPaymentContract(HashMap<String, Object> map) {
|
||||
return baseMapper.countRtProgressPaymentContract(map);
|
||||
}
|
||||
}
|
||||
|
||||
@ -284,6 +284,10 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
|
||||
.antMatchers("/xmgl/workerInfo/getWorkerStatisticsCount").permitAll()
|
||||
.antMatchers("/xmgl/environmentDev/updateEnvironmentDevSprayStatus").permitAll()
|
||||
.antMatchers("/xmgl/aiAnalyseHardWareAlarmRecord/violatorListSort").permitAll()
|
||||
.antMatchers("/xmgl/rtMaterialOrder/page").permitAll()
|
||||
.antMatchers("/xmgl/rtDesignChangeContactSheet/page").permitAll()
|
||||
.antMatchers("/xmgl/rtProgressPaymentContract/page").permitAll()
|
||||
.antMatchers("/xmgl/rtProgressPaymentContract/countRtProgressPaymentContract").permitAll()
|
||||
.antMatchers(HttpMethod.OPTIONS, "/**").anonymous()
|
||||
.anyRequest().authenticated() // 剩下所有的验证都需要验证
|
||||
.and()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user