Merge remote-tracking branch 'origin/master'

This commit is contained in:
mashuai 2026-01-14 17:44:13 +08:00
commit 724d9214eb
15 changed files with 428 additions and 18 deletions

View File

@ -0,0 +1,87 @@
package com.bonus.common.biz.domain.lease;
import com.bonus.common.biz.domain.BmFileInfo;
import com.bonus.common.core.annotation.Excel;
import com.bonus.common.core.web.domain.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import java.util.Set;
/**
* 领料任务对象 lease_apply_info
*
* @author xsheng
* @date 2024-10-16
*/
@EqualsAndHashCode(callSuper = false)
@Data
@ToString
public class LeaseApplyQuery extends BaseEntity{
private static final long serialVersionUID = 1L;
/** ID */
private Long id;
@ApiModelProperty(value = "协议号")
@Excel(name = "协议号")
private String agreementCode;
@ApiModelProperty(value = "分公司")
@Excel(name = "分公司")
private String deptName;
@ApiModelProperty(value = "单位名称")
@Excel(name = "单位名称")
private String unitName;
@ApiModelProperty(value = "工程名称")
@Excel(name = "工程名称")
private String proName;
@ApiModelProperty(value = "物资名称")
@Excel(name = "物资名称")
private String typeName;
@ApiModelProperty(value = "规格型号")
@Excel(name = "规格型号")
private String modelName;
@ApiModelProperty(value = "出库数量")
@Excel(name = "出库数量")
private String outNum;
@ApiModelProperty(value = "物资编码")
@Excel(name = "物资编码")
private String maCode;
@ApiModelProperty(value = "出库日期")
@Excel(name = "出库日期")
private String outTime;
@ApiModelProperty(value = "机具类型")
@Excel(name = "机具类型")
private String jijuType;
@ApiModelProperty(value = "领料单号")
@Excel(name = "领料单号")
private String code;
@ApiModelProperty(value = "领料人")
@Excel(name = "领料人")
private String leasePerson;
private String keyWord;
private Long companyId;
private String startTime;
private String endTime;
}

View File

@ -11,6 +11,7 @@ import javax.validation.constraints.NotNull;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.convert.Convert;
import com.bonus.common.biz.config.ListPagingUtil;
import com.bonus.common.biz.domain.lease.LeaseApplyQuery;
import com.bonus.common.core.exception.ServiceException;
import com.bonus.common.core.utils.DateUtils;
import com.bonus.common.core.utils.ServletUtils;
@ -736,6 +737,31 @@ public class BackApplyInfoController extends BaseController {
util.exportExcel(response, list, fileName, title);
}
/**
* 查询退料任务列表
*/
@ApiOperation(value = "查询退料查询列表")
// @RequiresPermissions("back:info:list")
@GetMapping("/queryList")
public AjaxResult queryList(BackApplyQuery backApplyQuery) {
Long deptId = typeService.getUserDeptId();
backApplyQuery.setCompanyId(deptId);
Integer pageIndex = Convert.toInt(ServletUtils.getParameter("pageNum"), 1);
Integer pageSize = Convert.toInt(ServletUtils.getParameter("pageSize"), 10);
List<BackApplyQuery> list = backApplyInfoService.selectBackApplyQueryList(backApplyQuery);
return AjaxResult.success(ListPagingUtil.paging(pageIndex, pageSize, list));
}
@ApiOperation(value = "导出退料查询列表")
@PreventRepeatSubmit
//@RequiresPermissions("lease:info:export")
@SysLog(title = "退料查询", businessType = OperaType.EXPORT, logType = 1,module = "仓储管理->导出退料查询")
@PostMapping("/exportBackQueryOutRecord")
public void exportBackQueryOutRecord(HttpServletResponse response, BackApplyQuery backApplyQuery) {
Long deptId = typeService.getUserDeptId();
backApplyQuery.setCompanyId(deptId);
List<BackApplyQuery> list = backApplyInfoService.selectBackApplyQueryList(backApplyQuery);
ExcelUtil<BackApplyQuery> util = new ExcelUtil<>(BackApplyQuery.class);
util.exportExcel(response, list, "退料查询");
}
}

View File

@ -0,0 +1,82 @@
package com.bonus.material.back.domain.vo;
import com.bonus.common.biz.domain.lease.LeaseOutSign;
import com.bonus.common.core.annotation.Excel;
import com.bonus.common.core.web.domain.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;
import lombok.experimental.Accessors;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
/**
* 退料任务对象 back_apply_info
*
* @author xsheng
* @date 2024-10-16
*/
@Accessors(chain = true)
@Data
@ToString
public class BackApplyQuery extends BaseEntity {
private static final long serialVersionUID = 1L;
/** ID */
private Long id;
@ApiModelProperty(value = "协议号")
@Excel(name = "协议号")
private String agreementCode;
@ApiModelProperty(value = "分公司")
@Excel(name = "分公司")
private String deptName;
@ApiModelProperty(value = "单位名称")
@Excel(name = "单位名称")
private String unitName;
@ApiModelProperty(value = "工程名称")
@Excel(name = "工程名称")
private String proName;
@ApiModelProperty(value = "退料单号")
@Excel(name = "退料单号")
private String code;
@ApiModelProperty(value = "物资名称")
@Excel(name = "物资名称")
private String typeName;
@ApiModelProperty(value = "规格型号")
@Excel(name = "规格型号")
private String modelName;
@ApiModelProperty(value = "退料数量")
@Excel(name = "退料数量")
private String backNum;
@ApiModelProperty(value = "退料日期")
@Excel(name = "退料日期")
private String inTime;
@ApiModelProperty(value = "机具类型")
@Excel(name = "机具类型")
private String jijuType;
private String leasePerson;
private String keyWord;
private Long companyId;
private String startTime;
private String endTime;
}

View File

@ -6,10 +6,7 @@ import java.util.List;
import com.bonus.common.core.web.domain.AjaxResult;
import com.bonus.material.back.domain.*;
import com.bonus.material.back.domain.vo.BackApplyInfoVo;
import com.bonus.material.back.domain.vo.BackApplyVo;
import com.bonus.material.back.domain.vo.BackExportDetailsVo;
import com.bonus.material.back.domain.vo.MaCodeVo;
import com.bonus.material.back.domain.vo.*;
import com.bonus.material.basic.domain.BmAgreementInfo;
import com.bonus.material.clz.domain.back.MaterialBackApplyDetails;
import com.bonus.material.settlement.domain.SltAgreementInfo;
@ -584,4 +581,6 @@ public interface BackApplyInfoMapper {
* @return
*/
List<SltAgreementInfo> getXmInfoList(BackApplyInfo bean);
List<BackApplyQuery> selectBackApplyQueryList(BackApplyQuery backApplyQuery);
}

View File

@ -272,5 +272,8 @@ public interface IBackApplyInfoService {
* @return
*/
List<BackExportDetailsVo> exportBackDetailsList(BackApplyInfo dto);
List<BackApplyQuery> selectBackApplyQueryList(BackApplyQuery backApplyQuery);
}

View File

@ -10,6 +10,7 @@ import com.alibaba.nacos.common.utils.CollectionUtils;
import com.bonus.common.biz.constant.GlobalConstants;
import com.bonus.common.biz.constant.MaterialConstants;
import com.bonus.common.biz.domain.TypeTreeNode;
import com.bonus.common.biz.domain.lease.LeaseApplyQuery;
import com.bonus.common.biz.domain.lease.LeaseOutDetails;
import com.bonus.common.biz.domain.lease.LeaseOutSign;
import com.bonus.common.biz.enums.*;
@ -446,6 +447,11 @@ public class BackApplyInfoServiceImpl implements IBackApplyInfoService {
}
}
@Override
public List<BackApplyQuery> selectBackApplyQueryList(BackApplyQuery backApplyQuery) {
return backApplyInfoMapper.selectBackApplyQueryList(backApplyQuery);
}
/**
* 检查是否有编码设备
*/

View File

@ -4,10 +4,13 @@ import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.bonus.common.log.enums.OperaType;
import com.bonus.material.basic.domain.BmUnitPerson;
import com.bonus.material.basic.service.IBmUnitPersonService;
import com.bonus.material.common.annotation.PreventRepeatSubmit;
import com.bonus.material.ma.service.ITypeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
@ -44,6 +47,9 @@ public class BmUnitController extends BaseController
@Autowired
private ITypeService typeService;
@Autowired
private IBmUnitPersonService bmUnitPersonService;
/**
* 查询往来单位管理列表
*/
@ -69,7 +75,11 @@ public class BmUnitController extends BaseController
{
Long deptId = typeService.getUserDeptId();
bmUnit.setCompanyId(deptId);
List<BmUnit> list = bmUnitService.selectBmUnitList(bmUnit);
// List<BmUnit> list = bmUnitService.selectBmUnitList(bmUnit);
BmUnitPerson bmUnitPerson = new BmUnitPerson();
bmUnitPerson.setCompanyId(deptId+"");
BeanUtils.copyProperties(bmUnit, bmUnitPerson);
List<BmUnit> list = bmUnitPersonService.selectBmUnitList(bmUnitPerson);
ExcelUtil<BmUnit> util = new ExcelUtil<BmUnit>(BmUnit.class);
util.exportExcel(response, list, "往来单位管理数据");
}

View File

@ -176,7 +176,7 @@ public class LeaseApplyInfoController extends BaseController {
@PreventRepeatSubmit
//@RequiresPermissions("lease:info:export")
@SysLog(title = "领料出库", businessType = OperaType.EXPORT, logType = 1,module = "仓储管理->导出领料出库")
@PostMapping("/exportLeaseOutRecord")
@PostMapping("/back_apply_info")
public void exportLeaseOutRecord(HttpServletResponse response, LeaseApplyInfo leaseApplyInfo) {
Long deptId = typeService.getUserDeptId();
leaseApplyInfo.setCompanyId(deptId);
@ -605,4 +605,32 @@ public class LeaseApplyInfoController extends BaseController {
public AjaxResult updateLeaseNum(@RequestBody LeaseApplyDetails leaseApplyDetails) {
return leaseApplyInfoService.updateLeaseNum(leaseApplyDetails);
}
/**
* 查询领料任务列表
*/
@ApiOperation(value = "查询领料查询列表")
@GetMapping("/queryList")
public AjaxResult queryList(LeaseApplyQuery leaseApplyQuery) {
Long deptId = typeService.getUserDeptId();
leaseApplyQuery.setCompanyId(deptId);
Integer pageIndex = Convert.toInt(ServletUtils.getParameter("pageNum"), 1);
Integer pageSize = Convert.toInt(ServletUtils.getParameter("pageSize"), 10);
List<LeaseApplyQuery> list = leaseApplyInfoService.selectLeaseApplyQueryList(leaseApplyQuery);
return AjaxResult.success(ListPagingUtil.paging(pageIndex, pageSize, list));
}
@ApiOperation(value = "导出领料查询列表")
@PreventRepeatSubmit
//@RequiresPermissions("lease:info:export")
@SysLog(title = "领料查询", businessType = OperaType.EXPORT, logType = 1,module = "仓储管理->导出领料查询")
@PostMapping("/exportLeaseQueryOutRecord")
public void exportLeaseQueryOutRecord(HttpServletResponse response, LeaseApplyQuery leaseApplyQuery) {
Long deptId = typeService.getUserDeptId();
leaseApplyQuery.setCompanyId(deptId);
List<LeaseApplyQuery> list = leaseApplyInfoService.selectLeaseApplyQueryList(leaseApplyQuery);
List<LeaseApplyQuery> exportList = new ArrayList<>();
ExcelUtil<LeaseApplyQuery> util = new ExcelUtil<>(LeaseApplyQuery.class);
util.exportExcel(response, list, "领料查询");
}
}

View File

@ -2,10 +2,8 @@ package com.bonus.material.lease.mapper;
import java.math.BigDecimal;
import java.util.List;
import com.bonus.common.biz.domain.lease.LeaseApplyInfo;
import com.bonus.common.biz.domain.lease.LeaseConfirmSign;
import com.bonus.common.biz.domain.lease.LeaseOutDetails;
import com.bonus.common.biz.domain.lease.LeaseOutSign;
import com.bonus.common.biz.domain.lease.*;
import com.bonus.material.lease.domain.LeaseApplyDetails;
import org.apache.ibatis.annotations.Param;
@ -354,4 +352,11 @@ public interface LeaseApplyInfoMapper {
* @return
*/
List<LeaseApplyDetails> selectLeaseApplyInfoByParentId(Long id);
/**
*
* @param leaseApplyQuery
* @return
*/
List<LeaseApplyQuery> selectLeaseApplyQueryList(LeaseApplyQuery leaseApplyQuery);
}

View File

@ -3,14 +3,11 @@ package com.bonus.material.lease.service;
import java.util.Date;
import java.util.List;
import com.bonus.common.biz.domain.lease.LeaseApplyDetailExport;
import com.bonus.common.biz.domain.lease.LeaseOutDetails;
import com.bonus.common.biz.domain.lease.*;
import com.bonus.common.core.web.domain.AjaxResult;
import com.bonus.common.biz.domain.lease.LeaseApplyInfo;
import com.bonus.material.basic.domain.BmQrcodeInfo;
import com.bonus.material.lease.domain.LeaseApplyDetails;
import com.bonus.material.lease.domain.vo.LeaseApplyRequestVo;
import com.bonus.common.biz.domain.lease.LeaseOutRequestVo;
import org.apache.ibatis.annotations.Param;
import javax.servlet.http.HttpServletResponse;
@ -212,4 +209,6 @@ public interface ILeaseApplyInfoService {
List<LeaseApplyDetails> getOutInfo(LeaseApplyInfo bean);
List<LeaseApplyDetailExport> selectLeaseApplyDetailList(LeaseApplyInfo leaseApplyInfo);
List<LeaseApplyQuery> selectLeaseApplyQueryList(LeaseApplyQuery leaseApplyQuery);
}

View File

@ -1377,6 +1377,10 @@ public class LeaseApplyInfoServiceImpl implements ILeaseApplyInfoService {
return listAll;
}
@Override
public List<LeaseApplyQuery> selectLeaseApplyQueryList(LeaseApplyQuery leaseApplyQuery) {
return leaseApplyInfoMapper.selectLeaseApplyQueryList(leaseApplyQuery);
}
/**
* 关键字搜索

View File

@ -45,6 +45,7 @@ public class WarehousingServiceImpl implements WarehousingService {
@Resource
private TypeMapper typeMapper;
// @Autowired
// private PurchaseInputMapper purchaseInputMapper;
@ -61,6 +62,8 @@ public class WarehousingServiceImpl implements WarehousingService {
@Override
public List<SupplierInfo> selectMaSupplierInfoList(SupplierInfo maSupplierInfo)
{
Long companyId=typeService.getUserDeptId();
maSupplierInfo.setCompanyId(companyId+"");
return warehousingMapper.selectMaSupplierInfoList(maSupplierInfo);
}

View File

@ -1959,4 +1959,50 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</if>
order by start_time asc
</select>
<select id="selectBackApplyQueryList" parameterType="com.bonus.material.back.domain.vo.BackApplyQuery" resultType="com.bonus.material.back.domain.vo.BackApplyQuery">
SELECT
bai.agreement_code as agreementCode,
bc.task_id,
sd.dept_name as deptName,
bu.unit_name as unitName,
bp.pro_name as proName,
bc.`code` as code,
mt2.type_name as typeName,
mt.type_name as modelName,
bcd.back_num as backNum,
bcd.create_time as inTime,
bc.print_status,
mt.jiju_type AS jijuType
FROM
back_check_details bcd
LEFT JOIN back_apply_info bc on bcd.parent_id = bc.id
LEFT JOIN ma_type mt on bcd.type_id = mt.type_id
LEFT JOIN ma_type mt2 on mt.parent_id = mt2.type_id
LEFT JOIN tm_task_agreement tta on bc.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 sys_dept sd on bp.imp_unit = sd.dept_id
WHERE bc.direct_id IS NULL
<if test="startTime != null and startTime != ''">
and SUBSTR(bcd.create_time,1,10)>=#{startTime}
</if>
<if test="endTime != null and endTime != ''">
and #{endTime}>=SUBSTR(bcd.create_time,1,10)
</if>
<if test="deptName != null and deptName != ''">
and sd.dept_name like concat('%', #{deptName} ,'%')
</if>
<if test="proName != null and proName != ''">
and bp.pro_name like concat('%', #{proName} ,'%')
</if>
<if test="keyWord != null and keyWord != ''">
and ( bp2.pro_name like concat('%', #{keyWord} ,'%')
or sd.dept_name like concat('%', #{keyWord} ,'%')
or mt2.type_name like concat('%', #{keyWord} ,'%')
or mt.type_name like concat('%', #{keyWord} ,'%'))
</if>
</select>
</mapper>

View File

@ -1344,4 +1344,111 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
mt.is_rs = 1
AND lad.parent_id = #{id}
</select>
<select id="selectLeaseApplyQueryList" parameterType="com.bonus.common.biz.domain.lease.LeaseApplyQuery" resultType="com.bonus.common.biz.domain.lease.LeaseApplyQuery">
SELECT
bai.agreement_code AS agreementcode,
lod.parent_id as parentid,
sd2.dept_name as deptname,
bu2.unit_name as unitname,
bp2.pro_name as proname,
mt2.type_name as typename,
mt.type_name as modeltype,
lod.out_num as outnum,
mm.ma_code as macode,
lod.create_time as outTime,
mt.jiju_type as jijutype,
lai.`code` as code,
lai.lease_person as leaseperson,
lod.publish_task as publishtask,
lai.direct_id as directid,
lod.publish_task as publishtaskt
FROM
lease_out_details lod
LEFT JOIN lease_apply_info lai on lod.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 bu2 on bai.unit_id = bu2.unit_id
LEFT JOIN bm_project bp2 on bai.project_id = bp2.pro_id
LEFT JOIN sys_dept sd2 on bp2.imp_unit = sd2.dept_id
LEFT JOIN ma_type mt on lod.type_id = mt.type_id
LEFT JOIN ma_type mt2 on mt.parent_id = mt2.type_id
LEFT JOIN ma_machine mm on mm.ma_id = lod.ma_id
WHERE mt.jiju_type =1 and lod.publish_task is null
<if test="startTime != null and startTime != ''">
and SUBSTR(lod.create_time,1,10)>=#{startTime}
</if>
<if test="endTime != null and endTime != ''">
and #{endTime}>=SUBSTR(lod.create_time,1,10)
</if>
<if test="deptName != null and deptName != ''">
and sd2.dept_name like concat('%', #{deptName} ,'%')
</if>
<if test="proName != null and proName != ''">
and bp2.pro_name like concat('%', #{proName} ,'%')
</if>
<if test="leasePerson != null and leasePerson != ''">
and lai.lease_person like concat('%', #{leasePerson} ,'%')
</if>
<if test="keyWord != null and keyWord != ''">
and ( bp2.pro_name like concat('%', #{keyWord} ,'%')
or sd2.dept_name like concat('%', #{keyWord} ,'%')
or mt2.type_name like concat('%', #{keyWord} ,'%')
or mt.type_name like concat('%', #{keyWord} ,'%'))
</if>
GROUP BY lod.ID
UNION
SELECT
bai.agreement_code as agreementcode,
lod.parent_id as parentid,
sd2.dept_name as deptname,
bu2.unit_name as unitname,
bp2.pro_name as proname,
mt2.type_name as typename,
mt.type_name as modelname,
lod.out_num as outnum,
mm.ma_code as macode,
lod.create_time as outTime,
mt.jiju_type as jijutype,
lpd.`code` as code,
lpd.lease_person as leaseperson,
lod.publish_task as publishtask,
null as directid,
lpd.publish_task as publishtaskt
FROM
lease_out_details lod
LEFT JOIN lease_publish_details lpd on lod.publish_task = lpd.publish_task
LEFT JOIN bm_unit bu2 on lpd.unit_id = bu2.unit_id
LEFT JOIN bm_project bp2 on lpd.project_id = bp2.pro_id
LEFT JOIN bm_agreement_info bai on lpd.unit_id = bai.unit_id and lpd.project_id = bai.project_id
LEFT JOIN sys_dept sd2 on bp2.imp_unit = sd2.dept_id
LEFT JOIN ma_type mt on lod.type_id = mt.type_id
LEFT JOIN ma_type mt2 on mt.parent_id = mt2.type_id
LEFT JOIN ma_machine mm on mm.ma_id = lod.ma_id
WHERE mt.jiju_type =1 and lod.publish_task is not null
<if test="startTime != null and startTime != ''">
and SUBSTR(lod.create_time,1,10)>=#{startTime}
</if>
<if test="endTime != null and endTime != ''">
and #{endTime}>=SUBSTR(lod.create_time,1,10)
</if>
<if test="deptName != null and deptName != ''">
and sd2.dept_name like concat('%', #{deptName} ,'%')
</if>
<if test="proName != null and proName != ''">
and bp2.pro_name like concat('%', #{proName} ,'%')
</if>
<if test="leasePerson != null and leasePerson != ''">
and lpd.lease_person like concat('%', #{leasePerson} ,'%')
</if>
<if test="keyWord != null and keyWord != ''">
and ( bp2.pro_name like concat('%', #{keyWord} ,'%')
or sd2.dept_name like concat('%', #{keyWord} ,'%')
or mt2.type_name like concat('%', #{keyWord} ,'%')
or mt.type_name like concat('%', #{keyWord} ,'%'))
</if>
GROUP BY lod.ID
</select>
</mapper>

View File

@ -37,6 +37,11 @@
supplier_id as supplierId ,
supplier as supplier
FROM ma_supplier_info
<where>
<if test="companyId !=null and companyId !=''">
and company_id = #{companyId}
</if>
</where>
</select>
<select id="selectByMaCode" resultType="java.lang.Integer">