Quellcode durchsuchen

会计开票功能导出调整和手机号登录报错问题

huangguoce vor 2 Monaten
Ursprung
Commit
87638cffb9

+ 9 - 1
jeeplus-auth/src/main/java/com/jeeplus/auth/controller/LoginController.java

@@ -84,7 +84,15 @@ public class LoginController {
         String username = loginForm.getUsername ( );
         String password = loginForm.getPassword ( );
         String code = loginForm.getCode ( );
-        Integer redisLoginNumber = (Integer) RedisUtils.getInstance ().get ( CacheNames.USER_CACHE_LOGIN_CODE + loginUserName );
+        Object redisValue = RedisUtils.getInstance().get(CacheNames.USER_CACHE_LOGIN_CODE + loginUserName);
+        Integer redisLoginNumber = null;
+
+        if (redisValue != null) {
+            redisLoginNumber = Integer.valueOf(redisValue.toString());
+        } else {
+            // Redis 里没有这个键,给一个默认值,比如 0
+            redisLoginNumber = 0;
+        }
         if(null == redisLoginNumber){
             redisLoginNumber = 0;
         }else{

+ 18 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/invoice/controller/CwFinanceInvoiceController.java

@@ -404,6 +404,24 @@ public class CwFinanceInvoiceController {
         Map<String,Object> invoiceStatusValueDTOs = JSON.parseObject(invoiceStatusDatas, new TypeReference<Map<String,Object>>() {});
 
         for (CwFinanceInvoiceDTO info : resultList) {
+            //处理开票类型
+            String billingType = info.getBillingType();
+            if(StringUtils.isNotBlank(billingType)){
+                switch (billingType){
+                    case "1":
+                        info.setBillingType("企业开票");
+                        break;
+                    case "2":
+                        info.setBillingType("个人开票");
+                        info.setBillingWorkplaceReal(info.getName());
+                        break;
+                    default:
+                        info.setBillingType("");
+                        break;
+                }
+            }
+
+
             if(StringUtils.isNotBlank(info.getReportType())){
                 for (String key : cwWorkClientReportTypeValueDTOs.keySet()) {
                     if(info.getReportType().equals(key)){

+ 11 - 5
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/invoice/service/dto/CwFinanceInvoiceDTO.java

@@ -39,9 +39,15 @@ public class CwFinanceInvoiceDTO extends BaseDTO {
     private String reportNos;
 
     /**
+     * 开票类型
+     */
+    @Excel(name = "开票类型",width = 25)
+    private String billingType;
+
+    /**
      * 实际开票单位
      */
-    @Excel(name = "实际开票单位",width = 25)
+    @Excel(name = "实际开票单位/个人",width = 25)
     private String billingWorkplaceReal;
 
     /**
@@ -128,10 +134,10 @@ public class CwFinanceInvoiceDTO extends BaseDTO {
      */
     private String remarks;
 
-    /**
-     * 开票类型
-     */
-    private String billingType;
+//    /**
+//     * 开票类型
+//     */
+//    private String billingType;
 
 
     /**