| | |
| | | package com.ruoyi.web.controller.project; |
| | | |
| | | import com.ruoyi.common.annotation.Log; |
| | | import com.ruoyi.common.annotation.NotRepeatCommit; |
| | | import com.ruoyi.common.annotation.RepeatSubmit; |
| | | import com.ruoyi.common.core.controller.BaseController; |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | |
| | | package com.ruoyi.web.controller.project; |
| | | |
| | | import com.ruoyi.common.annotation.Log; |
| | | import com.ruoyi.common.annotation.NotRepeatCommit; |
| | | import com.ruoyi.common.annotation.RepeatSubmit; |
| | | import com.ruoyi.common.config.RuoYiConfig; |
| | | import com.ruoyi.common.constant.HttpStatus; |
| | |
| | | package com.ruoyi.web.controller.project; |
| | | |
| | | import com.ruoyi.common.annotation.Log; |
| | | import com.ruoyi.common.annotation.NotRepeatCommit; |
| | | import com.ruoyi.common.annotation.RepeatSubmit; |
| | | import com.ruoyi.common.config.RuoYiConfig; |
| | | import com.ruoyi.common.core.controller.BaseController; |
| | |
| | | package com.ruoyi.web.controller.project; |
| | | |
| | | import com.ruoyi.common.annotation.Log; |
| | | import com.ruoyi.common.annotation.NotRepeatCommit; |
| | | import com.ruoyi.common.annotation.RepeatSubmit; |
| | | import com.ruoyi.common.core.controller.BaseController; |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.*; |
| | | |
| | | import com.ruoyi.common.annotation.NotRepeatCommit; |
| | | import com.ruoyi.common.config.RuoYiConfig; |
| | | import com.ruoyi.common.enums.OrganEnum; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | |
| | | import com.ruoyi.common.annotation.NotRepeatCommit; |
| | | import com.ruoyi.project.domain.vo.EthicalReviewVO; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | //@PreAuthorize("@ss.hasPermi('project:ethicalreviewopinions:add')") |
| | | @Log(title = "伦ç审æ¥ä¸å®¶æè§", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | | @RepeatSubmit |
| | | @NotRepeatCommit(key = "param:arg[1]", value = 30000) |
| | | public AjaxResult add(@RequestBody ServiceEthicalreviewopinions serviceEthicalreviewopinions) |
| | | { |
| | | return toAjax(serviceEthicalreviewopinionsService.save(serviceEthicalreviewopinions)); |
| | |
| | | |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | |
| | | import com.ruoyi.common.annotation.NotRepeatCommit; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | |
| | | @ApiOperation("æ°å¢è´¹ç¨ç³è¯·ä¸»") |
| | | @Log(title = "è´¹ç¨ç³è¯·ä¸»", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | | @RepeatSubmit |
| | | @NotRepeatCommit(key = "param:arg[1]", value = 30000) |
| | | public AjaxResult add(@RequestBody ServiceExpertexpense serviceExpertexpense) |
| | | { |
| | | return toAjax(serviceExpertexpenseService.save(serviceExpertexpense)); |
| | |
| | | import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.ruoyi.common.annotation.Log; |
| | | import com.ruoyi.common.annotation.NotRepeatCommit; |
| | | import com.ruoyi.common.annotation.RepeatSubmit; |
| | | import com.ruoyi.common.config.RuoYiConfig; |
| | | import com.ruoyi.common.constant.HttpStatus; |
| | |
| | | * å®¡æ ¸è´¹ç¨ |
| | | */ |
| | | @ApiOperation("å®¡æ ¸è´¹ç¨") |
| | | @RepeatSubmit |
| | | // @Log(title = "å®¡æ ¸è´¹ç¨", businessType = BusinessType.OTHER) |
| | | @PostMapping("/checkfund") |
| | | public AjaxResult checkFund(@RequestBody CheckFundVO checkFundVO) { |
| | |
| | | /** |
| | | * è´¹ç¨ç±»åè®¡æ° |
| | | */ |
| | | // @NotRepeatCommit(key = "param:arg[1]", value = 30000) |
| | | @ApiOperation("è´¹ç¨ç±»å计æ°") |
| | | @GetMapping(value = "/countItem/{infoid}/{itemid}") |
| | | public AjaxResult countItem(@PathVariable Long infoid, @PathVariable Long itemid) { |
| | |
| | | /** |
| | | * åè®¡ä¸ªç¨ |
| | | */ |
| | | @NotRepeatCommit(key = "param:arg[1]", value = 30000) |
| | | @ApiOperation("å计个ç¨") |
| | | @Log(title = "å计个ç¨", businessType = BusinessType.INSERT) |
| | | @PostMapping("/totaltax") |
| | | @RepeatSubmit |
| | | public AjaxResult totaltax(@RequestBody TotalTaxVO totalTaxVO) { |
| | | Map<String, List<ServiceFunddetailExcel>> totaltax = serviceFundService.totaltax(totalTaxVO); |
| | | if (ObjectUtils.isEmpty(totaltax)) { |
| | |
| | | key2 = key; |
| | | } |
| | | ExcelUtil<ServiceFunddetailExcel> util = new ExcelUtil<ServiceFunddetailExcel>(ServiceFunddetailExcel.class); |
| | | return AjaxResult.success(util.exportExcel(totaltax.get(key2), key2)); |
| | | AjaxResult ajaxResult = util.exportExcel(totaltax.get(key2), key2); |
| | | String msg = (String) ajaxResult.get("msg"); |
| | | |
| | | Map dataMap = new HashMap(); |
| | | dataMap.put("downloadUrl", "/profile/download/" + msg); |
| | | |
| | | return AjaxResult.success(dataMap); |
| | | |
| | | |
| | | } |
| | |
| | | package com.ruoyi.web.controller.project; |
| | | |
| | | import com.ruoyi.common.annotation.Log; |
| | | import com.ruoyi.common.annotation.NotRepeatCommit; |
| | | import com.ruoyi.common.annotation.RepeatSubmit; |
| | | import com.ruoyi.common.core.controller.BaseController; |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | |
| | | import com.ruoyi.project.service.IServiceFunddetailService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | * @author ruoyi |
| | | * @date 2022-01-25 |
| | | */ |
| | | @Slf4j |
| | | @Api("è´¹ç¨ç³è¯·æç»") |
| | | @RestController |
| | | @RequestMapping("/project/funddetail") |
| | |
| | | //@PreAuthorize("@ss.hasPermi('project:funddetail:add')") |
| | | @Log(title = "è´¹ç¨ç³è¯·æç»", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | | @RepeatSubmit |
| | | @NotRepeatCommit(key = "param:arg[1]", value = 30000) |
| | | public AjaxResult add(@RequestBody ServiceFunddetail serviceFunddetail) { |
| | | return toAjax(serviceFunddetailService.save(serviceFunddetail)); |
| | | } |
| | |
| | | //@PreAuthorize("@ss.hasPermi('project:funddetail:edit')") |
| | | @Log(title = "è´¹ç¨ç³è¯·æç»", businessType = BusinessType.UPDATE) |
| | | @PostMapping("/edit") |
| | | @RepeatSubmit |
| | | @NotRepeatCommit(key = "param:arg[1]", value = 30000) |
| | | public AjaxResult edit(@RequestBody ServiceFunddetail serviceFunddetail) { |
| | | log.info("ä¿®æ¹çæ°æ®ä¿¡æ¯ï¼{}", serviceFunddetail); |
| | | return toAjax(serviceFunddetailService.updateById(serviceFunddetail)); |
| | | } |
| | | |
| | |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | |
| | | import com.ruoyi.common.annotation.NotRepeatCommit; |
| | | import com.ruoyi.project.domain.vo.MedicalEvaluationVO; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | |
| | | //@PreAuthorize("@ss.hasPermi('project:medicalevaluation:add')") |
| | | @Log(title = "å»å¦è¯ä¼°", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | | @RepeatSubmit |
| | | @NotRepeatCommit(key = "param:arg[1]", value = 30000) |
| | | public AjaxResult add(@RequestBody ServiceMedicalevaluation serviceMedicalevaluation) { |
| | | return toAjax(serviceMedicalevaluationService.save(serviceMedicalevaluation)); |
| | | } |
| | |
| | | //@PreAuthorize("@ss.hasPermi('project:medicalevaluation:edit')") |
| | | @Log(title = "å»å¦è¯ä¼°", businessType = BusinessType.UPDATE) |
| | | @PostMapping("/edit") |
| | | @RepeatSubmit |
| | | @NotRepeatCommit(key = "param:arg[1]", value = 30000) |
| | | public AjaxResult edit(@RequestBody ServiceMedicalevaluation serviceMedicalevaluation) { |
| | | List<ServiceMedicalevaluation> list = serviceMedicalevaluationService.queryList(serviceMedicalevaluation); |
| | | if (CollectionUtils.isEmpty(list)) { |
| | |
| | | package com.ruoyi.web.controller.project; |
| | | |
| | | import com.ruoyi.common.annotation.Log; |
| | | import com.ruoyi.common.annotation.NotRepeatCommit; |
| | | import com.ruoyi.common.annotation.RepeatSubmit; |
| | | import com.ruoyi.common.core.controller.BaseController; |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | |
| | | //@PreAuthorize("@ss.hasPermi('project:organallocation:add')") |
| | | @Log(title = "å¨å®åé
", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | | @RepeatSubmit |
| | | @NotRepeatCommit(key = "param:arg[1]", value = 30000) |
| | | public AjaxResult add(@RequestBody ServiceOrganallocation serviceOrganallocation) { |
| | | return toAjax(serviceOrganallocationService.save(serviceOrganallocation)); |
| | | } |
| | |
| | | package com.ruoyi.web.controller.project; |
| | | |
| | | import com.ruoyi.common.annotation.Log; |
| | | import com.ruoyi.common.annotation.NotRepeatCommit; |
| | | import com.ruoyi.common.annotation.RepeatSubmit; |
| | | import com.ruoyi.common.config.RuoYiConfig; |
| | | import com.ruoyi.common.constant.HttpStatus; |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.common.annotation; |
| | | |
| | | import java.lang.annotation.ElementType; |
| | | import java.lang.annotation.Retention; |
| | | import java.lang.annotation.RetentionPolicy; |
| | | import java.lang.annotation.Target; |
| | | |
| | | /** |
| | | * å½åæ°æ®ï¼æ¯å¦éå¤æäº¤ |
| | | */ |
| | | @Target(ElementType.METHOD) |
| | | @Retention(RetentionPolicy.RUNTIME) |
| | | public @interface NotRepeatCommit { |
| | | String key() default "not_repeat_commit:"; |
| | | |
| | | long value() default 10000; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.common.config; |
| | | |
| | | import com.ruoyi.common.annotation.NotRepeatCommit; |
| | | import com.ruoyi.common.filter.RepeatedlyRequestWrapper; |
| | | import com.ruoyi.common.utils.http.HttpHelper; |
| | | import org.apache.logging.log4j.util.Strings; |
| | | import org.aspectj.lang.ProceedingJoinPoint; |
| | | import org.aspectj.lang.annotation.Around; |
| | | import org.aspectj.lang.annotation.Aspect; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.data.redis.core.RedisTemplate; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.util.concurrent.TimeUnit; |
| | | |
| | | @Aspect |
| | | @Component |
| | | public class IsAspectAspect { |
| | | @Autowired |
| | | private RedisTemplate redisTemplate; |
| | | |
| | | @Around("@annotation(notRepeat)") |
| | | public Object before(ProceedingJoinPoint point, NotRepeatCommit notRepeat) { |
| | | String nowParams = ""; |
| | | |
| | | String key = getKey(notRepeat.key(), point.getArgs()); |
| | | if (Strings.isNotBlank(key)) { |
| | | // ä¸åå¨ å°±æ·»å ç¼å 设置 æ¶é´ |
| | | if (!redisTemplate.opsForValue().setIfAbsent(key, "1", notRepeat.value(), TimeUnit.MILLISECONDS)) { |
| | | throw new RuntimeException("请å¿éå¤æäº¤"); |
| | | } |
| | | } |
| | | |
| | | try { |
| | | return point.proceed(); |
| | | } catch (Throwable throwable) { |
| | | throw new RuntimeException("æå¡å¨å¼å¸¸"); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * key çæçç¥ |
| | | * |
| | | * @param key keyè¡¨è¾¾å¼ |
| | | * @param args åæ° |
| | | * @return çæçkey |
| | | */ |
| | | private String getKey(String key, Object[] args) { |
| | | for (int i = 0; i < args.length; i++) { |
| | | key = key.replace("arg[" + i + "]", args[i].toString()); |
| | | } |
| | | return key; |
| | | } |
| | | } |
| | |
| | | import com.ruoyi.common.core.redis.RedisCache; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.common.utils.spring.SpringUtils; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.text.DecimalFormat; |
| | |
| | | * |
| | | * @author ls |
| | | */ |
| | | @Slf4j |
| | | public class TaxtUtils { |
| | | /** |
| | | * åé符 |
| | |
| | | public static String getTaxationBefore(BigDecimal money) { |
| | | //å½X<=800æ¶ï¼ä¸ªç¨T=0 |
| | | BigDecimal taxMoney = new BigDecimal(0.0); |
| | | if (money.doubleValue() <= 800) { |
| | | taxMoney = money; |
| | | } |
| | | //第ä¸ä¸ªåæ°æ¯é¤æ°ï¼ç¬¬äºä¸ªåæ°ä»£è¡¨ä¿çå ä½å°æ°ï¼ç¬¬ä¸ä¸ªä»£è¡¨çæ¯ä½¿ç¨çæ¨¡å¼ |
| | | if (money.doubleValue() > 800 && money.doubleValue() <= 3360) { |
| | | taxMoney = money.subtract(new BigDecimal(160)).divide(new BigDecimal(0.8),2,BigDecimal.ROUND_UP); |
| | |
| | | |
| | | DecimalFormat decimalFormat = new DecimalFormat("#.00"); |
| | | String format = decimalFormat.format(taxMoney); |
| | | log.info("ç¨åéé¢ä¸ºï¼{}", format); |
| | | return format; |
| | | } |
| | | |
| | | |
| | | public static void main(String[] args) { |
| | | String taxation = getTaxation(new BigDecimal(21000)); |
| | | String taxationBefore = getTaxationBefore(new BigDecimal(52000)); |
| | | String taxation = getTaxation(new BigDecimal(400)); |
| | | String taxationBefore = getTaxationBefore(new BigDecimal(400)); |
| | | |
| | | |
| | | System.out.println(taxation + " " + taxationBefore); |
| | |
| | | * @return |
| | | */ |
| | | public static boolean isChinese(String str) { |
| | | String regex = "[\\u4e00-\\u9fa5]+"; |
| | | return str.matches(regex); |
| | | for (int i = 0; i < str.length(); i++) { |
| | | char c = str.charAt(i); |
| | | if (isChineseCharacter(c)) { |
| | | return true; |
| | | } |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | private static boolean isChineseCharacter(char c) { |
| | | // æ±åçUnicodeç¼ç èå´æ¯0x4E00å°0x9FA5 |
| | | return c >= 0x4E00 && c <= 0x9FA5; |
| | | } |
| | | |
| | | } |
| | |
| | | @ApiModelProperty("æ¯å¦ç®ç¨ï¼0æªç®ç¨ï¼1å·²ç®ç¨") |
| | | private Integer istax; |
| | | |
| | | |
| | | /** |
| | | * 计ç®ç¨è´¹æ¶é´ |
| | | */ |
| | | @ApiModelProperty("计ç®ç¨è´¹æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date fundtaxtime; |
| | | |
| | | } |
| | | |
| | |
| | | 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); |
| | | 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(); |
| | |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; |
| | | import com.ruoyi.common.exception.base.BaseException; |
| | | import com.ruoyi.common.tax.PerformanceTaxtUtils; |
| | | import com.ruoyi.common.tax.TaxtUtils; |
| | | import com.ruoyi.common.utils.bean.DtoConversionUtils; |
| | |
| | | import com.ruoyi.project.domain.vo.*; |
| | | import com.ruoyi.project.mapper.ServiceFundMapper; |
| | | import lombok.extern.flogger.Flogger; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.collections4.CollectionUtils; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | |
| | | * @author ruoyi |
| | | * @date 2022-01-25 |
| | | */ |
| | | @Slf4j |
| | | @Service |
| | | public class ServiceFunddetailServiceImpl extends ServiceImpl<ServiceFunddetailMapper, ServiceFunddetail> implements IServiceFunddetailService { |
| | | protected final Logger logger = LoggerFactory.getLogger(this.getClass()); |
| | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public Boolean calculateTax(List<ServiceFunddetail> serviceFunddetails) { |
| | | if (CollectionUtils.isEmpty(serviceFunddetails)) { |
| | | throw new BaseException("ç®ç¨æ¡ä»¶ä¸ºç©ºï¼è¯·æ£æ¥åï¼åè¿è¡è®¡ç®"); |
| | | } |
| | | //è¿ä¸ªæ¯ä¸ºäºè·åfund_tax_time |
| | | Long fundid = serviceFunddetails.get(0).getFundid(); |
| | | log.info("ç®ç¨çfundidçå¼ä¸ºï¼{}", fundid); |
| | | ServiceFund serviceFund1 = serviceFundMapper.selectById(fundid); |
| | | log.info("fund表çfundtextimeå¼ä¸ºï¼{}", serviceFund1.getFundtaxtime()); |
| | | |
| | | //ç¨äºä¸´æ¶ä¿åå·²ç»ç®å¥½ç"è´¹ç¨è¯¦æ
æ°æ®" |
| | | List<ServiceFunddetail> temporarySave = new ArrayList<>(); |
| | | |
| | |
| | | |
| | | //è·å彿ç第ä¸å¤© |
| | | Date firstDay = Date.from(LocalDate.now().with(TemporalAdjusters.firstDayOfMonth()).atStartOfDay(ZoneId.systemDefault()).toInstant()); |
| | | SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | String firstDatStr = dateFormat.format(firstDay); |
| | | // SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | // String firstDatStr = dateFormat.format(firstDay); |
| | | TaxMoneyByItemEO taxMoneyVO = new TaxMoneyByItemEO(); |
| | | |
| | | if (serviceFund1.getFundtaxtime() != null) { |
| | | taxMoneyVO.setTaxTime(serviceFund1.getFundtaxtime()); |
| | | } else { |
| | | taxMoneyVO.setTaxTime(new Date()); |
| | | } |
| | | taxMoneyVO.setFirstDay(firstDay); |
| | | // taxMoneyVO.setApplyType(Long.valueOf(serviceFunddetail.getApplytype())); |
| | | taxMoneyVO.setFundID(serviceFunddetail.getFundid()); |
| | | // taxMoneyVO.setBeneficiaryNo(serviceFunddetail.getBeneficiaryno()); |
| | | taxMoneyVO.setIDCard(serviceFunddetail.getIdcardno()); |
| | | //æ¥åºç¨åãç¨ãç¨åçæ»é¢ï¼ä¸å
嫿¬æ¬¡ï¼ |
| | | TaxMoneySumEO taxSum = serviceFunddetailMapper.getTaxSum(taxMoneyVO); |
| | |
| | | ServiceFunddetail serviceFunddetail3 = DtoConversionUtils.sourceToTarget(serviceFunddetail, ServiceFunddetail.class); |
| | | serviceFunddetail3.setTaxamount(taxAmountNow.doubleValue()); |
| | | serviceFunddetail3.setTaxedamount(texdAfterNow.doubleValue()); |
| | | if (ObjectUtils.isEmpty(serviceFund1.getFundtaxtime())) { |
| | | serviceFunddetail3.setTaxTime(new Date()); |
| | | } else { |
| | | serviceFunddetail3.setTaxTime(serviceFund1.getFundtaxtime()); |
| | | } |
| | | logger.info("æå°ç¨åserviceFunddetail3æ°æ® :{}", serviceFunddetail3); |
| | | |
| | | // å°è¯¥æ¡æ°æ®æ´æ° |
| | |
| | | ServiceFunddetail serviceFunddetail3 = DtoConversionUtils.sourceToTarget(serviceFunddetail, ServiceFunddetail.class); |
| | | serviceFunddetail3.setAmount(amountNow.doubleValue()); |
| | | serviceFunddetail3.setTaxamount(tax.doubleValue()); |
| | | if (ObjectUtils.isEmpty(serviceFund1.getFundtaxtime())) { |
| | | serviceFunddetail3.setTaxTime(new Date()); |
| | | } else { |
| | | serviceFunddetail3.setTaxTime(serviceFund1.getFundtaxtime()); |
| | | } |
| | | logger.info("æå°serviceFunddetail3:{}", serviceFunddetail3); |
| | | // å°è¯¥æ¡æ°æ®æ´æ° |
| | | updateById(serviceFunddetail3); |
| | |
| | | ServiceFund serviceFund = new ServiceFund(); |
| | | serviceFund.setPretaxcost(pretaxcost.doubleValue()); |
| | | serviceFund.setId(serviceFunddetails.get(0).getFundid()); |
| | | if (ObjectUtils.isEmpty(serviceFund1.getFundtaxtime())) { |
| | | serviceFund.setFundtaxtime(new Date()); |
| | | } |
| | | // 1 å·²ç®ç¨ |
| | | serviceFund.setIstax(1); |
| | | serviceFundMapper.updateById(serviceFund); |
| | |
| | | import com.ruoyi.common.utils.DateUtils; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.project.domain.vo.MedicalEvaluationVO; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | 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 java.util.ArrayList; |
| | | import java.util.Map; |
| | | |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.project.mapper.ServiceMedicalevaluationMapper; |
| | | import com.ruoyi.project.domain.ServiceMedicalevaluation; |
| | |
| | | * @author ruoyi |
| | | * @date 2021-11-19 |
| | | */ |
| | | @Slf4j |
| | | @Service |
| | | public class ServiceMedicalevaluationServiceImpl extends ServiceImpl<ServiceMedicalevaluationMapper, ServiceMedicalevaluation> implements IServiceMedicalevaluationService |
| | | { |
| | | public class ServiceMedicalevaluationServiceImpl extends ServiceImpl<ServiceMedicalevaluationMapper, ServiceMedicalevaluation> implements IServiceMedicalevaluationService { |
| | | |
| | | @Autowired |
| | | ServiceMedicalevaluationMapper serviceMedicalevaluationMapper; |
| | |
| | | public List<MedicalEvaluationVO> selectVOList(MedicalEvaluationVO medicalEvaluationVO) { |
| | | |
| | | SysUser user = SecurityUtils.getLoginUser().getUser(); |
| | | log.info("ç¨æ·çè§è²æ¯ï¼{}", user); |
| | | List <SysRole> l = user.getRoles(); |
| | | Boolean b = false; |
| | | for(SysRole r : l){ |
| | |
| | | if(b){ |
| | | medicalEvaluationVO.setBasecreateby(user.getUserName()); |
| | | } |
| | | |
| | | log.info("selectVOListçå
¥åæ¯ï¼{}", medicalEvaluationVO); |
| | | return serviceMedicalevaluationMapper.selectVOList(medicalEvaluationVO); |
| | | } |
| | | |
| | |
| | | @Transactional |
| | | public Boolean addSharedData(Long id) { |
| | | log.info("addSharedDataæ¹æ³çå
¥åid :{}", id); |
| | | //å
夿ä¸ä¸share表æ¯å¦å·²ç»æå
¥ |
| | | ServiceReimbursementShared reimbursementShared1 = new ServiceReimbursementShared(); |
| | | reimbursementShared1.setReimid(id); |
| | | reimbursementShared1.setDelFlag(0L); |
| | | List<ServiceReimbursementShared> serviceReimbursementShareds = sharedService.queryList(reimbursementShared1); |
| | | if (!CollectionUtils.isEmpty(serviceReimbursementShareds)) { |
| | | return true; |
| | | } |
| | | |
| | | //å¦ææ²¡ææå
¥ï¼åèµ°ä¸é¢çæµç¨ |
| | | ServiceReimbursement serviceReimbursement = serviceReimbursementMapper.selectById(id); |
| | | Map<String, Object> columnMap = new HashMap<>(); |
| | | columnMap.put("rbid", id); |
| | |
| | | </resultMap> |
| | | |
| | | <sql id="selectServiceDonationwitnessVo"> |
| | | select ID, InfoID, DonorNo, GainHospitalNo, GainHospitalName, DeathTime, DeathReason, DeathJudgeDoctO, DeathJudgeDoctT, DeathJudgeAnnex, OperationBegTime, OperationEndTime, OperationDoctor, IsSpendRemember, IsRestoreRemains, RememberAnnex, ResponsibleUserID, ResponsibleUserName, CoordinatedUserIDO, CoordinatedUserNameO, CoordinatedUserIDT, CoordinatedUserNameT, AbdominalAortaCannulaTime, AbdominalAortaPerfusionTime, PortalVeinCannulaTime, PortalVeinPerfusionTime, PulmonaryArteryCannulaTime, PulmonaryArteryPerfusionTime, AortaCannulaTime, AortaPerfusionTime, del_flag, create_by, create_time, update_by, update_time, OrganDonation, OrganDonation_Other, DonationCategory from service_donationwitness |
| | | select ID, |
| | | InfoID, |
| | | DonorNo, |
| | | GainHospitalNo, |
| | | GainHospitalName, |
| | | DeathTime, |
| | | DeathReason, |
| | | DeathJudgeDoctO, |
| | | DeathJudgeDoctT, |
| | | DeathJudgeAnnex, |
| | | OperationBegTime, |
| | | OperationEndTime, |
| | | OperationDoctor, |
| | | IsSpendRemember, |
| | | IsRestoreRemains, |
| | | RememberAnnex, |
| | | ResponsibleUserID, |
| | | ResponsibleUserName, |
| | | CoordinatedUserIDO, |
| | | CoordinatedUserNameO, |
| | | CoordinatedUserIDT, |
| | | CoordinatedUserNameT, |
| | | AbdominalAortaCannulaTime, |
| | | AbdominalAortaPerfusionTime, |
| | | PortalVeinCannulaTime, |
| | | PortalVeinPerfusionTime, |
| | | PulmonaryArteryCannulaTime, |
| | | PulmonaryArteryPerfusionTime, |
| | | AortaCannulaTime, |
| | | AortaPerfusionTime, |
| | | del_flag, |
| | | create_by, |
| | | create_time, |
| | | update_by, |
| | | update_time, |
| | | OrganDonation, |
| | | OrganDonation_Other, |
| | | DonationCategory |
| | | from service_donationwitness |
| | | </sql> |
| | | |
| | | <select id="selectServiceDonationwitnessList" parameterType="com.ruoyi.project.domain.ServiceDonationwitness" resultMap="ServiceDonationwitnessResult"> |
| | | <select id="selectServiceDonationwitnessList" parameterType="com.ruoyi.project.domain.ServiceDonationwitness" |
| | | resultMap="ServiceDonationwitnessResult"> |
| | | <include refid="selectServiceDonationwitnessVo"/> |
| | | <where> |
| | | <if test="donorno != null and donorno != ''"> and DonorNo = #{donorno}</if> |
| | | <if test="gainhospitalname != null and gainhospitalname != ''"> and GainHospitalName like concat('%', #{gainhospitalname}, '%')</if> |
| | | <if test="gainhospitalname != null and gainhospitalname != ''">and GainHospitalName like concat('%', |
| | | #{gainhospitalname}, '%') |
| | | </if> |
| | | <if test="operationdoctor != null and operationdoctor != ''"> and OperationDoctor = #{operationdoctor}</if> |
| | | </where> |
| | | </select> |
| | |
| | | |
| | | <where> |
| | | <if test="donorno != null and donorno != ''"> and `service_donatebaseinfo`.`DonorNo` = #{donorno}</if> |
| | | <if test="name != null and name != ''"> and `service_donatebaseinfo`.`Name` like concat('%', #{name}, '%')</if> |
| | | <if test="name != null and name != ''">and `service_donatebaseinfo`.`Name` like concat('%', #{name}, '%') |
| | | </if> |
| | | <if test="idcardno != null and idcardno != ''"> and `service_donatebaseinfo`.`IDCardNo` = #{idcardno}</if> |
| | | <if test="treatmenthospitalno != null and treatmenthospitalno != ''"> and `service_donatebaseinfo`.`TreatmentHospitalNo` = #{treatmenthospitalno}</if> |
| | | <if test="recordstate != null and recordstate != ''"> and `service_donatebaseinfo`.`RecordState` = #{recordstate}</if> |
| | | <if test="basecreateby != null and basecreateby != ''"> and `service_donatebaseinfo`.`create_by` = #{basecreateby}</if> |
| | | <if test="treatmenthospitalno != null and treatmenthospitalno != ''">and |
| | | `service_donatebaseinfo`.`TreatmentHospitalNo` = #{treatmenthospitalno} |
| | | </if> |
| | | <if test="recordstate != null and recordstate != ''">and `service_donatebaseinfo`.`RecordState` = |
| | | #{recordstate} |
| | | </if> |
| | | <if test="basecreateby != null and basecreateby != ''">and `service_donatebaseinfo`.`create_by` = |
| | | #{basecreateby} |
| | | </if> |
| | | <if test="starttime != null "> and `service_donationwitness`.OperationBegTime >= #{starttime} </if> |
| | | <if test="endtime != null "> and `service_donationwitness`.OperationBegTime <= #{endtime}</if> |
| | | <if test="reporterno != null and reporterno != ''"> and `service_donatebaseinfo`.ReporterNo = #{reporterno}</if> |
| | | <if test="reporterno != null and reporterno != ''">and `service_donatebaseinfo`.ReporterNo = |
| | | #{reporterno} |
| | | </if> |
| | | <if test="city != null and city != ''"> and `base_organization`.`City` = #{city}</if> |
| | | </where> |
| | | |
| | |
| | | <if test="reporterno != null and reporterno != ''"> and b.ReporterNo = #{reporterno}</if> |
| | | </select> |
| | | <select id="getDonationCategoryByInfoId" resultType="java.lang.String"> |
| | | select DonationCategory from service_donationwitness |
| | | where InfoID = #{infoId} and del_flag = 0 |
| | | select DonationCategory |
| | | from service_donationwitness |
| | | where InfoID = #{infoId} |
| | | and del_flag = 0 |
| | | </select> |
| | | <select id="countNumber" resultType="java.lang.Integer"> |
| | | select count(*) from service_donationwitness |
| | | where OperationBegTime >= #{starttime} and OperationBegTime <= #{endtime} |
| | | select count(*) |
| | | from service_donationwitness |
| | | where OperationBegTime >= #{starttime} |
| | | and OperationBegTime <= #{endtime} |
| | | </select> |
| | | <select id="selectByInfoId" resultType="com.ruoyi.project.domain.ServiceDonationwitness"> |
| | | <include refid="selectServiceDonationwitnessVo"/> |
| | | where InfoID = #{infoid} |
| | | where InfoID = #{infoid} and del_flag!=1 |
| | | </select> |
| | | <select id="getAllDonatePeople" resultType="com.ruoyi.project.domain.ServiceDonationwitness"> |
| | | <include refid="selectServiceDonationwitnessVo"/> |
| | |
| | | <result property="checkstatus" column="checkstatus"/> |
| | | <result property="performancetype" column="performancetype"/> |
| | | <result property="istax" column="istax"/> |
| | | <result property="fundtaxtime" column="fundtaxtime"/> |
| | | |
| | | </resultMap> |
| | | |
| | |
| | | bh, |
| | | checkstatus, |
| | | performancetype, |
| | | istax |
| | | istax, |
| | | fundtaxtime |
| | | from service_fund |
| | | </sql> |
| | | |
| | |
| | | |
| | | <select id="getTaxSum" parameterType="com.ruoyi.project.domain.vo.TaxMoneyByItemEO" |
| | | resultType="com.ruoyi.project.domain.vo.TaxMoneySumEO"> |
| | | SELECT sum(Amount) amounts, sum(TaxAmount) taxAmounts, sum(TaxedAmount) taxedAmounts |
| | | FROM service_funddetail |
| | | where fundID < #{fundID} |
| | | and tax_time < #{taxTime} |
| | | and tax_time >= #{firstDay} |
| | | and IDCardNo = #{IDCard} |
| | | and ApplyType in (1, 2) |
| | | SELECT sum(a.Amount) amounts, sum(a.TaxAmount) taxAmounts, sum(a.TaxedAmount) taxedAmounts |
| | | FROM service_funddetail a,service_fund b |
| | | where a.FundID = b.id |
| | | and a.tax_time < #{taxTime} |
| | | and a.tax_time >= #{firstDay} |
| | | and a.IDCardNo = #{IDCard} |
| | | and a.del_flag != 1 |
| | | and b.id != #{fundID} |
| | | and b.fundtaxtime < #{taxTime} |
| | | and b.fundtaxtime >= #{firstDay} |
| | | and b.del_flag != 1 |
| | | and b.ApplyType in (1, 2) |
| | | </select> |
| | | |
| | | <select id="totlaTax" resultType="com.ruoyi.project.domain.ServiceFunddetail"> |