问题修复
This commit is contained in:
parent
6e0e6a656b
commit
8f9fb12a25
|
|
@ -323,4 +323,11 @@ public class LeaseApplyInfo extends BaseEntity{
|
|||
|
||||
@ApiModelProperty(value = "一级类型id结果集")
|
||||
private String firstId;
|
||||
|
||||
@ApiModelProperty(value = "发布时间")
|
||||
private String releaseTime;
|
||||
|
||||
@ApiModelProperty(value = "查询类型")
|
||||
private String queryType;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,11 +10,14 @@ import javax.validation.constraints.NotNull;
|
|||
|
||||
import cn.hutool.core.convert.Convert;
|
||||
import com.bonus.common.biz.config.ListPagingUtil;
|
||||
import com.bonus.common.biz.domain.lease.LeaseApplyInfo;
|
||||
import com.bonus.common.biz.domain.lease.LeasePublishInfo;
|
||||
import com.bonus.common.core.utils.ServletUtils;
|
||||
import com.bonus.common.log.enums.OperaType;
|
||||
import com.bonus.common.security.utils.SecurityUtils;
|
||||
import com.bonus.material.archives.service.ArchivesService;
|
||||
import com.bonus.material.back.domain.BackApplyDetails;
|
||||
import com.bonus.material.back.domain.HandlingOrder;
|
||||
import com.bonus.material.back.domain.MaCode;
|
||||
import com.bonus.material.back.domain.vo.BackAppRequestVo;
|
||||
import com.bonus.material.back.domain.vo.BackApplyInfoVo;
|
||||
|
|
@ -418,4 +421,50 @@ public class BackApplyInfoController extends BaseController {
|
|||
return error("系统错误, " + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/** -------装卸单开始------- */
|
||||
|
||||
/**
|
||||
* 新增装卸单
|
||||
*/
|
||||
@ApiOperation(value = "新增装卸单")
|
||||
@PreventRepeatSubmit
|
||||
@SysLog(title = "新增装卸单", businessType = OperaType.INSERT, logType = 1, module = "业务办理->新增装卸单")
|
||||
@PostMapping("/addHandlingOrder")
|
||||
public AjaxResult addHandlingOrder(@RequestBody HandlingOrder bean) {
|
||||
return backApplyInfoService.addHandlingOrder(bean);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 装卸单列表展示
|
||||
*/
|
||||
@ApiOperation(value = "装卸单列表展示")
|
||||
@GetMapping("/getHandlingOrderList")
|
||||
public AjaxResult getHandlingOrderList(HandlingOrder bean) {
|
||||
Integer pageIndex = Convert.toInt(ServletUtils.getParameter("pageNum"), 1);
|
||||
Integer pageSize = Convert.toInt(ServletUtils.getParameter("pageSize"), 10);
|
||||
try {
|
||||
List<HandlingOrder> list = backApplyInfoService.getHandlingOrderList(bean);
|
||||
return AjaxResult.success(ListPagingUtil.paging(pageIndex, pageSize, list));
|
||||
} catch (Exception e) {
|
||||
return AjaxResult.success(ListPagingUtil.paging(pageIndex, pageSize, new ArrayList<>()));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value = "app退料退回")
|
||||
@PreventRepeatSubmit
|
||||
@PostMapping("/uploadSort")
|
||||
public AjaxResult uploadSort(@RequestBody HandlingOrder bean) {
|
||||
return backApplyInfoService.uploadSort(bean);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/** -------装卸单结束------- */
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,71 @@
|
|||
package com.bonus.material.back.domain;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.ToString;
|
||||
import lombok.experimental.Accessors;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 装卸单 HandlingOrder
|
||||
* @author 16043
|
||||
*/
|
||||
|
||||
@Accessors(chain = true)
|
||||
@Data
|
||||
@ToString
|
||||
public class HandlingOrder implements Serializable {
|
||||
|
||||
|
||||
@ApiModelProperty(value = "登录用户id")
|
||||
private Long userId;
|
||||
|
||||
/** ID */
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty(value="工程id")
|
||||
private Long proId;
|
||||
|
||||
@ApiModelProperty(value="工程名称")
|
||||
private String proName;
|
||||
|
||||
@ApiModelProperty(value = "车牌号")
|
||||
private String carCode;
|
||||
|
||||
@ApiModelProperty(value = "联系人")
|
||||
private String linkMan;
|
||||
|
||||
@ApiModelProperty(value = "联系电话")
|
||||
private String phone;
|
||||
|
||||
@ApiModelProperty(value = "排序")
|
||||
private Integer sort;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
private String createBy;
|
||||
|
||||
/**
|
||||
* 修改人
|
||||
*/
|
||||
private String updateBy;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private String createTime;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
private String updateTime;
|
||||
|
||||
/**
|
||||
* 关键字
|
||||
*/
|
||||
private String keyWord;
|
||||
|
||||
private String reserveDate;
|
||||
|
||||
}
|
||||
|
|
@ -7,6 +7,7 @@ import java.util.List;
|
|||
import com.bonus.common.core.web.domain.AjaxResult;
|
||||
import com.bonus.material.back.domain.BackApplyDetails;
|
||||
import com.bonus.material.back.domain.BackApplyInfo;
|
||||
import com.bonus.material.back.domain.HandlingOrder;
|
||||
import com.bonus.material.back.domain.MaCodeDto;
|
||||
import com.bonus.material.back.domain.vo.BackApplyInfoVo;
|
||||
import com.bonus.material.back.domain.vo.BackApplyVo;
|
||||
|
|
@ -383,4 +384,33 @@ public interface BackApplyInfoMapper {
|
|||
List<Long> selectTypeIdList(Long userId);
|
||||
|
||||
AjaxResult getMachineByCode(BackApplyInfo dto);
|
||||
|
||||
|
||||
/**
|
||||
* 新增装卸单
|
||||
* @param bean
|
||||
* @return
|
||||
*/
|
||||
int addHandlingOrder(HandlingOrder bean);
|
||||
|
||||
/**
|
||||
* 查询装卸单
|
||||
* @param bean
|
||||
* @return
|
||||
*/
|
||||
List<HandlingOrder> getHandlingOrderList(HandlingOrder bean);
|
||||
|
||||
/**
|
||||
* 排号
|
||||
* @param bean
|
||||
* @return
|
||||
*/
|
||||
int uploadSort(HandlingOrder bean);
|
||||
|
||||
/**
|
||||
* 查询排序号
|
||||
* @param bean
|
||||
* @return
|
||||
*/
|
||||
int selectSort(HandlingOrder bean);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import java.util.List;
|
|||
import com.bonus.common.core.web.domain.AjaxResult;
|
||||
import com.bonus.material.back.domain.BackApplyDetails;
|
||||
import com.bonus.material.back.domain.BackApplyInfo;
|
||||
import com.bonus.material.back.domain.HandlingOrder;
|
||||
import com.bonus.material.back.domain.MaCode;
|
||||
import com.bonus.material.back.domain.vo.BackAppRequestVo;
|
||||
import com.bonus.material.back.domain.vo.BackApplyInfoVo;
|
||||
|
|
@ -167,5 +168,27 @@ public interface IBackApplyInfoService {
|
|||
AjaxResult deleteByApp(Long id);
|
||||
|
||||
AjaxResult getMachineByCode(BackApplyInfo dto);
|
||||
|
||||
|
||||
/**
|
||||
* 新增装卸单
|
||||
* @param bean
|
||||
* @return
|
||||
*/
|
||||
AjaxResult addHandlingOrder(HandlingOrder bean);
|
||||
|
||||
/**
|
||||
*装卸单列表展示
|
||||
* @param bean
|
||||
* @return
|
||||
*/
|
||||
List<HandlingOrder> getHandlingOrderList(HandlingOrder bean);
|
||||
|
||||
/**
|
||||
* 上传排号
|
||||
* @param bean
|
||||
* @return
|
||||
*/
|
||||
AjaxResult uploadSort(HandlingOrder bean);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -17,9 +17,7 @@ import com.bonus.common.core.utils.DateUtils;
|
|||
import com.bonus.common.core.utils.StringUtils;
|
||||
import com.bonus.common.core.web.domain.AjaxResult;
|
||||
import com.bonus.common.security.utils.SecurityUtils;
|
||||
import com.bonus.material.back.domain.BackApplyDetails;
|
||||
import com.bonus.material.back.domain.MaCode;
|
||||
import com.bonus.material.back.domain.MaCodeDto;
|
||||
import com.bonus.material.back.domain.*;
|
||||
import com.bonus.material.back.domain.vo.*;
|
||||
import com.bonus.common.biz.domain.BmFileInfo;
|
||||
import com.bonus.material.basic.mapper.BmFileInfoMapper;
|
||||
|
|
@ -37,7 +35,6 @@ import com.bonus.material.task.mapper.TmTaskMapper;
|
|||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.bonus.material.back.mapper.BackApplyInfoMapper;
|
||||
import com.bonus.material.back.domain.BackApplyInfo;
|
||||
import com.bonus.material.back.service.IBackApplyInfoService;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
|
|
@ -1549,6 +1546,48 @@ public class BackApplyInfoServiceImpl implements IBackApplyInfoService {
|
|||
return backApplyInfoMapper.getMachineByCode(dto);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult addHandlingOrder(HandlingOrder bean) {
|
||||
try {
|
||||
Long userId = SecurityUtils.getLoginUser().getUserid();
|
||||
bean.setCreateBy(userId.toString());
|
||||
int re = backApplyInfoMapper.addHandlingOrder(bean);
|
||||
if (re>0){
|
||||
return AjaxResult.success("添加成功");
|
||||
} else {
|
||||
return AjaxResult.error("添加失败");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error("添加装卸单失败", e);
|
||||
return AjaxResult.error("添加装卸单失败");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<HandlingOrder> getHandlingOrderList(HandlingOrder bean) {
|
||||
return backApplyInfoMapper.getHandlingOrderList(bean);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult uploadSort(HandlingOrder bean) {
|
||||
try {
|
||||
//查询排号是否存在
|
||||
int re = backApplyInfoMapper.selectSort(bean);
|
||||
if (re > 0) {
|
||||
return AjaxResult.error("排号已存在");
|
||||
}
|
||||
int res = backApplyInfoMapper.uploadSort(bean);
|
||||
if (res > 0) {
|
||||
return AjaxResult.success("排号成功");
|
||||
} else {
|
||||
return AjaxResult.error("排号失败");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error("排号失败", e);
|
||||
return AjaxResult.error("排号失败");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 关键字搜索
|
||||
|
|
|
|||
|
|
@ -304,68 +304,94 @@ public class LeaseApplyInfoServiceImpl implements ILeaseApplyInfoService {
|
|||
*/
|
||||
@Override
|
||||
public List<LeaseApplyInfo> selectLeaseApplyInfoList(LeaseApplyInfo leaseApplyInfo) {
|
||||
Long userId = SecurityUtils.getLoginUser().getUserid();
|
||||
// 首先根据用户名去ma_type_manage表查询是否存在绑定物资信息
|
||||
List<Long> typeIdList = leaseApplyInfoMapper.selectTypeIdList(userId);
|
||||
if (CollectionUtils.isEmpty(typeIdList)) {
|
||||
leaseApplyInfo.setUserId(SecurityUtils.getLoginUser().getUserid());
|
||||
}
|
||||
List<LeaseApplyInfo> list = leaseApplyInfoMapper.selectLeaseApplyInfoList(leaseApplyInfo);
|
||||
// 如果statusList包含3、4、5,则为领料出库查询,需查询领用出库数据,进行拼接
|
||||
if (!CollectionUtils.isEmpty(leaseApplyInfo.getStatusList())) {
|
||||
if (((leaseApplyInfo.getStatusList().contains(3) || leaseApplyInfo.getStatusList().contains(4)) && !leaseApplyInfo.getStatusList().contains(1))
|
||||
|| leaseApplyInfo.getStatusList().containsAll(Arrays.asList(3, 4, 5))) {
|
||||
try {
|
||||
Long userId = SecurityUtils.getLoginUser().getUserid();
|
||||
// 首先根据用户名去ma_type_manage表查询是否存在绑定物资信息
|
||||
List<Long> typeIdList = leaseApplyInfoMapper.selectTypeIdList(userId);
|
||||
if (CollectionUtils.isEmpty(typeIdList)) {
|
||||
leaseApplyInfo.setUserId(SecurityUtils.getLoginUser().getUserid());
|
||||
}
|
||||
leaseApplyInfo.setTaskType(2);
|
||||
// 如果statusList包含3、4、5,则为领料出库查询
|
||||
if (!CollectionUtils.isEmpty(leaseApplyInfo.getStatusList())) {
|
||||
if (((leaseApplyInfo.getStatusList().contains(3) || leaseApplyInfo.getStatusList().contains(4)) && !leaseApplyInfo.getStatusList().contains(1))
|
||||
|| leaseApplyInfo.getStatusList().containsAll(Arrays.asList(3, 4, 5))) {
|
||||
leaseApplyInfo.setTaskType(1);
|
||||
}
|
||||
}
|
||||
//用leaseApplyInfo.getQueryType的值来区分是否是领用出库查询,如果是,时间筛选为发布时间
|
||||
List<LeaseApplyInfo> list = leaseApplyInfoMapper.selectLeaseApplyInfoList(leaseApplyInfo);
|
||||
|
||||
// 如果leaseApplyInfo.getQueryType的值为1,则为领料出库查询,需查询领用出库数据,进行拼接
|
||||
if (leaseApplyInfo.getTaskType()==1){
|
||||
// 查询领用出库数据
|
||||
extracted(leaseApplyInfo, list);
|
||||
}
|
||||
}
|
||||
if (!CollectionUtils.isEmpty(list)) {
|
||||
if (leaseApplyInfo.getHasSign() != null && leaseApplyInfo.getHasSign() == 0) {
|
||||
list = leaseApplyInfoMapper.selectNoSignList(leaseApplyInfo);
|
||||
if (!CollectionUtils.isEmpty(list)) {
|
||||
if (leaseApplyInfo.getHasSign() != null && leaseApplyInfo.getHasSign() == 0) {
|
||||
list = leaseApplyInfoMapper.selectNoSignList(leaseApplyInfo);
|
||||
}
|
||||
}
|
||||
// 使用 Stream API 进行降序排序
|
||||
List<LeaseApplyInfo> sortedList =new ArrayList<>();
|
||||
if (leaseApplyInfo.getTaskType()==1){
|
||||
sortedList = list.stream()
|
||||
.sorted(Comparator.comparing(LeaseApplyInfo::getReleaseTime,
|
||||
Comparator.nullsFirst(Comparator.naturalOrder())).reversed())
|
||||
.collect(Collectors.toList());
|
||||
} else {
|
||||
sortedList = list.stream()
|
||||
.sorted(Comparator.comparing(LeaseApplyInfo::getCreateTime,
|
||||
Comparator.nullsFirst(Comparator.naturalOrder())).reversed())
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
}
|
||||
// 使用 Stream API 进行降序排序
|
||||
List<LeaseApplyInfo> sortedList = list.stream()
|
||||
.sorted(Comparator.comparing(LeaseApplyInfo::getCreateTime,
|
||||
Comparator.nullsFirst(Comparator.naturalOrder())).reversed())
|
||||
.collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(sortedList)) {
|
||||
if (!CollectionUtils.isEmpty(typeIdList)) {
|
||||
// 使用流过滤符合条件的元素
|
||||
sortedList = sortedList.stream()
|
||||
.filter(item -> {
|
||||
String firstIdStr = item.getFirstId();
|
||||
if (firstIdStr == null) {
|
||||
return false;
|
||||
}
|
||||
// 将逗号分隔的字符串转为集合
|
||||
Set<Long> firstIds = Arrays.stream(firstIdStr.split(","))
|
||||
.map(String::trim)
|
||||
.filter(s -> !s.isEmpty())
|
||||
.map(Long::parseLong)
|
||||
.collect(Collectors.toSet());
|
||||
|
||||
// 判断两个集合是否有交集
|
||||
return firstIds.stream().anyMatch(typeIdList::contains);
|
||||
})
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
String keyWord = leaseApplyInfo.getKeyWord();
|
||||
// 如果关键字不为空,进行过滤
|
||||
if (!StringUtils.isBlank(keyWord)) {
|
||||
sortedList = sortedList.stream()
|
||||
.filter(item -> containsKeyword(item, keyWord))
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
// 判断状态
|
||||
if (!CollectionUtils.isEmpty(leaseApplyInfo.getStatusList())) {
|
||||
// 将集合sortedList中状态taskStatus包含在leaseApplyInfo.getStatusList()中的元素
|
||||
sortedList = sortedList.stream()
|
||||
.filter(item -> leaseApplyInfo.getStatusList().contains(item.getTaskStatus()))
|
||||
.collect(Collectors.toList());
|
||||
|
||||
// List<LeaseApplyInfo> sortedList = list.stream()
|
||||
// .sorted(Comparator.comparing(LeaseApplyInfo::getCreateTime,
|
||||
// Comparator.nullsFirst(Comparator.naturalOrder())).reversed())
|
||||
// .collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(sortedList)) {
|
||||
if (!CollectionUtils.isEmpty(typeIdList)) {
|
||||
// 使用流过滤符合条件的元素
|
||||
sortedList = sortedList.stream()
|
||||
.filter(item -> {
|
||||
String firstIdStr = item.getFirstId();
|
||||
if (firstIdStr == null) {
|
||||
return false;
|
||||
}
|
||||
// 将逗号分隔的字符串转为集合
|
||||
Set<Long> firstIds = Arrays.stream(firstIdStr.split(","))
|
||||
.map(String::trim)
|
||||
.filter(s -> !s.isEmpty())
|
||||
.map(Long::parseLong)
|
||||
.collect(Collectors.toSet());
|
||||
|
||||
// 判断两个集合是否有交集
|
||||
return firstIds.stream().anyMatch(typeIdList::contains);
|
||||
})
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
String keyWord = leaseApplyInfo.getKeyWord();
|
||||
// 如果关键字不为空,进行过滤
|
||||
if (!StringUtils.isBlank(keyWord)) {
|
||||
sortedList = sortedList.stream()
|
||||
.filter(item -> containsKeyword(item, keyWord))
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
// 判断状态
|
||||
if (!CollectionUtils.isEmpty(leaseApplyInfo.getStatusList())) {
|
||||
// 将集合sortedList中状态taskStatus包含在leaseApplyInfo.getStatusList()中的元素
|
||||
sortedList = sortedList.stream()
|
||||
.filter(item -> leaseApplyInfo.getStatusList().contains(item.getTaskStatus()))
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
}
|
||||
return sortedList;
|
||||
} catch (Exception e) {
|
||||
log.error("查询领料任务列表", e.getMessage());
|
||||
return new ArrayList<>();
|
||||
}
|
||||
return sortedList;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -709,6 +735,7 @@ public class LeaseApplyInfoServiceImpl implements ILeaseApplyInfoService {
|
|||
return AjaxResult.error("任务ID为空,请完善后重新发布!");
|
||||
}
|
||||
try {
|
||||
leaseApplyInfo.setReleaseTime(DateUtils.getTime());
|
||||
int result = leaseApplyInfoMapper.updateLeaseApplyInfo(leaseApplyInfo);
|
||||
if (result > 0) {
|
||||
// 同步修改tm_task任务状态, 如果不需要审核,改成 LEASE_TASK_IN_PROGRESS, 如果需要审核,改成 LEASE_TASK_TO_AUDIT
|
||||
|
|
|
|||
|
|
@ -746,6 +746,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
values (#{info.agreementId},#{info.typeId},#{info.maId},#{many},#{info.startTime},#{info.status},#{info.leaseId},#{info.leasePrice},#{info.buyPrice},'0',#{info.companyId},#{info.leaseType},now());
|
||||
</insert>
|
||||
|
||||
<insert id="addHandlingOrder">
|
||||
insert into bm_handling_order (pro_id, car_code, link_man, phone,reserve_date, create_by,
|
||||
create_time)
|
||||
values (#{proId}, #{carCode}, #{linkMan}, #{phone},#{reserveDate},
|
||||
#{createBy}, now())
|
||||
</insert>
|
||||
|
||||
<delete id="deleteBackApply">
|
||||
delete from back_apply_info where id = #{id}
|
||||
</delete>
|
||||
|
|
@ -787,6 +794,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
parent_id = #{parentId} and type_id = #{typeId}
|
||||
</update>
|
||||
|
||||
<update id="uploadSort">
|
||||
update bm_handling_order
|
||||
set sort = #{sort}
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="removeBackApplyDetails">
|
||||
delete from back_apply_details where code = #{code} and status = '2'
|
||||
</delete>
|
||||
|
|
@ -1020,6 +1033,32 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
where
|
||||
user_id = #{userId}
|
||||
</select>
|
||||
<select id="getHandlingOrderList" resultType="com.bonus.material.back.domain.HandlingOrder">
|
||||
SELECT bho.id,
|
||||
bp.pro_name as proName,
|
||||
bho.car_code as carCode,
|
||||
bho.link_man as linkMan,
|
||||
bho.phone,
|
||||
bho.sort,
|
||||
bho.reserve_date as reserveDate
|
||||
FROM bm_handling_order bho
|
||||
LEFT JOIN bm_project bp on bp.pro_id = bho.pro_id
|
||||
WHERE bho.is_active = '1'
|
||||
<if test="keyWord !=null and keyWord !=''">
|
||||
and (
|
||||
bho.car_code like concat('%',#{keyWord},'%') or
|
||||
bho.link_man like concat('%',#{keyWord},'%') or
|
||||
bp.pro_name like concat('%',#{keyWord},'%')
|
||||
)
|
||||
</if>
|
||||
|
||||
</select>
|
||||
<select id="selectSort" resultType="java.lang.Integer">
|
||||
SELECT count(*)
|
||||
FROM bm_handling_order
|
||||
WHERE sort = #{sort}
|
||||
and is_active = '1'
|
||||
</select>
|
||||
|
||||
<select id="getMachineByCode" resultType="com.bonus.common.core.web.domain.AjaxResult">
|
||||
|
||||
|
|
|
|||
|
|
@ -58,6 +58,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
bp.contract_part as contractPart,
|
||||
sd.dept_name as impUnitName,
|
||||
tt.task_type as taskType,
|
||||
lai.release_time as releaseTime,
|
||||
GROUP_CONCAT(DISTINCT mt3.type_id) as firstId
|
||||
from
|
||||
lease_apply_info lai
|
||||
|
|
@ -140,7 +141,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</foreach>
|
||||
</if>
|
||||
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
|
||||
and lai.create_time BETWEEN CONCAT(#{startTime},' 00:00:00') AND CONCAT(#{endTime}, ' 23:59:59')
|
||||
<choose>
|
||||
<when test="taskType == 1">
|
||||
and lai.release_time BETWEEN CONCAT(#{startTime},' 00:00:00') AND CONCAT(#{endTime}, ' 23:59:59')
|
||||
</when>
|
||||
<when test="taskType == 2">
|
||||
and lai.create_time BETWEEN CONCAT(#{startTime},' 00:00:00') AND CONCAT(#{endTime}, ' 23:59:59')
|
||||
</when>
|
||||
</choose>
|
||||
</if>
|
||||
<if test="directId != null "> and lai.direct_id = #{directId}</if>
|
||||
<if test="leaseType != null and leaseType != ''"> and lai.lease_type = #{leaseType}</if>
|
||||
|
|
@ -255,6 +263,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="directId != null">direct_id = #{directId},</if>
|
||||
<if test="leaseType != null">lease_type = #{leaseType},</if>
|
||||
<if test="estimateLeaseTime != null">estimate_lease_time = #{estimateLeaseTime},</if>
|
||||
<if test="releaseTime != null">release_time = #{releaseTime},</if>
|
||||
<if test="costBearingParty != null">cost_bearing_party = #{costBearingParty},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
|
|
|
|||
Loading…
Reference in New Issue