Commit aa550bd4 authored by fangxinjiang's avatar fangxinjiang

B端服务添加

parent c2bf35c2
......@@ -26,6 +26,7 @@ import lombok.EqualsAndHashCode;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;
/**
* 客户信息
......@@ -250,5 +251,6 @@ public class TCustomerInfo extends BaseEntity {
@Schema(description = "账户余额")
private BigDecimal balance;
private List<String> customerIds;
}
package com.yifu.cloud.plus.v1.yifu.archives.vo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TSettleDomain;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.Data;
import java.util.List;
/**
* @program: master
* @description: b端回显的客户信息包装类
* @author: pwang
* @create: 2020-08-26 19:47
**/
@Data
@Tag(name = "b端回显的客户信息包装类")
public class CustomerForBusinessVo {
//已有的客户信息
@Schema(name = "已有的客户信息")
private List<String> hadCustomer;
//已有的结算主体信息
@Schema(name = "已有的结算主体信息")
private List<String> hadSettle;
//客户分页信息
/* @Schema(name = "客户分页信息")
Page<TCustomerInfo> customerInfoPage;
//结算主体
@Schema(name = "客户信息")
private List<TCustomerInfo> customerList;*/
//结算主体
@Schema(name = "结算主体")
private List<TSettleDomain> settleDomainList;
}
package com.yifu.cloud.plus.v1.yifu.archives.vo;
import lombok.Data;
import java.io.Serializable;
@Data
public class CustomerOwnerSelectVo implements Serializable {
/**
* 单位名称
*/
private String customerName;
/**
* 单位编码
*/
private String customerCode;
/**
* 单位ID
*/
private String customerId;
}
package com.yifu.cloud.plus.v1.yifu.archives.vo;
import com.baomidou.mybatisplus.annotation.TableField;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TSettleDomain;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* @program: master
* @description: 分页展示包装类
* @author: pwang
* @create: 2019-09-02 11:40
**/
@Tag(name = "结算主体表分页包装类")
@Data
public class TSettleDomainVo extends TSettleDomain implements Serializable {
/**
*客户名称
**/
@Schema(description = "客户编码", name = "customerCode")
//非本表字段
@TableField(exist = false)
private String customerCode;
/**
*客户名称
**/
@Schema(description = "客户名称", name = "customerName")
//非本表字段
@TableField(exist = false)
private String customerName;
/**
*客户id
**/
//非本表字段
@TableField(exist = false)
private String customerId;
/**
* 归属服务公司Id(乙方)
*/
@Schema(description = "归属服务公司Id(合同属性)", name = "businessSubject")
//非本表字段
@TableField(exist = false)
private String businessSubject;
/**
* 归属服务公司名称
*/
@Schema(description = "归属服务公司名称(合同属性)", name = "businessSubject")
//非本表字段
@TableField(exist = false)
private String businessSubjectName;
/**
*合同名称
**/
//非本表字段
@TableField(exist = false)
private String contractName;
//业务类型
@TableField(exist = false)
@Schema(description = "业务类型")
private String businessType;
//业务类型细分
@TableField(exist = false)
@Schema(description = "业务细分")
private String businessSub;
@TableField(exist = false)
@Schema(description = "创建月(需求变更查FIRST_PASS_TIME)")
private String createMonth;
/**************************************结算主体改造新增字段2021-03-17 开始*********************************************/
@Schema(description = "业务类型分类", name = "businessPrimaryType")
private String businessPrimaryType;
@Schema(description = "业务类型二级分类", name = "businessSecondType")
private String businessSecondType;
@Schema(description = "业务类型三级分类", name = "businessThirdType")
private String businessThirdType;
/**
* 0:人事;1:非人事
*/
@Schema(description = "0:人事;1:非人事", name = "type")
private Integer type;
/**************************************结算主体改造新增字段2021-03-17 结束********************************************/
/**************************************结算主体改造可先不关联合同2021-05-17 开始********************************************/
/**
* 创建类型:0 合同之后 1 合同之前
*/
@Schema(description = "创建类型:0:合同之后 1:合同之前", name = "createType")
private String createType;
/**
* 关联合同:0是1否
*/
@Schema(description = "关联合同:0是1否", name = "relateFlag")
private String relateFlag;
/**
* 异常说明
*/
@Schema(description = "异常说明", name = "exceptionRemark")
private String exceptionRemark;
/**************************************结算主体改造可先不关联合同2021-05-17 结算主体改造新增字段2021-03-17 结束****************/
/**
* B端 传参 客户ID
*/
@TableField(exist = false)
private List<String> customerIds;
/**
* B端 传参 结算主体ID
*/
@TableField(exist = false)
private List<String> settleDomainIds;
}
......@@ -24,6 +24,7 @@ import com.yifu.cloud.plus.v1.yifu.archives.entity.TSettleDomain;
import com.yifu.cloud.plus.v1.yifu.archives.vo.IdNameNoVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.ProjectSetInfoVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
......@@ -78,4 +79,8 @@ public interface TSettleDomainMapper extends BaseMapper<TSettleDomain> {
List<ProjectSetInfoVo> getSetInfoByCodes(@Param(value = "codes") List<String> codes);
List<TSettleDomain> getSettleInfoByCodes(@Param(value = "codes") List<String> codes);
List<TSettleDomain> getOwnSettleDomainNoPage(@Param("userId") String userId, @Param("name") String name);
IPage<TSettleDomainVo> getOwnSettleDomain(Page page, @Param("userId") String userId, @Param("name") String name);
}
......@@ -108,4 +108,7 @@ public interface TSettleDomainService extends IService<TSettleDomain> {
R updateProjectInfo(List<TSettleDomainEkpVo> list);
List<TSettleDomain> getOwnSettleDomainNoPage(String toString, String settleName);
R<IPage<TSettleDomainVo>> getOwnSettleDomain(Page<TSettleDomainVo> page, String userId, String name);
}
......@@ -46,6 +46,7 @@ import org.springframework.transaction.annotation.Transactional;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
......@@ -394,4 +395,18 @@ public class TSettleDomainServiceImpl extends ServiceImpl<TSettleDomainMapper, T
}
return true;
}
@Override
public List<TSettleDomain> getOwnSettleDomainNoPage(String userId, String settleName) {
if(Common.isNotNull(userId)){
return baseMapper.getOwnSettleDomainNoPage(userId,settleName);
}
return Collections.emptyList();
}
@Override
public R<IPage<TSettleDomainVo>> getOwnSettleDomain(Page<TSettleDomainVo> page, String userId, String name) {
if(Common.isNotNull(userId)){
return R.ok(baseMapper.getOwnSettleDomain(page,userId,name),CommonConstants.RESULT_DATA_SUCESS);
}
return (R<IPage<TSettleDomainVo>>) Collections.emptyList();
}
}
package com.yifu.cloud.plus.v1.yifu.archives.utils;
import lombok.Getter;
import lombok.Setter;
import javax.validation.Valid;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
/**
* @program: master
* @description: 验证list对象
* @author: pwang
* @create: 2020-07-29 20:17
**/
@Getter
@Setter
public class ListWrapper<E> implements Serializable {
private static final long serialVersionUID = 1L;
@Valid
private List<E> list;
public ListWrapper() {
list = new ArrayList<>();
}
public ListWrapper(List<E> list) {
this.list = list;
}
}
......@@ -311,4 +311,30 @@
</foreach>
</if>
</select>
<select id="getOwnSettleDomainNoPage" resultMap="tSettleDomainMap">
SELECT
<include refid="Base_Column_List"/>
FROM
t_settle_domain a
where
1=1
<if test="name != null and name.trim() != ''">
and a.DEPART_NAME like concat("%",#{name},"%")
</if>
and a.id in (select b.settle_id from m_setttle_customer_user b where b.user_id = #{userId}) and a.DELETE_FLAG = '0'
</select>
<select id="getOwnSettleDomain" resultMap="tSettleDomainMap">
SELECT
<include refid="Base_Column_List"/>
FROM
t_settle_domain a
where
1=1
<if test="name != null and name.trim() != ''">
and a.DEPART_NAME like concat("%",#{name},"%")
</if>
and a.id in (select b.settle_id from m_setttle_customer_user b where b.user_id = #{userId}) and a.DELETE_FLAG = '0'
</select>
</mapper>
......@@ -79,6 +79,12 @@
<groupId>com.yifu.cloud.plus.v1</groupId>
<artifactId>yifu-common-swagger</artifactId>
</dependency>
<dependency>
<groupId>com.yifu.cloud.plus.v1</groupId>
<artifactId>yifu-business-api</artifactId>
<version>1.0.0</version>
<scope>compile</scope>
</dependency>
</dependencies>
<build>
......
package com.yifu.cloud.plus.v1.yifu.common.core.constant;
/**
* B端员工及合同相关静态数据
* @Author fxj
* @Date 2020-08-25
**/
public class EmpBusinessConstants {
private EmpBusinessConstants(){
throw new IllegalStateException("EmpBusinessConstants class");
}
public static final String empContractSituationNew = "新签";
public static final String empContractSituationRenew = "续签";
public static final int ninety = 90;
public static final String noSettleDomainAuth = "无结算主体权限,请联系管理员分配!";
public static final String selectSettleDomainOrCallManager = "请选择项目或联系管理员分配权限!";
}
package com.yifu.cloud.plus.v1.yifu.common.dapr.util;
import com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysUser;
import com.yifu.cloud.plus.v1.yifu.admin.api.vo.AllUserNaVo;
import com.yifu.cloud.plus.v1.yifu.admin.api.vo.AreaMap;
import com.yifu.cloud.plus.v1.yifu.admin.api.vo.AreaVo;
......@@ -81,4 +82,12 @@ public class UpmsDaprUtils {
}
return allUserVoR;
}
public R<SysUser> getSimpleUser(String userId) {
R<SysUser> userR = HttpDaprUtil.invokeMethodPost(daprUpmsProperties.getAppUrl(),daprUpmsProperties.getAppId(),"/user/inner/getSimpleUser",userId, SysUser.class, SecurityConstants.FROM_IN);
if (Common.isEmpty(userR)){
return R.failed("获取所有用户数据失败!");
}
return userR;
}
}
......@@ -17,6 +17,7 @@
package com.yifu.cloud.plus.v1.yifu.common.security.util;
import cn.hutool.core.util.StrUtil;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import lombok.experimental.UtilityClass;
......@@ -90,4 +91,12 @@ public class SecurityUtils {
YifuUser user = getUser();
return null != user && null != user.getClientRoleMap() ? user.getClientRoleMap().get(client) : null;
}
public static boolean isHaveAllOrg(String clientIdHrB, YifuUser user) {
if ( (CommonConstants.ONE_STRING.equals(user.getId()))){
return true;
}else{
return false;
}
}
}
......@@ -372,6 +372,12 @@ public class UserController {
return userIds.toString();
}
@Inner
@PostMapping(value = {"/inner/getSimpleUser"})
public SysUser getSimpleUser(@RequestBody String userId) {
return userService.getById(userId);
}
/**
* @param nickName 用户名称
* @return 上级部门用户列表
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment