liusheng
15 小时以前 5b6bd2b10c8c87b658b888f4d0384aec3ed491ce
代码提交
已添加4个文件
已修改18个文件
795 ■■■■ 文件已修改
ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceFundController.java 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/batchFundTax.puml 146 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysLoginController.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/resources/application-druid.yml 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/resources/application.yml 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-common/src/main/java/com/ruoyi/common/core/domain/model/ThirdLoginBody.java 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/SysLoginService.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-project/src/main/java/com/ruoyi/project/domain/ServiceCodeAndPyaWay.java 60 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-project/src/main/java/com/ruoyi/project/domain/ServiceFund.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-project/src/main/java/com/ruoyi/project/domain/ServiceProcessDocVO.java 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-project/src/main/java/com/ruoyi/project/domain/ServiceProcessVO.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-project/src/main/java/com/ruoyi/project/domain/ServiceReimbursement.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-project/src/main/java/com/ruoyi/project/domain/vo/FundVO.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-project/src/main/java/com/ruoyi/project/mapper/ServiceFundSharedMapper.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-project/src/main/java/com/ruoyi/project/mapper/ServiceReimbursementSharedMapper.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-project/src/main/java/com/ruoyi/project/service/IServiceFundService.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-project/src/main/java/com/ruoyi/project/service/impl/ServiceFundServiceImpl.java 177 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-project/src/main/java/com/ruoyi/project/service/impl/ServiceReimbursementServiceImpl.java 221 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-project/src/main/resources/mapper/project/ServiceFundMapper.xml 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-project/src/main/resources/mapper/project/ServiceFundSharedMapper.xml 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-project/src/main/resources/mapper/project/ServiceReimbursementMapper.xml 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-project/src/main/resources/mapper/project/ServiceReimbursementSharedMapper.xml 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceFundController.java
@@ -59,11 +59,12 @@
    @Autowired
    private IServiceFundService serviceFundService;
    @Autowired
    private IServiceFundSharedService serviceFundSharedService;
    @Autowired
    private IServiceFunddetailService serviceFunddetailService;
    @Autowired
    private IServiceFundflowruleService serviceFundflowruleService;
    @Autowired
    private IServiceFundflowService serviceFundflowService;
    @Autowired
    private IServiceDonatebaseinfoService serviceDonatebaseinfoService;
@@ -71,20 +72,10 @@
    private IServiceReimbursementService serviceReimbursementService;
    @Autowired
    private IServiceSystemmessageService iServiceSystemmessageService;
    @Autowired
    private IServiceExternalpersonService externalpersonService;
    @Autowired
    private ISysPostService postService;
    @Autowired
    private DingTalkService dingTalkService;
    @Autowired
    private ISysUserService sysUserService;
    public ServiceFundController() {
        configuration = new Configuration();
@@ -118,13 +109,32 @@
    @PostMapping("/processlog")
    public AjaxResult processlog(@RequestBody ServiceProcessVO serviceProcessVO) {
        log.info("致远系统流程退回审批日志入参:{}", serviceProcessVO);
        if (serviceProcessVO.getBackCode() == null || StringUtils.isEmpty(serviceProcessVO.getApplytype())) {
        if (serviceProcessVO.getBackCode() == null && StringUtils.isEmpty(serviceProcessVO.getApplytype())) {
            return AjaxResult.error("入能为空,请检查入参!!");
        }
        Boolean processlog = serviceFundService.processlog(serviceProcessVO);
        if (!processlog) return AjaxResult.error("审批记录失败");
        return AjaxResult.success("审批记录成功");
    }
    /**
     * ä¿®æ”¹ç¼–号与支付方式
     *
     * @param serviceCodeAndPyaWay
     * @return
     */
    @PostMapping("/updatecodepayway")
    public AjaxResult updatecodepay(@RequestBody ServiceCodeAndPyaWay serviceCodeAndPyaWay) {
        log.info("致远系统编号与支付方式入参:{}", serviceCodeAndPyaWay);
        if (StringUtils.isEmpty(serviceCodeAndPyaWay.getApplytype()) || StringUtils.isEmpty(serviceCodeAndPyaWay.getBh()) || StringUtils.isEmpty(serviceCodeAndPyaWay.getZffs())) {
            return AjaxResult.error("入能为空,请检查入参!!");
        }
        Boolean result = serviceFundService.updatecodepay(serviceCodeAndPyaWay);
        if (!result) return AjaxResult.error("修改失败");
        return AjaxResult.success("修改成功");
    }
@@ -454,9 +464,13 @@
        }
        String newTime = String.valueOf(Calendar.getInstance().getTimeInMillis());
        String name = "专家劳务费发放申请单_" + dataMap.get("XM") + "_" + newTime;
        String newName = null;
        if (Objects.isNull(dataMap.get("XM"))) {
            newName = dataMap.get("XM").toString().trim();
        }
        String name = "专家劳务费发放申请单_" + newName + "_" + newTime;
        if (dataLW.equals("4")) {
            name = "办公费用申请单_" + dataMap.get("XM") + "_" + newTime;
            name = "办公费用申请单_" + newName + "_" + newTime;
        }
        //输出文档路径及名称
ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/batchFundTax.puml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,146 @@
@startuml
!theme plain
skinparam backgroundColor white
skinparam defaultFontName Microsoft YaHei
title /batchFundTax ä¸šåŠ¡é€»è¾‘æµç¨‹å›¾
start
:用户调用 /batchFundTax æŽ¥å£;
:传入 FundTaxVO å‚æ•°;
if (fundTaxId æ˜¯å¦ä¸ºç©º?) then (是)
  :抛出异常: "分批算税出问题了,请检查后再进行计算";
  stop
else (否)
  if (addOrupdate == 1?) then (是)
    :获取最大 fundTaxId;
    note right: SQL: SELECT MAX(id) FROM service_fundtax;
    if (当前 fundTaxId != æœ€å¤§ fundTaxId?) then (是)
      :抛出异常: "该批数据不能算税";
      stop
    else (否)
      :继续执行;
    endif
  else (否)
    :继续执行;
  endif
endif
:根据 fundTaxId æŸ¥è¯¢æ‰€æœ‰ ServiceFund è®°å½•;
note right: SQL: SELECT * FROM service_fund WHERE fund_tax_id = #{fundTaxId} AND del_flag = 0;
:遍历每个 ServiceFund;
while (还有 ServiceFund æœªå¤„理?) is (是)
  :获取当前 ServiceFund çš„ fundid;
  :根据 fundid æŸ¥è¯¢æ‰€æœ‰ ServiceFunddetail;
  note right: SQL: SELECT * FROM service_funddetail WHERE fundid = #{fundid};
  while (还有 ServiceFunddetail æœªå¤„理?) is (是)
    :获取当前 ServiceFunddetail;
    if (身份证号是否为空?) then (是)
      if (servicesscopename åŒ…含"税后"?) then (是)
        :设置 amount = taxedamount;
      else (否)
        :设置 taxedamount = amount;
      endif
      :设置 taxamount = 0;
      :更新数据库;
      note right: SQL: UPDATE service_funddetail SET amount=#{amount}, taxedamount=#{taxedamount}, taxamount=0 WHERE id=#{id};
      :累加 pretaxcost å’Œ taxedcost;
    else (否)
      :获取当月第一天;
      :查询该身份证号本月最大序号;
      note right: SQL: SELECT MAX(xh) FROM service_funddetail WHERE idcardno = #{idcardno} AND tax_time >= #{firstDay} AND tax_time <= #{taxTime};
      :设置序号;
      :查询该身份证号本月累计税前、税金、税后;
      note right: SQL: SELECT SUM(amount) as amounts, SUM(taxamount) as taxAmounts, SUM(taxedamount) as taxedAmounts FROM service_funddetail a LEFT JOIN service_fund b ON a.fundid = b.id WHERE a.idcardno = #{idcardno} AND a.tax_time >= #{firstDay} AND a.tax_time <= #{taxTime} AND a.xh < #{xh} AND b.fundtaxtime <= #{fundtaxtime};
      if (temporarySave ä¸­æœ‰ç›¸åŒèº«ä»½è¯å·?) then (是)
        :累加临时保存的数据到 taxSum;
      endif
      if (servicesscopename åŒ…含"税后"?) then (是)
        :税后算税逻辑;
        :计算本次税前金额;
        :计算本次税金;
      else (否)
        :税前算税逻辑;
        :计算本次税金;
        :计算本次税后金额;
      endif
      :设置算税时间;
      :更新数据库;
      note right: SQL: UPDATE service_funddetail SET amount=#{amount}, taxamount=#{taxamount}, taxedamount=#{taxedamount}, tax_time=#{taxTime}, xh=#{xh} WHERE id=#{id};
      :累加 pretaxcost å’Œ taxedcost;
      :添加到 temporarySave;
    endif
  endwhile (否)
endwhile (否)
:更新 ServiceFund è¡¨;
note right: SQL: UPDATE service_fund SET pretaxcost=#{pretaxcost}, taxedcost=#{taxedcost}, fundtaxtime=#{fundtaxtime}, istax=1 WHERE id=#{id};
:设置 pretaxcost å’Œ taxedcost;
:设置 fundtaxtime;
:设置 istax = 1;
:返回成功;
stop
@enduml
'主要SQL语句说明:
-- 1. èŽ·å–æœ€å¤§fundTaxId
SELECT MAX(id) FROM service_fundtax;
-- 2. æ ¹æ®fundTaxId查询ServiceFund记录
SELECT * FROM service_fund
WHERE fund_tax_id = #{fundTaxId} AND del_flag = 0;
-- 3. æ ¹æ®fundid查询ServiceFunddetail记录
SELECT * FROM service_funddetail
WHERE fundid = #{fundid};
-- 4. æŸ¥è¯¢è¯¥èº«ä»½è¯å·æœ¬æœˆæœ€å¤§åºå·
SELECT MAX(xh) FROM service_funddetail
WHERE idcardno = #{idcardno}
  AND tax_time >= #{firstDay}
  AND tax_time <= #{taxTime};
-- 5. æŸ¥è¯¢è¯¥èº«ä»½è¯å·æœ¬æœˆç´¯è®¡ç¨Žå‰ã€ç¨Žé‡‘、税后(不包含本次)
SELECT
    SUM(amount) as amounts,
    SUM(taxamount) as taxAmounts,
    SUM(taxedamount) as taxedAmounts
FROM service_funddetail a
LEFT JOIN service_fund b ON a.fundid = b.id
WHERE a.idcardno = #{idcardno}
  AND a.tax_time >= #{firstDay}
  AND a.tax_time <= #{taxTime}
  AND a.xh < #{xh}
  AND b.fundtaxtime <= #{fundtaxtime};
-- 6. æ›´æ–°ServiceFunddetail记录
UPDATE service_funddetail
SET
    amount = #{amount},
    taxamount = #{taxamount},
    taxedamount = #{taxedamount},
    tax_time = #{taxTime},
    xh = #{xh}
WHERE id = #{id};
-- 7. æ›´æ–°ServiceFund记录
UPDATE service_fund
SET
    pretaxcost = #{pretaxcost},
    taxedcost = #{taxedcost},
    fundtaxtime = #{fundtaxtime},
    istax = 1
WHERE id = #{id};
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysLoginController.java
@@ -27,6 +27,7 @@
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
@@ -76,10 +77,11 @@
     */
    @PostMapping("/getToken")
    public AjaxResult openidLogin(@RequestBody ThirdLoginBody thirdLoginBody) {
        AjaxResult ajax = AjaxResult.success();
        String token = loginService.getToken(thirdLoginBody.getUsername(), thirdLoginBody.getPassword());
        ajax.put(Constants.TOKEN, token);
        return ajax;
//        AjaxResult ajax = AjaxResult.success();
        String token = loginService.getToken(thirdLoginBody.getUserName(), thirdLoginBody.getPassWord());
       Map<String,String> map=new HashMap<>();
       map.put("token",token);
        return AjaxResult.success(map);
    }
    /**
ruoyi-admin/src/main/resources/application-druid.yml
@@ -7,9 +7,9 @@
      # ä¸»åº“数据源
      master:
        # å¼€å‘环境
        url: jdbc:mysql://116.62.18.175:6002/opo?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8
        username: hxsoft
        password: Hxerp2000
        url: jdbc:mysql://116.62.18.175:6002/opo?allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8
        username: opo
        password: Smartor.2023
      # ä»Žåº“数据源
      slave:
ruoyi-admin/src/main/resources/application.yml
@@ -53,7 +53,7 @@
    # å›½é™…化资源文件路径
    basename: i18n/messages
  profiles:
    active: srm
    active: druid
  # æ–‡ä»¶ä¸Šä¼ 
  servlet:
    multipart:
@@ -124,11 +124,11 @@
  urlPatterns: /system/*,/monitor/*,/tool/*
# åå‹æµç¨‹å‘起接口
xyurl: http://{{ip}}:{{port}}/seeyon/rest/bpm/process/start
rexyurl: http://{{ip}}:{{port}}/seeyon/rest/bpm/process/restart
xyurl: http://129.88.242.39:8899/seeyon/rest/bpm/process/start
rexyurl: http://129.88.242.39:8899/seeyon/rest/bpm/process/reStart
#与协友交互的新功能开关 1开   2关
newSwitch: 2
newSwitch: 1
ruoyi-common/src/main/java/com/ruoyi/common/core/domain/model/ThirdLoginBody.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,23 @@
package com.ruoyi.common.core.domain.model;
import lombok.Data;
/**
 * ç”¨æˆ·ç™»å½•对象
 *
 * @author ruoyi
 */
@Data
public class ThirdLoginBody {
    /**
     * ç”¨æˆ·å
     */
    private String userName;
    /**
     * ç”¨æˆ·å¯†ç 
     */
    private String passWord;
}
ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/SysLoginService.java
@@ -191,8 +191,9 @@
    public String getToken(String username, String code) {
        SysUser sysUser = sysUserMapper.selectUserByDingUserId(code);
        System.out.println("sysUser的结果为:" + sysUser);
        //查出来不对的话,就返回null
        if (!sysUser.getUserName().equals(username)) return null;
        if (!sysUser.getUserName().trim().equals(username.trim())) return null;
        LoginUser loginUser = new LoginUser();
        loginUser.setUserId(sysUser.getUserId());
ruoyi-project/src/main/java/com/ruoyi/project/domain/ServiceCodeAndPyaWay.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,60 @@
package com.ruoyi.project.domain;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
/**
 * ä¿®æ”¹ç¼–号与支付方式入参
 *
 * @author ruoyi
 * @date 2022-01-24
 */
@Data
@ApiModel("编号与支付方式入参")
public class ServiceCodeAndPyaWay extends BaseEntity {
    private static final long serialVersionUID = 1L;
    /**
     * é€€å›žç¼–号(主键)
     */
    @ApiModelProperty("退回编号")
    @Excel(name = "退回编号(主键)")
    private Long backCode;
    /**
     * é€€å›žç±»åž‹     0:差旅费   1专家劳务费  2伦理专家劳务费  3医学成本  4办公费用  5绩效审批
     */
    @ApiModelProperty("退回类型     0:差旅费   1专家劳务费  2伦理专家劳务费  3医学成本  4办公费用  5绩效审批")
    @Excel(name = "退回类型     0:差旅费   1专家劳务费  2伦理专家劳务费  3医学成本  4办公费用  5绩效审批   ")
    private String applytype;
    /**
     * ç¼–号
     */
    @ApiModelProperty("编号")
    @Excel(name = "编号")
    private String bh;
    /**
     * æ”¯ä»˜æ–¹å¼
     */
    @ApiModelProperty("支付方式")
    @Excel(name = "支付方式")
    private String zffs;
    /**
     * æ”¯ä»˜æ—¥æœŸ
     */
    @ApiModelProperty("支付日期")
    @Excel(name = "支付日期")
    private String riqi;
}
ruoyi-project/src/main/java/com/ruoyi/project/domain/ServiceFund.java
@@ -393,6 +393,9 @@
    @Excel(name = "税金")
    private Double taxcost;
    @ApiModelProperty("协友要求再次发起时,带上这个值")
    private String summaryId;
}
ruoyi-project/src/main/java/com/ruoyi/project/domain/ServiceProcessDocVO.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,44 @@
package com.ruoyi.project.domain;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
 * ç¬¬ä¸‰æ–¹æµç¨‹é€€å›žå…¥å‚(致远公司退回的入参)
 *
 * @author ruoyi
 * @date 2022-01-24
 */
@Data
@ApiModel("第三方流程退回入参")
public class ServiceProcessDocVO extends BaseEntity {
    private static final long serialVersionUID = 1L;
    /**
     * é€€å›žç±»åž‹     0:差旅费   1专家劳务费  2伦理专家劳务费  3医学成本  4办公费用  5绩效审批
     */
    @ApiModelProperty("退回类型     0:差旅费   1专家劳务费  2伦理专家劳务费  3医学成本  4办公费用  5绩效审批")
    @Excel(name = "退回类型     0:差旅费   1专家劳务费  2伦理专家劳务费  3医学成本  4办公费用  5绩效审批   ")
    private String applytype;
    /**
     * é€€å›žç¼–号(主键)
     */
    @ApiModelProperty("退回编号")
    @Excel(name = "退回编号(主键)")
    private Long backCode;
//
//    /**
//     * é€€å›žåŽŸå› 
//     */
//    @ApiModelProperty("退回原因")
//    @Excel(name = "退回原因")
//    private String backReason;
}
ruoyi-project/src/main/java/com/ruoyi/project/domain/ServiceProcessVO.java
@@ -1,5 +1,6 @@
package com.ruoyi.project.domain;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
@@ -32,7 +33,7 @@
     */
    @ApiModelProperty("退回编号")
    @Excel(name = "退回编号(主键)")
    private Long backCode;
    private String backCode;
    /**
     * æµç¨‹å†…容,操作写意见建议
@@ -46,7 +47,7 @@
     */
    @ApiModelProperty("退流程结论 1:通过;2:驳回; å›žåŽŸå›  3:完结")
    @Excel(name = "流程结论 1:通过;2:驳回;")
    private Integer flowconclusion;
    private String flowconclusion;
    /**
     * å®¡æ ¸äººç¼–号
@@ -64,6 +65,7 @@
    @ApiModelProperty("校验时间")
    @Excel(name = "校验时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date checkTime;
}
ruoyi-project/src/main/java/com/ruoyi/project/domain/ServiceReimbursement.java
@@ -360,5 +360,9 @@
    @ApiModelProperty("数据是否进入shared表   0:否     1:是")
    private Integer uploadStates;
    @ApiModelProperty("协友要求再次发起时,带上这个值")
    private String summaryId;
}
ruoyi-project/src/main/java/com/ruoyi/project/domain/vo/FundVO.java
@@ -66,6 +66,7 @@
    private Long fdattachcount;
    private String fdremark;
    private String fdrecordstatus;
    private String summaryId;
    private Long del_flag;
    private String create_by;
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
ruoyi-project/src/main/java/com/ruoyi/project/mapper/ServiceFundSharedMapper.java
@@ -27,4 +27,6 @@
    List<ServiceFundShared> getFundShareInfoById(Long fundid);
    Boolean delfundsharedInfoById(@Param("fundId") Long fundId,@Param("serfunid") Long serfunid);
    Boolean updateShareByfundid(ServiceFundShared serviceFundShared);
}
ruoyi-project/src/main/java/com/ruoyi/project/mapper/ServiceReimbursementSharedMapper.java
@@ -28,4 +28,6 @@
    Boolean delResharedInfoById(Long id);
    Boolean delResharedInfoByReimid(Long reimid);
    Boolean updateReimShareByfundid(ServiceReimbursementShared serviceReimbursementShared);
}
ruoyi-project/src/main/java/com/ruoyi/project/service/IServiceFundService.java
@@ -27,6 +27,8 @@
    public Boolean processlog(ServiceProcessVO serviceProcessVO);
    public Boolean updatecodepay(ServiceCodeAndPyaWay serviceCodeAndPyaWay);
    /**
     * æŸ¥è¯¢è´¹ç”¨ç”³è¯·ä¸»åˆ—表
     *
ruoyi-project/src/main/java/com/ruoyi/project/service/impl/ServiceFundServiceImpl.java
@@ -6,6 +6,10 @@
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
import com.ruoyi.common.config.RuoYiConfig;
import com.ruoyi.common.constant.HttpStatus;
import com.ruoyi.common.core.domain.AjaxResult;
@@ -16,7 +20,6 @@
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.bean.DtoConversionUtils;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.utils.uuid.IdUtils;
import com.ruoyi.project.domain.*;
import com.ruoyi.project.domain.vo.*;
import com.ruoyi.project.mapper.*;
@@ -24,7 +27,6 @@
import com.ruoyi.system.mapper.SysUserMapper;
import com.ruoyi.system.mapper.SysUserRoleMapper;
import com.ruoyi.system.service.ISysUserService;
import com.taobao.api.ApiException;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.poi.ss.usermodel.*;
@@ -34,14 +36,12 @@
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import org.springframework.web.bind.annotation.RequestBody;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.math.BigDecimal;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.concurrent.ConcurrentHashMap;
@@ -198,7 +198,7 @@
        Long flowlevel = null;
        if (serviceProcessVO.getApplytype().equals("0")) {
            ServiceReimbursement serviceReimbursement = new ServiceReimbursement();
            serviceReimbursement.setId(serviceProcessVO.getBackCode());
            serviceReimbursement.setId(StringUtils.isNotEmpty(serviceProcessVO.getBackCode()) ? Long.valueOf(serviceProcessVO.getBackCode()) : null);
            List<ServiceReimbursement> serviceReimbursementList = iServiceReimbursementService.queryList(serviceReimbursement);
            if (CollectionUtils.isEmpty(serviceReimbursementList)) {
                log.error("serviceReimbursementList没有查到数据:{}", serviceProcessVO.getBackCode());
@@ -212,7 +212,7 @@
            applytype = "0";
        } else {
            ServiceFund serviceFund = new ServiceFund();
            serviceFund.setId(serviceProcessVO.getBackCode());
            serviceFund.setId(StringUtils.isNotEmpty(serviceProcessVO.getBackCode()) ? Long.valueOf(serviceProcessVO.getBackCode()) : null);
            List<ServiceFund> serviceFunds = queryInfoById(serviceFund);
            if (CollectionUtils.isEmpty(serviceFunds)) {
                log.error("serviceFunds没有查到数据:{}", serviceProcessVO.getBackCode());
@@ -225,22 +225,23 @@
            applytype = serviceFunds.get(0).getApplytype();
        }
        //将操作保存到fundflow表中
        ServiceFundflow serviceFundflow = new ServiceFundflow();
        serviceFundflow.setCreateBy("admin");
        serviceFundflow.setCreateTime(new Date());
        serviceFundflow.setUpdateBy("admin");
        serviceFundflow.setUpdateTime(new Date());
        serviceFundflow.setCheckusername(serviceProcessVO.getCheckusername());
        serviceFundflow.setFlowcontent(serviceProcessVO.getFlowcontent());
        serviceFundflow.setFlowconclusion(1);
        serviceFundflow.setFundtype(2);
        serviceFundflow.setFlowlevel(flowlevel.intValue());
        if (serviceProcessVO.getFlowconclusion() == 3) serviceFundflow.setFlowlevel(999);
        serviceFundflow.setApplytype(applytype);
        serviceFundflow.setFundid(serviceProcessVO.getBackCode());
        serviceFundflow.setCheckTime(serviceProcessVO.getCheckTime());
        fundflowService.save(serviceFundflow);
//        //将操作保存到fundflow表中
//        ServiceFundflow serviceFundflow = new ServiceFundflow();
//        serviceFundflow.setCreateBy("admin");
//        serviceFundflow.setCreateTime(new Date());
//        serviceFundflow.setUpdateBy("admin");
//        serviceFundflow.setUpdateTime(new Date());
//        serviceFundflow.setCheckusername(serviceProcessVO.getCheckusername());
//        serviceFundflow.setFlowcontent(serviceProcessVO.getFlowcontent());
//        serviceFundflow.setFlowconclusion(1);
//        serviceFundflow.setFundtype(2);
//        serviceFundflow.setFlowlevel(flowlevel.intValue());
//        if (StringUtils.isNotEmpty(serviceProcessVO.getFlowconclusion()) && serviceProcessVO.getFlowconclusion().equals("3"))
//            serviceFundflow.setFlowlevel(999);
//        serviceFundflow.setApplytype(applytype);
//        serviceFundflow.setFundid(StringUtils.isNotEmpty(serviceProcessVO.getBackCode()) ? Long.valueOf(serviceProcessVO.getBackCode()) : null);
//        serviceFundflow.setCheckTime(serviceProcessVO.getCheckTime());
//        fundflowService.save(serviceFundflow);
        SysUser sysUser = sysUserService.selectUserByUserName(userNo);
@@ -260,6 +261,42 @@
        serviceSystemmessage.setMessagecontent(serviceProcessVO.getFlowcontent());
        iServiceSystemmessageService.save(serviceSystemmessage);
        return true;
    }
    @Override
    public Boolean updatecodepay(ServiceCodeAndPyaWay serviceCodeAndPyaWay) {
        Integer i = null;
        if (StringUtils.isNotEmpty(serviceCodeAndPyaWay.getApplytype()) && !serviceCodeAndPyaWay.getApplytype().equals("0")) {
            ServiceFund serviceFund = new ServiceFund();
            serviceFund.setId(serviceCodeAndPyaWay.getBackCode());
            serviceFund.setBh(serviceCodeAndPyaWay.getBh());
            serviceFund.setZffs(serviceCodeAndPyaWay.getZffs());
            serviceFund.setRiqi(serviceCodeAndPyaWay.getRiqi());
            i = serviceFundMapper.updateById(serviceFund);
            ServiceFundShared serviceFundShared = new ServiceFundShared();
            serviceFundShared.setSerfunid(serviceFund.getId());
            serviceFundShared.setZffs(serviceFund.getZffs());
            serviceFundShared.setRiqi(serviceFund.getRiqi());
            serviceFundShared.setBh(serviceFund.getBh());
            serviceFundSharedMapper.updateShareByfundid(serviceFundShared);
        } else {
            ServiceReimbursement serviceReimbursement = new ServiceReimbursement();
            serviceReimbursement.setId(serviceCodeAndPyaWay.getBackCode());
            serviceReimbursement.setBh(serviceCodeAndPyaWay.getBh());
            serviceReimbursement.setZffs(serviceCodeAndPyaWay.getZffs());
            serviceReimbursement.setRiqi(serviceCodeAndPyaWay.getRiqi());
            i = serviceReimbursementMapper.updateById(serviceReimbursement);
            ServiceReimbursementShared serviceReimbursementShared = new ServiceReimbursementShared();
            serviceReimbursementShared.setReimid(serviceReimbursement.getId());
            serviceReimbursementShared.setBh(serviceReimbursement.getBh());
            serviceReimbursementShared.setZffs(serviceReimbursement.getZffs());
            serviceReimbursementShared.setRiqi(serviceReimbursement.getRiqi());
            serviceReimbursementSharedMapper.updateReimShareByfundid(serviceReimbursementShared);
        }
        if (i == 0) return false;
        return true;
    }
@@ -579,31 +616,62 @@
        data.put("data", data2);
        //模板编号,由致远方提供,该参数决定发起协同系统中哪个流程
        data.put("templateCode", "001");
        data.put("templateCode", "fybxd_rzhc_ceshi");
        //是否为待发:0:新建-发送;1:新建-保存待发
        data.put("draft", "0");
        //协同标题区附件,Long型List,值为附件的Id。Id是附件接口响应结果中fileUrl字段的值
        data.put("attachments", null);
//        data.put("attachments", null);
        //协同公文的id
        data.put("relateDoc", "col|123,456;doc|321,654");
//        data.put("relateDoc", "col|123,456;doc|321,654");
        //未设置取模板设置的标题
        data.put("subject", "null");
        ServiceFund serviceFund1 = serviceFundMapper.selectById(serviceFund.getId());
        data.put("summaryId", serviceFund1.getSummaryId());
        map.put("data", data);
        String strRes = null;
        if (!active.equals("druid")) {
            //如果是本地环境,就不调这个了
            String token = getToken();
            JSONObject json1 = JSONObject.parseObject(token);
            token = json1.get("id").toString();
            ObjectMapper objectMapper = new ObjectMapper();
            String json = null;
            if (serviceFund.getBackflowlevel() == 100L) {
                //再次发起
                strRes = HttpClientKit.postOpr(rexyurl, map.toString());
                try {
                    json = objectMapper.writeValueAsString(map);
                    log.error("-----------------再次发起的url为:{},  å…¥å‚为:{}", rexyurl + "?token=" + token, json);
                } catch (JsonProcessingException e) {
                    e.printStackTrace();
                }
                strRes = HttpClientKit.postOpr(rexyurl + "?token=" + token, json);
            } else {
                //首次发起
                strRes = HttpClientKit.postOpr(xyurl, map.toString());
                try {
                    json = objectMapper.writeValueAsString(map);
                    log.error("-----------------首次发起的url为:{},  å…¥å‚为:{}", xyurl + "?token=" + token, json);
                } catch (JsonProcessingException e) {
                    e.printStackTrace();
                }
                strRes = HttpClientKit.postOpr(xyurl + "?token=" + token, json);
                // å°†summaryId保存起来,并将该值保存到fund中,用于再次发起时,使用(协友要求,再次发起时,带上这个值)
                JsonObject root = JsonParser.parseString(strRes).getAsJsonObject();
                String code = root.get("code").getAsString();
                if ("0".equals(code)) {
                    String appBusinessData = root.getAsJsonObject("data").get("app_bussiness_data").getAsString();
                    JsonObject appDataObj = JsonParser.parseString(appBusinessData).getAsJsonObject();
                    String summaryId = appDataObj.get("summaryId").getAsString();
                    serviceFund.setSummaryId(summaryId);
                    serviceFundMapper.updateById(serviceFund);
            }
        }
        com.alibaba.fastjson2.JSONObject jsonObject = com.alibaba.fastjson2.JSONObject.parseObject(strRes);
        String code = jsonObject.getJSONObject("code").toString();
        }
        log.error("------------------strRes的值为:{}", strRes);
        JSONObject jsonObject = JSONObject.parseObject(strRes);
        String code = jsonObject.getString("code");
        if (!code.equals("0")) {
            return false;
        }
@@ -626,12 +694,12 @@
            map.put("收益人家属或专家", serviceFunddetailShared.getBeneficiaryname());
            map.put("税后金额", serviceFunddetailShared.getTaxamount());
            map.put("作废最终金额", null);
            String fpuuid = IdUtils.simpleUUID();
            Long fpuuid = System.currentTimeMillis() + 5;
            map.put("发票附件", fpuuid);
            map.put("发票识别", null);
            map.put("识别人", null);
            map.put("税额", null);
            String qtuuid = IdUtils.simpleUUID();
            long qtuuid = System.currentTimeMillis() + 20;
            map.put("其他附件", qtuuid);
            map.put("项目编码", serviceFunddetailShared.getItemcode());
            map.put("预算项目", null);
@@ -682,7 +750,7 @@
        formmain_0831.put("报销人员", serviceFundShared.getUsername());
        formmain_0831.put("业务区域", serviceFundShared.getDeptmentname());
        formmain_0831.put("经手人", serviceFundShared.getUsername());
        formmain_0831.put("填表时间", serviceFundShared.getApplyTime());
        formmain_0831.put("填表时间", new SimpleDateFormat("yyyy-MM-dd HH:mm").format(serviceFundShared.getApplyTime()));
        formmain_0831.put("报销金额合计", serviceFundShared.getPretaxcost());
        formmain_0831.put("上传附件", null);
        formmain_0831.put("备注", null);
@@ -715,7 +783,7 @@
        formmain_0831.put("凭证类别", null);
        formmain_0831.put("税后金额合计", serviceFundShared.getTaxedcost());
        formmain_0831.put("历史审批记录", null);
        formmain_0831.put("表单编号", serviceFundShared.getBh());
        formmain_0831.put("表单编号", serviceFundShared.getSerfunid());
        formmain_0831.put("历史审批单查询", null);
        return formmain_0831;
    }
@@ -1530,18 +1598,19 @@
    int uploadOAFileAndUpdateDb(ServiceFunddetailShared remShare) throws Exception {
        //上传OA文件
        String strUrl = "http://129.88.242.39:8899/seeyon/rest/token";
        //上传文件成功后,去更新相关的数据库
        Map<String, Object> map = new HashMap<String, Object>();
        map.put("userName", "opo");
        map.put("password", "4126407a-9821-4874-be41-6568abd6dbe5");
        map.put("loginName", "demo3");
//        String strUrl = "http://129.88.242.39:8899/seeyon/rest/token";
//        //上传文件成功后,去更新相关的数据库
//        Map<String, Object> map = new HashMap<String, Object>();
//        map.put("userName", "opo");
//        map.put("password", "4126407a-9821-4874-be41-6568abd6dbe5");
//        map.put("loginName", "demo3");
//
//        JSONObject jsonObj = new JSONObject(map);
//
//        System.out.println("uploadOAFileAndUpdateDb + jsonObject" + jsonObj.toString() + "\r\n" + jsonObj.toJSONString());
//        String strRes = HttpClientKit.postOpr(strUrl, jsonObj.toString());//
        String strRes = getToken();
        JSONObject jsonObj = new JSONObject(map);
        System.out.println("uploadOAFileAndUpdateDb + jsonObject" + jsonObj.toString() + "\r\n" + jsonObj.toJSONString());
        String strRes = HttpClientKit.postOpr(strUrl, jsonObj.toString());//
        //String strRes = HttpClientKit.postMsg(strUrl,jsonObj);//得到返回的token?
        JSONObject json1 = JSONObject.parseObject(strRes);
        strRes = json1.get("id").toString();
@@ -1563,6 +1632,22 @@
        //发票附件
        uploadFile(filePath, strFUrl, invoicefilesList, invoicefilesArray, remShare, "2");
        return 0;
    }
    private String getToken() {
        //上传OA文件
        String strUrl = "http://129.88.242.39:8899/seeyon/rest/token";
        //上传文件成功后,去更新相关的数据库
        Map<String, Object> map = new HashMap<String, Object>();
        map.put("userName", "opo");
        map.put("password", "4126407a-9821-4874-be41-6568abd6dbe5");
        map.put("loginName", "demo");
        JSONObject jsonObj = new JSONObject(map);
        System.out.println("uploadOAFileAndUpdateDb + jsonObject" + jsonObj.toString() + "\r\n" + jsonObj.toJSONString());
        String strRes = HttpClientKit.postOpr(strUrl, jsonObj.toString());
        return strRes;
    }
@@ -1685,12 +1770,12 @@
        serviceFundflow.setCreateTime(new Date());
        serviceFundflow.setUpdateTime(new Date());
        serviceFundflow.setFlowcontent(serviceProcessVO.getFlowcontent());
        serviceFundflow.setFlowconclusion(serviceProcessVO.getFlowconclusion());
        serviceFundflow.setFlowconclusion(StringUtils.isNotEmpty(serviceProcessVO.getFlowconclusion()) ? Integer.valueOf(serviceProcessVO.getFlowconclusion()) : null);
        if (serviceProcessVO.getApplytype() == "0") serviceFundflow.setFundtype(1);
        if (serviceProcessVO.getApplytype() == "1") serviceFundflow.setFundtype(2);
        serviceFundflow.setFlowlevel(100);
        serviceFundflow.setApplytype(serviceProcessVO.getApplytype());
        serviceFundflow.setFundid(serviceProcessVO.getBackCode());
        serviceFundflow.setFundid(StringUtils.isNotEmpty(serviceProcessVO.getBackCode()) ? Long.valueOf(serviceProcessVO.getBackCode()) : null);
        fundflowService.save(serviceFundflow);
        ArrayList<ConcurrentHashMap<String, Object>> contentList = new ArrayList<>();
ruoyi-project/src/main/java/com/ruoyi/project/service/impl/ServiceReimbursementServiceImpl.java
@@ -1,18 +1,21 @@
package com.ruoyi.project.service.impl;
import java.io.File;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.concurrent.ConcurrentHashMap;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
import com.ruoyi.common.config.RuoYiConfig;
import com.ruoyi.common.constant.HttpStatus;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.core.domain.model.LoginUser;
import com.ruoyi.common.utils.HttpClientKit;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.bean.DtoConversionUtils;
import com.ruoyi.common.utils.uuid.IdUtils;
import com.ruoyi.project.domain.*;
@@ -22,23 +25,22 @@
import com.ruoyi.project.domain.vo.SpFinancialExpensesReimbursementOut;
import com.ruoyi.project.mapper.*;
import com.ruoyi.project.service.*;
import com.ruoyi.system.domain.SysUserRole;
import com.ruoyi.system.mapper.SysUserRoleMapper;
import com.ruoyi.system.service.ISysPostService;
import com.ruoyi.system.service.ISysUserService;
import com.sun.org.apache.bcel.internal.generic.NEW;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.ObjectUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.utils.StringUtils;
import org.springframework.transaction.annotation.Transactional;
import java.io.File;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.concurrent.ConcurrentHashMap;
/**
 * æŠ¥é”€ç”³è¯·Service业务层处理
@@ -550,28 +552,54 @@
        data.put("data", data2);
        //模板编号,由致远方提供,该参数决定发起协同系统中哪个流程
        data.put("templateCode", "001");
        data.put("templateCode", "cyfbxd_rzhc_ceshi");
        //是否为待发:0:新建-发送;1:新建-保存待发
        data.put("draft", "0");
        //协同标题区附件,Long型List,值为附件的Id。Id是附件接口响应结果中fileUrl字段的值
        data.put("attachments", null);
        //协同公文的id
        data.put("relateDoc", "col|123,456;doc|321,654");
//        data.put("attachments", null);
//        //协同公文的id
//        data.put("relateDoc", "col|123,456;doc|321,654");
        //未设置取模板设置的标题
        data.put("subject", "null");
        data.put("subject", "");
        ServiceReimbursement serviceReimbursement1 = serviceReimbursementMapper.selectById(serviceReimbursement.getId());
        data.put("summaryId", serviceReimbursement1.getSummaryId() == null ? "" : serviceReimbursement1.getSummaryId());
        map.put("data", data);
        String strRes = null;
        if (!active.equals("druid")) {
            //如果是本地环境,就不调这个了
            String token = getToken();
            JSONObject json1 = JSONObject.parseObject(token);
            token = json1.get("id").toString();
            ObjectMapper objectMapper = new ObjectMapper();
            String json = null;
            try {
                json = objectMapper.writeValueAsString(map);
            } catch (JsonProcessingException e) {
                e.printStackTrace();
            }
            if (serviceReimbursement.getBackflowlevel() == 100L) {
                strRes = HttpClientKit.postOpr(rexyurl, map.toString());
                log.error("-----------------Reimbursement再次发起的url为:{},  å…¥å‚为:{}", rexyurl + "?token=" + token, json);
                strRes = HttpClientKit.postOpr(rexyurl + "?token=" + token, json);
            } else {
                strRes = HttpClientKit.postOpr(xyurl, map.toString());
                log.error("-----------------Reimbursement首次发起的url为:{},  å…¥å‚为:{}", xyurl + "?token=" + token, json);
                strRes = HttpClientKit.postOpr(xyurl + "?token=" + token, json);
                // å°†summaryId保存起来,并将该值保存到fund中,用于再次发起时,使用(协友要求,再次发起时,带上这个值)
                JsonObject root = JsonParser.parseString(strRes).getAsJsonObject();
                String code = root.get("code").getAsString();
                if ("0".equals(code)) {
                    String appBusinessData = root.getAsJsonObject("data").get("app_bussiness_data").getAsString();
                    JsonObject appDataObj = JsonParser.parseString(appBusinessData).getAsJsonObject();
                    String summaryId = appDataObj.get("summaryId").getAsString();
                    serviceReimbursement.setSummaryId(summaryId);
                    serviceReimbursementMapper.updateById(serviceReimbursement);
            }
        }
        com.alibaba.fastjson2.JSONObject jsonObject = com.alibaba.fastjson2.JSONObject.parseObject(strRes);
        String code = jsonObject.getJSONObject("code").toString();
        }
        log.error("-----Reimbursement-------------strRes的值为:{}", strRes);
        JSONObject jsonObject = JSONObject.parseObject(strRes);
        String code = jsonObject.getString("code");
        if (!code.equals("0")) {
            return false;
        }
@@ -588,36 +616,37 @@
            Map<String, Object> map = new HashMap<>();
            map.put("交通工具", reimbursementdetailShared.getTraffictype());
            map.put("交通费", reimbursementdetailShared.getTrafficexpense());
            map.put("市内交通", reimbursementdetailShared.getTraffictype2());
            map.put("市内交通", reimbursementdetailShared.getCityfee());
            map.put("住宿费", reimbursementdetailShared.getHotelexpense());
            map.put("杂费", reimbursementdetailShared.getOtherexpense());
            map.put("伙食费报销", reimbursementdetailShared.getFoodexpenses());
            map.put("伙食费补助", reimbursementdetailShared.getFoodallowance());
            map.put("其他费用", reimbursementdetailShared.getOtherfeeamount());
            map.put("其他费用说明", reimbursementdetailShared.getOtherfeedesc());
            map.put("金额合计", null);
            map.put("出差时间起", reimbursementdetailShared.getStarttime());
            map.put("金额合计", "");
            map.put("出差时间起", new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(reimbursementdetailShared.getStarttime()));
            map.put("出发地点", reimbursementdetailShared.getDeparture());
            map.put("出差时间止", reimbursementdetailShared.getEndtime());
            map.put("出差时间止", new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(reimbursementdetailShared.getEndtime()));
            map.put("出差目的地", reimbursementdetailShared.getDestination());
            map.put("天数", reimbursementdetailShared.getDays());
            map.put("实际报销金额", null);
            BigDecimal total = safe(reimbursementdetailShared.getCityfee()).add(safe(reimbursementdetailShared.getTrafficexpense())).add(safe(reimbursementdetailShared.getHotelexpense())).add(safe(reimbursementdetailShared.getOtherexpense())).add(safe(reimbursementdetailShared.getFoodexpenses())).add(safe(reimbursementdetailShared.getFoodallowance())).add(safe(reimbursementdetailShared.getOtherfeeamount()));
            map.put("实际报销金额", total);
            map.put("财务备注", reimbursementdetailShared.getRemark());
            map.put("id", reimbursementdetailShared.getRdid());
            map.put("出差人", reimbursementdetailShared.getPersonname());
            map.put("回交通工具", null);
            map.put("回交通工具", "");
            map.put("人员类别", reimbursementdetailShared.getPersontype());
            map.put("住宿费标准", null);
            map.put("住宿费标准", "");
            map.put("住宿费标准合计", reimbursementdetailShared.getHotelexpense());
            String fpuuid = IdUtils.simpleUUID();
            Long fpuuid = System.currentTimeMillis();
            map.put("发票附件", fpuuid);
            map.put("票据识别", null);
            map.put("识别人", null);
            map.put("序号1", null);
            String qtuuid = IdUtils.simpleUUID();
            map.put("票据识别", "");
            map.put("识别人", "");
            map.put("序号1", "");
            Long qtuuid = System.currentTimeMillis();
            map.put("其他附件", qtuuid);
            map.put("个人票夹用户", null);
            map.put("识别票据", null);
            map.put("个人票夹用户", "");
            map.put("识别票据", "");
            list.add(map);
@@ -654,6 +683,10 @@
        return allMap;
    }
    private BigDecimal safe(BigDecimal val) {
        return val == null ? BigDecimal.ZERO : val;
    }
    private List<Map<String, Object>> formson_1211(List<ServiceReimbursementpayeeShared> serviceReimbursementpayeeShareds) {
        Map<String, List<Map<String, Object>>> allMap = new HashMap<>();
@@ -666,10 +699,10 @@
            map.put("开户银行", serviceReimbursementpayeeShared.getBankname());
            map.put("打款金额", serviceReimbursementpayeeShared.getAmount());
            map.put("人员类别打款", serviceReimbursementpayeeShared.getPersontype());
            map.put("核算项目", null);
            map.put("预算项目", null);
            map.put("借方摘要", null);
            map.put("贷方摘要", null);
            map.put("核算项目", "");
            map.put("预算项目", "");
            map.put("借方摘要", "");
            map.put("贷方摘要", "");
            list.add(map);
        }
        return list;
@@ -678,21 +711,21 @@
    private Map<String, Object> formmain_1209(ServiceReimbursementShared serviceReimbursementShared) {
        Map<String, Object> formmain_1209 = new HashMap<>();
        formmain_1209.put("报销日期", serviceReimbursementShared.getApplyTime());
        formmain_1209.put("出差人-作废", null);
        formmain_1209.put("报销日期", new SimpleDateFormat("yyyy-MM-dd HH:mm").format(serviceReimbursementShared.getApplyTime()));
        formmain_1209.put("出差人-作废", "");
        formmain_1209.put("报销人", serviceReimbursementShared.getUsername());
        formmain_1209.put("区域组长", serviceReimbursementShared.getManagername());
        formmain_1209.put("出差事由", serviceReimbursementShared.getReason());
        formmain_1209.put("天数合计", null);
        formmain_1209.put("天数合计", 0.00);
        formmain_1209.put("交通费合计", serviceReimbursementShared.getTotalamount());
        formmain_1209.put("市内交通合计", null);
        formmain_1209.put("住宿费合计", null);
        formmain_1209.put("杂费合计", null);
        formmain_1209.put("伙食费报销合计", null);
        formmain_1209.put("伙食费补助合计", null);
        formmain_1209.put("其他费用合计", null);
        formmain_1209.put("市内交通合计", 0.00);
        formmain_1209.put("住宿费合计", 0.00);
        formmain_1209.put("杂费合计", 0.00);
        formmain_1209.put("伙食费报销合计", 0.00);
        formmain_1209.put("伙食费补助合计", 0.00);
        formmain_1209.put("其他费用合计", 0.00);
        formmain_1209.put("领款金额大写", serviceReimbursementShared.getBigstrmoney());
        formmain_1209.put("领款金额", serviceReimbursementShared.getTotalamount());
        formmain_1209.put("领款金额", serviceReimbursementShared.getAmountrequested());
        formmain_1209.put("财务审批", serviceReimbursementShared.getFinancechecher());
        formmain_1209.put("财务部负责人审批", serviceReimbursementShared.getFinancedirector());
        formmain_1209.put("办公室主任审批", serviceReimbursementShared.getOfficedirector());
@@ -700,39 +733,39 @@
        formmain_1209.put("业务副院长审批", serviceReimbursementShared.getBusvicepresident());
        formmain_1209.put("财务副院长审批", serviceReimbursementShared.getFinvicepresident());
        formmain_1209.put("中心负责人审批", serviceReimbursementShared.getOpochecker());
        formmain_1209.put("开户银行-作废", null);
        formmain_1209.put("卡号-作废", null);
        formmain_1209.put("开户银行-作废", "");
        formmain_1209.put("卡号-作废", "");
        formmain_1209.put("支付方式", serviceReimbursementShared.getZffs());
        formmain_1209.put("组长", null);
        formmain_1209.put("审批人员", null);
        formmain_1209.put("组长", "");
        formmain_1209.put("审批人员", "");
        formmain_1209.put("支付日期", serviceReimbursementShared.getRiqi());
        formmain_1209.put("上传附件", null);
        formmain_1209.put("打款合计", null);
        formmain_1209.put("发票识别-作废", null);
        formmain_1209.put("识别人-作废", null);
        formmain_1209.put("财务审批签字", null);
        formmain_1209.put("上传附件", "");
        formmain_1209.put("打款合计", 0.00);
        formmain_1209.put("发票识别-作废", "");
        formmain_1209.put("识别人-作废", "");
        formmain_1209.put("财务审批签字", "");
        formmain_1209.put("财务部负责人审批签字", serviceReimbursementShared.getFinancedirector());
        formmain_1209.put("表单编号1", null);
        formmain_1209.put("CIF账套配置1", null);
        formmain_1209.put("院区", null);
        formmain_1209.put("业务区域", null);
        formmain_1209.put("贷方科目", null);
        formmain_1209.put("编码", null);
        formmain_1209.put("是否支付", null);
        formmain_1209.put("凭证号", null);
        formmain_1209.put("银行回单", null);
        formmain_1209.put("OFD", null);
        formmain_1209.put("表单附件", null);
        formmain_1209.put("10204", null);
        formmain_1209.put("现金流量分析", null);
        formmain_1209.put("表单编号1", "");
        formmain_1209.put("CIF账套配置1", "");
        formmain_1209.put("院区", "");
        formmain_1209.put("业务区域", "");
        formmain_1209.put("贷方科目", "");
        formmain_1209.put("编码", "");
        formmain_1209.put("是否支付", "");
        formmain_1209.put("凭证号", "");
        formmain_1209.put("银行回单", "");
        formmain_1209.put("OFD", "");
        formmain_1209.put("表单附件", "");
        formmain_1209.put("10204", "");
        formmain_1209.put("现金流量分析", "");
        formmain_1209.put("捐献者", serviceReimbursementShared.getDonorname());
        formmain_1209.put("凭证类别", null);
        formmain_1209.put("合计", null);
        formmain_1209.put("实际合计", null);
        formmain_1209.put("伙食补助合计", null);
        formmain_1209.put("历史审批记录", null);
        formmain_1209.put("表单编号", serviceReimbursementShared.getBh());
        formmain_1209.put("历史审批巨鹿查询", null);
        formmain_1209.put("凭证类别", "");
        formmain_1209.put("合计", 0.00);
        formmain_1209.put("实际合计", 0.00);
        formmain_1209.put("伙食补助合计", 0.00);
        formmain_1209.put("历史审批记录", "");
        formmain_1209.put("表单编号", serviceReimbursementShared.getReimid());
        formmain_1209.put("历史审批巨鹿查询", "");
        return formmain_1209;
    }
@@ -741,20 +774,7 @@
        log.info("uploadOAFileAndUpdate方法的入参:{}", remShare);
        System.out.println("uploadOAFileAndUpdate方法的入参:" + remShare);
        //上传OA文件
        //String strUrl = "http://129.88.242.39:8899/seeyon/rest/token?userName=opo&password=127814f8-84e8-4304-84a5-a71573567efd&loginName=demo3";
        String strUrl = "http://129.88.242.39:8899/seeyon/rest/token";
        //String strUrl = "http://slb.hospitalstar.com:8899/seeyon/rest/token";
        //上传文件成功后,去更新相关的数据库
        Map<String, Object> map = new HashMap<String, Object>();
        map.put("userName", "opo");
        map.put("password", "4126407a-9821-4874-be41-6568abd6dbe5");
        map.put("loginName", "demo3");
        JSONObject jsonObj = new JSONObject(map);
        System.out.println("uploadOAFileAndUpdateDb + jsonObject" + jsonObj.toString() + "\r\n" + jsonObj.toJSONString());
        String strRes = HttpClientKit.postOpr(strUrl, jsonObj.toString());
        String strRes = getToken();
        JSONObject json1 = JSONObject.parseObject(strRes);
        strRes = json1.get("id").toString();
@@ -776,6 +796,23 @@
        return 0;
    }
    private String getToken() {
        String strUrl = "http://129.88.242.39:8899/seeyon/rest/token";
        //String strUrl = "http://slb.hospitalstar.com:8899/seeyon/rest/token";
        //上传文件成功后,去更新相关的数据库
        Map<String, Object> map = new HashMap<String, Object>();
        map.put("userName", "opo");
        map.put("password", "4126407a-9821-4874-be41-6568abd6dbe5");
        map.put("loginName", "demo");
        JSONObject jsonObj = new JSONObject(map);
        System.out.println("uploadOAFileAndUpdateDb + jsonObject" + jsonObj.toString() + "\r\n" + jsonObj.toJSONString());
        String strRes = HttpClientKit.postOpr(strUrl, jsonObj.toString());
        return strRes;
    }
    private Integer uploadFile(String filePath, String strFUrl, List<RbDetailFile> parseArray2, List<RbDetailFile> parseArray, ServiceReimbursementdetailShared remShare, String flag) throws Exception {
        if (!CollectionUtils.isEmpty(parseArray)) {
            for (int i = 0; i < parseArray.size(); i++) {
ruoyi-project/src/main/resources/mapper/project/ServiceFundMapper.xml
@@ -66,12 +66,14 @@
        <result property="jxrq" column="jxrq"/>
        <result property="fundTaxId" column="fund_tax_id"/>
        <result property="taxcost" column="TaxCost"/>
        <result property="summaryId" column="summary_id"/>
    </resultMap>
    <sql id="selectServiceFundVo">
        select ID,
               InfoID,
               DonorNo,
               summary_id,
               DonorName,
               del_flag,
               create_by,
@@ -170,6 +172,7 @@
        SELECT
        `service_fund`.`ID` AS `id`,
        `service_fund`.`InfoID` AS `infoid`,
        `service_fund`.`summary_id` AS `summaryId`,
        `service_fund`.`DonorNo` AS `donorno`,
        `service_fund`.`DonorName` AS `donorname`,
        `service_fund`.`UserNo` AS `userno`,
ruoyi-project/src/main/resources/mapper/project/ServiceFundSharedMapper.xml
@@ -9,7 +9,7 @@
        <result property="infoid" column="InfoID"/>
        <result property="donorno" column="DonorNo"/>
        <result property="donorname" column="DonorName"/>
        <result property="delflag" column="del_flag"/>
        <result property="delFlag" column="del_flag"/>
        <result property="createBy" column="create_by"/>
        <result property="createTime" column="create_time"/>
        <result property="updateBy" column="update_by"/>
@@ -196,6 +196,21 @@
        <if test="fundId != null">and ID = #{fundId}</if>
        <if test="serfunid != null">and serfunid = #{serfunid}</if>
    </update>
    <update id="updateShareByfundid">
        UPDATE service_fund_shared
        SET
        <if test="bh != null">bh = #{bh},</if>
        <if test="riqi != null">riqi = #{riqi},</if>
        <if test="zffs != null">zffs = #{zffs},</if>
        update_time = sysdate()
        WHERE
        del_flag != 1
        <if test="fundId != null">and ID = #{fundId}</if>
        <if test="serfunid != null">and serfunid = #{serfunid}</if>
    </update>
</mapper>
ruoyi-project/src/main/resources/mapper/project/ServiceReimbursementMapper.xml
@@ -7,6 +7,7 @@
    <resultMap type="com.ruoyi.project.domain.ServiceReimbursement" id="ServiceReimbursementResult">
        <result property="id" column="ID"/>
        <result property="delFlag" column="del_flag"/>
        <result property="summaryId" column="summary_id"/>
        <result property="createBy" column="create_by"/>
        <result property="createTime" column="create_time"/>
        <result property="updateBy" column="update_by"/>
@@ -71,6 +72,7 @@
    <sql id="selectServiceReimbursementVo">
        select ID,
               del_flag,
               summary_id,
               person_num,
               create_by,
               create_time,
ruoyi-project/src/main/resources/mapper/project/ServiceReimbursementSharedMapper.xml
@@ -213,4 +213,15 @@
          and del_flag != 1
    </update>
    <update id="updateReimShareByfundid">
        UPDATE service_reimbursement_shared
        SET
        <if test="bh != null">bh = #{bh},</if>
        <if test="riqi != null">riqi = #{riqi},</if>
        <if test="zffs != null">zffs = #{zffs},</if>
        update_time = sysdate()
        WHERE reimid = #{reimid}
          and del_flag != 1
    </update>
</mapper>