功能新增优化
This commit is contained in:
parent
a9e22710b4
commit
3218fd90f6
|
|
@ -0,0 +1,409 @@
|
|||
package com.bonus.material.basic.controller;
|
||||
|
||||
import com.alibaba.nacos.common.utils.CollectionUtils;
|
||||
import com.bonus.common.core.utils.poi.ExcelUtil;
|
||||
import com.bonus.common.core.web.controller.BaseController;
|
||||
import com.bonus.common.core.web.domain.AjaxResult;
|
||||
import com.bonus.material.basic.domain.report.*;
|
||||
import com.bonus.material.basic.service.BmReportService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author ma_sh
|
||||
* @create 2025/1/22 9:52
|
||||
*/
|
||||
@Api(tags = "报表查询")
|
||||
@RestController
|
||||
@RequestMapping("/bm_report")
|
||||
public class BmReportController extends BaseController {
|
||||
|
||||
@Resource
|
||||
private BmReportService bmReportService;
|
||||
|
||||
/**
|
||||
* 新购入库报表查询
|
||||
* @param bean
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "设备追溯查询--新购入库报表查询")
|
||||
@GetMapping("/getPurChaseReportList")
|
||||
public AjaxResult getPurChaseReportList(PurChaseReportInfo bean) {
|
||||
bean.setIsExport(1);
|
||||
startPage();
|
||||
List<PurChaseReportInfo> pageList = bmReportService.getPurChaseReportList(bean);
|
||||
return AjaxResult.success(getDataTable(pageList));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "设备追溯查询--新购入库报表查询不分页")
|
||||
@GetMapping("/getPurChaseReportListNoPage")
|
||||
public AjaxResult getPurChaseReportListNoPage(PurChaseReportInfo bean) {
|
||||
bean.setIsExport(0);
|
||||
List<PurChaseReportInfo> list = bmReportService.getPurChaseReportList(bean);
|
||||
PurChaseReportInfo reportInfo = new PurChaseReportInfo();
|
||||
if (CollectionUtils.isNotEmpty(list)) {
|
||||
PurChaseReportInfo info = list.get(0);
|
||||
reportInfo.setPurchaseNum(info.getPurchaseNum());
|
||||
reportInfo.setPassNum(info.getPassNum());
|
||||
reportInfo.setInputNum(info.getInputNum());
|
||||
reportInfo.setPurchasePrice(info.getPurchasePrice());
|
||||
reportInfo.setPurchasePriceNoTax(info.getPurchasePriceNoTax());
|
||||
reportInfo.setPendingInputNum(info.getPendingInputNum());
|
||||
}
|
||||
return AjaxResult.success(reportInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新购入库报表详情查询
|
||||
* @param bean
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "设备追溯查询--新购入库报表详情查询")
|
||||
@GetMapping("/getPurChaseReportDetailsList")
|
||||
public AjaxResult getPurChaseReportDetailsList(PurChaseReportInfo bean) {
|
||||
startPage();
|
||||
List<PurChaseReportDetails> pageList = bmReportService.getPurChaseReportDetailsList(bean);
|
||||
return AjaxResult.success(getDataTable(pageList));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出设备追溯查询-新购入库报表
|
||||
* @param response
|
||||
* @param bean
|
||||
*/
|
||||
@ApiOperation("导出设备追溯查询-新购入库报表")
|
||||
@PostMapping("/exportPurChaseReportList")
|
||||
public void exportPurChaseReportList(HttpServletResponse response, PurChaseReportInfo bean)
|
||||
{
|
||||
bean.setIsExport(0);
|
||||
List<PurChaseReportInfo> list = bmReportService.getPurChaseReportList(bean);
|
||||
ExcelUtil<PurChaseReportInfo> util = new ExcelUtil<>(PurChaseReportInfo.class);
|
||||
util.exportExcel(response, list, "设备追溯查询-新购入库报表");
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出设备追溯查询-新购入库报表详情
|
||||
* @param response
|
||||
* @param bean
|
||||
*/
|
||||
@ApiOperation("导出设备追溯查询-新购入库报表详情")
|
||||
@PostMapping("/exportPurChaseReportDetailsList")
|
||||
public void exportPurChaseReportDetailsList(HttpServletResponse response, PurChaseReportInfo bean)
|
||||
{
|
||||
List<PurChaseReportDetails> list = bmReportService.getPurChaseReportDetailsList(bean);
|
||||
ExcelUtil<PurChaseReportDetails> util = new ExcelUtil<>(PurChaseReportDetails.class);
|
||||
util.exportExcel(response, list, "设备追溯查询-新购入库报表详情");
|
||||
}
|
||||
|
||||
/**
|
||||
* 领料出库报表查询
|
||||
* @param bean
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "设备追溯查询--领料出库报表查询")
|
||||
@GetMapping("/getLeaseOutList")
|
||||
public AjaxResult getLeaseOutList(LeaseOutInfo bean) {
|
||||
bean.setIsExport(1);
|
||||
startPage();
|
||||
List<LeaseOutInfo> pageList = bmReportService.getLeaseOutList(bean);
|
||||
return AjaxResult.success(getDataTable(pageList));
|
||||
}
|
||||
|
||||
/**
|
||||
* 领料出库报表查询
|
||||
* @param bean
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "设备追溯查询--领料出库报表查询不分页")
|
||||
@GetMapping("/getLeaseOutListNoPage")
|
||||
public AjaxResult getLeaseOutListNoPage(LeaseOutInfo bean) {
|
||||
bean.setIsExport(0);
|
||||
List<LeaseOutInfo> list = bmReportService.getLeaseOutList(bean);
|
||||
LeaseOutInfo info = new LeaseOutInfo();
|
||||
if (CollectionUtils.isNotEmpty(list)) {
|
||||
LeaseOutInfo leaseOutInfo = list.get(0);
|
||||
info.setLeaseNum(leaseOutInfo.getLeaseNum());
|
||||
info.setOutNum(leaseOutInfo.getOutNum());
|
||||
info.setPendingOutNum(leaseOutInfo.getPendingOutNum());
|
||||
}
|
||||
return AjaxResult.success(info);
|
||||
}
|
||||
|
||||
/**
|
||||
* 领料出库报表详情查询
|
||||
* @param bean
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "设备追溯查询--领料出库报表详情查询")
|
||||
@GetMapping("/getLeaseOutDetailsList")
|
||||
public AjaxResult getLeaseOutDetailsList(LeaseOutInfo bean) {
|
||||
startPage();
|
||||
List<LeaseOutDetails> pageList = bmReportService.getLeaseOutDetailsList(bean);
|
||||
return AjaxResult.success(getDataTable(pageList));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出设备追溯查询-领料出库报表查询
|
||||
* @param response
|
||||
* @param bean
|
||||
*/
|
||||
@ApiOperation("导出设备追溯查询-领料出库报表查询")
|
||||
@PostMapping("/exportLeaseOutList")
|
||||
public void exportLeaseOutList(HttpServletResponse response, LeaseOutInfo bean)
|
||||
{
|
||||
bean.setIsExport(0);
|
||||
List<LeaseOutInfo> list = bmReportService.getLeaseOutList(bean);
|
||||
ExcelUtil<LeaseOutInfo> util = new ExcelUtil<>(LeaseOutInfo.class);
|
||||
util.exportExcel(response, list, "设备追溯查询-领料出库报表查询");
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出设备追溯查询-领料出库报表详情查询
|
||||
* @param response
|
||||
* @param bean
|
||||
*/
|
||||
@ApiOperation("导出设备追溯查询-领料出库报表详情查询")
|
||||
@PostMapping("/exportLeaseOutDetailsList")
|
||||
public void exportLeaseOutDetailsList(HttpServletResponse response, LeaseOutInfo bean)
|
||||
{
|
||||
List<LeaseOutDetails> list = bmReportService.getLeaseOutDetailsList(bean);
|
||||
ExcelUtil<LeaseOutDetails> util = new ExcelUtil<>(LeaseOutDetails.class);
|
||||
util.exportExcel(response, list, "设备追溯查询-领料出库报表详情查询");
|
||||
}
|
||||
|
||||
/**
|
||||
* 退料报表查询
|
||||
* @param bean
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "设备追溯查询--退料报表查询")
|
||||
@GetMapping("/getBackInputList")
|
||||
public AjaxResult getBackInputList(BackInputInfo bean) {
|
||||
bean.setIsExport(1);
|
||||
startPage();
|
||||
List<BackInputInfo> pageList = bmReportService.getBackInputList(bean);
|
||||
return AjaxResult.success(getDataTable(pageList));
|
||||
}
|
||||
|
||||
/**
|
||||
* 退料报表查询
|
||||
* @param bean
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "设备追溯查询--退料报表查询不分页")
|
||||
@GetMapping("/getBackInputListNoPage")
|
||||
public AjaxResult getBackInputListNoPage(BackInputInfo bean) {
|
||||
bean.setIsExport(0);
|
||||
List<BackInputInfo> list = bmReportService.getBackInputList(bean);
|
||||
BackInputInfo info = new BackInputInfo();
|
||||
if (CollectionUtils.isNotEmpty(list)) {
|
||||
BackInputInfo backInputInfo = list.get(0);
|
||||
info.setBackNum(backInputInfo.getBackNum());
|
||||
}
|
||||
return AjaxResult.success(info);
|
||||
}
|
||||
|
||||
/**
|
||||
* 退料报表查询详情查询
|
||||
* @param bean
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "设备追溯查询--退料报表查询详情")
|
||||
@GetMapping("/getBackDetailsInputList")
|
||||
public AjaxResult getBackDetailsInputList(BackInputInfo bean) {
|
||||
startPage();
|
||||
List<BackInputDetails> pageList = bmReportService.getBackDetailsInputList(bean);
|
||||
return AjaxResult.success(getDataTable(pageList));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出设备追溯查询-退料报表查询
|
||||
* @param response
|
||||
* @param bean
|
||||
*/
|
||||
@ApiOperation("导出设备追溯查询-退料报表查询")
|
||||
@PostMapping("/exportBackInputList")
|
||||
public void exportBackInputList(HttpServletResponse response, BackInputInfo bean)
|
||||
{
|
||||
bean.setIsExport(0);
|
||||
List<BackInputInfo> list = bmReportService.getBackInputList(bean);
|
||||
ExcelUtil<BackInputInfo> util = new ExcelUtil<>(BackInputInfo.class);
|
||||
util.exportExcel(response, list, "设备追溯查询-退料报表查询");
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出设备追溯查询-退料报表查询详情
|
||||
* @param response
|
||||
* @param bean
|
||||
*/
|
||||
@ApiOperation("导出设备追溯查询-退料报表查询详情")
|
||||
@PostMapping("/exportBackDetailsInputList")
|
||||
public void exportBackDetailsInputList(HttpServletResponse response, BackInputInfo bean)
|
||||
{
|
||||
List<BackInputDetails> list = bmReportService.getBackDetailsInputList(bean);
|
||||
ExcelUtil<BackInputDetails> util = new ExcelUtil<>(BackInputDetails.class);
|
||||
util.exportExcel(response, list, "设备追溯查询-退料报表查询详情");
|
||||
}
|
||||
|
||||
/**
|
||||
* 维修报表
|
||||
* @param bean
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "设备追溯查询--维修报表")
|
||||
@GetMapping("/getRepairList")
|
||||
public AjaxResult getRepairList(RepairInfo bean) {
|
||||
bean.setIsExport(1);
|
||||
startPage();
|
||||
List<RepairInfo> pageList = bmReportService.getRepairList(bean);
|
||||
return AjaxResult.success(getDataTable(pageList));
|
||||
}
|
||||
|
||||
/**
|
||||
* 维修报表查询不分页
|
||||
* @param bean
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "设备追溯查询--维修报表查询不分页")
|
||||
@GetMapping("/getRepairListNoPage")
|
||||
public AjaxResult getRepairListNoPage(RepairInfo bean) {
|
||||
bean.setIsExport(0);
|
||||
List<RepairInfo> list = bmReportService.getRepairList(bean);
|
||||
RepairInfo info = new RepairInfo();
|
||||
if (CollectionUtils.isNotEmpty(list)) {
|
||||
RepairInfo repairInfo = list.get(0);
|
||||
info.setBackNum(repairInfo.getBackNum());
|
||||
info.setRepairedNum(repairInfo.getRepairedNum());
|
||||
info.setPendingScrapNum(repairInfo.getPendingScrapNum());
|
||||
info.setPendingRepairNum(repairInfo.getPendingRepairNum());
|
||||
}
|
||||
return AjaxResult.success(info);
|
||||
}
|
||||
|
||||
/**
|
||||
* 维修报表查询详情查询
|
||||
* @param bean
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "设备追溯查询--维修报表查询详情")
|
||||
@GetMapping("/getRepairDetailsList")
|
||||
public AjaxResult getRepairDetailsList(RepairInfo bean) {
|
||||
startPage();
|
||||
List<RepairDetails> list = bmReportService.getRepairDetailsList(bean);
|
||||
return AjaxResult.success(getDataTable(list));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出设备追溯查询-维修报表查询
|
||||
* @param response
|
||||
* @param bean
|
||||
*/
|
||||
@ApiOperation("导出设备追溯查询-维修报表查询")
|
||||
@PostMapping("/exportRepairList")
|
||||
public void exportRepairList(HttpServletResponse response, RepairInfo bean)
|
||||
{
|
||||
bean.setIsExport(0);
|
||||
List<RepairInfo> list = bmReportService.getRepairList(bean);
|
||||
ExcelUtil<RepairInfo> util = new ExcelUtil<>(RepairInfo.class);
|
||||
util.exportExcel(response, list, "设备追溯查询-维修报表查询");
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出设备追溯查询-维修报表查询详情
|
||||
* @param response
|
||||
* @param bean
|
||||
*/
|
||||
@ApiOperation("导出设备追溯查询-维修报表查询详情")
|
||||
@PostMapping("/exportRepairDetailsList")
|
||||
public void exportRepairDetailsList(HttpServletResponse response, RepairInfo bean)
|
||||
{
|
||||
List<RepairDetails> list = bmReportService.getRepairDetailsList(bean);
|
||||
ExcelUtil<RepairDetails> util = new ExcelUtil<>(RepairDetails.class);
|
||||
util.exportExcel(response, list, "设备追溯查询-维修报表查询详情");
|
||||
}
|
||||
|
||||
/**
|
||||
* 修饰入库报表
|
||||
* @param bean
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "设备追溯查询--修饰入库报表")
|
||||
@GetMapping("/getRepairInputList")
|
||||
public AjaxResult getRepairInputList(RepairInputDto bean) {
|
||||
bean.setIsExport(1);
|
||||
startPage();
|
||||
List<RepairInputDto> pageList = bmReportService.getRepairInputList(bean);
|
||||
return AjaxResult.success(getDataTable(pageList));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修饰入库报表查询不分页
|
||||
* @param bean
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "设备追溯查询--修饰入库报表查询不分页")
|
||||
@GetMapping("/getRepairInputListNoPage")
|
||||
public AjaxResult getRepairInputListNoPage(RepairInputDto bean) {
|
||||
bean.setIsExport(0);
|
||||
List<RepairInputDto> pageList = bmReportService.getRepairInputList(bean);
|
||||
RepairInputDto info = new RepairInputDto();
|
||||
if (CollectionUtils.isNotEmpty(pageList)) {
|
||||
RepairInputDto repairInputInfo = pageList.get(0);
|
||||
info.setRepairedNum(repairInputInfo.getRepairedNum());
|
||||
info.setInputNum(repairInputInfo.getInputNum());
|
||||
info.setPendingInputNum(repairInputInfo.getPendingInputNum());
|
||||
}
|
||||
return AjaxResult.success(info);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修饰入库报表查询详情查询
|
||||
* @param bean
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "设备追溯查询--修饰入库报表查询详情")
|
||||
@GetMapping("/getRepairInputDetailsList")
|
||||
public AjaxResult getRepairInputDetailsList(RepairInputDto bean) {
|
||||
startPage();
|
||||
List<RepairInputDetails> list = bmReportService.getRepairInputDetailsList(bean);
|
||||
return AjaxResult.success(getDataTable(list));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出设备追溯查询-修饰入库报表查询
|
||||
* @param response
|
||||
* @param bean
|
||||
*/
|
||||
@ApiOperation("导出设备追溯查询-修饰入库报表查询")
|
||||
@PostMapping("/exportRepairInputList")
|
||||
public void exportRepairList(HttpServletResponse response, RepairInputDto bean)
|
||||
{
|
||||
bean.setIsExport(0);
|
||||
List<RepairInputDto> list = bmReportService.getRepairInputList(bean);
|
||||
ExcelUtil<RepairInputDto> util = new ExcelUtil<>(RepairInputDto.class);
|
||||
util.exportExcel(response, list, "设备追溯查询-修饰入库报表");
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出设备追溯查询-修饰入库报表查询详情查询
|
||||
* @param response
|
||||
* @param bean
|
||||
*/
|
||||
@ApiOperation("导出设备追溯查询-修饰入库报表详情查询")
|
||||
@PostMapping("/exportRepairInputDetailsList")
|
||||
public void exportRepairInputDetailsList(HttpServletResponse response, RepairInputDto bean)
|
||||
{
|
||||
List<RepairInputDetails> list = bmReportService.getRepairInputDetailsList(bean);
|
||||
ExcelUtil<RepairInputDetails> util = new ExcelUtil<>(RepairInputDetails.class);
|
||||
util.exportExcel(response, list, "设备追溯查询-修饰入库报表详情查询");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
package com.bonus.material.basic.domain.report;
|
||||
|
||||
import com.bonus.common.core.annotation.Excel;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 退料报表详情
|
||||
* @Author ma_sh
|
||||
* @create 2025/1/22 16:40
|
||||
*/
|
||||
@Data
|
||||
public class BackInputDetails {
|
||||
|
||||
@ApiModelProperty(value = "物资名称")
|
||||
@Excel(name = "物资名称")
|
||||
private String typeName;
|
||||
|
||||
@ApiModelProperty(value = "规格型号")
|
||||
@Excel(name = "规格型号")
|
||||
private String typeModelName;
|
||||
|
||||
@ApiModelProperty(value = "设备编码")
|
||||
@Excel(name = "设备编码")
|
||||
private String maCode;
|
||||
|
||||
@ApiModelProperty(value = "入库人员")
|
||||
@Excel(name = "入库人员")
|
||||
private String inputPersonName;
|
||||
|
||||
@ApiModelProperty(value = "入库时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@Excel(name = "入库时间", width = 20, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date inputTime;
|
||||
}
|
||||
|
|
@ -0,0 +1,80 @@
|
|||
package com.bonus.material.basic.domain.report;
|
||||
|
||||
import com.bonus.common.core.annotation.Excel;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 退料入库报表
|
||||
* @Author ma_sh
|
||||
* @create 2025/1/22 16:36
|
||||
*/
|
||||
@Data
|
||||
public class BackInputInfo {
|
||||
|
||||
@ApiModelProperty(value = "是否导出 0 是,1 否")
|
||||
private Integer isExport;
|
||||
|
||||
@ApiModelProperty(value = "父级id")
|
||||
private Long parentId;
|
||||
|
||||
@ApiModelProperty(value = "物资类型id")
|
||||
private Long typeId;
|
||||
|
||||
@ApiModelProperty(value = "物资名称")
|
||||
@Excel(name = "物资名称")
|
||||
private String typeName;
|
||||
|
||||
@ApiModelProperty(value = "规格型号")
|
||||
@Excel(name = "规格型号")
|
||||
private String typeModelName;
|
||||
|
||||
@ApiModelProperty(value = "计量单位")
|
||||
@Excel(name = "计量单位")
|
||||
private String unitName;
|
||||
|
||||
@ApiModelProperty(value = "退料数量")
|
||||
@Excel(name = "退料数量")
|
||||
private BigDecimal backNum;
|
||||
|
||||
@ApiModelProperty(value = "退料日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
@Excel(name = "退料日期", width = 20, dateFormat = "yyyy-MM-dd")
|
||||
private Date backTime;
|
||||
|
||||
@ApiModelProperty(value = "退料单位")
|
||||
@Excel(name = "退料单位")
|
||||
private String backUnitName;
|
||||
|
||||
@ApiModelProperty(value = "退料工程")
|
||||
@Excel(name = "退料工程")
|
||||
private String backProjectName;
|
||||
|
||||
@ApiModelProperty(value = "退料人")
|
||||
@Excel(name = "退料人")
|
||||
private String backPersonName;
|
||||
|
||||
@ApiModelProperty(value = "操作人")
|
||||
@Excel(name = "操作人")
|
||||
private String createBy;
|
||||
|
||||
@ApiModelProperty(value = "退料单号")
|
||||
@Excel(name = "退料单号")
|
||||
private String code;
|
||||
|
||||
@ApiModelProperty(value = "管理方式")
|
||||
private String manageType;
|
||||
|
||||
@ApiModelProperty(value = "开始时间")
|
||||
private String startTime;
|
||||
|
||||
@ApiModelProperty(value = "结束时间")
|
||||
private String endTime;
|
||||
|
||||
@ApiModelProperty(value = "关键字")
|
||||
private String keyWord;
|
||||
}
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
package com.bonus.material.basic.domain.report;
|
||||
|
||||
import com.bonus.common.core.annotation.Excel;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 领料出库报表详情
|
||||
* @Author ma_sh
|
||||
* @create 2025/1/22 16:07
|
||||
*/
|
||||
@Data
|
||||
public class LeaseOutDetails {
|
||||
|
||||
@ApiModelProperty(value = "物资名称")
|
||||
@Excel(name = "物资名称")
|
||||
private String typeName;
|
||||
|
||||
@ApiModelProperty(value = "规格型号")
|
||||
@Excel(name = "规格型号")
|
||||
private String typeModelName;
|
||||
|
||||
@ApiModelProperty(value = "设备编码")
|
||||
@Excel(name = "设备编码")
|
||||
private String maCode;
|
||||
|
||||
@ApiModelProperty(value = "出库人员")
|
||||
@Excel(name = "出库人员")
|
||||
private String outPersonName;
|
||||
|
||||
@ApiModelProperty(value = "出库时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@Excel(name = "出库时间", width = 20, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date outTime;
|
||||
}
|
||||
|
|
@ -0,0 +1,93 @@
|
|||
package com.bonus.material.basic.domain.report;
|
||||
|
||||
import com.bonus.common.core.annotation.Excel;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 领料出库报表
|
||||
* @Author ma_sh
|
||||
* @create 2025/1/22 14:58
|
||||
*/
|
||||
@Data
|
||||
public class LeaseOutInfo {
|
||||
|
||||
@ApiModelProperty(value = "是否导出 0 是,1 否")
|
||||
private Integer isExport;
|
||||
|
||||
@ApiModelProperty(value = "父级id")
|
||||
private Long parentId;
|
||||
|
||||
@ApiModelProperty(value = "物资类型id")
|
||||
private Long typeId;
|
||||
|
||||
@ApiModelProperty(value = "物资名称")
|
||||
@Excel(name = "物资名称")
|
||||
private String typeName;
|
||||
|
||||
@ApiModelProperty(value = "规格型号")
|
||||
@Excel(name = "规格型号")
|
||||
private String typeModelName;
|
||||
|
||||
@ApiModelProperty(value = "计量单位")
|
||||
@Excel(name = "计量单位")
|
||||
private String unitName;
|
||||
|
||||
@ApiModelProperty(value = "领料数量")
|
||||
@Excel(name = "领料数量")
|
||||
private BigDecimal leaseNum;
|
||||
|
||||
@ApiModelProperty(value = "出库数量")
|
||||
@Excel(name = "出库数量")
|
||||
private BigDecimal outNum;
|
||||
|
||||
@ApiModelProperty(value = "待出库数量")
|
||||
@Excel(name = "待出库数量")
|
||||
private BigDecimal pendingOutNum;
|
||||
|
||||
@ApiModelProperty(value = "领料日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
@Excel(name = "领料日期", width = 20, dateFormat = "yyyy-MM-dd")
|
||||
private Date leaseTime;
|
||||
|
||||
@ApiModelProperty(value = "出库日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
@Excel(name = "出库日期", width = 20, dateFormat = "yyyy-MM-dd")
|
||||
private Date outTime;
|
||||
|
||||
@ApiModelProperty(value = "领料单位")
|
||||
@Excel(name = "领料单位")
|
||||
private String leaseUnitName;
|
||||
|
||||
@ApiModelProperty(value = "领料工程")
|
||||
@Excel(name = "领料工程")
|
||||
private String leaseProjectName;
|
||||
|
||||
@ApiModelProperty(value = "领料人")
|
||||
@Excel(name = "领料人")
|
||||
private String leasePersonName;
|
||||
|
||||
@ApiModelProperty(value = "出库人")
|
||||
@Excel(name = "出库人")
|
||||
private String outPersonName;
|
||||
|
||||
@ApiModelProperty(value = "领料单号")
|
||||
@Excel(name = "领料单号")
|
||||
private String code;
|
||||
|
||||
@ApiModelProperty(value = "管理方式")
|
||||
private String manageType;
|
||||
|
||||
@ApiModelProperty(value = "开始时间")
|
||||
private String startTime;
|
||||
|
||||
@ApiModelProperty(value = "结束时间")
|
||||
private String endTime;
|
||||
|
||||
@ApiModelProperty(value = "关键字")
|
||||
private String keyWord;
|
||||
}
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
package com.bonus.material.basic.domain.report;
|
||||
|
||||
import com.bonus.common.core.annotation.Excel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 新购入库报表弹窗详情
|
||||
* @Author ma_sh
|
||||
* @create 2025/1/22 13:29
|
||||
*/
|
||||
@Data
|
||||
public class PurChaseReportDetails {
|
||||
|
||||
@ApiModelProperty(value = "物资名称")
|
||||
@Excel(name = "机具名称")
|
||||
private String typeName;
|
||||
|
||||
@ApiModelProperty(value = "规格型号")
|
||||
@Excel(name = "规格型号")
|
||||
private String typeModelName;
|
||||
|
||||
@ApiModelProperty(value = "采购价格含税")
|
||||
@Excel(name = "采购价格(含税)")
|
||||
private BigDecimal purchasePrice;
|
||||
|
||||
@ApiModelProperty(value = "采购价格不含税")
|
||||
@Excel(name = "采购价格(不含税)")
|
||||
private BigDecimal purchasePriceNoTax;
|
||||
|
||||
@ApiModelProperty(value = "设备编码")
|
||||
@Excel(name = "设备编码")
|
||||
private String maCode;
|
||||
}
|
||||
|
|
@ -0,0 +1,102 @@
|
|||
package com.bonus.material.basic.domain.report;
|
||||
|
||||
import com.bonus.common.core.annotation.Excel;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 新购入库报表详情
|
||||
* @Author ma_sh
|
||||
* @create 2025/1/22 9:56
|
||||
*/
|
||||
@Data
|
||||
public class PurChaseReportInfo {
|
||||
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty(value = "是否导出 0 是,1 否")
|
||||
private Integer isExport;
|
||||
|
||||
private Long taskId;
|
||||
|
||||
private Long typeId;
|
||||
|
||||
@ApiModelProperty(value = "物资名称")
|
||||
@Excel(name = "物资名称")
|
||||
private String typeName;
|
||||
|
||||
@ApiModelProperty(value = "规格型号")
|
||||
@Excel(name = "规格型号")
|
||||
private String typeModelName;
|
||||
|
||||
@ApiModelProperty(value = "计量单位")
|
||||
@Excel(name = "计量单位")
|
||||
private String unitName;
|
||||
|
||||
@ApiModelProperty(value = "采购数量")
|
||||
@Excel(name = "采购数量")
|
||||
private BigDecimal purchaseNum;
|
||||
|
||||
@ApiModelProperty(value = "验收合格数量")
|
||||
@Excel(name = "验收合格数量")
|
||||
private BigDecimal passNum;
|
||||
|
||||
@ApiModelProperty(value = "入库数量")
|
||||
@Excel(name = "入库数量")
|
||||
private BigDecimal inputNum;
|
||||
|
||||
@ApiModelProperty(value = "采购价格含税")
|
||||
@Excel(name = "采购价格(含税)")
|
||||
private BigDecimal purchasePrice;
|
||||
|
||||
@ApiModelProperty(value = "采购价格不含税")
|
||||
@Excel(name = "采购价格(不含税)")
|
||||
private BigDecimal purchasePriceNoTax;
|
||||
|
||||
@ApiModelProperty(value = "物资厂家")
|
||||
@Excel(name = "物资厂家")
|
||||
private String supplierName;
|
||||
|
||||
@ApiModelProperty(value = "采购时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@Excel(name = "采购时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date purchaseTime;
|
||||
|
||||
@ApiModelProperty(value = "验收时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@Excel(name = "验收时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date passTime;
|
||||
|
||||
@ApiModelProperty(value = "入库时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@Excel(name = "入库时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date inputTime;
|
||||
|
||||
@ApiModelProperty(value = "入库人员")
|
||||
@Excel(name = "入库人员")
|
||||
private String inputUser;
|
||||
|
||||
@ApiModelProperty(value = "待入库数量")
|
||||
@Excel(name = "待入库数量")
|
||||
private BigDecimal pendingInputNum;
|
||||
|
||||
@ApiModelProperty(value = "入库单号")
|
||||
@Excel(name = "入库单号")
|
||||
private String inputCode;
|
||||
|
||||
@ApiModelProperty(value = "管理方式")
|
||||
private String manageType;
|
||||
|
||||
@ApiModelProperty(value = "开始时间")
|
||||
private String startTime;
|
||||
|
||||
@ApiModelProperty(value = "结束时间")
|
||||
private String endTime;
|
||||
|
||||
@ApiModelProperty(value = "关键字")
|
||||
private String keyWord;
|
||||
}
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
package com.bonus.material.basic.domain.report;
|
||||
|
||||
import com.bonus.common.core.annotation.Excel;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Author ma_sh
|
||||
* @create 2025/1/23 10:31
|
||||
*/
|
||||
@Data
|
||||
public class RepairDetails {
|
||||
@ApiModelProperty(value = "物资名称")
|
||||
@Excel(name = "机具名称")
|
||||
private String typeName;
|
||||
|
||||
@ApiModelProperty(value = "规格型号")
|
||||
@Excel(name = "规格型号")
|
||||
private String typeModelName;
|
||||
|
||||
@ApiModelProperty(value = "设备编码")
|
||||
@Excel(name = "设备编码")
|
||||
private String maCode;
|
||||
|
||||
@ApiModelProperty(value = "维修人")
|
||||
@Excel(name = "维修人")
|
||||
private String repairPersonName;
|
||||
|
||||
@ApiModelProperty(value = "维修时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@Excel(name = "维修时间", width = 20, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date repairTime;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,93 @@
|
|||
package com.bonus.material.basic.domain.report;
|
||||
|
||||
import com.bonus.common.core.annotation.Excel;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 维修报表
|
||||
* @Author ma_sh
|
||||
* @create 2025/1/23 10:31
|
||||
*/
|
||||
@Data
|
||||
public class RepairInfo {
|
||||
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty(value = "是否导出 0 是,1 否")
|
||||
private Integer isExport;
|
||||
|
||||
private Long taskId;
|
||||
|
||||
private Long typeId;
|
||||
|
||||
@ApiModelProperty(value = "物资名称")
|
||||
@Excel(name = "物资名称")
|
||||
private String typeName;
|
||||
|
||||
@ApiModelProperty(value = "规格型号")
|
||||
@Excel(name = "规格型号")
|
||||
private String typeModelName;
|
||||
|
||||
@ApiModelProperty(value = "计量单位")
|
||||
@Excel(name = "计量单位")
|
||||
private String unitName;
|
||||
|
||||
@ApiModelProperty(value = "退料数量")
|
||||
@Excel(name = "退料数量")
|
||||
private BigDecimal backNum;
|
||||
|
||||
@ApiModelProperty(value = "维修合格数量")
|
||||
@Excel(name = "维修合格数量")
|
||||
private BigDecimal repairedNum;
|
||||
|
||||
@ApiModelProperty(value = "待报废数量")
|
||||
@Excel(name = "待报废数量")
|
||||
private BigDecimal pendingScrapNum;
|
||||
|
||||
@ApiModelProperty(value = "待修数量")
|
||||
@Excel(name = "待修数量")
|
||||
private BigDecimal pendingRepairNum;
|
||||
|
||||
@ApiModelProperty(value = "退料日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
@Excel(name = "退料日期", width = 20, dateFormat = "yyyy-MM-dd")
|
||||
private Date backTime;
|
||||
|
||||
@ApiModelProperty(value = "维修日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
@Excel(name = "维修日期", width = 20, dateFormat = "yyyy-MM-dd")
|
||||
private Date repairTime;
|
||||
|
||||
@ApiModelProperty(value = "领料单位")
|
||||
@Excel(name = "领料单位")
|
||||
private String leaseUnitName;
|
||||
|
||||
@ApiModelProperty(value = "领料工程")
|
||||
@Excel(name = "领料工程")
|
||||
private String leaseProjectName;
|
||||
|
||||
@ApiModelProperty(value = "维修人")
|
||||
@Excel(name = "维修人")
|
||||
private String repairPersonName;
|
||||
|
||||
@ApiModelProperty(value = "维修单号")
|
||||
@Excel(name = "维修单号")
|
||||
private String code;
|
||||
|
||||
@ApiModelProperty(value = "管理方式")
|
||||
private String manageType;
|
||||
|
||||
@ApiModelProperty(value = "开始时间")
|
||||
private String startTime;
|
||||
|
||||
@ApiModelProperty(value = "结束时间")
|
||||
private String endTime;
|
||||
|
||||
@ApiModelProperty(value = "关键字")
|
||||
private String keyWord;
|
||||
}
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
package com.bonus.material.basic.domain.report;
|
||||
|
||||
import com.bonus.common.core.annotation.Excel;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 维修报表详情
|
||||
* @Author ma_sh
|
||||
* @create 2025/1/23 14:47
|
||||
*/
|
||||
@Data
|
||||
public class RepairInputDetails {
|
||||
|
||||
@ApiModelProperty(value = "机具名称")
|
||||
@Excel(name = "机具名称")
|
||||
private String typeName;
|
||||
|
||||
@ApiModelProperty(value = "规格型号")
|
||||
@Excel(name = "规格型号")
|
||||
private String typeModelName;
|
||||
|
||||
@ApiModelProperty(value = "设备编码")
|
||||
@Excel(name = "设备编码")
|
||||
private String maCode;
|
||||
|
||||
@ApiModelProperty(value = "入库人")
|
||||
@Excel(name = "入库人")
|
||||
private String inputPersonName;
|
||||
|
||||
@ApiModelProperty(value = "入库时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@Excel(name = "入库时间", width = 20, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date inputTime;
|
||||
}
|
||||
|
|
@ -0,0 +1,81 @@
|
|||
package com.bonus.material.basic.domain.report;
|
||||
|
||||
import com.bonus.common.core.annotation.Excel;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 修饰后入库报表
|
||||
* @Author ma_sh
|
||||
* @create 2025/1/23 14:43
|
||||
*/
|
||||
@Data
|
||||
public class RepairInputDto {
|
||||
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty(value = "是否导出 0 是,1 否")
|
||||
private Integer isExport;
|
||||
|
||||
private Long taskId;
|
||||
|
||||
private Long typeId;
|
||||
|
||||
@ApiModelProperty(value = "物资名称")
|
||||
@Excel(name = "物资名称")
|
||||
private String typeName;
|
||||
|
||||
@ApiModelProperty(value = "规格型号")
|
||||
@Excel(name = "规格型号")
|
||||
private String typeModelName;
|
||||
|
||||
@ApiModelProperty(value = "计量单位")
|
||||
@Excel(name = "计量单位")
|
||||
private String unitName;
|
||||
|
||||
@ApiModelProperty(value = "维修合格数量")
|
||||
@Excel(name = "维修合格数量")
|
||||
private BigDecimal repairedNum;
|
||||
|
||||
@ApiModelProperty(value = "入库数量")
|
||||
@Excel(name = "入库数量")
|
||||
private BigDecimal inputNum;
|
||||
|
||||
@ApiModelProperty(value = "维修提交时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@Excel(name = "维修提交时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date repairTime;
|
||||
|
||||
@ApiModelProperty(value = "入库时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@Excel(name = "入库时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date inputTime;
|
||||
|
||||
@ApiModelProperty(value = "入库人员")
|
||||
@Excel(name = "入库人员")
|
||||
private String inputPersonName;
|
||||
|
||||
@ApiModelProperty(value = "待入库数量")
|
||||
@Excel(name = "待入库数量")
|
||||
private BigDecimal pendingInputNum;
|
||||
|
||||
@ApiModelProperty(value = "入库单号")
|
||||
@Excel(name = "入库单号")
|
||||
private String code;
|
||||
|
||||
@ApiModelProperty(value = "管理方式")
|
||||
private String manageType;
|
||||
|
||||
@ApiModelProperty(value = "开始时间")
|
||||
private String startTime;
|
||||
|
||||
@ApiModelProperty(value = "结束时间")
|
||||
private String endTime;
|
||||
|
||||
@ApiModelProperty(value = "关键字")
|
||||
private String keyWord;
|
||||
}
|
||||
|
|
@ -0,0 +1,83 @@
|
|||
package com.bonus.material.basic.mapper;
|
||||
|
||||
import com.bonus.material.basic.domain.report.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @ClassName BmReportMapper
|
||||
* @Author ma_sh
|
||||
* @create 2025/1/22 9:55
|
||||
*/
|
||||
public interface BmReportMapper {
|
||||
|
||||
/**
|
||||
* 新购入库报表查询
|
||||
* @param bean
|
||||
* @return
|
||||
*/
|
||||
List<PurChaseReportInfo> getPurChaseReportList(PurChaseReportInfo bean);
|
||||
|
||||
/**
|
||||
* 新购入库报表查询详情
|
||||
* @param bean
|
||||
* @return
|
||||
*/
|
||||
List<PurChaseReportDetails> getPurChaseReportDetailsList(PurChaseReportInfo bean);
|
||||
|
||||
/**
|
||||
* 领料出库报表查询
|
||||
* @param bean
|
||||
* @return
|
||||
*/
|
||||
List<LeaseOutInfo> getLeaseOutList(LeaseOutInfo bean);
|
||||
|
||||
/**
|
||||
* 领料出库报表查询详情
|
||||
* @param bean
|
||||
* @return
|
||||
*/
|
||||
List<LeaseOutDetails> getLeaseOutDetailsList(LeaseOutInfo bean);
|
||||
|
||||
/**
|
||||
* 退料入库报表查询
|
||||
* @param bean
|
||||
* @return
|
||||
*/
|
||||
List<BackInputInfo> getBackInputList(BackInputInfo bean);
|
||||
|
||||
/**
|
||||
* 退料入库报表查询详情
|
||||
* @param bean
|
||||
* @return
|
||||
*/
|
||||
List<BackInputDetails> getBackDetailsInputList(BackInputInfo bean);
|
||||
|
||||
/**
|
||||
* 维修报表
|
||||
* @param bean
|
||||
* @return
|
||||
*/
|
||||
List<RepairInfo> getRepairList(RepairInfo bean);
|
||||
|
||||
/**
|
||||
* 维修报表详情
|
||||
* @param bean
|
||||
* @return
|
||||
*/
|
||||
List<RepairDetails> getRepairDetailsList(RepairInfo bean);
|
||||
|
||||
/**
|
||||
* 修饰入库报表
|
||||
* @param bean
|
||||
* @return
|
||||
*/
|
||||
List<RepairInputDto> getRepairInputList(RepairInputDto bean);
|
||||
|
||||
/**
|
||||
* 修饰入库报表查询详情查询
|
||||
* @param bean
|
||||
* @return
|
||||
*/
|
||||
List<RepairInputDetails> getRepairInputDetailsList(RepairInputDto bean);
|
||||
}
|
||||
|
|
@ -0,0 +1,83 @@
|
|||
package com.bonus.material.basic.service;
|
||||
|
||||
import com.bonus.material.basic.domain.report.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 报表服务service
|
||||
* @Author ma_sh
|
||||
* @create 2025/1/22 9:53
|
||||
*/
|
||||
public interface BmReportService {
|
||||
|
||||
/**
|
||||
* 新购入库报表查询
|
||||
* @param bean
|
||||
* @return
|
||||
*/
|
||||
List<PurChaseReportInfo> getPurChaseReportList(PurChaseReportInfo bean);
|
||||
|
||||
/**
|
||||
* 新购入库报表详情查询
|
||||
* @param bean
|
||||
* @return
|
||||
*/
|
||||
List<PurChaseReportDetails> getPurChaseReportDetailsList(PurChaseReportInfo bean);
|
||||
|
||||
/**
|
||||
* 领料出库报表查询
|
||||
* @param bean
|
||||
* @return
|
||||
*/
|
||||
List<LeaseOutInfo> getLeaseOutList(LeaseOutInfo bean);
|
||||
|
||||
/**
|
||||
* 领料出库报表详情查询
|
||||
* @param bean
|
||||
* @return
|
||||
*/
|
||||
List<LeaseOutDetails> getLeaseOutDetailsList(LeaseOutInfo bean);
|
||||
|
||||
/**
|
||||
* 退料报表查询
|
||||
* @param bean
|
||||
* @return
|
||||
*/
|
||||
List<BackInputInfo> getBackInputList(BackInputInfo bean);
|
||||
|
||||
/**
|
||||
* 退料报表详情查询
|
||||
* @param bean
|
||||
* @return
|
||||
*/
|
||||
List<BackInputDetails> getBackDetailsInputList(BackInputInfo bean);
|
||||
|
||||
/**
|
||||
* 维修报表
|
||||
* @param bean
|
||||
* @return
|
||||
*/
|
||||
List<RepairInfo> getRepairList(RepairInfo bean);
|
||||
|
||||
/**
|
||||
* 维修报表查询详情查询
|
||||
* @param bean
|
||||
* @return
|
||||
*/
|
||||
List<RepairDetails> getRepairDetailsList(RepairInfo bean);
|
||||
|
||||
/**
|
||||
* 修饰入库报表
|
||||
* @param bean
|
||||
* @return
|
||||
*/
|
||||
List<RepairInputDto> getRepairInputList(RepairInputDto bean);
|
||||
|
||||
/**
|
||||
* 修饰入库报表查询详情查询
|
||||
* @param bean
|
||||
* @return
|
||||
*/
|
||||
List<RepairInputDetails> getRepairInputDetailsList(RepairInputDto bean);
|
||||
}
|
||||
|
|
@ -11,6 +11,7 @@ import com.bonus.common.biz.constant.MaterialConstants;
|
|||
import com.bonus.common.biz.enums.HttpCodeEnum;
|
||||
import com.bonus.common.core.constant.SecurityConstants;
|
||||
import com.bonus.common.core.utils.DateUtils;
|
||||
import com.bonus.common.core.utils.encryption.Sm4Utils;
|
||||
import com.bonus.common.core.web.domain.AjaxResult;
|
||||
import com.bonus.common.security.utils.SecurityUtils;
|
||||
import com.bonus.material.purchase.config.RemoteConfig;
|
||||
|
|
@ -90,6 +91,9 @@ public class BmProjectServiceImpl implements IBmProjectService
|
|||
*/
|
||||
private void extractedImpUnit(BmProject project) {
|
||||
try {
|
||||
if (!StringUtils.isBlank(project.getTelphone())) {
|
||||
project.setTelphone(Sm4Utils.decrypt(project.getTelphone()));
|
||||
}
|
||||
AjaxResult ajaxResult = remoteDeptService.getInfo(Long.parseLong(project.getImpUnit()), SecurityConstants.INNER);
|
||||
//健壮性判断
|
||||
if (ajaxResult.isSuccess()) {
|
||||
|
|
@ -169,7 +173,7 @@ public class BmProjectServiceImpl implements IBmProjectService
|
|||
return AjaxResult.error(HttpCodeEnum.NAME_DUPLICATE.getCode(), "工程名称或工程编码与库中重复");
|
||||
}
|
||||
//校验输入的经纬度是否合规
|
||||
if (bmProject.getLon() != null) {
|
||||
/*if (bmProject.getLon() != null) {
|
||||
if (!bmProject.getLon().matches(MaterialConstants.LONGITUDE_PATTERN)){
|
||||
return AjaxResult.error(HttpCodeEnum.INVALID_LONGITUDE_FORMAT.getCode(), HttpCodeEnum.INVALID_LONGITUDE_FORMAT.getMsg());
|
||||
}
|
||||
|
|
@ -178,13 +182,15 @@ public class BmProjectServiceImpl implements IBmProjectService
|
|||
if (!bmProject.getLat().matches(MaterialConstants.LATITUDE_PATTERN)){
|
||||
return AjaxResult.error(HttpCodeEnum.INVALID_LATITUDE_FORMAT.getCode(), HttpCodeEnum.INVALID_LATITUDE_FORMAT.getMsg());
|
||||
}
|
||||
}
|
||||
}*/
|
||||
//判断手机号是否合法
|
||||
if (StringUtils.isNotBlank(bmProject.getTelphone()) && !PhoneUtil.isMobile(bmProject.getTelphone())) {
|
||||
return AjaxResult.error(HttpCodeEnum.INVALID_PHONE_FORMAT.getCode(), HttpCodeEnum.INVALID_PHONE_FORMAT.getMsg());
|
||||
}
|
||||
String telPhone = Sm4Utils.encrypt(bmProject.getTelphone());
|
||||
bmProject.setCreateTime(DateUtils.getNowDate());
|
||||
bmProject.setCreateBy(SecurityUtils.getUserId().toString());
|
||||
bmProject.setTelphone(telPhone);
|
||||
int result = bmProjectMapper.insertBmProject(bmProject);
|
||||
if (result > 0) {
|
||||
return AjaxResult.success(HttpCodeEnum.SUCCESS.getMsg(), result);
|
||||
|
|
@ -215,7 +221,7 @@ public class BmProjectServiceImpl implements IBmProjectService
|
|||
}
|
||||
}
|
||||
//校验输入的经纬度是否合规
|
||||
if (bmProject.getLon() != null) {
|
||||
/*if (bmProject.getLon() != null) {
|
||||
if (!bmProject.getLon().matches(MaterialConstants.LONGITUDE_PATTERN)){
|
||||
return AjaxResult.error(HttpCodeEnum.INVALID_LONGITUDE_FORMAT.getCode(), HttpCodeEnum.INVALID_LONGITUDE_FORMAT.getMsg());
|
||||
}
|
||||
|
|
@ -224,11 +230,13 @@ public class BmProjectServiceImpl implements IBmProjectService
|
|||
if (!bmProject.getLat().matches(MaterialConstants.LATITUDE_PATTERN)){
|
||||
return AjaxResult.error(HttpCodeEnum.INVALID_LATITUDE_FORMAT.getCode(), HttpCodeEnum.INVALID_LATITUDE_FORMAT.getMsg());
|
||||
}
|
||||
}
|
||||
}*/
|
||||
//判断手机号是否合法
|
||||
if (StringUtils.isNotBlank(bmProject.getTelphone()) && !PhoneUtil.isMobile(bmProject.getTelphone())) {
|
||||
return AjaxResult.error(HttpCodeEnum.INVALID_PHONE_FORMAT.getCode(), HttpCodeEnum.INVALID_PHONE_FORMAT.getMsg());
|
||||
}
|
||||
String telPhone = Sm4Utils.encrypt(bmProject.getTelphone());
|
||||
bmProject.setTelphone(telPhone);
|
||||
bmProject.setUpdateTime(DateUtils.getNowDate());
|
||||
bmProject.setUpdateBy(SecurityUtils.getUserId().toString());
|
||||
int result = bmProjectMapper.updateBmProject(bmProject);
|
||||
|
|
|
|||
|
|
@ -0,0 +1,225 @@
|
|||
package com.bonus.material.basic.service.impl;
|
||||
|
||||
import com.alibaba.nacos.common.utils.CollectionUtils;
|
||||
import com.bonus.material.basic.domain.report.*;
|
||||
import com.bonus.material.basic.mapper.BmReportMapper;
|
||||
import com.bonus.material.basic.service.BmReportService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @ClassName BmReportServiceImpl
|
||||
* @Author ma_sh
|
||||
* @create 2025/1/22 9:53
|
||||
*/
|
||||
@Service
|
||||
public class BmReportServiceImpl implements BmReportService {
|
||||
|
||||
@Resource
|
||||
private BmReportMapper bmReportMapper;
|
||||
|
||||
/**
|
||||
* 新购入库报表查询
|
||||
* @param bean
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<PurChaseReportInfo> getPurChaseReportList(PurChaseReportInfo bean) {
|
||||
BigDecimal totalPurchaseNum = BigDecimal.ZERO.setScale(3, RoundingMode.HALF_UP);
|
||||
BigDecimal totalPassNum = BigDecimal.ZERO.setScale(3, RoundingMode.HALF_UP);
|
||||
BigDecimal totalInputNum = BigDecimal.ZERO.setScale(3, RoundingMode.HALF_UP);
|
||||
BigDecimal totalPurchasePrice = BigDecimal.ZERO.setScale(2, RoundingMode.HALF_UP);
|
||||
BigDecimal totalPurchasePriceNoTax = BigDecimal.ZERO.setScale(2, RoundingMode.HALF_UP);
|
||||
BigDecimal totalPendingInputNum = BigDecimal.ZERO.setScale(3, RoundingMode.HALF_UP);
|
||||
List<PurChaseReportInfo> list = bmReportMapper.getPurChaseReportList(bean);
|
||||
if (CollectionUtils.isNotEmpty(list)) {
|
||||
for (PurChaseReportInfo purChaseReportInfo : list) {
|
||||
totalPurchaseNum = totalPurchaseNum.add(purChaseReportInfo.getPurchaseNum());
|
||||
totalPassNum = totalPassNum.add(purChaseReportInfo.getPassNum());
|
||||
totalInputNum = totalInputNum.add(purChaseReportInfo.getInputNum());
|
||||
totalPurchasePrice = totalPurchasePrice.add(purChaseReportInfo.getPurchasePrice());
|
||||
totalPurchasePriceNoTax = totalPurchasePriceNoTax.add(purChaseReportInfo.getPurchasePriceNoTax());
|
||||
totalPendingInputNum = totalPendingInputNum.add(purChaseReportInfo.getPendingInputNum());
|
||||
}
|
||||
}
|
||||
if (bean.getIsExport() == 0) {
|
||||
PurChaseReportInfo info = new PurChaseReportInfo();
|
||||
info.setPurchaseNum(totalPurchaseNum);
|
||||
info.setPassNum(totalPassNum);
|
||||
info.setInputNum(totalInputNum);
|
||||
info.setPurchasePrice(totalPurchasePrice);
|
||||
info.setPurchasePriceNoTax(totalPurchasePriceNoTax);
|
||||
info.setPendingInputNum(totalPendingInputNum);
|
||||
info.setUnitName("合计");
|
||||
list.add(0, info);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新购入库报表查询详情
|
||||
* @param bean
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<PurChaseReportDetails> getPurChaseReportDetailsList(PurChaseReportInfo bean) {
|
||||
return bmReportMapper.getPurChaseReportDetailsList(bean);
|
||||
}
|
||||
|
||||
/**
|
||||
* 领料出库报表查询
|
||||
* @param bean
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<LeaseOutInfo> getLeaseOutList(LeaseOutInfo bean) {
|
||||
BigDecimal totalLeaseNum = BigDecimal.ZERO.setScale(3, RoundingMode.HALF_UP);
|
||||
BigDecimal totalOutNumNum = BigDecimal.ZERO.setScale(3, RoundingMode.HALF_UP);
|
||||
BigDecimal totalPendingOutNum = BigDecimal.ZERO.setScale(3, RoundingMode.HALF_UP);
|
||||
List<LeaseOutInfo> list = bmReportMapper.getLeaseOutList(bean);
|
||||
if (CollectionUtils.isNotEmpty(list)) {
|
||||
for (LeaseOutInfo leaseOutInfo : list) {
|
||||
totalLeaseNum = totalLeaseNum.add(leaseOutInfo.getLeaseNum());
|
||||
totalOutNumNum = totalOutNumNum.add(leaseOutInfo.getOutNum());
|
||||
totalPendingOutNum = totalPendingOutNum.add(leaseOutInfo.getPendingOutNum());
|
||||
}
|
||||
}
|
||||
if (bean.getIsExport() == 0) {
|
||||
LeaseOutInfo info = new LeaseOutInfo();
|
||||
info.setLeaseNum(totalLeaseNum);
|
||||
info.setOutNum(totalOutNumNum);
|
||||
info.setPendingOutNum(totalPendingOutNum);
|
||||
info.setUnitName("合计");
|
||||
list.add(0, info);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 领料出库报表查询详情
|
||||
* @param bean
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<LeaseOutDetails> getLeaseOutDetailsList(LeaseOutInfo bean) {
|
||||
return bmReportMapper.getLeaseOutDetailsList(bean);
|
||||
}
|
||||
|
||||
/**
|
||||
* 退料报表查询
|
||||
* @param bean
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<BackInputInfo> getBackInputList(BackInputInfo bean) {
|
||||
BigDecimal totalBackNum = BigDecimal.ZERO.setScale(3, RoundingMode.HALF_UP);
|
||||
List<BackInputInfo> list = bmReportMapper.getBackInputList(bean);
|
||||
if (CollectionUtils.isNotEmpty(list)) {
|
||||
for (BackInputInfo backInputInfo : list) {
|
||||
totalBackNum = totalBackNum.add(backInputInfo.getBackNum());
|
||||
}
|
||||
}
|
||||
if (bean.getIsExport() == 0) {
|
||||
BackInputInfo info = new BackInputInfo();
|
||||
info.setBackNum(totalBackNum);
|
||||
info.setUnitName("合计");
|
||||
list.add(0, info);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 退料报表查询详情
|
||||
* @param bean
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<BackInputDetails> getBackDetailsInputList(BackInputInfo bean) {
|
||||
return bmReportMapper.getBackDetailsInputList(bean);
|
||||
}
|
||||
|
||||
/**
|
||||
* 维修报表
|
||||
* @param bean
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<RepairInfo> getRepairList(RepairInfo bean) {
|
||||
BigDecimal totalBackNum = BigDecimal.ZERO.setScale(3, RoundingMode.HALF_UP);
|
||||
BigDecimal totalRepairedNum = BigDecimal.ZERO.setScale(3, RoundingMode.HALF_UP);
|
||||
BigDecimal totalPendingScrapNum = BigDecimal.ZERO.setScale(3, RoundingMode.HALF_UP);
|
||||
BigDecimal totalPendingRepairNum = BigDecimal.ZERO.setScale(3, RoundingMode.HALF_UP);
|
||||
List<RepairInfo> list = bmReportMapper.getRepairList(bean);
|
||||
if (CollectionUtils.isNotEmpty(list)) {
|
||||
for (RepairInfo repairInfo : list) {
|
||||
totalBackNum = totalBackNum.add(repairInfo.getBackNum());
|
||||
totalRepairedNum = totalRepairedNum.add(repairInfo.getRepairedNum());
|
||||
totalPendingScrapNum = totalPendingScrapNum.add(repairInfo.getPendingScrapNum());
|
||||
totalPendingRepairNum = totalPendingRepairNum.add(repairInfo.getPendingRepairNum());
|
||||
}
|
||||
}
|
||||
if (bean.getIsExport() == 0) {
|
||||
RepairInfo info = new RepairInfo();
|
||||
info.setBackNum(totalBackNum);
|
||||
info.setRepairedNum(totalRepairedNum);
|
||||
info.setPendingScrapNum(totalPendingScrapNum);
|
||||
info.setPendingRepairNum(totalPendingRepairNum);
|
||||
info.setUnitName("合计");
|
||||
list.add(0, info);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 维修报表详情
|
||||
* @param bean
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<RepairDetails> getRepairDetailsList(RepairInfo bean) {
|
||||
return bmReportMapper.getRepairDetailsList(bean);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修饰入库报表
|
||||
* @param bean
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<RepairInputDto> getRepairInputList(RepairInputDto bean) {
|
||||
BigDecimal totalRepairedNum = BigDecimal.ZERO.setScale(3, RoundingMode.HALF_UP);
|
||||
BigDecimal totalInputNum = BigDecimal.ZERO.setScale(3, RoundingMode.HALF_UP);
|
||||
BigDecimal totalPendingInputNum = BigDecimal.ZERO.setScale(3, RoundingMode.HALF_UP);
|
||||
List<RepairInputDto> list = bmReportMapper.getRepairInputList(bean);
|
||||
if (CollectionUtils.isNotEmpty(list)) {
|
||||
for (RepairInputDto repairInputInfo : list) {
|
||||
totalRepairedNum = totalRepairedNum.add(repairInputInfo.getRepairedNum());
|
||||
totalInputNum = totalInputNum.add(repairInputInfo.getInputNum());
|
||||
totalPendingInputNum = totalPendingInputNum.add(repairInputInfo.getPendingInputNum());
|
||||
}
|
||||
}
|
||||
if (bean.getIsExport() == 0) {
|
||||
RepairInputDto info = new RepairInputDto();
|
||||
info.setRepairedNum(totalRepairedNum);
|
||||
info.setInputNum(totalInputNum);
|
||||
info.setPendingInputNum(totalPendingInputNum);
|
||||
info.setUnitName("合计");
|
||||
list.add(0, info);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修饰入库报表查询详情查询
|
||||
* @param bean
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<RepairInputDetails> getRepairInputDetailsList(RepairInputDto bean) {
|
||||
return bmReportMapper.getRepairInputDetailsList(bean);
|
||||
}
|
||||
}
|
||||
|
|
@ -46,7 +46,6 @@ public class TypeController extends BaseController {
|
|||
*/
|
||||
@ApiOperation(value = "查询物资类型管理列表")
|
||||
@RequiresPermissions("ma:type:list")
|
||||
@StoreLog(title = "物资类型管理", module = "仓储管理->物资类型查询库存记录")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(MaTypeVo type) {
|
||||
startPage();
|
||||
|
|
@ -61,7 +60,6 @@ public class TypeController extends BaseController {
|
|||
@PreventRepeatSubmit
|
||||
@RequiresPermissions("ma:type:export")
|
||||
@SysLog(title = "物资类型管理", businessType = OperaType.EXPORT, module = "仓储管理->导出物资类型")
|
||||
@StoreLog(title = "物资类型管理", module = "仓储管理->导出物资类型查询库存记录")
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, MaTypeVo maTypeVo) {
|
||||
List<Integer> parentIds = typeService.selectParentId(maTypeVo);
|
||||
|
|
@ -92,7 +90,6 @@ public class TypeController extends BaseController {
|
|||
*/
|
||||
@ApiOperation(value = "根据左列表类型id查询右表格")
|
||||
@GetMapping("/getListByMaType")
|
||||
@StoreLog(title = "物资类型管理", module = "仓储管理->导出物资类型查询库存记录")
|
||||
public AjaxResult getListByMaType(MaTypeVo maTypeVo) {
|
||||
List<Integer> parentIds = typeService.selectParentId(maTypeVo);
|
||||
if (CollectionUtils.isEmpty(parentIds)) {
|
||||
|
|
|
|||
|
|
@ -24,11 +24,6 @@ public class ScrapTaskListVo {
|
|||
@ApiModelProperty(value = "任务类型")
|
||||
private Byte taskType;
|
||||
|
||||
@ApiModelProperty(value = "报废单号")
|
||||
private String scrapCode;
|
||||
|
||||
|
||||
|
||||
@ApiModelProperty(value = "组织id")
|
||||
private Long companyId;
|
||||
|
||||
|
|
@ -46,6 +41,10 @@ public class ScrapTaskListVo {
|
|||
@Excel(name = "工程名称")
|
||||
private String backPro;
|
||||
|
||||
@ApiModelProperty(value = "报废单号")
|
||||
@Excel(name = "报废单号")
|
||||
private String scrapCode;
|
||||
|
||||
@ApiModelProperty(value = "维修单号")
|
||||
@Excel(name = "维修单号")
|
||||
private String repairCode;
|
||||
|
|
@ -55,7 +54,7 @@ public class ScrapTaskListVo {
|
|||
private String type;
|
||||
|
||||
@ApiModelProperty(value = "任务创建人昵称")
|
||||
@Excel(name = "提交人",sort = 4)
|
||||
@Excel(name = "提交人")
|
||||
private String createName;
|
||||
|
||||
@ApiModelProperty(value = "任务创建人")
|
||||
|
|
|
|||
|
|
@ -77,6 +77,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="actualStartDate != null "> and actual_start_date = #{actualStartDate}</if>
|
||||
<if test="actualEndDate != null "> and actual_end_date = #{actualEndDate}</if>
|
||||
</where>
|
||||
order by bp.create_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectBmProjectByProId" parameterType="Long" resultMap="BmProjectResult">
|
||||
|
|
|
|||
|
|
@ -0,0 +1,372 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.bonus.material.basic.mapper.BmReportMapper">
|
||||
|
||||
<select id="getPurChaseReportList" resultType="com.bonus.material.basic.domain.report.PurChaseReportInfo">
|
||||
SELECT
|
||||
pcd.task_id as taskId,
|
||||
pcd.type_id as typeId,
|
||||
mt2.type_name as typeName,
|
||||
mt1.type_name as typeModelName,
|
||||
mt1.unit_name as unitName,
|
||||
IFNULL(pcd.purchase_num, 0) as purchaseNum,
|
||||
IFNULL(pcd.check_num, 0) as passNum,
|
||||
IFNULL(pcd.input_num, 0) as inputNum,
|
||||
IFNULL(pcd.purchase_price, 0) as purchasePrice,
|
||||
IFNULL(pcd.purchase_tax_price, 0) as purchasePriceNoTax,
|
||||
msi.supplier as supplierName,
|
||||
pci.create_time as purchaseTime,
|
||||
pcd.check_time as passTime,
|
||||
pcd.input_time as inputTime,
|
||||
a.creator as inputUser,
|
||||
IFNULL(pcd.check_num, 0) - IFNULL(pcd.input_num, 0) as pendingInputNum,
|
||||
tt.`code` as inputCode,
|
||||
mt1.manage_type as manageType
|
||||
FROM
|
||||
purchase_check_details pcd
|
||||
LEFT JOIN ma_type mt1 ON pcd.type_id = mt1.type_id
|
||||
AND mt1.del_flag = '0'
|
||||
LEFT JOIN ma_type mt2 ON mt1.parent_id = mt2.type_id
|
||||
AND mt2.del_flag = '0'
|
||||
LEFT JOIN tm_task tt ON pcd.task_id = tt.task_id
|
||||
LEFT JOIN purchase_check_info pci ON pcd.task_id = pci.task_id
|
||||
LEFT JOIN ma_supplier_info msi ON pci.supplier_id = msi.supplier_id
|
||||
LEFT JOIN (
|
||||
SELECT GROUP_CONCAT(DISTINCT creator) AS creator, task_id, type_id
|
||||
FROM bm_storage_log
|
||||
GROUP BY task_id, type_id
|
||||
) a ON pcd.task_id = a.task_id AND pcd.type_id = a.type_id
|
||||
WHERE
|
||||
pcd.check_num > 0
|
||||
<if test="keyWord != null and keyWord != ''">
|
||||
AND (
|
||||
mt2.type_name LIKE CONCAT('%', #{keyWord}, '%')
|
||||
OR mt1.type_name LIKE CONCAT('%', #{keyWord}, '%')
|
||||
OR msi.supplier LIKE CONCAT('%', #{keyWord}, '%')
|
||||
OR a.creator LIKE CONCAT('%', #{keyWord}, '%')
|
||||
OR tt.`code` LIKE CONCAT('%', #{keyWord}, '%')
|
||||
)
|
||||
</if>
|
||||
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
|
||||
<![CDATA[and DATE_FORMAT( pci.create_time, '%Y-%m-%d' ) BETWEEN #{startTime} AND #{endTime} ]]>
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="getPurChaseReportDetailsList"
|
||||
resultType="com.bonus.material.basic.domain.report.PurChaseReportDetails">
|
||||
SELECT
|
||||
mt2.type_name AS typeName,
|
||||
mt1.type_name AS typeModelName,
|
||||
pcd.purchase_price AS purchasePrice,
|
||||
pcd.purchase_tax_price AS purchasePriceNoTax,
|
||||
bqi.ma_code AS maCode
|
||||
FROM
|
||||
bm_qrcode_info bqi
|
||||
LEFT JOIN ma_type mt1 ON bqi.type_id = mt1.type_id
|
||||
AND mt1.del_flag = '0'
|
||||
LEFT JOIN ma_type mt2 ON mt1.parent_id = mt2.type_id
|
||||
AND mt2.del_flag = '0'
|
||||
LEFT JOIN purchase_check_details pcd ON bqi.task_id = pcd.task_id
|
||||
AND pcd.type_id = bqi.type_id
|
||||
WHERE
|
||||
bqi.task_id = #{taskId} and bqi.type_id = #{typeId}
|
||||
<if test="keyWord != null and keyWord != ''">
|
||||
AND (
|
||||
mt2.type_name LIKE CONCAT('%', #{keyWord}, '%')
|
||||
OR mt1.type_name LIKE CONCAT('%', #{keyWord}, '%')
|
||||
OR bqi.ma_code LIKE CONCAT('%', #{keyWord}, '%')
|
||||
)
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="getLeaseOutList" resultType="com.bonus.material.basic.domain.report.LeaseOutInfo">
|
||||
SELECT
|
||||
mt2.type_name AS typeName,
|
||||
mt1.type_name AS typeModelName,
|
||||
mt1.unit_name AS unitName,
|
||||
lad.pre_num as leaseNum,
|
||||
IFNULL( lad.al_num, 0 ) as outNum,
|
||||
lad.pre_num - IFNULL( lad.al_num, 0 ) as pendingOutNum,
|
||||
lai.create_time as leaseTime,
|
||||
a.createTime as outTime,
|
||||
bu.unit_name as leaseUnitName,
|
||||
bp.pro_name as leaseProjectName,
|
||||
lai.create_by as leasePersonName,
|
||||
a.createBy as outPersonName,
|
||||
lai.`code` as code,
|
||||
mt1.manage_type as manageType,
|
||||
lad.parent_id as parentId,
|
||||
lad.type_id as typeId
|
||||
FROM
|
||||
lease_apply_details lad
|
||||
LEFT JOIN ma_type mt1 ON lad.type_id = mt1.type_id
|
||||
AND mt1.del_flag = '0'
|
||||
LEFT JOIN ma_type mt2 ON mt1.parent_id = mt2.type_id
|
||||
AND mt2.del_flag = '0'
|
||||
LEFT JOIN lease_apply_info lai ON lad.parent_id = lai.id
|
||||
LEFT JOIN tm_task_agreement tta ON lai.task_id = tta.task_id
|
||||
LEFT JOIN bm_agreement_info bai ON tta.agreement_id = bai.agreement_id
|
||||
LEFT JOIN bm_unit bu ON bai.unit_id = bu.unit_id
|
||||
LEFT JOIN bm_project bp ON bai.project_id = bp.pro_id
|
||||
LEFT JOIN ( SELECT parent_id, type_id, GROUP_CONCAT( DISTINCT create_by ) AS createBy, MAX( create_time ) AS createTime FROM lease_out_details GROUP BY parent_id, type_id ) a ON a.parent_id = lad.parent_id
|
||||
AND a.type_id = lad.type_id
|
||||
WHERE
|
||||
1 = 1
|
||||
<if test="keyWord != null and keyWord != ''">
|
||||
AND (
|
||||
mt2.type_name LIKE CONCAT('%', #{keyWord}, '%')
|
||||
OR mt1.type_name LIKE CONCAT('%', #{keyWord}, '%')
|
||||
OR bu.unit_name LIKE CONCAT('%', #{keyWord}, '%')
|
||||
OR bp.pro_name LIKE CONCAT('%', #{keyWord}, '%')
|
||||
OR lai.create_by LIKE CONCAT('%', #{keyWord}, '%')
|
||||
OR lai.`code` LIKE CONCAT('%', #{keyWord}, '%')
|
||||
)
|
||||
</if>
|
||||
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
|
||||
<![CDATA[and DATE_FORMAT( lai.create_time, '%Y-%m-%d' ) BETWEEN #{startTime} AND #{endTime} ]]>
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="getLeaseOutDetailsList" resultType="com.bonus.material.basic.domain.report.LeaseOutDetails">
|
||||
SELECT
|
||||
mt2.type_name AS typeName,
|
||||
mt1.type_name AS typeModelName,
|
||||
mm.ma_code as maCode,
|
||||
lod.create_by as outPersonName,
|
||||
lod.create_time as outTime
|
||||
FROM
|
||||
lease_out_details lod
|
||||
LEFT JOIN ma_type mt1 ON lod.type_id = mt1.type_id
|
||||
AND mt1.del_flag = '0'
|
||||
LEFT JOIN ma_type mt2 ON mt1.parent_id = mt2.type_id
|
||||
AND mt2.del_flag = '0'
|
||||
LEFT JOIN ma_machine mm ON lod.ma_id = mm.ma_id
|
||||
WHERE
|
||||
lod.parent_id = #{parentId} and lod.type_id = #{typeId}
|
||||
<if test="keyWord != null and keyWord != ''">
|
||||
AND (
|
||||
mt2.type_name LIKE CONCAT('%', #{keyWord}, '%')
|
||||
OR mt1.type_name LIKE CONCAT('%', #{keyWord}, '%')
|
||||
OR mm.ma_code LIKE CONCAT('%', #{keyWord}, '%')
|
||||
)
|
||||
</if>
|
||||
GROUP BY mm.ma_id
|
||||
</select>
|
||||
|
||||
<select id="getBackInputList" resultType="com.bonus.material.basic.domain.report.BackInputInfo">
|
||||
SELECT
|
||||
mt2.type_name as typeName,
|
||||
mt1.type_name as typeModelName,
|
||||
mt1.unit_name as unitName,
|
||||
bad.pre_num as backNum,
|
||||
bad.create_time as backTime,
|
||||
bu.unit_name as backUnitName,
|
||||
bp.pro_name as backProjectName,
|
||||
bai.back_person as backPersonName,
|
||||
bad.create_by as createBy,
|
||||
bai.`code` as code,
|
||||
bad.parent_id as parentId,
|
||||
bad.type_id as typeId,
|
||||
mt1.manage_type as manageType
|
||||
FROM
|
||||
back_apply_details bad
|
||||
LEFT JOIN ma_type mt1 ON bad.type_id = mt1.type_id
|
||||
AND mt1.del_flag = '0'
|
||||
LEFT JOIN ma_type mt2 ON mt1.parent_id = mt2.type_id
|
||||
AND mt2.del_flag = '0'
|
||||
LEFT JOIN back_apply_info bai ON bad.parent_id = bai.id
|
||||
LEFT JOIN tm_task_agreement tta ON bai.task_id = tta.task_id
|
||||
LEFT JOIN bm_agreement_info ba ON tta.agreement_id = ba.agreement_id
|
||||
LEFT JOIN bm_unit bu ON ba.unit_id = bu.unit_id
|
||||
LEFT JOIN bm_project bp ON ba.project_id = bp.pro_id
|
||||
WHERE
|
||||
1 = 1
|
||||
<if test="keyWord != null and keyWord != ''">
|
||||
AND (
|
||||
mt2.type_name LIKE CONCAT('%', #{keyWord}, '%')
|
||||
OR mt1.type_name LIKE CONCAT('%', #{keyWord}, '%')
|
||||
OR bu.unit_name LIKE CONCAT('%', #{keyWord}, '%')
|
||||
OR bp.pro_name LIKE CONCAT('%', #{keyWord}, '%')
|
||||
OR bai.back_person LIKE CONCAT('%', #{keyWord}, '%')
|
||||
OR bai.`code` LIKE CONCAT('%', #{keyWord}, '%')
|
||||
)
|
||||
</if>
|
||||
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
|
||||
<![CDATA[and DATE_FORMAT( bad.create_time, '%Y-%m-%d' ) BETWEEN #{startTime} AND #{endTime} ]]>
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="getBackDetailsInputList" resultType="com.bonus.material.basic.domain.report.BackInputDetails">
|
||||
SELECT
|
||||
mt2.type_name AS typeName,
|
||||
mt1.type_name AS typeModelName,
|
||||
mm.ma_code as maCode,
|
||||
bad.create_by as inputPersonName,
|
||||
bad.create_time as inputTime
|
||||
FROM
|
||||
back_check_details bad
|
||||
LEFT JOIN ma_type mt1 ON bad.type_id = mt1.type_id
|
||||
AND mt1.del_flag = '0'
|
||||
LEFT JOIN ma_type mt2 ON mt1.parent_id =mt2.type_id
|
||||
AND mt2.del_flag = '0'
|
||||
LEFT JOIN ma_machine mm ON bad.ma_id = mm.ma_id
|
||||
WHERE
|
||||
bad.parent_id = #{parentId} and bad.type_id = #{typeId}
|
||||
<if test="keyWord != null and keyWord != ''">
|
||||
AND (
|
||||
mt2.type_name LIKE CONCAT('%', #{keyWord}, '%')
|
||||
OR mt1.type_name LIKE CONCAT('%', #{keyWord}, '%')
|
||||
OR mm.ma_code LIKE CONCAT('%', #{keyWord}, '%')
|
||||
)
|
||||
</if>
|
||||
GROUP BY mm.ma_id
|
||||
</select>
|
||||
|
||||
<select id="getRepairList" resultType="com.bonus.material.basic.domain.report.RepairInfo">
|
||||
SELECT
|
||||
mt2.type_name AS typeName,
|
||||
mt1.type_name AS typeModelName,
|
||||
mt1.unit_name AS unitName,
|
||||
SUM(IFNULL( rad.repair_num, 0 )) as backNum,
|
||||
SUM(IFNULL( rad.repaired_num, 0 )) as repairedNum,
|
||||
SUM(IFNULL( rad.scrap_num, 0 )) as pendingScrapNum,
|
||||
SUM(IFNULL( rad.repair_num, 0 ) - IFNULL( rad.repaired_num, 0 )- IFNULL( rad.scrap_num, 0 )) as pendingRepairNum,
|
||||
rad.create_time as backTime,
|
||||
a.create_time as repairTime,
|
||||
bu.unit_name as leaseUnitName,
|
||||
bp.pro_name as leaseProjectName,
|
||||
rad.repairer as repairPersonName,
|
||||
tt.`code` as code,
|
||||
rad.task_id as taskId,
|
||||
rad.type_id as typeId,
|
||||
mt1.manage_type as manageType
|
||||
FROM
|
||||
repair_apply_details rad
|
||||
LEFT JOIN ma_type mt1 ON rad.type_id = mt1.type_id
|
||||
AND mt1.del_flag = '0'
|
||||
LEFT JOIN ma_type mt2 ON mt1.parent_id = mt2.type_id
|
||||
AND mt2.del_flag = '0'
|
||||
LEFT JOIN (SELECT task_id, type_id, MAX(create_time) as create_time FROM repair_apply_record
|
||||
GROUP BY task_id, type_id) a ON rad.task_id = a.task_id
|
||||
AND rad.type_id = a.type_id
|
||||
LEFT JOIN tm_task tt on rad.task_id = tt.task_id
|
||||
LEFT JOIN tm_task_agreement tta ON rad.task_id = tta.task_id
|
||||
LEFT JOIN bm_agreement_info ba ON tta.agreement_id = ba.agreement_id
|
||||
LEFT JOIN bm_unit bu ON ba.unit_id = bu.unit_id
|
||||
LEFT JOIN bm_project bp ON ba.project_id = bp.pro_id
|
||||
WHERE
|
||||
1 = 1
|
||||
<if test="keyWord != null and keyWord != ''">
|
||||
AND (
|
||||
mt2.type_name LIKE CONCAT('%', #{keyWord}, '%')
|
||||
OR mt1.type_name LIKE CONCAT('%', #{keyWord}, '%')
|
||||
OR bu.unit_name LIKE CONCAT('%', #{keyWord}, '%')
|
||||
OR bp.pro_name LIKE CONCAT('%', #{keyWord}, '%')
|
||||
OR rad.repairer LIKE CONCAT('%', #{keyWord}, '%')
|
||||
)
|
||||
</if>
|
||||
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
|
||||
<![CDATA[and DATE_FORMAT( rad.create_time, '%Y-%m-%d' ) BETWEEN #{startTime} AND #{endTime} ]]>
|
||||
</if>
|
||||
GROUP BY rad.task_id, rad.type_id
|
||||
</select>
|
||||
|
||||
<select id="getRepairDetailsList" resultType="com.bonus.material.basic.domain.report.RepairDetails">
|
||||
SELECT
|
||||
mt2.type_name AS typeName,
|
||||
mt1.type_name AS typeModelName,
|
||||
mm.ma_code AS maCode,
|
||||
a.repairer AS repairPersonName,
|
||||
MAX( rar.create_time ) AS repairTime
|
||||
FROM
|
||||
repair_apply_record rar
|
||||
LEFT JOIN ma_type mt1 ON rar.type_id = mt1.type_id
|
||||
AND mt1.del_flag = '0'
|
||||
LEFT JOIN ma_type mt2 ON mt1.parent_id = mt2.type_id
|
||||
AND mt2.del_flag = '0'
|
||||
LEFT JOIN ma_machine mm ON rar.ma_id = mm.ma_id
|
||||
LEFT JOIN ( SELECT task_id, type_id, GROUP_CONCAT( DISTINCT repairer ) AS repairer FROM repair_apply_details GROUP BY task_id, type_id ) a ON a.task_id = rar.task_id
|
||||
AND a.type_id = rar.type_id
|
||||
WHERE
|
||||
rar.task_id = #{taskId} and rar.type_id = #{typeId}
|
||||
<if test="keyWord != null and keyWord != ''">
|
||||
AND (
|
||||
mt2.type_name LIKE CONCAT('%', #{keyWord}, '%')
|
||||
OR mt1.type_name LIKE CONCAT('%', #{keyWord}, '%')
|
||||
OR mm.ma_code LIKE CONCAT('%', #{keyWord}, '%')
|
||||
)
|
||||
</if>
|
||||
GROUP BY mm.ma_id
|
||||
</select>
|
||||
|
||||
<select id="getRepairInputList" resultType="com.bonus.material.basic.domain.report.RepairInputDto">
|
||||
SELECT
|
||||
mt2.type_name AS typeName,
|
||||
mt1.type_name AS typeModelName,
|
||||
mt1.unit_name AS unitName,
|
||||
SUM(IFNULL( rid.repair_num, 0 )) as repairedNum,
|
||||
SUM(IFNULL( rid.input_num, 0 )) as inputNum,
|
||||
rid.create_time as repairTime,
|
||||
a.create_time as inputTime,
|
||||
a.creator as inputPersonName,
|
||||
SUM(IFNULL( rid.repair_num, 0 ) - IFNULL( rid.input_num, 0 )) as pendingInputNum,
|
||||
tt.`code` as code,
|
||||
rid.task_id as taskId,
|
||||
rid.type_id as typeId,
|
||||
mt1.manage_type as manageType
|
||||
FROM
|
||||
repair_input_details rid
|
||||
LEFT JOIN ma_type mt1 ON rid.type_id = mt1.type_id
|
||||
AND mt1.del_flag = '0'
|
||||
LEFT JOIN ma_type mt2 ON mt1.parent_id = mt2.type_id
|
||||
AND mt2.del_flag = '0'
|
||||
LEFT JOIN tm_task tt on rid.task_id = tt.task_id
|
||||
LEFT JOIN ( SELECT task_id, type_id, GROUP_CONCAT( DISTINCT creator ) AS creator, MAX( create_time ) AS create_time FROM bm_storage_log GROUP BY task_id, type_id) a ON rid.task_id = a.task_id
|
||||
AND rid.type_id = a.type_id
|
||||
WHERE
|
||||
1 = 1
|
||||
<if test="keyWord != null and keyWord != ''">
|
||||
AND (
|
||||
mt2.type_name LIKE CONCAT('%', #{keyWord}, '%')
|
||||
OR mt1.type_name LIKE CONCAT('%', #{keyWord}, '%')
|
||||
OR tt.`code` LIKE CONCAT('%', #{keyWord}, '%')
|
||||
OR a.creator LIKE CONCAT('%', #{keyWord}, '%')
|
||||
)
|
||||
</if>
|
||||
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
|
||||
<![CDATA[and DATE_FORMAT( rid.create_time, '%Y-%m-%d' ) BETWEEN #{startTime} AND #{endTime} ]]>
|
||||
</if>
|
||||
GROUP BY rid.task_id,rid.type_id
|
||||
</select>
|
||||
|
||||
<select id="getRepairInputDetailsList" resultType="com.bonus.material.basic.domain.report.RepairInputDetails">
|
||||
SELECT
|
||||
mt2.type_name as typeName,
|
||||
mt1.type_name as typeModelName,
|
||||
mm.ma_code as maCode,
|
||||
bsl.creator as inputPersonName,
|
||||
bsl.create_time as inputTime
|
||||
FROM
|
||||
repair_input_details rid
|
||||
LEFT JOIN ma_type mt1 ON rid.type_id = mt1.type_id
|
||||
AND mt1.del_flag = '0'
|
||||
LEFT JOIN ma_type mt2 ON mt1.parent_id = mt2.type_id
|
||||
AND mt2.del_flag = '0'
|
||||
LEFT JOIN ma_machine mm ON rid.ma_id = mm.ma_id
|
||||
LEFT JOIN bm_storage_log bsl ON rid.task_id = bsl.task_id
|
||||
AND rid.type_id = bsl.type_id
|
||||
WHERE
|
||||
rid.task_id = #{taskId} and rid.type_id = #{typeId}
|
||||
<if test="keyWord != null and keyWord != ''">
|
||||
AND (
|
||||
mt2.type_name LIKE CONCAT('%', #{keyWord}, '%')
|
||||
OR mt1.type_name LIKE CONCAT('%', #{keyWord}, '%')
|
||||
OR mm.ma_code LIKE CONCAT('%', #{keyWord}, '%')
|
||||
)
|
||||
</if>
|
||||
GROUP BY mm.ma_id
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue