新购绑定
This commit is contained in:
parent
cef5310e65
commit
30364e6b19
|
|
@ -1,8 +1,11 @@
|
|||
package com.bonus.material.purchase.dto;
|
||||
|
||||
import com.bonus.common.core.annotation.Excel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
|
@ -13,6 +16,8 @@ import java.util.List;
|
|||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class PurchaseDto {
|
||||
|
||||
@ApiModelProperty(value = "id")
|
||||
|
|
@ -69,6 +74,19 @@ public class PurchaseDto {
|
|||
@ApiModelProperty(value = "提交绑定数据集合")
|
||||
private List<PurchaseDto> dtoList;
|
||||
|
||||
/** 是否是固定资产编号(0,是 1,否) */
|
||||
@ApiModelProperty(value = "是否是固定资产编号(0,是 1,否)")
|
||||
private String fixCode;
|
||||
|
||||
/** 编号类型 */
|
||||
@ApiModelProperty(value = "编号类型")
|
||||
private String codeType;
|
||||
|
||||
/** 数据所属组织 */
|
||||
@Excel(name = "数据所属组织")
|
||||
@ApiModelProperty(value = "数据所属组织")
|
||||
private Long companyId;
|
||||
|
||||
private String createBy;
|
||||
|
||||
private Date createTime;
|
||||
|
|
|
|||
|
|
@ -367,11 +367,38 @@ public class PurchaseBindServiceImpl implements IPurchaseBindService {
|
|||
String path = purchaseVo.getQrUrl();
|
||||
String qrCode = purchaseVo.getQrCode();
|
||||
path = path.replace("filePath", "/data/imw");
|
||||
extractedQrCode(qrCode);
|
||||
extracted(addedEntries, zos, materialModel, materialName, qrCode, path);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 二维码生产方法抽取
|
||||
* @param qrCode
|
||||
*/
|
||||
private void extractedQrCode(String qrCode) {
|
||||
// 新购管理-二维码打印-新增
|
||||
String url = BackstageApplication.getUrl() + "backstage/machine/qrCodePage?qrcode=" + qrCode;
|
||||
// // 二维码的图片格式
|
||||
String format = "jpg";
|
||||
//设置路径
|
||||
String mkdirsName = "images";
|
||||
// linux 系统路径
|
||||
String saveDirectory = "/data/imw/" + mkdirsName + "/";
|
||||
String os = System.getProperty("os.name");
|
||||
if (os.toLowerCase().startsWith("win")) {
|
||||
//本地路径
|
||||
saveDirectory = "D://files/" + mkdirsName + "/";
|
||||
}
|
||||
// 生成二维码
|
||||
File files = new File(saveDirectory);
|
||||
if (!files.exists()) {
|
||||
files.mkdirs();
|
||||
}
|
||||
QrCodeUtils.generateQRImage(url, saveDirectory, qrCode + ".jpg", format);
|
||||
}
|
||||
|
||||
/**
|
||||
* 二维码下载方法抽取
|
||||
* @param zos
|
||||
|
|
|
|||
|
|
@ -20,7 +20,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="status != null">status,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="companyId != null">company_id,</if>
|
||||
<if test="outFacCode != null">out_fac_code,</if>
|
||||
<if test="qrUrl != null">qr_url,</if>
|
||||
|
|
@ -36,7 +35,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="status != null">#{status},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="companyId != null">#{companyId},</if>
|
||||
<if test="outFacCode != null">#{outFacCode},</if>
|
||||
<if test="qrUrl != null">#{qrUrl},</if>
|
||||
|
|
|
|||
Loading…
Reference in New Issue