bug修复
This commit is contained in:
parent
2f3e450bae
commit
b231b658ee
|
|
@ -1460,15 +1460,13 @@
|
||||||
WHEN 0 THEN
|
WHEN 0 THEN
|
||||||
IFNULL( subquery0.num, 0 ) ELSE IFNULL( mt.num, 0 )
|
IFNULL( subquery0.num, 0 ) ELSE IFNULL( mt.num, 0 )
|
||||||
END AS num,
|
END AS num,
|
||||||
subquery0.typeName,
|
mt1.type_name AS typeName,
|
||||||
subquery0.typeModelName as modelName
|
mt.type_name AS modelName
|
||||||
FROM
|
FROM
|
||||||
ma_type mt
|
ma_type mt
|
||||||
LEFT JOIN (
|
LEFT JOIN (
|
||||||
SELECT
|
SELECT
|
||||||
mt.type_id,
|
mt.type_id type_id,
|
||||||
mt2.type_name AS typeName,
|
|
||||||
mt.type_name AS typeModelName,
|
|
||||||
count( mm.ma_id ) num
|
count( mm.ma_id ) num
|
||||||
FROM
|
FROM
|
||||||
ma_machine mm
|
ma_machine mm
|
||||||
|
|
@ -1480,6 +1478,7 @@
|
||||||
GROUP BY
|
GROUP BY
|
||||||
mt.type_id
|
mt.type_id
|
||||||
) AS subquery0 ON subquery0.type_id = mt.type_id
|
) AS subquery0 ON subquery0.type_id = mt.type_id
|
||||||
|
LEFT JOIN ma_type mt1 ON mt.parent_id = mt1.type_id
|
||||||
WHERE
|
WHERE
|
||||||
mt.type_id = #{typeId}
|
mt.type_id = #{typeId}
|
||||||
</select>
|
</select>
|
||||||
|
|
|
||||||
|
|
@ -77,7 +77,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
or mt2.type_name like concat('%',#{keyWord},'%'))
|
or mt2.type_name like concat('%',#{keyWord},'%'))
|
||||||
</if>
|
</if>
|
||||||
<if test="beginTime != null and endTime != null and beginTime != '' and endTime != null">
|
<if test="beginTime != null and endTime != null and beginTime != '' and endTime != null">
|
||||||
AND m.create_time between #{beginTime} and #{endTime}
|
AND DATE_FORMAT(m.create_time,'%Y-%m-%d') between #{beginTime} and #{endTime}
|
||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
order by m.ma_id desc
|
order by m.ma_id desc
|
||||||
|
|
|
||||||
|
|
@ -40,6 +40,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="companyId != null and companyId != ''"> and company_id = #{companyId}</if>
|
<if test="companyId != null and companyId != ''"> and company_id = #{companyId}</if>
|
||||||
<if test="status != null "> and status = #{status}</if>
|
<if test="status != null "> and status = #{status}</if>
|
||||||
</where>
|
</where>
|
||||||
|
ORDER BY create_time DESC
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectMaSupplierInfoBySupplierId" parameterType="Long" resultMap="MaSupplierInfoResult">
|
<select id="selectMaSupplierInfoBySupplierId" parameterType="Long" resultMap="MaSupplierInfoResult">
|
||||||
|
|
|
||||||
|
|
@ -114,7 +114,8 @@ public class PurchaseAccessoryController extends BaseController
|
||||||
@PostMapping("/export")
|
@PostMapping("/export")
|
||||||
public void export(HttpServletResponse response, PurchasePartInfo bean)
|
public void export(HttpServletResponse response, PurchasePartInfo bean)
|
||||||
{
|
{
|
||||||
List<PurchasePartInfo> list = purchaseAccessoryService.exportList(bean);
|
//List<PurchasePartInfo> list = purchaseAccessoryService.exportList(bean);
|
||||||
|
List<PurchasePartInfo> list = purchaseAccessoryService.selectPurchasePartInfoList(bean);
|
||||||
ExcelUtil<PurchasePartInfo> util = new ExcelUtil<PurchasePartInfo>(PurchasePartInfo.class);
|
ExcelUtil<PurchasePartInfo> util = new ExcelUtil<PurchasePartInfo>(PurchasePartInfo.class);
|
||||||
util.exportExcel(response, list, "新购配件验收数据");
|
util.exportExcel(response, list, "新购配件验收数据");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,14 @@
|
||||||
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.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.BackRecord;
|
|
||||||
import com.bonus.sgzb.material.domain.RepairRecord;
|
import com.bonus.sgzb.material.domain.RepairRecord;
|
||||||
import com.bonus.sgzb.material.service.BackRecordService;
|
|
||||||
import com.bonus.sgzb.material.service.RepairRecordService;
|
import com.bonus.sgzb.material.service.RepairRecordService;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
|
@ -38,9 +39,10 @@ public class RepairRecordController extends BaseController {
|
||||||
@ApiOperation(value = "综合查询--维修记录列表")
|
@ApiOperation(value = "综合查询--维修记录列表")
|
||||||
@GetMapping("/getRepairRecordList")
|
@GetMapping("/getRepairRecordList")
|
||||||
public AjaxResult getRepairRecordList(RepairRecord bean) {
|
public AjaxResult getRepairRecordList(RepairRecord bean) {
|
||||||
startPage();
|
Integer pageIndex = Convert.toInt(ServletUtils.getParameter("pageNum"), 1);
|
||||||
|
Integer pageSize = Convert.toInt(ServletUtils.getParameter("pageSize"), 10);
|
||||||
List<RepairRecord> list = repairRecordService.getRepairRecordList(bean);
|
List<RepairRecord> list = repairRecordService.getRepairRecordList(bean);
|
||||||
return AjaxResult.success(getDataTable(list));
|
return AjaxResult.success(ListPagingUtil.paging(pageIndex, pageSize, list));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -47,8 +47,8 @@ public class ReturnOfMaterialsInfoController extends BaseController {
|
||||||
*/
|
*/
|
||||||
@ApiOperation(value = "获取设备信息")
|
@ApiOperation(value = "获取设备信息")
|
||||||
@GetMapping("/getTypeList")
|
@GetMapping("/getTypeList")
|
||||||
public AjaxResult getTypeList(String level) {
|
public AjaxResult getTypeList(ReturnOfMaterialsInfo bean) {
|
||||||
List<ReturnOfMaterialsInfo> list = returnOfMaterialsInfoService.getTypeList(level);
|
List<ReturnOfMaterialsInfo> list = returnOfMaterialsInfoService.getTypeList(bean);
|
||||||
return AjaxResult.success(list);
|
return AjaxResult.success(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,10 +2,12 @@ package com.bonus.sgzb.material.domain;
|
||||||
|
|
||||||
import com.bonus.sgzb.common.core.annotation.Excel;
|
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 com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -13,7 +15,7 @@ import java.util.List;
|
||||||
* @author hay
|
* @author hay
|
||||||
* @date 2024/1/16 13:52
|
* @date 2024/1/16 13:52
|
||||||
*/
|
*/
|
||||||
public class PurchasePartInfo extends BaseEntity
|
public class PurchasePartInfo
|
||||||
{
|
{
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
|
@ -45,12 +47,12 @@ public class PurchasePartInfo extends BaseEntity
|
||||||
|
|
||||||
/** 采购机具设备名称 */
|
/** 采购机具设备名称 */
|
||||||
@ApiModelProperty(value = "采购机具设备")
|
@ApiModelProperty(value = "采购机具设备")
|
||||||
@Excel(name = "配件名称")
|
@Excel(name = "采购配件")
|
||||||
private String purchasingTypeName;
|
private String purchasingTypeName;
|
||||||
|
|
||||||
/** 采购机具设备型号 */
|
/** 采购机具设备型号 */
|
||||||
@ApiModelProperty(value = "规格型号")
|
@ApiModelProperty(value = "规格型号")
|
||||||
@Excel(name = "配件规格")
|
//@Excel(name = "配件规格")
|
||||||
private String purchasingTypeCode;
|
private String purchasingTypeCode;
|
||||||
|
|
||||||
/** 采购员名称 */
|
/** 采购员名称 */
|
||||||
|
|
@ -64,17 +66,17 @@ public class PurchasePartInfo extends BaseEntity
|
||||||
|
|
||||||
/** 采购单价 */
|
/** 采购单价 */
|
||||||
@ApiModelProperty(value = "采购单价")
|
@ApiModelProperty(value = "采购单价")
|
||||||
@Excel(name = "采购单价")
|
//@Excel(name = "采购单价")
|
||||||
private String purchasePrice;
|
private String purchasePrice;
|
||||||
|
|
||||||
/** 采购数量 */
|
/** 采购数量 */
|
||||||
@ApiModelProperty(value = "采购数量")
|
@ApiModelProperty(value = "采购数量")
|
||||||
@Excel(name = "采购数量")
|
//@Excel(name = "采购数量")
|
||||||
private String purchaseNum;
|
private String purchaseNum;
|
||||||
|
|
||||||
/** 配件厂家 */
|
/** 配件厂家 */
|
||||||
@ApiModelProperty(value = "配件厂家")
|
@ApiModelProperty(value = "配件厂家")
|
||||||
@Excel(name = "配件厂家")
|
//@Excel(name = "配件厂家")
|
||||||
private String supplier;
|
private String supplier;
|
||||||
|
|
||||||
/** 验收数量 */
|
/** 验收数量 */
|
||||||
|
|
@ -83,7 +85,7 @@ public class PurchasePartInfo extends BaseEntity
|
||||||
|
|
||||||
/** 采购状态 */
|
/** 采购状态 */
|
||||||
@ApiModelProperty(value = "采购状态")
|
@ApiModelProperty(value = "采购状态")
|
||||||
@Excel(name = "状态")
|
@Excel(name = "采购状态")
|
||||||
private String purchasingStatus;
|
private String purchasingStatus;
|
||||||
|
|
||||||
/** 入库人员 */
|
/** 入库人员 */
|
||||||
|
|
@ -142,6 +144,74 @@ public class PurchasePartInfo extends BaseEntity
|
||||||
private Integer taskStatus;
|
private Integer taskStatus;
|
||||||
private String keyWord;
|
private String keyWord;
|
||||||
|
|
||||||
|
/** 创建者 */
|
||||||
|
private String createBy;
|
||||||
|
|
||||||
|
/** 创建时间 */
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
/** 更新者 */
|
||||||
|
private String updateBy;
|
||||||
|
|
||||||
|
/** 更新时间 */
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private Date updateTime;
|
||||||
|
|
||||||
|
/** 备注 */
|
||||||
|
@Excel(name = "备注")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
public String getCreateBy()
|
||||||
|
{
|
||||||
|
return createBy;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreateBy(String createBy)
|
||||||
|
{
|
||||||
|
this.createBy = createBy;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getCreateTime()
|
||||||
|
{
|
||||||
|
return createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreateTime(Date createTime)
|
||||||
|
{
|
||||||
|
this.createTime = createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUpdateBy()
|
||||||
|
{
|
||||||
|
return updateBy;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUpdateBy(String updateBy)
|
||||||
|
{
|
||||||
|
this.updateBy = updateBy;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getUpdateTime()
|
||||||
|
{
|
||||||
|
return updateTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUpdateTime(Date updateTime)
|
||||||
|
{
|
||||||
|
this.updateTime = updateTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRemark()
|
||||||
|
{
|
||||||
|
return remark;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRemark(String remark)
|
||||||
|
{
|
||||||
|
this.remark = remark;
|
||||||
|
}
|
||||||
|
|
||||||
public Long getId() {
|
public Long getId() {
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -86,4 +86,7 @@ public class ReturnOfMaterialsInfo {
|
||||||
@ApiModelProperty(value = "关键字")
|
@ApiModelProperty(value = "关键字")
|
||||||
private String keyWord;
|
private String keyWord;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "层级")
|
||||||
|
private String level;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -145,4 +145,6 @@ public interface RepairAuditDetailsMapper
|
||||||
List<RepairPart> getPartRecord(RepairAuditDetails bean);
|
List<RepairPart> getPartRecord(RepairAuditDetails bean);
|
||||||
|
|
||||||
int updateRepairCost(@Param("inputDetails")RepairAuditDetails inputDetails, @Param("status") String status);
|
int updateRepairCost(@Param("inputDetails")RepairAuditDetails inputDetails, @Param("status") String status);
|
||||||
|
|
||||||
|
List<RepairRecord> getPartDetailsList(RepairAuditDetails bean);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -24,4 +24,10 @@ public interface RepairRecordMapper {
|
||||||
*/
|
*/
|
||||||
List<RepairRecord> getRepairRecordList(RepairRecord bean);
|
List<RepairRecord> getRepairRecordList(RepairRecord bean);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 综合查询--维修记录详情
|
||||||
|
* @param repairRecord
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
RepairRecord selectRepairRecordByTaskId(RepairRecord repairRecord);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -22,10 +22,10 @@ public interface ReturnOfMaterialsInfoMapper {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询
|
* 查询
|
||||||
* @param level
|
* @param bean
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<ReturnOfMaterialsInfo> getTypeList(String level);
|
List<ReturnOfMaterialsInfo> getTypeList(ReturnOfMaterialsInfo bean);
|
||||||
|
|
||||||
List<ReturnOfMaterialsInfo> getInfoListByType(@Param("level")String level, @Param("parentId")String parentId);
|
List<ReturnOfMaterialsInfo> getInfoListByType(@Param("level")String level, @Param("parentId")String parentId);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -18,10 +18,10 @@ public interface ReturnOfMaterialsInfoService {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询
|
* 查询
|
||||||
* @param level
|
* @param bean
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<ReturnOfMaterialsInfo> getTypeList(String level);
|
List<ReturnOfMaterialsInfo> getTypeList(ReturnOfMaterialsInfo bean);
|
||||||
List<ReturnOfMaterialsInfo> getMaTypeList(String level);
|
List<ReturnOfMaterialsInfo> getMaTypeList(String level);
|
||||||
|
|
||||||
List<ReturnOfMaterialsInfo> getInfoListByType(String level,String parentId);
|
List<ReturnOfMaterialsInfo> getInfoListByType(String level,String parentId);
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ import java.util.ArrayList;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.alibaba.nacos.common.utils.CollectionUtils;
|
||||||
import com.bonus.sgzb.common.core.constant.TaskTypeConstants;
|
import com.bonus.sgzb.common.core.constant.TaskTypeConstants;
|
||||||
import com.bonus.sgzb.common.core.enums.TaskStatusEnum;
|
import com.bonus.sgzb.common.core.enums.TaskStatusEnum;
|
||||||
import com.bonus.sgzb.common.core.enums.TaskTypeEnum;
|
import com.bonus.sgzb.common.core.enums.TaskTypeEnum;
|
||||||
|
|
@ -164,7 +165,26 @@ public class RepairAuditDetailsServiceImpl implements IRepairAuditDetailsService
|
||||||
public List<RepairRecord> getRepairRecord(RepairAuditDetails repairAuditDetails) {
|
public List<RepairRecord> getRepairRecord(RepairAuditDetails repairAuditDetails) {
|
||||||
RepairAuditDetails bean = repairAuditDetailsMapper.getRepairId(repairAuditDetails);
|
RepairAuditDetails bean = repairAuditDetailsMapper.getRepairId(repairAuditDetails);
|
||||||
List<RepairRecord> list = repairAuditDetailsMapper.getRepairRecord(bean);
|
List<RepairRecord> list = repairAuditDetailsMapper.getRepairRecord(bean);
|
||||||
return list;
|
List<RepairRecord> infoList = new ArrayList<>();
|
||||||
|
if (CollectionUtils.isNotEmpty(list)) {
|
||||||
|
// 内部维修数据从repair_part_details查询获取
|
||||||
|
for (RepairRecord info : list) {
|
||||||
|
if ("1".equals(info.getRepairType())) {
|
||||||
|
List<RepairRecord> partDetailsList = repairAuditDetailsMapper.getPartDetailsList(bean);
|
||||||
|
if (CollectionUtils.isNotEmpty(partDetailsList)) {
|
||||||
|
for (RepairRecord repairRecord : partDetailsList) {
|
||||||
|
repairRecord.setRepairer(StringUtils.isNotBlank(info.getRepairer()) ? info.getRepairer() : null);
|
||||||
|
repairRecord.setRepairNum(info.getRepairNum());
|
||||||
|
repairRecord.setRepairType(info.getRepairType());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
infoList.addAll(partDetailsList);
|
||||||
|
} else {
|
||||||
|
infoList.add(info);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return infoList;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,15 @@
|
||||||
package com.bonus.sgzb.material.service.impl;
|
package com.bonus.sgzb.material.service.impl;
|
||||||
|
|
||||||
import com.bonus.sgzb.material.domain.BackRecord;
|
import com.alibaba.nacos.common.utils.CollectionUtils;
|
||||||
|
import com.alibaba.nacos.common.utils.StringUtils;
|
||||||
import com.bonus.sgzb.material.domain.RepairRecord;
|
import com.bonus.sgzb.material.domain.RepairRecord;
|
||||||
import com.bonus.sgzb.material.mapper.BackRecordMapper;
|
|
||||||
import com.bonus.sgzb.material.mapper.RepairRecordMapper;
|
import com.bonus.sgzb.material.mapper.RepairRecordMapper;
|
||||||
import com.bonus.sgzb.material.service.BackRecordService;
|
|
||||||
import com.bonus.sgzb.material.service.RepairRecordService;
|
import com.bonus.sgzb.material.service.RepairRecordService;
|
||||||
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.List;
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author hay
|
* @author hay
|
||||||
|
|
@ -24,6 +24,34 @@ public class RepairRecordServiceImpl implements RepairRecordService {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<RepairRecord> getRepairRecordList(RepairRecord bean) {
|
public List<RepairRecord> getRepairRecordList(RepairRecord bean) {
|
||||||
return repairRecordMapper.getRepairRecordList(bean);
|
List<RepairRecord> list = repairRecordMapper.getRepairRecordList(bean);
|
||||||
|
if (CollectionUtils.isNotEmpty(list)) {
|
||||||
|
for (RepairRecord repairRecord : list) {
|
||||||
|
// 根据查询信息查询单位和工程相关信息
|
||||||
|
RepairRecord info = repairRecordMapper.selectRepairRecordByTaskId(repairRecord);
|
||||||
|
if (info != null) {
|
||||||
|
repairRecord.setUnitName(info.getUnitName());
|
||||||
|
repairRecord.setProName(info.getProName());
|
||||||
|
repairRecord.setProId(info.getProId());
|
||||||
|
repairRecord.setUnitId(info.getUnitId());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (bean.getUnitId() != null) {
|
||||||
|
// 将list集合中的单位id与查询条件单位id进行比较,如果相同则返回该条数据
|
||||||
|
list = list.stream().filter(item -> item.getUnitId().equals(bean.getUnitId())).collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
if (bean.getProId() != null) {
|
||||||
|
// 将list集合中的工程id与查询条件工程id进行比较,如果相同则返回该条数据
|
||||||
|
list = list.stream().filter(item -> item.getProId().equals(bean.getProId())).collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
if (bean.getKeyWord() != null) {
|
||||||
|
// 将list集合中的关键字与查询条件关键字进行比较,如果相同则返回该条数据
|
||||||
|
list = list.stream().filter(item -> StringUtils.isNotBlank(item.getCode()) && item.getCode().contains(bean.getKeyWord()) ||
|
||||||
|
StringUtils.isNotBlank(item.getTypeName()) && item.getTypeName().contains(bean.getKeyWord()) ||
|
||||||
|
StringUtils.isNotBlank(item.getTypeModelName()) && item.getTypeModelName().contains(bean.getKeyWord()) ||
|
||||||
|
StringUtils.isNotBlank(item.getPartName()) && item.getPartName().contains(bean.getKeyWord())).collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return list;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -23,8 +23,8 @@ public class ReturnOfMaterialsInfoServiceImpl implements ReturnOfMaterialsInfoSe
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ReturnOfMaterialsInfo> getTypeList(String level) {
|
public List<ReturnOfMaterialsInfo> getTypeList(ReturnOfMaterialsInfo bean) {
|
||||||
return returnOfMaterialsInfoMapper.getTypeList(level);
|
return returnOfMaterialsInfoMapper.getTypeList(bean);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
|
|
@ -370,7 +370,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
ppi.arrival_time as arrivalTime,
|
ppi.arrival_time as arrivalTime,
|
||||||
mpt2.pa_name as purchasingTypeName,
|
mpt2.pa_name as purchasingTypeName,
|
||||||
mpt.pa_name as purchasingTypeCode,
|
mpt.pa_name as purchasingTypeCode,
|
||||||
su.user_name purchaserName,
|
su.nick_name purchaserName,
|
||||||
ppd.purchase_price as purchasePrice,
|
ppd.purchase_price as purchasePrice,
|
||||||
ppd.purchase_num as purchaseNum,
|
ppd.purchase_num as purchaseNum,
|
||||||
msi.supplier,
|
msi.supplier,
|
||||||
|
|
|
||||||
|
|
@ -467,5 +467,25 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
from repair_apply_details
|
from repair_apply_details
|
||||||
where id = #{repairId}
|
where id = #{repairId}
|
||||||
</select>
|
</select>
|
||||||
|
<select id="getPartDetailsList" resultType="com.bonus.sgzb.material.domain.RepairRecord">
|
||||||
|
SELECT
|
||||||
|
rad.repair_content AS repairContent,
|
||||||
|
concat( mpt2.pa_name, '-', mpt1.pa_name, '-', mpt.pa_name ) AS partName,
|
||||||
|
rad.part_num AS partNum,
|
||||||
|
rad.part_cost AS partPrice,
|
||||||
|
rad.part_type AS partType
|
||||||
|
FROM
|
||||||
|
repair_part_details rad
|
||||||
|
LEFT JOIN ma_part_type mpt ON mpt.pa_id = rad.part_id
|
||||||
|
and mpt.del_flag = '0'
|
||||||
|
LEFT JOIN ma_part_type mpt1 ON mpt.parent_id = mpt1.pa_id
|
||||||
|
and mpt1.del_flag = '0'
|
||||||
|
LEFT JOIN ma_part_type mpt2 ON mpt2.pa_id = mpt1.parent_id
|
||||||
|
and mpt2.del_flag = '0'
|
||||||
|
WHERE rad.task_id = #{taskId} and rad.type_id = #{typeId}
|
||||||
|
<if test="maId != null and maId != ''">
|
||||||
|
and rad.ma_id = #{maId}
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
@ -25,35 +25,39 @@
|
||||||
ELSE
|
ELSE
|
||||||
rar.part_price
|
rar.part_price
|
||||||
END partPrice,
|
END partPrice,
|
||||||
bpl.lot_name as proName,
|
rar.task_id as taskId,
|
||||||
bui.unit_name as unitName
|
rar.type_id as typeId,
|
||||||
|
rar.ma_id as maId
|
||||||
|
|
||||||
FROM repair_apply_record rar
|
FROM repair_apply_record rar
|
||||||
LEFT JOIN tm_task tt on tt.task_id = rar.task_id
|
LEFT JOIN tm_task tt on tt.task_id = rar.task_id
|
||||||
LEFT JOIN ma_type mt on mt.type_id = rar.type_id
|
LEFT JOIN ma_type mt on mt.type_id = rar.type_id
|
||||||
LEFT JOIN ma_type mt2 on mt2.type_id = mt.parent_id
|
LEFT JOIN ma_type mt2 on mt2.type_id = mt.parent_id
|
||||||
LEFT JOIN repair_part_details rpd on rpd.task_id = rar.task_id
|
LEFT JOIN repair_part_details rpd on rpd.task_id = rar.task_id
|
||||||
and rpd.type_id = rar.type_id
|
and rpd.type_id = rar.type_id and rar.ma_id = rpd.ma_id
|
||||||
and rar.repair_type = '1'
|
and rar.repair_type = '1'
|
||||||
LEFT JOIN ma_part_type mpt on mpt.pa_id = rpd.part_id
|
LEFT JOIN ma_part_type mpt on mpt.pa_id = rpd.part_id
|
||||||
LEFT JOIN ma_part_type mpt2 on mpt2.pa_id = mpt.parent_id
|
LEFT JOIN ma_part_type mpt2 on mpt2.pa_id = mpt.parent_id
|
||||||
LEFT JOIN repair_apply_details rad on rad.task_id = rar.task_id and rad.type_id = rar.type_id
|
ORDER BY rar.create_time DESC
|
||||||
LEFT JOIN back_apply_info bai on bai.id = rad.back_id
|
</select>
|
||||||
LEFT JOIN tm_task_agreement tta on tta.task_id = bai.task_id
|
<select id="selectRepairRecordByTaskId" resultType="com.bonus.sgzb.material.domain.RepairRecord">
|
||||||
LEFT JOIN bm_agreement_info baif on baif.agreement_id = tta.agreement_id
|
SELECT
|
||||||
LEFT JOIN bm_project_lot bpl on bpl.lot_id = baif.project_id
|
bpl.lot_id AS proId,
|
||||||
LEFT JOIN bm_unit_info bui on bui.unit_id = baif.unit_id
|
bui.unit_id AS unitId,
|
||||||
where 1 = 1
|
bpl.lot_name AS proName,
|
||||||
<if test="keyWord != null and keyWord != ''">
|
bui.unit_name AS unitName
|
||||||
and (tt.`code` like concat('%',#{keyWord},'%') or
|
FROM
|
||||||
mt2.type_name like concat('%',#{keyWord},'%') or
|
repair_apply_details rad
|
||||||
mt.type_name like concat('%',#{keyWord},'%'))
|
LEFT JOIN back_apply_info bai ON bai.id = rad.back_id
|
||||||
</if>
|
LEFT JOIN tm_task_agreement tta ON tta.task_id = bai.task_id
|
||||||
<if test="unitId != null">
|
LEFT JOIN bm_agreement_info baif ON baif.agreement_id = tta.agreement_id
|
||||||
and bui.unit_id = #{unitId}
|
LEFT JOIN bm_project_lot bpl ON bpl.lot_id = baif.project_id
|
||||||
</if>
|
LEFT JOIN bm_unit_info bui ON bui.unit_id = baif.unit_id
|
||||||
<if test="proId != null">
|
WHERE
|
||||||
and bpl.lot_id = #{proId}
|
rad.task_id = #{taskId}
|
||||||
</if>
|
AND rad.type_id = #{typeId}
|
||||||
|
<if test="maId != null">
|
||||||
|
AND rad.ma_id = #{maId}
|
||||||
|
</if>
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
@ -43,6 +43,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<select id="getTypeList" resultType="com.bonus.sgzb.material.domain.ReturnOfMaterialsInfo">
|
<select id="getTypeList" resultType="com.bonus.sgzb.material.domain.ReturnOfMaterialsInfo">
|
||||||
SELECT type_id as typeId,type_name as typeName FROM `ma_type`
|
SELECT type_id as typeId,type_name as typeName FROM `ma_type`
|
||||||
WHERE `level` = #{level}
|
WHERE `level` = #{level}
|
||||||
|
<if test="typeId != null">
|
||||||
|
and parent_id = #{typeId}
|
||||||
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getInfoListByType" resultType="com.bonus.sgzb.material.domain.ReturnOfMaterialsInfo">
|
<select id="getInfoListByType" resultType="com.bonus.sgzb.material.domain.ReturnOfMaterialsInfo">
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue