Browse Source

日报代码修改

liubing 2 years ago
parent
commit
4fc02137ed

+ 10 - 16
business/base-service/src/main/java/com/yihu/jw/dailyReport/service/DailyReportUploadService.java

@ -2339,7 +2339,10 @@ public class DailyReportUploadService {
            throw new Exception("您无权限操作");
        }
        List<BaseDailyReportItemDO> itemDOS = new ArrayList<>();
        sql = " select i.* from base_daily_report_item i where 1=1 and i.del=1 ";
        sql = " select i.* from base_daily_report_item i inner join wlyy_hospital_sys_dict dict on i.project_code = dict.dict_code and dict.dict_name='daily_report_project' " +
                " INNER JOIN ( select dict_code,dict_value,sort from wlyy_hospital_sys_dict where dict_name='daily_report_category' )B on dict.saas_id = B.dict_code  " +
                "  INNER JOIN ( select dict_code,dict_value,sort from wlyy_hospital_sys_dict where dict_name='daily_report_level' )C on dict.py_code = C.dict_code " +
                " where 1=1 and i.del=1 ";
        if(StringUtils.isNotBlank(projectCode)){
            sql += " and i.project_code='"+projectCode+"' ";
        }
@ -2367,6 +2370,7 @@ public class DailyReportUploadService {
        if (StringUtils.isNotBlank(dept)){
            sql += " and i.dept='"+dept+"' ";
        }
        sql += " order by B.sort asc, c.sort asc,dict.sort asc  ";
        itemDOS = jdbcTemplate.query(sql,new BeanPropertyRowMapper<>(BaseDailyReportItemDO.class));
        for (BaseDailyReportItemDO tmp:itemDOS){
            List<BaseDailyReportItemMembersDO> membersDOS = reportItemMembersDao.findMembersByItemId(tmp.getId());
@ -2379,7 +2383,10 @@ public class DailyReportUploadService {
     * 员工获取所有日报项目
     */
    public List<BaseDailyReportItemDO> findReportItemList(String user,String projectCode,String title,String content,Integer state,String begin_time,String end_time,String createUser,String createUserName) throws Exception {
        String sql = "select i.* from base_daily_report_item i INNER JOIN base_daily_report_item_members mem on i.id = mem.report_item_id " +
        String sql = "select distinct i.* from base_daily_report_item i inner join wlyy_hospital_sys_dict dict on i.project_code = dict.dict_code and dict.dict_name='daily_report_project' " +
                " INNER JOIN ( select dict_code,dict_value,sort from wlyy_hospital_sys_dict where dict_name='daily_report_category' )B on dict.saas_id = B.dict_code  " +
                "  INNER JOIN ( select dict_code,dict_value,sort from wlyy_hospital_sys_dict where dict_name='daily_report_level' )C on dict.py_code = C.dict_code " +
                " INNER JOIN base_daily_report_item_members mem on i.id = mem.report_item_id " +
                "INNER JOIN base_doctor doc on mem.user_id = doc.id and doc.del=1 " +
                "where i.del=1 and mem.del=1 and mem.user_id='"+user+"' " ;
@ -2407,7 +2414,7 @@ public class DailyReportUploadService {
        if (StringUtils.isNotBlank(createUserName)){
            sql += " and i.create_user_name like '%"+createUserName+"%' ";
        }
        sql += " GROUP BY i.id ";
        sql += " order by B.sort asc, c.sort asc,dict.sort asc  ";
        List<BaseDailyReportItemDO> itemDOS = jdbcTemplate.query(sql,new BeanPropertyRowMapper<>(BaseDailyReportItemDO.class));
        for (BaseDailyReportItemDO tmp:itemDOS){
            List<BaseDailyReportItemMembersDO> membersDOS = reportItemMembersDao.findMembersByItemId(tmp.getId());
@ -2424,7 +2431,6 @@ public class DailyReportUploadService {
        String sql = " select * from base_doctor_role where doctor_code='"+user+"' ";
        List<Map<String,Object>> userRoles = jdbcTemplate.queryForList(sql);
        if (userRoles.size()==0){
            throw new Exception("您无权限操作");
        }else {
            String role_code = userRoles.get(0).get("role_code").toString();
            if ("admin".equals(role_code)){
@ -2525,7 +2531,6 @@ public class DailyReportUploadService {
        String sql = " select * from base_doctor_role where doctor_code='"+user+"' ";
        List<Map<String,Object>> userRoles = jdbcTemplate.queryForList(sql);
        if (userRoles.size()==0){
            throw new Exception("您无权限操作");
        }else {
            String role_code = userRoles.get(0).get("role_code").toString();
            if ("admin".equals(role_code)){
@ -2584,7 +2589,6 @@ public class DailyReportUploadService {
        String sql = " select * from base_doctor_role where doctor_code='"+user+"' ";
        List<Map<String,Object>> userRoles = jdbcTemplate.queryForList(sql);
        if (userRoles.size()==0){
            throw new Exception("您无权限操作");
        }else {
            String role_code = userRoles.get(0).get("role_code").toString();
            if ("admin".equals(role_code)){
@ -2670,7 +2674,6 @@ public class DailyReportUploadService {
        String sql = " select * from base_doctor_role where doctor_code='"+user+"' ";
        List<Map<String,Object>> userRoles = jdbcTemplate.queryForList(sql);
        if (userRoles.size()==0){
            throw new Exception("您无权限操作");
        }else {
            String role_code = userRoles.get(0).get("role_code").toString();
            if ("admin".equals(role_code)){
@ -2793,7 +2796,6 @@ public class DailyReportUploadService {
        String sql = " select * from base_doctor_role where doctor_code='"+user+"' ";
        List<Map<String,Object>> userRoles = jdbcTemplate.queryForList(sql);
        if (userRoles.size()==0){
            throw new Exception("您无权限操作");
        }
        String memberSql = " ";
@ -2930,7 +2932,6 @@ public class DailyReportUploadService {
        String sql = " select * from base_doctor_role where doctor_code='"+user+"' ";
        List<Map<String,Object>> userRoles = jdbcTemplate.queryForList(sql);
        if (userRoles.size()==0){
            throw new Exception("您无权限操作");
        }else {
            String role_code = userRoles.get(0).get("role_code").toString();
            if ("admin".equals(role_code)){
@ -3038,7 +3039,6 @@ public class DailyReportUploadService {
        String sql = " select * from base_doctor_role where doctor_code='"+user+"' ";
        List<Map<String,Object>> userRoles = jdbcTemplate.queryForList(sql);
        if (userRoles.size()==0){
            throw new Exception("您无权限操作");
        }else {
            String role_code = userRoles.get(0).get("role_code").toString();
            if ("admin".equals(role_code)){
@ -3190,7 +3190,6 @@ public class DailyReportUploadService {
        String sql = " select * from base_doctor_role where doctor_code='"+user+"' ";
        List<Map<String,Object>> userRoles = jdbcTemplate.queryForList(sql);
        if (userRoles.size()==0){
            throw new Exception("您无权限操作");
        }else {
            String role_code = userRoles.get(0).get("role_code").toString();
            if ("admin".equals(role_code)){
@ -3287,7 +3286,6 @@ public class DailyReportUploadService {
        String sql = " select * from base_doctor_role where doctor_code='"+user+"' ";
        List<Map<String,Object>> userRoles = jdbcTemplate.queryForList(sql);
        if (userRoles.size()==0){
            throw new Exception("您无权限操作");
        }else {
            String role_code = userRoles.get(0).get("role_code").toString();
            if ("admin".equals(role_code)){
@ -3394,7 +3392,6 @@ public class DailyReportUploadService {
        String sql = " select * from base_doctor_role where doctor_code='"+user+"' ";
        List<Map<String,Object>> userRoles = jdbcTemplate.queryForList(sql);
        if (userRoles.size()==0){
            throw new Exception("您无权限操作");
        }else {
            String role_code = userRoles.get(0).get("role_code").toString();
            if ("admin".equals(role_code)){
@ -3593,7 +3590,6 @@ public class DailyReportUploadService {
        String sql = " select * from base_doctor_role where doctor_code='"+user+"' ";
        List<Map<String,Object>> userRoles = jdbcTemplate.queryForList(sql);
        if (userRoles.size()==0){
            throw new Exception("您无权限操作");
        }else {
            String role_code = userRoles.get(0).get("role_code").toString();
            if ("admin".equals(role_code)){
@ -3657,7 +3653,6 @@ public class DailyReportUploadService {
        sql = " select * from base_doctor_role where doctor_code='"+user+"' ";
        List<Map<String,Object>> userRoles = jdbcTemplate.queryForList(sql);
        if (userRoles.size()==0){
            throw new Exception("您无权限操作");
        }else {
            String role_code = userRoles.get(0).get("role_code").toString();
            if ("admin".equals(role_code)){
@ -3807,7 +3802,6 @@ public class DailyReportUploadService {
        String startTime = "";
        String endTime = "";
        if (userRoles.size()==0){
            throw new Exception("您无权限操作");
        }else {
            String role_code = userRoles.get(0).get("role_code").toString();
            if ("admin".equals(role_code)){

+ 6 - 0
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/service/consult/SysDictService.java

@ -7,6 +7,7 @@ import net.sf.json.JSONObject;
import org.apache.commons.collections.map.HashedMap;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import java.util.List;
@ -19,6 +20,8 @@ public class SysDictService {
    private SysDictDao sysDictDao;
    @Autowired
    private HibenateUtils hibenateUtils;
    @Value("${spring.profiles}")
    private String profiles;
    /**
     * 新增&更新社区医生邀请专家配置
@ -107,6 +110,9 @@ public class SysDictService {
            sql+=" AND a.dict_name =:dictName";
            params.put("dictName",dictName);
        }
        if ("ZjxlProd".equals(profiles)){//日报字典排序
            sql +=" order by a.saas_id asc, a.py_code asc,a.sort asc ";
        }
        List<Map<String, Object>> list = hibenateUtils.createSQLQuery(sql, params);
        return  list;
    }