查询辅助项资料
This commit is contained in:
parent
2527d6a844
commit
ee06735f34
|
@ -4,6 +4,8 @@ package com.hzya.frame.grpU8.nxproof.glfzxzl.dao;
|
|||
import com.hzya.frame.basedao.dao.IBaseDao;
|
||||
import com.hzya.frame.grpU8.nxproof.glfzxzl.entity.GlFzxzlEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* (GL_Fzxzl: table)表数据库访问层
|
||||
*
|
||||
|
@ -12,5 +14,7 @@ import com.hzya.frame.grpU8.nxproof.glfzxzl.entity.GlFzxzlEntity;
|
|||
*/
|
||||
public interface IGlFzxzlDao extends IBaseDao<GlFzxzlEntity, String> {
|
||||
|
||||
//查询辅助项资料
|
||||
List<GlFzxzlEntity> queryGlFzxzlEntity(GlFzxzlEntity glFzxzlEntity);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,10 +1,14 @@
|
|||
package com.hzya.frame.grpU8.nxproof.glfzxzl.dao.impl;
|
||||
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
||||
import com.hzya.frame.grpU8.nxproof.glfzxzl.dao.IGlFzxzlDao;
|
||||
import com.hzya.frame.grpU8.nxproof.glfzxzl.entity.GlFzxzlEntity;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* (GlFzxzl)表数据库访问层
|
||||
*
|
||||
|
@ -14,5 +18,10 @@ import org.springframework.stereotype.Repository;
|
|||
@Repository(value = "GlFzxzlDaoImpl")
|
||||
public class GlFzxzlDaoImpl extends MybatisGenericDao<GlFzxzlEntity, String> implements IGlFzxzlDao {
|
||||
|
||||
@DS("#glFzxzlEntity.dataSourceCode")
|
||||
@Override
|
||||
public List<GlFzxzlEntity> queryGlFzxzlEntity(GlFzxzlEntity glFzxzlEntity) {
|
||||
return super.queryByLike(glFzxzlEntity);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package com.hzya.frame.grpU8.nxproof.glfzxzl.service;
|
||||
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.hzya.frame.basedao.service.IBaseService;
|
||||
import com.hzya.frame.grpU8.nxproof.glfzxzl.entity.GlFzxzlEntity;
|
||||
|
||||
|
@ -11,4 +12,14 @@ import com.hzya.frame.grpU8.nxproof.glfzxzl.entity.GlFzxzlEntity;
|
|||
* @since 2024-08-06 10:56:29
|
||||
*/
|
||||
public interface IGlFzxzlService extends IBaseService<GlFzxzlEntity, String> {
|
||||
/**
|
||||
*
|
||||
* @content 查询辅助项资料
|
||||
* @Param
|
||||
* @Return
|
||||
* @Author hecan
|
||||
* @Date 2024/8/27 17:26
|
||||
* **/
|
||||
Object queryEntityPage(JSONObject json);
|
||||
|
||||
}
|
||||
|
|
|
@ -1,13 +1,19 @@
|
|||
package com.hzya.frame.grpU8.nxproof.glfzxzl.service.impl;
|
||||
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.hzya.frame.basedao.service.impl.BaseService;
|
||||
import com.hzya.frame.grpU8.nxproof.glfzxzl.dao.IGlFzxzlDao;
|
||||
import com.hzya.frame.grpU8.nxproof.glfzxzl.entity.GlFzxzlEntity;
|
||||
import com.hzya.frame.grpU8.nxproof.glfzxzl.service.IGlFzxzlService;
|
||||
import com.hzya.frame.grpU8.nxproof.pubkszl.entity.PubkszlEntity;
|
||||
import com.hzya.frame.web.entity.BaseResult;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* (GlFzxzl)表服务实现类
|
||||
*
|
||||
|
@ -24,4 +30,30 @@ public class GlFzxzlServiceImpl extends BaseService<GlFzxzlEntity, String> imple
|
|||
this.glFzxzlDao = dao;
|
||||
this.dao = dao;
|
||||
}
|
||||
|
||||
//查询辅助项资料
|
||||
@Override
|
||||
public Object queryEntityPage(JSONObject json) {
|
||||
JSONObject jsonObject = json.getJSONObject("jsonStr");
|
||||
GlFzxzlEntity glFzxzlEntity = jsonObject.toJavaObject(GlFzxzlEntity.class);
|
||||
if(!checkStr(jsonObject.getString("kjnd"))){
|
||||
logger.info("========查询辅助项资料传递得会计年度为空==========");
|
||||
return BaseResult.getFailureMessageEntity("会计年度为空");
|
||||
}
|
||||
if(!checkStr(jsonObject.getString("gsdm"))){
|
||||
logger.info("========查询辅助项资料传递得公司代码为空==========");
|
||||
return BaseResult.getFailureMessageEntity("公司代码为空");
|
||||
}
|
||||
try {
|
||||
List<GlFzxzlEntity> glFzxzlEntities = glFzxzlDao.queryGlFzxzlEntity(glFzxzlEntity);
|
||||
PageInfo pageInfo=new PageInfo(glFzxzlEntities);
|
||||
JSONObject object=new JSONObject();
|
||||
object.put("pageInfo",pageInfo);
|
||||
object.put("status","200");
|
||||
return object;
|
||||
}catch (Exception e){
|
||||
logger.info("=======根据会计年度:{},公司代码:{}查询辅助项资料失败======",jsonObject.getString("kjnd"),jsonObject.getString("gsdm"),e.getMessage());
|
||||
return BaseResult.getFailureMessageEntity("查询辅助项资料失败");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue