企业端优化

This commit is contained in:
pengjie 2023-07-29 10:26:19 +08:00
parent ba539f2c81
commit b1d8e153ae
11 changed files with 912 additions and 6 deletions

View File

@ -208,6 +208,13 @@ public class HardWareCallbackController {
aiMonitorAlarm.setState(-1);
}
aiMonitorAlarmService.save(aiMonitorAlarm);
// 修正设备状态
LambdaUpdateWrapper<AiMonitorDev> updateWrapper = Wrappers.<AiMonitorDev>lambdaUpdate();
if (aiMonitorDev.getState() == 0) {
updateWrapper.set(AiMonitorDev::getState, 1);
updateWrapper.eq(AiMonitorDev::getAiMonitorId, aiMonitorDev.getAiMonitorId());
aiMonitorDevService.update(updateWrapper);
}
String param = aiMonitorDev.getProjectSn();
if (StringUtils.isNotBlank(aiMonitorDev.getEngineeringSn())) {
param = aiMonitorDev.getEngineeringSn();

View File

@ -0,0 +1,190 @@
package com.zhgd.xmgl.modules.basicdata.controller.enterprise;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.zhgd.annotation.OperLog;
import com.zhgd.jeecg.common.api.vo.Result;
import com.zhgd.jeecg.common.system.query.QueryGenerator;
import com.zhgd.xmgl.modules.basicdata.entity.Engineering;
import com.zhgd.xmgl.modules.basicdata.service.IEngineeringService;
import com.zhgd.xmgl.modules.safety.entity.InvestmentApply;
import com.zhgd.xmgl.modules.safety.service.IInvestmentApplyService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections.MapUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import springfox.documentation.annotations.ApiIgnore;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
/**
* @Title: Controller
* @Description: 投资支付申报
* @author pengj
* @date 2023-07-05
* @version V1.0
*/
@RestController
@RequestMapping("/ent/investmentApply")
@Slf4j
@Api(tags = "投资支付申报管理")
public class EntInvestmentApplyController {
@Autowired
private IInvestmentApplyService investmentApplyService;
@Autowired
private IEngineeringService engineeringService;
/**
* 分页列表查询
*
* @return
*/
@OperLog(operModul = "投资支付申报管理", operType = "分页查询", operDesc = "分页列表查询投资支付申报信息")
@ApiOperation(value = " 分页列表查询投资支付申报信息", notes = "分页列表查询投资支付申报信息", httpMethod = "POST")
@ApiImplicitParams({
@ApiImplicitParam(name = "name", value = "申报时段名称", paramType = "body", dataType = "String"),
@ApiImplicitParam(name = "pageNo", value = "页数", paramType = "body", required = true, defaultValue = "1", dataType = "Integer"),
@ApiImplicitParam(name = "pageSize", value = "每页条数", paramType = "body", required = true, defaultValue = "10", dataType = "Integer")
})
@PostMapping(value = "/page")
public Result<IPage<InvestmentApply>> queryPageList(@ApiIgnore @RequestBody Map<String, Object> map) {
IPage<InvestmentApply> pageList = investmentApplyService.pageList(map);
return Result.success(pageList);
}
/**
* 列表查询
*
* @param investmentApply
* @return
*/
@OperLog(operModul = "投资支付申报管理", operType = "列表查询", operDesc = "列表查询已支付投资申报信息")
@ApiOperation(value = " 列表查询已支付投资申报信息", notes = "列表查询已支付投资申报信息", httpMethod = "POST")
@ApiImplicitParam(name = "investmentPaymentId", value = "投资支付记录ID", paramType = "body", required = true, dataType = "String")
@PostMapping(value = "/payList")
public Result<List<InvestmentApply>> payList(@RequestBody InvestmentApply investmentApply) {
QueryWrapper<InvestmentApply> queryWrapper = QueryGenerator.initQueryWrapper(investmentApply);
queryWrapper.lambda().isNotNull(InvestmentApply::getInvestmentPaymentId);
List<InvestmentApply> list = investmentApplyService.list(queryWrapper);
return Result.success(list);
}
/**
* 添加
*
* @param investmentApply
* @return
*/
@OperLog(operModul = "投资支付申报管理", operType = "新增", operDesc = "添加投资支付申报信息")
@ApiOperation(value = " 添加投资支付申报信息", notes = "添加投资支付申报信息", httpMethod = "POST")
@PostMapping(value = "/add")
public Result<Object> add(@RequestBody InvestmentApply investmentApply) {
String projectSn = engineeringService.getOne(Wrappers.<Engineering>lambdaQuery().eq(Engineering::getEngineeringSn, investmentApply.getEngineeringSn())).getProjectSn();
investmentApply.setProjectSn(projectSn);
investmentApplyService.saveInfo(investmentApply);
return Result.success("添加成功!");
}
/**
* 编辑
*
* @param investmentApply
* @return
*/
@OperLog(operModul = "投资支付申报管理", operType = "修改", operDesc = "编辑投资支付申报信息")
@ApiOperation(value = "编辑投资支付申报信息", notes = "编辑投资支付申报信息", httpMethod = "POST")
@PostMapping(value = "/edit")
public Result<InvestmentApply> edit(@RequestBody InvestmentApply investmentApply) {
Result<InvestmentApply> result = new Result<InvestmentApply>();
InvestmentApply investmentApplyEntity = investmentApplyService.getById(investmentApply.getId());
if (investmentApplyEntity == null) {
result.error500("未找到对应实体");
} else {
boolean ok = investmentApplyService.updateById(investmentApply);
if (ok) {
result.success("修改成功!");
} else {
result.success("操作失败!");
}
}
return result;
}
/**
* 通过id删除
* @return
*/
@OperLog(operModul = "投资支付申报管理", operType = "删除", operDesc = "删除投资支付申报信息")
@ApiOperation(value = "删除投资支付申报信息", notes = "删除投资支付申报信息", httpMethod = "POST")
@ApiImplicitParam(name = "id", value = "投资支付申报ID", paramType = "body", required = true, dataType = "Integer")
@PostMapping(value = "/delete")
public Result<InvestmentApply> delete(@RequestBody InvestmentApply investmentApply) {
Result<InvestmentApply> result = new Result<InvestmentApply>();
InvestmentApply investmentApplyEntity = investmentApplyService.getById(investmentApply.getId());
if (investmentApplyEntity == null) {
result.error500("未找到对应实体");
} else {
boolean ok = investmentApplyService.removeById(investmentApply.getId());
if (ok) {
result.success("删除成功!");
} else {
result.success("操作失败!");
}
}
return result;
}
/**
* 批量删除
* @return
*/
@OperLog(operModul = "投资支付申报管理", operType = "批量删除", operDesc = "批量删除投资支付申报信息")
@ApiOperation(value = "批量删除投资支付申报信息", notes = "批量删除投资支付申报信息", httpMethod = "POST")
@ApiImplicitParam(name = "ids", value = "投资支付申报ID字符串", paramType = "body", required = true, dataType = "String")
@PostMapping(value = "/deleteBatch")
public Result<InvestmentApply> deleteBatch(@ApiIgnore @RequestBody Map<String, Object> map) {
Result<InvestmentApply> result = new Result<InvestmentApply>();
String ids = MapUtils.getString(map, "ids");
if (ids == null || "".equals(ids.trim())) {
result.error500("参数不识别!");
} else {
this.investmentApplyService.removeByIds(Arrays.asList(ids.split(",")));
result.success("删除成功!");
}
return result;
}
/**
* 通过id查询
* @return
*/
@OperLog(operModul = "投资支付申报管理", operType = "查询", operDesc = "通过id查询投资支付申报信息")
@ApiOperation(value = "通过id查询投资支付申报信息", notes = "通过id查询投资支付申报信息", httpMethod = "POST")
@ApiImplicitParam(name = "id", value = "投资支付申报ID", paramType = "body", required = true, dataType = "Integer")
@PostMapping(value = "/queryById")
public Result<InvestmentApply> queryById(@ApiIgnore @RequestBody Map<String, Object> map) {
Result<InvestmentApply> result = new Result<InvestmentApply>();
InvestmentApply investmentApply = investmentApplyService.getById(MapUtils.getString(map, "id"));
if (investmentApply == null) {
result.error500("未找到对应实体");
} else {
result.setResult(investmentApply);
result.setSuccess(true);
}
return result;
}
}

View File

@ -0,0 +1,100 @@
package com.zhgd.xmgl.modules.basicdata.controller.enterprise;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zhgd.annotation.OperLog;
import com.zhgd.jeecg.common.api.vo.Result;
import com.zhgd.jeecg.common.system.query.QueryGenerator;
import com.zhgd.jeecg.common.util.PageUtil;
import com.zhgd.xmgl.modules.safety.entity.InvestmentContract;
import com.zhgd.xmgl.modules.safety.service.IInvestmentContractService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections.MapUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import springfox.documentation.annotations.ApiIgnore;
import java.util.List;
import java.util.Map;
/**
* @Title: Controller
* @Description: 投资支付合同
* @author pengj
* @date 2023-07-04
* @version V1.0
*/
@RestController
@RequestMapping("/ent/investmentContract")
@Slf4j
@Api(tags = "投资支付合同管理")
public class EntInvestmentContractController {
@Autowired
private IInvestmentContractService investmentContractService;
/**
* 分页列表查询
*
* @return
*/
@OperLog(operModul = "投资支付合同管理", operType = "分页查询", operDesc = "分页列表查询投资支付合同信息")
@ApiOperation(value = " 分页列表查询投资支付合同信息", notes = "分页列表查询投资支付合同信息", httpMethod = "POST")
@ApiImplicitParams({
@ApiImplicitParam(name = "contractTime_begin", value = "开始时间", paramType = "body", dataType = "String"),
@ApiImplicitParam(name = "contractTime_end", value = "截止时间", paramType = "body", dataType = "String"),
@ApiImplicitParam(name = "pageNo", value = "页数", paramType = "body", required = true, defaultValue = "1", dataType = "Integer"),
@ApiImplicitParam(name = "pageSize", value = "每页条数", paramType = "body", required = true, defaultValue = "10", dataType = "Integer")
})
@PostMapping(value = "/page")
public Result<IPage<InvestmentContract>> queryPageList(@ApiIgnore @RequestBody Map<String, Object> map) {
QueryWrapper<InvestmentContract> queryWrapper = QueryGenerator.initPageQueryWrapper(InvestmentContract.class, map);
Page<InvestmentContract> page = PageUtil.getPage(map);
IPage<InvestmentContract> pageList = investmentContractService.page(page, queryWrapper);
return Result.success(pageList);
}
/**
* 列表查询
*
* @param investmentContract
* @return
*/
@OperLog(operModul = "投资支付合同管理", operType = "列表查询", operDesc = "列表查询投资支付合同信息")
@ApiOperation(value = " 列表查询投资支付合同信息", notes = "列表查询投资支付合同信息", httpMethod = "POST")
@PostMapping(value = "/list")
public Result<List<InvestmentContract>> queryList(@RequestBody InvestmentContract investmentContract) {
QueryWrapper<InvestmentContract> queryWrapper = QueryGenerator.initQueryWrapper(investmentContract);
List<InvestmentContract> list = investmentContractService.list(queryWrapper);
return Result.success(list);
}
/**
* 通过id查询
*
* @return
*/
@OperLog(operModul = "投资支付合同管理", operType = "查询", operDesc = "通过id查询投资支付合同信息")
@ApiOperation(value = "通过id查询投资支付合同信息", notes = "通过id查询投资支付合同信息", httpMethod = "POST")
@ApiImplicitParam(name = "id", value = "投资支付合同ID", paramType = "body", required = true, dataType = "Integer")
@PostMapping(value = "/queryById")
public Result<InvestmentContract> queryById(@ApiIgnore @RequestBody Map<String, Object> map) {
Result<InvestmentContract> result = new Result<InvestmentContract>();
InvestmentContract investmentContract = investmentContractService.getById(MapUtils.getString(map, "id"));
if (investmentContract == null) {
result.error500("未找到对应实体");
} else {
result.setResult(investmentContract);
result.setSuccess(true);
}
return result;
}
}

View File

@ -0,0 +1,101 @@
package com.zhgd.xmgl.modules.basicdata.controller.enterprise;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zhgd.annotation.OperLog;
import com.zhgd.jeecg.common.api.vo.Result;
import com.zhgd.jeecg.common.system.query.QueryGenerator;
import com.zhgd.jeecg.common.util.PageUtil;
import com.zhgd.xmgl.modules.safety.entity.InvestmentPayment;
import com.zhgd.xmgl.modules.safety.service.IInvestmentPaymentService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections.MapUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import springfox.documentation.annotations.ApiIgnore;
import java.util.List;
import java.util.Map;
/**
* @Title: Controller
* @Description: 投资支付
* @author pengj
* @date 2023-07-01
* @version V1.0
*/
@RestController
@RequestMapping("/ent/investmentPayment")
@Slf4j
@Api(tags = "投资支付管理")
public class EntInvestmentPaymentController {
@Autowired
private IInvestmentPaymentService investmentPaymentService;
/**
* 分页列表查询
*
* @return
*/
@OperLog(operModul = "投资支付管理", operType = "分页查询", operDesc = "分页列表查询投资支付信息")
@ApiOperation(value = " 分页列表查询投资支付信息", notes = "分页列表查询投资支付信息", httpMethod = "POST")
@ApiImplicitParams({
@ApiImplicitParam(name = "contractId", value = "合同ID", paramType = "body", dataType = "String"),
@ApiImplicitParam(name = "payTime_begin", value = "开始时间", paramType = "body", dataType = "String"),
@ApiImplicitParam(name = "payTime_end", value = "截止时间", paramType = "body", dataType = "String"),
@ApiImplicitParam(name = "pageNo", value = "页数", paramType = "body", required = true, defaultValue = "1", dataType = "Integer"),
@ApiImplicitParam(name = "pageSize", value = "每页条数", paramType = "body", required = true, defaultValue = "10", dataType = "Integer")
})
@PostMapping(value = "/page")
public Result<IPage<InvestmentPayment>> queryPageList(@ApiIgnore @RequestBody Map<String, Object> map) {
QueryWrapper<InvestmentPayment> queryWrapper = QueryGenerator.initPageQueryWrapper(InvestmentPayment.class, map);
Page<InvestmentPayment> page = PageUtil.getPage(map);
IPage<InvestmentPayment> pageList = investmentPaymentService.page(page, queryWrapper);
return Result.success(pageList);
}
/**
* 列表查询
*
* @param investmentPayment
* @return
*/
@OperLog(operModul = "投资支付管理", operType = "列表查询", operDesc = "列表查询投资支付信息")
@ApiOperation(value = " 列表查询投资支付信息", notes = "列表查询投资支付信息", httpMethod = "POST")
@PostMapping(value = "/list")
public Result<List<InvestmentPayment>> queryList(@RequestBody InvestmentPayment investmentPayment) {
QueryWrapper<InvestmentPayment> queryWrapper = QueryGenerator.initQueryWrapper(investmentPayment);
List<InvestmentPayment> list = investmentPaymentService.list(queryWrapper);
return Result.success(list);
}
/**
* 通过id查询
*
* @return
*/
@OperLog(operModul = "投资支付管理", operType = "查询", operDesc = "通过id查询投资支付信息")
@ApiOperation(value = "通过id查询投资支付信息", notes = "通过id查询投资支付信息", httpMethod = "POST")
@ApiImplicitParam(name = "id", value = "投资支付ID", paramType = "body", required = true, dataType = "Integer")
@PostMapping(value = "/queryById")
public Result<InvestmentPayment> queryById(@ApiIgnore @RequestBody Map<String, Object> map) {
Result<InvestmentPayment> result = new Result<InvestmentPayment>();
InvestmentPayment investmentPayment = investmentPaymentService.getById(MapUtils.getString(map, "id"));
if (investmentPayment == null) {
result.error500("未找到对应实体");
} else {
result.setResult(investmentPayment);
result.setSuccess(true);
}
return result;
}
}

View File

@ -0,0 +1,185 @@
package com.zhgd.xmgl.modules.basicdata.controller.enterprise;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zhgd.annotation.OperLog;
import com.zhgd.jeecg.common.api.vo.Result;
import com.zhgd.jeecg.common.system.query.QueryGenerator;
import com.zhgd.jeecg.common.util.PageUtil;
import com.zhgd.xmgl.modules.safety.dto.InvestmentPaymentDetailDto;
import com.zhgd.xmgl.modules.safety.entity.InvestmentPaymentDetail;
import com.zhgd.xmgl.modules.safety.service.IInvestmentPaymentDetailService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections.MapUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import springfox.documentation.annotations.ApiIgnore;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
/**
* @Title: Controller
* @Description: 投资支付子项详细
* @author pengj
* @date 2023-07-01
* @version V1.0
*/
@RestController
@RequestMapping("/ent/investmentPaymentDetail")
@Slf4j
@Api(tags = "投资支付子项详细管理")
public class EntInvestmentPaymentDetailController {
@Autowired
private IInvestmentPaymentDetailService investmentPaymentDetailService;
/**
* 分页列表查询
*
* @return
*/
@OperLog(operModul = "投资支付子项详细管理", operType = "分页查询", operDesc = "分页列表查询投资支付子项详细信息")
@ApiOperation(value = " 分页列表查询投资支付子项详细信息", notes = "分页列表查询投资支付子项详细信息", httpMethod = "POST")
@ApiImplicitParams({
@ApiImplicitParam(name = "itemId", value = "投资支付子项id", paramType = "body", required = true, dataType = "String"),
@ApiImplicitParam(name = "pageNo", value = "页数", paramType = "body", required = true, defaultValue = "1", dataType = "Integer"),
@ApiImplicitParam(name = "pageSize", value = "每页条数", paramType = "body", required = true, defaultValue = "10", dataType = "Integer")
})
@PostMapping(value = "/page")
public Result<IPage<InvestmentPaymentDetailDto>> queryPageList(@ApiIgnore @RequestBody Map<String, Object> map) {
QueryWrapper<InvestmentPaymentDetail> queryWrapper = QueryGenerator.initPageQueryWrapper(InvestmentPaymentDetail.class, map);
Page<InvestmentPaymentDetail> page = PageUtil.getPage(map);
IPage<InvestmentPaymentDetailDto> pageList = investmentPaymentDetailService.pageList(page, queryWrapper);
return Result.success(pageList);
}
/**
* 列表查询
*
* @param investmentPaymentDetail
* @return
*/
@OperLog(operModul = "投资支付子项详细管理", operType = "列表查询", operDesc = "列表查询投资支付子项详细信息")
@ApiOperation(value = " 列表查询投资支付子项详细信息", notes = "列表查询投资支付子项详细信息", httpMethod = "POST")
@PostMapping(value = "/list")
public Result<List<InvestmentPaymentDetail>> queryList(@RequestBody InvestmentPaymentDetail investmentPaymentDetail) {
QueryWrapper<InvestmentPaymentDetail> queryWrapper = QueryGenerator.initQueryWrapper(investmentPaymentDetail);
List<InvestmentPaymentDetail> list = investmentPaymentDetailService.list(queryWrapper);
return Result.success(list);
}
/**
* 添加
*
* @param investmentPaymentDetail
* @return
*/
@OperLog(operModul = "投资支付子项详细管理", operType = "新增", operDesc = "添加投资支付子项详细信息")
@ApiOperation(value = " 添加投资支付子项详细信息", notes = "添加投资支付子项详细信息", httpMethod = "POST")
@PostMapping(value = "/add")
public Result<Object> add(@RequestBody InvestmentPaymentDetail investmentPaymentDetail) {
investmentPaymentDetailService.save(investmentPaymentDetail);
return Result.success("添加成功!");
}
/**
* 编辑
*
* @param investmentPaymentDetail
* @return
*/
@OperLog(operModul = "投资支付子项详细管理", operType = "修改", operDesc = "编辑投资支付子项详细信息")
@ApiOperation(value = "编辑投资支付子项详细信息", notes = "编辑投资支付子项详细信息", httpMethod = "POST")
@PostMapping(value = "/edit")
public Result<InvestmentPaymentDetail> edit(@RequestBody InvestmentPaymentDetail investmentPaymentDetail) {
Result<InvestmentPaymentDetail> result = new Result<InvestmentPaymentDetail>();
InvestmentPaymentDetail investmentPaymentDetailEntity = investmentPaymentDetailService.getById(investmentPaymentDetail.getId());
if (investmentPaymentDetailEntity == null) {
result.error500("未找到对应实体");
} else {
boolean ok = investmentPaymentDetailService.updateById(investmentPaymentDetail);
if (ok) {
result.success("修改成功!");
} else {
result.success("操作失败!");
}
}
return result;
}
/**
* 通过id删除
* @return
*/
@OperLog(operModul = "投资支付子项详细管理", operType = "删除", operDesc = "删除投资支付子项详细信息")
@ApiOperation(value = "删除投资支付子项详细信息", notes = "删除投资支付子项详细信息", httpMethod = "POST")
@ApiImplicitParam(name = "id", value = "投资支付子项详细ID", paramType = "body", required = true, dataType = "Integer")
@PostMapping(value = "/delete")
public Result<InvestmentPaymentDetail> delete(@RequestBody InvestmentPaymentDetail investmentPaymentDetail) {
Result<InvestmentPaymentDetail> result = new Result<InvestmentPaymentDetail>();
InvestmentPaymentDetail investmentPaymentDetailEntity = investmentPaymentDetailService.getById(investmentPaymentDetail.getId());
if (investmentPaymentDetailEntity == null) {
result.error500("未找到对应实体");
} else {
boolean ok = investmentPaymentDetailService.removeById(investmentPaymentDetail.getId());
if (ok) {
result.success("删除成功!");
} else {
result.success("操作失败!");
}
}
return result;
}
/**
* 批量删除
* @return
*/
@OperLog(operModul = "投资支付子项详细管理", operType = "批量删除", operDesc = "批量删除投资支付子项详细信息")
@ApiOperation(value = "批量删除投资支付子项详细信息", notes = "批量删除投资支付子项详细信息", httpMethod = "POST")
@ApiImplicitParam(name = "ids", value = "投资支付子项详细ID字符串", paramType = "body", required = true, dataType = "String")
@PostMapping(value = "/deleteBatch")
public Result<InvestmentPaymentDetail> deleteBatch(@ApiIgnore @RequestBody Map<String, Object> map) {
Result<InvestmentPaymentDetail> result = new Result<InvestmentPaymentDetail>();
String ids = MapUtils.getString(map, "ids");
if (ids == null || "".equals(ids.trim())) {
result.error500("参数不识别!");
} else {
this.investmentPaymentDetailService.removeByIds(Arrays.asList(ids.split(",")));
result.success("删除成功!");
}
return result;
}
/**
* 通过id查询
* @return
*/
@OperLog(operModul = "投资支付子项详细管理", operType = "查询", operDesc = "通过id查询投资支付子项详细信息")
@ApiOperation(value = "通过id查询投资支付子项详细信息", notes = "通过id查询投资支付子项详细信息", httpMethod = "POST")
@ApiImplicitParam(name = "id", value = "投资支付子项详细ID", paramType = "body", required = true, dataType = "Integer")
@PostMapping(value = "/queryById")
public Result<InvestmentPaymentDetail> queryById(@ApiIgnore @RequestBody Map<String, Object> map) {
Result<InvestmentPaymentDetail> result = new Result<InvestmentPaymentDetail>();
InvestmentPaymentDetail investmentPaymentDetail = investmentPaymentDetailService.getById(MapUtils.getString(map, "id"));
if (investmentPaymentDetail == null) {
result.error500("未找到对应实体");
} else {
result.setResult(investmentPaymentDetail);
result.setSuccess(true);
}
return result;
}
}

View File

@ -0,0 +1,172 @@
package com.zhgd.xmgl.modules.basicdata.controller.enterprise;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.zhgd.annotation.OperLog;
import com.zhgd.jeecg.common.api.vo.Result;
import com.zhgd.jeecg.common.system.query.QueryGenerator;
import com.zhgd.xmgl.modules.basicdata.entity.Engineering;
import com.zhgd.xmgl.modules.basicdata.service.IEngineeringService;
import com.zhgd.xmgl.modules.safety.entity.InvestmentPaymentItem;
import com.zhgd.xmgl.modules.safety.service.IInvestmentPaymentItemService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections.MapUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import springfox.documentation.annotations.ApiIgnore;
import java.util.List;
import java.util.Map;
/**
* @Title: Controller
* @Description: 投资支付子项
* @author pengj
* @date 2023-07-01
* @version V1.0
*/
@RestController
@RequestMapping("/ent/investmentPaymentItem")
@Slf4j
@Api(tags = "投资支付子项管理")
public class EntInvestmentPaymentItemController {
@Autowired
private IInvestmentPaymentItemService investmentPaymentItemService;
@Autowired
private IEngineeringService engineeringService;
/**
* 分页列表查询
*
* @return
*/
@OperLog(operModul = "投资支付子项管理", operType = "分页查询", operDesc = "分页列表查询投资支付子项信息")
@ApiOperation(value = " 分页列表查询投资支付子项信息", notes = "分页列表查询投资支付子项信息", httpMethod = "POST")
@ApiImplicitParams({
@ApiImplicitParam(name = "reportContent", value = "汇报内容", paramType = "body", dataType = "String"),
@ApiImplicitParam(name = "investmentApplyId", value = "投资支付申报ID", paramType = "body", required = true, dataType = "String"),
@ApiImplicitParam(name = "pageNo", value = "页数", paramType = "body", required = true, defaultValue = "1", dataType = "Integer"),
@ApiImplicitParam(name = "pageSize", value = "每页条数", paramType = "body", required = true, defaultValue = "10", dataType = "Integer")
})
@PostMapping(value = "/page")
public Result<IPage<InvestmentPaymentItem>> queryPageList(@ApiIgnore @RequestBody Map<String, Object> map) {
IPage<InvestmentPaymentItem> pageList = investmentPaymentItemService.pageList(map);
return Result.success(pageList);
}
/**
* 列表查询
*
* @param investmentPaymentItem
* @return
*/
@OperLog(operModul = "投资支付子项管理", operType = "列表查询", operDesc = "列表查询投资支付子项信息")
@ApiOperation(value = " 列表查询投资支付子项信息", notes = "列表查询投资支付子项信息", httpMethod = "POST")
@PostMapping(value = "/list")
public Result<List<InvestmentPaymentItem>> queryList(@RequestBody InvestmentPaymentItem investmentPaymentItem) {
if (null == investmentPaymentItem.getInvestmentApplyId()) {
return Result.success(null);
}
QueryWrapper<InvestmentPaymentItem> queryWrapper = QueryGenerator.initQueryWrapper(investmentPaymentItem);
List<InvestmentPaymentItem> list = investmentPaymentItemService.list(queryWrapper);
return Result.success(list);
}
/**
* 添加
*
* @param investmentPaymentItem
* @return
*/
@OperLog(operModul = "投资支付子项管理", operType = "新增", operDesc = "添加投资支付子项信息")
@ApiOperation(value = " 添加投资支付子项信息", notes = "添加投资支付子项信息", httpMethod = "POST")
@PostMapping(value = "/add")
public Result<Object> add(@RequestBody InvestmentPaymentItem investmentPaymentItem) {
String projectSn = engineeringService.getOne(Wrappers.<Engineering>lambdaQuery().eq(Engineering::getEngineeringSn, investmentPaymentItem.getEngineeringSn())).getProjectSn();
investmentPaymentItem.setProjectSn(projectSn);
investmentPaymentItemService.saveInfo(investmentPaymentItem);
return Result.success("添加成功!");
}
/**
* 编辑
*
* @param investmentPaymentItem
* @return
*/
@OperLog(operModul = "投资支付子项管理", operType = "修改", operDesc = "编辑投资支付子项信息")
@ApiOperation(value = "编辑投资支付子项信息", notes = "编辑投资支付子项信息", httpMethod = "POST")
@PostMapping(value = "/edit")
public Result<InvestmentPaymentItem> edit(@RequestBody InvestmentPaymentItem investmentPaymentItem) {
Result<InvestmentPaymentItem> result = new Result<InvestmentPaymentItem>();
InvestmentPaymentItem investmentPaymentItemEntity = investmentPaymentItemService.getById(investmentPaymentItem.getId());
if (investmentPaymentItemEntity == null) {
result.error500("未找到对应实体");
} else {
boolean ok = investmentPaymentItemService.updateById(investmentPaymentItem);
if (ok) {
result.success("修改成功!");
} else {
result.success("操作失败!");
}
}
return result;
}
/**
* 通过id删除
* @return
*/
@OperLog(operModul = "投资支付子项管理", operType = "删除", operDesc = "删除投资支付子项信息")
@ApiOperation(value = "删除投资支付子项信息", notes = "删除投资支付子项信息", httpMethod = "POST")
@ApiImplicitParam(name = "id", value = "投资支付子项ID", paramType = "body", required = true, dataType = "Integer")
@PostMapping(value = "/delete")
public Result<InvestmentPaymentItem> delete(@RequestBody InvestmentPaymentItem investmentPaymentItem) {
Result<InvestmentPaymentItem> result = new Result<InvestmentPaymentItem>();
InvestmentPaymentItem investmentPaymentItemEntity = investmentPaymentItemService.getById(investmentPaymentItem.getId());
if (investmentPaymentItemEntity == null) {
result.error500("未找到对应实体");
} else {
boolean ok = investmentPaymentItemService.removeById(investmentPaymentItem.getId());
if (ok) {
result.success("删除成功!");
} else {
result.success("操作失败!");
}
}
return result;
}
/**
* 通过id查询
* @return
*/
@OperLog(operModul = "投资支付子项管理", operType = "查询", operDesc = "通过id查询投资支付子项信息")
@ApiOperation(value = "通过id查询投资支付子项信息", notes = "通过id查询投资支付子项信息", httpMethod = "POST")
@ApiImplicitParam(name = "id", value = "投资支付子项ID", paramType = "body", required = true, dataType = "Integer")
@PostMapping(value = "/queryById")
public Result<InvestmentPaymentItem> queryById(@ApiIgnore @RequestBody Map<String, Object> map) {
Result<InvestmentPaymentItem> result = new Result<InvestmentPaymentItem>();
InvestmentPaymentItem investmentPaymentItem = investmentPaymentItemService.getById(MapUtils.getString(map, "id"));
if (investmentPaymentItem == null) {
result.error500("未找到对应实体");
} else {
result.setResult(investmentPaymentItem);
result.setSuccess(true);
}
return result;
}
}

View File

@ -0,0 +1,151 @@
package com.zhgd.xmgl.modules.basicdata.controller.enterprise;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.zhgd.annotation.OperLog;
import com.zhgd.jeecg.common.api.vo.Result;
import com.zhgd.jeecg.common.system.query.QueryGenerator;
import com.zhgd.xmgl.modules.basicdata.entity.Engineering;
import com.zhgd.xmgl.modules.basicdata.service.IEngineeringService;
import com.zhgd.xmgl.modules.safety.entity.InvestmentPaymentStat;
import com.zhgd.xmgl.modules.safety.service.IInvestmentPaymentStatService;
import com.zhgd.xmgl.security.SecurityUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections.MapUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import springfox.documentation.annotations.ApiIgnore;
import java.util.Map;
/**
* @Title: Controller
* @Description: 投资支付统计
* @author pengj
* @date 2023-07-04
* @version V1.0
*/
@RestController
@RequestMapping("/ent/investmentPaymentStat")
@Slf4j
@Api(tags = "投资支付统计管理")
public class EntInvestmentPaymentStatController {
@Autowired
private IInvestmentPaymentStatService investmentPaymentStatService;
@Autowired
private IEngineeringService engineeringService;
/**
* 分页列表查询
*
* @return
*/
@OperLog(operModul = "投资支付统计管理", operType = "分页查询", operDesc = "查询对应申报时段的投资支付统计信息")
@ApiOperation(value = " 查询对应申报时段的投资支付统计信息", notes = "查询对应申报时段的投资支付统计信息", httpMethod = "POST")
@ApiImplicitParam(name = "investmentApplyId", value = "投资支付申报ID", paramType = "body", required = true, dataType = "String")
@PostMapping(value = "/queryByApplyId")
public Result<InvestmentPaymentStat> queryPageList(@ApiIgnore @RequestBody Map<String, Object> map) {
String investmentApplyId = MapUtils.getString(map, "investmentApplyId");
if (StringUtils.isBlank(investmentApplyId)) {
return Result.success(null);
}
QueryWrapper<InvestmentPaymentStat> queryWrapper = QueryGenerator.initPageQueryWrapper(InvestmentPaymentStat.class, map);
return Result.success(investmentPaymentStatService.getOne(queryWrapper));
}
/**
* 添加
*
* @param investmentPaymentStat
* @return
*/
@OperLog(operModul = "投资支付统计管理", operType = "新增", operDesc = "添加投资支付统计信息")
@ApiOperation(value = " 添加投资支付统计信息", notes = "添加投资支付统计信息", httpMethod = "POST")
@PostMapping(value = "/add")
public Result<Object> add(@RequestBody InvestmentPaymentStat investmentPaymentStat) {
String projectSn = engineeringService.getOne(Wrappers.<Engineering>lambdaQuery().eq(Engineering::getEngineeringSn, investmentPaymentStat.getEngineeringSn())).getProjectSn();
investmentPaymentStat.setProjectSn(projectSn);
investmentPaymentStatService.save(investmentPaymentStat);
return Result.success("添加成功!");
}
/**
* 编辑
*
* @param investmentPaymentStat
* @return
*/
@OperLog(operModul = "投资支付统计管理", operType = "修改", operDesc = "编辑投资支付统计信息")
@ApiOperation(value = "编辑投资支付统计信息", notes = "编辑投资支付统计信息", httpMethod = "POST")
@PostMapping(value = "/edit")
public Result<InvestmentPaymentStat> edit(@RequestBody InvestmentPaymentStat investmentPaymentStat) {
Result<InvestmentPaymentStat> result = new Result<InvestmentPaymentStat>();
InvestmentPaymentStat investmentPaymentStatEntity = investmentPaymentStatService.getById(investmentPaymentStat.getId());
if (investmentPaymentStatEntity == null) {
result.error500("未找到对应实体");
} else {
boolean ok = investmentPaymentStatService.updateById(investmentPaymentStat);
if (ok) {
result.success("修改成功!");
} else {
result.success("操作失败!");
}
}
return result;
}
/**
* 通过id删除
*
* @return
*/
@OperLog(operModul = "投资支付统计管理", operType = "删除", operDesc = "删除投资支付统计信息")
@ApiOperation(value = "删除投资支付统计信息", notes = "删除投资支付统计信息", httpMethod = "POST")
@ApiImplicitParam(name = "id", value = "投资支付统计ID", paramType = "body", required = true, dataType = "Integer")
@PostMapping(value = "/delete")
public Result<InvestmentPaymentStat> delete(@RequestBody InvestmentPaymentStat investmentPaymentStat) {
Result<InvestmentPaymentStat> result = new Result<InvestmentPaymentStat>();
InvestmentPaymentStat investmentPaymentStatEntity = investmentPaymentStatService.getById(investmentPaymentStat.getId());
if (investmentPaymentStatEntity == null) {
result.error500("未找到对应实体");
} else {
boolean ok = investmentPaymentStatService.removeById(investmentPaymentStat.getId());
if (ok) {
result.success("删除成功!");
} else {
result.success("操作失败!");
}
}
return result;
}
/**
* 通过id查询
* @return
*/
@OperLog(operModul = "投资支付统计管理", operType = "查询", operDesc = "通过id查询投资支付统计信息")
@ApiOperation(value = "通过id查询投资支付统计信息", notes = "通过id查询投资支付统计信息", httpMethod = "POST")
@ApiImplicitParam(name = "id", value = "投资支付统计ID", paramType = "body", required = true, dataType = "Integer")
@PostMapping(value = "/queryById")
public Result<InvestmentPaymentStat> queryById(@ApiIgnore @RequestBody Map<String, Object> map) {
Result<InvestmentPaymentStat> result = new Result<InvestmentPaymentStat>();
InvestmentPaymentStat investmentPaymentStat = investmentPaymentStatService.getById(MapUtils.getString(map, "id"));
if (investmentPaymentStat == null) {
result.error500("未找到对应实体");
} else {
result.setResult(investmentPaymentStat);
result.setSuccess(true);
}
return result;
}
}

View File

@ -11,9 +11,6 @@ public class EngineeringDeviceDto extends EngineeringPageDto{
@ApiModelProperty(value = "工程设备数量")
private Integer deviceNum;
@ApiModelProperty(value = "项目AI预警信息统计")
private String aiAlarmStat;
@ApiModelProperty(value = "AI预警状态(true预警;false正常)")
private Boolean aiAlarmFlag;

View File

@ -34,4 +34,7 @@ public class EngineeringPageDto {
@ApiModelProperty(value = "工程状态(1:未开工;2:在建)")
private Integer state;
@ApiModelProperty(value = "工程AI预警信息统计")
private String aiAlarmStat;
}

View File

@ -11,9 +11,6 @@ public class ProjectDeviceDto extends ProjectPageDto{
@ApiModelProperty(value = "项目设备数量")
private Integer deviceNum;
@ApiModelProperty(value = "项目AI预警信息统计")
private String aiAlarmStat;
@ApiModelProperty(value = "AI预警状态(true预警;false正常)")
private Boolean aiAlarmFlag;

View File

@ -25,4 +25,7 @@ public class ProjectPageDto {
@ApiModelProperty(value = "纬度")
private String latitude;
@ApiModelProperty(value = "项目AI预警信息统计")
private String aiAlarmStat;
}