Merge remote-tracking branch 'origin/master'

This commit is contained in:
liang.chao 2024-12-04 10:58:47 +08:00
commit d509a8d31e
4 changed files with 21 additions and 5 deletions

View File

@ -2,6 +2,7 @@ package com.bonus.material.lease.domain;
import com.bonus.common.core.web.domain.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@ -71,4 +72,9 @@ public class MaLeaseDto extends BaseEntity {
private String orderUser;
@ApiModelProperty(value = "需求发布公司")
private String publishCompany;
@ApiModelProperty(value = "接单公司")
private String orderCompany;
}

View File

@ -81,6 +81,9 @@ public class MaLeaseInfo extends BaseEntity implements Serializable {
*/
private String publishUser;
@ApiModelProperty(value = "需求发布公司")
private String publishCompany;
/**
* 需求截止日期(年月日)
*/
@ -107,6 +110,9 @@ public class MaLeaseInfo extends BaseEntity implements Serializable {
*/
private String orderUser;
@ApiModelProperty(value = "接单公司")
private String orderCompany;
/**
* 接单时间
*/

View File

@ -179,8 +179,8 @@ public class MaLeaseInfoServiceImpl implements MaLeaseInfoService {
@Override
public List<MaLeaseVo> list(MaLeaseDto dto) {
//获取当前登录人id
Long userId = SecurityUtils.getUserId();
dto.setCreateBy(String.valueOf(userId));
String companyId = String.valueOf(SecurityUtils.getLoginUser().getSysUser().getCompanyId());
dto.setPublishCompany(companyId);
List<MaLeaseVo> list = leaseInfoMapper.list(dto);
//查询列表中数据如果需求截止日期超过当前则修改状态为已过期
for (MaLeaseVo maLeaseVo : list) {
@ -260,7 +260,9 @@ public class MaLeaseInfoServiceImpl implements MaLeaseInfoService {
return AjaxResult.error(HttpCodeEnum.TO_PARAM_NULL.getCode(), HttpCodeEnum.TO_PARAM_NULL.getMsg());
}
Long userId = SecurityUtils.getUserId();
Long companyId = SecurityUtils.getLoginUser().getSysUser().getCompanyId();
maLeaseInfo.setOrderUser(String.valueOf(userId));
maLeaseInfo.setOrderCompany(String.valueOf(companyId));
maLeaseInfo.setOrderTime(DateUtils.getNowDate());
maLeaseInfo.setLeaseStatus(LeaseInfoEnum.LEASE_ORDER_RECEIVED.getStatus());
int result = leaseInfoMapper.updateDevInfo(maLeaseInfo);
@ -274,7 +276,7 @@ public class MaLeaseInfoServiceImpl implements MaLeaseInfoService {
*/
@Override
public List<MaLeaseVo> rentList(MaLeaseDto dto) {
dto.setOrderUser(String.valueOf(SecurityUtils.getUserId()));
dto.setOrderCompany(String.valueOf(SecurityUtils.getLoginUser().getSysUser().getCompanyId()));
return leaseInfoMapper.rentList(dto);
}
@ -291,6 +293,7 @@ public class MaLeaseInfoServiceImpl implements MaLeaseInfoService {
maLeaseInfo.setLeaseStatus(LeaseInfoEnum.LEASE_PENDING_ORDER.getStatus());
maLeaseInfo.setStartTime(DateUtils.getNowDate());
maLeaseInfo.setPublishUser(String.valueOf(userId));
maLeaseInfo.setPublishCompany(String.valueOf(SecurityUtils.getLoginUser().getSysUser().getCompanyId()));
}
/**

View File

@ -70,6 +70,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="orderUser != null and orderUser != ''">order_user = #{orderUser},</if>
<if test="orderCompany != null and orderCompany != ''">order_company = #{orderCompany},</if>
<if test="orderTime != null">order_time = #{orderTime},</if>
</trim>
where id = #{id}
@ -196,7 +197,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
LEFT JOIN bm_company_info c ON m.company_id = c.company_id
LEFT JOIN sys_user su ON m.publish_user = su.user_id
LEFT JOIN sys_user su1 ON m.order_user = su1.user_id
WHERE 1 = 1 and m.create_by = #{createBy}
WHERE 1 = 1 and m.publish_company = #{publishCompany}
<if test="leaseCode != null and leaseCode != ''">
and m.lease_code like concat('%',#{leaseCode},'%')
</if>
@ -378,7 +379,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
LEFT JOIN base_address b ON b.id = m.area_id
LEFT JOIN sys_user su ON m.publish_user = su.user_id
LEFT JOIN sys_user su1 ON m.order_user = su1.user_id
WHERE 1 = 1 and m.order_user = #{orderUser} and m.lease_status = '1'
WHERE 1 = 1 and m.order_company = #{orderCompany} and m.lease_status = '1'
<if test="leaseCode != null and leaseCode != ''">
and m.lease_code like concat('%',#{leaseCode},'%')
</if>