ly 1 rok temu
rodzic
commit
a69b85ba5a

+ 2 - 1
src/main/java/cn/ezhizao/project/business/housingFund/controller/BizHousingFundConfirmController.java

@@ -199,7 +199,8 @@ public class BizHousingFundConfirmController extends BaseController {
     @PreAuthorize("@ss.hasPermi('business:housingFundConfirm:edit')")
     @Transactional(rollbackFor = Exception.class)
     public AjaxResult saveDetail(@RequestBody BizHousingFundConfirmDetail detail) {
-
+        detail.setVerifierTime(new Date());
+        detail.setVerifierId(SecurityUtils.getUserId());
         // 判断之前是否有保存一个明细
         BizHousingFundConfirmDetail conditions = new BizHousingFundConfirmDetail();
         conditions.setHousingFundConfirmId(detail.getHousingFundConfirmId());

+ 12 - 0
src/main/java/cn/ezhizao/project/business/housingFund/domain/BizHousingFundConfirm.java

@@ -4,6 +4,7 @@ import cn.ezhizao.framework.aspectj.lang.annotation.Excel;
 import cn.ezhizao.framework.web.domain.BaseEntity;
 import com.baomidou.mybatisplus.annotation.FieldFill;
 import com.baomidou.mybatisplus.annotation.TableField;
+import com.fasterxml.jackson.annotation.JsonFormat;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
@@ -93,5 +94,16 @@ public class BizHousingFundConfirm extends BaseEntity implements Serializable {
     @Excel(name = "执行人",sort = 7)
     @TableField(exist = false)
     private String serviceName;
+    @Excel(name = "审核人", sort = 8)
+    @TableField(exist = false)
+    private String verifierName;
+
+    @TableField(exist = false)
+    @Excel(name = "审核时间", dateFormat = "yyyy-MM-dd",sort = 9)
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private java.util.Date verifierTime;
+
+    @TableField(exist = false)
+    private List<String> dateFilter;
 
 }

+ 1 - 0
src/main/java/cn/ezhizao/project/business/housingFund/domain/BizHousingFundConfirmDetail.java

@@ -73,4 +73,5 @@ public class BizHousingFundConfirmDetail extends BaseEntity implements Serializa
 
     @ApiModelProperty("是否变更")
     private Integer isChanged;
+    private java.util.Date verifierTime;
 }

+ 29 - 10
src/main/resources/mybatis/business/BizHousingFundConfirmMapper.xml

@@ -7,7 +7,7 @@
         <result column="id" jdbcType="BIGINT" property="id"/>
         <result column="company_id" jdbcType="BIGINT" property="companyId"/>
         <association property="serviceName" select="getServiceName" column="company_id"></association>
-        <association property="socialCreditCode"  select="getSocialCreditCode" column="company_id"/>
+        <association property="socialCreditCode" select="getSocialCreditCode" column="company_id"/>
     </resultMap>
 
     <!--带条件的List查询-->
@@ -22,13 +22,20 @@
 
     <sql id="getListSql">
         SELECT t1.*, t2.name as company_name,
-        (select concat(bwor.year, '年', bwor.month, '月') from biz_work_order_record bwor where bwor.work_order_id = t1.work_order_id order by year desc, month desc limit 1) currentDate,
-<!--        (select concat(frtd.year, '-', frtd.month) from biz_housing_fund_confirm_detail frtd where frtd.housing_fund_confirm_id = t1.id order by year desc, month desc limit 1) currentDate, -->
+        (select concat(bwor.year, '年', bwor.month, '月') from biz_work_order_record bwor where bwor.work_order_id =
+        t1.work_order_id order by year desc, month desc limit 1) currentDate,
+        <!--        (select concat(frtd.year, '-', frtd.month) from biz_housing_fund_confirm_detail frtd where frtd.housing_fund_confirm_id = t1.id order by year desc, month desc limit 1) currentDate, -->
         t2.tax_type,
-        t3.account_name as from_company_name
+        t3.account_name as from_company_name, t5.verifier_id,
+        t6.nick_name as verifierName,
+        t5.verifier_time
         FROM biz_housing_fund_confirm t1
         left join biz_company t2 on t2.id = t1.company_id
         left join biz_tenant t3 on t3.id = t1.tenant_id
+        left join biz_housing_fund_confirm_detail t5 on t5.housing_fund_confirm_id = t1.id
+        and t5.deleted = 0 and t5.month = #{month} and t5.year = #{year} and t5.housing_fund_confirm_id = t1.id
+        left join sys_user t6 on t6.user_id = t5.verifier_id
+
         <trim prefix=" WHERE" suffix="" suffixOverrides="AND">
             t1.deleted = 0 AND
             <if test="id != null  ">
@@ -38,7 +45,16 @@
                 t1.company_id = #{companyId} AND
             </if>
             <if test="principal != null and principal != ''">
-                 (t2.leader_id=#{principal} OR t2.adviser_id=#{principal}) AND
+                (t2.leader_id=#{principal} OR t2.adviser_id=#{principal}) AND
+            </if>
+            <if test="verifierName != null">
+                 t6.nick_name like concat('%', #{verifierName}, '%')AND
+            </if>
+            <if test="dateFilter != null and dateFilter.size()>0 ">
+                 (
+                DATE_FORMAT(t5.update_time,'%Y-%m-%d') &gt;= #{dateFilter[0]} AND
+                DATE_FORMAT(t5.update_time,'%Y-%m-%d') &lt;= #{dateFilter[1]}
+                )AND
             </if>
             <if test="accountSetsId != null  ">
                 t1.account_sets_id = #{accountSetsId} AND
@@ -53,7 +69,7 @@
                 (t3.account_name like concat('%', #{fromCompanyName}, '%')) AND
             </if>
             <if test="companyName != null and companyName != ''">
-                 (t2.name like concat('%', #{companyName}, '%')) AND
+                (t2.name like concat('%', #{companyName}, '%')) AND
             </if>
             <if test="currentEmployeeId != null  ">
                 t1.current_employee_id = #{currentEmployeeId} AND
@@ -90,11 +106,13 @@
                     ) AND
                 </if>
                 <if test="status != null and status != 0">
-                    exists (select 1 from biz_housing_fund_confirm_detail fsd where fsd.housing_fund_confirm_id = t1.id and
+                    exists (select 1 from biz_housing_fund_confirm_detail fsd where fsd.housing_fund_confirm_id = t1.id
+                    and
                     fsd.month = #{month} and fsd.year = #{year} and fsd.status = #{status}) AND
                 </if>
                 <if test="status != null and status == 0">
-                    not exists (select 1 from biz_housing_fund_confirm_detail fsd where fsd.housing_fund_confirm_id = t1.id and
+                    not exists (select 1 from biz_housing_fund_confirm_detail fsd where fsd.housing_fund_confirm_id =
+                    t1.id and
                     fsd.month = #{month} and fsd.year = #{year}) AND
                 </if>
             </if>
@@ -102,8 +120,9 @@
     </sql>
 
     <select id="getServiceName" resultType="String">
-        SELECT s.nick_name FROM sys_user s
-        WHERE s.user_id =(SELECT leader_id  FROM biz_company WHERE id=#{company_id})
+        SELECT s.nick_name
+        FROM sys_user s
+        WHERE s.user_id = (SELECT leader_id FROM biz_company WHERE id = #{company_id})
     </select>
 
     <select id="getSocialCreditCode" resultType="String">