物资模块优化
This commit is contained in:
parent
7db1794871
commit
c58e9be3dd
|
|
@ -1,124 +0,0 @@
|
|||
//package com.bonus.material.ma.controller;
|
||||
//
|
||||
//import com.bonus.common.biz.domain.TreeSelect;
|
||||
//import com.bonus.common.core.web.controller.BaseController;
|
||||
//import com.bonus.common.core.web.domain.AjaxResult;
|
||||
//import com.bonus.common.security.annotation.PreventRepeatSubmit;
|
||||
//import com.bonus.common.security.annotation.RequiresPermissions;
|
||||
//import com.bonus.material.ma.MaTypeConfigDto;
|
||||
//import com.bonus.material.ma.domain.Type;
|
||||
//import com.bonus.material.ma.domain.TypeKeeper;
|
||||
//import com.bonus.material.ma.domain.TypeRepair;
|
||||
//import com.bonus.material.ma.service.ITypeKeeperService;
|
||||
//import com.bonus.material.ma.service.ITypeRepairService;
|
||||
//import com.bonus.material.ma.service.ITypeService;
|
||||
//import com.bonus.material.ma.service.MaTypeConfigService;
|
||||
//import com.bonus.material.ma.vo.MaTypeConfigVo;
|
||||
//import com.google.common.collect.ImmutableList;
|
||||
//import io.swagger.annotations.Api;
|
||||
//import io.swagger.annotations.ApiOperation;
|
||||
//import org.springframework.web.bind.annotation.*;
|
||||
//
|
||||
//import javax.annotation.Resource;
|
||||
//import javax.validation.Valid;
|
||||
//import javax.validation.constraints.NotNull;
|
||||
//import java.util.*;
|
||||
//
|
||||
///**
|
||||
// * @author : 阮世耀
|
||||
// * @version : 1.0
|
||||
// * @PackagePath: com.bonus.material.ma.controller
|
||||
// * @CreateTime: 2024-10-16 10:52
|
||||
// * @Description: 物资类型配置API
|
||||
// */
|
||||
//@Api(tags = "物资类型配置API")
|
||||
//@RestController
|
||||
//@RequestMapping("/ma_type_config")
|
||||
//public class MaTypeConfigController extends BaseController {
|
||||
//
|
||||
// @Resource
|
||||
// private MaTypeConfigService maTypeConfigService;
|
||||
//
|
||||
// @ApiOperation(value = "配置物资类型绑定信息")
|
||||
// @PreventRepeatSubmit
|
||||
// @RequiresPermissions("ma:typeConfig:edit")
|
||||
// @PostMapping("/updateMaTypeBindInfo")
|
||||
// public AjaxResult updateMaTypeBindInfo(@RequestBody @Valid @NotNull MaTypeConfigDto maTypeConfigDto) {
|
||||
// // -------------------- 数据校验开始 ---------------------
|
||||
//
|
||||
// // 1.判断绑定标识是否为空
|
||||
// if (maTypeConfigDto.getBindFlag() == null) {
|
||||
// return error("绑定标识不能为空");
|
||||
// }
|
||||
// // 2.判断绑定角色类型是否为空
|
||||
// if (maTypeConfigDto.getBindRoleType() == null) {
|
||||
// return error("绑定角色类型不能为空");
|
||||
// }
|
||||
// // 3.判断用户id是否为空
|
||||
// if (maTypeConfigDto.getUserId() == null) {
|
||||
// return error("用户id不能为空");
|
||||
// }
|
||||
//
|
||||
// // ---------------- 数据校验结束 ---------------------
|
||||
//
|
||||
// // 执行业务逻辑
|
||||
// return maTypeConfigService.updateMaTypeBindInfo(maTypeConfigDto);
|
||||
// }
|
||||
//
|
||||
//
|
||||
//
|
||||
// /**
|
||||
// * 查询物资类型配置右侧列表
|
||||
// */
|
||||
// @ApiOperation(value = "查询物资类型配置右侧列表")
|
||||
// @RequiresPermissions("ma:typeConfig:list")
|
||||
// @GetMapping("/getMaTypeConfigList")
|
||||
// public AjaxResult getMaTypeConfigList(MaTypeConfigDto maTypeConfigDto) {
|
||||
// // 调用service处理业务逻辑
|
||||
// return maTypeConfigService.getMaTypeConfigList(maTypeConfigDto);
|
||||
// }
|
||||
//
|
||||
//
|
||||
// /**
|
||||
// * 查询物资配置左侧组织人员树-tree
|
||||
// */
|
||||
// @ApiOperation(value = "查询物资配置左侧组织人员树")
|
||||
// @RequiresPermissions("ma:typeConfig:list")
|
||||
// @GetMapping("/getDeptUserTree")
|
||||
// public AjaxResult getDeptUserTree() {
|
||||
//
|
||||
// // ---------- 模拟人员Tree数据 ---------------
|
||||
//
|
||||
// // 1.创建一个TreeSelect集合,用于外层放组织部门--公司级
|
||||
// List<TreeSelect> treeSelectList1 = new ArrayList<>();
|
||||
// TreeSelect treeSelect1 = new TreeSelect(1L, "机具设备分公司", 1, null);
|
||||
// TreeSelect treeSelect2 = new TreeSelect(2L, "输电分公司", 1, null);
|
||||
// TreeSelect treeSelect3 = new TreeSelect(5L, "变电分公司", 1, null);
|
||||
//
|
||||
// // 2. 给公司级部门添加子部门 ,创建TreeSelect集合,存放组织部门--部门级
|
||||
// TreeSelect treeSelect01 = new TreeSelect(11L, "物流库管一班", 2, 1L);
|
||||
// TreeSelect treeSelect02 = new TreeSelect(12L, "物流库管二班", 2, 1L);
|
||||
// TreeSelect treeSelect03 = new TreeSelect(13L, "宏源库管一班", 2, 5L);
|
||||
//
|
||||
// // 3. 创建部门人员
|
||||
// TreeSelect treeSelect001 = new TreeSelect(117L, "袁泷", 3, 11L);
|
||||
// TreeSelect treeSelect002 = new TreeSelect(133L, "喵喵喵", 3, 11L);
|
||||
// TreeSelect treeSelect003 = new TreeSelect(129L, "村上春树", 3, 12L);
|
||||
//
|
||||
// // 4. 把子部门人员添加到子部门中
|
||||
// treeSelect01.setChildren(Arrays.asList(treeSelect001, treeSelect002));
|
||||
// treeSelect1.setChildren(Arrays.asList(treeSelect01, treeSelect02));
|
||||
// treeSelect03.setChildren(ImmutableList.of(treeSelect003));
|
||||
// treeSelect3.setChildren(Collections.singletonList(treeSelect03));
|
||||
//
|
||||
// // 3.把根节点添加到集合中
|
||||
// treeSelectList1.add(treeSelect1);
|
||||
// treeSelectList1.add(treeSelect2);
|
||||
// treeSelectList1.add(treeSelect3);
|
||||
//
|
||||
// // -------------- 模拟人员Tree数据结束 ------------------
|
||||
//
|
||||
// return success(treeSelectList1);
|
||||
// }
|
||||
//
|
||||
//}
|
||||
|
|
@ -5,7 +5,7 @@ import javax.servlet.http.HttpServletResponse;
|
|||
import com.bonus.common.log.enums.OperaType;
|
||||
import com.bonus.material.common.annotation.PreventRepeatSubmit;
|
||||
import com.bonus.material.ma.domain.Type;
|
||||
import com.bonus.material.ma.vo.MachineVo;
|
||||
import com.bonus.material.ma.domain.vo.MachineVo;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
|
|
|||
|
|
@ -8,17 +8,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.TreeSelect;
|
||||
import com.bonus.common.core.utils.ServletUtils;
|
||||
import com.bonus.common.log.enums.OperaType;
|
||||
import com.bonus.material.common.annotation.PreventRepeatSubmit;
|
||||
import com.bonus.material.ma.MaTypeConfigDto;
|
||||
import com.bonus.material.ma.vo.MaTypeListVo;
|
||||
import com.bonus.material.ma.vo.MaTypeSelectVo;
|
||||
import com.bonus.material.warehouse.domain.WhHouseSet;
|
||||
import com.bonus.material.warehouse.service.IWhHouseSetService;
|
||||
import com.bonus.material.ma.domain.vo.MaTypeVo;
|
||||
import com.bonus.material.ma.domain.vo.MaTypeSelectVo;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.commons.lang3.BooleanUtils;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import com.bonus.common.log.annotation.SysLog;
|
||||
import com.bonus.common.security.annotation.RequiresPermissions;
|
||||
|
|
@ -47,38 +44,42 @@ public class TypeController extends BaseController {
|
|||
@ApiOperation(value = "查询物资类型管理列表")
|
||||
@RequiresPermissions("ma:type:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(MaTypeListVo type) {
|
||||
public TableDataInfo list(MaTypeVo type) {
|
||||
startPage();
|
||||
List<MaTypeListVo> list = typeService.selectTypeListAndParentInfo(type);
|
||||
List<MaTypeVo> list = typeService.selectTypeListAndParentInfo(type);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
// @ApiOperation(value = "查询物资类型管理列表(无分页)")
|
||||
// @RequiresPermissions("ma:type:list")
|
||||
// @GetMapping("/listNoPage")
|
||||
// public AjaxResult listNoPage(MaTypeListVo type) {
|
||||
// List<MaTypeListVo> list = typeService.selectTypeListAndParentInfo(type);
|
||||
// public AjaxResult listNoPage(MaTypeVo type) {
|
||||
// List<MaTypeVo> list = typeService.selectTypeListAndParentInfo(type);
|
||||
// return typeService.getMyTypeAndBindUsers(list);
|
||||
// }
|
||||
|
||||
/**
|
||||
* 根据左列表类型id查询右表格
|
||||
*
|
||||
* @param type
|
||||
* @param maTypeVo
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "根据左列表类型id查询右表格")
|
||||
@GetMapping("/getListByMaType")
|
||||
public AjaxResult getListByMaType(MaTypeListVo type) {
|
||||
List<Integer> parentIds = typeService.selectParentId(type);
|
||||
List<MaTypeListVo> myTypeList = new ArrayList<>();
|
||||
public AjaxResult getListByMaType(MaTypeVo maTypeVo) {
|
||||
List<Integer> parentIds = typeService.selectParentId(maTypeVo);
|
||||
List<MaTypeVo> maTypeVos = new ArrayList<>();
|
||||
for (Integer parentId : parentIds) {
|
||||
myTypeList.addAll(typeService.getListByParentId(parentId.longValue(), type));
|
||||
maTypeVos.addAll(typeService.getListByParentId(parentId.longValue(), maTypeVo));
|
||||
}
|
||||
Integer pageIndex = Convert.toInt(ServletUtils.getParameter("pageNum"), 1);
|
||||
Integer pageSize = Convert.toInt(ServletUtils.getParameter("pageSize"), 10);
|
||||
List<MaTypeListVo> result = typeService.getMyTypeAndBindUsers(myTypeList);
|
||||
return AjaxResult.success(ListPagingUtil.paging(pageIndex, pageSize, result));
|
||||
if (BooleanUtils.isTrue(maTypeVo.getDisplayBindRelationship())) {
|
||||
List<MaTypeVo> newMaTypeVos = typeService.getMyTypeAndBindUsers(maTypeVos);
|
||||
return AjaxResult.success(ListPagingUtil.paging(pageIndex, pageSize, newMaTypeVos));
|
||||
} else {
|
||||
return AjaxResult.success(ListPagingUtil.paging(pageIndex, pageSize, maTypeVos));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
package com.bonus.material.ma;
|
||||
package com.bonus.material.ma.domain.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.bonus.material.ma.vo;
|
||||
package com.bonus.material.ma.domain.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.bonus.material.ma.vo;
|
||||
package com.bonus.material.ma.domain.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.bonus.material.ma.vo;
|
||||
package com.bonus.material.ma.domain.vo;
|
||||
|
||||
import com.bonus.common.core.annotation.Excel;
|
||||
import com.bonus.material.ma.domain.Type;
|
||||
|
|
@ -15,7 +15,7 @@ import lombok.Setter;
|
|||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
public class MaTypeListVo extends Type {
|
||||
public class MaTypeVo extends Type {
|
||||
|
||||
@Excel(name = "施工类型")
|
||||
@ApiModelProperty(value = "施工类型")
|
||||
|
|
@ -41,4 +41,6 @@ public class MaTypeListVo extends Type {
|
|||
@ApiModelProperty(value = "维修员姓名")
|
||||
private String repairUserName;
|
||||
|
||||
@ApiModelProperty(value = "是否显示绑定关系")
|
||||
private Boolean displayBindRelationship;
|
||||
}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.bonus.material.ma.vo;
|
||||
package com.bonus.material.ma.domain.vo;
|
||||
|
||||
import com.bonus.material.ma.domain.Machine;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
|
@ -2,10 +2,9 @@ package com.bonus.material.ma.mapper;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import com.bonus.common.core.web.domain.AjaxResult;
|
||||
import com.bonus.material.ma.domain.Machine;
|
||||
import com.bonus.material.ma.domain.Type;
|
||||
import com.bonus.material.ma.vo.MachineVo;
|
||||
import com.bonus.material.ma.domain.vo.MachineVo;
|
||||
|
||||
/**
|
||||
* 机具设备管理Mapper接口
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@ package com.bonus.material.ma.mapper;
|
|||
|
||||
import java.util.List;
|
||||
import com.bonus.material.ma.domain.Type;
|
||||
import com.bonus.material.ma.vo.MaTypeConfigVo;
|
||||
import com.bonus.material.ma.vo.MaTypeListVo;
|
||||
import com.bonus.material.ma.vo.MaTypeSelectVo;
|
||||
import com.bonus.material.ma.domain.vo.MaTypeConfigVo;
|
||||
import com.bonus.material.ma.domain.vo.MaTypeVo;
|
||||
import com.bonus.material.ma.domain.vo.MaTypeSelectVo;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
|
|
@ -29,7 +29,7 @@ public interface TypeMapper {
|
|||
* 根据level层级和typeID 查询父级ID
|
||||
* @param type
|
||||
*/
|
||||
List<Integer> selectParentId(MaTypeListVo type);
|
||||
List<Integer> selectParentId(MaTypeVo type);
|
||||
|
||||
/**
|
||||
* 根据物资仓库的ID查询物资类型列表
|
||||
|
|
@ -37,7 +37,7 @@ public interface TypeMapper {
|
|||
*/
|
||||
List<MaTypeSelectVo> selectMaTypeListByHouseId(Long houseId);
|
||||
|
||||
List<MaTypeListVo> getListByTypeName(@Param("typeId") Long typeId, @Param("type") MaTypeListVo type);
|
||||
List<MaTypeVo> getListByTypeName(@Param("typeId") Long typeId, @Param("type") MaTypeVo type);
|
||||
|
||||
/**
|
||||
* 查询物资类型下拉树结构--根据上级ID
|
||||
|
|
@ -66,7 +66,7 @@ public interface TypeMapper {
|
|||
* @param typeListVo 物资类型
|
||||
* @return 物资类型集合
|
||||
*/
|
||||
List<MaTypeListVo> selectTypeListAndParent(Type typeListVo);
|
||||
List<MaTypeVo> selectTypeListAndParent(Type typeListVo);
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import java.util.List;
|
|||
import com.bonus.common.core.web.domain.AjaxResult;
|
||||
import com.bonus.material.ma.domain.Machine;
|
||||
import com.bonus.material.ma.domain.Type;
|
||||
import com.bonus.material.ma.vo.MachineVo;
|
||||
import com.bonus.material.ma.domain.vo.MachineVo;
|
||||
|
||||
/**
|
||||
* 机具设备管理Service接口
|
||||
|
|
|
|||
|
|
@ -4,11 +4,10 @@ import java.util.List;
|
|||
|
||||
import com.bonus.common.biz.domain.TreeSelect;
|
||||
import com.bonus.common.core.web.domain.AjaxResult;
|
||||
import com.bonus.material.ma.MaTypeConfigDto;
|
||||
import com.bonus.material.ma.domain.Type;
|
||||
import com.bonus.material.ma.vo.MaTypeConfigVo;
|
||||
import com.bonus.material.ma.vo.MaTypeListVo;
|
||||
import com.bonus.material.ma.vo.MaTypeSelectVo;
|
||||
import com.bonus.material.ma.domain.vo.MaTypeConfigVo;
|
||||
import com.bonus.material.ma.domain.vo.MaTypeVo;
|
||||
import com.bonus.material.ma.domain.vo.MaTypeSelectVo;
|
||||
|
||||
/**
|
||||
* 物资类型Service接口
|
||||
|
|
@ -23,13 +22,13 @@ public interface ITypeService {
|
|||
*/
|
||||
Type selectTypeByTypeId(Long typeId);
|
||||
|
||||
List<Integer> selectParentId(MaTypeListVo type);
|
||||
List<Integer> selectParentId(MaTypeVo type);
|
||||
|
||||
List<Type> getEquipmentType(Long typeId, String typeName);
|
||||
|
||||
List<MaTypeSelectVo> selectMaTypeListByHouseId(Long houseId);
|
||||
|
||||
List<MaTypeListVo> getListByParentId(Long typeId, MaTypeListVo type);
|
||||
List<MaTypeVo> getListByParentId(Long typeId, MaTypeVo type);
|
||||
|
||||
/**
|
||||
* 查询物资类型下拉树结构--根据上级ID
|
||||
|
|
@ -45,7 +44,7 @@ public interface ITypeService {
|
|||
*/
|
||||
List<Type> selectTypeList(Type type);
|
||||
|
||||
List<MaTypeListVo> selectTypeListAndParentInfo(Type type);
|
||||
List<MaTypeVo> selectTypeListAndParentInfo(Type type);
|
||||
|
||||
|
||||
/**
|
||||
|
|
@ -100,5 +99,5 @@ public interface ITypeService {
|
|||
|
||||
// AjaxResult getMaTypeConfigList(MaTypeConfigDto maTypeConfigDto);
|
||||
|
||||
List<MaTypeListVo> getMyTypeAndBindUsers(List<MaTypeListVo> list);
|
||||
List<MaTypeVo> getMyTypeAndBindUsers(List<MaTypeVo> list);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,18 +0,0 @@
|
|||
//package com.bonus.material.ma.service;
|
||||
//
|
||||
//import com.bonus.common.core.web.domain.AjaxResult;
|
||||
//import com.bonus.material.ma.MaTypeConfigDto;
|
||||
//
|
||||
///**
|
||||
// * @author : 阮世耀
|
||||
// * @version : 1.0
|
||||
// * @PackagePath: com.bonus.material.ma.service
|
||||
// * @CreateTime: 2024-10-16 18:50
|
||||
// * @Description: 物资类型配置Service
|
||||
// */
|
||||
//public interface MaTypeConfigService{
|
||||
//
|
||||
// AjaxResult updateMaTypeBindInfo(MaTypeConfigDto maTypeConfigDto);
|
||||
//
|
||||
// AjaxResult getMaTypeConfigList(MaTypeConfigDto maTypeConfigDto);
|
||||
//}
|
||||
|
|
@ -1,187 +0,0 @@
|
|||
//package com.bonus.material.ma.service.impl;
|
||||
//
|
||||
//import com.bonus.common.core.web.domain.AjaxResult;
|
||||
//import com.bonus.material.ma.MaTypeConfigDto;
|
||||
//import com.bonus.material.ma.domain.Type;
|
||||
//import com.bonus.material.ma.domain.TypeKeeper;
|
||||
//import com.bonus.material.ma.domain.TypeRepair;
|
||||
//import com.bonus.material.ma.service.ITypeKeeperService;
|
||||
//import com.bonus.material.ma.service.ITypeRepairService;
|
||||
//import com.bonus.material.ma.service.ITypeService;
|
||||
//import com.bonus.material.ma.service.MaTypeConfigService;
|
||||
//import com.bonus.material.ma.vo.MaTypeConfigVo;
|
||||
//import org.springframework.stereotype.Service;
|
||||
//
|
||||
//import javax.annotation.Resource;
|
||||
//import java.util.ArrayList;
|
||||
//import java.util.List;
|
||||
//
|
||||
///**
|
||||
// * @author : 阮世耀
|
||||
// * @version : 1.0
|
||||
// * @PackagePath: com.bonus.material.ma.service.impl
|
||||
// * @CreateTime: 2024-10-16 18:50
|
||||
// * @Description: 描述
|
||||
// */
|
||||
//@Service
|
||||
//public class MaTypeConfigServiceImpl implements MaTypeConfigService {
|
||||
//
|
||||
// /**
|
||||
// * 物资类型库管员配置Service
|
||||
// */
|
||||
// @Resource
|
||||
// private ITypeKeeperService typeKeeperService;
|
||||
//
|
||||
// /**
|
||||
// * 物资类型维修员配置Service
|
||||
// */
|
||||
// @Resource
|
||||
// private ITypeRepairService typeRepairService;
|
||||
//
|
||||
// // 物资类型Service
|
||||
// @Resource
|
||||
// private ITypeService typeService;
|
||||
//
|
||||
//
|
||||
// @Override
|
||||
// public AjaxResult updateMaTypeBindInfo(MaTypeConfigDto maTypeConfigDto) {
|
||||
// int result;
|
||||
// switch (maTypeConfigDto.getBindFlag()) {
|
||||
// case 1:
|
||||
// result = handleBind(maTypeConfigDto.getBindRoleType(), maTypeConfigDto.getTypeId(), maTypeConfigDto.getUserId());
|
||||
// return result == 1 ? AjaxResult.success("绑定成功") : AjaxResult.error("绑定失败");
|
||||
// case 2:
|
||||
// result = handleUnBind(maTypeConfigDto.getBindRoleType(), maTypeConfigDto.getTypeId(), maTypeConfigDto.getUserId());
|
||||
// return result == 1 ? AjaxResult.success("解绑成功") : AjaxResult.error("解绑失败");
|
||||
// default:
|
||||
// // 处理其他情况或抛出异常
|
||||
// return AjaxResult.error("输入值不合法 bindFlag: " + maTypeConfigDto.getBindFlag());
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public AjaxResult getMaTypeConfigList(MaTypeConfigDto maTypeConfigDto) {
|
||||
// // 1.把所有物资类型查出来
|
||||
// List<MaTypeConfigVo> list = typeService.selectThreeFourLevelTypeListAndParent(new Type());
|
||||
// // 2.把维修配置信息查出来
|
||||
// List<TypeRepair> typeRepairList = typeRepairService.selectTypeRepairListAndUserName(new TypeRepair());
|
||||
// // 3.把库管配置信息查出来
|
||||
// List<TypeKeeper> typeKeeperList = typeKeeperService.selectTypeKeeperListAndUserName(new TypeKeeper());
|
||||
//
|
||||
// // ------------------- 开启数据处理 ---------------------
|
||||
//
|
||||
// // 4.循环所有物资类型,重型数据集合保障只循环一次,减少性能损失
|
||||
// for (MaTypeConfigVo typeConfigVo1 : list) {
|
||||
// // 1.外层 先对比维修班组
|
||||
// for (TypeRepair typeRepair : typeRepairList) {
|
||||
// // 2.判断当前维修配置信息中的物资类型id是否等于当前物资类型配置信息中的物资类型id
|
||||
// if (typeRepair.getTypeId().equals(typeConfigVo1.getTypeId())) {
|
||||
// // 3.如果相等,把维修员信息设置到物资类型配置信息中
|
||||
// typeConfigVo1.setRepairUserId(typeRepair.getUserId());
|
||||
// typeConfigVo1.setRepairUserName(typeRepair.getUserName());
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
// // 1.外层 再对比库管班组
|
||||
// for (TypeKeeper typeKeeper : typeKeeperList) {
|
||||
// // 2.判断当前库管配置信息中的物资类型id是否等于当前物资类型配置信息中的物资类型id
|
||||
// if (typeKeeper.getTypeId().equals(typeConfigVo1.getTypeId())) {
|
||||
// // 3.如果相等,把库管员信息设置到物资类型配置信息中
|
||||
// typeConfigVo1.setKeeperUserId(typeKeeper.getUserId());
|
||||
// typeConfigVo1.setKeeperUserName(typeKeeper.getUserName());
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// // 5.判断当前物资类型配置信息是否有子节点
|
||||
// if (typeConfigVo1.getChildren() != null) {
|
||||
// // 6.有子节点,继续循环子节点,判断子节点是否有维修配置信息
|
||||
// for (MaTypeConfigVo typeConfigVo2 : typeConfigVo1.getChildren()) {
|
||||
// // 7.有维修配置信息,把维修员信息设置到子节点中
|
||||
// for (TypeRepair typeRepair : typeRepairList) {
|
||||
// if (typeRepair.getTypeId().equals(typeConfigVo2.getTypeId())) {
|
||||
// typeConfigVo2.setRepairUserId(typeRepair.getUserId());
|
||||
// typeConfigVo2.setRepairUserName(typeRepair.getUserName());
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// // 8.有子节点,继续循环子节点,
|
||||
// for (MaTypeConfigVo typeConfigVo3 : typeConfigVo1.getChildren()) {
|
||||
// // 9.判断子节点是否有库管配置信息
|
||||
// for (TypeKeeper typeKeeper : typeKeeperList) {
|
||||
// if (typeKeeper.getTypeId().equals(typeConfigVo3.getTypeId())) {
|
||||
// typeConfigVo3.setKeeperUserId(typeKeeper.getUserId());
|
||||
// typeConfigVo3.setKeeperUserName(typeKeeper.getUserName());
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// }
|
||||
//
|
||||
// // -------------------- 数据处理结束 ---------------------
|
||||
//
|
||||
// // TODO: 先暂时取消后续过滤流程
|
||||
// if (true) {
|
||||
// return AjaxResult.success(list);
|
||||
// }
|
||||
//
|
||||
//
|
||||
// // ------------------- 数据过滤开始 ---------------------
|
||||
// if (maTypeConfigDto == null || maTypeConfigDto.getUserId() == null || maTypeConfigDto.getUserId() == 0L) {
|
||||
// // 如果参数无效,则返回原始列表
|
||||
// return AjaxResult.success(list);
|
||||
// }
|
||||
//
|
||||
// List<MaTypeConfigVo> filteredList = new ArrayList<>();
|
||||
//
|
||||
// for (MaTypeConfigVo maTypeConfigVo : list) {
|
||||
// if (
|
||||
// maTypeConfigVo.getKeeperUserId().equals(maTypeConfigDto.getUserId()) ||
|
||||
// maTypeConfigVo.getRepairUserId().equals(maTypeConfigDto.getUserId())
|
||||
// )
|
||||
// {
|
||||
// filteredList.add(maTypeConfigVo);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// // ------------------- 数据过滤结束 ---------------------
|
||||
//
|
||||
//
|
||||
// // 返回前端
|
||||
// return AjaxResult.success(filteredList);
|
||||
// }
|
||||
//
|
||||
//
|
||||
// private int handleBind(int bindRoleType, Long typeId, Long userId) {
|
||||
// switch (bindRoleType) {
|
||||
// case 1:
|
||||
// // 处理 bindFlag 为 1:绑定 且 bindRoleType 为 1:库管员 的情况
|
||||
// // TODO: 实现具体逻辑
|
||||
// return typeKeeperService.insertTypeKeeper(new TypeKeeper(typeId, userId));
|
||||
// case 2:
|
||||
// // 处理 bindFlag 为 1:绑定 且 bindRoleType 为 2:维修员 的情况
|
||||
// // TODO: 实现具体逻辑
|
||||
// return typeRepairService.insertTypeRepair(new TypeRepair(typeId, userId));
|
||||
// default:
|
||||
// // 处理其他情况或抛出异常
|
||||
// throw new IllegalArgumentException("Unsupported bindRoleType: " + bindRoleType);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// private int handleUnBind(int bindRoleType, Long typeId, Long userId) {
|
||||
// switch (bindRoleType) {
|
||||
// case 1:
|
||||
// // 处理 bindFlag 为 2:解绑 且 bindRoleType 为 1:库管员 的情况
|
||||
// // TODO: 实现具体逻辑
|
||||
// return typeKeeperService.deleteTypeKeeperByUserIdAndTypeId(new TypeKeeper(typeId, userId));
|
||||
// case 2:
|
||||
// // 处理 bindFlag 为 2:解绑 且 bindRoleType 为 2:维修员 的情况
|
||||
// // TODO: 实现具体逻辑
|
||||
// return typeRepairService.deleteTypeRepairByUserIdAndTypeId(new TypeRepair(typeId, userId));
|
||||
// default:
|
||||
// // 处理其他情况或抛出异常
|
||||
// throw new IllegalArgumentException("Unsupported bindRoleType: " + bindRoleType);
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
|
@ -12,7 +12,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.material.ma.domain.Type;
|
||||
import com.bonus.material.ma.vo.MachineVo;
|
||||
import com.bonus.material.ma.domain.vo.MachineVo;
|
||||
import com.bonus.material.purchase.config.RemoteConfig;
|
||||
import com.bonus.system.api.RemoteUserService;
|
||||
import com.bonus.system.api.domain.SysUser;
|
||||
|
|
|
|||
|
|
@ -11,14 +11,13 @@ 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.ma.MaTypeConfigDto;
|
||||
import com.bonus.material.ma.domain.TypeKeeper;
|
||||
import com.bonus.material.ma.domain.TypeRepair;
|
||||
import com.bonus.material.ma.service.ITypeKeeperService;
|
||||
import com.bonus.material.ma.service.ITypeRepairService;
|
||||
import com.bonus.material.ma.vo.MaTypeConfigVo;
|
||||
import com.bonus.material.ma.vo.MaTypeListVo;
|
||||
import com.bonus.material.ma.vo.MaTypeSelectVo;
|
||||
import com.bonus.material.ma.domain.vo.MaTypeConfigVo;
|
||||
import com.bonus.material.ma.domain.vo.MaTypeVo;
|
||||
import com.bonus.material.ma.domain.vo.MaTypeSelectVo;
|
||||
import com.bonus.material.warehouse.domain.WhHouseSet;
|
||||
import com.bonus.material.warehouse.service.IWhHouseSetService;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
|
|
@ -64,7 +63,7 @@ public class TypeServiceImpl implements ITypeService {
|
|||
}
|
||||
|
||||
@Override
|
||||
public List<Integer> selectParentId(MaTypeListVo type) {
|
||||
public List<Integer> selectParentId(MaTypeVo type) {
|
||||
return typeMapper.selectParentId(type);
|
||||
}
|
||||
|
||||
|
|
@ -103,7 +102,7 @@ public class TypeServiceImpl implements ITypeService {
|
|||
* @param type 名称筛选
|
||||
*/
|
||||
@Override
|
||||
public List<MaTypeListVo> getListByParentId(Long typeId, MaTypeListVo type) {
|
||||
public List<MaTypeVo> getListByParentId(Long typeId, MaTypeVo type) {
|
||||
return typeMapper.getListByTypeName(typeId, type);
|
||||
}
|
||||
|
||||
|
|
@ -140,54 +139,54 @@ public class TypeServiceImpl implements ITypeService {
|
|||
* @return 物资类型管理
|
||||
*/
|
||||
@Override
|
||||
public List<MaTypeListVo> selectTypeListAndParentInfo(Type type) {
|
||||
public List<MaTypeVo> selectTypeListAndParentInfo(Type type) {
|
||||
// 如果是顶级节点,则查询所有子节点
|
||||
if (type != null && type.getLevel() != null && "0".equals(type.getLevel())) {
|
||||
type.setLevel(null);
|
||||
}
|
||||
|
||||
// 拿到数据要处理一下上级信息
|
||||
List<MaTypeListVo> maTypeListVos;
|
||||
List<MaTypeVo> maTypeVos;
|
||||
try {
|
||||
maTypeListVos = typeMapper.selectTypeListAndParent(type);
|
||||
maTypeVos = typeMapper.selectTypeListAndParent(type);
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e.getMessage());
|
||||
}
|
||||
|
||||
// 检查Mapper集合
|
||||
if (maTypeListVos == null || maTypeListVos.isEmpty()) {
|
||||
if (maTypeVos == null || maTypeVos.isEmpty()) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
|
||||
|
||||
for (MaTypeListVo maTypeListVo : maTypeListVos) {
|
||||
for (MaTypeVo maTypeVo : maTypeVos) {
|
||||
// ------------ 检查 -----------
|
||||
|
||||
// object对象是空的,忽略处理
|
||||
if (maTypeListVo == null) {
|
||||
if (maTypeVo == null) {
|
||||
continue;
|
||||
}
|
||||
// 没有上级就不需要处理,或者level等级不清晰的也不进行处理
|
||||
if (maTypeListVo.getParentId() == null || maTypeListVo.getLevel() == null) {
|
||||
if (maTypeVo.getParentId() == null || maTypeVo.getLevel() == null) {
|
||||
continue;
|
||||
}
|
||||
// 1级节点已经是顶级,无上级,所以不需要处理
|
||||
if ("1".equals(maTypeListVo.getLevel())) {
|
||||
if ("1".equals(maTypeVo.getLevel())) {
|
||||
continue;
|
||||
}
|
||||
// ------------ 检查结束 -----------
|
||||
|
||||
|
||||
// 进行数据处理
|
||||
switch (maTypeListVo.getLevel()) {
|
||||
switch (maTypeVo.getLevel()) {
|
||||
case "2":
|
||||
// 二级节点父级是一级节点,所以要拿到父节点名称,并赋值至ONE_LEVEL_NAME字段
|
||||
maTypeListVo.setItemType(maTypeListVo.getMaterialName() == null ? "" : maTypeListVo.getMaterialName());
|
||||
maTypeVo.setItemType(maTypeVo.getMaterialName() == null ? "" : maTypeVo.getMaterialName());
|
||||
break;
|
||||
case "3":
|
||||
// 三级节点父级是二级节点和一级节点, 要把祖父类型名称放入一级字段,把父类型名称存入二级字段
|
||||
maTypeListVo.setItemType(maTypeListVo.getMaterialType() == null ? "" : maTypeListVo.getMaterialType());
|
||||
maTypeListVo.setMaterialType(maTypeListVo.getMaterialName() == null ? "" : maTypeListVo.getMaterialName());
|
||||
maTypeVo.setItemType(maTypeVo.getMaterialType() == null ? "" : maTypeVo.getMaterialType());
|
||||
maTypeVo.setMaterialType(maTypeVo.getMaterialName() == null ? "" : maTypeVo.getMaterialName());
|
||||
break;
|
||||
case "4":
|
||||
// 四级节点父级是三级节点和二级节点和一级节点, 要把祖父类型名称放入一级字段,把父类型名称存入二级字段,子类型名称存入三级字段
|
||||
|
|
@ -196,7 +195,7 @@ public class TypeServiceImpl implements ITypeService {
|
|||
}
|
||||
|
||||
}
|
||||
return maTypeListVos;
|
||||
return maTypeVos;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -548,24 +547,24 @@ public class TypeServiceImpl implements ITypeService {
|
|||
// }
|
||||
|
||||
@Override
|
||||
public List<MaTypeListVo> getMyTypeAndBindUsers(List<MaTypeListVo> list) {
|
||||
public List<MaTypeVo> getMyTypeAndBindUsers(List<MaTypeVo> list) {
|
||||
List<TypeRepair> typeRepairList = typeRepairService.selectTypeRepairListAndUserName(new TypeRepair());
|
||||
List<TypeKeeper> typeKeeperList = typeKeeperService.selectTypeKeeperListAndUserName(new TypeKeeper());
|
||||
for (MaTypeListVo maTypeListVo : list) {
|
||||
for (MaTypeVo maTypeVo : list) {
|
||||
if (CollectionUtils.isNotEmpty(typeRepairList)) {
|
||||
for (TypeRepair typeRepair : typeRepairList) {
|
||||
if (Objects.nonNull(typeRepair.getTypeId()) && typeRepair.getTypeId().equals(maTypeListVo.getTypeId())) {
|
||||
maTypeListVo.setRepairUserId(typeRepair.getUserId());
|
||||
maTypeListVo.setRepairUserName(typeRepair.getUserName());
|
||||
if (Objects.nonNull(typeRepair.getTypeId()) && typeRepair.getTypeId().equals(maTypeVo.getTypeId())) {
|
||||
maTypeVo.setRepairUserId(typeRepair.getUserId());
|
||||
maTypeVo.setRepairUserName(typeRepair.getUserName());
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (CollectionUtils.isNotEmpty(typeKeeperList)) {
|
||||
for (TypeKeeper typeKeeper : typeKeeperList) {
|
||||
if (Objects.nonNull(typeKeeper.getTypeId()) && typeKeeper.getTypeId().equals(maTypeListVo.getTypeId())) {
|
||||
maTypeListVo.setKeeperUserId(typeKeeper.getUserId());
|
||||
maTypeListVo.setKeeperUserName(typeKeeper.getUserName());
|
||||
if (Objects.nonNull(typeKeeper.getTypeId()) && typeKeeper.getTypeId().equals(maTypeVo.getTypeId())) {
|
||||
maTypeVo.setKeeperUserId(typeKeeper.getUserId());
|
||||
maTypeVo.setKeeperUserName(typeKeeper.getUserName());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,9 +8,9 @@ import com.bonus.common.log.annotation.SysLog;
|
|||
import com.bonus.common.log.enums.OperaType;
|
||||
import com.bonus.material.common.annotation.PreventRepeatSubmit;
|
||||
import com.bonus.common.security.annotation.RequiresPermissions;
|
||||
import com.bonus.material.purchase.dto.PurchaseDto;
|
||||
import com.bonus.material.purchase.domain.dto.PurchaseDto;
|
||||
import com.bonus.material.purchase.service.IPurchaseBindService;
|
||||
import com.bonus.material.purchase.vo.PurchaseVo;
|
||||
import com.bonus.material.purchase.domain.vo.PurchaseVo;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import javax.validation.constraints.NotNull;
|
|||
|
||||
import com.bonus.common.log.enums.OperaType;
|
||||
import com.bonus.material.common.annotation.PreventRepeatSubmit;
|
||||
import com.bonus.material.purchase.dto.PurchaseCheckFileDto;
|
||||
import com.bonus.material.purchase.domain.dto.PurchaseCheckFileDto;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
|
|
|||
|
|
@ -9,12 +9,11 @@ import javax.validation.constraints.NotNull;
|
|||
|
||||
import com.bonus.common.log.enums.OperaType;
|
||||
import com.bonus.material.common.annotation.PreventRepeatSubmit;
|
||||
import com.bonus.material.purchase.dto.PurchaseCheckDto;
|
||||
import com.bonus.material.purchase.dto.PurchaseQueryDto;
|
||||
import com.bonus.material.purchase.vo.PurchaseCheckFormVo;
|
||||
import com.bonus.material.purchase.domain.dto.PurchaseCheckDto;
|
||||
import com.bonus.material.purchase.domain.dto.PurchaseQueryDto;
|
||||
import com.bonus.material.purchase.domain.vo.PurchaseCheckFormVo;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import com.bonus.common.log.annotation.SysLog;
|
||||
import com.bonus.common.security.annotation.RequiresPermissions;
|
||||
|
|
|
|||
|
|
@ -8,10 +8,9 @@ import javax.validation.constraints.NotNull;
|
|||
|
||||
import com.bonus.common.log.enums.OperaType;
|
||||
import com.bonus.material.common.annotation.PreventRepeatSubmit;
|
||||
import com.bonus.material.purchase.dto.PurchaseNoticePersonDto;
|
||||
import com.bonus.material.purchase.domain.dto.PurchaseNoticePersonDto;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
|
|
|
|||
|
|
@ -8,9 +8,9 @@ import com.bonus.common.log.annotation.SysLog;
|
|||
import com.bonus.common.log.enums.OperaType;
|
||||
import com.bonus.common.security.annotation.RequiresPermissions;
|
||||
import com.bonus.material.common.annotation.PreventRepeatSubmit;
|
||||
import com.bonus.material.purchase.dto.PurchaseDto;
|
||||
import com.bonus.material.purchase.domain.dto.PurchaseDto;
|
||||
import com.bonus.material.purchase.service.IPurchaseStorageService;
|
||||
import com.bonus.material.purchase.vo.PurchaseVo;
|
||||
import com.bonus.material.purchase.domain.vo.PurchaseVo;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
package com.bonus.material.purchase.dto;
|
||||
package com.bonus.material.purchase.domain.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.bonus.material.purchase.dto;
|
||||
package com.bonus.material.purchase.domain.dto;
|
||||
|
||||
import com.bonus.material.purchase.domain.PurchaseCheckDetails;
|
||||
import com.bonus.material.purchase.domain.PurchaseCheckInfo;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.bonus.material.purchase.dto;
|
||||
package com.bonus.material.purchase.domain.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.bonus.material.purchase.dto;
|
||||
package com.bonus.material.purchase.domain.dto;
|
||||
|
||||
import com.bonus.common.core.annotation.Excel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.bonus.material.purchase.dto;
|
||||
package com.bonus.material.purchase.domain.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.bonus.material.purchase.dto;
|
||||
package com.bonus.material.purchase.domain.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.bonus.material.purchase.vo;
|
||||
package com.bonus.material.purchase.domain.vo;
|
||||
|
||||
import com.bonus.material.purchase.domain.PurchaseCheckDetails;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.bonus.material.purchase.vo;
|
||||
package com.bonus.material.purchase.domain.vo;
|
||||
|
||||
import com.bonus.common.core.annotation.Excel;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
package com.bonus.material.purchase.mapper;
|
||||
|
||||
import com.bonus.material.purchase.dto.PurchaseDto;
|
||||
import com.bonus.material.purchase.vo.PurchaseVo;
|
||||
import com.bonus.material.purchase.domain.dto.PurchaseDto;
|
||||
import com.bonus.material.purchase.domain.vo.PurchaseVo;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ package com.bonus.material.purchase.mapper;
|
|||
|
||||
import java.util.List;
|
||||
import com.bonus.material.purchase.domain.PurchaseCheckDetails;
|
||||
import com.bonus.material.purchase.dto.PurchaseQueryDto;
|
||||
import com.bonus.material.purchase.domain.dto.PurchaseQueryDto;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
package com.bonus.material.purchase.mapper;
|
||||
|
||||
import com.bonus.material.purchase.domain.PurchaseCheckDetails;
|
||||
import com.bonus.material.purchase.dto.PurchaseCheckFileDto;
|
||||
import com.bonus.material.purchase.domain.dto.PurchaseCheckFileDto;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ package com.bonus.material.purchase.mapper;
|
|||
|
||||
import java.util.List;
|
||||
import com.bonus.material.purchase.domain.PurchaseCheckInfo;
|
||||
import com.bonus.material.purchase.vo.PurchaseCheckFormVo;
|
||||
import com.bonus.material.purchase.domain.vo.PurchaseCheckFormVo;
|
||||
|
||||
/**
|
||||
* 新购验收任务Mapper接口
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package com.bonus.material.purchase.mapper;
|
||||
|
||||
import com.bonus.material.purchase.dto.PurchaseDto;
|
||||
import com.bonus.material.purchase.vo.PurchaseVo;
|
||||
import com.bonus.material.purchase.domain.dto.PurchaseDto;
|
||||
import com.bonus.material.purchase.domain.vo.PurchaseVo;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
package com.bonus.material.purchase.service;
|
||||
|
||||
import com.bonus.common.core.web.domain.AjaxResult;
|
||||
import com.bonus.material.purchase.dto.PurchaseDto;
|
||||
import com.bonus.material.purchase.vo.PurchaseVo;
|
||||
import com.bonus.material.purchase.domain.dto.PurchaseDto;
|
||||
import com.bonus.material.purchase.domain.vo.PurchaseVo;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import java.util.List;
|
|||
|
||||
import com.bonus.common.core.web.domain.AjaxResult;
|
||||
import com.bonus.material.purchase.domain.PurchaseCheckDetails;
|
||||
import com.bonus.material.purchase.dto.PurchaseCheckFileDto;
|
||||
import com.bonus.material.purchase.domain.dto.PurchaseCheckFileDto;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -4,9 +4,9 @@ import java.util.List;
|
|||
|
||||
import com.bonus.common.core.web.domain.AjaxResult;
|
||||
import com.bonus.material.purchase.domain.PurchaseCheckInfo;
|
||||
import com.bonus.material.purchase.dto.PurchaseCheckDto;
|
||||
import com.bonus.material.purchase.dto.PurchaseQueryDto;
|
||||
import com.bonus.material.purchase.vo.PurchaseCheckFormVo;
|
||||
import com.bonus.material.purchase.domain.dto.PurchaseCheckDto;
|
||||
import com.bonus.material.purchase.domain.dto.PurchaseQueryDto;
|
||||
import com.bonus.material.purchase.domain.vo.PurchaseCheckFormVo;
|
||||
|
||||
/**
|
||||
* 新购验收任务Service接口
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import java.util.List;
|
|||
|
||||
import com.bonus.common.core.web.domain.AjaxResult;
|
||||
import com.bonus.material.purchase.domain.PurchaseNoticePerson;
|
||||
import com.bonus.material.purchase.dto.PurchaseNoticePersonDto;
|
||||
import com.bonus.material.purchase.domain.dto.PurchaseNoticePersonDto;
|
||||
|
||||
/**
|
||||
* 新购短信通知人员Service接口
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
package com.bonus.material.purchase.service;
|
||||
|
||||
import com.bonus.common.core.web.domain.AjaxResult;
|
||||
import com.bonus.material.purchase.dto.PurchaseDto;
|
||||
import com.bonus.material.purchase.vo.PurchaseVo;
|
||||
import com.bonus.material.purchase.domain.dto.PurchaseDto;
|
||||
import com.bonus.material.purchase.domain.vo.PurchaseVo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
|
|
|||
|
|
@ -10,10 +10,10 @@ 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.purchase.config.RemoteConfig;
|
||||
import com.bonus.material.purchase.dto.PurchaseDto;
|
||||
import com.bonus.material.purchase.domain.dto.PurchaseDto;
|
||||
import com.bonus.material.purchase.mapper.PurchaseBindMapper;
|
||||
import com.bonus.material.purchase.service.IPurchaseBindService;
|
||||
import com.bonus.material.purchase.vo.PurchaseVo;
|
||||
import com.bonus.material.purchase.domain.vo.PurchaseVo;
|
||||
import com.bonus.material.task.mapper.TmTaskMapper;
|
||||
import com.google.zxing.WriterException;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
|
|
|||
|
|
@ -5,10 +5,8 @@ import com.bonus.common.core.exception.ServiceException;
|
|||
import com.bonus.common.core.utils.DateUtils;
|
||||
import com.bonus.common.core.web.domain.AjaxResult;
|
||||
import com.bonus.common.security.utils.SecurityUtils;
|
||||
import com.bonus.material.purchase.dto.PurchaseCheckFileDto;
|
||||
import com.bonus.material.purchase.domain.dto.PurchaseCheckFileDto;
|
||||
import com.bonus.material.purchase.mapper.PurchaseCheckFileMapper;
|
||||
import com.bonus.material.purchase.mapper.PurchaseCheckInfoMapper;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.bonus.material.purchase.mapper.PurchaseCheckDetailsMapper;
|
||||
import com.bonus.material.purchase.domain.PurchaseCheckDetails;
|
||||
|
|
|
|||
|
|
@ -14,10 +14,10 @@ import com.bonus.common.core.utils.DateUtils;
|
|||
import com.bonus.common.core.web.domain.AjaxResult;
|
||||
import com.bonus.material.purchase.config.PurchaseTaskEnum;
|
||||
import com.bonus.material.purchase.domain.PurchaseCheckDetails;
|
||||
import com.bonus.material.purchase.dto.PurchaseCheckDto;
|
||||
import com.bonus.material.purchase.dto.PurchaseQueryDto;
|
||||
import com.bonus.material.purchase.domain.dto.PurchaseCheckDto;
|
||||
import com.bonus.material.purchase.domain.dto.PurchaseQueryDto;
|
||||
import com.bonus.material.purchase.mapper.PurchaseCheckDetailsMapper;
|
||||
import com.bonus.material.purchase.vo.PurchaseCheckFormVo;
|
||||
import com.bonus.material.purchase.domain.vo.PurchaseCheckFormVo;
|
||||
import com.bonus.material.task.domain.TmTask;
|
||||
import com.bonus.material.task.mapper.TmTaskMapper;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import com.bonus.common.core.utils.DateUtils;
|
|||
import com.bonus.common.core.utils.sms.SmsUtils;
|
||||
import com.bonus.common.core.web.domain.AjaxResult;
|
||||
import com.bonus.material.purchase.config.PurchaseTaskEnum;
|
||||
import com.bonus.material.purchase.dto.PurchaseNoticePersonDto;
|
||||
import com.bonus.material.purchase.domain.dto.PurchaseNoticePersonDto;
|
||||
import com.bonus.material.task.domain.TmTask;
|
||||
import com.bonus.material.task.mapper.TmTaskMapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
|
|
|||
|
|
@ -7,11 +7,11 @@ import com.bonus.common.core.utils.StringUtils;
|
|||
import com.bonus.common.core.web.domain.AjaxResult;
|
||||
import com.bonus.material.ma.mapper.MachineMapper;
|
||||
import com.bonus.material.purchase.config.RemoteConfig;
|
||||
import com.bonus.material.purchase.dto.PurchaseDto;
|
||||
import com.bonus.material.purchase.domain.dto.PurchaseDto;
|
||||
import com.bonus.material.purchase.mapper.PurchaseBindMapper;
|
||||
import com.bonus.material.purchase.mapper.PurchaseStorageMapper;
|
||||
import com.bonus.material.purchase.service.IPurchaseStorageService;
|
||||
import com.bonus.material.purchase.vo.PurchaseVo;
|
||||
import com.bonus.material.purchase.domain.vo.PurchaseVo;
|
||||
import com.bonus.material.task.mapper.TmTaskMapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
select ma_id, type_id, ma_code, pre_code, ma_status, qr_code, buy_price, ma_vender, out_fac_time, out_fac_code, assets_code, check_man, this_check_time, next_check_time, gps_code, rfid_code, erp_code, transfer_code, in_out_num, buy_task, own_house, company_id, create_time, update_time, inspect_man, inspect_status, phone from ma_machine
|
||||
</sql>
|
||||
|
||||
<select id="selectMachineList" resultType="com.bonus.material.ma.vo.MachineVo">
|
||||
<select id="selectMachineList" resultType="com.bonus.material.ma.domain.vo.MachineVo">
|
||||
SELECT
|
||||
ma.ma_id as maId,
|
||||
ma.type_id as typeId,
|
||||
|
|
@ -113,7 +113,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
order by ma.create_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectMachineByMaId" resultType="com.bonus.material.ma.vo.MachineVo">
|
||||
<select id="selectMachineByMaId" resultType="com.bonus.material.ma.domain.vo.MachineVo">
|
||||
SELECT
|
||||
ma.ma_id as maId,
|
||||
ma.type_id as typeId,
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<result property="intelligentCode" column="intelligent_code" />
|
||||
</resultMap>
|
||||
|
||||
<resultMap type="com.bonus.material.ma.vo.MaTypeListVo" id="MaTypeListVoResult">
|
||||
<resultMap type="com.bonus.material.ma.domain.vo.MaTypeVo" id="MaTypeVoResult">
|
||||
<result property="typeId" column="type_id" />
|
||||
<result property="typeName" column="type_name" />
|
||||
<result property="parentId" column="parent_id" />
|
||||
|
|
@ -76,7 +76,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<result property="houseName" column="house_name" />
|
||||
</resultMap>
|
||||
|
||||
<resultMap type="com.bonus.material.ma.vo.MaTypeConfigVo" id="MaTypeConfigVoResult">
|
||||
<resultMap type="com.bonus.material.ma.domain.vo.MaTypeConfigVo" id="MaTypeConfigVoResult">
|
||||
<result property="typeId" column="type_id" />
|
||||
<result property="typeName" column="type_name" />
|
||||
<result property="parentId" column="parent_id" />
|
||||
|
|
@ -275,7 +275,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
where del_flag = 0 and level != #{level}
|
||||
</select>
|
||||
|
||||
<select id="selectTypeListAndParent" resultMap="MaTypeListVoResult">
|
||||
<select id="selectTypeListAndParent" resultMap="MaTypeVoResult">
|
||||
SELECT
|
||||
a.*, -- 当前层级的所有字段
|
||||
b.type_name AS parentThreeLevelName, -- 父层级名称
|
||||
|
|
@ -320,7 +320,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectMaTypeListByHouseId" resultType="com.bonus.material.ma.vo.MaTypeSelectVo">
|
||||
<select id="selectMaTypeListByHouseId" resultType="com.bonus.material.ma.domain.vo.MaTypeSelectVo">
|
||||
select
|
||||
wh_house_set.type_id AS typeId,
|
||||
mt.type_name AS typeName,mt.parent_id AS parentId,mt.level
|
||||
|
|
@ -332,7 +332,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
wh_house_set.house_id = #{mouseId} and wh_house_set.del_flag = 0
|
||||
</select>
|
||||
|
||||
<select id="getMaTypeSelectVoListByParentId" resultType="com.bonus.material.ma.vo.MaTypeSelectVo">
|
||||
<select id="getMaTypeSelectVoListByParentId" resultType="com.bonus.material.ma.domain.vo.MaTypeSelectVo">
|
||||
select
|
||||
type_id as typeId,
|
||||
type_name as typeName,
|
||||
|
|
@ -406,7 +406,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
|
||||
</select>
|
||||
|
||||
<select id="getListByTypeName" resultType="com.bonus.material.ma.vo.MaTypeListVo">
|
||||
<select id="getListByTypeName" resultType="com.bonus.material.ma.domain.vo.MaTypeVo">
|
||||
SELECT DISTINCT
|
||||
m3.type_name AS itemType,
|
||||
m2.type_name AS materialType,
|
||||
|
|
|
|||
|
|
@ -120,7 +120,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</if>
|
||||
</update>
|
||||
|
||||
<select id="selectAll" resultType="com.bonus.material.purchase.vo.PurchaseVo">
|
||||
<select id="selectAll" resultType="com.bonus.material.purchase.domain.vo.PurchaseVo">
|
||||
SELECT
|
||||
pci.task_id as taskId,
|
||||
pci.arrival_time as arrivalTime,
|
||||
|
|
@ -158,7 +158,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
pci.arrival_time DESC
|
||||
</select>
|
||||
|
||||
<select id="selectPurchaseCheckInfoById" resultType="com.bonus.material.purchase.vo.PurchaseVo">
|
||||
<select id="selectPurchaseCheckInfoById" resultType="com.bonus.material.purchase.domain.vo.PurchaseVo">
|
||||
SELECT
|
||||
pm.task_id AS taskId,
|
||||
pcd.id AS purchaseId,
|
||||
|
|
@ -202,7 +202,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</if>
|
||||
</select>
|
||||
|
||||
<select id="getDetails" resultType="com.bonus.material.purchase.vo.PurchaseVo">
|
||||
<select id="getDetails" resultType="com.bonus.material.purchase.domain.vo.PurchaseVo">
|
||||
SELECT
|
||||
pcd.task_id AS taskId,
|
||||
pcd.id AS purchaseId,
|
||||
|
|
@ -244,7 +244,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
pcd.type_id
|
||||
</select>
|
||||
|
||||
<select id="select" resultType="com.bonus.material.purchase.vo.PurchaseVo">
|
||||
<select id="select" resultType="com.bonus.material.purchase.domain.vo.PurchaseVo">
|
||||
SELECT
|
||||
qr_code as qrCode
|
||||
FROM
|
||||
|
|
@ -255,7 +255,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
qr_code DESC
|
||||
</select>
|
||||
|
||||
<select id="selectByCode" resultType="com.bonus.material.purchase.dto.PurchaseDto">
|
||||
<select id="selectByCode" resultType="com.bonus.material.purchase.domain.dto.PurchaseDto">
|
||||
SELECT
|
||||
task_id as taskId,
|
||||
type_id as typeId,
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
where pcd.task_id = #{taskId}
|
||||
</select>
|
||||
|
||||
<select id="selectPurchaseCheckDetailsListByQueryDto" parameterType="com.bonus.material.purchase.dto.PurchaseQueryDto" resultMap="PurchaseCheckDetailsResult">
|
||||
<select id="selectPurchaseCheckDetailsListByQueryDto" parameterType="com.bonus.material.purchase.domain.dto.PurchaseQueryDto" resultMap="PurchaseCheckDetailsResult">
|
||||
<include refid="selectPurchaseCheckDetailsJoinVo"/>
|
||||
where pcd.task_id = #{taskId}
|
||||
<if test="typeId != null">
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.bonus.material.purchase.mapper.PurchaseCheckFileMapper">
|
||||
<resultMap type="com.bonus.material.purchase.dto.PurchaseCheckFileDto" id="PurchaseCheckFileResult">
|
||||
<resultMap type="com.bonus.material.purchase.domain.dto.PurchaseCheckFileDto" id="PurchaseCheckFileResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="fileName" column="file_name" />
|
||||
<result property="fileUrl" column="file_url" />
|
||||
|
|
@ -29,7 +29,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<include refid="selectPurchaseCheckFileJoinVo"/>
|
||||
</select>
|
||||
|
||||
<insert id="insertPurchaseCheckFiles" parameterType="com.bonus.material.purchase.dto.PurchaseCheckFileDto" useGeneratedKeys="true" keyProperty="id">
|
||||
<insert id="insertPurchaseCheckFiles" parameterType="com.bonus.material.purchase.domain.dto.PurchaseCheckFileDto" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into bm_file_info
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="modelId != null">model_id,</if>
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<result property="taskStatus" column="task_status" />
|
||||
</resultMap>
|
||||
|
||||
<resultMap type="com.bonus.material.purchase.vo.PurchaseCheckFormVo" id="PurchaseCheckFormResult">
|
||||
<resultMap type="com.bonus.material.purchase.domain.vo.PurchaseCheckFormVo" id="PurchaseCheckFormResult">
|
||||
<result property="taskId" column="task_id" />
|
||||
<result property="code" column="code" />
|
||||
<result property="arrivalDate" column="arrival_time" />
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
type_id = #{typeId}
|
||||
</update>
|
||||
|
||||
<select id="selectAll" resultType="com.bonus.material.purchase.vo.PurchaseVo">
|
||||
<select id="selectAll" resultType="com.bonus.material.purchase.domain.vo.PurchaseVo">
|
||||
SELECT
|
||||
pci.task_id as taskId,
|
||||
pci.arrival_time as arrivalTime,
|
||||
|
|
@ -121,7 +121,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</select>
|
||||
|
||||
|
||||
<select id="getDetails" resultType="com.bonus.material.purchase.vo.PurchaseVo">
|
||||
<select id="getDetails" resultType="com.bonus.material.purchase.domain.vo.PurchaseVo">
|
||||
SELECT
|
||||
pcd.task_id AS taskId,
|
||||
pcd.id AS purchaseId,
|
||||
|
|
@ -163,7 +163,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
pcd.type_id
|
||||
</select>
|
||||
|
||||
<select id="select" resultType="com.bonus.material.purchase.vo.PurchaseVo">
|
||||
<select id="select" resultType="com.bonus.material.purchase.domain.vo.PurchaseVo">
|
||||
SELECT
|
||||
pcd.task_id as taskId,
|
||||
pcd.status as STATUS
|
||||
|
|
|
|||
Loading…
Reference in New Issue