Browse Source

发票对账人显示调整,财务的合同借用调整

wangqiang 1 year ago
parent
commit
a6c5e869e1

+ 1 - 1
jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/invoice/mapper/FinanceInvoiceMapper.java

@@ -21,7 +21,7 @@ import org.apache.ibatis.annotations.Param;
 public interface FinanceInvoiceMapper extends BaseMapper<FinanceInvoice> {
 
     IPage<FinanceInvoiceDTO> findList(Page<FinanceInvoiceDTO> page, @Param(Constants.WRAPPER) QueryWrapper<FinanceInvoice> queryWrapper);
-
+    @InterceptorIgnore(tenantLine = "true")
     FinanceInvoiceDTO queryById(@Param("id") String id);
 
     /**

+ 3 - 1
jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/workContract/mapper/WorkContractBorrowMapper.java

@@ -1,5 +1,6 @@
 package com.jeeplus.assess.workContract.mapper;
 
+import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.jeeplus.assess.workContract.domain.WorkContractBorrow;
 import com.jeeplus.assess.workContract.domain.WorkContractBorrowMessage;
@@ -13,12 +14,13 @@ public interface WorkContractBorrowMapper extends BaseMapper<WorkContractBorrow>
 
     void updateStatusById(@Param("id") String id, @Param("borrowType")String borrowType);
 
+    @InterceptorIgnore(tenantLine = "true")
     void updateStatusByContractInfoId(@Param("id") String id, @Param("borrowType")String borrowType);
 
     WorkContractBorrow selectFileByContractInfoId (@Param("id") String id);
 
     void updateMessageByBorrowId(@Param("id") String id, @Param("borrowType")String borrowType, @Param("type")String type);
-
+    @InterceptorIgnore(tenantLine = "true")
     void deleteMessageById(@Param("id") String id);
 
     List<WorkContractBorrowMessage> findMessageList(@Param("id") String id);

+ 2 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/contractRegistration/mapper/CwWorkContractBorrowMapper.java

@@ -1,5 +1,6 @@
 package com.jeeplus.finance.contractRegistration.mapper;
 
+import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.jeeplus.finance.contractRegistration.domain.CwWorkContractBorrow;
 import com.jeeplus.finance.contractRegistration.domain.CwWorkContractBorrowMessage;
@@ -11,6 +12,7 @@ import java.util.List;
  * @author: 王强
  * @create: 2022-11-27 13:52
  **/
+@InterceptorIgnore(tenantLine = "true")
 public interface CwWorkContractBorrowMapper extends BaseMapper<CwWorkContractBorrow> {
 
     void updateStatusById(@Param("id") String id, @Param("borrowType")String borrowType);

+ 1 - 1
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/invoice/mapper/CwFinanceInvoiceMapper.java

@@ -18,7 +18,7 @@ import java.util.List;
 public interface CwFinanceInvoiceMapper extends BaseMapper<CwFinanceInvoice> {
 
     public IPage<CwFinanceInvoiceDTO> findList(Page<CwFinanceInvoiceDTO> page, @Param(Constants.WRAPPER) QueryWrapper<CwFinanceInvoice> queryWrapper, @Param("officeIds") String officeIds);
-
+    @InterceptorIgnore(tenantLine = "true")
     public CwFinanceInvoiceDTO queryById(@Param("id") String id);
 
     public List<String> getIdByProjectId(@Param("id") String id);

+ 3 - 1
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/invoice/mapper/xml/CwFinanceInvoiceMapper.xml

@@ -255,8 +255,10 @@
 
     <select id="queryById" resultMap="BaseResultMap">
         select
-        <include refid="Base_Column_List"></include>
+        <include refid="Base_Column_List"></include>,
+        su.name as reconciliationPeopleName
         from cw_finance_invoice fi
+        left join sys_user su on fi.reconciliation_people = su.id
         where fi.del_flag = '0' and fi.id = #{id}
     </select>
 

+ 4 - 0
jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/controller/UserController.java

@@ -6,6 +6,7 @@ package com.jeeplus.sys.controller;
 
 import cn.hutool.core.util.ObjectUtil;
 import cn.hutool.core.util.StrUtil;
+import com.alibaba.fastjson.JSON;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
@@ -194,6 +195,9 @@ public class UserController {
             if (StringUtils.isNotBlank(userDTO.getCertType())) {
                 queryWrapper.eq("sc.type",userDTO.getCertType());
             }
+            if ( userDTO.getTenantDTO ( ) != null && StrUtil.isNotBlank ( userDTO.getTenantDTO ( ).getId ( ) ) ) {
+            queryWrapper.eq ( "a.tenant_id", userDTO.getTenantDTO ( ).getId ( ) );
+            }
         }
         IPage <UserDTO> result = userService.findPage ( page, queryWrapper );
         return ResponseEntity.ok ( result );

+ 9 - 0
jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/mapper/OfficeMapper.java

@@ -47,6 +47,7 @@ public interface OfficeMapper extends TreeMapper <Office> {
      * @param officeName
      * @return
      */
+    @InterceptorIgnore(tenantLine = "true")
     List<OfficeDTO> getOfficeAllByOfficeName(@Param("officeName") String officeName);
 
     /**
@@ -62,4 +63,12 @@ public interface OfficeMapper extends TreeMapper <Office> {
      * @return
      */
     List<Office> selectListByIsPublic(@Param("isPublic")String isPublic);
+
+    /**
+     * 获取到所有parent_id为‘0’的部门数据
+     * @param rootId
+     * @return
+     */
+    @InterceptorIgnore(tenantLine = "true")
+    List<Office> getChildren(@Param("rootId")String rootId);
 }

+ 1 - 0
jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/mapper/UserMapper.java

@@ -170,6 +170,7 @@ public interface UserMapper extends BaseMapper <User> {
      * @param type
      * @return
      */
+    @InterceptorIgnore(tenantLine = "true")
     List <OfficeDTO> getUserByOffice(@Param("officeIds") List<String> officeIds, @Param("type") String type);
 
 

+ 32 - 0
jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/mapper/xml/OfficeMapper.xml

@@ -150,5 +150,37 @@
             and a.del_flag = 0
         </where>
     </select>
+    <select id="getChildren" resultType="com.jeeplus.sys.domain.Office">
+        SELECT
+            id,
+            is_public,
+            area,
+            CODE,
+            type,
+            grade,
+            address,
+            zip_code,
+            MASTER,
+            phone,
+            fax,
+            email,
+            useable,
+            remarks,
+            parent_id,
+            parent_ids,
+            NAME,
+            sort,
+            create_time,
+            create_by_id,
+            update_time,
+            update_by_id,
+            del_flag,
+            tenant_id
+        FROM
+            sys_office
+        WHERE
+            del_flag = 0
+            and parent_id = #{rootId}
+    </select>
 
 </mapper>

+ 3 - 1
jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/service/OfficeService.java

@@ -59,7 +59,9 @@ public class OfficeService extends TreeService <OfficeMapper, Office> {
     public List <OfficeDTO> getRootTree(List<OfficeDTO> list, String extId, String type, String showAll, String showMyOffice) {
         List<OfficeDTO> offices = Lists.newArrayList ();
         // 获取到所有parent_id为‘0’的部门数据
-        List<OfficeDTO> rootTrees = OfficeWrapper.INSTANCE.toDTO (super.getChildren (new Office (OfficeDTO.getRootId ())));
+        List<Office> children = officeMapper.getChildren(OfficeDTO.getRootId());
+//        List<Office> children = super.getChildren(new Office(OfficeDTO.getRootId()));
+        List<OfficeDTO> rootTrees = OfficeWrapper.INSTANCE.toDTO (children);
         for (OfficeDTO root : rootTrees) {
             if (this.isUseAble ( extId, type,root, showAll )){
                 // 不是被排除节点的子节点