bug修复

This commit is contained in:
mashuai 2025-04-08 17:12:58 +08:00
parent 9ef9b48ce9
commit a2dd380ea3
18 changed files with 177 additions and 42 deletions

View File

@ -1,6 +1,7 @@
package com.bonus.sgzb.base.api.domain; package com.bonus.sgzb.base.api.domain;
import com.bonus.sgzb.common.core.annotation.Excel;
import com.bonus.sgzb.common.core.web.domain.BaseEntity; import com.bonus.sgzb.common.core.web.domain.BaseEntity;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
@ -47,27 +48,35 @@ public class MaMachine extends BaseEntity {
* 物品种类 * 物品种类
*/ */
@ApiModelProperty(value = "物品种类") @ApiModelProperty(value = "物品种类")
@Excel(name = "物品种类")
private String itemType; private String itemType;
/** /**
* 设备类型 * 设备类型
*/ */
@ApiModelProperty(value = "设备类型") @ApiModelProperty(value = "设备类型")
@Excel(name = "设备类型")
private String deviceType; private String deviceType;
/** /**
* 规格型号 * 规格型号
*/ */
@ApiModelProperty(value = "规格型号") @ApiModelProperty(value = "规格型号")
@Excel(name = "规格型号")
private String specificationType; private String specificationType;
/** /**
* 机具编号 * 机具编号
*/ */
@ApiModelProperty(value = "机具编号") @ApiModelProperty(value = "机具编号")
@Excel(name = "设备编码")
private String maCode; private String maCode;
/** /**
* 原编号 * 购置批次
*/ */
@ApiModelProperty(value = "原编号") @ApiModelProperty(value = "购置批次")
private String preCode; @Excel(name = "采购单号")
private String buyTask;
/** /**
* 机具状态数据字典 * 机具状态数据字典
*/ */
@ -77,11 +86,28 @@ public class MaMachine extends BaseEntity {
* 机具状态数据字典 * 机具状态数据字典
*/ */
@ApiModelProperty(value = "机具状态(数据字典)名称") @ApiModelProperty(value = "机具状态(数据字典)名称")
@Excel(name = "设备状态")
private String maStatusName; private String maStatusName;
/**
* 固定资产编号
*/
@ApiModelProperty(value = "固定资产编号")
@Excel(name = "固定资产编号")
private String assetsCode;
/**
* 原编号
*/
@ApiModelProperty(value = "原编号")
@Excel(name = "设备原编号")
private String preCode;
/** /**
* 二维码 * 二维码
*/ */
@ApiModelProperty(value = "二维码") @ApiModelProperty(value = "二维码")
@Excel(name = "二维码")
private String qrCode; private String qrCode;
/** /**
* 购置价 * 购置价
@ -103,11 +129,7 @@ public class MaMachine extends BaseEntity {
*/ */
@ApiModelProperty(value = "出厂编号") @ApiModelProperty(value = "出厂编号")
private String outFacCode; private String outFacCode;
/**
* 固定资产编号
*/
@ApiModelProperty(value = "固定资产编号")
private String assetsCode;
/** /**
* 本次检验人 * 本次检验人
*/ */
@ -148,11 +170,7 @@ public class MaMachine extends BaseEntity {
*/ */
@ApiModelProperty(value = "出入库次数") @ApiModelProperty(value = "出入库次数")
private String inOutNum; private String inOutNum;
/**
* 购置批次
*/
@ApiModelProperty(value = "购置批次")
private String buyTask;
/** /**
* 所在仓库 * 所在仓库
*/ */
@ -233,6 +251,10 @@ public class MaMachine extends BaseEntity {
@ApiModelProperty(value = "绑定IOT设备数量") @ApiModelProperty(value = "绑定IOT设备数量")
private Integer IotNum; private Integer IotNum;
@ApiModelProperty(value = "绑定IOT设备信息")
@Excel(name = "IOT设备")
private String iotBindInfo;
@ApiModelProperty(value = "Iot定位设备编号") @ApiModelProperty(value = "Iot定位设备编号")
private String iotCode; private String iotCode;

View File

@ -3,6 +3,7 @@ package com.bonus.sgzb.base.controller;
import com.bonus.sgzb.base.api.domain.MaMachine; import com.bonus.sgzb.base.api.domain.MaMachine;
import com.bonus.sgzb.base.mapper.MaMachineMapper; import com.bonus.sgzb.base.mapper.MaMachineMapper;
import com.bonus.sgzb.base.service.MaMachineService; import com.bonus.sgzb.base.service.MaMachineService;
import com.bonus.sgzb.common.core.utils.poi.ExcelUtil;
import com.bonus.sgzb.common.core.web.controller.BaseController; import com.bonus.sgzb.common.core.web.controller.BaseController;
import com.bonus.sgzb.common.core.web.domain.AjaxResult; import com.bonus.sgzb.common.core.web.domain.AjaxResult;
import com.bonus.sgzb.common.core.web.page.TableDataInfo; import com.bonus.sgzb.common.core.web.page.TableDataInfo;
@ -14,6 +15,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.List; import java.util.List;
/** /**
@ -66,6 +68,19 @@ public class MaMachineController extends BaseController {
return getDataTable(list); return getDataTable(list);
} }
/**
* 机具编码设备管理导出
* @param response
* @param bean
*/
@Log(title = "机具编码设备管理导出", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, MaMachine bean) {
List<MaMachine> list = maMachineService.getMaMachine(bean);
ExcelUtil<MaMachine> util = new ExcelUtil<MaMachine>(MaMachine.class);
util.exportExcel(response, list, "机具编码设备管理导出数据");
}
/** /**
* 新增机具设备管理 * 新增机具设备管理

View File

@ -2,6 +2,7 @@ package com.bonus.sgzb.base.controller;
import com.bonus.sgzb.base.domain.MaintenanceGang; import com.bonus.sgzb.base.domain.MaintenanceGang;
import com.bonus.sgzb.base.service.MaintenanceGangService; import com.bonus.sgzb.base.service.MaintenanceGangService;
import com.bonus.sgzb.common.core.utils.poi.ExcelUtil;
import com.bonus.sgzb.common.core.web.controller.BaseController; import com.bonus.sgzb.common.core.web.controller.BaseController;
import com.bonus.sgzb.common.core.web.domain.AjaxResult; import com.bonus.sgzb.common.core.web.domain.AjaxResult;
import com.bonus.sgzb.common.core.web.page.TableDataInfo; import com.bonus.sgzb.common.core.web.page.TableDataInfo;
@ -13,6 +14,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.List; import java.util.List;
/** /**
@ -37,6 +39,19 @@ public class MaintenanceGangController extends BaseController {
return getDataTable(list); return getDataTable(list);
} }
/**
* 维修员配置导出
* @param response
* @param bean
*/
@Log(title = "维修员配置导出", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, MaintenanceGang bean) {
List<MaintenanceGang> list = warehouseKeeperService.getMaintenanceGangInfoAll(bean);
ExcelUtil<MaintenanceGang> util = new ExcelUtil<MaintenanceGang>(MaintenanceGang.class);
util.exportExcel(response, list, "维修员配置数据");
}
/** /**
* 维修班配置-根据人员名称查询左侧列表 * 维修班配置-根据人员名称查询左侧列表

View File

@ -1,19 +1,22 @@
package com.bonus.sgzb.base.controller; package com.bonus.sgzb.base.controller;
import cn.hutool.core.convert.Convert;
import com.bonus.sgzb.base.domain.WarehouseKeeper; import com.bonus.sgzb.base.domain.WarehouseKeeper;
import com.bonus.sgzb.base.service.WarehouseKeeperService; import com.bonus.sgzb.base.service.WarehouseKeeperService;
import com.bonus.sgzb.common.core.utils.ListPagingUtil;
import com.bonus.sgzb.common.core.utils.ServletUtils;
import com.bonus.sgzb.common.core.utils.poi.ExcelUtil;
import com.bonus.sgzb.common.core.web.controller.BaseController; import com.bonus.sgzb.common.core.web.controller.BaseController;
import com.bonus.sgzb.common.core.web.domain.AjaxResult; import com.bonus.sgzb.common.core.web.domain.AjaxResult;
import com.bonus.sgzb.common.core.web.page.TableDataInfo;
import com.bonus.sgzb.common.log.annotation.Log; import com.bonus.sgzb.common.log.annotation.Log;
import com.bonus.sgzb.common.log.enums.BusinessType; import com.bonus.sgzb.common.log.enums.BusinessType;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.List; import java.util.List;
/** /**
@ -31,12 +34,25 @@ public class WarehouseKeeperController extends BaseController {
*/ */
@ApiOperation(value = "获取库管员配置列表") @ApiOperation(value = "获取库管员配置列表")
@GetMapping("/warehouseKeeperInfoAll") @GetMapping("/warehouseKeeperInfoAll")
public TableDataInfo getWarehouseKeeperInfoAll(WarehouseKeeper bean) { public AjaxResult getWarehouseKeeperInfoAll(WarehouseKeeper bean) {
startPage(); Integer pageIndex = Convert.toInt(ServletUtils.getParameter("pageNum"), 1);
Integer pageSize = Convert.toInt(ServletUtils.getParameter("pageSize"), 10);
List<WarehouseKeeper> list = warehouseKeeperService.getWarehouseKeeperInfoAll(bean); List<WarehouseKeeper> list = warehouseKeeperService.getWarehouseKeeperInfoAll(bean);
return getDataTable(list); return AjaxResult.success(ListPagingUtil.paging(pageIndex, pageSize, list));
} }
/**
* 库管员配置导出
* @param response
* @param bean
*/
@Log(title = "库管员配置导出", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, WarehouseKeeper bean) {
List<WarehouseKeeper> list = warehouseKeeperService.getWarehouseKeeperInfoAll(bean);
ExcelUtil<WarehouseKeeper> util = new ExcelUtil<WarehouseKeeper>(WarehouseKeeper.class);
util.exportExcel(response, list, "库管员配置数据");
}
/** /**
* 库管员配置-根据人员名称查询左侧列表 * 库管员配置-根据人员名称查询左侧列表

View File

@ -4,6 +4,7 @@ import com.bonus.sgzb.common.core.annotation.Excel;
import com.bonus.sgzb.common.core.web.domain.BaseEntity; import com.bonus.sgzb.common.core.web.domain.BaseEntity;
import lombok.Data; import lombok.Data;
import javax.validation.constraints.Size;
import java.util.Date; import java.util.Date;
/** /**
@ -24,6 +25,7 @@ public class MaPartType extends BaseEntity {
//类型名称 //类型名称
@Excel(name = "类型名称") @Excel(name = "类型名称")
@Size(max = 30, message = "类型名称长度不能超过30")
private String paName; private String paName;
//上级ID //上级ID

View File

@ -1,5 +1,6 @@
package com.bonus.sgzb.base.domain; package com.bonus.sgzb.base.domain;
import com.bonus.sgzb.common.core.annotation.Excel;
import com.bonus.sgzb.common.core.web.domain.BaseEntity; import com.bonus.sgzb.common.core.web.domain.BaseEntity;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
@ -15,6 +16,7 @@ public class MaintenanceGang extends BaseEntity {
@ApiModelProperty(value = "种类id") @ApiModelProperty(value = "种类id")
private Long kindId; private Long kindId;
@ApiModelProperty(value = "种类名称") @ApiModelProperty(value = "种类名称")
@Excel(name = "种类名称")
private String kindName; private String kindName;
@ -23,10 +25,12 @@ public class MaintenanceGang extends BaseEntity {
@ApiModelProperty(value = "类型ids") @ApiModelProperty(value = "类型ids")
private String typeIds; private String typeIds;
@ApiModelProperty(value = "类型名称") @ApiModelProperty(value = "类型名称")
@Excel(name = "类型名称")
private String typeName; private String typeName;
@ApiModelProperty(value = "规格型号id") @ApiModelProperty(value = "规格型号id")
private Long modelId; private Long modelId;
@ApiModelProperty(value = "规格型号") @ApiModelProperty(value = "规格型号")
@Excel(name = "规格型号")
private String modelName; private String modelName;
@ApiModelProperty(value = "库管员") @ApiModelProperty(value = "库管员")
@ -35,6 +39,7 @@ public class MaintenanceGang extends BaseEntity {
@ApiModelProperty(value = "用户id") @ApiModelProperty(value = "用户id")
private Long userId; private Long userId;
@ApiModelProperty(value = "用户名称") @ApiModelProperty(value = "用户名称")
@Excel(name = "维修班")
private String userName; private String userName;
@ApiModelProperty(value = "部门名称") @ApiModelProperty(value = "部门名称")

View File

@ -1,5 +1,6 @@
package com.bonus.sgzb.base.domain; package com.bonus.sgzb.base.domain;
import com.bonus.sgzb.common.core.annotation.Excel;
import com.bonus.sgzb.common.core.web.domain.BaseEntity; import com.bonus.sgzb.common.core.web.domain.BaseEntity;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
@ -15,6 +16,7 @@ public class WarehouseKeeper extends BaseEntity {
@ApiModelProperty(value = "种类id") @ApiModelProperty(value = "种类id")
private Long kindId; private Long kindId;
@ApiModelProperty(value = "种类名称") @ApiModelProperty(value = "种类名称")
@Excel(name = "种类名称")
private String kindName; private String kindName;
@ -23,10 +25,12 @@ public class WarehouseKeeper extends BaseEntity {
@ApiModelProperty(value = "类型ids") @ApiModelProperty(value = "类型ids")
private String typeIds; private String typeIds;
@ApiModelProperty(value = "类型名称") @ApiModelProperty(value = "类型名称")
@Excel(name = "类型名称")
private String typeName; private String typeName;
@ApiModelProperty(value = "规格型号id") @ApiModelProperty(value = "规格型号id")
private Long modelId; private Long modelId;
@ApiModelProperty(value = "规格型号") @ApiModelProperty(value = "规格型号")
@Excel(name = "规格型号")
private String modelName; private String modelName;
@ApiModelProperty(value = "库管员") @ApiModelProperty(value = "库管员")
@ -35,6 +39,7 @@ public class WarehouseKeeper extends BaseEntity {
@ApiModelProperty(value = "用户id") @ApiModelProperty(value = "用户id")
private Long userId; private Long userId;
@ApiModelProperty(value = "用户名称") @ApiModelProperty(value = "用户名称")
@Excel(name = "库管员")
private String userName; private String userName;
@ApiModelProperty(value = "部门名称") @ApiModelProperty(value = "部门名称")
@ -47,4 +52,7 @@ public class WarehouseKeeper extends BaseEntity {
@ApiModelProperty(value = "删除类型1单个 2多个") @ApiModelProperty(value = "删除类型1单个 2多个")
private String type; private String type;
@ApiModelProperty(value = "是否绑定库管员 0 否1 是")
private String isBind;
} }

View File

@ -61,6 +61,7 @@ public class MaMachineServiceImpl implements MaMachineService {
//根据机具编码查询iot设备 //根据机具编码查询iot设备
List<IotRecordVo> iotRecordVoList = iotMachineMapper.selectList(ma.getMaCode()); List<IotRecordVo> iotRecordVoList = iotMachineMapper.selectList(ma.getMaCode());
ma.setIotNum(iotRecordVoList.size()); ma.setIotNum(iotRecordVoList.size());
ma.setIotBindInfo(iotRecordVoList.size() == 0 ? "未绑定" : String.valueOf(iotRecordVoList.size()));
//判断是否绑定了iot设备 //判断是否绑定了iot设备
if (iotRecordVoList.size()>0){ if (iotRecordVoList.size()>0){
for (int i = 0; i < iotRecordVoList.size(); i++) { for (int i = 0; i < iotRecordVoList.size(); i++) {

View File

@ -1,16 +1,19 @@
package com.bonus.sgzb.base.service.impl; package com.bonus.sgzb.base.service.impl;
import com.alibaba.nacos.common.utils.CollectionUtils;
import com.bonus.sgzb.base.domain.WarehouseKeeper; import com.bonus.sgzb.base.domain.WarehouseKeeper;
import com.bonus.sgzb.base.mapper.BmProjectInfoMapper; import com.bonus.sgzb.base.mapper.BmProjectInfoMapper;
import com.bonus.sgzb.base.mapper.WarehouseKeeperMapper; import com.bonus.sgzb.base.mapper.WarehouseKeeperMapper;
import com.bonus.sgzb.base.service.WarehouseKeeperService; import com.bonus.sgzb.base.service.WarehouseKeeperService;
import com.bonus.sgzb.base.vo.DeptUser; import com.bonus.sgzb.base.vo.DeptUser;
import com.bonus.sgzb.common.core.utils.StringHelper; import com.bonus.sgzb.common.core.utils.StringHelper;
import com.bonus.sgzb.common.core.utils.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.stream.Collectors;
/** /**
* @author lsun * @author lsun
@ -23,7 +26,49 @@ public class WarehouseKeeperServiceImpl implements WarehouseKeeperService {
@Override @Override
public List<WarehouseKeeper> getWarehouseKeeperInfoAll(WarehouseKeeper bean) { public List<WarehouseKeeper> getWarehouseKeeperInfoAll(WarehouseKeeper bean) {
return warehouseKeeperMapper.getWarehouseKeeperInfoAll(bean); List<WarehouseKeeper> list = warehouseKeeperMapper.getWarehouseKeeperInfoAll(bean);
if (CollectionUtils.isNotEmpty(list)) {
String userName = bean.getUserName();
String isBind = bean.getIsBind();
// 如果关键字不为空进行过滤
if (!StringUtils.isBlank(userName)) {
list = list.stream()
.filter(item -> containsKeyword(item, userName))
.collect(Collectors.toList());
}
// 根据是否绑定库管员进行过滤
if (!StringUtils.isBlank(isBind)) {
list = list.stream()
.filter(item -> containsIsBind(item, isBind))
.collect(Collectors.toList());
}
}
return list;
}
/**
* 判断是否根据是否绑定库管员查询
* @param item
* @param isBind
* @return
*/
private boolean containsIsBind(WarehouseKeeper item, String isBind) {
// 根据isBind如果为0则查询未绑定库管员设备为1则查询已绑定库管员设备库管员是否绑定设备根据userName来判断为空则为未绑定反之为已绑定
if ("0".equals(isBind)) {
return StringUtils.isBlank(item.getUserName());
} else {
return StringUtils.isNotBlank(item.getUserName());
}
}
/**
* 判断是否根据用户名查询
* @param item
* @param userName
* @return
*/
private boolean containsKeyword(WarehouseKeeper item, String userName) {
return (item.getUserName() != null && item.getUserName().contains(userName));
} }
@Override @Override

View File

@ -178,16 +178,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select DISTINCT m.type_id, m.type_name, m.parent_id, m.status, m.num, m.unit_id, m.unit_name, m.manage_type, select DISTINCT m.type_id, m.type_name, m.parent_id, m.status, m.num, m.unit_id, m.unit_name, m.manage_type,
m.lease_price,m.eff_time, m.rent_price, m.buy_price, m.pay_price, m.level, m.rated_load, m.test_load, m.lease_price,m.eff_time, m.rent_price, m.buy_price, m.pay_price, m.level, m.rated_load, m.test_load,
m.holding_time, m.warn_num, mtf.file_name photoName, mtf.file_url photoUrl, m.holding_time, m.warn_num, mtf.file_name photoName, mtf.file_url photoUrl,
mtf2.file_name documentName, mtf2.file_url documentUrl, mtk.user_id keeperUserId, mtf2.file_name documentName, mtf2.file_url documentUrl, a.userId keeperUserId,
su.nick_name keeperUserName, mpi.prop_name, m.del_flag, m.create_by, m.create_time, a.userName keeperUserName, mpi.prop_name, m.del_flag, m.create_by, m.create_time,
m.remark, m.company_id ,m.type_id id , m.type_name label m.remark, m.company_id ,m.type_id id , m.type_name label
from ma_type m from ma_type m
left join ma_prop_set mps on m.type_id = mps.type_id and mps.`status`='0' and mps.del_flag='0' left join ma_prop_set mps on m.type_id = mps.type_id and mps.`status`='0' and mps.del_flag='0'
left join ma_prop_info mpi on mps.prop_id = mpi.prop_id and mpi.`status`='0' and mpi.del_flag='0' left join ma_prop_info mpi on mps.prop_id = mpi.prop_id and mpi.`status`='0' and mpi.del_flag='0'
left join (select * from ma_type_file where file_type = '1') mtf on m.type_id = mtf.type_id left join (select * from ma_type_file where file_type = '1') mtf on m.type_id = mtf.type_id
left join (select * from ma_type_file where file_type = '2') mtf2 on m.type_id = mtf2.type_id left join (select * from ma_type_file where file_type = '2') mtf2 on m.type_id = mtf2.type_id
left join ma_type_keeper mtk on mtf.type_id = mtk.type_id left join (SELECT type_id,GROUP_CONCAT(DISTINCT su.nick_name) as userName,
left join sys_user su on mtk.user_id = su.user_id GROUP_CONCAT(DISTINCT mtk.user_id) as userId FROM ma_type_keeper mtk
LEFT JOIN sys_user su ON mtk.user_id = su.user_id
GROUP BY type_id ) a ON a.type_id = m.type_id
<where> <where>
m.status = '0' m.status = '0'
and m.del_flag = '0' and m.del_flag = '0'

View File

@ -37,9 +37,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="typeName != null and typeName != ''"> <if test="typeName != null and typeName != ''">
AND mt2.type_name like concat('%', #{typeName}, '%') AND mt2.type_name like concat('%', #{typeName}, '%')
</if> </if>
<if test="userId != null">
AND mtk.user_id = #{userId}
</if>
<if test="modelName != null and modelName != ''"> <if test="modelName != null and modelName != ''">
AND mt.type_name like concat('%', #{modelName}, '%') AND mt.type_name like concat('%', #{modelName}, '%')
</if> </if>

View File

@ -1,9 +1,11 @@
package com.bonus.sgzb.material.controller; package com.bonus.sgzb.material.controller;
import cn.hutool.core.convert.Convert;
import com.bonus.sgzb.common.core.utils.ListPagingUtil;
import com.bonus.sgzb.common.core.utils.ServletUtils;
import com.bonus.sgzb.common.core.utils.poi.ExcelUtil; import com.bonus.sgzb.common.core.utils.poi.ExcelUtil;
import com.bonus.sgzb.common.core.web.controller.BaseController; import com.bonus.sgzb.common.core.web.controller.BaseController;
import com.bonus.sgzb.common.core.web.domain.AjaxResult; import com.bonus.sgzb.common.core.web.domain.AjaxResult;
import com.bonus.sgzb.common.core.web.page.TableDataInfo;
import com.bonus.sgzb.common.log.annotation.Log; import com.bonus.sgzb.common.log.annotation.Log;
import com.bonus.sgzb.common.log.enums.BusinessType; import com.bonus.sgzb.common.log.enums.BusinessType;
import com.bonus.sgzb.material.domain.PurchaseCheckInfo; import com.bonus.sgzb.material.domain.PurchaseCheckInfo;
@ -53,9 +55,11 @@ public class PurchaseCheckServiceCenterController extends BaseController {
*/ */
@ApiOperation(value = "新购入库清单明细") @ApiOperation(value = "新购入库清单明细")
@GetMapping(value = "/putinDetails") @GetMapping(value = "/putinDetails")
public TableDataInfo putinDetails(PurchaseMacodeInfo purchaseMacodeInfo) { public AjaxResult putinDetails(PurchaseMacodeInfo purchaseMacodeInfo) {
startPage(); Integer pageIndex = Convert.toInt(ServletUtils.getParameter("pageNum"), 1);
return getDataTable(purchaseCheckServiceCenterService.selectPutinDetails(purchaseMacodeInfo)); Integer pageSize = Convert.toInt(ServletUtils.getParameter("pageSize"), 10);
List<PurchaseMacodeInfo> list = purchaseCheckServiceCenterService.selectPutinDetails(purchaseMacodeInfo);
return AjaxResult.success(ListPagingUtil.paging(pageIndex, pageSize, list));
} }
/** /**

View File

@ -456,9 +456,9 @@ public class ScrapApplyDetailsServiceImpl implements IScrapApplyDetailsService {
public List<ForecastWasteExcel> exportForecastWaste(ScrapApplyDetails scrapApplyDetails) { public List<ForecastWasteExcel> exportForecastWaste(ScrapApplyDetails scrapApplyDetails) {
List<ScrapApplyDetailsVO> scrapApplyDetailsList = this.getScrapApplyList(scrapApplyDetails); List<ScrapApplyDetailsVO> scrapApplyDetailsList = this.getScrapApplyList(scrapApplyDetails);
List<ForecastWasteExcel> ForecastWasteExcelList = new ArrayList<>(); List<ForecastWasteExcel> ForecastWasteExcelList = new ArrayList<>();
ForecastWasteExcel forecastWasteExcel = new ForecastWasteExcel();
//对预报废来源进行处理 //对预报废来源进行处理
for (ScrapApplyDetailsVO scrapApplyDetailsVO : scrapApplyDetailsList) { for (ScrapApplyDetailsVO scrapApplyDetailsVO : scrapApplyDetailsList) {
ForecastWasteExcel forecastWasteExcel = new ForecastWasteExcel();
BeanUtils.copyProperties(scrapApplyDetailsVO, forecastWasteExcel); BeanUtils.copyProperties(scrapApplyDetailsVO, forecastWasteExcel);
//获取来源单号 //获取来源单号
forecastWasteExcel.setRepairNum(scrapApplyDetailsVO.getRepairNum() != null ? scrapApplyDetailsVO.getRepairNum() : scrapApplyDetailsVO.getRepairCode()); forecastWasteExcel.setRepairNum(scrapApplyDetailsVO.getRepairNum() != null ? scrapApplyDetailsVO.getRepairNum() : scrapApplyDetailsVO.getRepairCode());

View File

@ -27,20 +27,20 @@ public class ForecastWasteExcel {
/** /**
* 单位名称 * 单位名称
*/ */
@Excel(name = "单位名称",sort = 4) @Excel(name = "退料单位名称",sort = 4)
private String unitName; private String unitName;
/** /**
* 工程名称 * 工程名称
*/ */
@Excel(name = "工程名称",sort = 5) @Excel(name = "退料工程名称",sort = 5)
private String projectName; private String projectName;
/** /**
* 机具类型 * 机具类型
*/ */
@Excel(name = "机具类型",sort = 6) @Excel(name = "设备类型",sort = 6)
private String itemType; private String itemType;
/** /**
@ -64,6 +64,6 @@ public class ForecastWasteExcel {
/** /**
* 不通过原因 * 不通过原因
*/ */
@Excel(name = "不通过原因",sort = 10) //@Excel(name = "不通过原因",sort = 10)
private String remark; private String remark;
} }

View File

@ -47,7 +47,7 @@
</insert> </insert>
<delete id="deleteById"> <delete id="deleteById">
delete from ma_whole_set delete from ma_whole_set
where parent_id = #{id} and whole_type_name = #{wholeTypeName} where parent_id = #{id}
</delete> </delete>
<select id="selectByWholeTypeName" resultType="java.lang.Integer"> <select id="selectByWholeTypeName" resultType="java.lang.Integer">

View File

@ -826,14 +826,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
SELECT SELECT
tk.CODE scrapNum, tk.CODE scrapNum,
tk.task_status taskStatus, tk.task_status taskStatus,
case tk.task_status CASE
when '120' then WHEN tk.task_status = '120' THEN
'待审核' '待审核'
when '121' then WHEN tk.task_status = '121' THEN
'审核中' '审核中'
when '122' or '123' then WHEN tk.task_status IN ('122', '123') THEN
'已完成' '已完成'
end taskStatusName, END AS taskStatusName,
bui.unit_id unitId, bui.unit_id unitId,
bui.unit_name unitName, bui.unit_name unitName,
bpl.lot_id projectId, bpl.lot_id projectId,

View File

@ -103,7 +103,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
IFNULL(mt.num, 0) IFNULL(mt.num, 0)
END as num, END as num,
mt.model_code AS modelCode, mt.model_code AS modelCode,
mt.manage_type AS manageType mt.manage_type AS manageType,
mt.level AS level
FROM ma_type mt FROM ma_type mt
left join (SELECT mt.type_id, left join (SELECT mt.type_id,
mt2.type_name AS typeName, mt2.type_name AS typeName,

View File

@ -56,6 +56,8 @@ public class SysDeptServiceImpl implements ISysDeptService {
@Override @Override
public List<TreeSelect> selectDeptTreeList(SysDept dept) { public List<TreeSelect> selectDeptTreeList(SysDept dept) {
List<SysDept> depts = SpringUtils.getAopProxy(this).selectDeptList(dept); List<SysDept> depts = SpringUtils.getAopProxy(this).selectDeptList(dept);
// 将depts中status为0的数据过滤出来
depts = depts.stream().filter(d -> d.getStatus().equals(UserConstants.DEPT_NORMAL)).collect(Collectors.toList());
return buildDeptTreeSelect(depts); return buildDeptTreeSelect(depts);
} }