提交 2f2f922b authored 作者: zhouzhigang's avatar zhouzhigang

--no commit message

上级 af3fa9c6
......@@ -102,6 +102,16 @@ public class PhyResourceController {
ExcelUtil.getInstance().exportExcel(copyList, ExportResourceExcel.class, "实体资源.xls", response, request);
return null;
}
@ApiOperation(value = "导出职教分社资源")
@GetMapping(value = ResourceRequestPath.ZJFS + ResourceRequestPath.PAGE + ResourceRequestPath.EXPORT)
public String exportZjfsPage(HttpServletRequest request, HttpServletResponse response) throws Exception {
List<PhyResourcePageVo> list = phyResourceService.exportZjfsPage();
List<ExportResourceExcel> copyList = BeanUtils.copyList(list,ExportResourceExcel.class);
ExcelUtil.getInstance().exportExcel(copyList, ExportResourceExcel.class, "实体资源.xls", response, request);
return null;
}
@ApiOperation(value = "查看图书")
@GetMapping(ResourceRequestPath.GET_OID)
......
......@@ -234,5 +234,9 @@ public interface PhyResourceMapper extends BaseMapper<PhyResource> {
@Select("SELECT * from res_physical_resource s where s.`status` = 3")
List<PhyResource> getList1();
@Select(" SELECT * from res_physical_resource where (type = '1-4' or type = '1-1' or type = '1-3') and status = 3 ")
List<PhyResourcePageVo> getZjfsList();
}
......@@ -279,6 +279,16 @@ public interface PhyResourceService extends BaseService<PhyResource, String> {
/**
* 导出职教分社实体资源跟自定义分类
* @param pageParam
* @return
* @auther zzg
* @data 2019年11月12日 下午3:10:26
*/
List<PhyResourcePageVo> exportZjfsPage();
/**
* 导出重复的isbn
* @return
* @auther zzg
......
......@@ -289,7 +289,7 @@ public class PhyResourceServiceImpl extends BaseModelServiceImpl<PhyResource, St
List<PhyResourcePageVo> phyResourcePageVos = phyResourceMapper.page(query);
for(PhyResourcePageVo vo : phyResourcePageVos){
GoodsDiyTypeRelation record = new GoodsDiyTypeRelation();
record.setGoodsid(String.valueOf(vo.getId()));
record.setGoodsid(vo.getId());
List<GoodsDiyTypeRelation> goodsDiyTypeRelations = goodsDiyTypeRelationMapper.select(record);
StringBuffer oneDiyTypes = new StringBuffer();//一级分类
StringBuffer twoDiyTypes = new StringBuffer();//二级分类
......@@ -879,6 +879,32 @@ public class PhyResourceServiceImpl extends BaseModelServiceImpl<PhyResource, St
}
@Override
public List<PhyResourcePageVo> exportZjfsPage() {
List<PhyResourcePageVo> list = phyResourceMapper.getZjfsList();
list.forEach(vo ->{
if(StringUtils.isNotEmpty(vo.getCover())){
vo.setCover("有");
}else{
vo.setCover("无");
vo.setRemark("补全封面");
}
Map<Integer, String> diyTypesName = diyTypeManage.getDiyTypesName(vo.getId());
if(diyTypesName != null){
diyTypesName.forEach((k,v) ->{
vo.setDiyType(v);
});
}
});
return list;
}
public List<Integer> formatLable(String type){
List<Integer> list = new ArrayList<Integer>();
if (GoodsTypeEnum.JCK.getCode().equals(type)) { //教参
......
......@@ -34,7 +34,7 @@ import org.springframework.transaction.interceptor.TransactionInterceptor;
@Configuration
public class TxAdviceInterceptor {
private static final int TX_METHOD_TIMEOUT = 120;
private static final int TX_METHOD_TIMEOUT = 120000;
private static final int TX_METHOD_TIMEOUT_PUSH_BAISHI = 3600;
public static final String AOP_POINTCUT_EXPRESSION = "(execution(* com.zrqx..service..*Impl.*(..)))";
......
......@@ -219,5 +219,7 @@ public class BaseRequestPath {
public static final String LOGO = "/logo";
/** 日志*/
public static final String LOG = "/log";
/** 职教分社*/
public static final String ZJFS = "/zjfs";
}
......@@ -48,6 +48,9 @@ public class PhyResourcePageVo {
private String threeDiyType;
@ApiModelProperty("是否跟教材有关联")
private String isRelation;
@ApiModelProperty("备注")
private String remark;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论