diff --git a/bonus-common-biz/src/main/java/com/bonus/common/biz/domain/TreeSelect.java b/bonus-common-biz/src/main/java/com/bonus/common/biz/domain/TreeSelect.java index 02598061..182d6934 100644 --- a/bonus-common-biz/src/main/java/com/bonus/common/biz/domain/TreeSelect.java +++ b/bonus-common-biz/src/main/java/com/bonus/common/biz/domain/TreeSelect.java @@ -44,11 +44,14 @@ public class TreeSelect implements Serializable { @ApiModelProperty(value = "是否录入编码(0:否,1:是)") private String isEnter; + @ApiModelProperty(value = "库管员id") + private Long keeperUserId; + public TreeSelect() { } - public TreeSelect(Long id, String label, Long houseId, Integer level, Long parentId, List children, Integer number, String isEnter) { + public TreeSelect(Long id, String label, Long houseId, Integer level, Long parentId, List children, Integer number, String isEnter, Long keeperUserId) { this.id = id; this.label = label; this.houseId = houseId; @@ -57,6 +60,7 @@ public class TreeSelect implements Serializable { this.children = children; this.number = number; this.isEnter = isEnter; + this.keeperUserId = keeperUserId; } public TreeSelect(Long id, String label, Integer level, Long parentId) { diff --git a/bonus-common-biz/src/main/java/com/bonus/common/biz/domain/lease/LeaseApplyInfo.java b/bonus-common-biz/src/main/java/com/bonus/common/biz/domain/lease/LeaseApplyInfo.java index ef79cc6a..a0abc3ec 100644 --- a/bonus-common-biz/src/main/java/com/bonus/common/biz/domain/lease/LeaseApplyInfo.java +++ b/bonus-common-biz/src/main/java/com/bonus/common/biz/domain/lease/LeaseApplyInfo.java @@ -71,7 +71,7 @@ public class LeaseApplyInfo extends BaseEntity{ private String leaseSignUrl; @ApiModelProperty(value = "领料人签名类型") - private Byte leaseSignType; + private int leaseSignType; /** * 领料物资名称汇总 @@ -88,6 +88,11 @@ public class LeaseApplyInfo extends BaseEntity{ @Excel(name = "租赁申请单号") private String code; + /** 任务编号: 业务联系单号 */ + @ApiModelProperty(value = "业务联系单号") + @Excel(name = "业务联系单号") + private String businessCode; + /** 任务ID */ @ApiModelProperty(value = "任务ID") private Long taskId; @@ -148,9 +153,7 @@ public class LeaseApplyInfo extends BaseEntity{ private Long companyId; /** 1机具分公司审核通过,2调试分公司审核通过3机具分公司审核驳回4调试分公司审核驳回5出库进行中5出库完成 */ -// @Excel(name = "1机具分公司审核通过,2调试分公司审核通过3机具分公司审核驳回4调试分公司审核驳回5出库进行中5出库完成") -// @ApiModelProperty(value = "1机具分公司审核通过,2调试分公司审核通过3机具分公司审核驳回4调试分公司审核驳回5出库进行中5出库完成") -// private String status; + private String status; /** $column.columnComment */ private Long directId; diff --git a/bonus-common-biz/src/main/java/com/bonus/common/biz/domain/lease/LeaseOutSign.java b/bonus-common-biz/src/main/java/com/bonus/common/biz/domain/lease/LeaseOutSign.java index f132efc7..8ebe92d0 100644 --- a/bonus-common-biz/src/main/java/com/bonus/common/biz/domain/lease/LeaseOutSign.java +++ b/bonus-common-biz/src/main/java/com/bonus/common/biz/domain/lease/LeaseOutSign.java @@ -19,4 +19,9 @@ public class LeaseOutSign { @ApiModelProperty(value = "出库人签名类型") private int outSignType; + + public LeaseOutSign(int outSignType, String outSignUrl) { + this.outSignType = outSignType; + this.outSignUrl = outSignUrl; + } } diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/domain/LeaseApplyDetails.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/domain/LeaseApplyDetails.java index 45e4b52d..328de02f 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/domain/LeaseApplyDetails.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/domain/LeaseApplyDetails.java @@ -184,6 +184,15 @@ public class LeaseApplyDetails extends BaseEntity { private List typeIdList; + @ApiModelProperty(value = "签名URL") + private String signUrl; + + @ApiModelProperty(value = "签名类型") + private int signType; + + @ApiModelProperty(value = "编号") + private String code; + @ApiModelProperty(value = "领料物资名称汇总") private String maTypeNames; public LeaseApplyDetails(Long id, Long parentId, Long typeId, BigDecimal preNum, BigDecimal auditNum, BigDecimal alNum, String status, Long companyId) { diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/domain/LeasePublishDetails.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/domain/LeasePublishDetails.java index c1ba9b9f..63eef819 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/domain/LeasePublishDetails.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/domain/LeasePublishDetails.java @@ -142,4 +142,7 @@ public class LeasePublishDetails extends BaseEntity { @ApiModelProperty(value = "发布批次") private String publishTask; + @ApiModelProperty(value = "单号") + private String code; + } diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/domain/vo/LeaseApplyRequestVo.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/domain/vo/LeaseApplyRequestVo.java index c3606985..2c75e943 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/domain/vo/LeaseApplyRequestVo.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/domain/vo/LeaseApplyRequestVo.java @@ -47,6 +47,11 @@ public class LeaseApplyRequestVo extends BaseEntity { */ private List outSignList; + /** + * 审核签名集合 + */ + private List approveSignList; + private int statusFlag; } diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/mapper/LeaseTaskMapper.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/mapper/LeaseTaskMapper.java index 731a584a..d9a1f358 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/mapper/LeaseTaskMapper.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/mapper/LeaseTaskMapper.java @@ -6,9 +6,9 @@ import com.bonus.common.biz.domain.lease.LeasePublishInfo; import com.bonus.common.biz.domain.lease.WorkApplyInfo; import com.bonus.common.biz.domain.lease.WorkPeopleInfo; import com.bonus.material.lease.domain.LeaseApplyDetails; +import com.bonus.material.lease.domain.LeasePublishDetails; import com.bonus.material.lease.domain.vo.LeaseDeptInfo; import com.bonus.material.ma.domain.Type; -import com.bonus.material.ma.domain.vo.MaTypeVo; import com.bonus.material.ma.domain.vo.MaTypeVoLevelTwo; import org.apache.ibatis.annotations.Param; @@ -188,4 +188,10 @@ public interface LeaseTaskMapper { void updateWorkPeopleInfo(WorkPeopleInfo peopleInfo); WorkPeopleInfo getWorkPeopleInfo(WorkPeopleInfo peopleInfo); + + /** + * 根据code查询领用申请详情 + * @return + */ + LeasePublishDetails selectPublishDetailsByCode(); } diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/service/impl/LeaseApplyInfoServiceImpl.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/service/impl/LeaseApplyInfoServiceImpl.java index 4282b0b3..c656f91b 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/service/impl/LeaseApplyInfoServiceImpl.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/service/impl/LeaseApplyInfoServiceImpl.java @@ -23,12 +23,13 @@ import com.bonus.common.security.utils.SecurityUtils; import com.bonus.material.back.domain.vo.MaCodeVo; import com.bonus.material.basic.domain.BmQrcodeInfo; import com.bonus.material.basic.mapper.BmFileInfoMapper; -import com.bonus.material.clz.domain.lease.MaterialLeaseApplyInfo; import com.bonus.material.lease.domain.LeaseApplyDetails; +import com.bonus.material.lease.domain.LeasePublishDetails; import com.bonus.material.lease.domain.vo.LeaseApplyRequestVo; import com.bonus.material.lease.domain.vo.LeaseOutVo; import com.bonus.material.lease.mapper.LeaseApplyDetailsMapper; import com.bonus.material.lease.mapper.LeaseOutDetailsMapper; +import com.bonus.material.lease.mapper.LeaseTaskMapper; import com.bonus.material.lease.service.ILeaseOutDetailsService; import com.bonus.material.task.domain.TmTask; import com.bonus.material.task.domain.TmTaskAgreement; @@ -76,6 +77,9 @@ public class LeaseApplyInfoServiceImpl implements ILeaseApplyInfoService { @Resource private LeaseOutDetailsMapper leaseOutDetailsMapper; + @Resource + private LeaseTaskMapper mapper; + /** * 查询领料任务 * @@ -175,8 +179,22 @@ public class LeaseApplyInfoServiceImpl implements ILeaseApplyInfoService { detail.setMaCodeVoList(maCodeVoList); } } + // 提取details中的signType和signUrl,单独作为一个集合,并去重 + List approveSignList = details.stream() + .map(detail -> new LeaseOutSign(detail.getSignType(), detail.getSignUrl())) + .distinct() // 去重操作 + .collect(Collectors.toList()); + if (!CollectionUtils.isEmpty(approveSignList)) { + for (LeaseOutSign leaseOutSign : approveSignList) { + if (StringUtils.isNotBlank(leaseOutSign.getOutSignUrl())) { + leaseOutSign.setOutSignUrl("data:image/png;base64," + leaseOutSign.getOutSignUrl()); + } + } + leaseApplyRequestVo.setApproveSignList(approveSignList); + } + } - // 根据id查询领料出库情况,查询出库人电子签名详情 + // 根据id查询领料出库情况,查询出库库管员电子签名详情 List outSignList = leaseApplyInfoMapper.selectLeaseApplyOutList(id); if (!CollectionUtils.isEmpty(outSignList)) { for (LeaseOutSign applyInfo : outSignList) { @@ -187,7 +205,7 @@ public class LeaseApplyInfoServiceImpl implements ILeaseApplyInfoService { leaseApplyRequestVo.setKgSignList(outSignList); } - // 根据id查询领料出库情况,查询出库人电子签名详情 + // 根据id查询领料出库情况,查询领料人电子签名详情 List signList = leaseApplyInfoMapper.selectOutList(id, null); if (!CollectionUtils.isEmpty(signList)) { for (LeaseOutSign applyInfo : signList) { @@ -255,6 +273,19 @@ public class LeaseApplyInfoServiceImpl implements ILeaseApplyInfoService { detail.setMaCodeVoList(maCodeVoList); } } + // 提取details中的signType和signUrl,单独作为一个集合,并去重 + List approveSignList = details.stream() + .map(detail -> new LeaseOutSign(detail.getSignType(), detail.getSignUrl())) + .distinct() + .collect(Collectors.toList()); + if (!CollectionUtils.isEmpty(approveSignList)) { + for (LeaseOutSign leaseOutSign : approveSignList) { + if (StringUtils.isNotBlank(leaseOutSign.getOutSignUrl())) { + leaseOutSign.setOutSignUrl("data:image/png;base64," + leaseOutSign.getOutSignUrl()); + } + } + leaseApplyRequestVo.setApproveSignList(approveSignList); + } } // 根据id查询领料出库情况,查询出库人电子签名详情 @@ -311,46 +342,25 @@ public class LeaseApplyInfoServiceImpl implements ILeaseApplyInfoService { if (CollectionUtils.isEmpty(typeIdList)) { leaseApplyInfo.setUserId(SecurityUtils.getLoginUser().getUserid()); } - leaseApplyInfo.setTaskType(2); + //用leaseApplyInfo.getQueryType的值来区分是否是领用出库查询,如果是,时间筛选为发布时间 + List 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))) { - leaseApplyInfo.setTaskType(1); + extracted(leaseApplyInfo, list); } } - //用leaseApplyInfo.getQueryType的值来区分是否是领用出库查询,如果是,时间筛选为发布时间 - List 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); } } // 使用 Stream API 进行降序排序 - List sortedList =new ArrayList<>(); - if (leaseApplyInfo.getTaskType()==1){ - sortedList = list.stream() + List 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()); - } - - -// List sortedList = list.stream() -// .sorted(Comparator.comparing(LeaseApplyInfo::getCreateTime, -// Comparator.nullsFirst(Comparator.naturalOrder())).reversed()) -// .collect(Collectors.toList()); if (!CollectionUtils.isEmpty(sortedList)) { if (!CollectionUtils.isEmpty(typeIdList)) { // 使用流过滤符合条件的元素 @@ -629,6 +639,24 @@ public class LeaseApplyInfoServiceImpl implements ILeaseApplyInfoService { leaseApplyRequestVo.getLeaseApplyInfo().setCreateBy(SecurityUtils.getLoginUser().getSysUser().getNickName()); try { int thisMonthMaxOrder = tmTaskMapper.getMonthMaxOrderByDate(DateUtils.getCurrentYear(), DateUtils.getCurrentMonth(), TmTaskTypeEnum.TM_TASK_LEASE.getTaskTypeId()); + LeasePublishDetails publishDetails = mapper.selectPublishDetailsByCode(); + if (publishDetails != null && StringUtils.isNotBlank(publishDetails.getCode())) { + String code = publishDetails.getCode(); + if (code.contains("-")) { + // 分割字符串,获取"-"后面的部分 + String suffix = code.split("-")[1]; + try { + // 转换为整数 + int value = Integer.parseInt(suffix); + // 比较并更新最大值 + if (value > thisMonthMaxOrder) { + thisMonthMaxOrder = value; + } + } catch (NumberFormatException e) { + throw new ServiceException("保存失败,请联系管理员"); + } + } + } String taskCode = genderTaskCode(thisMonthMaxOrder); TmTask tmTask = new TmTask(null, TmTaskTypeEnum.TM_TASK_LEASE.getTaskTypeId(), LeaseTaskStatusEnum.LEASE_TASK_TO_PUBLISHED.getStatus(), @@ -736,6 +764,7 @@ public class LeaseApplyInfoServiceImpl implements ILeaseApplyInfoService { } try { leaseApplyInfo.setReleaseTime(DateUtils.getTime()); + leaseApplyInfo.setUpdateBy(SecurityUtils.getLoginUser().getUserid().toString()); int result = leaseApplyInfoMapper.updateLeaseApplyInfo(leaseApplyInfo); if (result > 0) { // 同步修改tm_task任务状态, 如果不需要审核,改成 LEASE_TASK_IN_PROGRESS, 如果需要审核,改成 LEASE_TASK_TO_AUDIT diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/service/impl/LeaseTaskServiceImpl.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/service/impl/LeaseTaskServiceImpl.java index 85083bd3..2c6376bb 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/service/impl/LeaseTaskServiceImpl.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/service/impl/LeaseTaskServiceImpl.java @@ -757,6 +757,13 @@ public class LeaseTaskServiceImpl implements ILeaseTaskService { if (CollectionUtils.isEmpty(typeIdList)) { leaseApplyInfo.setUserId(userId == 0 ? null : userId); } + if (StringUtils.isNotBlank(leaseApplyInfo.getStatus())) { + List stringList = Arrays.asList(leaseApplyInfo.getStatus().split(",")); + List integerList = stringList.stream() + .map(Integer::parseInt) + .collect(Collectors.toList()); + leaseApplyInfo.setStatusList(integerList); + } List list = mapper.getPublishList(leaseApplyInfo); if (!CollectionUtils.isEmpty(list)) { if (!CollectionUtils.isEmpty(typeIdList)) { @@ -877,6 +884,26 @@ public class LeaseTaskServiceImpl implements ILeaseTaskService { List leaseApplyDetailsList = leaseApplyRequestVo.getLeaseApplyDetailsList(); Long parentId = leaseApplyDetailsList.get(0).getParentId(); int thisMonthMaxOrder = mapper.getMonthMaxOrderByDate(DateUtils.getCurrentYear(), DateUtils.getCurrentMonth()); + int monthMaxOrder = tmTaskMapper.getMonthMaxOrderByDate(DateUtils.getCurrentYear(), DateUtils.getCurrentMonth(), TmTaskTypeEnum.TM_TASK_LEASE.getTaskTypeId()); + LeasePublishDetails publishDetails = mapper.selectPublishDetailsByCode(); + if (publishDetails != null && StringUtils.isNotBlank(publishDetails.getCode())) { + String code = publishDetails.getCode(); + if (code.contains("-")) { + // 分割字符串,获取"-"后面的部分 + String suffix = code.split("-")[1]; + try { + // 转换为整数 + int value = Integer.parseInt(suffix); + // 比较并更新最大值 + if (value > monthMaxOrder) { + monthMaxOrder = value; + } + } catch (NumberFormatException e) { + throw new ServiceException("保存失败,请联系管理员"); + } + } + } + String code = genderTaskCode(monthMaxOrder); for (LeaseApplyDetails applyDetails : leaseApplyDetailsList) { // 根据parentId及typeId更新lease_apply_details表的发布数量 result = mapper.updatePublish(applyDetails); @@ -892,6 +919,7 @@ public class LeaseTaskServiceImpl implements ILeaseTaskService { applyDetails.setMonthOrder(thisMonthMaxOrder + 1); String publishTask = genderPublishTask(thisMonthMaxOrder); applyDetails.setPublishTask(publishTask); + applyDetails.setCode(code); result = mapper.addPublish(applyDetails); if (result == 0) { return AjaxResult.error("发布失败,请联系管理员"); @@ -936,7 +964,7 @@ public class LeaseTaskServiceImpl implements ILeaseTaskService { return AjaxResult.error("参数不能为空"); } // 根据taskId修改任务状态为终结 - int result = tmTaskMapper.updateTaskStatus(String.valueOf(leaseApplyInfo.getTaskId()), 4); + int result = tmTaskMapper.updateTaskStatus(String.valueOf(leaseApplyInfo.getTaskId()), 5); if (result == 0) { return AjaxResult.error(HttpCodeEnum.FAIL.getCode(), HttpCodeEnum.FAIL.getMsg()); } diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/controller/TypeController.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/controller/TypeController.java index 7e14902e..585d6c5e 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/controller/TypeController.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/controller/TypeController.java @@ -290,30 +290,14 @@ public class TypeController extends BaseController { } /** - * 查询物资类型配置右侧列表 + * 查询物资类型管理绑定的库管班长用户列表 + * @param type + * @return */ -// @ApiOperation(value = "查询物资类型配置右侧列表") -// @RequiresPermissions("ma:typeConfig:list") -// @GetMapping("/getMaTypeConfigList") -// public AjaxResult getMaTypeConfigList(MaTypeConfigDto maTypeConfigDto) { -// // 调用service处理业务逻辑 -// return typeService.getMaTypeConfigList(maTypeConfigDto); -// } - - - /** - * 根据左列表类型id查询右表格 --- 暂未启用,代码有问题!! - * TODO: 待完善 - * @param typeId 左列表类型id - - @ApiOperation(value = "根据左列表类型id查询右表格") - @GetMapping("/getListByMaType") - public AjaxResult getListByMaType(Long typeId, @RequestParam(required = false) String typeName, Integer level) { - List parentIds = typeService.selectParentId(typeId, level); - List listByMaType = new ArrayList<>(); - for (Integer parentId : parentIds) { - listByMaType.addAll(typeService.getListByParentId(parentId.longValue(), typeName)); - } - return null; - }*/ + @ApiOperation(value = "查询物资类型管理绑定的库管班长用户列表") + @GetMapping("/getUserList") + public AjaxResult getUserList(MaTypeVo type) { + List list = typeService.getUserList(type); + return AjaxResult.success(list); + } } diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/domain/Type.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/domain/Type.java index d16e4730..182e6ba3 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/domain/Type.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/domain/Type.java @@ -237,4 +237,7 @@ public class Type extends BaseEntity { @ApiModelProperty(value = "是否录入编码(0:否,1:是)") private String isEnter; + @ApiModelProperty(value = "库管员id") + private Long keeperUserId; + } diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/mapper/TypeMapper.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/mapper/TypeMapper.java index cdad3485..ab32ea7f 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/mapper/TypeMapper.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/mapper/TypeMapper.java @@ -210,4 +210,11 @@ public interface TypeMapper { * @return */ Type getNumList(Type type); + + /** + * 查询物资类型管理绑定的用户列表 + * @param type + * @return + */ + List getUserList(MaTypeVo type); } diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/service/ITypeService.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/service/ITypeService.java index 7ba9a874..430c0806 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/service/ITypeService.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/service/ITypeService.java @@ -137,4 +137,11 @@ public interface ITypeService { * @return */ AjaxResult getListLevel(MaTypeVo maTypeVo); + + /** + * 查询物资类型管理绑定的库管班长用户列表 + * @param type + * @return + */ + List getUserList(MaTypeVo type); } diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/service/impl/StandardConfigManageServiceImpl.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/service/impl/StandardConfigManageServiceImpl.java index 04d84172..6a897203 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/service/impl/StandardConfigManageServiceImpl.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/service/impl/StandardConfigManageServiceImpl.java @@ -303,6 +303,6 @@ public class StandardConfigManageServiceImpl implements StandardConfigManageServ .filter(Objects::nonNull) .map(this::convertToTreeSelect) .collect(Collectors.toList()); - return new TreeSelect(type.getId(), type.getConfigName(), null, Integer.valueOf(type.getLevel()), type.getParentId(), children, null, null); + return new TreeSelect(type.getId(), type.getConfigName(), null, Integer.valueOf(type.getLevel()), type.getParentId(), children, null, null, null); } } diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/service/impl/TypeServiceImpl.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/service/impl/TypeServiceImpl.java index d208fff6..2976809d 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/service/impl/TypeServiceImpl.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/service/impl/TypeServiceImpl.java @@ -193,6 +193,16 @@ public class TypeServiceImpl implements ITypeService { return AjaxResult.success(maTypeVos); } + /** + * 查询物资类型管理绑定的库管班长用户列表 + * @param type + * @return + */ + @Override + public List getUserList(MaTypeVo type) { + return typeMapper.getUserList(type); + } + @Override public List selectMaTypeListByHouseId(Long houseId) { @@ -646,7 +656,7 @@ public class TypeServiceImpl implements ITypeService { .filter(Objects::nonNull) .map(this::convertToTreeSelect) .collect(Collectors.toList()); - return new TreeSelect(type.getTypeId(), type.getTypeName(), type.getHouseId(), Integer.valueOf(type.getLevel()),type.getParentId(), children, type.getNumber(), type.getIsEnter()); + return new TreeSelect(type.getTypeId(), type.getTypeName(), type.getHouseId(), Integer.valueOf(type.getLevel()),type.getParentId(), children, type.getNumber(), type.getIsEnter(), type.getKeeperUserId()); } diff --git a/bonus-modules/bonus-material/src/main/resources/mapper/material/lease/LeaseApplyDetailsMapper.xml b/bonus-modules/bonus-material/src/main/resources/mapper/material/lease/LeaseApplyDetailsMapper.xml index c2365b45..8d2a1ce1 100644 --- a/bonus-modules/bonus-material/src/main/resources/mapper/material/lease/LeaseApplyDetailsMapper.xml +++ b/bonus-modules/bonus-material/src/main/resources/mapper/material/lease/LeaseApplyDetailsMapper.xml @@ -45,7 +45,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" IFNULL(lad.al_num,0) as al_num, IFNULL(lad.status,0) as status, mt.unit_name,mt.unit_value, lad.create_by, lad.create_time, lad.update_by, lad.update_time, lad.remark, lad.company_id, - mt4.type_id as firstId + mt4.type_id as firstId, + su.sign_url as signUrl, + su.sign_type as signType from lease_apply_details lad left join @@ -54,6 +56,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ma_type mt2 on mt2.type_id = mt.parent_id and mt2.`level` = '3' and mt2.del_flag = '0' left join ma_type mt3 ON mt2.parent_id = mt3.type_id and mt3.del_flag = '0' left join ma_type mt4 ON mt3.parent_id = mt4.type_id and mt4.del_flag = '0' + left join sys_user su on su.user_id = mt3.keep_user_id left join (SELECT mt.type_id, mt2.type_name AS typeName, mt.type_name AS typeModelName, @@ -470,7 +473,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ELSE IFNULL(mt.storage_num, 0) END as storageNum, - mt4.type_id as firstId + mt4.type_id as firstId, + su.sign_url as signUrl, + su.sign_type as signType FROM lease_publish_details lpd LEFT JOIN ma_type mt ON lpd.new_type = mt.type_id @@ -479,6 +484,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" AND mt1.del_flag = '0' left join ma_type mt3 ON mt1.parent_id = mt3.type_id and mt3.del_flag = '0' left join ma_type mt4 ON mt3.parent_id = mt4.type_id and mt4.del_flag = '0' + left join sys_user su on su.user_id = mt3.keep_user_id left join (SELECT mt.type_id, mt2.type_name AS typeName, mt.type_name AS typeModelName, diff --git a/bonus-modules/bonus-material/src/main/resources/mapper/material/lease/LeaseApplyInfoMapper.xml b/bonus-modules/bonus-material/src/main/resources/mapper/material/lease/LeaseApplyInfoMapper.xml index d7d5764d..fc33b198 100644 --- a/bonus-modules/bonus-material/src/main/resources/mapper/material/lease/LeaseApplyInfoMapper.xml +++ b/bonus-modules/bonus-material/src/main/resources/mapper/material/lease/LeaseApplyInfoMapper.xml @@ -59,7 +59,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" sd.dept_name as impUnitName, 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, + su.sign_type as lease_sign_type, + su.sign_url as lease_sign_url from lease_apply_info lai left join tm_task tt on lai.task_id = tt.task_id @@ -71,6 +73,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" left join sys_dept sd on sd.dept_id = bp.imp_unit left join sys_dict_data sda on tt.task_status = sda.dict_value and sda.dict_type = 'lease_task_status' + left join sys_user su on lai.publisher = su.user_id left join ma_type mt on lad.type_id = mt.type_id and mt.del_flag = '0' left join ma_type mt1 on mt.parent_id = mt1.type_id and mt1.del_flag = '0' left join ma_type mt2 ON mt1.parent_id = mt2.type_id and mt2.del_flag = '0' @@ -141,14 +144,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - - - and lai.release_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') - - + and lai.release_time BETWEEN CONCAT(#{startTime},' 00:00:00') AND CONCAT(#{endTime}, ' 23:59:59') and lai.direct_id = #{directId} and lai.lease_type = #{leaseType} @@ -265,6 +261,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" estimate_lease_time = #{estimateLeaseTime}, release_time = #{releaseTime}, cost_bearing_party = #{costBearingParty}, + publisher = #{updateBy}, where id = #{id} @@ -323,7 +320,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" SELECT - lsi.lease_sign_type as outSignType, - lsi.lease_sign_url as outSignUrl + lsi.lease_sign_type as outSignType, + lsi.lease_sign_url as outSignUrl FROM - lease_out_details lod - LEFT JOIN lease_sign_info lsi ON lod.lease_sign_id = lsi.id + lease_out_details lod + LEFT JOIN lease_sign_info lsi ON lod.lease_sign_id = lsi.id WHERE - lsi.lease_sign_url IS NOT NULL - and lod.parent_id = #{id} + lsi.lease_sign_url IS NOT NULL + and lod.parent_id = #{id} + and lsi.id = #{leaseSignId} + GROUP BY - lod.lease_sign_id + lod.lease_sign_id @@ -1021,6 +1024,15 @@ limit 1 + DELETE diff --git a/bonus-modules/bonus-material/src/main/resources/mapper/material/ma/TypeMapper.xml b/bonus-modules/bonus-material/src/main/resources/mapper/material/ma/TypeMapper.xml index 1fd8cd59..5c105a2c 100644 --- a/bonus-modules/bonus-material/src/main/resources/mapper/material/ma/TypeMapper.xml +++ b/bonus-modules/bonus-material/src/main/resources/mapper/material/ma/TypeMapper.xml @@ -46,6 +46,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + @@ -330,6 +331,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" sampling_ratio = #{samplingRatio}, notax_price = #{notTaxPrice}, is_enter = #{isEnter}, + keep_user_id = #{keeperUserId}, where type_id = #{typeId} @@ -352,7 +354,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + +