Commit 4e7f54a3 authored by fangxinjiang's avatar fangxinjiang

项目信息更新接口按项目编码更新

parent 83c46859
......@@ -71,7 +71,9 @@ public class LExcelHeadForIoController {
@GetMapping("/getOwnList/{useCode}")
public R<List<LExcelHeadForIo>> getOwnListByUseCode(@PathVariable("useCode") String useCode) {
YifuUser user = SecurityUtils.getUser();
return new R<>(lExcelHeadForIoService.list(Wrappers.<LExcelHeadForIo>lambdaQuery().eq(LExcelHeadForIo::getCreateUser, String.valueOf(user.getId())).eq(LExcelHeadForIo::getUseCode, useCode)));
return new R<>(lExcelHeadForIoService.list(Wrappers.<LExcelHeadForIo>lambdaQuery()
.eq(LExcelHeadForIo::getCreateUser, String.valueOf(user.getId()))
.eq(LExcelHeadForIo::getUseCode, useCode)));
}
/**
......
......@@ -39,6 +39,7 @@ import com.yifu.cloud.plus.v1.yifu.common.dapr.util.UpmsDaprUtils;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.time.LocalDateTime;
import java.util.ArrayList;
......@@ -119,6 +120,7 @@ public class TSettleDomainServiceImpl extends ServiceImpl<TSettleDomainMapper, T
return sdList;
}
@Transactional
@Override
public R updateProjectInfo(List<TSettleDomain> list) {
if (Common.isNotNull(list)) {
......@@ -153,8 +155,12 @@ public class TSettleDomainServiceImpl extends ServiceImpl<TSettleDomainMapper, T
saveForEkp(res.getData().getUserIds(),tSettleDomain.getId());
}
}
tSettleDomainInfo = baseMapper.selectById(tSettleDomain.getId());
tSettleDomainInfo = baseMapper.selectOne(Wrappers.<TSettleDomain>query().lambda()
.eq(TSettleDomain::getDeleteFlag,CommonConstants.ZERO_STRING)
.eq(TSettleDomain::getDepartNo,tSettleDomain.getDepartNo())
.last(CommonConstants.LAST_ONE_SQL));
if (Common.isNotNull(tSettleDomainInfo)) {
tSettleDomain.setId(tSettleDomainInfo.getId());
baseMapper.updateById(tSettleDomain);
} else {
baseMapper.insert(tSettleDomain);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment