|  |  |  | 
|---|
|  |  |  | import com.alibaba.fastjson.JSON; | 
|---|
|  |  |  | import com.alibaba.fastjson.JSONArray; | 
|---|
|  |  |  | import com.alibaba.fastjson.JSONObject; | 
|---|
|  |  |  | import com.ruoyi.common.annotation.NotRepeatCommit; | 
|---|
|  |  |  | import com.ruoyi.common.config.RuoYiConfig; | 
|---|
|  |  |  | import com.ruoyi.common.exception.base.BaseException; | 
|---|
|  |  |  | import com.ruoyi.common.utils.ChineseUtils; | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Override | 
|---|
|  |  |  | @Transactional | 
|---|
|  |  |  | @Transactional(rollbackFor = Exception.class) | 
|---|
|  |  |  | public Boolean addFundSharedInfo(Long id) { | 
|---|
|  |  |  | log.info("fund表的id:{}", id); | 
|---|
|  |  |  | //判断一下,share表是否已经存在了 | 
|---|
|  |  |  | Map<String, Object> map = new HashMap<>(); | 
|---|
|  |  |  | map.put("serfunid", id); | 
|---|
|  |  |  | map.put("del_flag", 0); | 
|---|
|  |  |  | List<ServiceFundShared> serviceFundSharedList = serviceFundSharedMapper.selectByMap(map); | 
|---|
|  |  |  | if (!CollectionUtils.isEmpty(serviceFundSharedList)) { | 
|---|
|  |  |  | return true; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | ServiceFund serviceFund = serviceFundMapper.selectById(id); | 
|---|
|  |  |  | ServiceFundShared serviceFundShared = DtoConversionUtils.sourceToTarget(serviceFund, ServiceFundShared.class); | 
|---|
|  |  |  | serviceFundShared.setSerfunid(serviceFundShared.getId()); | 
|---|
|  |  |  | 
|---|
|  |  |  | @Override | 
|---|
|  |  |  | public int countItem(Long infoid, Long itemid) { | 
|---|
|  |  |  | List<ServiceFund> serviceFunds = serviceFundMapper.getInfoByInfoId(infoid); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | int count = 0; | 
|---|
|  |  |  | for (ServiceFund s : serviceFunds) { | 
|---|
|  |  |  | long fundid = s.getId(); | 
|---|
|  |  |  | 
|---|
|  |  |  | //將附件转成json | 
|---|
|  |  |  | if (!CollectionUtils.isEmpty(serviceFunddetailVO.getAnnexfilesList())) { | 
|---|
|  |  |  | serviceFunddetailVO.setAnnexfiles(JSON.toJSONString(serviceFunddetailVO.getAnnexfilesList())); | 
|---|
|  |  |  | } else { | 
|---|
|  |  |  | serviceFunddetailVO.setAnnexfiles(null); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (!CollectionUtils.isEmpty(serviceFunddetailVO.getInvoicefilesList())) { | 
|---|
|  |  |  | serviceFunddetailVO.setInvoicefiles(JSON.toJSONString(serviceFunddetailVO.getInvoicefilesList())); | 
|---|
|  |  |  | } else { | 
|---|
|  |  |  | serviceFunddetailVO.setInvoicefiles(null); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | ServiceFunddetail serviceFunddetail = DtoConversionUtils.sourceToTarget(serviceFunddetailVO, ServiceFunddetail.class); | 
|---|
|  |  |  |  | 
|---|