重庆需求变更代码提交

This commit is contained in:
liang.chao 2024-09-26 18:10:05 +08:00
parent 2b9ea77516
commit b28c58aa76
12 changed files with 238 additions and 8 deletions

View File

@ -477,7 +477,7 @@ public class TmTaskController extends BaseController {
* @return 列表 * @return 列表
*/ */
@Log(title = "查询单个领料出库详情- app/web", businessType = BusinessType.QUERY) @Log(title = "查询单个领料出库详情- app/web", businessType = BusinessType.QUERY)
@GetMapping(value = "getLeaseAuditListDetail") @GetMapping(value = "/getLeaseAuditListDetail")
public AjaxResult getLeaseAuditListDetail(TmTask task) { public AjaxResult getLeaseAuditListDetail(TmTask task) {
if (StringUtils.isNull(task)) { if (StringUtils.isNull(task)) {
return AjaxResult.error("参数错误"); return AjaxResult.error("参数错误");
@ -497,13 +497,33 @@ public class TmTaskController extends BaseController {
} }
} }
@Log(title = "领料出库详情记录", businessType = BusinessType.QUERY)
@GetMapping(value = "/getLeaseOutDetailRecord")
public AjaxResult getLeaseOutDetailRecord(TmTask task) {
if (StringUtils.isNull(task)) {
return AjaxResult.error("参数错误");
}
List<TmTask> leaseAuditList = tmTaskService.getLeaseOutDetailRecord(task);
return AjaxResult.success(leaseAuditList);
}
@Log(title = "导出领料出库详情明细记录", businessType = BusinessType.EXPORT)
@PostMapping(value = "/exportLeaseOutDetailRecord")
public void exportLeaseOutDetailRecord(HttpServletResponse response, TmTask task) {
List<TmTask> leaseAuditList = tmTaskService.getLeaseOutDetailRecord(task);
List<LeaseOutDetailRecord> tmTaskDtos = Convert.toList(LeaseOutDetailRecord.class, leaseAuditList);
ExcelUtil<LeaseOutDetailRecord> util = new ExcelUtil<LeaseOutDetailRecord>(LeaseOutDetailRecord.class);
util.exportExcel(response, tmTaskDtos, "领料出库明细记录");
}
/** /**
* 导出领料出库列表 * 导出领料出库列表
* *
* @param task 筛选条件 * @param task 筛选条件
* @return 列表 * @return 列表
*/ */
@Log(title = "导出领料出库列表", businessType = BusinessType.QUERY) @Log(title = "导出领料出库列表", businessType = BusinessType.EXPORT)
@PostMapping(value = "export") @PostMapping(value = "export")
public void export(HttpServletResponse response, TmTask task) { public void export(HttpServletResponse response, TmTask task) {

View File

@ -0,0 +1,30 @@
package com.bonus.sgzb.app.domain;
import com.bonus.sgzb.common.core.annotation.Excel;
import lombok.Data;
/**
* @Authorliang.chao
* @Date2024/9/26 - 18:01
*/
@Data
public class LeaseOutDetailRecord {
@Excel(name = "规格型号")
private String typeModelName;
@Excel(name = "类型名称")
private String typeName;
private String maCode;
@Excel(name = "出库时间")
private String createTime;
@Excel(name = "出库数量")
private String outNum;
@Excel(name = "出库人")
private String userName;
}

View File

@ -147,4 +147,6 @@ public interface TmTaskMapper {
int updateLeaseApplyInfoRejectInfoCq(@Param("record") LeaseApplyInfo leaseApplyInfo); int updateLeaseApplyInfoRejectInfoCq(@Param("record") LeaseApplyInfo leaseApplyInfo);
int updateLeaseApplyInfoAuditInfoCq(@Param("record") LeaseApplyInfo leaseApplyInfo); int updateLeaseApplyInfoAuditInfoCq(@Param("record") LeaseApplyInfo leaseApplyInfo);
List<TmTask> getLeaseOutDetailRecord(TmTask record);
} }

View File

@ -27,6 +27,7 @@ public interface TmTaskService{
List<TmTask> getLeaseAuditList(TmTask record); List<TmTask> getLeaseAuditList(TmTask record);
List<TmTask> getLeaseAuditListByOne(TmTask record); List<TmTask> getLeaseAuditListByOne(TmTask record);
List<TmTask> getLeaseOutDetailRecord(TmTask record);
List<TmTask> getLeaseAuditListByAdmin(TmTask record); List<TmTask> getLeaseAuditListByAdmin(TmTask record);

View File

@ -270,6 +270,11 @@ public class TmTaskServiceImpl implements TmTaskService {
return leaseDetailByParentId; return leaseDetailByParentId;
} }
@Override
public List<TmTask> getLeaseOutDetailRecord(TmTask record) {
return tmTaskMapper.getLeaseOutDetailRecord(record);
}
/** /**
* 创建审批流领料申请 * 创建审批流领料申请
* *

View File

@ -6,6 +6,7 @@ import com.bonus.sgzb.common.core.web.domain.AjaxResult;
import com.bonus.sgzb.common.log.annotation.Log; import com.bonus.sgzb.common.log.annotation.Log;
import com.bonus.sgzb.common.log.enums.BusinessType; import com.bonus.sgzb.common.log.enums.BusinessType;
import com.bonus.sgzb.material.domain.InputRecord; import com.bonus.sgzb.material.domain.InputRecord;
import com.bonus.sgzb.material.domain.OutRecord;
import com.bonus.sgzb.material.domain.ScrapRecord; import com.bonus.sgzb.material.domain.ScrapRecord;
import com.bonus.sgzb.material.service.InputRecordService; import com.bonus.sgzb.material.service.InputRecordService;
import com.bonus.sgzb.material.service.ScrapRecordService; import com.bonus.sgzb.material.service.ScrapRecordService;
@ -21,10 +22,10 @@ import javax.servlet.http.HttpServletResponse;
import java.util.List; import java.util.List;
/** /**
* @description 综合查询--机具入库查询 * @author hay
* @author hay * @description 综合查询--机具入库查询
* @date 2024/2/26 14:15 * @date 2024/2/26 14:15
*/ */
@Api(tags = "综合查询--机具入库查询") @Api(tags = "综合查询--机具入库查询")
@RestController @RestController
@RequestMapping("/inputRecord") @RequestMapping("/inputRecord")
@ -43,17 +44,33 @@ public class InputRecordController extends BaseController {
return AjaxResult.success(getDataTable(list)); return AjaxResult.success(getDataTable(list));
} }
@ApiOperation(value = "综合查询--机具出库查询列表")
@GetMapping("/getOutputRecordList")
public AjaxResult getOutputRecordList(OutRecord bean) {
startPage();
List<OutRecord> list = inputRecordService.getOutputRecordList(bean);
return AjaxResult.success(getDataTable(list));
}
/** /**
* 导出综合查询机具入库查询列表 * 导出综合查询机具入库查询列表
*/ */
@ApiOperation("导出综合查询机具入库查询列表") @ApiOperation("导出综合查询机具入库查询列表")
@Log(title = "导出综合查询机具入库查询列表", businessType = BusinessType.EXPORT) @Log(title = "导出综合查询机具入库查询列表", businessType = BusinessType.EXPORT)
@PostMapping("/export") @PostMapping("/export")
public void export(HttpServletResponse response, InputRecord bean) public void exInputport(HttpServletResponse response, InputRecord bean) {
{
List<InputRecord> list = inputRecordService.getInputRecordList(bean); List<InputRecord> list = inputRecordService.getInputRecordList(bean);
ExcelUtil<InputRecord> util = new ExcelUtil<InputRecord>(InputRecord.class); ExcelUtil<InputRecord> util = new ExcelUtil<InputRecord>(InputRecord.class);
util.exportExcel(response, list, "综合查询--入库记录"); util.exportExcel(response, list, "综合查询--入库记录");
} }
@ApiOperation("导出综合查询机具出库查询列表")
@Log(title = "导出综合查询机具出库查询列表", businessType = BusinessType.EXPORT)
@PostMapping("/exOutputport")
public void exOutputport(HttpServletResponse response, OutRecord bean) {
List<OutRecord> list = inputRecordService.getOutputRecordList(bean);
ExcelUtil<OutRecord> util = new ExcelUtil<OutRecord>(OutRecord.class);
util.exportExcel(response, list, "综合查询--出库记录");
}
} }

View File

@ -0,0 +1,80 @@
package com.bonus.sgzb.material.domain;
import com.bonus.sgzb.common.core.annotation.Excel;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
/**
* @author hay
* @description 综合查询--机具入库查询
* @date 2024/2/26 14:51
*/
@ApiModel(description = "机具出库查询")
@Data
public class OutRecord {
private static final long serialVersionUID = 2227217051604273598L;
@ApiModelProperty(value = "领料单号")
@Excel(name = "领料单号")
private String code;
@ApiModelProperty(value = "工程名称")
@Excel(name = "工程名称")
private String lotName;
@ApiModelProperty(value = "单位id")
private String unitId;
@ApiModelProperty(value = "工程id")
private String lotId;
@ApiModelProperty(value = "领料单位")
@Excel(name = "领料单位")
private String unitName;
@ApiModelProperty(value = "规格型号")
@Excel(name = "规格型号")
private String typeModelName;
@ApiModelProperty(value = "机具名称")
@Excel(name = "机具名称")
private String typeName;
@ApiModelProperty(value = "设备编码")
@Excel(name = "设备编码")
private String maCode;
@ApiModelProperty(value = "出库时间")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "出库时间")
private Date createTime;
@ApiModelProperty(value = "出库数量")
@Excel(name = "出库数量")
private Integer outNum;
@ApiModelProperty(value = "设备状态")
@Excel(name = "设备状态")
private String maStauts;
@ApiModelProperty(value = "开始时间")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private String startTime;
@ApiModelProperty(value = "结束时间")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private String endTime;
@ApiModelProperty(value = "关键字")
private String keyWord;
}

View File

@ -1,6 +1,7 @@
package com.bonus.sgzb.material.mapper; package com.bonus.sgzb.material.mapper;
import com.bonus.sgzb.material.domain.InputRecord; import com.bonus.sgzb.material.domain.InputRecord;
import com.bonus.sgzb.material.domain.OutRecord;
import com.bonus.sgzb.material.domain.ScrapRecord; import com.bonus.sgzb.material.domain.ScrapRecord;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
@ -20,4 +21,6 @@ public interface InputRecordMapper {
* @return List<InputRecord> * @return List<InputRecord>
*/ */
List<InputRecord> getInputRecordList(InputRecord bean); List<InputRecord> getInputRecordList(InputRecord bean);
List<OutRecord> getOutputRecordList(OutRecord bean);
} }

View File

@ -1,6 +1,7 @@
package com.bonus.sgzb.material.service; package com.bonus.sgzb.material.service;
import com.bonus.sgzb.material.domain.InputRecord; import com.bonus.sgzb.material.domain.InputRecord;
import com.bonus.sgzb.material.domain.OutRecord;
import com.bonus.sgzb.material.domain.ScrapRecord; import com.bonus.sgzb.material.domain.ScrapRecord;
import java.util.List; import java.util.List;
@ -18,4 +19,5 @@ public interface InputRecordService {
* @return List<InputRecord> * @return List<InputRecord>
*/ */
List<InputRecord> getInputRecordList(InputRecord bean); List<InputRecord> getInputRecordList(InputRecord bean);
List<OutRecord> getOutputRecordList(OutRecord bean);
} }

View File

@ -1,6 +1,7 @@
package com.bonus.sgzb.material.service.impl; package com.bonus.sgzb.material.service.impl;
import com.bonus.sgzb.material.domain.InputRecord; import com.bonus.sgzb.material.domain.InputRecord;
import com.bonus.sgzb.material.domain.OutRecord;
import com.bonus.sgzb.material.domain.ScrapRecord; import com.bonus.sgzb.material.domain.ScrapRecord;
import com.bonus.sgzb.material.mapper.InputRecordMapper; import com.bonus.sgzb.material.mapper.InputRecordMapper;
import com.bonus.sgzb.material.mapper.ScrapRecordMapper; import com.bonus.sgzb.material.mapper.ScrapRecordMapper;
@ -26,4 +27,9 @@ public class InputRecordServiceImpl implements InputRecordService {
public List<InputRecord> getInputRecordList(InputRecord bean) { public List<InputRecord> getInputRecordList(InputRecord bean) {
return inputRecordMapper.getInputRecordList(bean); return inputRecordMapper.getInputRecordList(bean);
} }
@Override
public List<OutRecord> getOutputRecordList(OutRecord bean) {
return inputRecordMapper.getOutputRecordList(bean);
}
} }

View File

@ -1193,4 +1193,25 @@
left join ma_type mt3 on mt2.parent_id = mt3.type_id left join ma_type mt3 on mt2.parent_id = mt3.type_id
where lod.id = #{id} where lod.id = #{id}
</select> </select>
<select id="getLeaseOutDetailRecord" resultType="com.bonus.sgzb.app.domain.TmTask">
SELECT
mt.type_name typeModelName,
mt2.type_name typeName,
mm.ma_code maCode,
lod.create_time createTime,
lod.out_num outNum,
su.nick_name userName
FROM
lease_out_details lod
LEFT JOIN ma_type mt ON lod.type_id = mt.type_id
LEFT JOIN ma_type mt2 ON mt2.type_id = mt.parent_id
LEFT JOIN ma_machine mm ON mm.ma_id = lod.ma_id
left join ma_type_keeper mtk on mtk.type_id = lod.type_id
left join sys_user su on mtk.user_id = su.user_id
WHERE
lod.parent_id = #{id} and lod.type_id = #{typeId}
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
AND lod.create_time BETWEEN CONCAT(#{startTime}, ' 00:00:00') AND CONCAT(#{endTime}, ' 23:59:59')
</if>
</select>
</mapper> </mapper>

View File

@ -50,4 +50,47 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
AND iad.create_time BETWEEN CONCAT(#{startTime}, ' 00:00:00') AND CONCAT(#{endTime}, ' 23:59:59') AND iad.create_time BETWEEN CONCAT(#{startTime}, ' 00:00:00') AND CONCAT(#{endTime}, ' 23:59:59')
</if> </if>
</select> </select>
<select id="getOutputRecordList" resultType="com.bonus.sgzb.material.domain.OutRecord">
SELECT
lai.code,
bpl.lot_name,
bui.unit_name,
mt.type_name as typeModelName,
mt2.type_name as typeName,
mm.ma_code,
lod.create_time,
lod.out_num,
sd.name as maStauts
FROM
lease_out_details lod
LEFT JOIN lease_apply_info lai ON lod.parent_id = lai.id
LEFT JOIN tm_task tt ON tt.task_id = lai.task_id
LEFT JOIN tm_task_agreement tta ON tta.task_id = tt.task_id
LEFT JOIN bm_agreement_info bagi ON bagi.agreement_id = tta.agreement_id
LEFT JOIN bm_project_lot bpl ON bpl.lot_id = bagi.project_id
LEFT JOIN bm_unit_info bui ON bui.unit_id = bagi.unit_id
LEFT JOIN ma_type mt ON mt.type_id = lod.type_id
LEFT JOIN ma_type mt2 ON mt2.type_id = mt.parent_id
LEFT JOIN ma_machine mm ON mm.ma_id = lod.ma_id
LEFT JOIN sys_dic sd on mm.ma_status = sd.id
WHERE
1 = 1
<if test="code != null and code != ''">
and lai.code like concat('%',#{code},'%')
</if>
<if test="unitId != null">
and bui.unit_id = #{unitId}
</if>
<if test="lotId != null">
and bpl.lot_id = #{lotId}
</if>
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
AND lod.create_time BETWEEN CONCAT(#{startTime}, ' 00:00:00') AND CONCAT(#{endTime}, ' 23:59:59')
</if>
<if test="keyWord != null and keyWord != ''">
and (mt2.type_name like concat('%',#{keyWord},'%') or
mt.type_name like concat('%',#{keyWord},'%') or
mm.ma_code like concat('%',#{keyWord},'%'))
</if>
</select>
</mapper> </mapper>