From 68d2e92f824d72b98aaf68cd5a936945c1912bed Mon Sep 17 00:00:00 2001 From: luxiaotao1123 <t1341870251@63.com> Date: 星期一, 21 十一月 2022 15:14:45 +0800 Subject: [PATCH] # --- src/main/java/com/zy/crm/manager/entity/Order.java | 93 ++++++++++++++++++++++++++++++++++++++++++---- 1 files changed, 85 insertions(+), 8 deletions(-) diff --git a/src/main/java/com/zy/crm/manager/entity/Order.java b/src/main/java/com/zy/crm/manager/entity/Order.java index 90a4731..218df66 100644 --- a/src/main/java/com/zy/crm/manager/entity/Order.java +++ b/src/main/java/com/zy/crm/manager/entity/Order.java @@ -9,9 +9,11 @@ import com.zy.crm.manager.service.CompanyService; import com.zy.crm.manager.service.CstmrService; import com.zy.crm.system.entity.Dept; +import com.zy.crm.system.entity.Dic; import com.zy.crm.system.entity.Host; import com.zy.crm.system.entity.User; import com.zy.crm.system.service.DeptService; +import com.zy.crm.system.service.DicService; import com.zy.crm.system.service.HostService; import com.zy.crm.system.service.UserService; import io.swagger.annotations.ApiModelProperty; @@ -64,21 +66,21 @@ private Long cstmrId; /** - * 瀹㈡埛浠e彿 + * 椤圭洰浠e彿 */ - @ApiModelProperty(value= "瀹㈡埛浠e彿") + @ApiModelProperty(value= "椤圭洰浠e彿") private String uuid; /** - * 瀹㈡埛鍚嶇О + * 璺熻釜椤圭洰鍚嶇О */ - @ApiModelProperty(value= "瀹㈡埛鍚嶇О") + @ApiModelProperty(value= "璺熻釜椤圭洰鍚嶇О") private String name; /** - * 鎬婚噾棰� + * 椤圭洰鎬婚噾棰� */ - @ApiModelProperty(value= "鎬婚噾棰�") + @ApiModelProperty(value= "椤圭洰鎬婚噾棰�") private Double money; /** @@ -308,7 +310,7 @@ if (Cools.isEmpty(this.createTime)){ return ""; } - return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.createTime); + return new SimpleDateFormat("yyyy-MM-dd HH:mm").format(this.createTime); } public String getUpdateBy$(){ @@ -324,7 +326,82 @@ if (Cools.isEmpty(this.updateTime)){ return ""; } - return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.updateTime); + return new SimpleDateFormat("yyyy-MM-dd HH:mm").format(this.updateTime); + } + + @TableField(exist = false) + private String pcd; + + public String getPcd() { + StringBuilder sb = new StringBuilder(); + if (!Cools.isEmpty(province)) { + sb.append(province).append(","); + } + if (!Cools.isEmpty(city)) { + sb.append(city).append(","); + } + if (!Cools.isEmpty(district)) { + sb.append(district).append(","); + } + String s = sb.toString(); + if (s.endsWith(",")) { + s = s.substring(0, s.length() - 1); + } + return s; + } + + public String getPcd$() { + StringBuilder sb = new StringBuilder(); + DicService service = SpringUtils.getBean(DicService.class); + if (!Cools.isEmpty(province)) { + Dic provinceDic = service.selectById(province); + if (!Cools.isEmpty(provinceDic)) { + sb.append(provinceDic.getName()).append(","); + } + } + if (!Cools.isEmpty(city)) { + Dic cityDic = service.selectById(city); + if (!Cools.isEmpty(cityDic)) { + sb.append(cityDic.getName()).append(","); + } + } + if (!Cools.isEmpty(district)) { + Dic districtDic = service.selectById(district); + if (!Cools.isEmpty(districtDic)) { + sb.append(districtDic.getName()).append(","); + } + } + String s = sb.toString(); + if (s.endsWith(",")) { + s = s.substring(0, s.length() - 1); + } + return s; + } + + public void setPcd(String pcd) { + this.pcd = pcd; + if (!Cools.isEmpty(pcd)) { + String[] split = this.pcd.split(","); + for (int i = 0;i< split.length; i++) { + switch (i) { + case 0: + this.province = split[0]; + break; + case 1: + this.city = split[1]; + break; + case 2: + this.district = split[2]; + break; + default: + break; + } + } + } else { + this.province = ""; + this.city = ""; + this.district = ""; + } } -- Gitblit v1.9.1