فهرست منبع

修改财务核算成本上传时空的bug

seyason 2 سال پیش
والد
کامیت
c2d0c0e8d5

+ 108 - 0
fhKeeper/formulahousekeeper/application-mld.yml

@@ -0,0 +1,108 @@
+# 重庆美莱德服务器配置
+server:
+  port: 10010
+  tomcat:
+    uri-encoding: utf-8
+    max-http-form-post-size: -1
+    connection-timeout: 18000000s
+spring:
+  servlet:
+    multipart:
+      # 配置上传文件的大小设置
+      # Single file max size  即单个文件大小
+      max-file-size: 100MB
+      max-request-size: 100MB
+  datasource:
+    driver-class-name: com.mysql.cj.jdbc.Driver
+    url: jdbc:mysql://10.1.10.33:3306/man_mld?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8&rewriteBatchedStatements=true&&useSSL=false
+    username: root
+    password: Mld2022@#
+    hikari:
+      maximum-pool-size: 10
+      minimum-idle: 3
+      max-lifetime: 30000
+      connection-test-query: SELECT 1
+    #######redis配置######
+    # redis
+    redis:
+      host: 127.0.0.1
+      port: 6379
+      timeout: 3
+      # password:
+      pool:
+        minIdle: 1
+        maxIdle: 10
+        maxWait: 3
+        maxActive: 8
+    ####全局配置时间返回格式#####
+  jackson:
+    #参数意义:
+    #JsonInclude.Include.ALWAYS       默认
+    #JsonInclude.Include.NON_DEFAULT   属性为默认值不序列化
+    #JsonInclude.Include.NON_EMPTY     属性为 空(””) 或者为 NULL 都不序列化
+    #JsonInclude.Include.NON_NULL      属性为NULL  不序列化
+    default-property-inclusion: ALWAYS
+    time-zone: GMT+8
+    date-format: yyyy-MM-dd HH:mm:ss
+
+##########日志配置
+logging:
+  level:
+    root: info
+    org.mybatis: error
+    java.sql: error
+    org.springframework.web: error
+    #打印sql语句
+    com.management.platform.mapper: error
+  path: /log/
+  file: worktime.log
+##########
+mybatis-plus:
+  #  mapper-locations: classpath:mapper/*/*.xml
+  #  #实体扫描,多个package用逗号或者分号分隔
+  #  typeAliasesPackage: com.hssx.cloudmodel
+  global-config:
+    #主键类型  0:"数据库ID自增", 1:"用户输入ID",2:"全局唯一ID (数字类型唯一ID)", 3:"全局唯一ID UUID";
+    id-type: 0
+    #字段策略 0:"忽略判断",1:"非 NULL 判断"),2:"非空判断"
+    field-strategy: 2
+    db-column-underline: true
+    refresh-mapper:
+    #################插入和更新非null判断
+    db-config:
+      insert-strategy: not_null
+      update-strategy: not_null
+  configuration:
+    map-underscore-to-camel-case: true
+    cache-enabled: false
+######mybstis配置#######
+mybatis:
+  type-aliases-package: com.management.platform.entity
+  mapper-locations: mappers/*Mapper.xml
+#####配置图片上传路径####
+upload:
+  path: /www/staticproject/timesheet/upload/
+
+
+
+
+
+##actuator健康检查配置
+management:
+  security:
+    enabled:false:
+  server:
+    port: 10011
+  #  endpoints:
+  #    web:
+  #      exposure:
+  #        include: "*"
+
+  health:
+    redis:
+      enabled: false
+
+configEnv:
+  isDev: false
+  # 是否是私有化部署,企业内部应用
+  isPrivateDeploy: true

+ 1 - 1
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/WeiXinCorpController.java

@@ -3620,7 +3620,7 @@ public class WeiXinCorpController {
         data.put("main_title", mainTitle);
         JSONObject cardImg = new JSONObject();
         cardImg.put("url", "http://www.ttkuaiban.com/card_img.png");
-        cardImg.put("aspect_ratio", 2.23);
+        cardImg.put("aspect_ratio", 2.35);
         data.put("card_image", cardImg);
         JSONArray array = new JSONArray();
         JSONObject docItem = new JSONObject();

+ 11 - 11
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/FinanceServiceImpl.java

@@ -254,7 +254,7 @@ public class FinanceServiceImpl extends ServiceImpl<FinanceMapper, Finance> impl
                     if (salaryCell != null) {
                         salaryCell.setCellType(CellType.STRING);
                         String item = salaryCell.getStringCellValue();
-                        BigDecimal value = item != null ? new BigDecimal(item.trim().replaceAll("\\u00a0", "")) : BigDecimal.valueOf(0);
+                        BigDecimal value = !StringUtils.isEmpty(item) ? new BigDecimal(item.trim().replaceAll("\\u00a0", "")) : BigDecimal.valueOf(0);
                         finance.setMonthCost(value);
                         if (financeConfig.getMonthCostCalculate()==1) total = total.add(value);
                     }
@@ -268,49 +268,49 @@ public class FinanceServiceImpl extends ServiceImpl<FinanceMapper, Finance> impl
                     if (bonusCell != null) {
                         bonusCell.setCellType(CellType.STRING);
                         String bonusString = bonusCell.getStringCellValue();
-                        BigDecimal bonus = bonusString != null ? new BigDecimal(bonusString.trim().replaceAll("\\u00a0", "")) : BigDecimal.valueOf(0);
+                        BigDecimal bonus = !StringUtils.isEmpty(bonusString) ? new BigDecimal(bonusString.trim().replaceAll("\\u00a0", "")) : BigDecimal.valueOf(0);
                         finance.setBonus(bonus);
                         if (financeConfig.getBonusCalculate()==1) total = total.add(bonus);
                     }
                     if (allowanceCell != null) {
                         allowanceCell.setCellType(CellType.STRING);
                         String item = allowanceCell.getStringCellValue();
-                        BigDecimal value = item != null ? new BigDecimal(item.trim().replaceAll("\\u00a0", "")) : BigDecimal.valueOf(0);
+                        BigDecimal value = !StringUtils.isEmpty(item) ? new BigDecimal(item.trim().replaceAll("\\u00a0", "")) : BigDecimal.valueOf(0);
                         finance.setAllowance(value);
                         if (financeConfig.getAllowanceCalculate()==1) total = total.add(value);
                     }
                     if (inJobCell != null) {
                         inJobCell.setCellType(CellType.STRING);
                         String item = inJobCell.getStringCellValue();
-                        BigDecimal value = item != null ? new BigDecimal(item.trim().replaceAll("\\u00a0", "")) : BigDecimal.valueOf(0);
+                        BigDecimal value = !StringUtils.isEmpty(item) ? new BigDecimal(item.trim().replaceAll("\\u00a0", "")) : BigDecimal.valueOf(0);
                         finance.setInsuranceLosejob(value);
                         if (financeConfig.getInsuranceLosejobCalculate()==1) total = total.add(value);
                     }
                     if (inMedicalCell != null) {
                         inMedicalCell.setCellType(CellType.STRING);
                         String item = inMedicalCell.getStringCellValue();
-                        BigDecimal value = item != null ? new BigDecimal(item.trim().replaceAll("\\u00a0", "")) : BigDecimal.valueOf(0);
+                        BigDecimal value = !StringUtils.isEmpty(item) ? new BigDecimal(item.trim().replaceAll("\\u00a0", "")) : BigDecimal.valueOf(0);
                         finance.setInsuranceMedical(value);
                         if (financeConfig.getInsuranceMedicalCalculate()==1) total = total.add(value);
                     }
                     if (inOldCell != null) {
                         inOldCell.setCellType(CellType.STRING);
                         String item = inOldCell.getStringCellValue();
-                        BigDecimal value = item != null ? new BigDecimal(item.trim().replaceAll("\\u00a0", "")) : BigDecimal.valueOf(0);
+                        BigDecimal value = !StringUtils.isEmpty(item)? new BigDecimal(item.trim().replaceAll("\\u00a0", "")) : BigDecimal.valueOf(0);
                         finance.setInsuranceOld(value);
                         if (financeConfig.getInsuranceOldCalculate()==1) total = total.add(value);
                     }
                     if (injuryCell != null) {
                         injuryCell.setCellType(CellType.STRING);
                         String item = injuryCell.getStringCellValue();
-                        BigDecimal value = item != null ? new BigDecimal(item.trim().replaceAll("\\u00a0", "")) : BigDecimal.valueOf(0);
+                        BigDecimal value = !StringUtils.isEmpty(item) ? new BigDecimal(item.trim().replaceAll("\\u00a0", "")) : BigDecimal.valueOf(0);
                         finance.setInsuranceInjury(value);
                         if (financeConfig.getInsuranceInjuryCalculate()==1) total = total.add(value);
                     }
                     if (houseFundCell != null) {
                         houseFundCell.setCellType(CellType.STRING);
                         String item = houseFundCell.getStringCellValue();
-                        BigDecimal value = item != null ? new BigDecimal(item.trim().replaceAll("\\u00a0", "")) : BigDecimal.valueOf(0);
+                        BigDecimal value = !StringUtils.isEmpty(item) ? new BigDecimal(item.trim().replaceAll("\\u00a0", "")) : BigDecimal.valueOf(0);
                         finance.setHouseFund(value);
                         if (financeConfig.getHouseFundCalculate()==1) total = total.add(value);
                     }
@@ -318,21 +318,21 @@ public class FinanceServiceImpl extends ServiceImpl<FinanceMapper, Finance> impl
                     if (field1 != null) {
                         field1.setCellType(CellType.STRING);
                         String item = field1.getStringCellValue();
-                        BigDecimal value = item != null ? new BigDecimal(item.trim().replaceAll("\\u00a0", "")) : BigDecimal.valueOf(0);
+                        BigDecimal value = !StringUtils.isEmpty(item) ? new BigDecimal(item.trim().replaceAll("\\u00a0", "")) : BigDecimal.valueOf(0);
                         finance.setCustomField1(value);
                         if (financeConfig.getField1Calculate() != null && financeConfig.getField1Calculate()==1) total = total.add(value);
                     }
                     if (field2 != null) {
                         field2.setCellType(CellType.STRING);
                         String item = field2.getStringCellValue();
-                        BigDecimal value = item != null ? new BigDecimal(item.trim().replaceAll("\\u00a0", "")) : BigDecimal.valueOf(0);
+                        BigDecimal value = !StringUtils.isEmpty(item) ? new BigDecimal(item.trim().replaceAll("\\u00a0", "")) : BigDecimal.valueOf(0);
                         finance.setCustomField2(value);
                         if (financeConfig.getField2Calculate() != null && financeConfig.getField2Calculate()==1) total = total.add(value);
                     }
                     if (field3 != null) {
                         field3.setCellType(CellType.STRING);
                         String item = field3.getStringCellValue();
-                        BigDecimal value = item != null ? new BigDecimal(item.trim().replaceAll("\\u00a0", "")) : BigDecimal.valueOf(0);
+                        BigDecimal value = !StringUtils.isEmpty(item) ? new BigDecimal(item.trim().replaceAll("\\u00a0", "")) : BigDecimal.valueOf(0);
                         finance.setCustomField3(value);
                         if (financeConfig.getField3Calculate() != null && financeConfig.getField3Calculate()==1) total = total.add(value);
                     }

+ 1 - 1
fhKeeper/formulahousekeeper/management-platform/src/main/resources/application.yml

@@ -15,7 +15,7 @@ spring:
       location: C:/upload/
   datasource:
     driver-class-name: com.mysql.cj.jdbc.Driver
-    url: jdbc:mysql://47.101.180.183:3306/man_hour_manager?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8&rewriteBatchedStatements=true&useSSL=false
+    url: jdbc:mysql://47.101.180.183:3306/man_dev?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8&rewriteBatchedStatements=true&useSSL=false
     username: root
     password: HuoshiDB@2022
     hikari: