领料管理--关联查询
This commit is contained in:
parent
a24d84e624
commit
be257b1912
|
|
@ -1,30 +1,22 @@
|
||||||
package com.bonus.material.lease.controller;
|
package com.bonus.material.lease.controller;
|
||||||
|
|
||||||
import java.util.List;
|
import com.bonus.common.core.utils.poi.ExcelUtil;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import com.bonus.common.core.web.controller.BaseController;
|
||||||
|
import com.bonus.common.core.web.domain.AjaxResult;
|
||||||
|
import com.bonus.common.core.web.page.TableDataInfo;
|
||||||
|
import com.bonus.common.log.annotation.SysLog;
|
||||||
import com.bonus.common.log.enums.OperaType;
|
import com.bonus.common.log.enums.OperaType;
|
||||||
import com.bonus.material.common.annotation.PreventRepeatSubmit;
|
import com.bonus.material.common.annotation.PreventRepeatSubmit;
|
||||||
import com.bonus.material.lease.domain.vo.LeaseApplyRequestVo;
|
import com.bonus.material.lease.domain.LeaseApplyInfo;
|
||||||
|
import com.bonus.material.lease.service.ILeaseApplyInfoService;
|
||||||
import com.bonus.material.task.domain.vo.TmTaskRequestVo;
|
import com.bonus.material.task.domain.vo.TmTaskRequestVo;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
|
||||||
import org.springframework.web.bind.annotation.PutMapping;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
import java.util.List;
|
||||||
import org.springframework.web.bind.annotation.PathVariable;
|
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
import com.bonus.common.log.annotation.SysLog;
|
|
||||||
import com.bonus.common.security.annotation.RequiresPermissions;
|
|
||||||
import com.bonus.material.lease.domain.LeaseApplyInfo;
|
|
||||||
import com.bonus.material.lease.service.ILeaseApplyInfoService;
|
|
||||||
import com.bonus.common.core.web.controller.BaseController;
|
|
||||||
import com.bonus.common.core.web.domain.AjaxResult;
|
|
||||||
import com.bonus.common.core.utils.poi.ExcelUtil;
|
|
||||||
import com.bonus.common.core.web.page.TableDataInfo;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 领料任务Controller
|
* 领料任务Controller
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import com.bonus.common.core.annotation.Excel;
|
import com.bonus.common.core.annotation.Excel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
import lombok.ToString;
|
import lombok.ToString;
|
||||||
import com.bonus.common.core.web.domain.BaseEntity;
|
import com.bonus.common.core.web.domain.BaseEntity;
|
||||||
|
|
||||||
|
|
@ -16,9 +17,11 @@ import com.bonus.common.core.web.domain.BaseEntity;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
@Data
|
@Data
|
||||||
@ToString
|
@ToString
|
||||||
public class LeaseApplyInfo extends BaseEntity {
|
public class LeaseApplyInfo extends BaseEntity {
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
/** ID */
|
/** ID */
|
||||||
|
|
@ -127,5 +130,14 @@ public class LeaseApplyInfo extends BaseEntity {
|
||||||
@ApiModelProperty(value = "费用承担方(01项目03分包)")
|
@ApiModelProperty(value = "费用承担方(01项目03分包)")
|
||||||
private String costBearingParty;
|
private String costBearingParty;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "租赁工程")
|
||||||
|
private String leaseProject;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "租赁单位")
|
||||||
|
private String leaseUnit;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "协议号")
|
||||||
|
private String agreementCode;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -30,41 +30,60 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<result property="leaseType" column="lease_type" />
|
<result property="leaseType" column="lease_type" />
|
||||||
<result property="estimateLeaseTime" column="estimate_lease_time" />
|
<result property="estimateLeaseTime" column="estimate_lease_time" />
|
||||||
<result property="costBearingParty" column="cost_bearing_party" />
|
<result property="costBearingParty" column="cost_bearing_party" />
|
||||||
|
<result property="leaseProject" column="pro_name" />
|
||||||
|
<result property="leaseUnit" column="unit_name" />
|
||||||
|
<result property="agreementCode" column="agreement_code" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectLeaseApplyInfoVo">
|
<sql id="selectLeaseApplyInfoVo">
|
||||||
select id, code, task_id, lease_person, phone, type, company_audit_by, company_audit_time, company_audit_remark, dept_audit_by, dept_audit_time, dept_audit_remark, direct_audit_by, direct_audit_time, direct_audit_remark, create_by, create_time, update_by, update_time, remark, company_id, status, direct_id, lease_type, estimate_lease_time, cost_bearing_party from lease_apply_info
|
select
|
||||||
|
lai.id, lai.code, lai.task_id, lai.lease_person, lai.phone, lai.type, lai.company_audit_by,
|
||||||
|
lai.company_audit_time, lai.company_audit_remark, lai.dept_audit_by, lai.dept_audit_time,
|
||||||
|
lai.dept_audit_remark, lai.direct_audit_by, lai.direct_audit_time, lai.direct_audit_remark,
|
||||||
|
lai.create_by, lai.create_time, lai.update_by, lai.update_time, lai.remark, lai.company_id,
|
||||||
|
lai.status, lai.direct_id, lai.lease_type, lai.estimate_lease_time, lai.cost_bearing_party,
|
||||||
|
bu.unit_name, bp.pro_name, bai.agreement_code
|
||||||
|
from
|
||||||
|
lease_apply_info lai
|
||||||
|
left join
|
||||||
|
tm_task_agreement tta on lai.task_id = tta.task_id
|
||||||
|
left join
|
||||||
|
bm_agreement_info bai on tta.agreement_id = bai.agreement_id
|
||||||
|
left join
|
||||||
|
bm_unit bu on bu.unit_id = bai.unit_id
|
||||||
|
left join
|
||||||
|
bm_project bp on bp.pro_id = bai.project_id
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectLeaseApplyInfoList" parameterType="com.bonus.material.lease.domain.LeaseApplyInfo" resultMap="LeaseApplyInfoResult">
|
<select id="selectLeaseApplyInfoList" parameterType="com.bonus.material.lease.domain.LeaseApplyInfo" resultMap="LeaseApplyInfoResult">
|
||||||
<include refid="selectLeaseApplyInfoVo"/>
|
<include refid="selectLeaseApplyInfoVo"/>
|
||||||
<where>
|
<where>
|
||||||
<if test="code != null and code != ''"> and code = #{code}</if>
|
<if test="code != null and code != ''"> and lai.code = #{code}</if>
|
||||||
<if test="taskId != null "> and task_id = #{taskId}</if>
|
<if test="taskId != null "> and lai.task_id = #{taskId}</if>
|
||||||
<if test="leasePerson != null and leasePerson != ''"> and lease_person = #{leasePerson}</if>
|
<if test="leasePerson != null and leasePerson != ''"> and lai.lease_person = #{leasePerson}</if>
|
||||||
<if test="phone != null and phone != ''"> and phone = #{phone}</if>
|
<if test="phone != null and phone != ''"> and lai.phone = #{phone}</if>
|
||||||
<if test="type != null and type != ''"> and type = #{type}</if>
|
<if test="type != null and type != ''"> and lai.type = #{type}</if>
|
||||||
<if test="companyAuditBy != null "> and company_audit_by = #{companyAuditBy}</if>
|
<if test="companyAuditBy != null "> and lai.company_audit_by = #{companyAuditBy}</if>
|
||||||
<if test="companyAuditTime != null "> and company_audit_time = #{companyAuditTime}</if>
|
<if test="companyAuditTime != null "> and lai.company_audit_time = #{companyAuditTime}</if>
|
||||||
<if test="companyAuditRemark != null and companyAuditRemark != ''"> and company_audit_remark = #{companyAuditRemark}</if>
|
<if test="companyAuditRemark != null and companyAuditRemark != ''"> and lai.company_audit_remark = #{companyAuditRemark}</if>
|
||||||
<if test="deptAuditBy != null "> and dept_audit_by = #{deptAuditBy}</if>
|
<if test="deptAuditBy != null "> and lai.dept_audit_by = #{deptAuditBy}</if>
|
||||||
<if test="deptAuditTime != null "> and dept_audit_time = #{deptAuditTime}</if>
|
<if test="deptAuditTime != null "> and lai.dept_audit_time = #{deptAuditTime}</if>
|
||||||
<if test="deptAuditRemark != null and deptAuditRemark != ''"> and dept_audit_remark = #{deptAuditRemark}</if>
|
<if test="deptAuditRemark != null and deptAuditRemark != ''"> and lai.dept_audit_remark = #{deptAuditRemark}</if>
|
||||||
<if test="directAuditBy != null "> and direct_audit_by = #{directAuditBy}</if>
|
<if test="directAuditBy != null "> and lai.direct_audit_by = #{directAuditBy}</if>
|
||||||
<if test="directAuditTime != null "> and direct_audit_time = #{directAuditTime}</if>
|
<if test="directAuditTime != null "> and lai.direct_audit_time = #{directAuditTime}</if>
|
||||||
<if test="directAuditRemark != null and directAuditRemark != ''"> and direct_audit_remark = #{directAuditRemark}</if>
|
<if test="directAuditRemark != null and directAuditRemark != ''"> and lai.direct_audit_remark = #{directAuditRemark}</if>
|
||||||
<if test="companyId != null "> and company_id = #{companyId}</if>
|
<if test="companyId != null "> and lai.company_id = #{companyId}</if>
|
||||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
<if test="status != null and status != ''"> and lai.status = #{status}</if>
|
||||||
<if test="directId != null "> and direct_id = #{directId}</if>
|
<if test="directId != null "> and lai.direct_id = #{directId}</if>
|
||||||
<if test="leaseType != null and leaseType != ''"> and lease_type = #{leaseType}</if>
|
<if test="leaseType != null and leaseType != ''"> and lai.lease_type = #{leaseType}</if>
|
||||||
<if test="estimateLeaseTime != null "> and estimate_lease_time = #{estimateLeaseTime}</if>
|
<if test="estimateLeaseTime != null "> and lai.estimate_lease_time = #{estimateLeaseTime}</if>
|
||||||
<if test="costBearingParty != null and costBearingParty != ''"> and cost_bearing_party = #{costBearingParty}</if>
|
<if test="costBearingParty != null and costBearingParty != ''"> and lai.cost_bearing_party = #{costBearingParty}</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectLeaseApplyInfoById" parameterType="Long" resultMap="LeaseApplyInfoResult">
|
<select id="selectLeaseApplyInfoById" parameterType="Long" resultMap="LeaseApplyInfoResult">
|
||||||
<include refid="selectLeaseApplyInfoVo"/>
|
<include refid="selectLeaseApplyInfoVo"/>
|
||||||
where id = #{id}
|
where lai.id = #{id}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<insert id="insertLeaseApplyInfo" parameterType="com.bonus.material.lease.domain.LeaseApplyInfo" useGeneratedKeys="true" keyProperty="id">
|
<insert id="insertLeaseApplyInfo" parameterType="com.bonus.material.lease.domain.LeaseApplyInfo" useGeneratedKeys="true" keyProperty="id">
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue