jsk 领料查询
This commit is contained in:
parent
03e3493bdb
commit
6ca468fbf1
|
|
@ -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;
|
||||
|
||||
}
|
||||
|
|
@ -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;
|
||||
|
||||
}
|
||||
|
|
@ -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, "领料查询");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1376,7 +1376,11 @@ public class LeaseApplyInfoServiceImpl implements ILeaseApplyInfoService {
|
|||
}
|
||||
return listAll;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public List<LeaseApplyQuery> selectLeaseApplyQueryList(LeaseApplyQuery leaseApplyQuery) {
|
||||
return leaseApplyInfoMapper.selectLeaseApplyQueryList(leaseApplyQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 关键字搜索
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Reference in New Issue