24 changed files with 528 additions and 376 deletions
@ -0,0 +1,35 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.as.api.asarrearsoutapply; |
|||
|
|||
import com.yxt.common.core.vo.Vo; |
|||
import lombok.Data; |
|||
|
|||
@Data |
|||
public class AsArrearsoutApplyFile implements Vo { |
|||
|
|||
private String url; |
|||
} |
@ -0,0 +1,24 @@ |
|||
package com.yxt.anrui.as.feign.base.billno; |
|||
|
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Author dimengzhe |
|||
* @Date 2022/7/1 9:46 |
|||
* @Description |
|||
*/ |
|||
@Data |
|||
public class BillNo implements Serializable { |
|||
private static final long serialVersionUID = 1598887042562656350L; |
|||
|
|||
// @ApiModelProperty(value = "品牌编码")
|
|||
// private String brandCode;
|
|||
@ApiModelProperty(value = "单据名称首字母") |
|||
private String billType; |
|||
@ApiModelProperty(value = "分公司编码") |
|||
private String orgCode; |
|||
|
|||
} |
@ -0,0 +1,44 @@ |
|||
package com.yxt.anrui.as.feign.base.billno; |
|||
|
|||
import cn.hutool.core.date.DateUtil; |
|||
import org.springframework.util.StringUtils; |
|||
|
|||
/** |
|||
* @Author dimengzhe |
|||
* @Date 2022/7/1 9:44 |
|||
* @Description 规则 |
|||
*/ |
|||
public class Rule { |
|||
|
|||
/** |
|||
* 单据编号规则:单据名称大写首字母+分公司编码+年份+月份+4位顺序号 |
|||
* 单据名称大写首字母+分公司编码+年份+月份 |
|||
* 注意:品牌编码暂不用 |
|||
* |
|||
* @return |
|||
*/ |
|||
public static String getBill(BillNo b) { |
|||
String billType = b.getBillType(); |
|||
String orgCode = b.getOrgCode(); |
|||
String date = DateUtil.format(DateUtil.date(), "yyyyMM"); |
|||
String bill = billType; |
|||
if (!StringUtils.isEmpty(orgCode)) { |
|||
bill = bill + orgCode; |
|||
} |
|||
bill = bill + date; |
|||
return bill; |
|||
} |
|||
|
|||
/** |
|||
* 生成单据编号规则 |
|||
* |
|||
* @param bill 单据名称大写首字母+分公司编码+年份+月份 |
|||
* @param i 根据单据编号包含单据名称大写首字母+分公司编码+年份+月份查询出来的单据的个数 |
|||
* @return |
|||
*/ |
|||
public static String getBillNo(String bill, int i) { |
|||
String num = String.format("%04d", i + 1); // 不足4位补0
|
|||
String billNo = bill + num; |
|||
return billNo; |
|||
} |
|||
} |
Loading…
Reference in new issue