Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
4c998e6391
|
|
@ -3,6 +3,7 @@ package com.bonus.material.back.controller;
|
|||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import com.bonus.common.log.enums.OperaType;
|
||||
import com.bonus.common.security.annotation.RequiresPermissions;
|
||||
import com.bonus.material.common.annotation.PreventRepeatSubmit;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
|
|
@ -16,7 +17,6 @@ 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.back.domain.BackApplyDetails;
|
||||
import com.bonus.material.back.service.IBackApplyDetailsService;
|
||||
import com.bonus.common.core.web.controller.BaseController;
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
|
|
@ -63,7 +64,7 @@ public class LeaseApplyInfoController extends BaseController {
|
|||
@ApiOperation(value = "获取领料任务详细信息")
|
||||
//@RequiresPermissions("lease:info:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
||||
public AjaxResult getInfo(@PathVariable("id") @NotNull(message = "领料任务ID不能为空") Long id) {
|
||||
return success(leaseApplyInfoService.selectLeaseApplyInfoById(id));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -16,7 +16,6 @@ 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.LeaseOutDetails;
|
||||
import com.bonus.material.lease.service.ILeaseOutDetailsService;
|
||||
import com.bonus.common.core.web.controller.BaseController;
|
||||
|
|
@ -34,6 +33,7 @@ import com.bonus.common.core.web.page.TableDataInfo;
|
|||
@RestController
|
||||
@RequestMapping("/lease_out_details")
|
||||
public class LeaseOutDetailsController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private ILeaseOutDetailsService leaseOutDetailsService;
|
||||
|
||||
|
|
@ -41,7 +41,6 @@ public class LeaseOutDetailsController extends BaseController {
|
|||
* 查询领料出库详细列表
|
||||
*/
|
||||
@ApiOperation(value = "查询领料出库详细列表")
|
||||
@RequiresPermissions("lease:details:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(LeaseOutDetails leaseOutDetails) {
|
||||
startPage();
|
||||
|
|
@ -54,12 +53,11 @@ public class LeaseOutDetailsController extends BaseController {
|
|||
*/
|
||||
@ApiOperation(value = "导出领料出库详细列表")
|
||||
@PreventRepeatSubmit
|
||||
@RequiresPermissions("lease:details:export")
|
||||
@SysLog(title = "领料出库详细", businessType = OperaType.EXPORT, logType = 1,module = "仓储管理->导出领料出库详细")
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, LeaseOutDetails leaseOutDetails) {
|
||||
List<LeaseOutDetails> list = leaseOutDetailsService.selectLeaseOutDetailsList(leaseOutDetails);
|
||||
ExcelUtil<LeaseOutDetails> util = new ExcelUtil<LeaseOutDetails>(LeaseOutDetails.class);
|
||||
ExcelUtil<LeaseOutDetails> util = new ExcelUtil<>(LeaseOutDetails.class);
|
||||
util.exportExcel(response, list, "领料出库详细数据");
|
||||
}
|
||||
|
||||
|
|
@ -67,7 +65,6 @@ public class LeaseOutDetailsController extends BaseController {
|
|||
* 获取领料出库详细详细信息
|
||||
*/
|
||||
@ApiOperation(value = "获取领料出库详细详细信息")
|
||||
@RequiresPermissions("lease:details:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
||||
return success(leaseOutDetailsService.selectLeaseOutDetailsById(id));
|
||||
|
|
@ -78,7 +75,6 @@ public class LeaseOutDetailsController extends BaseController {
|
|||
*/
|
||||
@ApiOperation(value = "新增领料出库详细")
|
||||
@PreventRepeatSubmit
|
||||
@RequiresPermissions("lease:details:add")
|
||||
@SysLog(title = "领料出库详细", businessType = OperaType.INSERT, logType = 1,module = "仓储管理->新增领料出库详细")
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody List<LeaseOutDetails> leaseOutDetailsList) {
|
||||
|
|
@ -94,7 +90,6 @@ public class LeaseOutDetailsController extends BaseController {
|
|||
*/
|
||||
@ApiOperation(value = "修改领料出库详细")
|
||||
@PreventRepeatSubmit
|
||||
@RequiresPermissions("lease:details:edit")
|
||||
@SysLog(title = "领料出库详细", businessType = OperaType.UPDATE, logType = 1,module = "仓储管理->修改领料出库详细")
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody LeaseOutDetails leaseOutDetails) {
|
||||
|
|
@ -110,7 +105,6 @@ public class LeaseOutDetailsController extends BaseController {
|
|||
*/
|
||||
@ApiOperation(value = "删除领料出库详细")
|
||||
@PreventRepeatSubmit
|
||||
@RequiresPermissions("lease:details:remove")
|
||||
@SysLog(title = "领料出库详细", businessType = OperaType.DELETE, logType = 1,module = "仓储管理->删除领料出库详细")
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
|
|
|
|||
|
|
@ -56,5 +56,20 @@ public class LeaseApplyDetails extends BaseEntity {
|
|||
@ApiModelProperty(value = "数据所属组织")
|
||||
private Long companyId;
|
||||
|
||||
public LeaseApplyDetails(Long id, Long parentId, Long typeId, Long preNum, Long auditNum, Long alNum, String status, Long companyId) {
|
||||
this.id = id;
|
||||
this.parentId = parentId;
|
||||
this.typeId = typeId;
|
||||
this.preNum = preNum;
|
||||
this.auditNum = auditNum;
|
||||
this.alNum = alNum;
|
||||
this.status = status;
|
||||
this.companyId = companyId;
|
||||
}
|
||||
|
||||
public LeaseApplyDetails() {}
|
||||
|
||||
public LeaseApplyDetails(Long parentId) {
|
||||
this.parentId = parentId;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -139,9 +139,15 @@ public class LeaseApplyInfo extends BaseEntity {
|
|||
@ApiModelProperty(value = "租赁工程")
|
||||
private String leaseProject;
|
||||
|
||||
@ApiModelProperty(value = "租赁工程id")
|
||||
private Integer leaseProjectId;
|
||||
|
||||
@ApiModelProperty(value = "租赁单位")
|
||||
private String leaseUnit;
|
||||
|
||||
@ApiModelProperty(value = "租赁单位id")
|
||||
private Integer leaseUnitId;
|
||||
|
||||
@ApiModelProperty(value = "协议号")
|
||||
private String agreementCode;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,15 +1,12 @@
|
|||
package com.bonus.material.lease.domain.vo;
|
||||
|
||||
import com.bonus.common.core.annotation.Excel;
|
||||
import com.bonus.common.core.web.domain.BaseEntity;
|
||||
import com.bonus.material.lease.domain.LeaseApplyDetails;
|
||||
import com.bonus.material.lease.domain.LeaseApplyInfo;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
|
|
@ -20,6 +17,7 @@ import java.util.List;
|
|||
*/
|
||||
|
||||
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Data
|
||||
@ToString
|
||||
public class LeaseApplyRequestVo extends BaseEntity {
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ public interface LeaseApplyDetailsMapper {
|
|||
* @param id 领料任务详细主键
|
||||
* @return 领料任务详细
|
||||
*/
|
||||
public LeaseApplyDetails selectLeaseApplyDetailsById(Long id);
|
||||
LeaseApplyDetails selectLeaseApplyDetailsById(Long id);
|
||||
|
||||
/**
|
||||
* 查询领料任务详细列表
|
||||
|
|
@ -24,7 +24,7 @@ public interface LeaseApplyDetailsMapper {
|
|||
* @param leaseApplyDetails 领料任务详细
|
||||
* @return 领料任务详细集合
|
||||
*/
|
||||
public List<LeaseApplyDetails> selectLeaseApplyDetailsList(LeaseApplyDetails leaseApplyDetails);
|
||||
List<LeaseApplyDetails> selectLeaseApplyDetailsList(LeaseApplyDetails leaseApplyDetails);
|
||||
|
||||
/**
|
||||
* 新增领料任务详细
|
||||
|
|
@ -32,9 +32,9 @@ public interface LeaseApplyDetailsMapper {
|
|||
* @param leaseApplyDetails 领料任务详细
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertLeaseApplyDetails(LeaseApplyDetails leaseApplyDetails);
|
||||
int insertLeaseApplyDetails(LeaseApplyDetails leaseApplyDetails);
|
||||
|
||||
public int insertLeaseApplyDetailsList(List<LeaseApplyDetails> leaseApplyDetails);
|
||||
int insertLeaseApplyDetailsList(List<LeaseApplyDetails> leaseApplyDetails);
|
||||
|
||||
/**
|
||||
* 修改领料任务详细
|
||||
|
|
@ -42,7 +42,7 @@ public interface LeaseApplyDetailsMapper {
|
|||
* @param leaseApplyDetails 领料任务详细
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateLeaseApplyDetails(LeaseApplyDetails leaseApplyDetails);
|
||||
int updateLeaseApplyDetails(LeaseApplyDetails leaseApplyDetails);
|
||||
|
||||
/**
|
||||
* 删除领料任务详细
|
||||
|
|
@ -50,7 +50,7 @@ public interface LeaseApplyDetailsMapper {
|
|||
* @param id 领料任务详细主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteLeaseApplyDetailsById(Long id);
|
||||
int deleteLeaseApplyDetailsById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除领料任务详细
|
||||
|
|
@ -58,9 +58,9 @@ public interface LeaseApplyDetailsMapper {
|
|||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteLeaseApplyDetailsByIds(Long[] ids);
|
||||
int deleteLeaseApplyDetailsByIds(Long[] ids);
|
||||
|
||||
public int deleteLeaseApplyDetailsByParentIds(Long[] ids);
|
||||
int deleteLeaseApplyDetailsByParentIds(Long[] ids);
|
||||
|
||||
List<LeaseApplyDetails> getByParentId(Long parentId);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,6 +32,14 @@ public interface LeaseOutDetailsMapper {
|
|||
*/
|
||||
public List<LeaseOutDetails> selectLeaseOutDetailsList(LeaseOutDetails leaseOutDetails);
|
||||
|
||||
/**
|
||||
* 查询领料出库详细列表--by任务id
|
||||
*
|
||||
* @param parentId 任务id
|
||||
* @return 领料出库详细集合
|
||||
*/
|
||||
List<LeaseOutDetails> selectLeaseOutDetailsListByParentId(String parentId);
|
||||
|
||||
/**
|
||||
* 新增领料出库详细
|
||||
*
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ public interface ILeaseApplyInfoService {
|
|||
* @param id 领料任务主键
|
||||
* @return 领料任务
|
||||
*/
|
||||
public LeaseApplyInfo selectLeaseApplyInfoById(Long id);
|
||||
LeaseApplyRequestVo selectLeaseApplyInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 查询领料任务列表
|
||||
|
|
@ -28,7 +28,7 @@ public interface ILeaseApplyInfoService {
|
|||
* @param leaseApplyInfo 领料任务
|
||||
* @return 领料任务集合
|
||||
*/
|
||||
public List<LeaseApplyInfo> selectLeaseApplyInfoList(LeaseApplyInfo leaseApplyInfo);
|
||||
List<LeaseApplyInfo> selectLeaseApplyInfoList(LeaseApplyInfo leaseApplyInfo);
|
||||
|
||||
/**
|
||||
* 新增领料任务
|
||||
|
|
@ -36,7 +36,7 @@ public interface ILeaseApplyInfoService {
|
|||
* @param leaseApplyRequestVo 领料任务
|
||||
* @return 结果
|
||||
*/
|
||||
public AjaxResult insertLeaseApplyInfo(TmTaskRequestVo leaseApplyRequestVo);
|
||||
AjaxResult insertLeaseApplyInfo(TmTaskRequestVo leaseApplyRequestVo);
|
||||
|
||||
/**
|
||||
* 修改领料任务
|
||||
|
|
@ -44,7 +44,7 @@ public interface ILeaseApplyInfoService {
|
|||
* @param tmTaskRequestVo 领料任务
|
||||
* @return 结果
|
||||
*/
|
||||
public boolean updateLeaseApplyInfo(TmTaskRequestVo tmTaskRequestVo);
|
||||
boolean updateLeaseApplyInfo(TmTaskRequestVo tmTaskRequestVo);
|
||||
|
||||
/**
|
||||
* 批量删除领料任务
|
||||
|
|
@ -52,7 +52,7 @@ public interface ILeaseApplyInfoService {
|
|||
* @param ids 需要删除的领料任务主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteLeaseApplyInfoByIds(Long[] ids);
|
||||
int deleteLeaseApplyInfoByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除领料任务信息
|
||||
|
|
@ -60,5 +60,5 @@ public interface ILeaseApplyInfoService {
|
|||
* @param id 领料任务主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteLeaseApplyInfoById(Long id);
|
||||
int deleteLeaseApplyInfoById(Long id);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package com.bonus.material.lease.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
import com.bonus.common.biz.constant.MaterialConstants;
|
||||
import com.bonus.common.biz.enums.PurchaseTaskStatusEnum;
|
||||
|
|
@ -9,12 +10,9 @@ import com.bonus.common.core.exception.ServiceException;
|
|||
import com.bonus.common.core.utils.DateUtils;
|
||||
import com.bonus.common.core.web.domain.AjaxResult;
|
||||
import com.bonus.common.security.utils.SecurityUtils;
|
||||
import com.bonus.material.basic.domain.BmFileInfo;
|
||||
import com.bonus.material.lease.domain.LeaseApplyDetails;
|
||||
import com.bonus.material.lease.domain.vo.LeaseApplyRequestVo;
|
||||
import com.bonus.material.lease.mapper.LeaseApplyDetailsMapper;
|
||||
import com.bonus.material.purchase.domain.PurchaseCheckDetails;
|
||||
import com.bonus.material.purchase.domain.dto.PurchaseCheckDto;
|
||||
import com.bonus.material.task.domain.TmTask;
|
||||
import com.bonus.material.task.domain.TmTaskAgreement;
|
||||
import com.bonus.material.task.domain.vo.TmTaskRequestVo;
|
||||
|
|
@ -50,6 +48,7 @@ public class LeaseApplyInfoServiceImpl implements ILeaseApplyInfoService {
|
|||
@Resource
|
||||
TmTaskAgreementMapper tmTaskAgreementMapper;
|
||||
|
||||
|
||||
/**
|
||||
* 查询领料任务
|
||||
*
|
||||
|
|
@ -57,10 +56,29 @@ public class LeaseApplyInfoServiceImpl implements ILeaseApplyInfoService {
|
|||
* @return 领料任务
|
||||
*/
|
||||
@Override
|
||||
public LeaseApplyInfo selectLeaseApplyInfoById(Long id) {
|
||||
return leaseApplyInfoMapper.selectLeaseApplyInfoById(id);
|
||||
public LeaseApplyRequestVo selectLeaseApplyInfoById(Long id) {
|
||||
try {
|
||||
Optional<LeaseApplyInfo> optionalInfo = Optional.ofNullable(leaseApplyInfoMapper.selectLeaseApplyInfoById(id));
|
||||
LeaseApplyRequestVo leaseApplyRequestVo = new LeaseApplyRequestVo();
|
||||
|
||||
optionalInfo.ifPresent(info -> {
|
||||
leaseApplyRequestVo.setLeaseApplyInfo(info);
|
||||
// 获取领料单详情
|
||||
List<LeaseApplyDetails> details = leaseApplyDetailsMapper.selectLeaseApplyDetailsList(new LeaseApplyDetails(info.getTaskId()));
|
||||
if (!CollectionUtils.isEmpty(details)) {
|
||||
leaseApplyRequestVo.setLeaseApplyDetailsList(details);
|
||||
}
|
||||
});
|
||||
|
||||
return leaseApplyRequestVo;
|
||||
} catch (Exception e) {
|
||||
// 记录异常日志
|
||||
System.err.println("Error occurred while selecting lease apply info by ID: " + id + e.getMessage());
|
||||
throw new RuntimeException("Failed to select lease apply info", e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询领料任务列表
|
||||
*
|
||||
|
|
|
|||
|
|
@ -25,25 +25,29 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</sql>
|
||||
|
||||
<sql id="selectLeaseApplyDetailsVo">
|
||||
select id, parent_id, type_id, pre_num, audit_num, al_num, status, create_by, create_time, update_by, update_time, remark, company_id from lease_apply_details
|
||||
select
|
||||
lad.id, lad.parent_id, lad.type_id, lad.pre_num, lad.audit_num, lad.al_num, lad.status,
|
||||
lad.create_by, lad.create_time, lad.update_by, lad.update_time, lad.remark, lad.company_id
|
||||
from
|
||||
lease_apply_details lad
|
||||
</sql>
|
||||
|
||||
<select id="selectLeaseApplyDetailsList" parameterType="com.bonus.material.lease.domain.LeaseApplyDetails" resultMap="LeaseApplyDetailsResult">
|
||||
<include refid="selectLeaseApplyDetailsVo"/>
|
||||
<where>
|
||||
<if test="parentId != null "> and parent_id = #{parentId}</if>
|
||||
<if test="typeId != null "> and type_id = #{typeId}</if>
|
||||
<if test="preNum != null "> and pre_num = #{preNum}</if>
|
||||
<if test="auditNum != null "> and audit_num = #{auditNum}</if>
|
||||
<if test="alNum != null "> and al_num = #{alNum}</if>
|
||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||
<if test="companyId != null "> and company_id = #{companyId}</if>
|
||||
<if test="parentId != null "> and lad.parent_id = #{parentId}</if>
|
||||
<if test="typeId != null "> and lad.type_id = #{typeId}</if>
|
||||
<if test="preNum != null "> and lad.pre_num = #{preNum}</if>
|
||||
<if test="auditNum != null "> and lad.audit_num = #{auditNum}</if>
|
||||
<if test="alNum != null "> and lad.al_num = #{alNum}</if>
|
||||
<if test="status != null and status != ''"> and lad.status = #{status}</if>
|
||||
<if test="companyId != null "> and lad.company_id = #{companyId}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectLeaseApplyDetailsById" parameterType="Long" resultMap="LeaseApplyDetailsResult">
|
||||
<include refid="selectLeaseApplyDetailsVo"/>
|
||||
where id = #{id}
|
||||
where lad.id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertLeaseApplyDetails" parameterType="com.bonus.material.lease.domain.LeaseApplyDetails" useGeneratedKeys="true" keyProperty="id">
|
||||
|
|
|
|||
|
|
@ -31,7 +31,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<result property="estimateLeaseTime" column="estimate_lease_time" />
|
||||
<result property="costBearingParty" column="cost_bearing_party" />
|
||||
<result property="leaseProject" column="pro_name" />
|
||||
<result property="leaseProjectId" column="project_id" />
|
||||
<result property="leaseUnit" column="unit_name" />
|
||||
<result property="leaseUnitId" column="unit_id" />
|
||||
<result property="agreementCode" column="agreement_code" />
|
||||
</resultMap>
|
||||
|
||||
|
|
@ -42,7 +44,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
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
|
||||
bai.unit_id,bai.project_id,bu.unit_name, bp.pro_name, bai.agreement_code
|
||||
from
|
||||
lease_apply_info lai
|
||||
left join
|
||||
|
|
|
|||
|
|
@ -21,26 +21,37 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</resultMap>
|
||||
|
||||
<sql id="selectLeaseOutDetailsVo">
|
||||
select id, parent_id, type_id, ma_id, out_num, out_type, create_by, create_time, update_by, update_time, remark, company_id, car_code, push_notifications from lease_out_details
|
||||
select
|
||||
lod.id, lod.parent_id, lod.type_id, lod.ma_id, lod.out_num, lod.out_type, lod.create_by, lod.create_time,
|
||||
lod.update_by, lod.update_time, lod.remark, lod.company_id, lod.car_code, lod.push_notifications
|
||||
from
|
||||
lease_out_details lod
|
||||
</sql>
|
||||
|
||||
<select id="selectLeaseOutDetailsList" parameterType="com.bonus.material.lease.domain.LeaseOutDetails" resultMap="LeaseOutDetailsResult">
|
||||
<include refid="selectLeaseOutDetailsVo"/>
|
||||
<where>
|
||||
<if test="parentId != null "> and parent_id = #{parentId}</if>
|
||||
<if test="typeId != null "> and type_id = #{typeId}</if>
|
||||
<if test="maId != null "> and ma_id = #{maId}</if>
|
||||
<if test="outNum != null "> and out_num = #{outNum}</if>
|
||||
<if test="outType != null and outType != ''"> and out_type = #{outType}</if>
|
||||
<if test="companyId != null "> and company_id = #{companyId}</if>
|
||||
<if test="carCode != null and carCode != ''"> and car_code = #{carCode}</if>
|
||||
<if test="pushNotifications != null "> and push_notifications = #{pushNotifications}</if>
|
||||
<if test="parentId != null "> and lod.parent_id = #{parentId}</if>
|
||||
<if test="typeId != null "> and lod.type_id = #{typeId}</if>
|
||||
<if test="maId != null "> and lod.ma_id = #{maId}</if>
|
||||
<if test="outNum != null "> and lod.out_num = #{outNum}</if>
|
||||
<if test="outType != null and outType != ''"> and lod.out_type = #{outType}</if>
|
||||
<if test="companyId != null "> and lod.company_id = #{companyId}</if>
|
||||
<if test="carCode != null and carCode != ''"> and lod.car_code = #{carCode}</if>
|
||||
<if test="pushNotifications != null "> and lod.push_notifications = #{pushNotifications}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectLeaseOutDetailsById" parameterType="Long" resultMap="LeaseOutDetailsResult">
|
||||
<include refid="selectLeaseOutDetailsVo"/>
|
||||
where id = #{id}
|
||||
where lod.id = #{id}
|
||||
</select>
|
||||
|
||||
<select id="selectLeaseOutDetailsListByParentId" parameterType="com.bonus.material.lease.domain.LeaseOutDetails" resultMap="LeaseOutDetailsResult">
|
||||
<include refid="selectLeaseOutDetailsVo"/>
|
||||
<where>
|
||||
lod.parent_id = #{parentId}
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<insert id="insertLeaseOutDetails" parameterType="com.bonus.material.lease.domain.LeaseOutDetails" useGeneratedKeys="true" keyProperty="id">
|
||||
|
|
|
|||
Loading…
Reference in New Issue