查询问题

This commit is contained in:
2026-06-10 13:08:53 +08:00
parent fcc2e298b2
commit 5d9de2ddea
3 changed files with 7 additions and 6 deletions
@@ -23,7 +23,7 @@ public class ContractLaunchQueryDto extends BasePageDto implements Serializable
/** 合同编号 */
private String contractCode;
/** 合同类型 */
/** 合同类型编码 */
private String contractType;
/** 状态(draft/reviewing/rejected/pending_sign/signing/pending_collect/pending_archive/completed */
@@ -749,6 +749,9 @@ public class ContractLaunchServiceImpl implements ContractLaunchService {
ContractLaunchPartyDto target = new ContractLaunchPartyDto();
target.setRoleCode(source.getRoleCode());
target.setRoleName(source.getRoleName());
// subjectCode 虽然不单独落 party 子表,但复制/变更草稿时仍需沿用,
// 否则后续“我方主体必须包含当前登录主体”校验会误判失败。
target.setSubjectCode(source.getSubjectCode());
target.setPartnerId(source.getPartnerId());
target.setOppositeId(source.getOppositeId());
target.setCompanyName(source.getCompanyName());
@@ -1302,7 +1305,7 @@ public class ContractLaunchServiceImpl implements ContractLaunchService {
.filter(this::isOppositeParty)
.map(item -> {
Map<String, Object> map = new LinkedHashMap<>();
map.put("oppCharacter", "2".equals(item.getOppositeCharacter()) ? "ZZR" : "QY");
map.put("oppCharacter", "2".equals(item.getOppositeCharacter()) || "4".equals(item.getOppositeCharacter()) ? "ZZR" : "QY");
map.put("credirCode", item.getCreditCode());
map.put("idCard", item.getNaturalPersonIdNumber());
map.put("oppositeName", item.getCompanyName());
@@ -1335,9 +1338,7 @@ public class ContractLaunchServiceImpl implements ContractLaunchService {
payload.put("c_weNames", resolveSigningSubjectCodes(contract));
payload.put("c_oppositeNames", contract.getPartyList().stream()
.filter(this::isOppositeParty)
.map(item -> item.getOppositeId() != null && !item.getOppositeId().isBlank()
? item.getOppositeId()
: item.getPartnerId() == null ? null : String.valueOf(item.getPartnerId()))
.map(ContractLaunchPartyDto::getOppositeId)
.filter(Objects::nonNull)
.collect(Collectors.joining(",")));
payload.put("c_textSource", contract.getTextSource());
@@ -246,7 +246,7 @@
and CONTRACT_CODE like CONCAT(CONCAT('%', #{query.contractCode}), '%')
</if>
<if test="query.contractType != null and query.contractType != ''">
and CONTRACT_TYPE = #{query.contractType}
and CONTRACT_TYPE_CODE = #{query.contractType}
</if>
<if test="query.status != null and query.status != ''">
and STATUS = #{query.status}