old mode 100644
new mode 100755
| | |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.core.annotation.Java110Transactional; |
| | | import com.java110.core.base.smo.BaseServiceSMO; |
| | | import com.java110.dto.PageDto; |
| | | import com.java110.dto.fee.BillDto; |
| | |
| | | import com.java110.po.fee.PayFeePo; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import com.java110.utils.util.DateUtil; |
| | | import com.java110.utils.util.ListUtil; |
| | | import com.java110.utils.util.StringUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | |
| | | |
| | | List<FeeDto> fees = BeanConvertUtil.covertBeanList(feeServiceDaoImpl.getFeeInfo(BeanConvertUtil.beanCovertMap(feeDto)), FeeDto.class); |
| | | |
| | | if (fees == null || fees.size() == 0) { |
| | | if (ListUtil.isNull(fees)) { |
| | | return fees; |
| | | } |
| | | |
| | | // String[] userIds = getUserIds(fees); |
| | | // //根据 userId 查询用户信息 |
| | | // List<UserDto> users = userInnerServiceSMOImpl.getUserInfo(userIds); |
| | | |
| | | for (FeeDto fee : fees) { |
| | | refreshFee(fee); |
| | |
| | | |
| | | List<FeeAttrDto> feeAttrDtos = BeanConvertUtil.covertBeanList(attrMaps, FeeAttrDto.class); |
| | | List<FeeAttrDto> tmpFeeAttrDtos = null; |
| | | String payerObjName = ""; |
| | | String ownerId = ""; |
| | | for (FeeDto tmpFeeDto : fees) { |
| | | payerObjName = ""; |
| | | ownerId = ""; |
| | | tmpFeeAttrDtos = new ArrayList<>(); |
| | | for (FeeAttrDto feeAttrDto : feeAttrDtos) { |
| | | |
| | | if (tmpFeeDto.getFeeId().equals(feeAttrDto.getFeeId())) { |
| | | tmpFeeAttrDtos.add(feeAttrDto); |
| | | if (!tmpFeeDto.getFeeId().equals(feeAttrDto.getFeeId())) { |
| | | continue; |
| | | } |
| | | tmpFeeAttrDtos.add(feeAttrDto); |
| | | if (FeeAttrDto.SPEC_CD_PAY_OBJECT_NAME.equals(feeAttrDto.getSpecCd())) { |
| | | payerObjName = feeAttrDto.getValue(); |
| | | } |
| | | if (FeeAttrDto.SPEC_CD_OWNER_ID.equals(feeAttrDto.getSpecCd())) { |
| | | ownerId = feeAttrDto.getValue(); |
| | | } |
| | | |
| | | } |
| | | tmpFeeDto.setPayerObjName(payerObjName); |
| | | tmpFeeDto.setFeeAttrDtos(tmpFeeAttrDtos); |
| | | tmpFeeDto.setOwnerId(ownerId); |
| | | } |
| | | return fees; |
| | | } |
| | |
| | | } |
| | | |
| | | List<FeeDto> fees = BeanConvertUtil.covertBeanList(feeServiceDaoImpl.getFeeInfo(BeanConvertUtil.beanCovertMap(feeDto)), FeeDto.class); |
| | | |
| | | |
| | | for (FeeDto tmpFeeDto : fees) { |
| | | if (!StringUtil.isEmpty(tmpFeeDto.getImportFeeName())) { |
| | | //fee.setFeeName(fee.getImportFeeName() + "(" + fee.getFeeName() + ")"); |
| | | tmpFeeDto.setFeeName(tmpFeeDto.getImportFeeName()); |
| | | } |
| | | } |
| | | |
| | | return fees; |
| | | } |
| | |
| | | } |
| | | |
| | | @Override |
| | | @Java110Transactional |
| | | public int updateFee(@RequestBody PayFeePo payFeePo) { |
| | | feeServiceDaoImpl.updateFeeInfoInstance(BeanConvertUtil.beanCovertMap(payFeePo)); |
| | | return 1; |
| | |
| | | Map info = new HashMap(); |
| | | info.put("payFeePos", fees); |
| | | return feeServiceDaoImpl.insertFees(info); |
| | | } |
| | | |
| | | @Override |
| | | @Java110Transactional |
| | | public int saveOneFee(@RequestBody PayFeePo payFeePo) { |
| | | List<Map> fees = new ArrayList<>(); |
| | | fees.add(BeanConvertUtil.beanCovertMap(payFeePo)); |
| | | Map info = new HashMap(); |
| | | info.put("payFeePos", fees); |
| | | return feeServiceDaoImpl.insertFees(info); |
| | | } |
| | | |
| | | @Override |
| | | public int deleteFeesByBatch(@RequestBody PayFeePo payFeePo) { |
| | | return feeServiceDaoImpl.deleteFeesByBatch(BeanConvertUtil.beanCovertMap(payFeePo)); |
| | | } |
| | | |
| | | @Override |
| | | public int getFeeInfoBus(@RequestBody FeeDto feeDto) { |
| | | return feeServiceDaoImpl.getFeeInfoBus(BeanConvertUtil.beanCovertMap(feeDto)); |
| | | } |
| | | |
| | | @Override |
| | |
| | | |
| | | return data; |
| | | } |
| | | |
| | | |
| | | private void dealFeeConfig(JSONArray data, FeeConfigDto tmpFeeConfigDto) { |
| | | JSONObject config = new JSONObject(); |
| | |
| | | public void setUserInnerServiceSMOImpl(IUserInnerServiceSMO userInnerServiceSMOImpl) { |
| | | this.userInnerServiceSMOImpl = userInnerServiceSMOImpl; |
| | | } |
| | | |
| | | @Override |
| | | public int countValidPayFeeByConfigId(String configId) { |
| | | Map info = new HashMap(); |
| | | info.put("configId", configId); |
| | | return feeServiceDaoImpl.countValidPayFeeByConfigId(info); |
| | | } |
| | | } |