投资支付编辑
This commit is contained in:
parent
5415114245
commit
8f5b72605e
@ -154,4 +154,29 @@ public class GovInvestmentApplyController {
|
|||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑
|
||||||
|
*
|
||||||
|
* @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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -7,6 +7,7 @@ import com.zhgd.annotation.OperLog;
|
|||||||
import com.zhgd.jeecg.common.api.vo.Result;
|
import com.zhgd.jeecg.common.api.vo.Result;
|
||||||
import com.zhgd.jeecg.common.system.query.QueryGenerator;
|
import com.zhgd.jeecg.common.system.query.QueryGenerator;
|
||||||
import com.zhgd.jeecg.common.util.PageUtil;
|
import com.zhgd.jeecg.common.util.PageUtil;
|
||||||
|
import com.zhgd.xmgl.modules.safety.dto.InvestmentPaymentDto;
|
||||||
import com.zhgd.xmgl.modules.safety.entity.InvestmentPayment;
|
import com.zhgd.xmgl.modules.safety.entity.InvestmentPayment;
|
||||||
import com.zhgd.xmgl.modules.safety.service.IInvestmentPaymentService;
|
import com.zhgd.xmgl.modules.safety.service.IInvestmentPaymentService;
|
||||||
import com.zhgd.xmgl.modules.safety.vo.InvestmentPaymentVo;
|
import com.zhgd.xmgl.modules.safety.vo.InvestmentPaymentVo;
|
||||||
@ -58,10 +59,10 @@ public class GovInvestmentPaymentController {
|
|||||||
@ApiImplicitParam(name = "pageSize", value = "每页条数", paramType = "body", required = true, defaultValue = "10", dataType = "Integer")
|
@ApiImplicitParam(name = "pageSize", value = "每页条数", paramType = "body", required = true, defaultValue = "10", dataType = "Integer")
|
||||||
})
|
})
|
||||||
@PostMapping(value = "/page")
|
@PostMapping(value = "/page")
|
||||||
public Result<IPage<InvestmentPayment>> queryPageList(@ApiIgnore @RequestBody Map<String, Object> map) {
|
public Result<IPage<InvestmentPaymentDto>> queryPageList(@ApiIgnore @RequestBody Map<String, Object> map) {
|
||||||
QueryWrapper<InvestmentPayment> queryWrapper = QueryGenerator.initPageQueryWrapper(InvestmentPayment.class, map);
|
QueryWrapper<InvestmentPayment> queryWrapper = QueryGenerator.initPageQueryWrapper(InvestmentPayment.class, map);
|
||||||
Page<InvestmentPayment> page = PageUtil.getPage(map);
|
Page<InvestmentPayment> page = PageUtil.getPage(map);
|
||||||
IPage<InvestmentPayment> pageList = investmentPaymentService.page(page, queryWrapper);
|
IPage<InvestmentPaymentDto> pageList = investmentPaymentService.pageList(page, queryWrapper);
|
||||||
return Result.success(pageList);
|
return Result.success(pageList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -98,4 +98,28 @@ public class GovInvestmentPaymentDetailController {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑
|
||||||
|
*
|
||||||
|
* @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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -97,4 +97,29 @@ public class GovInvestmentPaymentItemController {
|
|||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑
|
||||||
|
*
|
||||||
|
* @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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -74,4 +74,29 @@ public class GovInvestmentPaymentStatController {
|
|||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑
|
||||||
|
*
|
||||||
|
* @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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -115,7 +115,6 @@ public class InvestmentApplyController {
|
|||||||
result.success("操作失败!");
|
result.success("操作失败!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -0,0 +1,16 @@
|
|||||||
|
package com.zhgd.xmgl.modules.safety.dto;
|
||||||
|
|
||||||
|
import com.zhgd.xmgl.modules.safety.entity.InvestmentPayment;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@ApiModel(value = "投资支付支付记录信息(DTO)", description = "InvestmentPaymentDto")
|
||||||
|
public class InvestmentPaymentDto extends InvestmentPayment {
|
||||||
|
|
||||||
|
@ApiModelProperty(value="申报列表")
|
||||||
|
private List<Long> applyIdList;
|
||||||
|
}
|
||||||
@ -1,6 +1,9 @@
|
|||||||
package com.zhgd.xmgl.modules.safety.service;
|
package com.zhgd.xmgl.modules.safety.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.zhgd.xmgl.modules.safety.dto.InvestmentPaymentDto;
|
||||||
import com.zhgd.xmgl.modules.safety.entity.InvestmentPayment;
|
import com.zhgd.xmgl.modules.safety.entity.InvestmentPayment;
|
||||||
import com.zhgd.xmgl.modules.safety.vo.InvestmentPaymentVo;
|
import com.zhgd.xmgl.modules.safety.vo.InvestmentPaymentVo;
|
||||||
|
|
||||||
@ -12,6 +15,8 @@ import com.zhgd.xmgl.modules.safety.vo.InvestmentPaymentVo;
|
|||||||
*/
|
*/
|
||||||
public interface IInvestmentPaymentService extends IService<InvestmentPayment> {
|
public interface IInvestmentPaymentService extends IService<InvestmentPayment> {
|
||||||
|
|
||||||
|
Page<InvestmentPaymentDto> pageList(Page page, Wrapper<InvestmentPayment> wrapper);
|
||||||
|
|
||||||
Long saveInfo(InvestmentPaymentVo investmentPaymentVo);
|
Long saveInfo(InvestmentPaymentVo investmentPaymentVo);
|
||||||
|
|
||||||
boolean updateInfo(InvestmentPaymentVo investmentPaymentVo);
|
boolean updateInfo(InvestmentPaymentVo investmentPaymentVo);
|
||||||
|
|||||||
@ -238,6 +238,7 @@ public class InspectRecordServiceImpl extends ServiceImpl<InspectRecordMapper, I
|
|||||||
inspectRecordVo.setCreateBy(user.getUserId());
|
inspectRecordVo.setCreateBy(user.getUserId());
|
||||||
inspectRecordVo.setQuestionNum(inspectRecordVo.getInspectQuestionList().size());
|
inspectRecordVo.setQuestionNum(inspectRecordVo.getInspectQuestionList().size());
|
||||||
inspectRecordVo.setState(inspectRecordVo.getQuestionNum() == 0 ? 4 : 2);
|
inspectRecordVo.setState(inspectRecordVo.getQuestionNum() == 0 ? 4 : 2);
|
||||||
|
inspectRecordVo.setLevel(inspectRecordVo.getQuestionNum() == 0 ? 2 : 1);
|
||||||
String inspectUser = inspectRecordVo.getInspectUser();
|
String inspectUser = inspectRecordVo.getInspectUser();
|
||||||
inspectRecordVo.setInspectUser(StringUtils.isNotBlank(inspectUser) ? inspectUser + "," + user.getUserId() : user.getUserId());
|
inspectRecordVo.setInspectUser(StringUtils.isNotBlank(inspectUser) ? inspectUser + "," + user.getUserId() : user.getUserId());
|
||||||
if (StringUtils.isNotBlank(inspectRecordVo.getEngineeringSn())) {
|
if (StringUtils.isNotBlank(inspectRecordVo.getEngineeringSn())) {
|
||||||
|
|||||||
@ -1,11 +1,15 @@
|
|||||||
package com.zhgd.xmgl.modules.safety.service.impl;
|
package com.zhgd.xmgl.modules.safety.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
|
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.zhgd.jeecg.common.util.PageUtil;
|
||||||
import com.zhgd.xmgl.modules.basicdata.entity.Engineering;
|
import com.zhgd.xmgl.modules.basicdata.entity.Engineering;
|
||||||
import com.zhgd.xmgl.modules.basicdata.service.IEngineeringService;
|
import com.zhgd.xmgl.modules.basicdata.service.IEngineeringService;
|
||||||
|
import com.zhgd.xmgl.modules.safety.dto.InvestmentPaymentDto;
|
||||||
import com.zhgd.xmgl.modules.safety.entity.InvestmentApply;
|
import com.zhgd.xmgl.modules.safety.entity.InvestmentApply;
|
||||||
import com.zhgd.xmgl.modules.safety.entity.InvestmentContract;
|
import com.zhgd.xmgl.modules.safety.entity.InvestmentContract;
|
||||||
import com.zhgd.xmgl.modules.safety.entity.InvestmentPayment;
|
import com.zhgd.xmgl.modules.safety.entity.InvestmentPayment;
|
||||||
@ -39,6 +43,20 @@ public class InvestmentPaymentServiceImpl extends ServiceImpl<InvestmentPaymentM
|
|||||||
@Autowired
|
@Autowired
|
||||||
private IInvestmentContractService investmentContractService;
|
private IInvestmentContractService investmentContractService;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Page<InvestmentPaymentDto> pageList(Page page, Wrapper<InvestmentPayment> wrapper) {
|
||||||
|
Page<InvestmentPaymentDto> investmentPaymentVoPage = PageUtil.copyProperties(baseMapper.selectPage(page, wrapper), InvestmentPaymentDto.class);
|
||||||
|
List<Long> investmentIds = investmentPaymentVoPage.getRecords().stream().map(i -> i.getId()).collect(Collectors.toList());
|
||||||
|
if (investmentIds.size() > 0) {
|
||||||
|
List<Long> investmentApplyList = investmentApplyService.list(Wrappers.<InvestmentApply>lambdaQuery().in(InvestmentApply::getInvestmentPaymentId, investmentIds))
|
||||||
|
.stream().map(InvestmentApply::getInvestmentPaymentId).collect(Collectors.toList());
|
||||||
|
for (InvestmentPaymentDto investmentApply : investmentPaymentVoPage.getRecords()) {
|
||||||
|
investmentApply.setApplyIdList(investmentApplyList.stream().filter(i -> i.equals(investmentApply.getId())).collect(Collectors.toList()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return investmentPaymentVoPage;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Long saveInfo(InvestmentPaymentVo investmentPaymentVo) {
|
public Long saveInfo(InvestmentPaymentVo investmentPaymentVo) {
|
||||||
if (StringUtils.isNotBlank(investmentPaymentVo.getEngineeringSn())) {
|
if (StringUtils.isNotBlank(investmentPaymentVo.getEngineeringSn())) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user