Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
c9bcd79440
|
|
@ -6,13 +6,13 @@ package com.bonus.common.biz.constant;
|
|||
*/
|
||||
public class BmConfigItems {
|
||||
|
||||
public static final String KU_GUAN_ROLE_IDS = "KuGuanRoleIDs";
|
||||
public static final String KU_GUAN_ROLE_IDS = "ku_guan_role_ids";
|
||||
|
||||
public static final String WEI_XIU_ROLE_IDS = "KuGuanRoleIDs";
|
||||
public static final String WEI_XIU_ROLE_IDS = "wei_xiu_role_ids";
|
||||
|
||||
public static final String LEASE_TASK_AUDIT_ROLE_IDS = "LeaseTaskAuditRoleIDs";
|
||||
public static final String LEASE_TASK_AUDIT_ROLE_IDS = "lease_task_audit_role_ids";
|
||||
|
||||
public static final String BACK_TASK_AUDIT_ROLE_IDS = "BackTaskAuditRoleIDs";
|
||||
public static final String BACK_TASK_AUDIT_ROLE_IDS = "back_task_audit_role_ids";
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -2,23 +2,22 @@ package com.bonus.material.ma.controller;
|
|||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
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.util.CollectionUtils;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import com.bonus.common.log.annotation.SysLog;
|
||||
import com.bonus.common.security.annotation.RequiresPermissions;
|
||||
|
|
@ -47,38 +46,50 @@ 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<>();
|
||||
for (Integer parentId : parentIds) {
|
||||
myTypeList.addAll(typeService.getListByParentId(parentId.longValue(), type));
|
||||
public AjaxResult getListByMaType(MaTypeVo maTypeVo) {
|
||||
List<Integer> parentIds = typeService.selectParentId(maTypeVo);
|
||||
if (CollectionUtils.isEmpty(parentIds)) {
|
||||
return AjaxResult.success(new ArrayList<>());
|
||||
}
|
||||
List<MaTypeVo> maTypeVos = new ArrayList<>();
|
||||
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));
|
||||
for (Integer parentId : parentIds) {
|
||||
maTypeVos.addAll(typeService.getListByParentId(parentId.longValue(), maTypeVo));
|
||||
}
|
||||
List<MaTypeVo> updatedMaTypeVos = maTypeVos.stream()
|
||||
.map(obj -> {
|
||||
obj.setHouseId(maTypeVo.getHouseId());
|
||||
return obj;
|
||||
}).collect(Collectors.toList());
|
||||
if (BooleanUtils.isTrue(maTypeVo.getDisplayBindRelationship())) {
|
||||
List<MaTypeVo> finalMaTypeVos = typeService.getMyTypeAndBindUsers(updatedMaTypeVos);
|
||||
return AjaxResult.success(ListPagingUtil.paging(pageIndex, pageSize, finalMaTypeVos));
|
||||
} else {
|
||||
return AjaxResult.success(ListPagingUtil.paging(pageIndex, pageSize, updatedMaTypeVos));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -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.*;
|
||||
|
|
@ -121,7 +121,7 @@ public class PurchaseCheckDetailsController extends BaseController {
|
|||
@GetMapping("/fileList")
|
||||
@SysLog(title = "新购验收任务明细报告查询", businessType = OperaType.QUERY, module = "物资新购->根据任务id查询物资报告附件")
|
||||
public AjaxResult getFileList(PurchaseCheckFileDto purchaseCheckFileDto) {
|
||||
return success(purchaseCheckDetailsService.selectPurchaseCheckFileListByTaskId(Long.valueOf(purchaseCheckFileDto.getTaskId()), purchaseCheckFileDto.getTypeId()));
|
||||
return success(purchaseCheckDetailsService.selectPurchaseCheckFileListByTaskType(purchaseCheckFileDto.getTaskType(), purchaseCheckFileDto.getTypeId()));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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.*;
|
||||
|
|
|
|||
|
|
@ -43,11 +43,16 @@ public class PurchaseCheckDetails extends BaseEntity {
|
|||
@ApiModelProperty(value = "物资名称--规格parent类型")
|
||||
private String maTypeName;
|
||||
|
||||
/** 采购单价 */
|
||||
@Excel(name = "采购单价")
|
||||
@ApiModelProperty(value = "采购单价")
|
||||
/** 采购单价(不含税) */
|
||||
@Excel(name = "采购单价(不含税)")
|
||||
@ApiModelProperty(value = "采购单价(不含税)")
|
||||
private BigDecimal purchasePrice;
|
||||
|
||||
/** 采购单价(含税) */
|
||||
@Excel(name = "采购单价(含税)")
|
||||
@ApiModelProperty(value = "采购单价(含税)")
|
||||
private BigDecimal purchaseTaxPrice;
|
||||
|
||||
/** 采购数量 */
|
||||
@Excel(name = "采购数量")
|
||||
@ApiModelProperty(value = "采购数量")
|
||||
|
|
|
|||
|
|
@ -75,23 +75,23 @@ public class PurchaseCheckInfo extends BaseEntity {
|
|||
private Long purchaseMaNumber;
|
||||
|
||||
/**
|
||||
* 采购含税价格
|
||||
* 采购单价(不含税)
|
||||
*/
|
||||
@ApiModelProperty(value = "采购含税价格--外层Table字段")
|
||||
private BigDecimal purchaseTaxPrice;
|
||||
@ApiModelProperty(value = "采购单价(不含税)--外层Table字段")
|
||||
private BigDecimal purchasePrice;
|
||||
|
||||
/**
|
||||
* 采购不含税价格
|
||||
* 采购单价(含税)
|
||||
*/
|
||||
@ApiModelProperty(value = "采购不含税价格--外层Table字段")
|
||||
private BigDecimal purchaseNoTaxPrice;
|
||||
@ApiModelProperty(value = "采购单价(含税)--外层Table字段")
|
||||
private BigDecimal purchaseTaxPrice;
|
||||
|
||||
/**
|
||||
* 税率
|
||||
*/
|
||||
@ApiModelProperty(value = "税率--Int整形 0~100")
|
||||
@ApiModelProperty(value = "税率 0~100")
|
||||
@Size(max = 100, message = "税率长度必须介于 0 和 100 之间")
|
||||
private Integer taxRate;
|
||||
private BigDecimal taxRate;
|
||||
|
||||
@ApiModelProperty(value = "操作人名称")
|
||||
private String createUserName;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
@ -21,16 +21,24 @@ public class PurchaseCheckFileDto {
|
|||
|
||||
@ApiModelProperty(value = "附件名称")
|
||||
@NotBlank(message = "附件名称不能为空")
|
||||
private String fileName;
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "附件地址url")
|
||||
@NotBlank(message = "附件地址url不能为空")
|
||||
private String fileUrl;
|
||||
private String url;
|
||||
|
||||
@ApiModelProperty(value = "任务ID")
|
||||
@NotBlank(message = "任务ID不能为空")
|
||||
private String taskId;
|
||||
|
||||
@ApiModelProperty(value = "任务类型")
|
||||
@NotBlank(message = "任务类型不能为空")
|
||||
private Long taskType;
|
||||
|
||||
@ApiModelProperty(value = "文件类型")
|
||||
@NotBlank(message = "文件类型不能为空")
|
||||
private String fileType;
|
||||
|
||||
@ApiModelProperty(value = "物资类型ID")
|
||||
@NotNull(message = "物资类型ID不能为空")
|
||||
private Long typeId;
|
||||
|
|
@ -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;
|
||||
|
|
@ -16,10 +15,10 @@ public interface PurchaseCheckFileMapper {
|
|||
|
||||
/**
|
||||
* 根据任务id查询新购验收任务详细报告列表--Join查询
|
||||
* @param taskId 任务id
|
||||
* @param taskType 任务id
|
||||
* @param typeId 规格id
|
||||
*/
|
||||
List<PurchaseCheckFileDto> selectPurchaseCheckFileListByTaskId(@Param("taskId") Long taskId, @Param("typeId") Long typeId);
|
||||
List<PurchaseCheckFileDto> selectPurchaseCheckFileListByTaskType(@Param("taskType") Long taskType, @Param("typeId") Long typeId);
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
/**
|
||||
|
|
@ -34,7 +34,7 @@ public interface IPurchaseCheckDetailsService {
|
|||
* 根据任务ID查询报告附件列表
|
||||
* @param taskId 任务id
|
||||
*/
|
||||
List<PurchaseCheckFileDto> selectPurchaseCheckFileListByTaskId(Long taskId, Long typeId);
|
||||
List<PurchaseCheckFileDto> selectPurchaseCheckFileListByTaskType(Long taskId, Long typeId);
|
||||
|
||||
/**
|
||||
* 新增报告附件
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
@ -56,12 +54,12 @@ public class PurchaseCheckDetailsServiceImpl implements IPurchaseCheckDetailsSer
|
|||
/**
|
||||
* 根据任务ID查询报告附件列表
|
||||
*
|
||||
* @param taskId 任务id
|
||||
* @param taskType 任务类型
|
||||
*/
|
||||
@Override
|
||||
public List<PurchaseCheckFileDto> selectPurchaseCheckFileListByTaskId(Long taskId, Long typeId) {
|
||||
public List<PurchaseCheckFileDto> selectPurchaseCheckFileListByTaskType(Long taskType, Long typeId) {
|
||||
try {
|
||||
return purchaseCheckFileMapper.selectPurchaseCheckFileListByTaskId(taskId, typeId);
|
||||
return purchaseCheckFileMapper.selectPurchaseCheckFileListByTaskType(taskType, typeId);
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException("SQL执行错误:" + e.getMessage());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
@ -105,7 +105,7 @@ public class PurchaseCheckInfoServiceImpl implements IPurchaseCheckInfoService {
|
|||
// 采购物资数量
|
||||
AtomicLong purchaseMaTotalNumber = new AtomicLong(0L);
|
||||
// 采购物资不含税价格
|
||||
AtomicReference<BigDecimal> purchaseMaTotalNoTaxPrice = new AtomicReference<>(BigDecimal.ZERO);
|
||||
AtomicReference<BigDecimal> purchaseMaTotalPrice = new AtomicReference<>(BigDecimal.ZERO);
|
||||
|
||||
// 执行for循环统计采购物资数量、价格
|
||||
for (PurchaseCheckDetails detail : purchaseCheckDetails) {
|
||||
|
|
@ -119,17 +119,17 @@ public class PurchaseCheckInfoServiceImpl implements IPurchaseCheckInfoService {
|
|||
// 统计采购数量
|
||||
purchaseMaTotalNumber.addAndGet(detail.getPurchaseNum());
|
||||
// 采购物资数量乘以采购不含税价格
|
||||
purchaseMaTotalNoTaxPrice.updateAndGet(v -> v.add(new BigDecimal(detail.getPurchaseNum()).multiply(detail.getPurchasePrice())));
|
||||
purchaseMaTotalPrice.updateAndGet(v -> v.add(new BigDecimal(detail.getPurchaseNum()).multiply(detail.getPurchasePrice())));
|
||||
}
|
||||
|
||||
// 赋值统计出来的采购物资数量、不含税价格
|
||||
purchaseCheckInfo.setPurchaseMaNumber(purchaseMaTotalNumber.get());
|
||||
purchaseCheckInfo.setPurchaseNoTaxPrice(purchaseMaTotalNoTaxPrice.get());
|
||||
purchaseCheckInfo.setPurchasePrice(purchaseMaTotalPrice.get());
|
||||
|
||||
// 通过不含税价格及税率,计算出含税价格并赋值
|
||||
if (purchaseCheckInfo.getTaxRate() != null && purchaseCheckInfo.getPurchaseNoTaxPrice() != null) {
|
||||
if (purchaseCheckInfo.getTaxRate() != null && purchaseCheckInfo.getPurchasePrice() != null) {
|
||||
purchaseCheckInfo.setPurchaseTaxPrice(
|
||||
calculateTaxPrice(purchaseMaTotalNoTaxPrice.get(), new BigDecimal(purchaseCheckInfo.getTaxRate()))
|
||||
calculateTaxPrice(purchaseMaTotalPrice.get(), purchaseCheckInfo.getTaxRate())
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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" />
|
||||
|
|
@ -138,6 +138,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
LEFT JOIN ma_type mt2 ON mt.parent_id = mt2.type_id
|
||||
LEFT JOIN ma_type mt3 ON mt2.parent_id = mt3.type_id
|
||||
LEFT JOIN ma_type mt4 ON mt3.parent_id = mt4.type_id
|
||||
LEFT JOIN wh_house_set mhs on mt4.type_id = mhs.type_id
|
||||
<where>
|
||||
<if test="level == 1">
|
||||
and mt4.type_id = #{typeId}
|
||||
|
|
@ -152,6 +153,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
and mt.level = 4
|
||||
</if>
|
||||
and mt2.type_id is not null
|
||||
and mhs.house_id = #{houseId} and mhs.del_flag = 0
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
|
@ -275,7 +277,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 +322,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 +334,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 +408,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,
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<result property="unitName" column="unit_name" />
|
||||
<result property="maTypeName" column="ma_type_name" />
|
||||
<result property="purchasePrice" column="purchase_price" />
|
||||
<result property="purchaseTaxPrice" column="purchase_tax_price" />
|
||||
<result property="purchaseNum" column="purchase_num" />
|
||||
<result property="checkNum" column="check_num" />
|
||||
<result property="bindNum" column="bind_num" />
|
||||
|
|
@ -34,11 +35,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</resultMap>
|
||||
|
||||
<sql id="selectPurchaseCheckDetailsVo">
|
||||
select id, task_id, type_id, purchase_price, purchase_num, check_num, bind_num, check_result, supplier_id, status, create_by, production_time, create_time, update_by, update_time, remark, check_url_name, check_url, input_num, input_status, input_time, file_name, file_url, company_id from purchase_check_details
|
||||
select id, task_id, type_id, purchase_price, purchase_tax_price, purchase_num, check_num, bind_num, check_result, supplier_id, status, create_by, production_time, create_time, update_by, update_time, remark, check_url_name, check_url, input_num, input_status, input_time, file_name, file_url, company_id from purchase_check_details
|
||||
</sql>
|
||||
|
||||
<sql id="selectPurchaseCheckDetailsJoinVo">
|
||||
select pcd.id, pcd.task_id, pcd.type_id, pcd.purchase_price, pcd.purchase_num, pcd.check_num, pcd.bind_num, pcd.check_result,
|
||||
select pcd.id, pcd.task_id, pcd.type_id, pcd.purchase_price, pcd.purchase_tax_price, pcd.purchase_num, pcd.check_num, pcd.bind_num, pcd.check_result,
|
||||
pcd.supplier_id, pcd.status, pcd.create_by, pcd.production_time, pcd.create_time, pcd.update_by, pcd.update_time,
|
||||
pcd.remark, pcd.check_url_name, pcd.check_url, pcd.input_num, pcd.input_status, pcd.input_time, pcd.file_name,
|
||||
pcd.file_url, pcd.company_id, mt.type_name, mt.unit_name, mtp.type_name as ma_type_name
|
||||
|
|
@ -53,6 +54,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="taskId != null "> and task_id = #{taskId}</if>
|
||||
<if test="typeId != null "> and type_id = #{typeId}</if>
|
||||
<if test="purchasePrice != null "> and purchase_price = #{purchasePrice}</if>
|
||||
<if test="purchaseTaxPrice != null "> and purchase_tax_price = #{purchaseTaxPrice}</if>
|
||||
<if test="purchaseNum != null "> and purchase_num = #{purchaseNum}</if>
|
||||
<if test="checkNum != null "> and check_num = #{checkNum}</if>
|
||||
<if test="bindNum != null "> and bind_num = #{bindNum}</if>
|
||||
|
|
@ -81,7 +83,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">
|
||||
|
|
@ -109,6 +111,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="taskId != null">task_id,</if>
|
||||
<if test="typeId != null">type_id,</if>
|
||||
<if test="purchasePrice != null">purchase_price,</if>
|
||||
<if test="purchaseTaxPrice != null">purchase_tax_price,</if>
|
||||
<if test="purchaseNum != null">purchase_num,</if>
|
||||
<if test="checkNum != null">check_num,</if>
|
||||
<if test="bindNum != null">bind_num,</if>
|
||||
|
|
@ -134,6 +137,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="taskId != null">#{taskId},</if>
|
||||
<if test="typeId != null">#{typeId},</if>
|
||||
<if test="purchasePrice != null">#{purchasePrice},</if>
|
||||
<if test="purchaseTaxPrice != null">#{purchaseTaxPrice},</if>
|
||||
<if test="purchaseNum != null">#{purchaseNum},</if>
|
||||
<if test="checkNum != null">#{checkNum},</if>
|
||||
<if test="bindNum != null">#{bindNum},</if>
|
||||
|
|
@ -163,6 +167,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="taskId != null">task_id = #{taskId},</if>
|
||||
<if test="typeId != null">type_id = #{typeId},</if>
|
||||
<if test="purchasePrice != null">purchase_price = #{purchasePrice},</if>
|
||||
<if test="purchaseTaxPrice != null">purchase_tax_price = #{purchaseTaxPrice},</if>
|
||||
<if test="purchaseNum != null">purchase_num = #{purchaseNum},</if>
|
||||
<if test="checkNum != null">check_num = #{checkNum},</if>
|
||||
<if test="bindNum != null">bind_num = #{bindNum},</if>
|
||||
|
|
@ -219,8 +224,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
|
||||
<insert id="insertPurchaseCheckDetailsList">
|
||||
<foreach collection="list" item="item" separator=";">
|
||||
insert into purchase_check_details(task_id,type_id,purchase_price,purchase_num,check_num,bind_num,check_result,supplier_id,status,production_time,create_by,create_time,update_by,update_time,remark,check_url_name,check_url,input_num,input_status,input_time,file_name,file_url,company_id)
|
||||
values(#{item.taskId},#{item.typeId},#{item.purchasePrice},#{item.purchaseNum},#{item.checkNum},#{item.bindNum},#{item.checkResult},#{item.supplierId},#{item.status},#{item.productionTime},#{item.createBy},#{item.createTime},#{item.updateBy},#{item.updateTime},#{item.remark},#{item.checkUrlName},#{item.checkUrl},#{item.inputNum},#{item.inputStatus},#{item.inputTime},#{item.fileName},#{item.fileUrl},#{item.companyId})
|
||||
insert into purchase_check_details(task_id,type_id,purchase_price,purchase_tax_price,purchase_num,check_num,bind_num,check_result,supplier_id,status,production_time,create_by,create_time,update_by,update_time,remark,check_url_name,check_url,input_num,input_status,input_time,file_name,file_url,company_id)
|
||||
values(#{item.taskId},#{item.typeId},#{item.purchasePrice},#{item.purchaseTaxPrice},#{item.purchaseNum},#{item.checkNum},#{item.bindNum},#{item.checkResult},#{item.supplierId},#{item.status},#{item.productionTime},#{item.createBy},#{item.createTime},#{item.updateBy},#{item.updateTime},#{item.remark},#{item.checkUrlName},#{item.checkUrl},#{item.inputNum},#{item.inputStatus},#{item.inputTime},#{item.fileName},#{item.fileUrl},#{item.companyId})
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
|
|
|
|||
|
|
@ -3,10 +3,10 @@
|
|||
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" />
|
||||
<result property="name" column="name" />
|
||||
<result property="url" column="url" />
|
||||
<result property="taskId" column="task_id" />
|
||||
<result property="dictCode" column="dict_code" />
|
||||
<result property="dictLabel" column="dict_label" />
|
||||
|
|
@ -15,26 +15,26 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<sql id="selectPurchaseCheckFileJoinVo">
|
||||
SELECT
|
||||
sdd.dict_code,sdd.dict_label,
|
||||
bfi.id,bfi.file_name,bfi.file_url
|
||||
bfi.id,bfi.name,bfi.url
|
||||
FROM
|
||||
sys_dict_data sdd
|
||||
LEFT JOIN
|
||||
bm_file_info bfi ON bfi.dic_id = sdd.dict_code and bfi.task_id = #{taskId} and bfi.model_id = #{typeId}
|
||||
bm_file_info bfi ON bfi.dic_id = sdd.dict_code and bfi.task_type = #{taskType} and bfi.model_id = #{typeId}
|
||||
WHERE
|
||||
sdd.dict_type = 'purchase_check_report_type'
|
||||
</sql>
|
||||
|
||||
|
||||
<select id="selectPurchaseCheckFileListByTaskId" parameterType="Long" resultMap="PurchaseCheckFileResult">
|
||||
<select id="selectPurchaseCheckFileListByTaskType" parameterType="Long" resultMap="PurchaseCheckFileResult">
|
||||
<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>
|
||||
<if test="fileName != null">file_name,</if>
|
||||
<if test="fileUrl != null">file_url,</if>
|
||||
<if test="name != null">name,</if>
|
||||
<if test="url != null">url,</if>
|
||||
<if test="dictCode != null">dic_id,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
create_time,
|
||||
|
|
@ -42,8 +42,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="modelId != null">#{modelId,jdbcType=INTEGER},</if>
|
||||
<if test="fileName != null">#{fileName,jdbcType=VARCHAR},</if>
|
||||
<if test="fileUrl != null">#{fileUrl,jdbcType=VARCHAR},</if>
|
||||
<if test="name != null">#{name,jdbcType=VARCHAR},</if>
|
||||
<if test="url != null">#{url,jdbcType=VARCHAR},</if>
|
||||
<if test="dictCode != null">#{dictCode},</if>
|
||||
<if test="createBy != null">#{createBy,jdbcType=VARCHAR},</if>
|
||||
now(),
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<result property="purchaseTime" column="purchase_time" />
|
||||
<result property="arrivalTime" column="arrival_time" />
|
||||
<result property="purchaser" column="purchaser" />
|
||||
<result property="taxRate" column="tax_rate" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createUserName" column="purchaser_name" />
|
||||
<result property="createTime" column="create_time" />
|
||||
|
|
@ -20,7 +21,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" />
|
||||
|
|
@ -28,7 +29,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
|
||||
<sql id="selectPurchaseCheckInfoBaseSQL">
|
||||
select
|
||||
id, task_id, purchase_time, arrival_time, purchaser, create_by,
|
||||
id, task_id, purchase_time, arrival_time, purchaser, tax_rate, create_by,
|
||||
create_time, update_by, update_time, remark, company_id
|
||||
from
|
||||
purchase_check_info
|
||||
|
|
@ -36,7 +37,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
|
||||
<sql id="selectPurchaseCheckInfoJoinSQL">
|
||||
select
|
||||
pci.id, pci.task_id, pci.purchase_time, pci.arrival_time, pci.purchaser, pci.create_by,
|
||||
pci.id, pci.task_id, pci.purchase_time, pci.arrival_time, pci.purchaser, pci.tax_rate, pci.create_by,
|
||||
pci.create_time, pci.update_by, pci.update_time, pci.remark, pci.company_id,
|
||||
t.task_status, t.task_type, t.code, su.user_name as create_user_name
|
||||
from
|
||||
|
|
@ -52,6 +53,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="purchaseTime != null "> and purchase_time = #{purchaseTime}</if>
|
||||
<if test="arrivalTime != null "> and arrival_time = #{arrivalTime}</if>
|
||||
<if test="purchaser != null "> and purchaser = #{purchaser}</if>
|
||||
<if test="taxRate != null "> and tax_rate = #{taxRate}</if>
|
||||
<if test="companyId != null "> and company_id = #{companyId}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
|
@ -68,6 +70,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="purchaseTime != null">purchase_time,</if>
|
||||
<if test="arrivalTime != null">arrival_time,</if>
|
||||
<if test="purchaser != null">purchaser,</if>
|
||||
<if test="taxRate != null">tax_rate,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
|
|
@ -80,6 +83,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="purchaseTime != null">#{purchaseTime},</if>
|
||||
<if test="arrivalTime != null">#{arrivalTime},</if>
|
||||
<if test="purchaser != null">#{purchaser},</if>
|
||||
<if test="taxRate != null">#{taxRate},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
|
|
@ -96,6 +100,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="purchaseTime != null">purchase_time = #{purchaseTime},</if>
|
||||
<if test="arrivalTime != null">arrival_time = #{arrivalTime},</if>
|
||||
<if test="purchaser != null">purchaser = #{purchaser},</if>
|
||||
<if test="taxRate != null">tax_rate = #{taxRate},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
|
|
@ -124,6 +129,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="purchaseTime != null "> and pci.purchase_time = #{purchaseTime}</if>
|
||||
<if test="arrivalTime != null "> and pci.arrival_time = #{arrivalTime}</if>
|
||||
<if test="purchaser != null "> and pci.purchaser = #{purchaser}</if>
|
||||
<if test="taxRate != null "> and pci.tax_rate = #{taxRate}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
|
|
|||
|
|
@ -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