|
@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONObject;
|
|
|
import com.alibaba.fastjson.serializer.SimplePropertyPreFilter;
|
|
|
import com.fasterxml.jackson.core.JsonProcessingException;
|
|
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
|
import com.yihu.jw.base.dao.org.BaseCheckOrgDao;
|
|
|
import com.yihu.jw.base.dao.org.BaseOrgUserDao;
|
|
|
import com.yihu.jw.base.service.org.tree.SimpleTree;
|
|
|
import com.yihu.jw.base.service.org.tree.SimpleTreeNode;
|
|
@ -11,16 +12,17 @@ import com.yihu.jw.base.service.org.tree.TreeNode;
|
|
|
import com.yihu.jw.base.service.user.UserService;
|
|
|
import com.yihu.jw.base.util.ConstantUtils;
|
|
|
import com.yihu.jw.base.util.JavaBeanUtils;
|
|
|
import com.yihu.jw.entity.base.org.BaseCheckOrgDO;
|
|
|
import com.yihu.jw.entity.base.org.BaseOrgDO;
|
|
|
import com.yihu.jw.entity.base.org.BaseOrgSaasDO;
|
|
|
import com.yihu.jw.entity.base.org.BaseOrgUserDO;
|
|
|
import com.yihu.jw.entity.base.user.UserDO;
|
|
|
import com.yihu.jw.entity.hospital.consult.WlyyHospitalSysDictDO;
|
|
|
import com.yihu.jw.hospital.dict.WlyyHospitalSysDictDao;
|
|
|
import com.yihu.jw.mysql.query.BaseJpaService;
|
|
|
import com.yihu.jw.org.dao.BaseOrgDao;
|
|
|
import com.yihu.jw.utils.StringUtil;
|
|
|
import com.yihu.jw.utils.hibernate.HibenateUtils;
|
|
|
import com.yihu.jw.mysql.query.BaseJpaService;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.jdbc.core.BeanPropertyRowMapper;
|
|
@ -54,7 +56,8 @@ public class BaseOrgService extends BaseJpaService<BaseOrgDO, BaseOrgDao> {
|
|
|
|
|
|
@Autowired
|
|
|
private BaseOrgDao baseOrgDao;
|
|
|
|
|
|
@Autowired
|
|
|
private BaseCheckOrgDao baseCheckOrgDao;
|
|
|
@Autowired
|
|
|
private BaseOrgSaasService baseOrgSaasService;
|
|
|
|
|
@ -407,5 +410,52 @@ public class BaseOrgService extends BaseJpaService<BaseOrgDO, BaseOrgDao> {
|
|
|
return baseOrgDao.findOrgListBySaasId();
|
|
|
}
|
|
|
|
|
|
// 保存修改机构考核
|
|
|
public void saveOrgCheck(String id ,String orgCode,String checkDate,String file){
|
|
|
BaseCheckOrgDO baseCheckOrgDO = new BaseCheckOrgDO();
|
|
|
|
|
|
if (org.apache.commons.lang3.StringUtils.isNotBlank(id)) {
|
|
|
baseCheckOrgDO.setId(Long.parseLong(id));
|
|
|
}
|
|
|
baseCheckOrgDO.setCheckFile(file);
|
|
|
baseCheckOrgDO.setOrgcode(orgCode);
|
|
|
baseCheckOrgDO.setCheckDate(checkDate);
|
|
|
baseCheckOrgDao.save(baseCheckOrgDO);
|
|
|
}
|
|
|
|
|
|
//获取机构考核
|
|
|
public JSONObject getOrgCheckList(String orgCode,String id,Integer page,Integer size){
|
|
|
JSONObject resultObj =new JSONObject();
|
|
|
|
|
|
if (page == null) {
|
|
|
page = 0;
|
|
|
} else if (page > 0) {
|
|
|
page = page - 1;
|
|
|
}
|
|
|
if (size <= 0) {
|
|
|
size = 10;
|
|
|
}
|
|
|
|
|
|
|
|
|
String sql = "select * from base_check_org where orgCode = '"+orgCode+"'";
|
|
|
String totalSql = "select count(id) from base_check_org where orgCode = '"+orgCode+"'";
|
|
|
|
|
|
if (org.apache.commons.lang3.StringUtils.isNotBlank(id)){
|
|
|
sql += " and id = '"+id+"'";
|
|
|
}
|
|
|
|
|
|
sql += " limit "+page+","+size;
|
|
|
|
|
|
List<Map<String, Object>> list = jdbcTemplate.queryForList(sql);
|
|
|
Integer total = jdbcTemplate.queryForObject(totalSql, Integer.class);
|
|
|
resultObj.put("total",total);
|
|
|
resultObj.put("list",list);
|
|
|
return resultObj;
|
|
|
}
|
|
|
|
|
|
public void delCheckOrg(String id){
|
|
|
String sql = "delete from base_check_org where id='"+id+"'";
|
|
|
jdbcTemplate.execute(sql);
|
|
|
|
|
|
}
|
|
|
}
|