Commit a46c29d5 by 李小惠

添加装备导出接口(未测试),添加库存查看足迹接口

parent abc59269
<component name="libraryTable">
<library name="Maven: org.springframework:spring-web:5.2.5">
<CLASSES>
<root url="jar://$PROJECT_DIR$/../../repos/org/springframework/spring-web/5.3.5/spring-web-5.3.5.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</component>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/jyzb-api/jyzb-api.iml" filepath="$PROJECT_DIR$/jyzb-api/jyzb-api.iml" />
<module fileurl="file://$PROJECT_DIR$/jyzb-biz/jyzb-biz.iml" filepath="$PROJECT_DIR$/jyzb-biz/jyzb-biz.iml" />
<module fileurl="file://$PROJECT_DIR$/jyzb-boot/jyzb-boot.iml" filepath="$PROJECT_DIR$/jyzb-boot/jyzb-boot.iml" />
</modules>
</component>
</project>
\ No newline at end of file
package com.junmp.jyzb.api.bean.dto.TjDto;
import com.alibaba.excel.annotation.ExcelProperty;
import lombok.Data;
import java.util.List;
@Data
public class TjOrgEqsDto {
@ExcelProperty("序号")
private Integer numId;
/**
* 组织机构id
*/
......@@ -13,14 +16,17 @@ public class TjOrgEqsDto {
/**
* 组织机构名称
*/
@ExcelProperty("组织机构名称")
private String orgName;
/**
* 组织机构编码
*/
@ExcelProperty("组织机构编码")
private String orgCode;
/**
* 组织机构简称
*/
@ExcelProperty("组织机构简称")
private String dName;
/**
......@@ -30,26 +36,32 @@ public class TjOrgEqsDto {
/**
* 装备总数
*/
@ExcelProperty("装备总数")
private Integer totalNumber;
/**
* 在库数(仓库数)
*/
@ExcelProperty("仓库在库数")
private Integer ckStockNumber;
/**
* 出库数(仓库数)
*/
@ExcelProperty("仓库出库数")
private Integer ckOutboundNumber;
/**
* 单警柜在库数
*/
@ExcelProperty("单警柜在库数")
private Integer djgStockNumber;
/**
* 单警柜出库数
*/
@ExcelProperty("单警柜出库数")
private Integer djgOutboundNumber;
/**
* 销毁数
*/
@ExcelProperty("销毁数")
private Integer destructionNumber;
......
......@@ -190,4 +190,6 @@ public class InventoryReq extends BaseRequest {
private List<String> typeIdList;
private List<String> sizeIdList;
private List<InventoryReq> eqsList;
}
......@@ -9,6 +9,7 @@ import lombok.NonNull;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
......@@ -120,6 +121,8 @@ public class LogSummaryReq extends BaseRequest {
private List<LogDetailReq> logList;
private String typeId;
private String sizeId;
private BigDecimal price;
private String column;
private String order;
......
<?xml version="1.0" encoding="UTF-8"?>
<module version="4">
<component name="AdditionalModuleElements">
<content url="file://$MODULE_DIR$" dumb="true">
<sourceFolder url="file://$MODULE_DIR$/src/main/test" isTestSource="true" />
</content>
</component>
<component name="FacetManager">
<facet type="Spring" name="Spring">
<configuration />
</facet>
</component>
</module>
\ No newline at end of file
package com.junmp.jyzb.cache;
import com.junmp.jyzb.api.constant.JYZBConstant;
import com.junmp.v2.cache.AbstractRedisCache;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Component;
import java.util.List;
@Component
public class InventoryRedisCache extends AbstractRedisCache<Object> {
public InventoryRedisCache(RedisTemplate<String, Object> redisTemplate) {
super(redisTemplate);
}
@Override
public String getCommonKeyPrefix() {
return JYZBConstant.JYZB_TEMP_PREFIX;
}
// public void addInventoryInfo(){
// getRedisTemplate().opsForZSet().add(key, data, timestamp);
// put(key, data);
// }
//
// public List<Object> getInventoryInfo(){
//
// return new List<>(Object) ;
// }
}
......@@ -312,4 +312,10 @@ public class InventoryController {
return ApiRes.success(inventoryService.alignInventoryInfo(req));
}
@PostMapping(path = "/EqsImport",name = "装备导入")
@ApiOperation("装备导入")
public ApiRes<Boolean> EqsImport(@RequestBody InventoryReq req){
return ApiRes.success(inventoryService.EqsImport(req));
}
}
......@@ -71,8 +71,8 @@ public class OutAndInboundController {
@PostMapping(path = "/ShowInOutRecords",name = "出入库数据展示#enable")
@ApiOperation("出入库数据展示")
public ApiRes<PageResult<LogSummary>> ShowInOutRecords( ){
return ApiRes.success(logSummaryService.ShowInOutRecords());
public ApiRes<PageResult<LogSummary>> ShowInOutRecords(@RequestBody LogSummaryReq req){
return ApiRes.success(logSummaryService.ShowInOutRecords(req));
}
......
......@@ -96,6 +96,12 @@ public class TjController {
return ApiRes.success(tjService.test1(req));
}
@PostMapping(path="/TjOrgEqsExport",name="装备报表导出#logType=30")
@ApiOperation("装备报表导出")
public void TjOrgEqsExport(@RequestBody TjOrgEqsReq req){
tjService.TjOrgEqsExport(req);
}
/**
*-------------------------------------财务统计报表------------------------------------------
*/
......
......@@ -143,6 +143,12 @@ public class LogSummary implements Serializable {
private BigDecimal price;
@TableField(exist = false)
private String sizeName;
@TableField(exist = false)
private String typeName;
private static final long serialVersionUID = 1L;
......
......@@ -9,6 +9,7 @@ import com.junmp.jyzb.entity.LogSummary;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import java.math.BigDecimal;
import java.util.List;
/**
......@@ -21,7 +22,12 @@ public interface LogSummaryMapper extends BaseMapper<LogSummary> {
List<TjOutAndInDto> TjOutAndInCount(@Param("req") TjOrgCountReq req);
List<LogSummary> ShowInOutRecords();
List<LogSummary> ShowInOutRecords(@Param("orgId")Long orgId, @Param("sizeId")String sizeId,
@Param("typeId")String typeId, @Param("price")BigDecimal price,
@Param("pageNo")Long pageNo,@Param("pageSize")Long pageSize);
int ShowInOutRecordsSum(@Param("orgId")Long orgId, @Param("sizeId")String sizeId,
@Param("typeId")String typeId, @Param("price")BigDecimal price);
}
......
......@@ -28,7 +28,7 @@ public interface PriceSumSummaryMapper extends BaseMapper<PriceSumSummary> {
*/
void MonthDifference ();
TjOrgPriceDto TjOrgPrice(@Param("orgId") Long orgId,
TjOrgPriceDto TjOrgPrice(@Param("orgId") String orgId,
@Param("year") Integer year,
@Param("typeIdsList") List<String> typeIdsList,
@Param("sizeNameList")List<String> sizeNameList);
......
......@@ -87,4 +87,6 @@ public interface InventoryService extends IService<Inventory> {
List<Inventory> selectEqsByItem(List<Object[]> searchCriteria);
List<EquipmentDto> alignInventoryInfo(InventoryReq req);
boolean EqsImport(InventoryReq req);
}
......@@ -22,5 +22,5 @@ public interface LogSummaryService extends IService<LogSummary> {
//单警柜返回出入库结果
Boolean processOutInRecords(CabinetLogsRecordReq req);
PageResult<LogSummary> ShowInOutRecords();
PageResult<LogSummary> ShowInOutRecords(LogSummaryReq req);
}
......@@ -18,7 +18,7 @@ public interface TjService {
FinalTjOrgEqsDto test(TjOrgEqsReq req);
//装备统计报表
PageResult<TjOrgEqsDto> TjOrgEqs(TjOrgEqsReq req);
// PageResult<TjOrgEqsDto> TjOrgEqs(TjOrgEqsReq req);
//装备统计报表
PageResult<TjOrgEqsDto> GetTjData(TjOrgEqsReq req);
......@@ -55,7 +55,7 @@ public interface TjService {
List<TjOrgPoliceDto> TjOrgPoliceDetailList(TjOrgPoliceReq req);
List<TjOrgEqsDto> TjOrgEqsSecondList(TjOrgEqsReq req);
// List<TjOrgEqsDto> TjOrgEqsSecondList(TjOrgEqsReq req);
List<TjOrgEqsDto> GetTjDataDetail(TjOrgEqsReq req);
PageResult<TjOrgEqsDto> test1(TjOrgEqsReq req);
......@@ -63,4 +63,5 @@ public interface TjService {
FinalTjOrgEqsDto TjOrgDataSum(TjOrgEqsReq req);
void TjOrgEqsExport(TjOrgEqsReq req);
}
......@@ -681,4 +681,14 @@ public class InventoryServiceImpl extends ServiceImpl<InventoryMapper, Inventory
}
//装备导入(判断导入的数据是否存在redis中,如果不存在,则判断数据库是否存在相同的epc,如果存在提示报错,并且讲该次导入的数据存储到redis中,为下一次进行作比较)
@Override
public boolean EqsImport(InventoryReq req) {
List<InventoryReq> eqsList = req.getEqsList();
return false;
}
}
\ No newline at end of file
......@@ -241,9 +241,15 @@ public class LogSummaryServiceImpl extends ServiceImpl<LogSummaryMapper, LogSumm
}
@Override
public PageResult<LogSummary> ShowInOutRecords() {
List<LogSummary> list=logSummaryMapper.ShowInOutRecords();
return null;
public PageResult<LogSummary> ShowInOutRecords(LogSummaryReq req) {
int size=logSummaryMapper.ShowInOutRecordsSum(req.getOrgId(), req.getSizeId(),
req.getTypeId(),req.getPrice());
Page<LogSummary> page = PageFactory.getDefaultPage(req.getPageNo(), req.getPageSize());
List<LogSummary> list=logSummaryMapper.ShowInOutRecords(req.getOrgId(), req.getSizeId(),
req.getTypeId(),req.getPrice(),(req.getPageNo()-1)*req.getPageSize(),req.getPageSize());
page.setRecords(list);
page.setTotal(size);
return PageResultFactory.createPageResult(page);
}
// 对出入库记录进行分类汇总存储()
......
......@@ -18,7 +18,6 @@ import com.junmp.v2.common.util.BeanPlusUtil;
import com.junmp.v2.db.api.factory.PageFactory;
import com.junmp.v2.db.api.factory.PageResultFactory;
import com.junmp.v2.db.api.page.PageResult;
import com.sun.org.apache.regexp.internal.RE;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import com.junmp.jyzb.mapper.SupplierMapper;
......
......@@ -57,7 +57,37 @@
GROUP BY months.month, years.year
ORDER BY year, month;
</select>
<select id="ShowInOutRecords" resultType="com.junmp.jyzb.entity.LogSummary"></select>
<select id="ShowInOutRecords" resultType="com.junmp.jyzb.entity.LogSummary">
select ls.location_id,ls.location_name,ls.bussiness_type,ls.out_in_state,ls.user_name,a.*
from base_log_summary ls
join (select summary_id,count(*)as number,max(size_name) as size_name,
max(type_name) as type_name,max(price)as price
FROM base_log_detail ld
where org_id=#{orgId}
and type_id=#{typeId}
and size_id=#{sizeId}
and price=#{price}
GROUP BY summary_id
) as a on ls.id=a.summary_id
where ls.org_id=#{orgId} and ls.location_type=0
<if test="pageNo != null and pageNo != '' and pageSize != null and pageSize != '' ">
limit #{pageNo},#{pageSize}
</if>
</select>
<select id="ShowInOutRecordsSum" resultType="java.lang.Integer">
select ls.location_id,ls.location_name,ls.bussiness_type,ls.out_in_state,ls.user_name,a.*
from base_log_summary ls
join (select summary_id,count(*)as number,max(size_name) as size_name,
max(type_name) as type_name,max(price)as price
FROM base_log_detail ld
where org_id=#{orgId}
and type_id=#{typeId}
and size_id=#{sizeId}
and price=#{price}
GROUP BY summary_id
) as a on ls.id=a.summary_id
where ls.org_id=#{orgId} and ls.location_type=0
</select>
</mapper>
......@@ -47,10 +47,10 @@
FROM `pub_org`
WHERE org_id=#{orgId}
) as t1
CROSS JOIN (select sum(vpss.start_num) as start_num,sum(vpss.start_price) as start_price,
sum(vpss.end_num) as end_num,sum(vpss.end_price) as end_price,
sum(vpss.add_num) as add_num,sum(vpss.destory_num) as destory_num,
sum(vpss.add_price) as add_price,sum(vpss.destory_price) as destory_price
CROSS JOIN (select sum(COALESCE(vpss.start_num,0)) as start_num,sum(COALESCE(vpss.start_price,0)) as start_price,
sum(COALESCE(vpss.end_num,0)) as end_num,sum(COALESCE(vpss.end_price,0)) as end_price,
sum(COALESCE(vpss.add_num,0)) as add_num,sum(COALESCE(vpss.destory_num,0)) as destory_num,
sum(COALESCE(vpss.add_price,0)) as add_price,sum(COALESCE(vpss.destory_price,0)) as destory_price
FROM vie_price_sum_summary vpss
left join pub_org po on vpss.org_id_int=po.org_id
where vpss.`year`= #{year} and po.del_flag=1 and (po.org_id=#{orgId} or po.org_parent_ids like CONCAT('%', #{orgId}, '%'))
......@@ -71,10 +71,10 @@
<select id="TjOrgPriceDetail" resultType="com.junmp.jyzb.api.bean.dto.TjDto.TjOrgPriceDto">
select org_id_int as org_id,org_code,org_name,type_id,type_name,size_id,size_name,
sum(start_num) as start_num,sum(start_price) as start_price,
sum(end_num) as end_num,sum(end_price) as end_price,
sum(add_num) as add_num,sum(destory_num) as destory_num,
sum(add_price) as add_price,sum(destory_price) as destory_price
sum(coalesce(start_num,0)) as start_num,sum(coalesce(start_price,0)) as start_price,
sum(coalesce(end_num,0)) as end_num,sum(coalesce(end_price,0)) as end_price,
sum(coalesce(add_num,0)) as add_num,sum(coalesce(destory_num,0)) as destory_num,
sum(coalesce(add_price,0)) as add_price,sum(coalesce(destory_price,0)) as destory_price
FROM vie_price_sum_summary
where `year`= #{year} and org_id_int=#{orgId}
<if test="typeIdsList!=null and typeIdsList.size() > 0">
......@@ -97,10 +97,10 @@
</select>
<select id="TjOrgPriceSum" resultType="com.junmp.jyzb.api.bean.dto.TjDto.FinalTjOrgPriceDto">
select sum(t.start_num) as start_num,sum(t.start_price) as start_price,
sum(t.end_num) as end_num,sum(t.end_price) as end_price,
sum(t.add_num) as add_num,sum(t.destory_num) as destory_num,
sum(t.add_price) as add_price,sum(t.destory_price) as destory_price FROM (
select sum(coalesce(start_num,0)) as start_num,sum(coalesce(start_price,0)) as start_price,
sum(coalesce(end_num,0)) as end_num,sum(coalesce(end_price,0)) as end_price,
sum(coalesce(add_num,0)) as add_num,sum(coalesce(destory_num,0)) as destory_num,
sum(coalesce(add_price,0)) as add_price,sum(coalesce(destory_price,0)) as destory_price FROM (
select org_id_int as org_id,org_code,org_name,
sum(start_num) as start_num,sum(start_price) as start_price,
sum(end_num) as end_num,sum(end_price) as end_price,
......@@ -126,10 +126,10 @@
<select id="TjOrgPriceDetailSum" resultType="java.lang.Integer">
select count(*) from (
select org_id_int as org_id,org_code,org_name,type_id,type_name,
sum(start_num) as start_num,sum(start_price) as start_price,
sum(end_num) as end_num,sum(end_price) as end_price,
sum(add_num) as add_num,sum(destory_num) as destory_num,
sum(add_price) as add_price,sum(destory_price) as destory_price
sum(coalesce(start_num,0)) as start_num,sum(coalesce(start_price,0)) as start_price,
sum(coalesce(end_num,0)) as end_num,sum(coalesce(end_price,0)) as end_price,
sum(coalesce(add_num,0)) as add_num,sum(coalesce(destory_num,0)) as destory_num,
sum(coalesce(add_price,0)) as add_price,sum(coalesce(destory_price,0)) as destory_price
FROM vie_price_sum_summary
where `year`= #{year} and org_id_int=#{orgId}
<if test="typeIdsList!=null and typeIdsList.size() > 0">
......@@ -157,10 +157,10 @@
FROM `pub_org`
WHERE org_id=#{orgId}
) as t1
CROSS JOIN (select sum(vpss.start_num) as start_num,sum(vpss.start_price) as start_price,
sum(vpss.end_num) as end_num,sum(vpss.end_price) as end_price,
sum(vpss.add_num) as add_num,sum(vpss.destory_num) as destory_num,
sum(vpss.add_price) as add_price,sum(vpss.destory_price) as destory_price
CROSS JOIN (select sum(COALESCE(vpss.start_num,0)) as start_num,sum(COALESCE(vpss.start_price,0)) as start_price,
sum(COALESCE(vpss.end_num,0)) as end_num,sum(COALESCE(vpss.end_price,0)) as end_price,
sum(COALESCE(vpss.add_num,0)) as add_num,sum(COALESCE(vpss.destory_num,0)) as destory_num,
sum(COALESCE(vpss.add_price,0)) as add_price,sum(COALESCE(vpss.destory_price,0)) as destory_price
FROM vie_price_sum_summary vpss
left join pub_org po on vpss.org_id_int=po.org_id
where vpss.`year`= #{year} and po.del_flag=1
......
<?xml version="1.0" encoding="UTF-8"?>
<module version="4">
<component name="FacetManager">
<facet type="jpa" name="JPA">
<configuration>
<setting name="validation-enabled" value="true" />
<datasource-mapping>
<factory-entry name="jyzb-boot" />
</datasource-mapping>
<naming-strategy-map />
</configuration>
</facet>
<facet type="Spring" name="Spring">
<configuration />
</facet>
</component>
</module>
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论