企业端我的我的合同接口添加
This commit is contained in:
+48
-8
@@ -26,7 +26,8 @@ import com.jero.contract.service.IPayIncomeContractAuditService;
|
||||
import com.jero.contract.service.IPayIncomeContractInstallmentService;
|
||||
import com.jero.contract.service.IPayIncomeContractService;
|
||||
import com.jero.contract.vo.*;
|
||||
import com.jero.temporary.entity.PayCompanyManagementTemporary;
|
||||
import com.jero.mail.entity.PayMailContract;
|
||||
import com.jero.mail.service.IPayMailContractService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -38,10 +39,10 @@ import org.jeecgframework.poi.excel.def.MapExcelConstants;
|
||||
import org.jeecgframework.poi.excel.entity.ExportParams;
|
||||
import org.jeecgframework.poi.excel.entity.params.ExcelExportEntity;
|
||||
import org.jeecgframework.poi.excel.view.JeecgMapExcelView;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.core.env.Environment;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.text.SimpleDateFormat;
|
||||
@@ -59,18 +60,20 @@ import java.util.stream.Collectors;
|
||||
@RequestMapping("/contract/payIncomeContract")
|
||||
@Slf4j
|
||||
public class PayIncomeContractController extends JeroController<PayIncomeContract, IPayIncomeContractService> {
|
||||
@Autowired
|
||||
@Resource
|
||||
private IPayIncomeContractService payIncomeContractService;
|
||||
@Autowired
|
||||
@Resource
|
||||
private IPayIncomeContractInstallmentService payIncomeContractInstallmentService;
|
||||
@Autowired
|
||||
@Resource
|
||||
private IPayIncomeContractAuditService payIncomeContractAuditService;
|
||||
@Autowired
|
||||
@Resource
|
||||
private Environment env;
|
||||
@Autowired
|
||||
@Resource
|
||||
private ISysBaseAPI sysBaseAPI;
|
||||
@Autowired
|
||||
@Resource
|
||||
private IPayIncomeContractAssociatedService payIncomeContractAssociatedService;
|
||||
@Resource
|
||||
private IPayMailContractService payMailContractService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
@@ -372,6 +375,43 @@ public class PayIncomeContractController extends JeroController<PayIncomeContrac
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 企业端-通过id查询详情
|
||||
*
|
||||
* @param id 合同id
|
||||
*/
|
||||
@ApiOperation(value="收入合同-企业端-通过id查询详情", notes="收入合同-企业端-通过id查询详情")
|
||||
@GetMapping(value = "/queryCompanyById")
|
||||
public Result<?> queryCompanyById(@RequestParam(name="id") String id) {
|
||||
if(StringUtils.isBlank(id)){
|
||||
return Result.error("id不能为空!");
|
||||
}
|
||||
PayIncomeContract payIncomeContract = payIncomeContractService.getById(id);
|
||||
if(payIncomeContract==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
String str = JSON.toJSONString(payIncomeContract);
|
||||
PayIncomeContractDetailOutput payIncomeContractDetailOutput = JSONObject.parseObject(str,PayIncomeContractDetailOutput.class);
|
||||
// 获取关联项目id
|
||||
List<ProjectOutput> listProject = payIncomeContractService.getAssociated(id);
|
||||
LambdaQueryWrapper<PayMailContract> queryPayMailContract = new LambdaQueryWrapper<>();
|
||||
queryPayMailContract.eq(PayMailContract::getContractId,id);
|
||||
queryPayMailContract.eq(PayMailContract::getPostStatus,PayIncomeContractCommon.POST_STATUS1);
|
||||
PayMailContract payMailContract = payMailContractService.getOne(queryPayMailContract);
|
||||
if(!Objects.isNull(payMailContract)){
|
||||
payIncomeContractDetailOutput.setPayMailContract(payMailContract);
|
||||
}
|
||||
if(!CollectionUtils.isEmpty(listProject)){
|
||||
listProject.forEach(p->{
|
||||
if(!Objects.isNull(p.getChargeUse())){
|
||||
p.setChargeUse_dictText(sysBaseAPI.translateDict("payment_charge_use",String.valueOf(p.getChargeUse())));
|
||||
}
|
||||
});
|
||||
payIncomeContractDetailOutput.setListProject(listProject);
|
||||
}
|
||||
return Result.OK(payIncomeContractDetailOutput);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询详情
|
||||
*
|
||||
|
||||
+6
@@ -3,6 +3,7 @@ package com.jero.contract.vo;
|
||||
import com.jero.contract.entity.PayIncomeContract;
|
||||
import com.jero.contract.entity.PayIncomeContractAudit;
|
||||
import com.jero.contract.entity.PayIncomeContractInstallment;
|
||||
import com.jero.mail.entity.PayMailContract;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@@ -48,4 +49,9 @@ public class PayIncomeContractDetailOutput extends PayIncomeContract implements
|
||||
*/
|
||||
@ApiModelProperty(value = "审核记录")
|
||||
private List<PayIncomeContractAuditOutput> listAudit;
|
||||
/**
|
||||
* 邮寄信息
|
||||
*/
|
||||
@ApiModelProperty(value = "邮寄信息")
|
||||
private PayMailContract payMailContract;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user