Browse Source

Merge remote-tracking branch 'origin/master'

sxb 4 months ago
parent
commit
2d27283ba6

+ 14 - 10
collect-fees/fees-px-api/src/main/java/com/tofly/feesapi/sfgl/service/impl/YySspjxxServiceImpl.java

@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.tofly.common.NumberHelper;
+import com.tofly.common.core.util.StringUtil;
 import com.tofly.feesapi.bjgl.entity.YhCbkxx;
 import com.tofly.feesapi.bjgl.service.YhCbkxxService;
 import com.tofly.feesapi.bmgl.entity.BmFffs;
@@ -42,8 +43,10 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
+import javax.print.DocFlavor;
 import java.lang.reflect.Field;
 import java.math.BigDecimal;
+import java.text.SimpleDateFormat;
 import java.time.LocalDate;
 import java.time.LocalDateTime;
 import java.time.format.DateTimeFormatter;
@@ -117,7 +120,7 @@ public class YySspjxxServiceImpl extends ServiceImpl<YySspjxxMapper, YySspjxx> i
         List<String> qfids = insert.getQfids();
         String fffs = insert.getFffs();
         if (StringUtils.isBlank(fffs)) throw new FeesException("付费方式为空", FeesErrorCode.BUSINESS_ERROR);
-        if (!"1".equals(fffs)) throw new FeesException("付费方式暂不支持", FeesErrorCode.BUSINESS_ERROR);
+        //if (!"1".equals(fffs)) throw new FeesException("付费方式暂不支持", FeesErrorCode.BUSINESS_ERROR);
         String yhbh = insert.getYhbh();
         BigDecimal sszje = insert.getSszje();
         String sflsbh = getSflsbh();
@@ -411,12 +414,13 @@ public class YySspjxxServiceImpl extends ServiceImpl<YySspjxxMapper, YySspjxx> i
         YhKhjbxx yhKhjbxx = khjbxxService.getById(yySspjxx.getYhbh());
         if (yhKhjbxx == null)
             throw new FeesException("客户信息不存在", FeesErrorCode.BUSINESS_ERROR);
-
-        User user = userService.get(Long.valueOf(yySspjxx.getCbrybm()));
-        //String cbrydh = DbHelper.getDbHelper().getValue(String.format("select olxdh from  sys_operators where ocode = (select cby from bm_cbb where cbbbm='%s')", sspjxx.getSscbb()));
         String cbrydh = "暂无";
-        if (user != null && StringUtils.isNotEmpty(user.getPhone())) {
-            cbrydh = user.getPhone();
+        if (!StringUtil.isEmpty(yySspjxx.getCbrybm())) {
+            User user = userService.get(Long.valueOf(yySspjxx.getCbrybm()));
+            //String cbrydh = DbHelper.getDbHelper().getValue(String.format("select olxdh from  sys_operators where ocode = (select cby from bm_cbb where cbbbm='%s')", sspjxx.getSscbb()));
+            if (user != null && StringUtils.isNotEmpty(user.getPhone())) {
+                cbrydh = user.getPhone();
+            }
         }
         String htmlstr = DbHelper.getDbHelper().getValue(String.format("select printtemplate from print_template where id=%s", PjlxEnum.预付费票据信息.getValue()));
         htmlstr = htmlstr.replace("{{title}}", "预付费收据");
@@ -426,9 +430,9 @@ public class YySspjxxServiceImpl extends ServiceImpl<YySspjxxMapper, YySspjxx> i
         htmlstr = htmlstr.replace("{{yhxm}}", yySspjxx.getYhxm());
         htmlstr = htmlstr.replace("{{cwyf}}", yySspjxx.getCwrq());
         htmlstr = htmlstr.replace("{{sfrq}}", yySspjxx.getCwrq());
-        htmlstr = htmlstr.replace("{{year}}", LocalDateTime.parse(yySspjxx.getSfrq().toString()).format(DateTimeFormatter.ofPattern("yyyy")));
-        htmlstr = htmlstr.replace("{{month}}", LocalDateTime.parse(yySspjxx.getSfrq().toString()).format(DateTimeFormatter.ofPattern("MM")));
-        htmlstr = htmlstr.replace("{{day}}", LocalDateTime.parse(yySspjxx.getSfrq().toString()).format(DateTimeFormatter.ofPattern("dd")));
+        htmlstr = htmlstr.replace("{{year}}", new SimpleDateFormat("yyyy").format(yySspjxx.getSfrq()));
+        htmlstr = htmlstr.replace("{{month}}", new SimpleDateFormat("MM").format(yySspjxx.getSfrq()));
+        htmlstr = htmlstr.replace("{{day}}", new SimpleDateFormat("dd").format(yySspjxx.getSfrq()));
         htmlstr = htmlstr.replace("{{lsbh}}", (yySspjxx.getDycs().compareTo(BigDecimal.ZERO) > 1 ? "【补】" : "") + sflsbh);
 
 
@@ -443,7 +447,7 @@ public class YySspjxxServiceImpl extends ServiceImpl<YySspjxxMapper, YySspjxx> i
         htmlstr = htmlstr.replace("{{sszje}}", yySspjxx.getSszje().toString() + "元");
         htmlstr = htmlstr.replace("{{bcye}}", yySspjxx.getBcye().toString());
 
-        htmlstr = htmlstr.replace("{{sfry}}", yySspjxx.getSfryxm());
+        htmlstr = htmlstr.replace("{{sfry}}", StringUtil.isEmpty(yySspjxx.getSfryxm()) ? "" : yySspjxx.getSfryxm());
         htmlstr = htmlstr.replace("{{sfdw}}", "水务");
         htmlstr = htmlstr.replace("{{tip2}}", "请扫“二维码”关注微信公众号");
         return htmlstr;

+ 16 - 146
collect-fees/fees-px-api/src/main/java/com/tofly/feesapi/yhgl/entity/YhKhjbxx.java

@@ -7,10 +7,13 @@ import java.math.BigDecimal;
 import java.time.LocalDate;
 import java.util.Date;
 
+import com.baomidou.mybatisplus.extension.activerecord.Model;
 import com.fasterxml.jackson.annotation.JsonFormat;
 import com.tofly.feesapi.common.constant.YhztEnum;
+import com.tofly.feesapi.file.entity.File;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
 import lombok.Getter;
 import lombok.Setter;
 import org.apache.ibatis.type.JdbcType;
@@ -24,16 +27,15 @@ import org.springframework.format.annotation.DateTimeFormat;
  * @author decai
  * @since 2024-01-12
  */
-@Getter
-@Setter
+@Data
 @TableName("YH_KHJBXX")
 @ApiModel(value = "YhKhjbxx对象", description = "用户基本信息")
-public class YhKhjbxx implements Serializable {
+public class YhKhjbxx extends Model<YhKhjbxx> {
 
     private static final long serialVersionUID = 1L;
 
     @ApiModelProperty("用户编号")
-    @TableId(type = IdType.INPUT)
+    @TableId(value = "yhbh", type = IdType.INPUT)
     private String yhbh;
 
     @ApiModelProperty("原用户号")
@@ -52,8 +54,8 @@ public class YhKhjbxx implements Serializable {
     private String sscbb;
 
     @ApiModelProperty("申请日期")
-    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
-    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     private Date sqrq;
 
     @ApiModelProperty("用户姓名")
@@ -103,24 +105,24 @@ public class YhKhjbxx implements Serializable {
     private String zsjb;
 
     @ApiModelProperty("建档日期")
-    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
-    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     private Date jdrq;
 
     @ApiModelProperty("通水标志(0:未开通,1:已开通)")
     private String tsbz;
 
     @ApiModelProperty("通水日期")
-    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
-    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     private Date tsrq;
 
     @ApiModelProperty("合同签订")
     private String htqd;
 
     @ApiModelProperty("合同签订日期")
-    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
-    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     private Date htqdrq;
 
     @ApiModelProperty("合同编号")
@@ -142,8 +144,8 @@ public class YhKhjbxx implements Serializable {
     private String czryxm;
 
     @ApiModelProperty("操作时间")
-    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
-    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     private Date czsj;
 
     @ApiModelProperty("身份证图片")
@@ -220,8 +222,6 @@ public class YhKhjbxx implements Serializable {
     @ApiModelProperty("发票开具备注")
     private String fpBz;
 
-    private String fpKind;
-
     @ApiModelProperty("收费方式")
     private String fffs;
 
@@ -239,134 +239,4 @@ public class YhKhjbxx implements Serializable {
 
     @ApiModelProperty("水表数量")
     private Integer sbsl;
-
-    public static final String YHBH = "YHBH";
-
-    public static final String YKHBH = "YKHBH";
-
-    public static final String SSGS = "SSGS";
-
-    public static final String SSCBPQ = "SSCBPQ";
-
-    public static final String SSCBB = "SSCBB";
-
-    public static final String SQRQ = "SQRQ";
-
-    public static final String YHXM = "YHXM";
-
-    public static final String YHDZ = "YHDZ";
-
-    public static final String LXDH = "LXDH";
-
-    public static final String RKS = "RKS";
-
-    public static final String XB = "XB";
-
-    public static final String SJ = "SJ";
-
-    public static final String ZZDH = "ZZDH";
-
-    public static final String GZDW = "GZDW";
-
-    public static final String BGDH = "BGDH";
-
-    public static final String DZYX = "DZYX";
-
-    public static final String ZJLB = "ZJLB";
-
-    public static final String ZJHM = "ZJHM";
-
-    public static final String HZGX = "HZGX";
-
-    public static final String YHZT = "YHZT";
-
-    public static final String ZSJB = "ZSJB";
-
-    public static final String JDRQ = "JDRQ";
-
-    public static final String TSBZ = "TSBZ";
-
-    public static final String TSRQ = "TSRQ";
-
-    public static final String HTQD = "HTQD";
-
-    public static final String HTQDRQ = "HTQDRQ";
-
-    public static final String HTBH = "HTBH";
-
-    public static final String BZ = "BZ";
-
-    public static final String BZ_GCBH = "BZ_GCBH";
-
-    public static final String BZ_PCXLH = "BZ_PCXLH";
-
-    public static final String CZRYBM = "CZRYBM";
-
-    public static final String CZRYXM = "CZRYXM";
-
-    public static final String CZSJ = "CZSJ";
-
-    public static final String PSFZ = "PSFZ";
-
-    public static final String PHT = "PHT";
-
-    public static final String PGSZZ = "PGSZZ";
-
-    public static final String PFCZ = "PFCZ";
-
-    public static final String PYYZZ = "PYYZZ";
-
-    public static final String PYXZJ = "PYXZJ";
-
-    public static final String XYDJ = "XYDJ";
-
-    public static final String TKHBZ = "TKHBZ";
-
-    public static final String ZW = "ZW";
-
-    public static final String JDRYBM = "JDRYBM";
-
-    public static final String JDRYXM = "JDRYXM";
-
-    public static final String JDPCXLH = "JDPCXLH";
-
-    public static final String FPLX = "FPLX";
-
-    public static final String SFQZ = "SFQZ";
-
-    public static final String CBRYXM = "CBRYXM";
-
-    public static final String XH = "XH";
-
-    public static final String SSREGION = "SSREGION";
-
-    public static final String XGRYBM = "XGRYBM";
-
-    public static final String FP_NAME = "FP_NAME";
-
-    public static final String FP_NSRSBH = "FP_NSRSBH";
-
-    public static final String FP_DZ = "FP_DZ";
-
-    public static final String FP_LXDH = "FP_LXDH";
-
-    public static final String FP_BANKNAME = "FP_BANKNAME";
-
-    public static final String FP_BANKCODE = "FP_BANKCODE";
-
-    public static final String FP_BZ = "FP_BZ";
-
-    public static final String FP_KIND = "FP_KIND";
-
-    public static final String FFFS = "FFFS";
-
-    public static final String JTZQLJL = "JTZQLJL";
-
-    public static final String KHLB = "KHLB";
-
-    public static final String PYJM = "PYJM";
-
-    public static final String YLJL = "YLJL";
-
-    public static final String SBSL = "SBSL";
 }

+ 0 - 5
collect-fees/fees-px-api/src/main/java/com/tofly/feesapi/yhgl/entity/YhKhjbxxLog.java

@@ -377,11 +377,6 @@ public class YhKhjbxxLog extends Model<YhKhjbxxLog> {
      */
     @ApiModelProperty(value = "发票开具备注")
     private String fpBz;
-    /**
-     * $column.comments
-     */
-    @ApiModelProperty(value = "$column.comments")
-    private String fpKind;
     /**
      * 收费方式
      */

+ 0 - 2
collect-fees/fees-px-api/src/main/java/com/tofly/feesapi/yhgl/entity/Yhkhjbxx2.java

@@ -210,8 +210,6 @@ public class Yhkhjbxx2 implements Serializable {
     @ApiModelProperty("发票开具备注")
     private String fpBz;
 
-    private String fpKind;
-
     @ApiModelProperty("收费方式")
     private String fffs;
 

+ 0 - 1
collect-fees/fees-px-api/src/main/resources/mapper/yhgl/YhKhjbxxLogMapper.xml

@@ -70,7 +70,6 @@
         <result property="fpBankname" column="FP_BANKNAME"/>
         <result property="fpBankcode" column="FP_BANKCODE"/>
         <result property="fpBz" column="FP_BZ"/>
-        <result property="fpKind" column="FP_KIND"/>
         <result property="fffs" column="FFFS"/>
         <result property="jtzqljl" column="JTZQLJL"/>
         <result property="khlb" column="KHLB"/>