| | |
| | | package com.doumee.core.utils; |
| | | |
| | | import com.doumee.core.constants.ResponseStatus; |
| | | import com.doumee.core.exception.BusinessException; |
| | | import com.doumee.dao.business.model.Solutions; |
| | | import org.apache.commons.collections4.CollectionUtils; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | |
| | |
| | | import java.math.BigDecimal; |
| | | import java.net.URLDecoder; |
| | | import java.util.*; |
| | | import java.util.Date; |
| | | import java.util.regex.Matcher; |
| | | import java.util.regex.Pattern; |
| | | |
| | |
| | | |
| | | } |
| | | |
| | | public static BigDecimal countDetailFee(Solutions solutions,Date startDate, Date endDate){ |
| | | //查询保险实际周期 |
| | | Integer cycle = DateUtil.calculateBetween(endDate,startDate,solutions.getDataType()); |
| | | if(cycle==-1){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"日期信息错误!"); |
| | | } |
| | | return solutions.getPrice().multiply(new BigDecimal(cycle)); |
| | | } |
| | | |
| | | |
| | | public enum ApplyChangeStatus { |
| | | UPLOAD(0, "提交加减保/换厂申请"), |
| | | SIGNATURE(1, "已签章"), |
| | | APPROVE(2, "已上传审批"), |
| | | RETURN_APPLY(3, "发起退回申请"), |
| | | PLATFORM_AGREE(4, "平台同意(已退回)"), |
| | | CLOSE(5, "已关闭"), |
| | | ; |
| | | // 成员变量 |
| | | private String name; |
| | | private int key; |
| | | |
| | | // 构造方法 |
| | | ApplyChangeStatus(int key, String name) { |
| | | this.name = name; |
| | | this.key = key; |
| | | } |
| | | |
| | | // 普通方法 |
| | | public static String getName(int index) { |
| | | for (ApplyLogType c : ApplyLogType.values()) { |
| | | if (c.getKey() == index) { |
| | | return c.name; |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | // get set 方法 |
| | | public String getName() { |
| | | return name; |
| | | } |
| | | |
| | | public void setName(String name) { |
| | | this.name = name; |
| | | } |
| | | |
| | | public int getKey() { |
| | | return key; |
| | | } |
| | | |
| | | public void setKey(int key) { |
| | | this.key = key; |
| | | } |
| | | |
| | | } |
| | | |
| | | //3=退回申请;4=平台审批通过;0=审批驳回;5=平台审批驳回 |
| | | public enum ApplyChangeLogStatus { |
| | | UPLOAD(0, "发起申请"), |
| | | RETURN_APPLY(3, "发起退回申请"), |
| | | PLATFORM_AGREE(4, "平台审批通过"), |
| | | PLATFORM_UN_AGREE(0, "审批驳回"), |
| | | CLOSE(5, "关闭"), |
| | | ; |
| | | // 成员变量 |
| | | private String name; |
| | | private int key; |
| | | |
| | | // 构造方法 |
| | | ApplyChangeLogStatus(int key, String name) { |
| | | this.name = name; |
| | | this.key = key; |
| | | } |
| | | |
| | | // 普通方法 |
| | | public static String getName(int index) { |
| | | for (ApplyLogType c : ApplyLogType.values()) { |
| | | if (c.getKey() == index) { |
| | | return c.name; |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | // get set 方法 |
| | | public String getName() { |
| | | return name; |
| | | } |
| | | |
| | | public void setName(String name) { |
| | | this.name = name; |
| | | } |
| | | |
| | | public int getKey() { |
| | | return key; |
| | | } |
| | | |
| | | public void setKey(int key) { |
| | | this.key = key; |
| | | } |
| | | |
| | | } |
| | | |
| | | public enum ProjectRecord { |
| | | |
| | | COM_EDITING(0, "企业保存数据", "由 ${param2} ${param3}保存成功,当前进度为 【${param4}】"), |