BUG修改

This commit is contained in:
haozq 2024-11-16 14:17:59 +08:00
parent 4a55a3858e
commit 8e3451c397
5 changed files with 19 additions and 16 deletions

View File

@ -127,8 +127,10 @@ public class PaTypeController {
return pageInfo;
}
/**
* 分页查询配件入库
* 入库专用查询---
* @param dto
* @return
*/

View File

@ -72,7 +72,7 @@ public class PartScrapController {
* 盘点入库新增接口
* @return
*/
@GetMapping("getDetailsById")
@PostMapping("getDetailsById")
@DecryptAndVerify(decryptedClass = PartScrapVo.class)
public ServerResponse getDetailsById(EncryptedReq<PartScrapVo> dto) {
return service.getDetailsById(dto.getData());
@ -115,7 +115,7 @@ public class PartScrapController {
num[0]++;
});
ExportParams exportParams = new ExportParams("报废记录", "报废记录", ExcelType.XSSF);
Workbook workbook = ExcelExportUtil.exportExcel(exportParams, PlanApplyBeanPlanExport.class, list);
Workbook workbook = ExcelExportUtil.exportExcel(exportParams, PartScrapVo.class, list);
response.setContentType("application/vnd.ms-excel");
response.setHeader("content-disposition", "attachment;fileName=" + URLEncoder.encode("报废记录" + ".xlsx", "UTF-8"));
ServletOutputStream outputStream = response.getOutputStream();
@ -142,7 +142,7 @@ public class PartScrapController {
num[0]++;
});
ExportParams exportParams = new ExportParams("报废明细", "报废明细", ExcelType.XSSF);
Workbook workbook = ExcelExportUtil.exportExcel(exportParams, PlanDataDetailBean.class, list);
Workbook workbook = ExcelExportUtil.exportExcel(exportParams, PartScrapDetailsVo.class, list);
response.setContentType("application/vnd.ms-excel");
response.setHeader("content-disposition", "attachment;fileName=" + URLEncoder.encode("报废明细" + ".xlsx", "UTF-8"));
ServletOutputStream outputStream = response.getOutputStream();

View File

@ -43,6 +43,8 @@ public class PartCheckDetailsVo {
@Excel(name = "规格型号", width = 10.0, orderNum = "3")
private String partModel;
@Excel(name = "单价", width = 10.0, orderNum = "4")
private String price;
/**
* 配件类型
*/
@ -60,6 +62,7 @@ public class PartCheckDetailsVo {
*/
@Excel(name = "库存量", width = 10.0, orderNum = "6")
private int num;
/**
* 盘盈
*/
@ -71,10 +74,8 @@ public class PartCheckDetailsVo {
@Excel(name = "盘亏量", width = 10.0, orderNum = "8")
private int subNum;
@Excel(name = "单价", width = 10.0, orderNum = "9")
private String price;
@Excel(name = "金额", width = 10.0, orderNum = "10")
private String money;
}

View File

@ -69,7 +69,7 @@
<!--分页查询 节点数据-->
<select id="findByPageList" resultType="com.bonus.gzgqj.business.bases.entity.PaTypeVo">
select pt.id, pt.parent_id parentId,pt.name model ,
0 price ,pt.unit ,pt.weight,pt.is_consumables ,pt.num,pt.price,
0 price ,pt.unit ,pt.weight,pt.is_consumables ,
pt.remarks,pt.is_active ,pt.level,pt.warn_num,pt1.`name` name ,pt2.name type
FROM pa_type pt
left join pa_type pt1 on pt.parent_id=pt1.id and pt1.`level`=2 and pt1.is_active=1

View File

@ -12,12 +12,12 @@
<insert id="insertScrapDetailsData">
insert into t_part_scrap_details(
scrap_id, part_id,scrap_num,
remark, num, part_type,
remark, part_type,
part_name, part_model, part_unit
) values
<foreach collection="list" item="item" separator=",">
(#{param.id},#{item.partId},#{item.scrapNum},#{item.remark},
#{item.num},#{item.partType},#{item.partName},#{item.partModel}, #{item.partUnit})
#{item.partType},#{item.partName},#{item.partModel}, #{item.partUnit})
</foreach>
</insert>
<select id="findByPage" resultType="com.bonus.gzgqj.business.bases.entity.PartScrapVo">
@ -54,11 +54,11 @@
where id=#{id}
</select>
<select id="getDetailListById" resultType="com.bonus.gzgqj.business.bases.entity.PartScrapDetailsVo">
select psd.id, psd.scrap_id scrapId ,psd.part_id partId,( pt.price*psd.scrap_num) money,
psd.scrap_num scrapNum, psd.remark, psd.part_type partType, psd.part_name partName,
psd.part_model partModel, psd.part_unit partUnit
select psd.id, psd.scrap_id scrapId ,psd.part_id partId,( pt.price*psd.scrap_num) money,pt.price ,
psd.scrap_num scrapNum, psd.remark, psd.part_type partType, psd.part_name partName,
psd.part_model partModel, psd.part_unit partUnit
from t_part_scrap_details psd
LEFT JOIN pa_type pt on pt.id=psd.part_id
LEFT JOIN pa_type pt on pt.id=psd.part_id
where psd.scrap_id=#{id}
<if test="partType!=null and partType !=''">
and psd.part_type like concat('%',#{partType},'%')
@ -71,9 +71,9 @@
</if>
</select>
<select id="getInfo" resultType="java.lang.String">
select CONCAT(part_name,":",SUM(scrap_num)) detail
select ANY_VALUE(CONCAT(part_name,":",SUM(scrap_num))) detail
from t_part_scrap_details
where put_id=#{id}
where scrap_id=#{id}
GROUP BY part_name
</select>