生成合同

This commit is contained in:
1073413548 2024-08-29 16:50:12 +08:00
parent 46a39df0e6
commit 2c6d54af7f
5 changed files with 6 additions and 6 deletions

View File

@ -101,7 +101,7 @@ public class CalSalaryBatch {
Long userId = user.getUserId();
//默认员工仅有一个岗位
log.info("查询员工岗位{}",userId);
SysUserPost post = sysUserPostMapper.selectOne(new LambdaQueryWrapper<SysUserPost>().eq(SysUserPost::getUserId, userId));
SysUserPost post = sysUserPostMapper.selectOne(new LambdaQueryWrapper<SysUserPost>().eq(SysUserPost::getUserId, userId).last("limit 1"));
if(post == null){continue;}
log.info("查询员工岗位{}",post.getPostId());
//服务列表

View File

@ -129,7 +129,7 @@ public class PsApproverRecordServiceImpl implements IPsApproverRecordService {
.eq(StringUtils.isNotBlank(businessId), PsApproverRecord::getBusinessId, businessId)
.eq(StringUtils.isNotBlank(contractCode), PsApproverRecord::getContractCode, contractCode)
.in(CollectionUtils.isNotEmpty(businessTypes), PsApproverRecord::getBusinessType, businessTypes)
.orderByDesc(PsApproverRecord::getApplyDate));
.orderByDesc(PsApproverRecord::getApplyDate).last("limit 1"));
return record!=null&&StringUtils.equals(ApproverStatusEnum.FAIL.getCode(),record.getApproverStatus())
?record.getApproverDesc():null;
}

View File

@ -660,7 +660,7 @@ public class PsContractInfoServiceImpl implements IPsContractInfoService {
PsContractInfo add =null;
//插入或修改合同
log.info("校验合同查询入参:{}",bo.getCustomId());
List<PsContractInfo> infos = this.queryByCode(bo.getCustomId(),null,ContractStatusEnum.INIT.getCode());//todo 状态查询
List<PsContractInfo> infos = this.queryByCode(bo.getCustomId(),null,ContractStatusEnum.INIT.getCode());
log.info("校验合同查询结果:{}",infos == null?null: infos.size() );
//校验暂存的合同不止一个暂存的合同并且不是传入的合同-报错暂存的合同只能有一个
if (CollectionUtils.isNotEmpty(infos) ) {

View File

@ -332,7 +332,7 @@ public class PsCustomInfoServiceImpl implements IPsCustomInfoService {
public Boolean insertPiceByBo(List<PsCustomPriceBo> bos) {
List<PsCustomPrice> adds = MapstructUtils.convert(bos, PsCustomPrice.class);
PsCustomPrice price = priceMapper.selectOne(new QueryWrapper<PsCustomPrice>().select("max(price_batch) price_batch")
.lambda().eq(PsCustomPrice::getDelFlag, 0).eq(PsCustomPrice::getCustomId, bos.get(0).getCustomId()));
.lambda().eq(PsCustomPrice::getDelFlag, 0).eq(PsCustomPrice::getCustomId, bos.get(0).getCustomId()).last("limit 1"));
adds.forEach(add->{
add.setPriceBatch((price != null && price.getPriceBatch() != null) ? price.getPriceBatch() + 1 : 1);
});
@ -384,7 +384,7 @@ public class PsCustomInfoServiceImpl implements IPsCustomInfoService {
}
//免费工单审批
list.getRecords().forEach(item->{
item.setFreeFailDesc(approverRecordService.getLastFail(item.getId()+"",null,List.of(ApproverTypeEnum.PAY.getCode())));
item.setFreeFailDesc(approverRecordService.getLastFail(item.getId()+"",null,List.of(ApproverTypeEnum.FREE.getCode())));
});
return TableDataInfo.build(list);
}

View File

@ -161,7 +161,7 @@ public class PsTaskServiceImpl implements IPsTaskService {
Long customId ;
Long companyId ;
if(mainTask == null){
PsContractInfo con = contractInfoMapper.selectOne(Wrappers.<PsContractInfo>lambdaQuery().eq(PsContractInfo::getContractCode, id));
PsContractInfo con = contractInfoMapper.selectOne(Wrappers.<PsContractInfo>lambdaQuery().eq(PsContractInfo::getContractCode, id).last("limit 1"));
customId = con.getCustomId();
companyId = con.getCompanyId();
}else{