Browse Source

附件上传以及评估报销编号生成调整

user5 1 year ago
parent
commit
e3b7ae9247

+ 2 - 2
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/cw/contractRegistration/service/ContractFilePaperService.java

@@ -156,7 +156,7 @@ public class ContractFilePaperService {
                 //文件类型处理
                 //文件类型处理
                 List<String> strings = Arrays.asList(dto.getName().split("\\."));
                 List<String> strings = Arrays.asList(dto.getName().split("\\."));
                 if (CollectionUtils.isNotEmpty(strings)) {
                 if (CollectionUtils.isNotEmpty(strings)) {
-                    i.setType(strings.get(1));
+                    i.setType(strings.get(strings.size()-1));
                 }
                 }
                 i.setAttachmentId(id);
                 i.setAttachmentId(id);
                 i.setAttachmentName(dto.getName());
                 i.setAttachmentName(dto.getName());
@@ -191,7 +191,7 @@ public class ContractFilePaperService {
             //文件类型处理
             //文件类型处理
             List<String> strings = Arrays.asList(dto.getName().split("\\."));
             List<String> strings = Arrays.asList(dto.getName().split("\\."));
             if (CollectionUtils.isNotEmpty(strings)) {
             if (CollectionUtils.isNotEmpty(strings)) {
-                i.setType(strings.get(1));
+                i.setType(strings.get(strings.size()-1));
             }
             }
             i.setAttachmentId(id);
             i.setAttachmentId(id);
             i.setAttachmentName(dto.getName());
             i.setAttachmentName(dto.getName());

+ 2 - 2
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/cw/contractRegistration/service/ContractFileService.java

@@ -187,7 +187,7 @@ public class ContractFileService {
                 //文件类型处理
                 //文件类型处理
                 List<String> strings = Arrays.asList(dto.getName().split("\\."));
                 List<String> strings = Arrays.asList(dto.getName().split("\\."));
                 if (CollectionUtils.isNotEmpty(strings)) {
                 if (CollectionUtils.isNotEmpty(strings)) {
-                    i.setType(strings.get(1));
+                    i.setType(strings.get(strings.size()-1));
                 }
                 }
                 i.setAttachmentId(id);
                 i.setAttachmentId(id);
                 i.setAttachmentName(dto.getName());
                 i.setAttachmentName(dto.getName());
@@ -221,7 +221,7 @@ public class ContractFileService {
             //文件类型处理
             //文件类型处理
             List<String> strings = Arrays.asList(dto.getName().split("\\."));
             List<String> strings = Arrays.asList(dto.getName().split("\\."));
             if (CollectionUtils.isNotEmpty(strings)) {
             if (CollectionUtils.isNotEmpty(strings)) {
-                i.setType(strings.get(1));
+                i.setType(strings.get(strings.size()-1));
             }
             }
             i.setAttachmentId(id);
             i.setAttachmentId(id);
             i.setAttachmentName(dto.getName());
             i.setAttachmentName(dto.getName());

+ 2 - 2
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/cw/contractRegistration/service/ContractInfoService.java

@@ -643,7 +643,7 @@ public class ContractInfoService {
             //文件类型处理
             //文件类型处理
             List<String> strings = Arrays.asList(dto.getName().split("\\."));
             List<String> strings = Arrays.asList(dto.getName().split("\\."));
             if (CollectionUtils.isNotEmpty(strings)) {
             if (CollectionUtils.isNotEmpty(strings)) {
-                i.setType(strings.get(1));
+                i.setType(strings.get(strings.size()-1));
             }
             }
             i.setAttachmentId(id);
             i.setAttachmentId(id);
             i.setAttachmentName(dto.getName());
             i.setAttachmentName(dto.getName());
@@ -695,7 +695,7 @@ public class ContractInfoService {
                 //文件类型处理
                 //文件类型处理
                 List<String> strings = Arrays.asList(dto.getName().split("\\."));
                 List<String> strings = Arrays.asList(dto.getName().split("\\."));
                 if (CollectionUtils.isNotEmpty(strings)) {
                 if (CollectionUtils.isNotEmpty(strings)) {
-                    i.setType(strings.get(1));
+                    i.setType(strings.get(strings.size()-1));
                 }
                 }
                 i.setAttachmentId(id);
                 i.setAttachmentId(id);
                 i.setAttachmentName(dto.getName());
                 i.setAttachmentName(dto.getName());

+ 2 - 2
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/cw/projectReport/service/CwProjectReportService.java

@@ -2441,7 +2441,7 @@ public class CwProjectReportService extends ServiceImpl<CwProjectReportMapper, C
                 //文件类型处理
                 //文件类型处理
                 List<String> strings = Arrays.asList(dto.getName().split("\\."));
                 List<String> strings = Arrays.asList(dto.getName().split("\\."));
                 if (org.flowable.editor.language.json.converter.util.CollectionUtils.isNotEmpty(strings)) {
                 if (org.flowable.editor.language.json.converter.util.CollectionUtils.isNotEmpty(strings)) {
-                    i.setType(strings.get(1));
+                    i.setType(strings.get(strings.size()-1));
                 }
                 }
                 i.setAttachmentId(id);
                 i.setAttachmentId(id);
                 i.setAttachmentName(dto.getName());
                 i.setAttachmentName(dto.getName());
@@ -2505,7 +2505,7 @@ public class CwProjectReportService extends ServiceImpl<CwProjectReportMapper, C
                 //文件类型处理
                 //文件类型处理
                 List<String> strings = Arrays.asList(dto.getName().split("\\."));
                 List<String> strings = Arrays.asList(dto.getName().split("\\."));
                 if (org.flowable.editor.language.json.converter.util.CollectionUtils.isNotEmpty(strings)) {
                 if (org.flowable.editor.language.json.converter.util.CollectionUtils.isNotEmpty(strings)) {
-                    i.setType(strings.get(1));
+                    i.setType(strings.get(strings.size()-1));
                 }
                 }
                 i.setAttachmentId(id);
                 i.setAttachmentId(id);
                 i.setAttachmentName(dto.getName());
                 i.setAttachmentName(dto.getName());

+ 2 - 2
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/cw/reportCancellApplyArchived/service/ReportCancellApplyArchivedService.java

@@ -354,7 +354,7 @@ public class ReportCancellApplyArchivedService extends ServiceImpl<ReportCancell
                 //文件类型处理
                 //文件类型处理
                 List<String> strings = Arrays.asList(dto.getName().split("\\."));
                 List<String> strings = Arrays.asList(dto.getName().split("\\."));
                 if (CollectionUtils.isNotEmpty(strings)) {
                 if (CollectionUtils.isNotEmpty(strings)) {
-                    i.setType(strings.get(1));
+                    i.setType(strings.get(strings.size()-1));
                 }
                 }
                 i.setAttachmentId(id);
                 i.setAttachmentId(id);
                 i.setAttachmentName(dto.getName());
                 i.setAttachmentName(dto.getName());
@@ -390,7 +390,7 @@ public class ReportCancellApplyArchivedService extends ServiceImpl<ReportCancell
             //文件类型处理
             //文件类型处理
             List<String> strings = Arrays.asList(dto.getName().split("\\."));
             List<String> strings = Arrays.asList(dto.getName().split("\\."));
             if (CollectionUtils.isNotEmpty(strings)) {
             if (CollectionUtils.isNotEmpty(strings)) {
-                i.setType(strings.get(1));
+                i.setType(strings.get(strings.size()-1));
             }
             }
             i.setAttachmentId(id);
             i.setAttachmentId(id);
             i.setAttachmentName(dto.getName());
             i.setAttachmentName(dto.getName());

+ 4 - 1
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/oss/service/OssService.java

@@ -400,8 +400,11 @@ public class OssService extends ServiceImpl<OssServiceMapper,WorkAttachment> {
             i.setUrl(dto.getUrl());
             i.setUrl(dto.getUrl());
             //文件类型处理
             //文件类型处理
             List<String> strings = Arrays.asList(dto.getName().split("\\."));
             List<String> strings = Arrays.asList(dto.getName().split("\\."));
+            /*String type=dto.getName().substring(dto.getName().lastIndexOf(".")+1,dto.getName().length());
+            i.setType(type);*/
+
             if (CollectionUtils.isNotEmpty(strings)) {
             if (CollectionUtils.isNotEmpty(strings)) {
-                i.setType(strings.get(1));
+                i.setType(strings.get(strings.size()-1));
             }
             }
             i.setAttachmentId(attachmentId);
             i.setAttachmentId(attachmentId);
             i.setAttachmentName(dto.getName());
             i.setAttachmentName(dto.getName());

+ 7 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/reimbursement/reimbursementInfo/mapper/ReimbursementInfoMapper.java

@@ -39,4 +39,11 @@ public interface ReimbursementInfoMapper extends BaseMapper<ReimbursementInfo> {
     List<ReimbursementDetailInfoProcured> getProcuredDetailList(@Param("id") String id);
     List<ReimbursementDetailInfoProcured> getProcuredDetailList(@Param("id") String id);
 
 
     List<ReimbursementDetailInfo> getDetailList(@Param("id") String id);
     List<ReimbursementDetailInfo> getDetailList(@Param("id") String id);
+
+    /**
+     * 根据id查询报销编号
+     * @param id
+     * @return
+     */
+    String getNumberById(String id);
 }
 }

+ 4 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/reimbursement/reimbursementInfo/mapper/xml/ReimbursementInfoMapper.xml

@@ -312,4 +312,8 @@
 		order by a.number asc
 		order by a.number asc
 	</select>
 	</select>
 
 
+	<select id="getNumberById" resultType="java.lang.String">
+		select no from reimbursement_info where id = #{id}
+	</select>
+
 </mapper>
 </mapper>

+ 9 - 1
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/reimbursement/reimbursementInfo/service/ReimbursementInfoService.java

@@ -337,10 +337,18 @@ public class ReimbursementInfoService {
         return info;
         return info;
     }
     }
 
 
-    public ReimbursementInfo update(SaveInfoDto dto, UserDTO userDTO) {
+    public ReimbursementInfo update(SaveInfoDto dto, UserDTO userDTO) throws Exception {
         // 修改基础信息
         // 修改基础信息
         ReimbursementInfo info = new ReimbursementInfo();
         ReimbursementInfo info = new ReimbursementInfo();
         BeanUtils.copyProperties(dto, info);
         BeanUtils.copyProperties(dto, info);
+        //根据报销id 查询该报销信息是否存在报销编号
+        String oldNumber = infoMapper.getNumberById(dto.getId());
+        if(StringUtils.isBlank(oldNumber)){
+            // 生成编号
+            String number = serialnumTplService.genSerialNum(userDTO.getCompanyDTO().getId(), dto.BIZ_CODE);
+            info.setNo(number);
+        }
+
         info.setUpdateBy(userDTO.getId());
         info.setUpdateBy(userDTO.getId());
         info.setUpdateDate(new Date());
         info.setUpdateDate(new Date());
         infoMapper.updateById(info);
         infoMapper.updateById(info);

+ 3 - 3
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/workContract/service/WorkContractService.java

@@ -215,7 +215,7 @@ public class WorkContractService {
             //文件类型处理
             //文件类型处理
             List<String> strings = Arrays.asList(dto.getName().split("\\."));
             List<String> strings = Arrays.asList(dto.getName().split("\\."));
             if (CollectionUtils.isNotEmpty(strings)) {
             if (CollectionUtils.isNotEmpty(strings)) {
-                i.setType(strings.get(1));
+                i.setType(strings.get(strings.size()-1));
             }
             }
             i.setAttachmentId(id);
             i.setAttachmentId(id);
             i.setAttachmentName(dto.getName());
             i.setAttachmentName(dto.getName());
@@ -249,7 +249,7 @@ public class WorkContractService {
             //文件类型处理
             //文件类型处理
             List<String> strings = Arrays.asList(dto.getName().split("\\."));
             List<String> strings = Arrays.asList(dto.getName().split("\\."));
             if (CollectionUtils.isNotEmpty(strings)) {
             if (CollectionUtils.isNotEmpty(strings)) {
-                i.setType(strings.get(1));
+                i.setType(strings.get(strings.size()-1));
             }
             }
             i.setAttachmentId(id);
             i.setAttachmentId(id);
             i.setAttachmentName(dto.getName());
             i.setAttachmentName(dto.getName());
@@ -301,7 +301,7 @@ public class WorkContractService {
                 //文件类型处理
                 //文件类型处理
                 List<String> strings = Arrays.asList(dto.getName().split("\\."));
                 List<String> strings = Arrays.asList(dto.getName().split("\\."));
                 if (CollectionUtils.isNotEmpty(strings)) {
                 if (CollectionUtils.isNotEmpty(strings)) {
-                    i.setType(strings.get(1));
+                    i.setType(strings.get(strings.size()-1));
                 }
                 }
                 i.setAttachmentId(id);
                 i.setAttachmentId(id);
                 i.setAttachmentName(dto.getName());
                 i.setAttachmentName(dto.getName());

+ 1 - 1
jeeplus-platform/jeeplus-admin/src/main/java/com/jeeplus/sys/controller/UserController.java

@@ -238,7 +238,7 @@ public class UserController {
         if(StringUtils.isNotBlank(userDTO.getCertType()) && "6".equals(userDTO.getCertType())){
         if(StringUtils.isNotBlank(userDTO.getCertType()) && "6".equals(userDTO.getCertType())){
             List<UserDTO> userList = result.getRecords();
             List<UserDTO> userList = result.getRecords();
             for (UserDTO info : userList) {
             for (UserDTO info : userList) {
-                if("潘中".equals(info.getName())){
+                if("潘中".equals(info.getName()) || "张宁".equals(info.getName()) || "孙文宝".equals(info.getName())){
                     info.setAccountantUserFlag(0);
                     info.setAccountantUserFlag(0);
                 }else{
                 }else{
                     info.setAccountantUserFlag(1);
                     info.setAccountantUserFlag(1);

+ 7 - 1
jeeplus-web/src/main/resources/application-production.yml

@@ -148,7 +148,13 @@ swagger:
   enable: false
   enable: false
 #cas服务端的地址
 #cas服务端的地址
 cas:
 cas:
-  server-url-prefix: https://www.cainiao.com:8443/cas
+  server_host_url: http://www.casserver.com:8443
+  server_host_login_url: http://www.casserver.com:8443/login
+  server_host_logout_url: http://www.casserver.com:8443/logout?service=http://127.0.0.1:8084/sys/casLogin
+  app_server_host_url: http://127.0.0.1:8084
+  app_login_url: /login
+  app_logout_url: /logout
+  useSingleLogout: true
 #oss配置
 #oss配置
 config:
 config:
   accessory:
   accessory: