BUG修改
This commit is contained in:
parent
4a55a3858e
commit
8e3451c397
|
|
@ -127,8 +127,10 @@ public class PaTypeController {
|
||||||
return pageInfo;
|
return pageInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分页查询配件入库
|
* 入库专用查询---
|
||||||
* @param dto
|
* @param dto
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -72,7 +72,7 @@ public class PartScrapController {
|
||||||
* 盘点入库新增接口
|
* 盘点入库新增接口
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping("getDetailsById")
|
@PostMapping("getDetailsById")
|
||||||
@DecryptAndVerify(decryptedClass = PartScrapVo.class)
|
@DecryptAndVerify(decryptedClass = PartScrapVo.class)
|
||||||
public ServerResponse getDetailsById(EncryptedReq<PartScrapVo> dto) {
|
public ServerResponse getDetailsById(EncryptedReq<PartScrapVo> dto) {
|
||||||
return service.getDetailsById(dto.getData());
|
return service.getDetailsById(dto.getData());
|
||||||
|
|
@ -115,7 +115,7 @@ public class PartScrapController {
|
||||||
num[0]++;
|
num[0]++;
|
||||||
});
|
});
|
||||||
ExportParams exportParams = new ExportParams("报废记录", "报废记录", ExcelType.XSSF);
|
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.setContentType("application/vnd.ms-excel");
|
||||||
response.setHeader("content-disposition", "attachment;fileName=" + URLEncoder.encode("报废记录" + ".xlsx", "UTF-8"));
|
response.setHeader("content-disposition", "attachment;fileName=" + URLEncoder.encode("报废记录" + ".xlsx", "UTF-8"));
|
||||||
ServletOutputStream outputStream = response.getOutputStream();
|
ServletOutputStream outputStream = response.getOutputStream();
|
||||||
|
|
@ -142,7 +142,7 @@ public class PartScrapController {
|
||||||
num[0]++;
|
num[0]++;
|
||||||
});
|
});
|
||||||
ExportParams exportParams = new ExportParams("报废明细", "报废明细", ExcelType.XSSF);
|
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.setContentType("application/vnd.ms-excel");
|
||||||
response.setHeader("content-disposition", "attachment;fileName=" + URLEncoder.encode("报废明细" + ".xlsx", "UTF-8"));
|
response.setHeader("content-disposition", "attachment;fileName=" + URLEncoder.encode("报废明细" + ".xlsx", "UTF-8"));
|
||||||
ServletOutputStream outputStream = response.getOutputStream();
|
ServletOutputStream outputStream = response.getOutputStream();
|
||||||
|
|
|
||||||
|
|
@ -43,6 +43,8 @@ public class PartCheckDetailsVo {
|
||||||
@Excel(name = "规格型号", width = 10.0, orderNum = "3")
|
@Excel(name = "规格型号", width = 10.0, orderNum = "3")
|
||||||
private String partModel;
|
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")
|
@Excel(name = "库存量", width = 10.0, orderNum = "6")
|
||||||
private int num;
|
private int num;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 盘盈
|
* 盘盈
|
||||||
*/
|
*/
|
||||||
|
|
@ -71,10 +74,8 @@ public class PartCheckDetailsVo {
|
||||||
@Excel(name = "盘亏量", width = 10.0, orderNum = "8")
|
@Excel(name = "盘亏量", width = 10.0, orderNum = "8")
|
||||||
private int subNum;
|
private int subNum;
|
||||||
|
|
||||||
@Excel(name = "单价", width = 10.0, orderNum = "9")
|
|
||||||
private String price;
|
|
||||||
|
|
||||||
@Excel(name = "金额", width = 10.0, orderNum = "10")
|
|
||||||
private String money;
|
private String money;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -69,7 +69,7 @@
|
||||||
<!--分页查询 节点数据-->
|
<!--分页查询 节点数据-->
|
||||||
<select id="findByPageList" resultType="com.bonus.gzgqj.business.bases.entity.PaTypeVo">
|
<select id="findByPageList" resultType="com.bonus.gzgqj.business.bases.entity.PaTypeVo">
|
||||||
select pt.id, pt.parent_id parentId,pt.name model ,
|
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
|
pt.remarks,pt.is_active ,pt.level,pt.warn_num,pt1.`name` name ,pt2.name type
|
||||||
FROM pa_type pt
|
FROM pa_type pt
|
||||||
left join pa_type pt1 on pt.parent_id=pt1.id and pt1.`level`=2 and pt1.is_active=1
|
left join pa_type pt1 on pt.parent_id=pt1.id and pt1.`level`=2 and pt1.is_active=1
|
||||||
|
|
|
||||||
|
|
@ -12,12 +12,12 @@
|
||||||
<insert id="insertScrapDetailsData">
|
<insert id="insertScrapDetailsData">
|
||||||
insert into t_part_scrap_details(
|
insert into t_part_scrap_details(
|
||||||
scrap_id, part_id,scrap_num,
|
scrap_id, part_id,scrap_num,
|
||||||
remark, num, part_type,
|
remark, part_type,
|
||||||
part_name, part_model, part_unit
|
part_name, part_model, part_unit
|
||||||
) values
|
) values
|
||||||
<foreach collection="list" item="item" separator=",">
|
<foreach collection="list" item="item" separator=",">
|
||||||
(#{param.id},#{item.partId},#{item.scrapNum},#{item.remark},
|
(#{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>
|
</foreach>
|
||||||
</insert>
|
</insert>
|
||||||
<select id="findByPage" resultType="com.bonus.gzgqj.business.bases.entity.PartScrapVo">
|
<select id="findByPage" resultType="com.bonus.gzgqj.business.bases.entity.PartScrapVo">
|
||||||
|
|
@ -54,11 +54,11 @@
|
||||||
where id=#{id}
|
where id=#{id}
|
||||||
</select>
|
</select>
|
||||||
<select id="getDetailListById" resultType="com.bonus.gzgqj.business.bases.entity.PartScrapDetailsVo">
|
<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,
|
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.scrap_num scrapNum, psd.remark, psd.part_type partType, psd.part_name partName,
|
||||||
psd.part_model partModel, psd.part_unit partUnit
|
psd.part_model partModel, psd.part_unit partUnit
|
||||||
from t_part_scrap_details psd
|
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}
|
where psd.scrap_id=#{id}
|
||||||
<if test="partType!=null and partType !=''">
|
<if test="partType!=null and partType !=''">
|
||||||
and psd.part_type like concat('%',#{partType},'%')
|
and psd.part_type like concat('%',#{partType},'%')
|
||||||
|
|
@ -71,9 +71,9 @@
|
||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
<select id="getInfo" resultType="java.lang.String">
|
<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
|
from t_part_scrap_details
|
||||||
where put_id=#{id}
|
where scrap_id=#{id}
|
||||||
GROUP BY part_name
|
GROUP BY part_name
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue