Jelajahi Sumber

1.处理事后上传文件的bug问题
2.添加平安金额记录表
3.添加控制台数据权限表

hxl13994548489 2 tahun lalu
induk
melakukan
eed46dcc25
30 mengubah file dengan 808 tambahan dan 48 penghapusan
  1. 44 0
      sql/Online.sql
  2. 99 0
      src/main/java/com/ydtech/modules/admin/controller/kzt/KZTPermissionController.java
  3. 19 0
      src/main/java/com/ydtech/modules/admin/dao/KztDataPermissionMapper.java
  4. 10 1
      src/main/java/com/ydtech/modules/admin/dao/SysMenuMapper.java
  5. 3 1
      src/main/java/com/ydtech/modules/admin/dao/SysRoleMenuMapper.java
  6. 4 0
      src/main/java/com/ydtech/modules/admin/model/SysMenu.java
  7. 126 0
      src/main/java/com/ydtech/modules/admin/model/po/KztDataPermission.java
  8. 14 0
      src/main/java/com/ydtech/modules/admin/service/KztDataPermissionService.java
  9. 22 0
      src/main/java/com/ydtech/modules/admin/service/impl/KztDataPermissionServiceImpl.java
  10. 8 4
      src/main/java/com/ydtech/modules/admin/service/impl/SysMenuServiceImpl.java
  11. 13 1
      src/main/java/com/ydtech/modules/ins/model/pingan/respose/PingAnQuoteRespVo.java
  12. 9 0
      src/main/java/com/ydtech/modules/order/controller/PingAnOrderApiController.java
  13. 1 1
      src/main/java/com/ydtech/modules/order/dao/InsTaskImagesMapper.java
  14. 18 0
      src/main/java/com/ydtech/modules/order/dao/PinganRecordMapper.java
  15. 5 0
      src/main/java/com/ydtech/modules/order/entity/api/pingan/response/QuoteResponse.java
  16. 4 0
      src/main/java/com/ydtech/modules/order/entity/dto/InsAreaCompanyQueryDto.java
  17. 19 0
      src/main/java/com/ydtech/modules/order/entity/po/InsTaskImages.java
  18. 131 0
      src/main/java/com/ydtech/modules/order/entity/po/PinganRecord.java
  19. 2 1
      src/main/java/com/ydtech/modules/order/entity/vo/pingan/AdditionalInformation.java
  20. 3 2
      src/main/java/com/ydtech/modules/order/service/InsUploadFilesService.java
  21. 7 0
      src/main/java/com/ydtech/modules/order/service/PingAnOrderApiService.java
  22. 13 0
      src/main/java/com/ydtech/modules/order/service/PinganRecordService.java
  23. 1 1
      src/main/java/com/ydtech/modules/order/service/impl/InsUploadFilesServiceImpl.java
  24. 134 33
      src/main/java/com/ydtech/modules/order/service/impl/PingAnOrderApiServiceImpl.java
  25. 22 0
      src/main/java/com/ydtech/modules/order/service/impl/PinganRecordServiceImpl.java
  26. 21 0
      src/main/resources/mapper/modules/admin/KztDataPermissionMapper.xml
  27. 27 0
      src/main/resources/mapper/modules/admin/SysMenuMapper.xml
  28. 1 1
      src/main/resources/mapper/modules/ins/InsTaskImagesMapper.xml
  29. 5 2
      src/main/resources/mapper/modules/order/InsAreaCompanyMapper.xml
  30. 23 0
      src/main/resources/mapper/modules/order/PinganRecordMapper.xml

+ 44 - 0
sql/Online.sql

@@ -186,3 +186,47 @@ CREATE TABLE `sys_insurance_handling_settlement_month`  (
                                                             `creater_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人',
                                                             PRIMARY KEY (`id`) USING BTREE
 ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '保险手续费结算关联表' ROW_FORMAT = Dynamic;
+
+
+-- 添加平安记录表  add by  hxl
+DROP TABLE IF EXISTS `pingan_record`;
+CREATE TABLE `pingan_record`  (
+                                  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
+                                  `sub_order_no` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '子订单号',
+                                  `ahs_upc_total_premium` decimal(10, 2) NULL DEFAULT NULL COMMENT '财意险总保费',
+                                  `ahs_premium` decimal(10, 2) NULL DEFAULT NULL COMMENT '意外险保费',
+                                  `upc_premium` decimal(10, 2) NULL DEFAULT NULL COMMENT '财产险保费',
+                                  `xw_premium` decimal(10, 2) NULL DEFAULT NULL COMMENT '小微险保费',
+                                  `com_premium` decimal(10, 2) NULL DEFAULT NULL COMMENT '组合产品保费',
+                                  `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
+                                  PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
+
+-- 添加控制台数据权限表   add by  hxl
+DROP TABLE IF EXISTS `kzt_data_permission`;
+CREATE TABLE `kzt_data_permission`  (
+                                        `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
+                                        `menu_id` bigint NULL DEFAULT NULL COMMENT '菜单id',
+                                        `custom_script_flag` tinyint(1) NULL DEFAULT NULL COMMENT '是否自定义脚本',
+                                        `data_permission_id` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '数据权限字典id',
+                                        `script_content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL COMMENT '自定义脚本内容',
+                                        `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
+                                        `url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '数据访问url',
+                                        PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '控制台数据权限表' ROW_FORMAT = Dynamic;
+
+-- 平安事后文件上传资料   add by  hxl
+DROP TABLE IF EXISTS `pingan_sh_uploafile`;
+CREATE TABLE `pingan_sh_uploafile`  (
+                                        `id` bigint NOT NULL COMMENT '主键',
+                                        `sub_order_no` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '子订单id',
+                                        `document_class` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '文件大类编码',
+                                        `document_class_name` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '文件大类名称',
+                                        `is_any_one` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '是否以上之一均可【1-是,0-否】\r\n 1表示当前大类,只需要上传其中一种小类 0表示全部上传',
+                                        `document_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '文件小类编码',
+                                        `document_type_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '文件小类名称',
+                                        `is_need_during_audit` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '是否需要事中审核【1-需要,0-不需要】',
+                                        `status` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '是否上传',
+                                        `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
+                                        PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '平安事后文件上传资料' ROW_FORMAT = Dynamic;

+ 99 - 0
src/main/java/com/ydtech/modules/admin/controller/kzt/KZTPermissionController.java

@@ -0,0 +1,99 @@
+package com.ydtech.modules.admin.controller.kzt;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.ydtech.core.page.HttpResult;
+import com.ydtech.exception.SystemException;
+import com.ydtech.modules.admin.model.po.KztDataPermission;
+import com.ydtech.modules.admin.service.KztDataPermissionService;
+import com.ydtech.modules.base.controller.BaseController;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.web.bind.annotation.*;
+
+import javax.validation.Valid;
+
+/**
+ *  @version
+ *  @author: hxl
+ *  @Date: 2024/8/20 14:41
+ *  @Description: 控制台数据权限表
+ */
+@RestController
+@RequestMapping("kztDataPermission")
+@Api(tags = "控制台数据权限")
+public class KZTPermissionController extends BaseController {
+
+
+    @Autowired
+    private KztDataPermissionService kztDataPermissionService;
+
+
+
+    /**
+     *  @version
+     *  @author: hxl
+     *  @Date: 2024/8/14 18:13
+     *  @Description: 控制台角色新增和修改
+     */
+    @ApiOperation(value = "控制台角色新增和修改")
+    @PostMapping(value = "/saveOrUpdate")
+    public HttpResult saveOrUpdate(@Valid @RequestBody KztDataPermission kztDataPermission) {
+        try{
+            if(kztDataPermission!=null && kztDataPermission.getId()!=null){
+                //更新
+                KztDataPermission update = kztDataPermissionService.getById(kztDataPermission.getId());
+                update.setCustomScriptFlag(kztDataPermission.getCustomScriptFlag());
+                update.setDataPermissionId(kztDataPermission.getDataPermissionId());
+                update.setScriptContent(kztDataPermission.getScriptContent());
+                kztDataPermissionService.updateById(update);
+            }else{
+                kztDataPermissionService.save(kztDataPermission);
+            }
+        }catch(Exception e){
+            return HttpResult.error("操作失败");
+        }
+        return HttpResult.ok("操作成功");
+    }
+    /**
+     *  @version
+     *  @author: hxl
+     *  @Date: 2024/8/14 18:54
+     *  @Description: 控制台角色刪除
+     */
+    @ApiOperation(value = "控制台数据权限通过菜单id查询数据")
+    @PostMapping(value = "/findByMenuId")
+    @Transactional
+    public HttpResult findByMenuId(Long menuId) {
+        if(menuId==null){
+            throw  new SystemException("菜单id不能为空");
+        }
+        LambdaQueryWrapper<KztDataPermission> lqw = new LambdaQueryWrapper<>();
+        lqw.eq(KztDataPermission::getMenuId, menuId);
+        KztDataPermission kztDataPermission = kztDataPermissionService.getOne(lqw);
+        return HttpResult.ok(kztDataPermission);
+    }
+
+    /**
+     *  @version
+     *  @author: hxl
+     *  @Date: 2024/8/14 18:54
+     *  @Description: 控制台角色刪除
+     */
+    @ApiOperation(value = "控制台权限清空")
+    @GetMapping(value = "/delete")
+    @Transactional
+    public HttpResult delete(Long menuId) {
+        if(menuId==null){
+            throw  new SystemException("菜单id不能为空");
+        }
+        try{
+
+        }catch(Exception e){
+            return HttpResult.error("删除失败");
+        }
+        return HttpResult.ok("删除成功");
+    }
+
+}

+ 19 - 0
src/main/java/com/ydtech/modules/admin/dao/KztDataPermissionMapper.java

@@ -0,0 +1,19 @@
+package com.ydtech.modules.admin.dao;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.ydtech.modules.admin.model.po.KztDataPermission;
+
+
+/**
+* @author Administrator
+* @description 针对表【kzt_data_permission】的数据库操作Mapper
+* @createDate 2024-08-20 11:56:29
+* @Entity generator.domain.KztDataPermission
+*/
+public interface KztDataPermissionMapper extends BaseMapper<KztDataPermission> {
+
+}
+
+
+
+

+ 10 - 1
src/main/java/com/ydtech/modules/admin/dao/SysMenuMapper.java

@@ -3,9 +3,18 @@ package com.ydtech.modules.admin.dao;
 
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.ydtech.modules.admin.model.SysMenu;
+import org.apache.ibatis.annotations.Param;
 
-public interface SysMenuMapper extends BaseMapper<SysMenu> {
+import java.util.List;
 
+public interface SysMenuMapper extends BaseMapper<SysMenu> {
+    /**
+     *  @version
+     *  @author: hxl
+     *  @Date: 2024/8/19 21:05
+     *  @Description: 查询数据
+     */
+    List<SysMenu> findBySysTypeList(@Param("sysType") String sysType, @Param("delFlag") String delFlag);
 }
 
 

+ 3 - 1
src/main/java/com/ydtech/modules/admin/dao/SysRoleMenuMapper.java

@@ -22,7 +22,9 @@ public interface SysRoleMenuMapper extends BaseMapper<SysRoleMenu> {
     List<SysMenu> gainSysMenuIds(@Param("userId") String userId);
 
 
-    String SysMenuSql_kzt = "select t.id, t.name, t.parent_id, t.url, t.perms, t.type, t.icon, t.order_num, t.create_by, t.create_time, t.last_update_by, t.last_update_time, t.del_flag from sys_menu t ";
+    String SysMenuSql_kzt = "select t.id, t.name, t.parent_id, t.url, t.perms, t.type, t.icon, t.order_num, t.create_by, t.create_time, t.last_update_by, t.last_update_time, t.del_flag,p.parent_id as parentId," +
+            " pp.NAME AS parentName," +
+            " pp.url AS parentUrl  from sys_menu t  left join sys_menu pp ON t.parent_id = pp.id ";
     String sysRoleMenuIdSql_kzt = " where t.id in (select menu_id from sys_role_menu t1 left join sys_user_role t2 on t1.role_id=t2.role_id where t2.user_id='${userId}') and del_flag=0  and  t.sys_type='${sysType}'";
     String SysMenuSqlT1_kzt = SysMenuSql + sysRoleMenuIdSql;
 

+ 4 - 0
src/main/java/com/ydtech/modules/admin/model/SysMenu.java

@@ -50,6 +50,10 @@ public class SysMenu implements Serializable {
     // 非数据库字段
     @TableField(exist = false)
     private String parentName;
+
+    // 非数据库字段
+    @TableField(exist = false)
+    private String parentUrl;
     // 非数据库字段
     @TableField(exist = false)
     private Integer level;

+ 126 - 0
src/main/java/com/ydtech/modules/admin/model/po/KztDataPermission.java

@@ -0,0 +1,126 @@
+package com.ydtech.modules.admin.model.po;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.NotNull;
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * 
+ * @TableName kzt_data_permission
+ */
+@TableName(value ="kzt_data_permission")
+@Data
+@ApiModel(value = "数据权限")
+public class KztDataPermission implements Serializable {
+    /**
+     * 主键
+     */
+    @TableId(type = IdType.AUTO)
+    @ApiModelProperty(value = "id")
+    private Long id;
+
+    /**
+     * 菜单id
+     */
+    @ApiModelProperty(value = "菜单id")
+    @NotNull(message = "菜单id不能为空")
+    private Long menuId;
+
+    /**
+     * 是否自定义脚本
+     */
+    @ApiModelProperty(value = "是否自定义脚本")
+    @NotNull(message = "是否自定义脚本不能为空")
+    private Integer customScriptFlag;
+
+    /**
+     * 数据权限字典id
+     */
+    @ApiModelProperty(value = "数据权限字典id")
+    private String dataPermissionId;
+
+    /**
+     * 自定义脚本内容
+     */
+    @ApiModelProperty(value = "自定义脚本内容")
+    private String scriptContent;
+
+    /**
+     * 创建时间
+     */
+    @ApiModelProperty(value = "不用传后台生成")
+    private Date createTime;
+
+    /**
+     * 访问的url
+     */
+    @NotBlank(message = "访问的url不能为空")
+    @ApiModelProperty(value = "访问的url")
+    private String url;
+
+
+    @TableField(exist = false)
+    private static final long serialVersionUID = 1L;
+
+    @Override
+    public boolean equals(Object that) {
+        if (this == that) {
+            return true;
+        }
+        if (that == null) {
+            return false;
+        }
+        if (getClass() != that.getClass()) {
+            return false;
+        }
+        KztDataPermission other = (KztDataPermission) that;
+        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
+            && (this.getMenuId() == null ? other.getMenuId() == null : this.getMenuId().equals(other.getMenuId()))
+            && (this.getCustomScriptFlag() == null ? other.getCustomScriptFlag() == null : this.getCustomScriptFlag().equals(other.getCustomScriptFlag()))
+            && (this.getDataPermissionId() == null ? other.getDataPermissionId() == null : this.getDataPermissionId().equals(other.getDataPermissionId()))
+            && (this.getScriptContent() == null ? other.getScriptContent() == null : this.getScriptContent().equals(other.getScriptContent()))
+             && (this.getUrl() == null ? other.getUrl() == null : this.getUrl().equals(other.getUrl()))
+             && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()));
+    }
+
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
+        result = prime * result + ((getMenuId() == null) ? 0 : getMenuId().hashCode());
+        result = prime * result + ((getCustomScriptFlag() == null) ? 0 : getCustomScriptFlag().hashCode());
+        result = prime * result + ((getDataPermissionId() == null) ? 0 : getDataPermissionId().hashCode());
+        result = prime * result + ((getScriptContent() == null) ? 0 : getScriptContent().hashCode());
+        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
+        result = prime * result + ((getUrl() == null) ? 0 : getUrl().hashCode());
+        return result;
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", id=").append(id);
+        sb.append(", menuId=").append(menuId);
+        sb.append(", customScriptFlag=").append(customScriptFlag);
+        sb.append(", dataPermissionId=").append(dataPermissionId);
+        sb.append(", scriptContent=").append(scriptContent);
+        sb.append(", createTime=").append(createTime);
+        sb.append(", url=").append(url);
+        sb.append(", serialVersionUID=").append(serialVersionUID);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 14 - 0
src/main/java/com/ydtech/modules/admin/service/KztDataPermissionService.java

@@ -0,0 +1,14 @@
+package com.ydtech.modules.admin.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.ydtech.modules.admin.model.po.KztDataPermission;
+
+
+/**
+* @author Administrator
+* @description 针对表【kzt_data_permission】的数据库操作Service
+* @createDate 2024-08-20 11:56:29
+*/
+public interface KztDataPermissionService extends IService<KztDataPermission> {
+
+}

+ 22 - 0
src/main/java/com/ydtech/modules/admin/service/impl/KztDataPermissionServiceImpl.java

@@ -0,0 +1,22 @@
+package com.ydtech.modules.admin.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.ydtech.modules.admin.dao.KztDataPermissionMapper;
+import com.ydtech.modules.admin.model.po.KztDataPermission;
+import com.ydtech.modules.admin.service.KztDataPermissionService;
+import org.springframework.stereotype.Service;
+
+/**
+* @author Administrator
+* @description 针对表【kzt_data_permission】的数据库操作Service实现
+* @createDate 2024-08-20 11:56:29
+*/
+@Service
+public class KztDataPermissionServiceImpl extends ServiceImpl<KztDataPermissionMapper, KztDataPermission>
+    implements KztDataPermissionService {
+
+}
+
+
+
+

+ 8 - 4
src/main/java/com/ydtech/modules/admin/service/impl/SysMenuServiceImpl.java

@@ -28,6 +28,9 @@ public class SysMenuServiceImpl extends ServiceImpl<SysMenuMapper, SysMenu>
     @Autowired
     private SysRoleMenuKztService sysRoleMenuKztService;
 
+    @Autowired
+    private SysMenuMapper sysMenuMapper;
+
 
     @Override
     public List<SysMenu> findTree(String userName, int menuType) {
@@ -140,10 +143,11 @@ public class SysMenuServiceImpl extends ServiceImpl<SysMenuMapper, SysMenu>
         List<SysMenu> sysMenus = new ArrayList<>();
         List<SysMenu> menus  =new ArrayList<>();
         if(StringUtils.isBlank(userId) || (StringUtils.isNotBlank(userId) && "admin".equals(userId))){
-            LambdaQueryWrapper<SysMenu> lqw = new LambdaQueryWrapper<>();
-            lqw.eq(SysMenu::getDelFlag, 0);
-            lqw.eq(SysMenu::getSysType, sysType);
-            menus = list(lqw);
+          //  LambdaQueryWrapper<SysMenu> lqw = new LambdaQueryWrapper<>();
+          //  lqw.eq(SysMenu::getDelFlag, 0);
+           // lqw.eq(SysMenu::getSysType, sysType);
+            menus= sysMenuMapper.findBySysTypeList(sysType,"0");
+           // menus = list(lqw);
         }else{
             return sysRoleMenuService.gainMenuIdsByUserId(userId,sysType);
         }

+ 13 - 1
src/main/java/com/ydtech/modules/ins/model/pingan/respose/PingAnQuoteRespVo.java

@@ -13,8 +13,10 @@ public class PingAnQuoteRespVo extends QuoteRespVo {
     // 小微险保费
     QuoteResponse.XwActualPremiumDTO xwActualPremium = new QuoteResponse.XwActualPremiumDTO();
 
+    QuoteResponse.CombinationPremiumDTO combinationPremium =new QuoteResponse.CombinationPremiumDTO();
+
     /***
-     * 财意险
+     *  意外
      */
     double cyPremium=0;
     /***
@@ -26,4 +28,14 @@ public class PingAnQuoteRespVo extends QuoteRespVo {
      */
     double zhPremium=0;
 
+    /***
+     * 财意险总保费
+     */
+    double ahsUpcTotalPremium=0;
+    /***
+     *  財产险
+     */
+    double ccPremium=0;
+
+
 }

+ 9 - 0
src/main/java/com/ydtech/modules/order/controller/PingAnOrderApiController.java

@@ -124,6 +124,15 @@ public class PingAnOrderApiController {
         return this.pingAnOrderApiService.additionalInformation(additionalInformation);
     }
 
+    @GetMapping(value = "/checkAdditional")
+    @ApiOperation(value = "事后资料补传")
+    public HttpResult<Object> checkAdditional(String companyId) throws Exception {
+        if(StringUtils.isBlank(companyId)){
+            throw new SystemException("子订单id不能为空!!");
+        }
+        return this.pingAnOrderApiService.checkAdditional(companyId);
+    }
+
     /**
      *  @version
      *  @author: hxl

+ 1 - 1
src/main/java/com/ydtech/modules/order/dao/InsTaskImagesMapper.java

@@ -25,7 +25,7 @@ public interface InsTaskImagesMapper extends BaseMapper<InsTaskImages> {
      *  @Date: 2024/8/16 20:00
      *  @Description: 通过ids查询数据
      */
-    List<InsUploadImagesDto> findByIds(@Param("list") List<String> imageList);
+    List<InsUploadImagesDto> findByIds(@Param("list") List<InsTaskImages> imageList);
 }
 
 

+ 18 - 0
src/main/java/com/ydtech/modules/order/dao/PinganRecordMapper.java

@@ -0,0 +1,18 @@
+package com.ydtech.modules.order.dao;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.ydtech.modules.order.entity.po.PinganRecord;
+
+/**
+* @author Administrator
+* @description 针对表【pingan_record】的数据库操作Mapper
+* @createDate 2024-08-20 11:26:28
+* @Entity generator.domain.PinganRecord
+*/
+public interface PinganRecordMapper extends BaseMapper<PinganRecord> {
+
+}
+
+
+
+

+ 5 - 0
src/main/java/com/ydtech/modules/order/entity/api/pingan/response/QuoteResponse.java

@@ -1603,6 +1603,11 @@ public class QuoteResponse extends PingAnBaseResponse {
          */
         private List<CombinationPremiumDetaillDTO> premiumList =new ArrayList<CombinationPremiumDetaillDTO>();
 
+        /***
+         * 组合险保费
+         */
+        private String  comPremium;
+
     }
     @Data
     public static class CombinationPremiumDetaillDTO implements Serializable {

+ 4 - 0
src/main/java/com/ydtech/modules/order/entity/dto/InsAreaCompanyQueryDto.java

@@ -16,5 +16,9 @@ public class InsAreaCompanyQueryDto extends InsAreaCompany {
      * 是否外部订单
      */
     private Integer isExternal;
+    /***
+     *  补传资料状态
+     */
+    private String fileStatus;
 
 }

+ 19 - 0
src/main/java/com/ydtech/modules/order/entity/po/InsTaskImages.java

@@ -4,6 +4,7 @@ import cn.hutool.core.date.DateTime;
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableName;
+import com.ydtech.modules.order.entity.dto.InsTaskImagesDto;
 import com.ydtech.modules.order.entity.vo.InsTaskImagesVo;
 import com.ydtech.utils.idgen.IdGenerate;
 import lombok.Data;
@@ -70,4 +71,22 @@ public class InsTaskImages implements Serializable {
         this.creator = username;
         this.createTime = DateTime.now();
     }
+
+    public InsTaskImages(InsTaskImages image, String quoteNo, String username) {
+        this.id = IdGenerate.nextId();
+        this.quoteNo = quoteNo;
+        this.imageType = image.getImageType();
+        this.imageId = image.getImageId();
+        this.creator = username;
+        this.createTime = DateTime.now();
+    }
+
+    public InsTaskImages(InsTaskImagesDto dto, String quoteNo, String username) {
+        this.id = IdGenerate.nextId();
+        this.quoteNo = quoteNo;
+        this.imageType = dto.getImageType();
+        this.imageId = dto.getImageId();
+        this.creator = username;
+        this.createTime = DateTime.now();
+    }
 }

+ 131 - 0
src/main/java/com/ydtech/modules/order/entity/po/PinganRecord.java

@@ -0,0 +1,131 @@
+package com.ydtech.modules.order.entity.po;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * 
+ * @TableName pingan_record
+ */
+@TableName(value ="pingan_record")
+@Data
+public class PinganRecord implements Serializable {
+    /**
+     * 主键
+     */
+    @TableId
+    private Long id;
+
+    /**
+     * 子订单号
+     */
+    private String subOrderNo;
+
+    /**
+     * 财意险总保费
+     */
+    private BigDecimal ahsUpcTotalPremium;
+
+    /**
+     * 意外险保费
+     */
+    private BigDecimal ahsPremium;
+
+    /**
+     * 财产险保费
+     */
+    private BigDecimal upcPremium;
+
+    /**
+     * 小微险保费
+     */
+    private BigDecimal xwPremium;
+
+    /**
+     * 组合产品保费
+     */
+    private BigDecimal comPremium;
+
+    /**
+     * 创建时间
+     */
+    private Date createTime;
+
+    @TableField(exist = false)
+    private static final long serialVersionUID = 1L;
+
+    @Override
+    public boolean equals(Object that) {
+        if (this == that) {
+            return true;
+        }
+        if (that == null) {
+            return false;
+        }
+        if (getClass() != that.getClass()) {
+            return false;
+        }
+        PinganRecord other = (PinganRecord) that;
+        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
+            && (this.getSubOrderNo() == null ? other.getSubOrderNo() == null : this.getSubOrderNo().equals(other.getSubOrderNo()))
+            && (this.getAhsUpcTotalPremium() == null ? other.getAhsUpcTotalPremium() == null : this.getAhsUpcTotalPremium().equals(other.getAhsUpcTotalPremium()))
+            && (this.getAhsPremium() == null ? other.getAhsPremium() == null : this.getAhsPremium().equals(other.getAhsPremium()))
+            && (this.getUpcPremium() == null ? other.getUpcPremium() == null : this.getUpcPremium().equals(other.getUpcPremium()))
+            && (this.getXwPremium() == null ? other.getXwPremium() == null : this.getXwPremium().equals(other.getXwPremium()))
+            && (this.getComPremium() == null ? other.getComPremium() == null : this.getComPremium().equals(other.getComPremium()))
+            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()));
+    }
+
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
+        result = prime * result + ((getSubOrderNo() == null) ? 0 : getSubOrderNo().hashCode());
+        result = prime * result + ((getAhsUpcTotalPremium() == null) ? 0 : getAhsUpcTotalPremium().hashCode());
+        result = prime * result + ((getAhsPremium() == null) ? 0 : getAhsPremium().hashCode());
+        result = prime * result + ((getUpcPremium() == null) ? 0 : getUpcPremium().hashCode());
+        result = prime * result + ((getXwPremium() == null) ? 0 : getXwPremium().hashCode());
+        result = prime * result + ((getComPremium() == null) ? 0 : getComPremium().hashCode());
+        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
+        return result;
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", id=").append(id);
+        sb.append(", subOrderNo=").append(subOrderNo);
+        sb.append(", ahsUpcTotalPremium=").append(ahsUpcTotalPremium);
+        sb.append(", ahsPremium=").append(ahsPremium);
+        sb.append(", upcPremium=").append(upcPremium);
+        sb.append(", xwPremium=").append(xwPremium);
+        sb.append(", comPremium=").append(comPremium);
+        sb.append(", createTime=").append(createTime);
+        sb.append(", serialVersionUID=").append(serialVersionUID);
+        sb.append("]");
+        return sb.toString();
+    }
+
+    public PinganRecord() {
+    }
+
+    public PinganRecord(String subOrderNo, BigDecimal ahsUpcTotalPremium, BigDecimal ahsPremium, BigDecimal upcPremium, BigDecimal xwPremium, BigDecimal comPremium, Date createTime) {
+        this.subOrderNo = subOrderNo;
+        this.ahsUpcTotalPremium = ahsUpcTotalPremium;
+        this.ahsPremium = ahsPremium;
+        this.upcPremium = upcPremium;
+        this.xwPremium = xwPremium;
+        this.comPremium = comPremium;
+        this.createTime = createTime;
+    }
+}

+ 2 - 1
src/main/java/com/ydtech/modules/order/entity/vo/pingan/AdditionalInformation.java

@@ -1,5 +1,6 @@
 package com.ydtech.modules.order.entity.vo.pingan;
 
+import com.ydtech.modules.order.entity.po.InsTaskImages;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
@@ -21,5 +22,5 @@ public class AdditionalInformation {
     private String companyId;
 
     @ApiModelProperty("影像集合id")
-    private List<String>  imageList=new ArrayList<String>();
+    private List<InsTaskImages>  imageList=new ArrayList<InsTaskImages>();
 }

+ 3 - 2
src/main/java/com/ydtech/modules/order/service/InsUploadFilesService.java

@@ -29,9 +29,10 @@ public interface InsUploadFilesService extends IService<InsUploadFiles> {
         InsUploadFiles uploadFiles1 = getById(insUploadFiles.getId());
         if (ObjectUtil.isEmpty(uploadFiles1)) {
             save(insUploadFiles);
-        }else{
-            updateById(insUploadFiles);
         }
+        //else{
+        //    updateById(insUploadFiles);
+      //  }
         return insUploadFiles;
     }
 

+ 7 - 0
src/main/java/com/ydtech/modules/order/service/PingAnOrderApiService.java

@@ -270,4 +270,11 @@ public interface PingAnOrderApiService {
      *  @Description:  事后补传资料
      */
     HttpResult<Object> additionalInformation(AdditionalInformation additionalInformation);
+    /**
+     *  @version
+     *  @author: hxl
+     *  @Date: 2024/8/20 10:45
+     *  @Description:  判断是否有需要补传的资料
+     */
+    HttpResult<Object> checkAdditional(String companyId);
 }

+ 13 - 0
src/main/java/com/ydtech/modules/order/service/PinganRecordService.java

@@ -0,0 +1,13 @@
+package com.ydtech.modules.order.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.ydtech.modules.order.entity.po.PinganRecord;
+
+/**
+* @author Administrator
+* @description 针对表【pingan_record】的数据库操作Service
+* @createDate 2024-08-20 11:26:28
+*/
+public interface PinganRecordService extends IService<PinganRecord> {
+
+}

+ 1 - 1
src/main/java/com/ydtech/modules/order/service/impl/InsUploadFilesServiceImpl.java

@@ -44,7 +44,7 @@ public class InsUploadFilesServiceImpl extends ServiceImpl<InsUploadFilesMapper,
         String fileMD5 = DigestUtils.md5Hex(multipartFile.getBytes());
         InsUploadFiles uploadFiles = getById(fileMD5);
         if (ObjectUtil.isNotEmpty(uploadFiles)) {
-           // return uploadFiles;
+            return uploadFiles;
         }
 
         // 文件上传实体

+ 134 - 33
src/main/java/com/ydtech/modules/order/service/impl/PingAnOrderApiServiceImpl.java

@@ -34,9 +34,11 @@ import com.ydtech.modules.order.entity.api.zijin.request.SubmitVerifyRequest;
 import com.ydtech.modules.order.entity.api.zijin.response.QueryClauseDataResponse;
 import com.ydtech.modules.order.entity.config.PingAnConfigureParameters;
 import com.ydtech.modules.order.entity.crawler.vo.CrawlerPolicyPrintVo;
+import com.ydtech.modules.order.entity.dto.InsTaskImagesDto;
 import com.ydtech.modules.order.entity.dto.InsUploadImagesDto;
 import com.ydtech.modules.order.entity.po.InsTaskImages;
 import com.ydtech.modules.order.entity.po.InsUploadFiles;
+import com.ydtech.modules.order.entity.po.PinganRecord;
 import com.ydtech.modules.order.entity.po.PinganShUploafile;
 import com.ydtech.modules.order.entity.vo.BaseQuoteInfoVo;
 import com.ydtech.modules.order.entity.vo.InsDrivingIntentionInsuranceVo;
@@ -113,6 +115,8 @@ public class PingAnOrderApiServiceImpl implements PingAnOrderApiService {
 
     private final PinganShUploafileService pinganShUploafileService;
 
+
+    private final  PinganRecordService  pinganRecordService;
     /**
      * @Description 获取财意险险种套餐列表  调用 4.4
      * @Author hxl
@@ -476,6 +480,8 @@ public class PingAnOrderApiServiceImpl implements PingAnOrderApiService {
         //小微险保费
         quoteRespVo.setAhsUpcActualPremium(ahsUpcActualPremium);
         quoteRespVo.setXwActualPremium(xwActualPremium);
+        quoteRespVo.setCombinationPremium(combinationPremium);
+
         List<RiskInfoVo> riskList = yaQuoteInfoVo.getRiskList();
         // 非车险
         double jyPremium = 0;
@@ -483,15 +489,24 @@ public class PingAnOrderApiServiceImpl implements PingAnOrderApiService {
             //   财意险总保费
             double ahsUpcTotalPremium = Double.parseDouble(ahsUpcActualPremium.getAhsUpcTotalPremium() == null ? "0" : ahsUpcActualPremium.getAhsUpcTotalPremium());;
             jyPremium += ahsUpcTotalPremium;
-            quoteRespVo.setCyPremium(ahsUpcTotalPremium);
+            double ahsPremium = Double.parseDouble(ahsUpcActualPremium.getAhsPremium() == null ? "0" : ahsUpcActualPremium.getAhsPremium());;
+            double upcPremium = Double.parseDouble(ahsUpcActualPremium.getUpcPremium() == null ? "0" : ahsUpcActualPremium.getUpcPremium());;
+            quoteRespVo.setAhsUpcTotalPremium(ahsUpcTotalPremium);
+            quoteRespVo.setCyPremium(ahsPremium);
+            quoteRespVo.setCcPremium(upcPremium);
         }
         if (!ObjectUtils.isEmpty(xwActualPremium)) {
             double xwPremium = Double.parseDouble(xwActualPremium.getXwPremium() == null ? "0" : xwActualPremium.getXwPremium());
             jyPremium += xwPremium;
             quoteRespVo.setXwPremium(xwPremium);
         }
-        jyPremium += zhAmount;
-        quoteRespVo.setZhPremium(zhAmount);
+        if (!ObjectUtils.isEmpty(combinationPremium)) {
+            //   财意险总保费
+            double zhPremium = Double.parseDouble(combinationPremium.getComPremium() == null ? "0" : combinationPremium.getComPremium());;
+            zhAmount = zhPremium;
+            jyPremium += zhAmount;
+            quoteRespVo.setZhPremium(zhAmount);
+        }
         //  报价险种放入保费
         List<QuoteRiskRespVo> riskList1 = QuoteRiskRespVo.toQuoteRiskRespVoList(riskList, jqPremium, syPremium);
         quoteRespVo.setRiskList(riskList1);
@@ -545,6 +560,11 @@ public class PingAnOrderApiServiceImpl implements PingAnOrderApiService {
         insAreaCompany.setJqRenewal("2".equals(carConfirmResponse.getForceRenewalType())?"1":carConfirmResponse.getForceRenewalType());
         insAreaCompany.setSyRenewal("2".equals(carConfirmResponse.getBizRenewalType())?"1":carConfirmResponse.getBizRenewalType());
         insAreaCompanyService.insertCompanyAndOrders(insAreaCompany);
+        PinganRecord pingAnRecord= new PinganRecord(insAreaCompany.getId(), new BigDecimal(quoteRespVo.getAhsUpcTotalPremium()), new BigDecimal(quoteRespVo.getCyPremium()),
+                new BigDecimal(quoteRespVo.getCcPremium()), new BigDecimal(quoteRespVo.getXwPremium()),
+                new BigDecimal(quoteRespVo.getZhPremium()), new Date());
+         //插入費用关联表
+        pinganRecordService.save(pingAnRecord);
         quoteRespVo.setCompanyId(insAreaCompany.getId());
         return HttpResult.ok("报价成功", quoteRespVo);
     }
@@ -2232,10 +2252,17 @@ public class PingAnOrderApiServiceImpl implements PingAnOrderApiService {
     @Override
     public HttpResult<Object> additionalInformation(AdditionalInformation additionalInformation) {
         String companyId = additionalInformation.getCompanyId();
+        InsAreaCompany insAreaCompany = insAreaCompanyService.getByIdIsExist(companyId);
+
+        InsOrders insOrders = insOrdersService.existOrder(insAreaCompany.getOrderno());
+        // 账号信息
+        PtlAgreementAttribution ptlAgreementAttribution = ptlAgreementAttributionService.getById(insAreaCompany.getAgreementId());
+        PingAnConfigureParameters parameters = configureParametersComponents.toEntity(PingAnConfigureParameters.class,
+                ptlAgreementAttribution);
         if(StringUtils.isBlank(companyId)){
             throw new SystemException("子订单id不能为空!!!");
         }
-        List<String> imageList = additionalInformation.getImageList();
+        List<InsTaskImages> imageList = additionalInformation.getImageList();
         if(imageList ==null  || imageList.size()==0){
             throw new SystemException("补传资料不能为空!!!");
         }
@@ -2249,43 +2276,117 @@ public class PingAnOrderApiServiceImpl implements PingAnOrderApiService {
         String errorMsg="";
         if(list ==null ||  list.size()==0){
             throw new SystemException("没有事后补传资料不必上传!!!");
-        }else{
-            msg ="需要补传资料为:";
+        }else {
+            msg = "需要补传资料为:";
             //判断上传的资料是否包含需要补传的信息资料不包含提示信息
-            List<InsUploadImagesDto> imgList = insTaskImagesMapper.findByIds(imageList);
-
-            if(imgList!=null && imgList.size()>0){
-
-                Map<String, String> map = new HashMap<>();
-                for(InsUploadImagesDto  dto :imgList){
-                    PingAnDocumentClassEnum fileEnum = PingAnDocumentClassEnum.getCode(dto.getImageType());
-                    String documentType = fileEnum.getDocumentType();
-                    map.put(documentType,documentType);
+            //刪除资料重新添加
+            List<InsTaskImages> insTaskImagesList = imageList
+                    .stream()
+                    .map(x -> new InsTaskImages(x, insOrders.getQuoteno(), insOrders.getUserid()))
+                    .collect(Collectors.toList());
+            List<InsTaskImages> imageOldList =insTaskImagesService.lambdaQuery().eq(InsTaskImages::getQuoteNo, insOrders.getQuoteno()).list();
+
+            if (!list.isEmpty()) {
+                List<String> collect = imageOldList.stream().map(InsTaskImages::getId).collect(Collectors.toList());
+                insTaskImagesService.removeBatchByIds(collect);
+            }
+            //保存
+            boolean b = insTaskImagesService.saveBatch(insTaskImagesList);
+            if(b){
+                List<InsTaskImagesDto> insTaskImagesDtos = insTaskImagesMapper.getByQuoteNoInsTaskImagesDtoList(insOrders.getQuoteno());
+                List<UploadFilesRequest.DocListDTO> docList = new ArrayList<>();
+                if (insTaskImagesDtos != null && insTaskImagesDtos.size() > 0) {
+                    Map<String, String> map = new HashMap<>();
+                    for (InsTaskImagesDto dto : insTaskImagesDtos) {
+                        PingAnDocumentClassEnum fileEnum = PingAnDocumentClassEnum.getCode(dto.getImageType());
+                        String documentType = fileEnum.getDocumentType();
+                        map.put(documentType, documentType);
+                    }
+                    for (PinganShUploafile dto : list) {
+                        String val = map.get(dto.getDocumentType());
+                        if (StringUtils.isBlank(val)) {
+                            errorMsg += dto.getDocumentClassName() + "-" + dto.getDocumentTypeName() + ";";
+                        }
+                        msg += dto.getDocumentClassName() + "-" + dto.getDocumentTypeName() + ";";
+                    }
                 }
-                for(PinganShUploafile  dto :list){
-                    String val = map.get(dto.getDocumentType());
-                    if(StringUtils.isBlank(val)){
-                        errorMsg+=dto.getDocumentClassName()+"-"+dto.getDocumentTypeName()+";";
+                if (StringUtils.isNotBlank(errorMsg)) {
+                    throw new SystemException(msg + "(" + errorMsg + "未上传)");
+                } else {
+                    List<InsTaskImages>  dtoList =new ArrayList<>();
+                    //上传文件接口
+                    for (InsTaskImagesDto dto : insTaskImagesDtos) {
+                        InsUploadFiles fiels = insUploadFilesService.getById(dto.getImageId());
+                        File file = new File(fiels.getFilePath());
+                        PingAnDocumentClassEnum fileEnum = PingAnDocumentClassEnum.getCode(dto.getImageType());
+                        String key = "";
+                        String documentClass = fileEnum.getDocument();
+                        String documentType = fileEnum.getDocumentType();
+                        String fileName = file.getName();
+                        String documentName = fileName.split("\\.")[0];
+                        String documentFormat = fileName.split("\\.")[1];
+                        if (StringUtils.isBlank(dto.getPinganKey())) {
+                            key = parameters.getUserId() + "-" + new SimpleDateFormat("yyyyMMddhhmmss").format(new Date()) + "-" + UUID.randomUUID();
+                            boolean upLoadFileFlag = PingAnUpLoadUtils.getUpLoadFile(properties.getHost(), properties.getBucket(), properties.getAk(), properties.getSk(), file, key);
+                            if (!upLoadFileFlag) {
+                                throw new SystemException("上传影像文件失败");
+                            }
+                            dto.setPinganKey(key);
+
+                        } else {
+                            key = dto.getPinganKey();
+                        }
+                        UploadFilesRequest.DocListDTO docListDTO = new UploadFilesRequest.DocListDTO(dto.getPinganKey(), documentClass, documentType, documentName, documentFormat, null);
+                        docList.add(docListDTO);
+                        InsTaskImages dtoNew = new InsTaskImages(dto, insOrders.getQuoteno(), insOrders.getUserid());
+                        dtoList.add(dtoNew);
+                    }
+                    //更新文件平安key
+                    boolean flag = insTaskImagesService.saveBatch(dtoList);
+                    //组装上传的资料信息提交
+                    UploadFilesResponse uploadFilesResponse = null;
+                    PinganApiLog pinganApiLog = new PinganApiLog(insAreaCompany.getOrderno(), insAreaCompany.getId(), insAreaCompany.getAgreementId());
+                    //调用文件上传
+                    UploadFilesRequest uploadRequest = new UploadFilesRequest(docList, insAreaCompany.getJqapplyno(), insAreaCompany.getJqapplyno(), parameters.getUserId(), "openApi");
+                    try {
+                        uploadFilesResponse = pinganRequestApiComponents.uploadFiles(uploadRequest, pinganApiLog);
+                    } catch (Exception e) {
+                        throw new SystemException(e.getMessage());
+                    }
+                    if (uploadFilesResponse != null && "0".equals(uploadFilesResponse.getResultCode())) {
+                        //将补传资料的数据更新为1
+                        List<PinganShUploafile> newList = list.stream()
+                                .map(item -> {
+                                    item.setStatus("1");
+                                    return item;
+                                })
+                                .collect(Collectors.toList());
+                        pinganShUploafileService.updateBatchById(newList);
                     }
-                    msg+=dto.getDocumentClassName()+"-"+dto.getDocumentTypeName()+";";
                 }
-                errorMsg+="未上传";
-            }
-            if(StringUtils.isNotBlank(errorMsg)){
-                throw  new SystemException(msg+"("+errorMsg+")");
-            }else{
-                //将补传资料的数据更新为1
-                List<PinganShUploafile> newList = list.stream()
-                        .map(item -> {
-                            item.setStatus("1");
-                            return item;
-                        })
-                        .collect(Collectors.toList());
-                pinganShUploafileService.updateBatchById(newList);
             }
         }
         return HttpResult.ok("补传资料成功!!");
     }
+    /**
+     *  @version
+     *  @author: hxl
+     *  @Date: 2024/8/20 10:48
+     *  @Description: 判断是否需要补传资料
+     */
+    @Override
+    public HttpResult<Object> checkAdditional(String companyId) {
+        //通过子订单id查询需要补传的数据集合
+        LambdaQueryWrapper<PinganShUploafile> queryWrapper = new LambdaQueryWrapper<>();
+        queryWrapper.eq(PinganShUploafile::getSubOrderNo, companyId);
+        queryWrapper.eq(PinganShUploafile::getStatus, "0");
+        List<PinganShUploafile> list = pinganShUploafileService.list(queryWrapper);
+        //判断前台数据是否包含所有的回传资料
+        if(list ==null ||  list.size()==0) {
+            throw new SystemException("没有事后补传资料不必上传!!!");
+        }
+        return HttpResult.ok("需要补传资料!!");
+    }
 
     /**
      * @version

+ 22 - 0
src/main/java/com/ydtech/modules/order/service/impl/PinganRecordServiceImpl.java

@@ -0,0 +1,22 @@
+package com.ydtech.modules.order.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.ydtech.modules.order.dao.PinganRecordMapper;
+import com.ydtech.modules.order.entity.po.PinganRecord;
+import com.ydtech.modules.order.service.PinganRecordService;
+import org.springframework.stereotype.Service;
+
+/**
+* @author Administrator
+* @description 针对表【pingan_record】的数据库操作Service实现
+* @createDate 2024-08-20 11:26:28
+*/
+@Service
+public class PinganRecordServiceImpl extends ServiceImpl<PinganRecordMapper, PinganRecord>
+    implements PinganRecordService {
+
+}
+
+
+
+

+ 21 - 0
src/main/resources/mapper/modules/admin/KztDataPermissionMapper.xml

@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ydtech.modules.admin.dao.KztDataPermissionMapper">
+
+    <resultMap id="BaseResultMap" type="com.ydtech.modules.admin.model.po.KztDataPermission">
+            <id property="id" column="id" jdbcType="BIGINT"/>
+            <result property="menuId" column="menu_id" jdbcType="BIGINT"/>
+            <result property="customScriptFlag" column="custom_script_flag" jdbcType="TINYINT"/>
+            <result property="dataPermissionId" column="data_permission_id" jdbcType="BIGINT"/>
+            <result property="scriptContent" column="script_content" jdbcType="VARCHAR"/>
+            <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
+             <result property="url" column="url" jdbcType="VARCHAR"/>
+    </resultMap>
+
+    <sql id="Base_Column_List">
+        id,menu_id,custom_script_flag,
+        data_permission_id,script_content,create_time,url
+    </sql>
+</mapper>

+ 27 - 0
src/main/resources/mapper/modules/admin/SysMenuMapper.xml

@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ydtech.modules.admin.dao.SysMenuMapper">
+
+
+    <select id="findBySysTypeList" resultType="com.ydtech.modules.admin.model.SysMenu">
+        SELECT
+            p.id,
+            p.NAME,
+            p.url,
+            p.perms,
+            p.type,
+            p.icon,
+            p.order_num,
+            p.parent_id as parentId,
+            pp.NAME AS parentName,
+            pp.url AS parentUrl
+        FROM
+            sys_menu p
+                LEFT JOIN sys_menu pp ON p.parent_id = pp.id
+        WHERE
+            p.del_flag = #{delFlag}
+          AND p.sys_type = #{sysType}
+    </select>
+</mapper>

+ 1 - 1
src/main/resources/mapper/modules/ins/InsTaskImagesMapper.xml

@@ -44,7 +44,7 @@
                            on i.image_id = f.id
         where f.id in
         <foreach item="item" index="index" collection="list" open="(" separator="," close=")">
-            #{item}
+            #{item.imageId}
         </foreach>
     </select>
 

+ 5 - 2
src/main/resources/mapper/modules/order/InsAreaCompanyMapper.xml

@@ -77,6 +77,7 @@
     <resultMap id="InsAreaCompanyQueryDto" type="com.ydtech.modules.order.entity.dto.InsAreaCompanyQueryDto"
                extends="BaseResultMap">
         <result property="agreementName" column="agreement_name" jdbcType="VARCHAR"/>
+        <result property="fileStatus" column="file_status" jdbcType="VARCHAR"/>
     </resultMap>
 
     <sql id="Base_Column_List">
@@ -92,7 +93,8 @@
     </sql>
 
     <select id="selectByOrderNo" resultMap="InsAreaCompanyQueryDto">
-        SELECT iac.*, pa.agreement_name
+        SELECT iac.*, pa.agreement_name,
+               (select IF(count(0)>0,'true','false') from pingan_sh_uploafile  where sub_order_no=iac.id  AND  status=0) as fileStatus
         FROM ins_area_company as iac
                  left join ptl_agreement as pa on pa.id = iac.agreement_id
                  INNER JOIN (SELECT company_id, max(createtime) AS max_createtime
@@ -104,7 +106,8 @@
     </select>
 
     <select id="selectAcceptInsurance" resultMap="InsAreaCompanyQueryDto">
-        SELECT iac.*, pa.agreement_name,io.is_external
+        SELECT iac.*, pa.agreement_name,io.is_external,
+        (select IF(count(0)>0,'true','false') from pingan_sh_uploafile  where sub_order_no=iac.id  AND  status=0) as fileStatus
         FROM ins_area_company as iac
                  left join ptl_agreement as pa on pa.id = iac.agreement_id
                 left join ins_orders io on iac.orderno=io.orderno

+ 23 - 0
src/main/resources/mapper/modules/order/PinganRecordMapper.xml

@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ydtech.modules.order.dao.PinganRecordMapper">
+
+    <resultMap id="BaseResultMap" type="com.ydtech.modules.order.entity.po.PinganRecord">
+            <id property="id" column="id" jdbcType="BIGINT"/>
+            <result property="subOrderNo" column="sub_order_no" jdbcType="VARCHAR"/>
+            <result property="ahsUpcTotalPremium" column="ahs_upc_total_premium" jdbcType="DECIMAL"/>
+            <result property="ahsPremium" column="ahs_premium" jdbcType="DECIMAL"/>
+            <result property="upcPremium" column="upc_premium" jdbcType="DECIMAL"/>
+            <result property="xwPremium" column="xw_premium" jdbcType="DECIMAL"/>
+            <result property="comPremium" column="com_premium" jdbcType="DECIMAL"/>
+            <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
+    </resultMap>
+
+    <sql id="Base_Column_List">
+        id,sub_order_no,ahs_upc_total_premium,
+        ahs_premium,upc_premium,xw_premium,
+        com_premium,create_time,url
+    </sql>
+</mapper>