bug修复

This commit is contained in:
guo 2023-12-28 15:32:31 +08:00
parent 42c990fc28
commit 96163bc587
12 changed files with 173 additions and 107 deletions

View File

@ -147,4 +147,13 @@ public class GantryCraneAlarmController {
return Result.success(gantryCraneAlarmService.countGantryCraneAlarmWindSpeed(map)); 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));
}
} }

View File

@ -28,4 +28,6 @@ public interface GantryCraneAlarmMapper extends BaseMapper<GantryCraneAlarm> {
GantryCraneAlarmTypeBo countGantryCraneAlarmType(Map<String, Object> map); GantryCraneAlarmTypeBo countGantryCraneAlarmType(Map<String, Object> map);
List<TrendVo> countGantryCraneAlarmWindSpeed(Map<String, Object> map); List<TrendVo> countGantryCraneAlarmWindSpeed(Map<String, Object> map);
GantryCraneAlarm getNewestOne(Map<String, Object> map);
} }

View File

@ -84,4 +84,17 @@
</if> </if>
group by x group by x
</select> </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> </mapper>

View File

@ -27,4 +27,6 @@ public interface IGantryCraneAlarmService extends IService<GantryCraneAlarm> {
List<SectorOneVo> countGantryCraneAlarmType(Map<String, Object> map); List<SectorOneVo> countGantryCraneAlarmType(Map<String, Object> map);
List<TrendVo> countGantryCraneAlarmWindSpeed(Map<String, Object> map); List<TrendVo> countGantryCraneAlarmWindSpeed(Map<String, Object> map);
GantryCraneAlarm getNewestOne(Map<String, Object> map);
} }

View File

@ -104,4 +104,9 @@ public class GantryCraneAlarmServiceImpl extends ServiceImpl<GantryCraneAlarmMap
} }
return null; return null;
} }
@Override
public GantryCraneAlarm getNewestOne(Map<String, Object> map) {
return baseMapper.getNewestOne(map);
}
} }

View File

@ -1,27 +1,23 @@
package com.zhgd.xmgl.modules.rt.controller; 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.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.Api;
import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
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 lombok.extern.slf4j.Slf4j; 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.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; 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 @Slf4j
@Api(tags = "榕图-进度款合同相关Api") @Api(tags = "榕图-进度款合同相关Api")
public class RtProgressPaymentContractController { public class RtProgressPaymentContractController {
@Autowired @Autowired
private IRtProgressPaymentContractService rtProgressPaymentContractService; private IRtProgressPaymentContractService rtProgressPaymentContractService;
/** /**
* 分页列表查询 * 分页列表查询
* *
* @return * @return
*/ */
@ApiOperation(value = "分页列表查询榕图-进度款合同信息", notes = "分页列表查询榕图-进度款合同信息", httpMethod = "GET") @ApiOperation(value = "分页列表查询榕图-进度款合同信息", notes = "分页列表查询榕图-进度款合同信息", httpMethod = "GET")
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(name = "pageNo", value = "第几页", paramType = "query", required = true, dataType = "Integer"), @ApiImplicitParam(name = "pageNo", value = "第几页", paramType = "query", required = true, dataType = "Integer"),
@ApiImplicitParam(name = "pageSize", value = "每页显示条数", paramType = "query", required = true, dataType = "Integer"), @ApiImplicitParam(name = "pageSize", value = "每页显示条数", paramType = "query", required = true, dataType = "Integer"),
}) })
@GetMapping(value = "/page") @GetMapping(value = "/page")
public Result<IPage<RtProgressPaymentContract>> queryPageList(@ApiIgnore @RequestParam HashMap<String, Object> paramMap) { public Result<IPage<RtProgressPaymentContract>> queryPageList(@ApiIgnore @RequestParam HashMap<String, Object> paramMap) {
return Result.success(rtProgressPaymentContractService.queryPageList(paramMap)); return Result.success(rtProgressPaymentContractService.queryPageList(paramMap));
} }
/** /**
* 列表查询 * 列表查询
* *
* @return * @return
*/ */
@ApiOperation(value = "列表查询榕图-进度款合同信息", notes = "列表查询榕图-进度款合同信息", httpMethod = "GET") @ApiOperation(value = "列表查询榕图-进度款合同信息", notes = "列表查询榕图-进度款合同信息", httpMethod = "GET")
@GetMapping(value = "/list") @GetMapping(value = "/list")
public Result<List<RtProgressPaymentContract>> queryList(@ApiIgnore @RequestParam HashMap<String, Object> paramMap) { public Result<List<RtProgressPaymentContract>> queryList(@ApiIgnore @RequestParam HashMap<String, Object> paramMap) {
return Result.success(rtProgressPaymentContractService.queryList(paramMap)); return Result.success(rtProgressPaymentContractService.queryList(paramMap));
} }
/** /**
* 添加 * 添加
* *
* @param rtProgressPaymentContract * @param rtProgressPaymentContract
* @return * @return
*/ */
@ApiOperation(value = "添加榕图-进度款合同信息", notes = "添加榕图-进度款合同信息", httpMethod = "POST") @ApiOperation(value = "添加榕图-进度款合同信息", notes = "添加榕图-进度款合同信息", httpMethod = "POST")
@PostMapping(value = "/add") @PostMapping(value = "/add")
public Result<RtProgressPaymentContract> add(@RequestBody @Validate RtProgressPaymentContract rtProgressPaymentContract) { public Result<RtProgressPaymentContract> add(@RequestBody @Validate RtProgressPaymentContract rtProgressPaymentContract) {
rtProgressPaymentContractService.add(rtProgressPaymentContract); rtProgressPaymentContractService.add(rtProgressPaymentContract);
return Result.ok(); return Result.ok();
} }
/** /**
* 编辑 * 编辑
* *
* @param rtProgressPaymentContract * @param rtProgressPaymentContract
* @return * @return
*/ */
@ApiOperation(value = "编辑榕图-进度款合同信息", notes = "编辑榕图-进度款合同信息", httpMethod = "POST") @ApiOperation(value = "编辑榕图-进度款合同信息", notes = "编辑榕图-进度款合同信息", httpMethod = "POST")
@PostMapping(value = "/edit") @PostMapping(value = "/edit")
public Result<RtProgressPaymentContract> edit(@RequestBody RtProgressPaymentContract rtProgressPaymentContract) { public Result<RtProgressPaymentContract> edit(@RequestBody RtProgressPaymentContract rtProgressPaymentContract) {
rtProgressPaymentContractService.edit(rtProgressPaymentContract); rtProgressPaymentContractService.edit(rtProgressPaymentContract);
return Result.ok(); return Result.ok();
} }
/** /**
* 通过id删除 * 通过id删除
* *
* @return * @return
*/ */
@ApiOperation(value = "删除榕图-进度款合同信息", notes = "删除榕图-进度款合同信息", httpMethod = "POST") @ApiOperation(value = "删除榕图-进度款合同信息", notes = "删除榕图-进度款合同信息", httpMethod = "POST")
@ApiImplicitParam(name = "id", value = "榕图-进度款合同ID", paramType = "body", required = true, dataType = "String", example = "{\"id\":\"1\"}") @ApiImplicitParam(name = "id", value = "榕图-进度款合同ID", paramType = "body", required = true, dataType = "String", example = "{\"id\":\"1\"}")
@PostMapping(value = "/delete") @PostMapping(value = "/delete")
public Result<RtProgressPaymentContract> delete(@ApiIgnore @RequestBody HashMap<String, Object> map) { public Result<RtProgressPaymentContract> delete(@ApiIgnore @RequestBody HashMap<String, Object> map) {
String id = MapUtils.getString(map, "id"); String id = MapUtils.getString(map, "id");
Result<RtProgressPaymentContract> result = new Result<RtProgressPaymentContract>(); Result<RtProgressPaymentContract> result = new Result<RtProgressPaymentContract>();
RtProgressPaymentContract rtProgressPaymentContract = rtProgressPaymentContractService.getById(id); RtProgressPaymentContract rtProgressPaymentContract = rtProgressPaymentContractService.getById(id);
if (rtProgressPaymentContract == null) { if (rtProgressPaymentContract == null) {
result.error500("未找到对应实体"); result.error500("未找到对应实体");
} else { } else {
boolean ok = rtProgressPaymentContractService.removeById(id); boolean ok = rtProgressPaymentContractService.removeById(id);
if (ok) { if (ok) {
result.success("删除成功!"); result.success("删除成功!");
} }
} }
return result; return result;
} }
/** /**
* 通过id查询 * 通过id查询
* *
* @param id * @param id
* @return * @return
*/ */
@ApiOperation(value = "通过id查询榕图-进度款合同信息", notes = "通过id查询榕图-进度款合同信息", httpMethod = "GET") @ApiOperation(value = "通过id查询榕图-进度款合同信息", notes = "通过id查询榕图-进度款合同信息", httpMethod = "GET")
@ApiImplicitParam(name = "id", value = "榕图-进度款合同ID", paramType = "query", required = true, dataType = "Integer") @ApiImplicitParam(name = "id", value = "榕图-进度款合同ID", paramType = "query", required = true, dataType = "Integer")
@GetMapping(value = "/queryById") @GetMapping(value = "/queryById")
public Result<RtProgressPaymentContract> queryById(@RequestParam(name = "id", required = true) String id) { public Result<RtProgressPaymentContract> queryById(@RequestParam(name = "id", required = true) String id) {
Result<RtProgressPaymentContract> result = new Result<RtProgressPaymentContract>(); Result<RtProgressPaymentContract> result = new Result<RtProgressPaymentContract>();
RtProgressPaymentContract rtProgressPaymentContract = rtProgressPaymentContractService.getById(id); RtProgressPaymentContract rtProgressPaymentContract = rtProgressPaymentContractService.getById(id);
if (rtProgressPaymentContract == null) { if (rtProgressPaymentContract == null) {
result.error500("未找到对应实体"); result.error500("未找到对应实体");
} else { } else {
result.setResult(rtProgressPaymentContract); result.setResult(rtProgressPaymentContract);
result.setSuccess(true); result.setSuccess(true);
} }
return result; 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));
}
} }

View File

@ -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;
}

View File

@ -1,9 +1,12 @@
package com.zhgd.xmgl.modules.rt.mapper; package com.zhgd.xmgl.modules.rt.mapper;
import com.zhgd.xmgl.modules.rt.entity.RtProgressPaymentContract; import com.zhgd.xmgl.modules.rt.entity.RtProgressPaymentContract;
import com.zhgd.xmgl.modules.rt.entity.vo.CountRtProgressPaymentContractVo;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import java.util.HashMap;
/** /**
* @Description: 榕图-进度款合同 * @Description: 榕图-进度款合同
* @author pds * @author pds
@ -13,4 +16,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
@Mapper @Mapper
public interface RtProgressPaymentContractMapper extends BaseMapper<RtProgressPaymentContract> { public interface RtProgressPaymentContractMapper extends BaseMapper<RtProgressPaymentContract> {
CountRtProgressPaymentContractVo countRtProgressPaymentContract(HashMap<String, Object> map);
} }

View File

@ -1,4 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?> <?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"> <!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"> <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> </mapper>

View File

@ -3,6 +3,7 @@ package com.zhgd.xmgl.modules.rt.service;
import com.zhgd.xmgl.modules.rt.entity.RtProgressPaymentContract; import com.zhgd.xmgl.modules.rt.entity.RtProgressPaymentContract;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.zhgd.xmgl.modules.rt.entity.vo.CountRtProgressPaymentContractVo;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
@ -22,4 +23,6 @@ public interface IRtProgressPaymentContractService extends IService<RtProgressPa
void add(RtProgressPaymentContract rtProgressPaymentContract); void add(RtProgressPaymentContract rtProgressPaymentContract);
void edit(RtProgressPaymentContract rtProgressPaymentContract); void edit(RtProgressPaymentContract rtProgressPaymentContract);
CountRtProgressPaymentContractVo countRtProgressPaymentContract(HashMap<String, Object> map);
} }

View File

@ -1,6 +1,7 @@
package com.zhgd.xmgl.modules.rt.service.impl; package com.zhgd.xmgl.modules.rt.service.impl;
import com.zhgd.xmgl.modules.rt.entity.RtProgressPaymentContract; 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.mapper.RtProgressPaymentContractMapper;
import com.zhgd.xmgl.modules.rt.service.IRtProgressPaymentContractService; import com.zhgd.xmgl.modules.rt.service.IRtProgressPaymentContractService;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@ -66,4 +67,9 @@ public class RtProgressPaymentContractServiceImpl extends ServiceImpl<RtProgress
public void edit(RtProgressPaymentContract rtProgressPaymentContract) { public void edit(RtProgressPaymentContract rtProgressPaymentContract) {
baseMapper.updateById(rtProgressPaymentContract); baseMapper.updateById(rtProgressPaymentContract);
} }
@Override
public CountRtProgressPaymentContractVo countRtProgressPaymentContract(HashMap<String, Object> map) {
return baseMapper.countRtProgressPaymentContract(map);
}
} }

View File

@ -284,6 +284,10 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
.antMatchers("/xmgl/workerInfo/getWorkerStatisticsCount").permitAll() .antMatchers("/xmgl/workerInfo/getWorkerStatisticsCount").permitAll()
.antMatchers("/xmgl/environmentDev/updateEnvironmentDevSprayStatus").permitAll() .antMatchers("/xmgl/environmentDev/updateEnvironmentDevSprayStatus").permitAll()
.antMatchers("/xmgl/aiAnalyseHardWareAlarmRecord/violatorListSort").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() .antMatchers(HttpMethod.OPTIONS, "/**").anonymous()
.anyRequest().authenticated() // 剩下所有的验证都需要验证 .anyRequest().authenticated() // 剩下所有的验证都需要验证
.and() .and()