租赁协议

This commit is contained in:
liang.chao 2024-12-17 20:32:08 +08:00
parent b82f29335a
commit fedadfcd3c
7 changed files with 21 additions and 6 deletions

View File

@ -15,6 +15,7 @@ import lombok.NoArgsConstructor;
@NoArgsConstructor
public class CompanyPersonPhoneKey {
private String companyName;
private String companyId;
private String person;
private String personPhone;
}

View File

@ -77,6 +77,7 @@ public class BookCarServiceImpl implements BookCarService {
Map<CompanyPersonPhoneKey, List<DevInfoVo>> groupedByKey = bookCarDetails.stream()
.collect(Collectors.groupingBy(bookCarDetail -> new CompanyPersonPhoneKey(
bookCarDetail.getCompanyName(),
bookCarDetail.getCompanyId(),
bookCarDetail.getPerson(),
bookCarDetail.getPersonPhone()
)));

View File

@ -29,4 +29,6 @@ public interface BmContractMapper {
List<BmContract> lisTemplate(BmContract bmContract);
BmContract disclaimer();
BmContract getContract(BmContract bmContract);
}

View File

@ -24,4 +24,6 @@ public interface BmContractService {
List<BmContract> lisTemplate(BmContract bmContract);
BmContract disclaimer();
BmContract getContract(BmContract bmContract);
}

View File

@ -125,6 +125,12 @@ public class BmContractServiceImpl implements BmContractService {
return bmContractMapper.disclaimer();
}
@Override
public BmContract getContract(BmContract bmContract) {
bmContract.setStatus(1);
return bmContractMapper.getContract(bmContract);
}
private String getString() {
//根据前台传过来的数据生成需求编号
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMdd");

View File

@ -375,14 +375,13 @@ public class OrderController extends BaseController {
replacements.put("orderTable", orderDetail);
BmContract bmContract = new BmContract();
bmContract.setStatus(1);
List<BmContract> list = bmContractService.list(bmContract);
String content = list.get(0).getContent();
if (StringUtils.isBlank(content)) {
content = bmContractService.lisTemplate(bmContract).get(0).getContent();
BmContract bmContracts = bmContractService.getContract(bmContract);
if (StringUtils.isBlank(bmContracts.getContent())) {
bmContracts.setContent(bmContractService.lisTemplate(bmContract).get(0).getContent());
}
StrSubstitutor sub = new StrSubstitutor(replacements);
String result = sub.replace(content);
String result = sub.replace(bmContracts.getContent());
return AjaxResult.success(result);
} else {
return AjaxResult.error("参数错误");

View File

@ -57,4 +57,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="disclaimer" resultType="com.bonus.material.contract.domain.BmContract">
select content from bm_book_contract limit 1
</select>
<select id="getContract" resultType="com.bonus.material.contract.domain.BmContract">
select content from bm_contract
where owner_com = #{companyId} and status = #{status}
</select>
</mapper>