Преглед изворни кода

Merge branch 'test' of jishutao/kede-server into prod

anderx пре 2 година
родитељ
комит
fd41d6babe

+ 4 - 1
src/main/java/com/goafanti/expenseAccount/service/impl/ExpenseAccountServiceImpl.java

@@ -199,11 +199,11 @@ public class ExpenseAccountServiceImpl extends BaseMybatisDao<ExpenseAccountMapp
         if (status==0)in.setProcessStatus(1);
         Admin admin = adminMapper.selectByPrimaryKey(aid);
         if (admin.getSuperiorId()==null||admin.getId().equals(admin.getSuperiorId())){
-            in.setProcessStatus(in.getProcessStatus()+1);
             String str2=String.format("重复审核人跳过[%s]。",EAProcessStatus.getDesc(in.getProcessStatus()));
             Date date=new Date();
             date.setTime(date.getTime()+1000L);
             addExpenseAccountLog(in.getId(),1,in.getProcessStatus(),aid,str2,date);
+            in.setProcessStatus(in.getProcessStatus()+1);
         }
         createExamineByProcess(in);
     }
@@ -705,6 +705,9 @@ public class ExpenseAccountServiceImpl extends BaseMybatisDao<ExpenseAccountMapp
     @Override
     public Object selectByCheckNo(String checkNo) {
         OutExpenseAccount useEa = expenseAccountMapper.selectByCheckNo(checkNo);
+        if (useEa==null){
+            throw  new BusinessException("报销编号不存在,请客对后再查询。");
+        }
         if (useEa.getProcessStatus()<3){
             throw  new BusinessException("报销单财务未审核,不可以根据编号查看打印。");
         }

+ 20 - 0
src/main/java/com/goafanti/organization/service/impl/OrganizationServiceImpl.java

@@ -11,7 +11,11 @@ import com.goafanti.core.shiro.token.TokenManager;
 import com.goafanti.organization.bo.DepOut;
 import com.goafanti.organization.bo.OrganizationListOut;
 import com.goafanti.organization.service.OrganizationService;
+import net.sourceforge.pinyin4j.PinyinHelper;
+import net.sourceforge.pinyin4j.format.HanyuPinyinOutputFormat;
+import net.sourceforge.pinyin4j.format.exception.BadHanyuPinyinOutputFormatCombination;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.cache.annotation.Cacheable;
 import org.springframework.stereotype.Service;
 
 import java.util.*;
@@ -63,6 +67,22 @@ public class OrganizationServiceImpl extends BaseMybatisDao<DepartmentMapper> im
 			hideSign=null;
 		}
 		List<DepOut> depList=departmentMapper.selectSuperId(hideSign,null,null);
+		return listSort(depList);
+	}
+
+	private List<DepOut> listSort(List<DepOut> depList) {
+		HanyuPinyinOutputFormat format=new HanyuPinyinOutputFormat();
+		Collections.sort(depList, (o1, o2) -> {
+			String str1=null;
+			String str2=null;
+			try {
+				str1= PinyinHelper.toHanYuPinyinString(o1.getName(),format," ",true);
+				str2= PinyinHelper.toHanYuPinyinString(o2.getName(),format," ",true);
+			} catch (BadHanyuPinyinOutputFormatCombination e) {
+				throw new RuntimeException(e);
+			}
+			return str1.compareTo(str2);
+		});
 		return depList;
 	}
 

+ 2 - 2
src/main/java/com/goafanti/permission/service/impl/RoleServiceImpl.java

@@ -66,10 +66,10 @@ public class RoleServiceImpl extends BaseMybatisDao<RoleMapper> implements RoleS
 			}
 		}
 		ArrayList<RoleBo> roleBos = new ArrayList<>(roleMap.values());
-		return listSrot(roleBos);
+		return listSort(roleBos);
 	}
 
-	private List<RoleBo> listSrot(ArrayList<RoleBo> roleBos) {
+	private List<RoleBo> listSort(ArrayList<RoleBo> roleBos) {
 		HanyuPinyinOutputFormat format=new HanyuPinyinOutputFormat();
 		Collections.sort(roleBos, (o1, o2) -> {
 			String str1=null;