ly před 1 rokem
rodič
revize
58a52daf10

+ 24 - 0
src/main/java/cn/ezhizao/project/business/collection/domain/BizCollectionDetail.java

@@ -84,4 +84,28 @@ public class BizCollectionDetail extends BaseEntity implements Serializable {
     private List<Long> ids;
     @TableField(exist = false)
     private Integer verifyStatus;
+
+    @TableField(exist = false)
+    private Integer addressStyle;
+    @TableField(exist = false)
+    private Long fictionAddressId;
+    @TableField(exist = false)
+    private String province;
+    @TableField(exist = false)
+    private String city;
+    @TableField(exist = false)
+    private String district;
+    @TableField(exist = false)
+    private String belongRegion;
+    @TableField(exist = false)
+    private String inputRemark;
+
+
+
+
+
+
+
+
+
 }

+ 23 - 31
src/main/java/cn/ezhizao/project/business/order/controller/BizArchiveInputController.java

@@ -1,34 +1,28 @@
 package cn.ezhizao.project.business.order.controller;
 
-import java.io.BufferedInputStream;
-import java.io.OutputStream;
-import java.lang.reflect.Field;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.stream.Collectors;
-import javax.annotation.Resource;
-import javax.servlet.http.HttpServletResponse;
-
 import cn.ezhizao.common.exception.ServiceException;
 import cn.ezhizao.common.utils.SecurityUtils;
+import cn.ezhizao.common.utils.poi.ExcelUtil;
 import cn.ezhizao.framework.aspectj.lang.annotation.Excel;
+import cn.ezhizao.framework.aspectj.lang.annotation.Log;
+import cn.ezhizao.framework.aspectj.lang.enums.BusinessType;
+import cn.ezhizao.framework.web.controller.BaseController;
+import cn.ezhizao.framework.web.domain.AjaxResult;
+import cn.ezhizao.framework.web.page.TableDataInfo;
 import cn.ezhizao.project.business.channel.domain.BizChannel;
 import cn.ezhizao.project.business.channel.service.IBizChannelService;
 import cn.ezhizao.project.business.company.domain.BizCompany;
-import cn.ezhizao.project.business.company.domain.BizCompanyImport;
 import cn.ezhizao.project.business.company.service.IBizCompanyService;
 import cn.ezhizao.project.business.order.domain.*;
+import cn.ezhizao.project.business.order.domain.vo.InputVo;
 import cn.ezhizao.project.business.order.service.IBizArchiveInputDetailProcessService;
 import cn.ezhizao.project.business.order.service.IBizArchiveInputDetailService;
+import cn.ezhizao.project.business.order.service.IBizArchiveInputService;
 import cn.ezhizao.project.business.taskType.domain.BizTaskType;
 import cn.ezhizao.project.business.taskType.domain.BizTaskTypeDetail;
 import cn.ezhizao.project.business.taskType.service.IBizTaskTypeDetailService;
 import cn.ezhizao.project.business.taskType.service.IBizTaskTypeService;
 import cn.ezhizao.project.business.workOrder.domain.BizWorkOrder;
-import cn.ezhizao.project.business.workOrder.domain.BizWorkOrderDetail;
-import cn.ezhizao.project.business.workOrder.service.IBizWorkOrderDetailService;
 import cn.ezhizao.project.business.workOrder.service.IBizWorkOrderService;
 import cn.ezhizao.project.system.domain.SysFileStorage;
 import cn.ezhizao.project.system.domain.SysUser;
@@ -39,23 +33,20 @@ import cn.hutool.core.date.DateTime;
 import org.springframework.core.io.ResourceLoader;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.transaction.annotation.Transactional;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-import cn.ezhizao.framework.aspectj.lang.annotation.Log;
-import cn.ezhizao.framework.aspectj.lang.enums.BusinessType;
-import cn.ezhizao.project.business.order.service.IBizArchiveInputService;
-import cn.ezhizao.framework.web.controller.BaseController;
-import cn.ezhizao.framework.web.domain.AjaxResult;
-import cn.ezhizao.common.utils.poi.ExcelUtil;
-import cn.ezhizao.framework.web.page.TableDataInfo;
+import org.springframework.web.bind.annotation.*;
 import org.springframework.web.multipart.MultipartFile;
 
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletResponse;
+import java.io.BufferedInputStream;
+import java.io.OutputStream;
+import java.lang.reflect.Field;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
 
 /**
  * 档案入库Controller
@@ -94,7 +85,7 @@ public class BizArchiveInputController extends BaseController {
      */
     @PreAuthorize("@ss.hasPermi('business:archive:order:list')")
     @GetMapping("/list")
-    public TableDataInfo list(BizArchiveInput bizArchiveInput) throws NoSuchFieldException, IllegalAccessException {
+    public TableDataInfo list(InputVo bizArchiveInput) throws NoSuchFieldException, IllegalAccessException {
         setTenantId(bizArchiveInput);
         //分页
         startPage();
@@ -105,7 +96,8 @@ public class BizArchiveInputController extends BaseController {
             if (!bizArchiveInput.getCompanyName().equals(""))
                 bizArchiveInput.setCompanyName(bizArchiveInput.getCompanyName().trim());
         }
-        List<BizArchiveInput> list = bizArchiveInputService.getList(bizArchiveInput);
+//        List<BizArchiveInput> list = bizArchiveInputService.getList(bizArchiveInput);
+        List<BizArchiveInput> list = bizArchiveInputService.getListByInput(bizArchiveInput);
         return getDataTable(list);
     }
 

+ 2 - 0
src/main/java/cn/ezhizao/project/business/order/domain/BizArchiveInput.java

@@ -244,4 +244,6 @@ public class BizArchiveInput extends BaseEntity {
     @TableField(exist = false)
     private Long customerLabelId;
     private String boss;
+    @TableField(exist = false)
+    private String customerLabelName;
 }

+ 190 - 0
src/main/java/cn/ezhizao/project/business/order/domain/vo/InputVo.java

@@ -0,0 +1,190 @@
+package cn.ezhizao.project.business.order.domain.vo;
+
+import cn.ezhizao.framework.aspectj.lang.annotation.Excel;
+import cn.ezhizao.framework.web.domain.BaseEntity;
+import cn.ezhizao.project.business.order.domain.BizArchiveInputDetail;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.util.Date;
+import java.util.List;
+
+@Data
+public class InputVo extends BaseEntity {
+
+    /**
+     * 档案编码
+     */
+    @ApiModelProperty(value = "档案编码")
+    private String archiveCode;
+
+    /**
+     * 客户外键
+     */
+    @ApiModelProperty(value = "档案编码")
+    private Long companyId;
+
+    @ApiModelProperty("变更来源外键")
+    private Long fromId;
+
+
+    private String companyName;
+
+
+    private String socialCreditCode;
+
+    @ApiModelProperty("签单人")
+    private Long signerId;
+
+    @ApiModelProperty(value = "凭证图片路径")
+    private String proofUrl;
+    private String signerName;
+
+    /**
+     * 档案类型id
+     */
+    @ApiModelProperty(value = "档案编码")
+    private Long archiveTypeId;
+
+    /**
+     * 开始月
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private Date startMonth;
+
+    /**
+     * 结束月
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private Date endMonth;
+
+    /**
+     * 库位外键
+     */
+    @ApiModelProperty(value = "结束月")
+    private Long locationId;
+
+    /**
+     * 入库人外键
+     */
+    @ApiModelProperty(value = "入库人外键")
+    private Long inputEmployeeId;
+
+
+
+    @ApiModelProperty("变更类型")
+
+    private String alterType;
+    /**
+     * 合同编号
+     */
+    @Excel(name = "合同编号")
+    @ApiModelProperty(value = "合同编号")
+    private String contractNo;
+
+    /**
+     * 签约日期
+     */
+    @ApiModelProperty(value = "签约日期")
+    private List<String> formDate;
+
+    /**
+     * 签约金额
+     */
+    @Excel(name = "签约金额")
+    @ApiModelProperty(value = "签约金额")
+    private BigDecimal amount;
+
+    /**
+     * 优惠金额
+     **/
+    @Excel(name = "优惠金额")
+    @ApiModelProperty("优惠金额")
+    private BigDecimal discountAmount;
+
+    /**
+     * 优惠金额
+     **/
+    @Excel(name = "实付金额")
+    @ApiModelProperty("实付金额")
+    private BigDecimal trueAmount;
+
+    /**
+     * 合同审核状态
+     */
+    @Excel(name = "合同审核状态")
+    @ApiModelProperty(value = "合同审核状态")
+    private Integer verifyStatus;
+
+    /**
+     * 合同类型
+     */
+    @Excel(name = "合同类型", readConverterExp = "0=新签,1=续签")
+    @ApiModelProperty(value = "合同类型")
+    private Integer contractType;
+
+    @Excel(name = "任务类型", readConverterExp = "1=循环,2=单次")
+    @ApiModelProperty("任务类型")
+    private Integer serviceType;
+
+    /**
+     * 证照类型
+     */
+    @ApiModelProperty(value = "证照类型")
+    private Long certificateTypeId;
+
+    /**
+     * 出库时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private Date outputDate;
+
+    private Long tenantId;
+
+    /**
+     * 月数
+     */
+
+    private Long monthNum;
+
+    /**
+     * 审核备注
+     */
+
+    private String verifyRemark;
+
+
+    private List<BizArchiveInputDetail> details;
+
+    private Long sourceCategoryId;
+
+
+    private String sourceCategoryName;
+
+
+    private String sourceName;
+
+    private String referrerDataSource;
+
+    private Long sourceId;
+
+    private Integer status;
+
+
+    private Integer dissolution;
+    private Integer alterNumber;
+    private Integer isKeepAccount;
+    private Integer isSocialSecurity;
+    private Integer isHousingFund;
+    private Integer isReturnTax;
+    private Integer isRegister;
+    private Integer isAlter;
+    private Integer isLogout;
+    private Integer isQualified;
+    private Integer isOther;
+    private List<Long> customerLabelId;
+    private String boss;
+    private String contactNo;
+}

+ 3 - 0
src/main/java/cn/ezhizao/project/business/order/mapper/BizArchiveInputMapper.java

@@ -3,6 +3,7 @@ package cn.ezhizao.project.business.order.mapper;
 import java.util.List;
 
 import cn.ezhizao.project.business.order.domain.BizArchiveInput;
+import cn.ezhizao.project.business.order.domain.vo.InputVo;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 
 /**
@@ -29,4 +30,6 @@ public interface BizArchiveInputMapper extends BaseMapper<BizArchiveInput>
     public int physicalDelete(BizArchiveInput bizArchiveInput);
 
     int removeByIds(List<Long> ids);
+
+    List<BizArchiveInput> getListByInput(InputVo bizArchiveInput);
 }

+ 3 - 0
src/main/java/cn/ezhizao/project/business/order/service/IBizArchiveInputService.java

@@ -3,6 +3,7 @@ package cn.ezhizao.project.business.order.service;
 import java.util.List;
 
 import cn.ezhizao.project.business.order.domain.*;
+import cn.ezhizao.project.business.order.domain.vo.InputVo;
 import com.baomidou.mybatisplus.extension.service.IService;
 
 /**
@@ -45,4 +46,6 @@ public interface IBizArchiveInputService extends IService<BizArchiveInput>
     String importOnce(List<OrderExcelImportOnceModel> orderList, Long userId, long l);
 
     int removeBinByIds(List<Long> ids);
+
+    List<BizArchiveInput> getListByInput(InputVo bizArchiveInput);
 }

+ 9 - 0
src/main/java/cn/ezhizao/project/business/order/service/impl/BizArchiveInputServiceImpl.java

@@ -3,6 +3,8 @@ package cn.ezhizao.project.business.order.service.impl;
 import java.math.BigDecimal;
 import java.util.*;
 import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.concurrent.locks.ReadWriteLock;
+import java.util.concurrent.locks.ReentrantReadWriteLock;
 import java.util.stream.Collectors;
 import java.util.stream.Stream;
 import javax.annotation.Resource;
@@ -19,6 +21,7 @@ import cn.ezhizao.project.business.company.domain.DictRegion;
 import cn.ezhizao.project.business.company.service.IBizCompanyService;
 import cn.ezhizao.project.business.company.service.IDictRegionService;
 import cn.ezhizao.project.business.order.domain.*;
+import cn.ezhizao.project.business.order.domain.vo.InputVo;
 import cn.ezhizao.project.business.order.mapper.BizArchiveInputMapper;
 import cn.ezhizao.project.business.order.service.IBizArchiveInputDetailProcessService;
 import cn.ezhizao.project.business.order.service.IBizArchiveInputDetailService;
@@ -53,6 +56,7 @@ import org.springframework.stereotype.Service;
 public class BizArchiveInputServiceImpl extends ServiceImpl<BizArchiveInputMapper, BizArchiveInput> implements IBizArchiveInputService {
     @Resource
     private BizArchiveInputMapper bizArchiveInputMapper;
+    private final ReadWriteLock readWriteLock = new ReentrantReadWriteLock(true);
     @Resource
     private IBizCompanyService companyService;
     @Resource
@@ -1763,4 +1767,9 @@ public class BizArchiveInputServiceImpl extends ServiceImpl<BizArchiveInputMappe
     public int removeBinByIds(List<Long> ids) {
         return bizArchiveInputMapper.removeByIds(ids);
     }
+
+    @Override
+    public List<BizArchiveInput> getListByInput(InputVo bizArchiveInput) {
+        return bizArchiveInputMapper.getListByInput(bizArchiveInput);
+    }
 }

+ 84 - 2
src/main/resources/mybatis/business/BizArchiveInputMapper.xml

@@ -41,13 +41,78 @@
         </if>
     </select>
 
+    <select id="getList" parameterType="InputVo" resultMap="BizArchiveInputResult">
+        SELECT
+        t1.*,
+        t2.name as company_name,
+        t1.boss,
+        t2.social_credit_code as social_credit_code,
+        t3.nick_name as signer_name,
+        t4.title as source_category_name,
+        t4.referrer_data_source
+        FROM biz_archive_input t1
+        left join biz_company t2 on t2.id = t1.company_id
+        left join sys_user t3 on t3.user_id = t1.signer_id
+        left join biz_source t4 on t4.id = t1.source_category_id
+        <trim prefix=" WHERE" suffix="" suffixOverrides="AND">
+            t1.deleted = 0
+            <if test="fromId != null">AND (t1.from_id = #{fromId} or t1.id = #{fromId})</if>
+            <if test="id != null  and id != ''">AND t1.id = #{id}</if>
+            <if test="companyName != null  and companyName != ''">AND t2.name like concat("%", #{companyName}, "%")</if>
+            <if test="archiveTypeId != null">and archive_type_id = #{archiveTypeId}</if>
+            <if test="companyId != null  and companyId != ''">AND t1.company_id = #{companyId}</if>
+            <if test="archiveCode != null  and archiveCode != ''">AND t1.archive_code = #{archiveCode}</if>
+            <if test="startMonth != null ">AND t1.start_month = #{startMonth}</if>
+            <if test="endMonth != null ">AND t1.end_month = #{endMonth}</if>
+            <if test="proofUrl != null  and proofUrl != ''">AND t1.proof_url = #{proofUrl}</if>
+            <if test="contractNo != null  and contractNo != ''">AND t1.contract_no = #{contractNo}</if>
+            <if test="formDate != null ">AND t1.form_date = #{formDate}</if>
+            <if test="amount != null ">AND t1.amount = #{amount}</if>
+            <if test="verifyStatus != null ">AND t1.verify_status = #{verifyStatus}</if>
+            <if test="contractType != null ">AND t1.contract_type = #{contractType}</if>
+            <if test="serviceType != null ">AND t1.service_type = #{serviceType}</if>
+            <if test="outputDate != null ">AND t1.output_date = #{outputDate}</if>
+            <if test="monthNum != null ">AND t1.month_num = #{monthNum}</if>
+            <if test="companyName != null and companyName != '' ">AND t2.name like concat('%', #{companyName}, '%')</if>
+            <if test="verifyRemark != null  and verifyRemark != ''">AND t1.verify_remark = #{verifyRemark}</if>
+            <if test="tenantId != null">AND t1.tenant_id = #{tenantId}</if>
+            <if test="isKeepAccount != null">AND <if test="isKeepAccount == 0">not</if> exists (select 1 from
+                biz_archive_input_detail t5 where t5.deleted = 0 and t5.contract_id = t1.id and t5.task_type_id = 1)
+            </if>
+            <if test="isSocialSecurity != null">AND <if test="isSocialSecurity == 0">not</if> exists (select 1 from
+                biz_archive_input_detail t5 where t5.deleted = 0 and t5.contract_id = t1.id and t5.task_type_id = 2)
+            </if>
+            <if test="isHousingFund != null">AND <if test="isHousingFund == 0">not</if> exists (select 1 from
+                biz_archive_input_detail t5 where t5.deleted = 0 and t5.contract_id = t1.id and t5.task_type_id = 3)
+            </if>
+            <if test="isReturnTax != null">AND <if test="isReturnTax == 0">not</if> exists (select 1 from
+                biz_archive_input_detail t5 where t5.deleted = 0 and t5.contract_id = t1.id and t5.task_type_id = 4)
+            </if>
+            <if test="isRegister != null">AND <if test="isRegister == 0">not</if> exists (select 1 from
+                biz_archive_input_detail t5 where t5.deleted = 0 and t5.contract_id = t1.id and t5.task_type_id = 5)
+            </if>
+            <if test="isAlter != null">AND <if test="isAlter == 0">not</if> exists (select 1 from
+                biz_archive_input_detail t5 where t5.deleted = 0 and t5.contract_id = t1.id and t5.task_type_id = 6)
+            </if>
+            <if test="isLogout != null">AND <if test="isLogout == 0">not</if> exists (select 1 from
+                biz_archive_input_detail t5 where t5.deleted = 0 and t5.contract_id = t1.id and t5.task_type_id = 7)
+            </if>
+            <if test="isQualified != null">AND <if test="isQualified == 0">not</if> exists (select 1 from
+                biz_archive_input_detail t5 where t5.deleted = 0 and t5.contract_id = t1.id and t5.task_type_id = 8)
+            </if>
+            <if test="isOther != null">AND <if test="isOther == 0">not</if> exists (select 1 from
+                biz_archive_input_detail t5 where t5.deleted = 0 and t5.contract_id = t1.id and t5.task_type_id = 9)
+            </if>
 
-    <select id="getList" parameterType="BizArchiveInput" resultMap="BizArchiveInputResult">
+        </trim>
+    </select>
+    <select id="getListByInput" parameterType="InputVo" resultMap="BizArchiveInputResult">
         SELECT
         t1.*,
         t2.name as company_name,
         t1.boss,
         t2.customer_label_id as customerLabelId,
+        t5.lable as customerLabelName,
         t2.social_credit_code as social_credit_code,
         t3.nick_name as signer_name,
         t4.title as source_category_name,
@@ -56,10 +121,12 @@
         left join biz_company t2 on t2.id = t1.company_id
         left join sys_user t3 on t3.user_id = t1.signer_id
         left join biz_source t4 on t4.id = t1.source_category_id
+        left join biz_lable t5 on t5.id = t2.customer_label_id
         <trim prefix=" WHERE" suffix="" suffixOverrides="AND">
             t1.deleted = 0
             <if test="fromId != null">AND (t1.from_id = #{fromId} or t1.id = #{fromId})</if>
             <if test="id != null  and id != ''">AND t1.id = #{id}</if>
+            <if test="contactNo!=null and contactNo != '' ">AND t1.contract_no like concat("%",#{contractNo}, "%")</if>
             <if test="companyName != null  and companyName != ''">AND t2.name like concat("%", #{companyName}, "%")</if>
             <if test="archiveTypeId != null">and archive_type_id = #{archiveTypeId}</if>
             <if test="companyId != null  and companyId != ''">AND t1.company_id = #{companyId}</if>
@@ -68,7 +135,13 @@
             <if test="endMonth != null ">AND t1.end_month = #{endMonth}</if>
             <if test="proofUrl != null  and proofUrl != ''">AND t1.proof_url = #{proofUrl}</if>
             <if test="contractNo != null  and contractNo != ''">AND t1.contract_no = #{contractNo}</if>
-            <if test="formDate != null ">AND t1.form_date = #{formDate}</if>
+            <if test="formDate!= null and formDate.size() ">
+                AND (
+                DATE_FORMAT(t1.form_date,'%Y-%m-%d') &gt;= #{formDate[0]}
+                AND
+                DATE_FORMAT(t1.form_date,'%Y-%m-%d') &lt;= #{formDate[1]}
+                )
+            </if>
             <if test="amount != null ">AND t1.amount = #{amount}</if>
             <if test="verifyStatus != null ">AND t1.verify_status = #{verifyStatus}</if>
             <if test="contractType != null ">AND t1.contract_type = #{contractType}</if>
@@ -105,9 +178,18 @@
             <if test="isOther != null">AND <if test="isOther == 0">not</if> exists (select 1 from
                 biz_archive_input_detail t5 where t5.deleted = 0 and t5.contract_id = t1.id and t5.task_type_id = 9)
             </if>
+            <if test="customerLabelId != null and customerLabelId.size() > 0">
+                AND t2.customer_label_id IN
+                <foreach collection="customerLabelId" index="index" item="item" separator="," open="(" close=")">
+                    #{item,jdbcType=BIGINT}
+                </foreach>
+            </if>
+
         </trim>
     </select>
 
+
+
     <update id="removeByIds">
         UPDATE biz_archive_input
         SET deleted=1