材料站优化
This commit is contained in:
parent
00506cc7ca
commit
a763b6d646
|
|
@ -83,7 +83,7 @@ public class MaterialLeaseInfoController extends BaseController {
|
||||||
}
|
}
|
||||||
ExcelUtil<MaterialLeaseApplyDetailExport> util = new ExcelUtil<>(MaterialLeaseApplyDetailExport.class);
|
ExcelUtil<MaterialLeaseApplyDetailExport> util = new ExcelUtil<>(MaterialLeaseApplyDetailExport.class);
|
||||||
// 获取当前年月日时分秒导出时间,用括号拼接在后面
|
// 获取当前年月日时分秒导出时间,用括号拼接在后面
|
||||||
String title = "材料站领料记录" + "(" + DateUtils.getTime() + ")";
|
String title = "材料站领料记录" + "(" + "导出时间:" + DateUtils.getTime() + ")";
|
||||||
util.exportExcel(response, list, fileName, title);
|
util.exportExcel(response, list, fileName, title);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -286,7 +286,7 @@ public class MaterialMachineController extends BaseController {
|
||||||
}
|
}
|
||||||
ExcelUtil<SafeMaterialEquipmentInfo> util = new ExcelUtil<>(SafeMaterialEquipmentInfo.class);
|
ExcelUtil<SafeMaterialEquipmentInfo> util = new ExcelUtil<>(SafeMaterialEquipmentInfo.class);
|
||||||
// 获取当前年月日导出时间,用括号拼接在后面
|
// 获取当前年月日导出时间,用括号拼接在后面
|
||||||
String title = "工器具预警记录" + "(" + DateUtils.getTime() + ")";
|
String title = "工器具预警记录" + "(导出时间:" + DateUtils.getTime() + ")";
|
||||||
util.exportExcel(response, list, fileName, title);
|
util.exportExcel(response, list, fileName, title);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -264,8 +264,8 @@ public interface MaterialBackInfoMapper {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询退料协议电子签名
|
* 查询退料协议电子签名
|
||||||
* @param externalId
|
* @param backApplyInfo
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<LeaseOutSign> getLeaseOutSignList(String externalId);
|
List<LeaseOutSign> getLeaseOutSignList(MaterialBackApplyInfo backApplyInfo);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -186,13 +186,6 @@ public interface MaterialMachineMapper {
|
||||||
*/
|
*/
|
||||||
Integer selectTeamNum(MaterialRetainedEquipmentInfo bean);
|
Integer selectTeamNum(MaterialRetainedEquipmentInfo bean);
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取站内库存,在用量,保有量
|
|
||||||
* @param bean
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
List<MaterialRetainedEquipmentInfo> getRetainTotalInfo(MaterialRetainedEquipmentInfo bean);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 库存量
|
* 库存量
|
||||||
* @param bean
|
* @param bean
|
||||||
|
|
|
||||||
|
|
@ -361,7 +361,7 @@ public class MaterialBackApplyInfoServiceImpl implements MaterialBackApplyInfoSe
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 根据i8工程ID查询材料员
|
// 根据i8工程ID查询材料员
|
||||||
List<LeaseOutSign> leaseOutSignList = materialBackInfoMapper.getLeaseOutSignList(backApplyInfo.getExternalId());
|
List<LeaseOutSign> leaseOutSignList = materialBackInfoMapper.getLeaseOutSignList(backApplyInfo);
|
||||||
if (CollectionUtils.isNotEmpty(leaseOutSignList)) {
|
if (CollectionUtils.isNotEmpty(leaseOutSignList)) {
|
||||||
for (LeaseOutSign leaseOutSign : leaseOutSignList) {
|
for (LeaseOutSign leaseOutSign : leaseOutSignList) {
|
||||||
if (!leaseOutSign.getOutSignUrl().startsWith("http")) {
|
if (!leaseOutSign.getOutSignUrl().startsWith("http")) {
|
||||||
|
|
|
||||||
|
|
@ -884,7 +884,7 @@ public class MaterialMachineServiceImpl implements MaterialMachineService {
|
||||||
BigDecimal inRopeNum = BigDecimal.ZERO;
|
BigDecimal inRopeNum = BigDecimal.ZERO;
|
||||||
|
|
||||||
// 获取在用量
|
// 获取在用量
|
||||||
List<MaterialRetainedEquipmentInfo> useInfoList = materialMachineMapper.getRetainTotalInfo(bean);
|
List<MaterialRetainedEquipmentInfo> useInfoList = materialMachineMapper.getUsInfoList(bean);
|
||||||
// 分别获取useInfoList中以unitValue分组的usNum数量,展示出来
|
// 分别获取useInfoList中以unitValue分组的usNum数量,展示出来
|
||||||
if (!CollectionUtils.isEmpty(useInfoList)) {
|
if (!CollectionUtils.isEmpty(useInfoList)) {
|
||||||
// 过滤掉不在未结算工程集合内的设备
|
// 过滤掉不在未结算工程集合内的设备
|
||||||
|
|
@ -893,14 +893,23 @@ public class MaterialMachineServiceImpl implements MaterialMachineService {
|
||||||
|
|
||||||
useCountNum = useInfoList.stream()
|
useCountNum = useInfoList.stream()
|
||||||
.filter(item -> "0".equals(item.getUnitValue()))
|
.filter(item -> "0".equals(item.getUnitValue()))
|
||||||
.map(MaterialRetainedEquipmentInfo::getUsNum)
|
.map(MaterialRetainedEquipmentInfo::getAllNum)
|
||||||
.reduce(BigDecimal::add)
|
.reduce(BigDecimal::add)
|
||||||
.orElse(BigDecimal.ZERO);
|
.orElse(BigDecimal.ZERO);
|
||||||
useRopeNum = useInfoList.stream()
|
useRopeNum = useInfoList.stream()
|
||||||
.filter(item -> "1".equals(item.getUnitValue()))
|
.filter(item -> "1".equals(item.getUnitValue()))
|
||||||
.map(MaterialRetainedEquipmentInfo::getUsNum)
|
.map(MaterialRetainedEquipmentInfo::getAllNum)
|
||||||
.reduce(BigDecimal::add)
|
.reduce(BigDecimal::add)
|
||||||
.orElse(BigDecimal.ZERO);
|
.orElse(BigDecimal.ZERO);
|
||||||
|
|
||||||
|
// 获取usList中的班组id,且去重的数量
|
||||||
|
info.setTeamNum((int) useInfoList.stream()
|
||||||
|
.map(MaterialRetainedEquipmentInfo::getTeamId)
|
||||||
|
.filter(Objects::nonNull)
|
||||||
|
.distinct()
|
||||||
|
.count());
|
||||||
|
} else {
|
||||||
|
info.setTeamNum(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
//查询目前还有库存的设备
|
//查询目前还有库存的设备
|
||||||
|
|
@ -920,15 +929,6 @@ public class MaterialMachineServiceImpl implements MaterialMachineService {
|
||||||
.map(MaterialRetainedEquipmentInfo::getAllNum)
|
.map(MaterialRetainedEquipmentInfo::getAllNum)
|
||||||
.reduce(BigDecimal::add)
|
.reduce(BigDecimal::add)
|
||||||
.orElse(BigDecimal.ZERO);
|
.orElse(BigDecimal.ZERO);
|
||||||
|
|
||||||
// 获取到recordList中externalId不为null且去重的总数(转换为Integer类型)
|
|
||||||
info.setProNum((int) recordList.stream()
|
|
||||||
.map(MaterialRetainedEquipmentInfo::getProName)
|
|
||||||
.filter(Objects::nonNull)
|
|
||||||
.distinct()
|
|
||||||
.count());
|
|
||||||
} else {
|
|
||||||
info.setProNum(0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查询分包商领用数据,不作为库存,作为再用数据
|
// 查询分包商领用数据,不作为库存,作为再用数据
|
||||||
|
|
@ -950,28 +950,33 @@ public class MaterialMachineServiceImpl implements MaterialMachineService {
|
||||||
.reduce(BigDecimal::add)
|
.reduce(BigDecimal::add)
|
||||||
.orElse(BigDecimal.ZERO);
|
.orElse(BigDecimal.ZERO);
|
||||||
}
|
}
|
||||||
// 查询目前在用的设备信息
|
|
||||||
List<MaterialRetainedEquipmentInfo> usList = materialMachineMapper.getUsInfoList(bean);
|
|
||||||
if (CollectionUtils.isNotEmpty(usList)) {
|
|
||||||
// 过滤掉不在未结算工程集合内的设备
|
|
||||||
// 如果 proId 不在未结算集合中,则移除
|
|
||||||
usList.removeIf(infos -> infos.getProId() == null || !unsettledProjectIds.contains(infos.getProId()));
|
|
||||||
|
|
||||||
// 获取usList中的班组id,且去重的数量
|
// 数据合并
|
||||||
info.setTeamNum((int) usList.stream()
|
if (!CollectionUtils.isEmpty(recordList)) {
|
||||||
.map(MaterialRetainedEquipmentInfo::getTeamId)
|
useInfoList.addAll(recordList);
|
||||||
|
}
|
||||||
|
if (!CollectionUtils.isEmpty(subList)) {
|
||||||
|
useInfoList.addAll(subList);
|
||||||
|
}
|
||||||
|
// 获取项目部和工程数量
|
||||||
|
if (CollectionUtils.isNotEmpty(useInfoList)) {
|
||||||
|
// 获取到recordList中externalId不为null且去重的总数(转换为Integer类型)
|
||||||
|
info.setProNum((int) useInfoList.stream()
|
||||||
|
.map(MaterialRetainedEquipmentInfo::getProName)
|
||||||
|
.filter(Objects::nonNull)
|
||||||
|
.distinct()
|
||||||
|
.count());
|
||||||
|
// 获取到recordList中externalId不为null且去重的总数(转换为Integer类型)
|
||||||
|
info.setDepartNum((int) useInfoList.stream()
|
||||||
|
.map(MaterialRetainedEquipmentInfo::getDepartName)
|
||||||
.filter(Objects::nonNull)
|
.filter(Objects::nonNull)
|
||||||
.distinct()
|
.distinct()
|
||||||
.count());
|
.count());
|
||||||
} else {
|
} else {
|
||||||
info.setTeamNum(0);
|
info.setProNum(0);
|
||||||
}
|
|
||||||
List<MaterialRetainedEquipmentInfo> departNameList = materialMachineMapper.getDepartNameList(bean);
|
|
||||||
if (CollectionUtils.isNotEmpty(departNameList)) {
|
|
||||||
info.setDepartNum(departNameList.size());
|
|
||||||
} else {
|
|
||||||
info.setDepartNum(0);
|
info.setDepartNum(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取在库数量
|
// 获取在库数量
|
||||||
info.setInCountNum(inCountNum);
|
info.setInCountNum(inCountNum);
|
||||||
// 获取在用数量
|
// 获取在用数量
|
||||||
|
|
|
||||||
|
|
@ -230,7 +230,7 @@ public class SelectServiceImpl implements SelectService {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AjaxResult getTeamList(ProAuthorizeInfo bean) {
|
public AjaxResult getTeamList(ProAuthorizeInfo bean) {
|
||||||
List<ProjectTreeNode> groupList = new ArrayList<>();
|
/*List<ProjectTreeNode> groupList = new ArrayList<>();
|
||||||
List<ProjectTreeNode> list;
|
List<ProjectTreeNode> list;
|
||||||
try {
|
try {
|
||||||
list = mapper.getUnitListPro(bean);
|
list = mapper.getUnitListPro(bean);
|
||||||
|
|
@ -252,9 +252,9 @@ public class SelectServiceImpl implements SelectService {
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("单位类型树-查询失败", e);
|
log.error("单位类型树-查询失败", e);
|
||||||
}
|
}
|
||||||
return AjaxResult.success(groupList);
|
return AjaxResult.success(groupList);*/
|
||||||
/*List<ProjectTreeNode> newList = mapper.getTeamNewList(bean);
|
List<ProjectTreeNode> newList = mapper.getTeamNewList(bean);
|
||||||
return AjaxResult.success(newList);*/
|
return AjaxResult.success(newList);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -200,6 +200,19 @@ public class DirectRotationController extends BaseController {
|
||||||
return toAjax(service.delData(id));
|
return toAjax(service.delData(id));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查看审核签名详情
|
||||||
|
* @param sltAgreementInfo
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@ApiOperation(value = "查看详情")
|
||||||
|
@GetMapping("/getApproveList")
|
||||||
|
public AjaxResult getApproveList(SltAgreementInfo sltAgreementInfo) {
|
||||||
|
try {
|
||||||
|
return AjaxResult.success(service.getApproveList(sltAgreementInfo));
|
||||||
|
} catch (Exception e) {
|
||||||
|
return AjaxResult.success(new DirectApplyInfo());
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,25 @@
|
||||||
|
package com.bonus.material.ma.domain;
|
||||||
|
|
||||||
|
import com.bonus.common.biz.domain.lease.LeaseOutSign;
|
||||||
|
import com.bonus.common.core.web.domain.BaseEntity;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author :梁超
|
||||||
|
* direct_apply_info 工地直转信息
|
||||||
|
*/
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class DirectApplySignInfo extends BaseEntity {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审核人签名集合
|
||||||
|
*/
|
||||||
|
private List<LeaseOutSign> approveSignList;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
package com.bonus.material.ma.mapper;
|
package com.bonus.material.ma.mapper;
|
||||||
|
|
||||||
|
import com.bonus.common.biz.domain.lease.LeaseOutSign;
|
||||||
import com.bonus.material.ma.domain.DirectApplyDetails;
|
import com.bonus.material.ma.domain.DirectApplyDetails;
|
||||||
import com.bonus.material.ma.domain.DirectApplyExportInfo;
|
import com.bonus.material.ma.domain.DirectApplyExportInfo;
|
||||||
import com.bonus.material.ma.domain.DirectApplyInfo;
|
import com.bonus.material.ma.domain.DirectApplyInfo;
|
||||||
|
|
@ -83,4 +84,11 @@ public interface DirectRotationMapper {
|
||||||
List<SltAgreementInfo> getUseringDataByClz(@Param("projectId") Integer projectId);
|
List<SltAgreementInfo> getUseringDataByClz(@Param("projectId") Integer projectId);
|
||||||
|
|
||||||
Integer getprojectId(SltAgreementInfo sltAgreementInfo);
|
Integer getprojectId(SltAgreementInfo sltAgreementInfo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取审批列表
|
||||||
|
* @param sltAgreementInfo
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<LeaseOutSign> getApproveList(SltAgreementInfo sltAgreementInfo);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ import com.bonus.common.core.web.domain.AjaxResult;
|
||||||
import com.bonus.material.ma.domain.DirectApplyExportInfo;
|
import com.bonus.material.ma.domain.DirectApplyExportInfo;
|
||||||
import com.bonus.material.ma.domain.DirectApplyInfo;
|
import com.bonus.material.ma.domain.DirectApplyInfo;
|
||||||
import com.bonus.material.ma.domain.DirectApplyInfoDetails;
|
import com.bonus.material.ma.domain.DirectApplyInfoDetails;
|
||||||
|
import com.bonus.material.ma.domain.DirectApplySignInfo;
|
||||||
import com.bonus.material.settlement.domain.SltAgreementInfo;
|
import com.bonus.material.settlement.domain.SltAgreementInfo;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
|
@ -84,4 +85,11 @@ public interface DirectRotationService {
|
||||||
List<SltAgreementInfo> getUseringDataByClz(@Param("projectId") Integer projectId);
|
List<SltAgreementInfo> getUseringDataByClz(@Param("projectId") Integer projectId);
|
||||||
|
|
||||||
Integer getprojectId(SltAgreementInfo sltAgreementInfo);
|
Integer getprojectId(SltAgreementInfo sltAgreementInfo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查看审核签名详情
|
||||||
|
* @param sltAgreementInfo
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
DirectApplySignInfo getApproveList(SltAgreementInfo sltAgreementInfo);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -33,4 +33,18 @@ public interface WorkSiteDirectManageService {
|
||||||
DirectApplyInfo getInfoById(SltAgreementInfo sltAgreementInfo);
|
DirectApplyInfo getInfoById(SltAgreementInfo sltAgreementInfo);
|
||||||
|
|
||||||
int passDirectApplyInfoDetails(DirectPassApplyInfoDetails directApplyInfoDetails);
|
int passDirectApplyInfoDetails(DirectPassApplyInfoDetails directApplyInfoDetails);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据退料协议ID查询该协议是否还有未审核单据待处理
|
||||||
|
* @param directApplyInfo
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
int checkLeaseApply(DirectApplyInfo directApplyInfo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据退料协议ID查询该协议是否还有未审核单据待处理
|
||||||
|
* @param directApplyInfos
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<DirectApplyInfo> getDirectList(DirectApplyInfo directApplyInfos);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,11 @@ package com.bonus.material.ma.service.impl;
|
||||||
|
|
||||||
import cn.hutool.core.collection.CollectionUtil;
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
import com.alibaba.nacos.common.utils.CollectionUtils;
|
import com.alibaba.nacos.common.utils.CollectionUtils;
|
||||||
|
import com.alibaba.nacos.common.utils.StringUtils;
|
||||||
import com.bonus.common.biz.constant.MaterialConstants;
|
import com.bonus.common.biz.constant.MaterialConstants;
|
||||||
import com.bonus.common.biz.domain.lease.LeaseApplyInfo;
|
import com.bonus.common.biz.domain.lease.LeaseApplyInfo;
|
||||||
import com.bonus.common.biz.domain.lease.LeaseOutDetails;
|
import com.bonus.common.biz.domain.lease.LeaseOutDetails;
|
||||||
|
import com.bonus.common.biz.domain.lease.LeaseOutSign;
|
||||||
import com.bonus.common.biz.enums.BackTaskStatusEnum;
|
import com.bonus.common.biz.enums.BackTaskStatusEnum;
|
||||||
import com.bonus.common.biz.enums.LeaseTaskStatusEnum;
|
import com.bonus.common.biz.enums.LeaseTaskStatusEnum;
|
||||||
import com.bonus.common.biz.enums.TmTaskTypeEnum;
|
import com.bonus.common.biz.enums.TmTaskTypeEnum;
|
||||||
|
|
@ -141,6 +143,11 @@ public class DirectRotationImpl implements DirectRotationService {
|
||||||
DirectApplyInfo directApplyInfos = directApplyInfoDetails.getDirectApplyInfo();
|
DirectApplyInfo directApplyInfos = directApplyInfoDetails.getDirectApplyInfo();
|
||||||
if (directApplyInfos.getBackAgreementId()==directApplyInfos.getLeaseAgreementId()){
|
if (directApplyInfos.getBackAgreementId()==directApplyInfos.getLeaseAgreementId()){
|
||||||
return AjaxResult.error("申请失败,不能转入同单位同工程");
|
return AjaxResult.error("申请失败,不能转入同单位同工程");
|
||||||
|
}
|
||||||
|
// 根据退料协议ID查询该协议是否还有未审核单据待处理,若有,则无法申请
|
||||||
|
int result = workSiteDirectManageService.checkLeaseApply(directApplyInfos);
|
||||||
|
if (result > 0) {
|
||||||
|
return AjaxResult.error("申请失败,该转出单位和转出工程下有未审核单据待处理,请处理完毕后再重新提交");
|
||||||
}
|
}
|
||||||
code = workSiteDirectManageService.genderLeaseCode();
|
code = workSiteDirectManageService.genderLeaseCode();
|
||||||
directApplyInfos.setCode(code);
|
directApplyInfos.setCode(code);
|
||||||
|
|
@ -228,6 +235,15 @@ public class DirectRotationImpl implements DirectRotationService {
|
||||||
if (directApplyInfos.getBackAgreementId()==directApplyInfos.getLeaseAgreementId()){
|
if (directApplyInfos.getBackAgreementId()==directApplyInfos.getLeaseAgreementId()){
|
||||||
return AjaxResult.error("申请失败,不能转入同单位同工程");
|
return AjaxResult.error("申请失败,不能转入同单位同工程");
|
||||||
}
|
}
|
||||||
|
// 根据退料协议ID查询该协议是否还有未审核单据待处理,若有,则无法申请
|
||||||
|
/*List<DirectApplyInfo> list = workSiteDirectManageService.getDirectList(directApplyInfos);
|
||||||
|
if (CollectionUtils.isNotEmpty(list)) {
|
||||||
|
// 剔除list中ID为当前ID的
|
||||||
|
list.removeIf(item -> item.getId().equals(directApplyInfos.getId()));
|
||||||
|
if (CollectionUtils.isNotEmpty(list)) {
|
||||||
|
return AjaxResult.error("申请失败,该转出单位和转出工程下有未审核单据待处理,请处理完毕后再重新提交");
|
||||||
|
}
|
||||||
|
}*/
|
||||||
directApplyInfos.setUpdateTime(new Date());
|
directApplyInfos.setUpdateTime(new Date());
|
||||||
List<String> urls = new ArrayList<>();
|
List<String> urls = new ArrayList<>();
|
||||||
if (directApplyInfoDetails.getDirectApplyInfo().getDirUrls() != null) {
|
if (directApplyInfoDetails.getDirectApplyInfo().getDirUrls() != null) {
|
||||||
|
|
@ -444,6 +460,28 @@ public class DirectRotationImpl implements DirectRotationService {
|
||||||
return mapper.getprojectId(sltAgreementInfo);
|
return mapper.getprojectId(sltAgreementInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取审批签名列表
|
||||||
|
* @param sltAgreementInfo
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public DirectApplySignInfo getApproveList(SltAgreementInfo sltAgreementInfo) {
|
||||||
|
DirectApplySignInfo directApplySignInfo = new DirectApplySignInfo();
|
||||||
|
List<LeaseOutSign> list = mapper.getApproveList(sltAgreementInfo);
|
||||||
|
if (CollectionUtils.isNotEmpty(list)) {
|
||||||
|
for (LeaseOutSign leaseOutSign : list) {
|
||||||
|
if (leaseOutSign != null && StringUtils.isNotBlank(leaseOutSign.getOutSignUrl())) {
|
||||||
|
if (!leaseOutSign.getOutSignUrl().startsWith("http")) {
|
||||||
|
leaseOutSign.setOutSignUrl("data:image/png;base64," + leaseOutSign.getOutSignUrl());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
directApplySignInfo.setApproveSignList(list);
|
||||||
|
}
|
||||||
|
return directApplySignInfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 生成退料单号
|
* 生成退料单号
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,7 @@ import com.bonus.material.ma.service.WorkSiteDirectManageService;
|
||||||
import com.bonus.material.settlement.domain.SltAgreementInfo;
|
import com.bonus.material.settlement.domain.SltAgreementInfo;
|
||||||
import com.bonus.material.task.domain.TmTask;
|
import com.bonus.material.task.domain.TmTask;
|
||||||
import com.bonus.material.task.service.ITmTaskService;
|
import com.bonus.material.task.service.ITmTaskService;
|
||||||
|
import com.bonus.material.work.mapper.DirectAuditMapper;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
@ -42,6 +43,9 @@ public class WorkSiteDirectManageImpl implements WorkSiteDirectManageService {
|
||||||
@Resource
|
@Resource
|
||||||
private ILeaseApplyInfoService leaseApplyService;
|
private ILeaseApplyInfoService leaseApplyService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private DirectAuditMapper directAuditMapper;
|
||||||
|
|
||||||
// @Resource
|
// @Resource
|
||||||
// private BackRecordMapper backRecordMapper;
|
// private BackRecordMapper backRecordMapper;
|
||||||
//
|
//
|
||||||
|
|
@ -379,6 +383,26 @@ public class WorkSiteDirectManageImpl implements WorkSiteDirectManageService {
|
||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 检测领料信息
|
||||||
|
* @param directApplyInfo
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int checkLeaseApply(DirectApplyInfo directApplyInfo) {
|
||||||
|
return directAuditMapper.checkLeaseApply(directApplyInfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据退料协议ID查询该协议是否还有未审核单据待处理
|
||||||
|
* @param directApplyInfos
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<DirectApplyInfo> getDirectList(DirectApplyInfo directApplyInfos) {
|
||||||
|
return directAuditMapper.getDirectList(directApplyInfos);
|
||||||
|
}
|
||||||
//
|
//
|
||||||
// private int createtBackApplyInfoAndDetails(BackApplyInfo backApplyInfo) {
|
// private int createtBackApplyInfoAndDetails(BackApplyInfo backApplyInfo) {
|
||||||
// int res = 0;
|
// int res = 0;
|
||||||
|
|
|
||||||
|
|
@ -126,4 +126,9 @@ public class SysWorkflowNode {
|
||||||
private Integer nextNodeId;
|
private Integer nextNodeId;
|
||||||
|
|
||||||
private String nextRoleIds;
|
private String nextRoleIds;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 下一节点审核人id
|
||||||
|
*/
|
||||||
|
private String nextAuditById;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -71,4 +71,18 @@ public interface DirectAuditMapper {
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
String getDeptId(String externalId);
|
String getDeptId(String externalId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取项目信息
|
||||||
|
* @param directApplyInfo
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
int checkLeaseApply(DirectApplyInfo directApplyInfo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据退料协议ID查询该协议是否还有未审核单据待处理
|
||||||
|
* @param directApplyInfos
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<DirectApplyInfo> getDirectList(DirectApplyInfo directApplyInfos);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
package com.bonus.material.work.mapper;
|
package com.bonus.material.work.mapper;
|
||||||
|
|
||||||
import com.bonus.material.work.domain.SysWorkflowNode;
|
import com.bonus.material.work.domain.SysWorkflowNode;
|
||||||
import com.bonus.material.work.domain.SysWorkflowType;
|
import com.bonus.material.work.domain.SysWorkflowRecordHistory;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
|
@ -20,4 +20,11 @@ public interface SysWorkflowNodeMapper {
|
||||||
SysWorkflowNode selectSysWorkflowNodeById(Integer nodeId);
|
SysWorkflowNode selectSysWorkflowNodeById(Integer nodeId);
|
||||||
|
|
||||||
List<SysWorkflowNode> getTaskIdByProId(SysWorkflowNode sysWorkflowNode);
|
List<SysWorkflowNode> getTaskIdByProId(SysWorkflowNode sysWorkflowNode);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询下一节点审核人员
|
||||||
|
* @param sysWorkflowRecordHistory
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
SysWorkflowNode selectNextApprovePerson(SysWorkflowRecordHistory sysWorkflowRecordHistory);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -176,6 +176,13 @@ public class SysWorkflowNodeServiceImpl implements SysWorkflowNodeService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
// 查询下一节点审核人员,页面展示
|
||||||
|
SysWorkflowNode nextWorkflowInfo = sysWorkflowNodeMapper.selectNextApprovePerson(sysWorkflowRecordHistory);
|
||||||
|
if (nextWorkflowInfo != null) {
|
||||||
|
forSysWorkflowNode.setNextAuditById(nextWorkflowInfo.getNextAuditById());
|
||||||
|
forSysWorkflowNode.setAuditBy(nextWorkflowInfo.getAuditBy());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return sysWorkflowNodeList;
|
return sysWorkflowNodeList;
|
||||||
|
|
|
||||||
|
|
@ -190,9 +190,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
AND bu.del_flag = '0'
|
AND bu.del_flag = '0'
|
||||||
LEFT JOIN bm_project bp ON ba.project_id = bp.pro_id
|
LEFT JOIN bm_project bp ON ba.project_id = bp.pro_id
|
||||||
AND bp.del_flag = '0'
|
AND bp.del_flag = '0'
|
||||||
LEFT JOIN sys_user su ON su.user_id = bai.create_by
|
LEFT JOIN sys_user su ON (
|
||||||
|
(bai.create_by REGEXP '^[0-9]+$' AND su.user_id = bai.create_by) -- 数字ID关联
|
||||||
|
OR
|
||||||
|
(NOT bai.create_by REGEXP '^[0-9]+$' AND su.nick_name = bai.create_by) -- 汉字昵称关联
|
||||||
|
)
|
||||||
WHERE
|
WHERE
|
||||||
bai.id = #{id}
|
bai.id = #{id}
|
||||||
|
LIMIT 1
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectBackApplyDetailsListByTaskId" resultType="com.bonus.material.back.domain.BackApplyDetails">
|
<select id="selectBackApplyDetailsListByTaskId" resultType="com.bonus.material.back.domain.BackApplyDetails">
|
||||||
|
|
|
||||||
|
|
@ -449,7 +449,7 @@
|
||||||
bp.pro_name AS proName,
|
bp.pro_name AS proName,
|
||||||
bai.direct_audit_by AS directAuditBy,
|
bai.direct_audit_by AS directAuditBy,
|
||||||
bai.back_sign_url AS backSignUrl,
|
bai.back_sign_url AS backSignUrl,
|
||||||
bai.back_sign_type AS backSignType
|
bai.back_sign_type AS backSignType,
|
||||||
bp.external_id AS externalId
|
bp.external_id AS externalId
|
||||||
FROM
|
FROM
|
||||||
clz_back_apply_info bai
|
clz_back_apply_info bai
|
||||||
|
|
@ -933,6 +933,7 @@
|
||||||
AND su.sign_url is not null
|
AND su.sign_url is not null
|
||||||
AND sp.post_id = '3de0eb390f3611efa1940242ac130004'
|
AND sp.post_id = '3de0eb390f3611efa1940242ac130004'
|
||||||
AND dfs.id = #{externalId}
|
AND dfs.id = #{externalId}
|
||||||
|
AND su.nick_name = #{createBy}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
|
|
@ -1259,7 +1259,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
and lpd.lease_person LIKE CONCAT('%', #{leasePerson}, '%')
|
and lpd.lease_person LIKE CONCAT('%', #{leasePerson}, '%')
|
||||||
</if>
|
</if>
|
||||||
<if test="code != null and code != ''">
|
<if test="code != null and code != ''">
|
||||||
and lai.code LIKE CONCAT('%', #{code}, '%')
|
and lpd.code LIKE CONCAT('%', #{code}, '%')
|
||||||
</if>
|
</if>
|
||||||
<if test="leaseUnit != null and leaseUnit != ''">
|
<if test="leaseUnit != null and leaseUnit != ''">
|
||||||
and bu.unit_name LIKE CONCAT('%', #{leaseUnit}, '%')
|
and bu.unit_name LIKE CONCAT('%', #{leaseUnit}, '%')
|
||||||
|
|
|
||||||
|
|
@ -1194,86 +1194,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getRetainTotalInfo" resultType="com.bonus.material.clz.domain.vo.MaterialRetainedEquipmentInfo">
|
|
||||||
SELECT
|
|
||||||
mt.type_id as typeId,
|
|
||||||
mt4.type_name AS constructionType,
|
|
||||||
mt4.type_id AS firstTypeId,
|
|
||||||
mt3.type_name AS materialType,
|
|
||||||
mt3.type_id AS secondTypeId,
|
|
||||||
mt2.type_name AS typeName,
|
|
||||||
mt2.type_id AS thirdTypeId,
|
|
||||||
mt.type_name AS typeModelName,
|
|
||||||
SUM(IFNULL( sai.num, 0 )) AS usNum,
|
|
||||||
bu.unit_id as teamId,
|
|
||||||
bu.unit_name AS teamName,
|
|
||||||
bp.pro_name as proName,
|
|
||||||
bp.pro_id as proId,
|
|
||||||
bp.external_id as externalId,
|
|
||||||
bp.imp_unit AS impUnit,
|
|
||||||
bu.bzz_idcard AS idCard,
|
|
||||||
df.project_dept AS departName,
|
|
||||||
mt.unit_name AS unit,
|
|
||||||
sd.dept_name AS impUnitName,
|
|
||||||
CASE mt.manage_type WHEN 0 THEN '编码' ELSE '数量' END manageType,
|
|
||||||
mt.unit_value AS unitValue,
|
|
||||||
bz.ssfbdw AS subUnitName,
|
|
||||||
CASE mt.jiju_type WHEN 2 THEN '安全工器具' ELSE '施工机具' END jiJuType
|
|
||||||
FROM
|
|
||||||
clz_slt_agreement_info sai
|
|
||||||
LEFT JOIN ma_type mt ON mt.type_id = sai.type_id
|
|
||||||
LEFT JOIN ma_type mt2 ON mt2.type_id = mt.parent_id
|
|
||||||
LEFT JOIN ma_type mt3 ON mt3.type_id = mt2.parent_id
|
|
||||||
LEFT JOIN ma_type mt4 ON mt4.type_id = mt3.parent_id
|
|
||||||
LEFT JOIN clz_bm_agreement_info bai ON sai.agreement_id = bai.agreement_id
|
|
||||||
LEFT JOIN bm_project bp ON bai.project_id = bp.pro_id
|
|
||||||
LEFT JOIN bm_unit bu ON bai.unit_id = bu.unit_id AND bu.del_flag = '0'
|
|
||||||
LEFT JOIN sys_dept sd ON sd.dept_id = bp.imp_unit
|
|
||||||
LEFT JOIN `micro-tool`.bzgl_bz bz ON bp.external_id = bz.project_id AND bz.bzmc = bu.unit_name
|
|
||||||
LEFT JOIN data_center.dx_fb_son df ON bp.external_id = df.id
|
|
||||||
WHERE
|
|
||||||
sai.`status` = '0'
|
|
||||||
AND sai.end_time IS NULL
|
|
||||||
AND sai.back_id IS NULL
|
|
||||||
AND bu.unit_name is not null
|
|
||||||
AND bp.external_id is not NULL
|
|
||||||
<if test="impUnitName != null and impUnitName != ''">
|
|
||||||
AND sd.dept_name LIKE CONCAT('%', #{impUnitName}, '%')
|
|
||||||
</if>
|
|
||||||
<if test="proName != null and proName != ''">
|
|
||||||
AND bp.pro_name LIKE CONCAT('%', #{proName}, '%')
|
|
||||||
</if>
|
|
||||||
<if test="departName != null and departName != ''">
|
|
||||||
AND bp.pro_center LIKE CONCAT('%', #{departName}, '%')
|
|
||||||
</if>
|
|
||||||
<if test="teamName != null and teamName != ''">
|
|
||||||
AND bu.unit_name LIKE CONCAT('%', #{teamName}, '%')
|
|
||||||
</if>
|
|
||||||
<if test="typeName != null and typeName != ''">
|
|
||||||
AND mt2.type_name LIKE CONCAT('%', #{typeName}, '%')
|
|
||||||
</if>
|
|
||||||
<if test="typeModelName != null and typeModelName != ''">
|
|
||||||
AND mt.type_name LIKE CONCAT('%', #{typeModelName}, '%')
|
|
||||||
</if>
|
|
||||||
<if test="subUnitName != null and subUnitName != ''">
|
|
||||||
AND bz.ssfbdw LIKE CONCAT('%', #{subUnitName}, '%')
|
|
||||||
</if>
|
|
||||||
<if test="projectIdList != null and projectIdList.size() > 0">
|
|
||||||
AND bp.external_id in
|
|
||||||
<foreach item="item" collection="projectIdList" open="(" separator="," close=")">
|
|
||||||
#{item}
|
|
||||||
</foreach>
|
|
||||||
</if>
|
|
||||||
<if test="impUnit != null and impUnit != ''">
|
|
||||||
AND bp.imp_unit = #{impUnit}
|
|
||||||
</if>
|
|
||||||
<if test="jiJuType != null and jiJuType != ''">
|
|
||||||
AND mt.jiju_type = #{jiJuType}
|
|
||||||
</if>
|
|
||||||
GROUP BY
|
|
||||||
mt.type_id, bu.unit_name, bp.pro_name
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<select id="getRetainStoreInfo" resultType="com.bonus.material.clz.domain.vo.MaterialRetainedEquipmentInfo">
|
<select id="getRetainStoreInfo" resultType="com.bonus.material.clz.domain.vo.MaterialRetainedEquipmentInfo">
|
||||||
SELECT
|
SELECT
|
||||||
mt.type_id,
|
mt.type_id,
|
||||||
|
|
@ -1408,10 +1328,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
AND bu.type_id = 36
|
AND bu.type_id = 36
|
||||||
and sd.dept_id not in (342,345,347,348,101)
|
and sd.dept_id not in (342,345,347,348,101)
|
||||||
<if test="impUnitName != null and impUnitName != ''">
|
<if test="impUnitName != null and impUnitName != ''">
|
||||||
AND sd.dept_name like concat('%',#{impUnitName},'%')
|
AND sd.dept_name = #{impUnitName}
|
||||||
</if>
|
</if>
|
||||||
<if test="proName != null and proName != ''">
|
<if test="proName != null and proName != ''">
|
||||||
AND bp.pro_name like concat('%',#{proName},'%')
|
AND bp.pro_name = #{proName}
|
||||||
</if>
|
</if>
|
||||||
<if test="departName != null and departName != ''">
|
<if test="departName != null and departName != ''">
|
||||||
AND bp.pro_center like concat('%',#{departName},'%')
|
AND bp.pro_center like concat('%',#{departName},'%')
|
||||||
|
|
@ -1571,10 +1491,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
AND bp.external_id is not NULL
|
AND bp.external_id is not NULL
|
||||||
and sd.dept_id not in (342,345,347,348,101)
|
and sd.dept_id not in (342,345,347,348,101)
|
||||||
<if test="impUnitName != null and impUnitName != ''">
|
<if test="impUnitName != null and impUnitName != ''">
|
||||||
AND sd.dept_name LIKE CONCAT('%', #{impUnitName}, '%')
|
AND sd.dept_name = #{impUnitName}
|
||||||
</if>
|
</if>
|
||||||
<if test="proName != null and proName != ''">
|
<if test="proName != null and proName != ''">
|
||||||
AND bp.pro_name LIKE CONCAT('%', #{proName}, '%')
|
AND bp.pro_name = #{proName}
|
||||||
</if>
|
</if>
|
||||||
<if test="departName != null and departName != ''">
|
<if test="departName != null and departName != ''">
|
||||||
AND bp.pro_center LIKE CONCAT('%', #{departName}, '%')
|
AND bp.pro_center LIKE CONCAT('%', #{departName}, '%')
|
||||||
|
|
@ -2411,10 +2331,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
AND bp.external_id IS NOT NULL
|
AND bp.external_id IS NOT NULL
|
||||||
AND bu.type_id in(32,33)
|
AND bu.type_id in(32,33)
|
||||||
<if test="impUnitName != null and impUnitName != ''">
|
<if test="impUnitName != null and impUnitName != ''">
|
||||||
AND sd.dept_name like concat('%',#{impUnitName},'%')
|
AND sd.dept_name = #{impUnitName}
|
||||||
</if>
|
</if>
|
||||||
<if test="proName != null and proName != ''">
|
<if test="proName != null and proName != ''">
|
||||||
AND bp.pro_name like concat('%',#{proName},'%')
|
AND bp.pro_name = #{proName}
|
||||||
</if>
|
</if>
|
||||||
<if test="departName != null and departName != ''">
|
<if test="departName != null and departName != ''">
|
||||||
AND bp.pro_center like concat('%',#{departName},'%')
|
AND bp.pro_center like concat('%',#{departName},'%')
|
||||||
|
|
|
||||||
|
|
@ -1161,15 +1161,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
|
||||||
<select id="getTeamNewList" resultType="com.bonus.common.biz.domain.ProjectTreeNode">
|
<select id="getTeamNewList" resultType="com.bonus.common.biz.domain.ProjectTreeNode">
|
||||||
SELECT DISTINCT
|
SELECT DISTINCT
|
||||||
bu.unit_id AS id,
|
unit_id AS id,
|
||||||
bzgl_bz.bzmc AS name
|
unit_name AS NAME
|
||||||
FROM bm_unit bu
|
FROM
|
||||||
LEFT JOIN `micro-tool`.bzgl_bz bzgl_bz ON bzgl_bz.bzmc = bu.unit_name
|
bm_unit
|
||||||
WHERE bu.del_flag = '0'
|
WHERE
|
||||||
AND bzgl_bz.bz_status = 3
|
del_flag = '0'
|
||||||
AND bzgl_bz.sfjs = 0
|
AND project_id = #{externalId}
|
||||||
AND bzgl_bz.project_id = #{externalId}
|
GROUP BY
|
||||||
GROUP BY bzgl_bz.bzmc
|
unit_id
|
||||||
</select>
|
</select>
|
||||||
<select id="getUnsettledProId" resultType="java.lang.String">
|
<select id="getUnsettledProId" resultType="java.lang.String">
|
||||||
<!-- 数据量小的时候用上面的SQL,数据量大的时候用下面的sql -->
|
<!-- 数据量小的时候用上面的SQL,数据量大的时候用下面的sql -->
|
||||||
|
|
|
||||||
|
|
@ -317,4 +317,16 @@
|
||||||
GROUP BY
|
GROUP BY
|
||||||
sai.ma_id,sai.type_id
|
sai.ma_id,sai.type_id
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="getApproveList" resultType="com.bonus.common.biz.domain.lease.LeaseOutSign">
|
||||||
|
SELECT
|
||||||
|
su.sign_type as outSignType,
|
||||||
|
su.sign_url as outSignUrl
|
||||||
|
FROM
|
||||||
|
sys_workflow_record_history swh
|
||||||
|
LEFT JOIN sys_workflow_record swr ON swh.record_id = swr.id
|
||||||
|
LEFT JOIN sys_user su ON swh.create_by = su.user_id
|
||||||
|
WHERE
|
||||||
|
swr.task_id = #{id}
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
|
|
@ -64,7 +64,10 @@
|
||||||
bui.unit_name like concat('%', #{keyWord}, '%') or
|
bui.unit_name like concat('%', #{keyWord}, '%') or
|
||||||
bpl.pro_name like concat('%', #{keyWord}, '%') or
|
bpl.pro_name like concat('%', #{keyWord}, '%') or
|
||||||
bui1.unit_name like concat('%', #{keyWord}, '%') or
|
bui1.unit_name like concat('%', #{keyWord}, '%') or
|
||||||
bpl1.pro_name like concat('%', #{keyWord}, '%'))
|
bpl1.pro_name like concat('%', #{keyWord}, '%') or
|
||||||
|
swr.task_code like concat('%', #{keyWord}, '%') or
|
||||||
|
dai.lease_man like concat('%', #{keyWord}, '%')
|
||||||
|
)
|
||||||
</if>
|
</if>
|
||||||
<if test="lotId != null and lotId != ''">
|
<if test="lotId != null and lotId != ''">
|
||||||
and bpl.pro_id = #{lotId}
|
and bpl.pro_id = #{lotId}
|
||||||
|
|
@ -236,6 +239,29 @@
|
||||||
id = #{externalId}
|
id = #{externalId}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="checkLeaseApply" resultType="java.lang.Integer">
|
||||||
|
SELECT
|
||||||
|
count(*)
|
||||||
|
FROM
|
||||||
|
direct_apply_info
|
||||||
|
WHERE
|
||||||
|
`status` = '0'
|
||||||
|
AND back_agreement_id = #{backAgreementId}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getDirectList" resultType="com.bonus.material.ma.domain.DirectApplyInfo">
|
||||||
|
SELECT
|
||||||
|
idm AS id,
|
||||||
|
CODE AS code,
|
||||||
|
back_agreement_id AS backAgreementId,
|
||||||
|
lease_agreement_id AS leaseAgreementId
|
||||||
|
FROM
|
||||||
|
direct_apply_info
|
||||||
|
WHERE
|
||||||
|
`status` = '0'
|
||||||
|
AND back_agreement_id = #{backAgreementId}
|
||||||
|
</select>
|
||||||
|
|
||||||
<update id="updateWorkflowRecord">
|
<update id="updateWorkflowRecord">
|
||||||
update sys_workflow_record set workflow_status = #{flowStatus} where id = #{id}
|
update sys_workflow_record set workflow_status = #{flowStatus} where id = #{id}
|
||||||
</update>
|
</update>
|
||||||
|
|
|
||||||
|
|
@ -137,5 +137,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
ORDER BY tt.create_time desc
|
ORDER BY tt.create_time desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="selectNextApprovePerson" resultType="com.bonus.material.work.domain.SysWorkflowNode">
|
||||||
|
SELECT
|
||||||
|
swh.direct_user as nextAuditById,
|
||||||
|
GROUP_CONCAT( DISTINCT su.nick_name ORDER BY su.user_id SEPARATOR ',' ) AS auditBy
|
||||||
|
FROM
|
||||||
|
sys_workflow_record_history swh
|
||||||
|
LEFT JOIN sys_workflow_record swr ON swh.record_id = swr.id
|
||||||
|
LEFT JOIN sys_user su ON FIND_IN_SET( su.user_id, swh.direct_user ) > 0
|
||||||
|
WHERE
|
||||||
|
swh.direct_user IS NOT NULL
|
||||||
|
AND swh.record_id = #{recordId}
|
||||||
|
AND swh.next_node_id = #{nodeId}
|
||||||
|
GROUP BY
|
||||||
|
swh.create_by,
|
||||||
|
swh.direct_user
|
||||||
|
Limit 1
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue