协议联调
This commit is contained in:
parent
6d769fbf61
commit
c207c54583
|
|
@ -24,7 +24,7 @@ public class BmAgreement extends BaseEntity implements Serializable {
|
||||||
private Integer id;
|
private Integer id;
|
||||||
|
|
||||||
@ApiModelProperty(value="签订日期")
|
@ApiModelProperty(value="签订日期")
|
||||||
@Excel(name = "协议签订日期")
|
//@Excel(name = "协议签订日期")
|
||||||
private String signDate;
|
private String signDate;
|
||||||
|
|
||||||
@ApiModelProperty(value="协议编号")
|
@ApiModelProperty(value="协议编号")
|
||||||
|
|
@ -47,10 +47,10 @@ public class BmAgreement extends BaseEntity implements Serializable {
|
||||||
private Integer leaseCompany;
|
private Integer leaseCompany;
|
||||||
|
|
||||||
@ApiModelProperty(value="工程id")
|
@ApiModelProperty(value="工程id")
|
||||||
private Integer project;
|
private String project;
|
||||||
|
|
||||||
@ApiModelProperty(value="往来单位id")
|
@ApiModelProperty(value="往来单位id")
|
||||||
private Integer customer;
|
private String customer;
|
||||||
|
|
||||||
@ApiModelProperty(value="开始时间")
|
@ApiModelProperty(value="开始时间")
|
||||||
@Excel(name = "开始日期")
|
@Excel(name = "开始日期")
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,51 @@
|
||||||
|
package com.bonus.base.api.domain;
|
||||||
|
|
||||||
|
import com.bonus.system.api.domain.SysUser;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 协议新建往来单位和工程树结构信息 id和parentId为构建所得,采用字符串类型
|
||||||
|
* @Author ma_sh
|
||||||
|
* @create 2024/8/26 13:37
|
||||||
|
*/
|
||||||
|
@Setter
|
||||||
|
@Getter
|
||||||
|
public class SysDeptTreeSelect {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 节点ID */
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
/** 节点名称 */
|
||||||
|
private String label;
|
||||||
|
|
||||||
|
private Integer level;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编码
|
||||||
|
*/
|
||||||
|
private String code;
|
||||||
|
|
||||||
|
private String parentId;
|
||||||
|
|
||||||
|
private String companyId;
|
||||||
|
|
||||||
|
/** 子节点 */
|
||||||
|
@JsonInclude(JsonInclude.Include.NON_EMPTY)
|
||||||
|
private List<SysDeptTreeSelect> children;
|
||||||
|
|
||||||
|
private List<SysUser> userList;
|
||||||
|
|
||||||
|
public SysDeptTreeSelect(SysDeptTree dept) {
|
||||||
|
this.id = dept.getDeptId();
|
||||||
|
this.parentId = dept.getParentId();
|
||||||
|
this.label = dept.getDeptName();
|
||||||
|
this.children = dept.getChildren().stream().map(SysDeptTreeSelect::new).collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -2,6 +2,7 @@ package com.bonus.base.controller;
|
||||||
|
|
||||||
import com.bonus.base.api.domain.BmCustomer;
|
import com.bonus.base.api.domain.BmCustomer;
|
||||||
import com.bonus.base.api.domain.SysDeptTree;
|
import com.bonus.base.api.domain.SysDeptTree;
|
||||||
|
import com.bonus.base.api.domain.SysDeptTreeSelect;
|
||||||
import com.bonus.base.api.domain.TreeSelect;
|
import com.bonus.base.api.domain.TreeSelect;
|
||||||
import com.bonus.base.service.IBmCustomerService;
|
import com.bonus.base.service.IBmCustomerService;
|
||||||
import com.bonus.common.core.domain.R;
|
import com.bonus.common.core.domain.R;
|
||||||
|
|
@ -75,8 +76,8 @@ public class BmCustomerController extends BaseController {
|
||||||
@ApiOperation(value = "往来单位树")
|
@ApiOperation(value = "往来单位树")
|
||||||
@RequiresPermissions("material:maType:query")
|
@RequiresPermissions("material:maType:query")
|
||||||
@GetMapping("/customerTree")
|
@GetMapping("/customerTree")
|
||||||
public R<List<TreeSelect>> selectCustomerTree(SysDeptTree sysDept) {
|
public R<List<SysDeptTreeSelect>> selectCustomerTree(SysDeptTree sysDept) {
|
||||||
List<TreeSelect> deptList = customerService.selectCustomerTree(sysDept);
|
List<SysDeptTreeSelect> deptList = customerService.selectCustomerTree(sysDept);
|
||||||
return R.ok(deptList);
|
return R.ok(deptList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -88,8 +89,8 @@ public class BmCustomerController extends BaseController {
|
||||||
@ApiOperation(value = "工程树")
|
@ApiOperation(value = "工程树")
|
||||||
@RequiresPermissions("material:maType:query")
|
@RequiresPermissions("material:maType:query")
|
||||||
@GetMapping("/projectTree")
|
@GetMapping("/projectTree")
|
||||||
public R<List<TreeSelect>> selectProjectTree(SysDeptTree sysDept) {
|
public R<List<SysDeptTreeSelect>> selectProjectTree(SysDeptTree sysDept) {
|
||||||
List<TreeSelect> deptList = customerService.selectProjectTree(sysDept);
|
List<SysDeptTreeSelect> deptList = customerService.selectProjectTree(sysDept);
|
||||||
return R.ok(deptList);
|
return R.ok(deptList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -62,7 +62,7 @@ public interface BmAgreementMapper {
|
||||||
* @param project
|
* @param project
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
BmAgreement select(@Param(value ="customer") Integer customer, @Param(value ="project") Integer project);
|
BmAgreement select(@Param(value ="customer") String customer, @Param(value ="project") String project);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询code
|
* 查询code
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@ package com.bonus.base.service;
|
||||||
|
|
||||||
import com.bonus.base.api.domain.BmCustomer;
|
import com.bonus.base.api.domain.BmCustomer;
|
||||||
import com.bonus.base.api.domain.SysDeptTree;
|
import com.bonus.base.api.domain.SysDeptTree;
|
||||||
|
import com.bonus.base.api.domain.SysDeptTreeSelect;
|
||||||
import com.bonus.base.api.domain.TreeSelect;
|
import com.bonus.base.api.domain.TreeSelect;
|
||||||
import com.bonus.common.core.web.domain.AjaxResult;
|
import com.bonus.common.core.web.domain.AjaxResult;
|
||||||
|
|
||||||
|
|
@ -72,12 +73,12 @@ public interface IBmCustomerService
|
||||||
* 查询往来单位下拉树结构
|
* 查询往来单位下拉树结构
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<TreeSelect> selectCustomerTree(SysDeptTree sysDept);
|
List<SysDeptTreeSelect> selectCustomerTree(SysDeptTree sysDept);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询工程下拉树结构
|
* 查询工程下拉树结构
|
||||||
* @param sysDept
|
* @param sysDept
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<TreeSelect> selectProjectTree(SysDeptTree sysDept);
|
List<SysDeptTreeSelect> selectProjectTree(SysDeptTree sysDept);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,12 +3,12 @@ package com.bonus.base.service.impl;
|
||||||
import cn.hutool.core.util.PhoneUtil;
|
import cn.hutool.core.util.PhoneUtil;
|
||||||
import com.bonus.base.api.domain.BmCustomer;
|
import com.bonus.base.api.domain.BmCustomer;
|
||||||
import com.bonus.base.api.domain.SysDeptTree;
|
import com.bonus.base.api.domain.SysDeptTree;
|
||||||
|
import com.bonus.base.api.domain.SysDeptTreeSelect;
|
||||||
import com.bonus.base.api.domain.TreeSelect;
|
import com.bonus.base.api.domain.TreeSelect;
|
||||||
import com.bonus.base.mapper.BmCustomerMapper;
|
import com.bonus.base.mapper.BmCustomerMapper;
|
||||||
import com.bonus.base.service.IBmCustomerService;
|
import com.bonus.base.service.IBmCustomerService;
|
||||||
import com.bonus.common.core.utils.StringUtils;
|
import com.bonus.common.core.utils.StringUtils;
|
||||||
import com.bonus.common.core.web.domain.AjaxResult;
|
import com.bonus.common.core.web.domain.AjaxResult;
|
||||||
import org.checkerframework.checker.units.qual.A;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
|
@ -107,9 +107,19 @@ public class BmCustomerServiceImpl implements IBmCustomerService
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<TreeSelect> selectCustomerTree(SysDeptTree sysDept) {
|
public List<SysDeptTreeSelect> selectCustomerTree(SysDeptTree sysDept) {
|
||||||
List<SysDeptTree> deptList = bmCustomerMapper.selectCustomerTree(sysDept);
|
List<SysDeptTree> deptList = bmCustomerMapper.selectCustomerTree(sysDept);
|
||||||
return buildDeptTreeSelect(deptList);
|
return buildDeptSelect(deptList);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 往来单位树单独构建树结构
|
||||||
|
* @param deptList
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
private List<SysDeptTreeSelect> buildDeptSelect(List<SysDeptTree> deptList) {
|
||||||
|
List<SysDeptTree> deptTrees = buildDeptTree(deptList);
|
||||||
|
return deptTrees.stream().map(SysDeptTreeSelect::new).collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -118,9 +128,9 @@ public class BmCustomerServiceImpl implements IBmCustomerService
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<TreeSelect> selectProjectTree(SysDeptTree sysDept) {
|
public List<SysDeptTreeSelect> selectProjectTree(SysDeptTree sysDept) {
|
||||||
List<SysDeptTree> deptList = bmCustomerMapper.selectProjectTree(sysDept);
|
List<SysDeptTree> deptList = bmCustomerMapper.selectProjectTree(sysDept);
|
||||||
return buildDeptTreeSelect(deptList);
|
return buildDeptSelect(deptList);
|
||||||
}
|
}
|
||||||
|
|
||||||
private List<TreeSelect> buildDeptTreeSelect(List<SysDeptTree> deptList) {
|
private List<TreeSelect> buildDeptTreeSelect(List<SysDeptTree> deptList) {
|
||||||
|
|
|
||||||
|
|
@ -224,64 +224,58 @@
|
||||||
update bm_agreement
|
update bm_agreement
|
||||||
<set>
|
<set>
|
||||||
<if test="code != null and code != ''">
|
<if test="code != null and code != ''">
|
||||||
code = #{code,jdbcType=VARCHAR},
|
code = #{code},
|
||||||
</if>
|
</if>
|
||||||
<if test="signDate != null and signDate != ''">
|
<if test="signDate != null ">
|
||||||
sign_date = #{signDate,jdbcType=VARCHAR},
|
sign_date = #{signDate},
|
||||||
</if>
|
</if>
|
||||||
<if test="customer != null">
|
<if test="customer != null">
|
||||||
customer = #{customer,jdbcType=INTEGER},
|
customer = #{customer},
|
||||||
</if>
|
</if>
|
||||||
<if test="project != null">
|
<if test="project != null">
|
||||||
project = #{project,jdbcType=INTEGER},
|
project = #{project},
|
||||||
</if>
|
</if>
|
||||||
<if test="startTime != null and startTime != ''">
|
<if test="startTime != null ">
|
||||||
start_time = #{startTime,jdbcType=VARCHAR},
|
start_time = #{startTime},
|
||||||
</if>
|
</if>
|
||||||
<if test="leaseTerm != null and leaseTerm != ''">
|
<if test="leaseTerm != null ">
|
||||||
lease_term = #{leaseTerm,jdbcType=VARCHAR},
|
lease_term = #{leaseTerm},
|
||||||
</if>
|
</if>
|
||||||
<if test="advanceCharge != null and advanceCharge != ''">
|
<if test="advanceCharge != null ">
|
||||||
advance_charge = #{advanceCharge,jdbcType=VARCHAR},
|
advance_charge = #{advanceCharge},
|
||||||
</if>
|
</if>
|
||||||
<if test="authorizingPerson != null and authorizingPerson != ''">
|
<if test="authorizingPerson != null ">
|
||||||
authorizing_person = #{authorizingPerson,jdbcType=VARCHAR},
|
authorizing_person = #{authorizingPerson},
|
||||||
</if>
|
</if>
|
||||||
<if test="authorizingPhone != null and authorizingPhone != ''">
|
<if test="authorizingPhone != null ">
|
||||||
authorizing_phone = #{authorizingPhone,jdbcType=VARCHAR},
|
authorizing_phone = #{authorizingPhone},
|
||||||
</if>
|
</if>
|
||||||
<if test="contractNumber != null and contractNumber != ''">
|
<if test="contractNumber != null ">
|
||||||
contract_number = #{contractNumber,jdbcType=VARCHAR},
|
contract_number = #{contractNumber},
|
||||||
</if>
|
</if>
|
||||||
<if test="creator != null and creator != ''">
|
<if test="remark != null ">
|
||||||
creator = #{creator,jdbcType=VARCHAR},
|
remark = #{remark},
|
||||||
</if>
|
</if>
|
||||||
<if test="createTime != null and createTime != ''">
|
<if test="settlementTime != null ">
|
||||||
create_time = #{createTime,jdbcType=VARCHAR},
|
settlement_time = #{settlementTime},
|
||||||
</if>
|
</if>
|
||||||
<if test="remark != null and remark != ''">
|
<if test="isBalance != null ">
|
||||||
remark = #{remark,jdbcType=VARCHAR},
|
is_balance = #{isBalance},
|
||||||
</if>
|
</if>
|
||||||
<if test="settlementTime != null and settlementTime != ''">
|
<if test="url != null ">
|
||||||
settlement_time = #{settlementTime,jdbcType=VARCHAR},
|
url = #{url},
|
||||||
</if>
|
</if>
|
||||||
<if test="isBalance != null and isBalance != ''">
|
<if test="isSure != null ">
|
||||||
is_balance = #{isBalance,jdbcType=VARCHAR},
|
is_sure = #{isSure},
|
||||||
</if>
|
|
||||||
<if test="url != null and url != ''">
|
|
||||||
url = #{url,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="isSure != null and isSure != ''">
|
|
||||||
is_sure = #{isSure,jdbcType=VARCHAR},
|
|
||||||
</if>
|
</if>
|
||||||
<if test="companyId != null">
|
<if test="companyId != null">
|
||||||
company_id = #{companyId,jdbcType=INTEGER},
|
company_id = #{companyId},
|
||||||
</if>
|
</if>
|
||||||
<if test="isPush != null and isPush != ''">
|
<if test="isPush != null ">
|
||||||
is_push = #{isPush,jdbcType=VARCHAR},
|
is_push = #{isPush},
|
||||||
</if>
|
</if>
|
||||||
</set>
|
</set>
|
||||||
where id = #{id,jdbcType=INTEGER}
|
where id = #{id}
|
||||||
</update>
|
</update>
|
||||||
<update id="updateByPrimaryKey" parameterType="com.bonus.base.api.domain.BmAgreement">
|
<update id="updateByPrimaryKey" parameterType="com.bonus.base.api.domain.BmAgreement">
|
||||||
<!--@mbg.generated-->
|
<!--@mbg.generated-->
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue