Browse Source

对账单列表添加负责人

rainwer 6 months ago
parent
commit
1ac4643007

+ 4 - 0
src/main/java/cn/ezhizao/project/business/company/domain/BizCompany.java

@@ -460,6 +460,10 @@ public class BizCompany extends BaseEntity {
     @ApiModelProperty(value = "初次公积金信息保存")
     private Integer isFirstHousingFund;
 
+    @TableField(exist = false)
+    @Excel(name="负责人")
+    private String leaderName;
+
     @ApiModelProperty(value = "租户id")
     private Long tenantId;
     @TableField(exist = false)

+ 8 - 0
src/main/java/cn/ezhizao/project/business/company/mapper/BizCompanyMapper.java

@@ -20,6 +20,14 @@ public interface BizCompanyMapper extends BaseMapper<BizCompany>
      */
     public List<BizCompany> getList(BizCompany bizCompany);
 
+    /**
+     * 查询company列表
+     *
+     * @param bizCompany company
+     * @return company集合
+     */
+    public List<BizCompany> getListWithUsername(BizCompany bizCompany);
+
     /**
      * 物理删除
      * @param bizCompany

+ 8 - 0
src/main/java/cn/ezhizao/project/business/company/service/IBizCompanyService.java

@@ -20,6 +20,14 @@ public interface IBizCompanyService extends IService<BizCompany>
      */
     public List<BizCompany> getList(BizCompany bizCompany);
 
+    /**
+     * 查询company列表
+     *
+     * @param bizCompany company
+     * @return company集合
+     */
+    public List<BizCompany> getListWithUsername(BizCompany bizCompany);
+
     /**
      * 物理删除
      * @param bizCompany

+ 12 - 0
src/main/java/cn/ezhizao/project/business/company/service/impl/BizCompanyServiceImpl.java

@@ -32,6 +32,18 @@ public class BizCompanyServiceImpl  extends ServiceImpl<BizCompanyMapper, BizCom
         return bizCompanyMapper.getList(bizCompany);
     }
 
+    /**
+     * 查询company列表
+     *
+     * @param bizCompany company
+     * @return company
+     */
+    @Override
+    public List<BizCompany> getListWithUsername(BizCompany bizCompany)
+    {
+        return bizCompanyMapper.getListWithUsername(bizCompany);
+    }
+
     /**
      * 物理删除
      * @param bizCompany

+ 3 - 1
src/main/java/cn/ezhizao/project/business/deduct/controller/BizDeductController.java

@@ -260,7 +260,7 @@ public class BizDeductController extends BaseController {
         companyCondition.setIds(loopEntrust.stream().map(BizEntrust::getCompanyId).collect(Collectors.toList()));
         List<BizCompany> companies = null;
         if (loopEntrust.size() > 0) {
-            companies = companyService.getList(companyCondition);
+            companies = companyService.getListWithUsername(companyCondition);
         } else {
             companies = new ArrayList<>();
         }
@@ -283,6 +283,7 @@ public class BizDeductController extends BaseController {
                 item.setQuotaAmount(v.getQuotaAmount());
                 item.setCollectionMethod(v.getCollectionMethod());
                 item.setTaxType(v.getTaxType());
+                item.setLeaderName(v.getLeaderName());
                 item.setIsTax(monthEntrust.stream().anyMatch(e -> e.getCompanyId().equals(v.getId()) && e.getTaskTypeId().equals(1L)) ? 1 : 0);
                 item.setIsHousingFund(monthEntrust.stream().anyMatch(e -> e.getCompanyId().equals(v.getId()) && e.getTaskTypeId().equals(3L)) ? 1 : 0);
                 item.setIsSocialSecurity(monthEntrust.stream().anyMatch(e -> e.getCompanyId().equals(v.getId()) && e.getTaskTypeId().equals(2L)) ? 1 : 0);
@@ -822,6 +823,7 @@ public class BizDeductController extends BaseController {
                 bizStatementAccountLoopExport.setChangedSocialSecurity(bizStatementAccountLoop.getChangedSocialSecurity() == 1 ? "是" : "否");
                 bizStatementAccountLoopExport.setChangedHousingFund(bizStatementAccountLoop.getChangedHousingFund() == 1 ? "是" : "否");
                 bizStatementAccountLoopExport.setCumulativeIncome(bizStatementAccountLoop.getCumulativeIncome());
+                bizStatementAccountLoopExport.setLeaderName(bizStatementAccountLoop.getLeaderName());
                 list2.add(bizStatementAccountLoopExport);
             }
         }

+ 4 - 0
src/main/java/cn/ezhizao/project/business/statementAccount/domain/BizStatementAccountLoop.java

@@ -86,6 +86,10 @@ public class BizStatementAccountLoop extends BaseEntity
     @ApiModelProperty(value = "纳税性质")
     private String taxType;
 
+    @Excel(name = "负责人")
+    @ApiModelProperty(value = "负责人")
+    private String leaderName;
+
     /** 征收方式 */
     @Excel(name = "征收方式")
     @ApiModelProperty(value = "征收方式")

+ 3 - 0
src/main/java/cn/ezhizao/project/business/statementAccount/domain/BizStatementAccountLoopExport.java

@@ -65,5 +65,8 @@ public class BizStatementAccountLoopExport {
     @Excel(name = "累计年收入")
     private BigDecimal cumulativeIncome;
 
+    @Excel(name = "负责人")
+    private String leaderName;
+
 
 }

+ 22 - 0
src/main/resources/mybatis/business/BizCompanyMapper.xml

@@ -74,6 +74,28 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         </trim>
     </select>
 
+    <select id="getListWithUsername" parameterType="BizCompany" resultMap="BizCompanyResult">
+        SELECT
+        c.*, s.nick_name as leader_name, a.nick_name as adviser_name
+        FROM biz_company c
+        LEFT JOIN sys_user s ON c.leader_id=s.user_id
+        Left join sys_user a on c.adviser_id = a.user_id
+        <trim prefix=" WHERE" suffix="" suffixOverrides="AND">
+            c.deleted = 0
+            <if test="ids != null and ids.size > 0">
+                AND c.id in
+                <foreach collection="ids" index="index" item="item" separator=","  open="(" close=")">
+                    #{item,jdbcType=BIGINT}
+                </foreach>
+            </if>
+            <if test="id != null  and id != ''">AND c.id = #{id}</if>
+            <if test="category != null  and category != ''">AND c.category = #{category}</if>
+            <if test="code != null  and code != ''">AND c.code = #{code}</if>
+            <if test="name != null  and name != ''">AND c.name like concat('%', #{name}, '%')</if>
+            <if test="isZero != null ">AND c.is_zero = #{isZero}</if>
+        </trim>
+    </select>
+
     <delete id="physicalDelete">
         DELETE FROM biz_company
         <trim prefix=" WHERE" suffix="" suffixOverrides="AND">