增加新购数据查询
This commit is contained in:
parent
aab9be1388
commit
47e7bcbafe
|
|
@ -2,9 +2,12 @@ package com.bonus.sgzb.material.controller;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Objects;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
import com.bonus.sgzb.base.api.domain.MachinePart;
|
import com.bonus.sgzb.base.api.domain.MachinePart;
|
||||||
|
import com.bonus.sgzb.material.domain.PurchaseInputDto;
|
||||||
import com.bonus.sgzb.material.domain.PurchaseInputVo;
|
import com.bonus.sgzb.material.domain.PurchaseInputVo;
|
||||||
import com.bonus.sgzb.material.service.IPurchaseCheckInfoService;
|
import com.bonus.sgzb.material.service.IPurchaseCheckInfoService;
|
||||||
import com.bonus.sgzb.material.domain.PurchaseCheckInfo;
|
import com.bonus.sgzb.material.domain.PurchaseCheckInfo;
|
||||||
|
|
@ -12,6 +15,7 @@ import com.bonus.sgzb.material.service.PurchaseCheckServiceCenterService;
|
||||||
import com.bonus.sgzb.material.vo.NoticeInfoVO;
|
import com.bonus.sgzb.material.vo.NoticeInfoVO;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import com.bonus.sgzb.common.log.annotation.Log;
|
import com.bonus.sgzb.common.log.annotation.Log;
|
||||||
|
|
@ -46,6 +50,19 @@ public class PurchaseCheckInfoController extends BaseController {
|
||||||
startPage();
|
startPage();
|
||||||
return getDataTable(purchaseCheckInfoService.selectPutInListList(purchaseCheckInfo));
|
return getDataTable(purchaseCheckInfoService.selectPutInListList(purchaseCheckInfo));
|
||||||
}
|
}
|
||||||
|
@ApiOperation("查询新购入库数据列表")
|
||||||
|
@GetMapping("/getPutInList")
|
||||||
|
public TableDataInfo getPutInList(PurchaseInputDto purchaseInputDto) {
|
||||||
|
startPage();
|
||||||
|
return getDataTable(purchaseCheckInfoService.getPutInList(purchaseInputDto));
|
||||||
|
}
|
||||||
|
@ApiOperation("导出新购入库数据列表")
|
||||||
|
@PostMapping("/exportPutInList")
|
||||||
|
public void exportPutInList(HttpServletResponse response, PurchaseInputDto purchaseInputDto) {
|
||||||
|
List<PurchaseInputDto> list = purchaseCheckInfoService.getPutInList(purchaseInputDto);
|
||||||
|
ExcelUtil<PurchaseInputDto> util = new ExcelUtil<PurchaseInputDto>(PurchaseInputDto.class);
|
||||||
|
util.exportExcel(response, list, "新购入库数据列表");
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 成套机具明细查看
|
* 成套机具明细查看
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,67 @@
|
||||||
|
package com.bonus.sgzb.material.domain;
|
||||||
|
|
||||||
|
import com.bonus.sgzb.common.core.annotation.Excel;
|
||||||
|
import com.bonus.sgzb.common.core.web.domain.BaseEntity;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新购工机具入库
|
||||||
|
*
|
||||||
|
* @author bonus
|
||||||
|
* @date 2023-12-10
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class PurchaseInputDto {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "主键id")
|
||||||
|
private Long id;
|
||||||
|
/**
|
||||||
|
* 采购单号
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "采购单号")
|
||||||
|
@Excel(name = "采购单号")
|
||||||
|
private String code;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "数量")
|
||||||
|
@Excel(name = "数量")
|
||||||
|
private String checkNum;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "采购日期")
|
||||||
|
@Excel(name = "采购日期")
|
||||||
|
private String purchaseTime;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "入库日期")
|
||||||
|
@Excel(name = "入库日期")
|
||||||
|
private String inputTime;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "类型名称")
|
||||||
|
@Excel(name = "类型名称")
|
||||||
|
private String typeName;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "规格型号")
|
||||||
|
@Excel(name = "规格型号")
|
||||||
|
private String typeModelName;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "采购人")
|
||||||
|
@Excel(name = "采购人")
|
||||||
|
private String purchaser;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "入库人")
|
||||||
|
@Excel(name = "入库人")
|
||||||
|
private String inputUser;
|
||||||
|
|
||||||
|
private String keyWord;
|
||||||
|
private String startTime;
|
||||||
|
private String endTime;
|
||||||
|
private String startTime1;
|
||||||
|
private String endTime1;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -4,6 +4,7 @@ import com.bonus.sgzb.base.api.domain.MachinePart;
|
||||||
import com.bonus.sgzb.material.domain.BmNoticeInfo;
|
import com.bonus.sgzb.material.domain.BmNoticeInfo;
|
||||||
import com.bonus.sgzb.material.domain.PurchaseCheckInfo;
|
import com.bonus.sgzb.material.domain.PurchaseCheckInfo;
|
||||||
import com.bonus.sgzb.material.domain.PurchaseInput;
|
import com.bonus.sgzb.material.domain.PurchaseInput;
|
||||||
|
import com.bonus.sgzb.material.domain.PurchaseInputDto;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
|
@ -138,4 +139,6 @@ public interface PurchaseCheckInfoMapper {
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
int deletePurchaseMacodeInfoByTaskId(String code);
|
int deletePurchaseMacodeInfoByTaskId(String code);
|
||||||
|
|
||||||
|
List<PurchaseInputDto> getPutInList(PurchaseInputDto purchaseInputDto);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ package com.bonus.sgzb.material.service;
|
||||||
import com.bonus.sgzb.base.api.domain.MachinePart;
|
import com.bonus.sgzb.base.api.domain.MachinePart;
|
||||||
import com.bonus.sgzb.common.core.web.domain.AjaxResult;
|
import com.bonus.sgzb.common.core.web.domain.AjaxResult;
|
||||||
import com.bonus.sgzb.material.domain.PurchaseCheckInfo;
|
import com.bonus.sgzb.material.domain.PurchaseCheckInfo;
|
||||||
|
import com.bonus.sgzb.material.domain.PurchaseInputDto;
|
||||||
import com.bonus.sgzb.material.domain.PurchaseInputVo;
|
import com.bonus.sgzb.material.domain.PurchaseInputVo;
|
||||||
import com.bonus.sgzb.material.vo.NoticeInfoVO;
|
import com.bonus.sgzb.material.vo.NoticeInfoVO;
|
||||||
|
|
||||||
|
|
@ -110,4 +111,6 @@ public interface IPurchaseCheckInfoService
|
||||||
List<PurchaseCheckInfo> selectPutInListExamine(PurchaseCheckInfo purchaseCheckInfo);
|
List<PurchaseCheckInfo> selectPutInListExamine(PurchaseCheckInfo purchaseCheckInfo);
|
||||||
|
|
||||||
List<MachinePart> getWholeSetDetails(PurchaseCheckInfo purchaseCheckInfo);
|
List<MachinePart> getWholeSetDetails(PurchaseCheckInfo purchaseCheckInfo);
|
||||||
|
|
||||||
|
List<PurchaseInputDto> getPutInList(PurchaseInputDto purchaseInputDto);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -171,6 +171,11 @@ public class PurchaseCheckInfoServiceImpl implements IPurchaseCheckInfoService {
|
||||||
return purchaseCheckInfoMapper.getWholeSetDetails(purchaseCheckInfo);
|
return purchaseCheckInfoMapper.getWholeSetDetails(purchaseCheckInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<PurchaseInputDto> getPutInList(PurchaseInputDto purchaseInputDto) {
|
||||||
|
return purchaseCheckInfoMapper.getPutInList(purchaseInputDto);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询新购验收任务列表
|
* 查询新购验收任务列表
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -385,4 +385,44 @@ WHERE ma_machine.ma_code =
|
||||||
WHERE
|
WHERE
|
||||||
task_id=#{taskId}
|
task_id=#{taskId}
|
||||||
</select>
|
</select>
|
||||||
|
<select id="getPutInList" resultType="com.bonus.sgzb.material.domain.PurchaseInputDto">
|
||||||
|
SELECT
|
||||||
|
pcd.check_num checkNum,
|
||||||
|
pci.purchase_time purchaseTime,
|
||||||
|
tk.update_time inputTime,
|
||||||
|
mt.type_name typeName,
|
||||||
|
mt1.type_name typeModelName,
|
||||||
|
tk.CODE as code,
|
||||||
|
su.nick_name purchaser,
|
||||||
|
us.nick_name inputUser
|
||||||
|
FROM
|
||||||
|
purchase_check_details pcd
|
||||||
|
LEFT JOIN purchase_check_info pci ON pcd.task_id = pci.task_id
|
||||||
|
LEFT JOIN ma_type mt ON pcd.type_id = mt.type_id
|
||||||
|
LEFT JOIN ma_type mt1 ON mt.parent_id = mt1.type_id
|
||||||
|
LEFT JOIN ma_supplier_info msi ON pcd.supplier_id = msi.supplier_id
|
||||||
|
LEFT JOIN tm_task tk ON pcd.task_id = tk.task_id
|
||||||
|
left join sys_user su on pci.purchaser = su.user_id
|
||||||
|
LEFT JOIN sys_user us on us.user_id = tk.update_by
|
||||||
|
WHERE
|
||||||
|
tk.task_type = 23
|
||||||
|
AND tk.task_status = 28
|
||||||
|
<if test="keyWord != null and keyWord != ''">
|
||||||
|
AND (
|
||||||
|
mt.type_name LIKE CONCAT('%', #{keyWord}, '%')
|
||||||
|
OR mt1.type_name LIKE CONCAT('%', #{keyWord}, '%')
|
||||||
|
)
|
||||||
|
</if>
|
||||||
|
<if test="code != null and code != ''">
|
||||||
|
and tk.code like concat('%', #{code}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
|
||||||
|
and pci.purchase_time BETWEEN CONCAT(#{startTime}, ' 00:00:00') AND CONCAT(#{endTime}, ' 23:59:59')
|
||||||
|
</if>
|
||||||
|
<if test="startTime1 != null and startTime1 != '' and endTime1 != null and endTime1 != ''">
|
||||||
|
and tk.update_time BETWEEN CONCAT(#{startTime1}, ' 00:00:00') AND CONCAT(#{endTime1}, ' 23:59:59')
|
||||||
|
</if>
|
||||||
|
ORDER BY
|
||||||
|
pci.create_time DESC
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
Loading…
Reference in New Issue