问题修复
This commit is contained in:
parent
6e0e6a656b
commit
8f9fb12a25
|
|
@ -323,4 +323,11 @@ public class LeaseApplyInfo extends BaseEntity{
|
||||||
|
|
||||||
@ApiModelProperty(value = "一级类型id结果集")
|
@ApiModelProperty(value = "一级类型id结果集")
|
||||||
private String firstId;
|
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 cn.hutool.core.convert.Convert;
|
||||||
import com.bonus.common.biz.config.ListPagingUtil;
|
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.core.utils.ServletUtils;
|
||||||
import com.bonus.common.log.enums.OperaType;
|
import com.bonus.common.log.enums.OperaType;
|
||||||
import com.bonus.common.security.utils.SecurityUtils;
|
import com.bonus.common.security.utils.SecurityUtils;
|
||||||
import com.bonus.material.archives.service.ArchivesService;
|
import com.bonus.material.archives.service.ArchivesService;
|
||||||
import com.bonus.material.back.domain.BackApplyDetails;
|
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.MaCode;
|
||||||
import com.bonus.material.back.domain.vo.BackAppRequestVo;
|
import com.bonus.material.back.domain.vo.BackAppRequestVo;
|
||||||
import com.bonus.material.back.domain.vo.BackApplyInfoVo;
|
import com.bonus.material.back.domain.vo.BackApplyInfoVo;
|
||||||
|
|
@ -418,4 +421,50 @@ public class BackApplyInfoController extends BaseController {
|
||||||
return error("系统错误, " + e.getMessage());
|
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.common.core.web.domain.AjaxResult;
|
||||||
import com.bonus.material.back.domain.BackApplyDetails;
|
import com.bonus.material.back.domain.BackApplyDetails;
|
||||||
import com.bonus.material.back.domain.BackApplyInfo;
|
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.MaCodeDto;
|
||||||
import com.bonus.material.back.domain.vo.BackApplyInfoVo;
|
import com.bonus.material.back.domain.vo.BackApplyInfoVo;
|
||||||
import com.bonus.material.back.domain.vo.BackApplyVo;
|
import com.bonus.material.back.domain.vo.BackApplyVo;
|
||||||
|
|
@ -383,4 +384,33 @@ public interface BackApplyInfoMapper {
|
||||||
List<Long> selectTypeIdList(Long userId);
|
List<Long> selectTypeIdList(Long userId);
|
||||||
|
|
||||||
AjaxResult getMachineByCode(BackApplyInfo dto);
|
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.common.core.web.domain.AjaxResult;
|
||||||
import com.bonus.material.back.domain.BackApplyDetails;
|
import com.bonus.material.back.domain.BackApplyDetails;
|
||||||
import com.bonus.material.back.domain.BackApplyInfo;
|
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.MaCode;
|
||||||
import com.bonus.material.back.domain.vo.BackAppRequestVo;
|
import com.bonus.material.back.domain.vo.BackAppRequestVo;
|
||||||
import com.bonus.material.back.domain.vo.BackApplyInfoVo;
|
import com.bonus.material.back.domain.vo.BackApplyInfoVo;
|
||||||
|
|
@ -167,5 +168,27 @@ public interface IBackApplyInfoService {
|
||||||
AjaxResult deleteByApp(Long id);
|
AjaxResult deleteByApp(Long id);
|
||||||
|
|
||||||
AjaxResult getMachineByCode(BackApplyInfo dto);
|
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.utils.StringUtils;
|
||||||
import com.bonus.common.core.web.domain.AjaxResult;
|
import com.bonus.common.core.web.domain.AjaxResult;
|
||||||
import com.bonus.common.security.utils.SecurityUtils;
|
import com.bonus.common.security.utils.SecurityUtils;
|
||||||
import com.bonus.material.back.domain.BackApplyDetails;
|
import com.bonus.material.back.domain.*;
|
||||||
import com.bonus.material.back.domain.MaCode;
|
|
||||||
import com.bonus.material.back.domain.MaCodeDto;
|
|
||||||
import com.bonus.material.back.domain.vo.*;
|
import com.bonus.material.back.domain.vo.*;
|
||||||
import com.bonus.common.biz.domain.BmFileInfo;
|
import com.bonus.common.biz.domain.BmFileInfo;
|
||||||
import com.bonus.material.basic.mapper.BmFileInfoMapper;
|
import com.bonus.material.basic.mapper.BmFileInfoMapper;
|
||||||
|
|
@ -37,7 +35,6 @@ import com.bonus.material.task.mapper.TmTaskMapper;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import com.bonus.material.back.mapper.BackApplyInfoMapper;
|
import com.bonus.material.back.mapper.BackApplyInfoMapper;
|
||||||
import com.bonus.material.back.domain.BackApplyInfo;
|
|
||||||
import com.bonus.material.back.service.IBackApplyInfoService;
|
import com.bonus.material.back.service.IBackApplyInfoService;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
|
@ -1549,6 +1546,48 @@ public class BackApplyInfoServiceImpl implements IBackApplyInfoService {
|
||||||
return backApplyInfoMapper.getMachineByCode(dto);
|
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,31 +304,53 @@ public class LeaseApplyInfoServiceImpl implements ILeaseApplyInfoService {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<LeaseApplyInfo> selectLeaseApplyInfoList(LeaseApplyInfo leaseApplyInfo) {
|
public List<LeaseApplyInfo> selectLeaseApplyInfoList(LeaseApplyInfo leaseApplyInfo) {
|
||||||
|
try {
|
||||||
Long userId = SecurityUtils.getLoginUser().getUserid();
|
Long userId = SecurityUtils.getLoginUser().getUserid();
|
||||||
// 首先根据用户名去ma_type_manage表查询是否存在绑定物资信息
|
// 首先根据用户名去ma_type_manage表查询是否存在绑定物资信息
|
||||||
List<Long> typeIdList = leaseApplyInfoMapper.selectTypeIdList(userId);
|
List<Long> typeIdList = leaseApplyInfoMapper.selectTypeIdList(userId);
|
||||||
if (CollectionUtils.isEmpty(typeIdList)) {
|
if (CollectionUtils.isEmpty(typeIdList)) {
|
||||||
leaseApplyInfo.setUserId(SecurityUtils.getLoginUser().getUserid());
|
leaseApplyInfo.setUserId(SecurityUtils.getLoginUser().getUserid());
|
||||||
}
|
}
|
||||||
List<LeaseApplyInfo> list = leaseApplyInfoMapper.selectLeaseApplyInfoList(leaseApplyInfo);
|
leaseApplyInfo.setTaskType(2);
|
||||||
// 如果statusList包含3、4、5,则为领料出库查询,需查询领用出库数据,进行拼接
|
// 如果statusList包含3、4、5,则为领料出库查询
|
||||||
if (!CollectionUtils.isEmpty(leaseApplyInfo.getStatusList())) {
|
if (!CollectionUtils.isEmpty(leaseApplyInfo.getStatusList())) {
|
||||||
if (((leaseApplyInfo.getStatusList().contains(3) || leaseApplyInfo.getStatusList().contains(4)) && !leaseApplyInfo.getStatusList().contains(1))
|
if (((leaseApplyInfo.getStatusList().contains(3) || leaseApplyInfo.getStatusList().contains(4)) && !leaseApplyInfo.getStatusList().contains(1))
|
||||||
|| leaseApplyInfo.getStatusList().containsAll(Arrays.asList(3, 4, 5))) {
|
|| 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);
|
extracted(leaseApplyInfo, list);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
if (!CollectionUtils.isEmpty(list)) {
|
if (!CollectionUtils.isEmpty(list)) {
|
||||||
if (leaseApplyInfo.getHasSign() != null && leaseApplyInfo.getHasSign() == 0) {
|
if (leaseApplyInfo.getHasSign() != null && leaseApplyInfo.getHasSign() == 0) {
|
||||||
list = leaseApplyInfoMapper.selectNoSignList(leaseApplyInfo);
|
list = leaseApplyInfoMapper.selectNoSignList(leaseApplyInfo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 使用 Stream API 进行降序排序
|
// 使用 Stream API 进行降序排序
|
||||||
List<LeaseApplyInfo> sortedList = list.stream()
|
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,
|
.sorted(Comparator.comparing(LeaseApplyInfo::getCreateTime,
|
||||||
Comparator.nullsFirst(Comparator.naturalOrder())).reversed())
|
Comparator.nullsFirst(Comparator.naturalOrder())).reversed())
|
||||||
.collect(Collectors.toList());
|
.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(sortedList)) {
|
||||||
if (!CollectionUtils.isEmpty(typeIdList)) {
|
if (!CollectionUtils.isEmpty(typeIdList)) {
|
||||||
// 使用流过滤符合条件的元素
|
// 使用流过滤符合条件的元素
|
||||||
|
|
@ -366,6 +388,10 @@ public class LeaseApplyInfoServiceImpl implements ILeaseApplyInfoService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return sortedList;
|
return sortedList;
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("查询领料任务列表", e.getMessage());
|
||||||
|
return new ArrayList<>();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -709,6 +735,7 @@ public class LeaseApplyInfoServiceImpl implements ILeaseApplyInfoService {
|
||||||
return AjaxResult.error("任务ID为空,请完善后重新发布!");
|
return AjaxResult.error("任务ID为空,请完善后重新发布!");
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
|
leaseApplyInfo.setReleaseTime(DateUtils.getTime());
|
||||||
int result = leaseApplyInfoMapper.updateLeaseApplyInfo(leaseApplyInfo);
|
int result = leaseApplyInfoMapper.updateLeaseApplyInfo(leaseApplyInfo);
|
||||||
if (result > 0) {
|
if (result > 0) {
|
||||||
// 同步修改tm_task任务状态, 如果不需要审核,改成 LEASE_TASK_IN_PROGRESS, 如果需要审核,改成 LEASE_TASK_TO_AUDIT
|
// 同步修改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());
|
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>
|
||||||
|
|
||||||
|
<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 id="deleteBackApply">
|
||||||
delete from back_apply_info where id = #{id}
|
delete from back_apply_info where id = #{id}
|
||||||
</delete>
|
</delete>
|
||||||
|
|
@ -787,6 +794,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
parent_id = #{parentId} and type_id = #{typeId}
|
parent_id = #{parentId} and type_id = #{typeId}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
|
<update id="uploadSort">
|
||||||
|
update bm_handling_order
|
||||||
|
set sort = #{sort}
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
<delete id="removeBackApplyDetails">
|
<delete id="removeBackApplyDetails">
|
||||||
delete from back_apply_details where code = #{code} and status = '2'
|
delete from back_apply_details where code = #{code} and status = '2'
|
||||||
</delete>
|
</delete>
|
||||||
|
|
@ -1020,6 +1033,32 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
where
|
where
|
||||||
user_id = #{userId}
|
user_id = #{userId}
|
||||||
</select>
|
</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">
|
<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,
|
bp.contract_part as contractPart,
|
||||||
sd.dept_name as impUnitName,
|
sd.dept_name as impUnitName,
|
||||||
tt.task_type as taskType,
|
tt.task_type as taskType,
|
||||||
|
lai.release_time as releaseTime,
|
||||||
GROUP_CONCAT(DISTINCT mt3.type_id) as firstId
|
GROUP_CONCAT(DISTINCT mt3.type_id) as firstId
|
||||||
from
|
from
|
||||||
lease_apply_info lai
|
lease_apply_info lai
|
||||||
|
|
@ -140,7 +141,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</foreach>
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
|
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
|
||||||
|
<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')
|
and lai.create_time BETWEEN CONCAT(#{startTime},' 00:00:00') AND CONCAT(#{endTime}, ' 23:59:59')
|
||||||
|
</when>
|
||||||
|
</choose>
|
||||||
</if>
|
</if>
|
||||||
<if test="directId != null "> and lai.direct_id = #{directId}</if>
|
<if test="directId != null "> and lai.direct_id = #{directId}</if>
|
||||||
<if test="leaseType != null and leaseType != ''"> and lai.lease_type = #{leaseType}</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="directId != null">direct_id = #{directId},</if>
|
||||||
<if test="leaseType != null">lease_type = #{leaseType},</if>
|
<if test="leaseType != null">lease_type = #{leaseType},</if>
|
||||||
<if test="estimateLeaseTime != null">estimate_lease_time = #{estimateLeaseTime},</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>
|
<if test="costBearingParty != null">cost_bearing_party = #{costBearingParty},</if>
|
||||||
</trim>
|
</trim>
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue