第三方产品信息导入
							parent
							
								
									ffe4a8013e
								
							
						
					
					
						commit
						003fbc5205
					
				| @ -0,0 +1,37 @@ | |||||||
|  | package com.glxp.api.req.thrsys; | ||||||
|  | 
 | ||||||
|  | import com.alibaba.excel.annotation.ExcelProperty; | ||||||
|  | import lombok.Data; | ||||||
|  | 
 | ||||||
|  | @Data | ||||||
|  | public class AddThrDiProductsExcelVo { | ||||||
|  | 
 | ||||||
|  |     @ExcelProperty("DI最小销售产品标识") | ||||||
|  |     private String nameCode; | ||||||
|  |     @ExcelProperty("商品条码") | ||||||
|  |     private String sptm; | ||||||
|  |     @ExcelProperty("医保编码") | ||||||
|  |     private String ybbm; | ||||||
|  |     @ExcelProperty("计量单位") | ||||||
|  |     private String measname; | ||||||
|  |     @ExcelProperty("生产企业") | ||||||
|  |     private String manufactory; | ||||||
|  |     @ExcelProperty("商品名称") | ||||||
|  |     private String spmc; | ||||||
|  |     @ExcelProperty("产品描述") | ||||||
|  |     private String cpms; | ||||||
|  |     @ExcelProperty("产品价格") | ||||||
|  |     private String price; | ||||||
|  |     @ExcelProperty("是否集采(是/否)") | ||||||
|  |     private String groupBuy; | ||||||
|  |     @ExcelProperty("采购类型(普通入账/预验收/寄售)") | ||||||
|  |     private String purType; | ||||||
|  |     @ExcelProperty("产品属性(设备/耗材/服务费)") | ||||||
|  |     private String attributeType; | ||||||
|  |     @ExcelProperty("耗材类型(高值/低值)") | ||||||
|  |     private String hcType; | ||||||
|  |     @ExcelProperty("收费码") | ||||||
|  |     private String basicPrductRemak1; | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | } | ||||||
| @ -0,0 +1,67 @@ | |||||||
|  | package com.glxp.api.util.Excel; | ||||||
|  | 
 | ||||||
|  | import lombok.Getter; | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | @Getter | ||||||
|  | public enum ExcelTemplateEnum { | ||||||
|  |     /** | ||||||
|  |      * 单sheet导出 | ||||||
|  |      */ | ||||||
|  |     TEMPLATE_1("1", "complex"), | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 模板格式 | ||||||
|  |      */ | ||||||
|  |     TEMPLATE_SUFFIX("xlsx", ".xlsx"), | ||||||
|  |     TEMPLATE_SUFFIX_XLS("xls", ".xls"), | ||||||
|  |     TEMPLATE_SUFFIX_DOCX("docx", ".docx"), | ||||||
|  |     /** | ||||||
|  |      * 模板路径 | ||||||
|  |      */ | ||||||
|  |     TEMPLATE_PATH("path", "excel"), | ||||||
|  |     ; | ||||||
|  | 
 | ||||||
|  |     private final String code; | ||||||
|  |     private final String desc; | ||||||
|  | 
 | ||||||
|  |     ExcelTemplateEnum(String code, String desc) { | ||||||
|  |         this.code = code; | ||||||
|  |         this.desc = desc; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 通过code获取msg | ||||||
|  |      * | ||||||
|  |      * @param code 枚举值 | ||||||
|  |      * @return | ||||||
|  |      */ | ||||||
|  |     public static String getMsgByCode(String code) { | ||||||
|  |         if (code == null) { | ||||||
|  |             return null; | ||||||
|  |         } | ||||||
|  |         ExcelTemplateEnum enumList = getByCode(code); | ||||||
|  |         if (enumList == null) { | ||||||
|  |             return null; | ||||||
|  |         } | ||||||
|  |         return enumList.getDesc(); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public static String getCode(ExcelTemplateEnum enumList) { | ||||||
|  |         if (enumList == null) { | ||||||
|  |             return null; | ||||||
|  |         } | ||||||
|  |         return enumList.getCode(); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public static ExcelTemplateEnum getByCode(String code) { | ||||||
|  |         for (ExcelTemplateEnum enumList : values()) { | ||||||
|  |             if (enumList.getCode().equals(code)) { | ||||||
|  |                 return enumList; | ||||||
|  |             } | ||||||
|  |         } | ||||||
|  |         return null; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  | } | ||||||
|  | 
 | ||||||
| @ -0,0 +1,56 @@ | |||||||
|  | package com.glxp.api.util.Excel.Exception; | ||||||
|  | 
 | ||||||
|  | /** | ||||||
|  |  * @author : zhangsan | ||||||
|  |  * @date : 2023/4/17 11:21 | ||||||
|  |  * @modyified By : | ||||||
|  |  */ | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | public class RenException extends RuntimeException { | ||||||
|  |     private static final long serialVersionUID = 1L; | ||||||
|  | 
 | ||||||
|  |     private String msg; | ||||||
|  |     private int code = 500; | ||||||
|  | 
 | ||||||
|  |     public RenException(String msg) { | ||||||
|  |         super(msg); | ||||||
|  |         this.msg = msg; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public RenException(String msg, Throwable e) { | ||||||
|  |         super(msg, e); | ||||||
|  |         this.msg = msg; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public RenException(String msg, int code) { | ||||||
|  |         super(msg); | ||||||
|  |         this.msg = msg; | ||||||
|  |         this.code = code; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public RenException(String msg, int code, Throwable e) { | ||||||
|  |         super(msg, e); | ||||||
|  |         this.msg = msg; | ||||||
|  |         this.code = code; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getMsg() { | ||||||
|  |         return msg; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setMsg(String msg) { | ||||||
|  |         this.msg = msg; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public int getCode() { | ||||||
|  |         return code; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void setCode(int code) { | ||||||
|  |         this.code = code; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | } | ||||||
|  | 
 | ||||||
					Loading…
					
					
				
		Reference in New Issue