Commit 2d6903a0 authored by huyuchen's avatar huyuchen

fdd 代码修改

parent d63cb7bd
......@@ -22,6 +22,7 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TSettleDomain;
import com.yifu.cloud.plus.v1.yifu.archives.service.TSettleDomainService;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog;
......@@ -138,4 +139,28 @@ public class TSettleDomainController {
}
return tSettleDomainService.getSettleDomainIdsByUserId(user.getId());
}
/**
* @param
* @Author: wangan
* @Date: 2019/10/18
* @Description:通过id获取结算主体及单位部分信息
**/
@Inner
@PostMapping("/getSettleDomainSelectVoById")
public R<TSettleDomainSelectVo> getInnerSettleDomainSelectVoByUserId(@RequestParam String id) {
return new R<>(tSettleDomainService.selectSettleDomainSelectVosById(id));
}
/**
* @param
* @Author: wangan
* @Date: 2019/10/18
* @Description:获取所有客户单位的结算主体信息
**/
@Inner
@PostMapping("/selectAllSettleDomainSelectVos")
public R<List<TSettleDomainSelectVo>> selectAllSettleDomainSelectVos() {
return new R<>(tSettleDomainService.selectAllSettleDomainSelectVos());
}
}
......@@ -19,7 +19,11 @@ package com.yifu.cloud.plus.v1.yifu.archives.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TSettleDomain;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 结算主体表
......@@ -30,4 +34,20 @@ import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface TSettleDomainMapper extends BaseMapper<TSettleDomain> {
/**
* @param id
* @Author: wangan
* @Date: 2019/10/18
* @Description: 通过id获取结算主体及单位部分信息
**/
TSettleDomainSelectVo selectSettleDomainSelectVosById(@Param("id") String id);
/**
* 获取所有客户单位的结算主体信息
* @Author fxj
* @Date 2019-12-24
* @param
* @return
**/
List<TSettleDomainSelectVo> selectAllSettleDomainSelectVos();
}
......@@ -19,6 +19,7 @@ package com.yifu.cloud.plus.v1.yifu.archives.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TSettleDomain;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import java.util.List;
......@@ -41,4 +42,23 @@ public interface TSettleDomainService extends IService<TSettleDomain> {
void removeSettleCache(YifuUser user, List<String> userId);
List<String> getSettleDomainIdsByUserId(String id);
/**
* 通过id获取结算主体及单位部分信息
* @param
* @return
* @Author fxj
* @Date 2019-12-24
**/
TSettleDomainSelectVo selectSettleDomainSelectVosById(String id);
/**
* 获取所有客户单位的结算主体信息
* @param
* @return
* @Author fxj
* @Date 2019-12-24
**/
List<TSettleDomainSelectVo> selectAllSettleDomainSelectVos();
}
......@@ -22,6 +22,7 @@ import com.yifu.cloud.plus.v1.yifu.archives.entity.TSettleDomain;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.TCutsomerDataPermissonMapper;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.TSettleDomainMapper;
import com.yifu.cloud.plus.v1.yifu.archives.service.TSettleDomainService;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CacheConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.RedisUtil;
......@@ -81,4 +82,22 @@ public class TSettleDomainServiceImpl extends ServiceImpl<TSettleDomainMapper, T
}
return domainIds;
}
/**
* @param id
* @Author: wangan
* @Date: 2019/10/18
* @Description: dataCheckDepart
* @return: com.yifu.cloud.v1.hrms.api.vo.TSettleDomainSelectVo
**/
@Override
public TSettleDomainSelectVo selectSettleDomainSelectVosById(String id) {
return baseMapper.selectSettleDomainSelectVosById(id);
}
@Override
public List<TSettleDomainSelectVo> selectAllSettleDomainSelectVos() {
List<TSettleDomainSelectVo> sdList = baseMapper.selectAllSettleDomainSelectVos();
return sdList;
}
}
......@@ -72,4 +72,120 @@
<result property="existAdvancePayment" column="EXIST_ADVANCE_PAYMENT"/>
<result property="backPayCycle" column="BACK_PAY_CYCLE"/>
</resultMap>
<sql id="Base_Column_List">
a.ID,
a.DEPART_NO,
a.DEPART_NAME,
a.IS_NEW,
a.NEW_REMARK,
a.DELETE_FLAG,
a.DP_AUDIT_FLAG,
a.OLD_ID,
a.BELONG_CONTRACT,
a.DP_AUDIT_OPINION,
a.DP_AUDIT_MAN,
a.DP_AUDIT_MAN_NAME,
a.LAST_AUDIT_DATE,
a.SERVER_ITEM,
a.INCOME_BELONG,
a.INCOME_BELONG_SUB,
a.CUSTOMER_ID,
a.CREATE_USER_NAME,
a.COMMIT_USER,
a.COMMIT_USER_NAME,
a.BALANCE,
a.INVOICE_BALANCE,
a.FIRST_PASS_FLAG,
a.FIRST_PASS_TIME,
a.PROVINCE,
a.CITY,
a.TOWN,
a.STOP_FLAG,
a.employee_num,
a.STOP_DATE,
a.STOP_REASON,
a.STOP_USER,
a.STOP_USER_NAME,
a.TYPE,
a.BUSINESS_PRIMARY_TYPE,
a.BUSINESS_SECOND_TYPE,
a.BUSINESS_THIRD_TYPE,
a.MANAGER_AUDIT_OPINION,
a.MANAGER_AUDIT_MAN,
a.MANAGER_AUDIT_MAN_NAME,
a.AUDIT_TIME,
a.MANAGER_AUDIT_TIME,
a.CREATE_TYPE,
a.RELATE_FLAG,
a.EXCEPTION_REMARK,
a.EXIST_ADVANCE_PAYMENT,
a.BACK_PAY_CYCLE,
a.CREATE_BY,
a.CREATE_NAME,
a.CREATE_TIME,
a.UPDATE_BY,
a.UPDATE_TIME
</sql>
<resultMap id="tSettleDomainSelectVoMap" type="com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo">
<id property="id" column="ID"/>
<result property="province" column="PROVINCE"/>
<result property="city" column="CITY"/>
<result property="town" column="TOWN"/>
<result property="departNo" column="DEPART_NO"/>
<result property="departName" column="DEPART_NAME"/>
<result property="isNew" column="IS_NEW"/>
<result property="newRemark" column="NEW_REMARK"/>
<result property="createTime" column="CREATE_TIME"/>
<result property="deleteFlag" column="DELETE_FLAG"/>
<result property="dpAuditFlag" column="DP_AUDIT_FLAG"/>
<result property="oldId" column="OLD_ID"/>
<result property="belongContract" column="BELONG_CONTRACT"/>
<result property="customerId" column="CUSTOMER_ID"/>
<result property="customerName" column="customerName"/>
<result property="customerCode" column="customerCode"/>
<result property="dpAuditMan" column="DP_AUDIT_MAN"/>
<result property="dpAuditOpinion" column="DP_AUDIT_OPINION"/>
<result property="lastAuditDate" column="LAST_AUDIT_DATE"/>
<result property="serverItem" column="SERVER_ITEM"/>
<result property="incomeBelong" column="INCOME_BELONG"/>
<result property="incomeBelongSub" column="INCOME_BELONG_SUB"/>
<result property="createUserName" column="CREATE_USER_NAME"/>
<result property="commitUser" column="COMMIT_USER"/>
<result property="commitUserName" column="COMMIT_USER_NAME"/>
<result property="stopFlag" column="STOP_FLAG"/>
</resultMap>
<select id="selectSettleDomainSelectVosById"
resultType="com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo">
SELECT
<include refid="Base_Column_List"/>,
c.customerId,
c.CUSTOMER_NAME as 'customerName',
c.CUSTOMER_CODE as 'customerCode',
c.INDUSTRY_BELONG as 'industryBelong'
FROM
t_settle_domain a
LEFT JOIN (
select ID AS 'customerId',
CUSTOMER_NAME,
INDUSTRY_BELONG,
CUSTOMER_CODE from t_customer_info
) c ON a.CUSTOMER_ID = c.customerId
WHERE a.id=#{id} GROUP BY a.id
</select>
<select id="selectAllSettleDomainSelectVos" resultMap="tSettleDomainSelectVoMap">
SELECT
<include refid="Base_Column_List"/>,
c.ID AS 'customerId',
c.CUSTOMER_NAME as 'customerName',
c.CUSTOMER_CODE as 'customerCode',
c.customer_type as 'customerTypeName'
FROM
t_settle_domain a
LEFT JOIN t_customer_info c ON a.CUSTOMER_ID = c.ID
where a.DELETE_FLAG = '0'
</select>
</mapper>
......@@ -122,6 +122,8 @@ public interface CommonConstants {
*/
String ZERO_STRING = "0";
String FOUR_STRING = "4";
/**
* number 0
*/
......@@ -251,6 +253,8 @@ public interface CommonConstants {
//错误信息
String ERROR_NO_DOMAIN = "无此实体!";
String NULL = null;
/**
* @Author fxj
* @Date 2020-03-12 14:48
......
......@@ -305,4 +305,44 @@ public class Common {
}
return null;
}
/**
* 默认"null"
* @param obj
* @return
*/
public static String isBlankToNullString(String obj) {
if(obj == null || "".equals(obj)) {
return CommonConstants.NULL;
}
if(obj.trim().length() == 0) {
return CommonConstants.NULL;
}
if(obj.trim().equals("null")) {
return CommonConstants.NULL;
}
return obj;
}
/**
* 两个日期中间年份
* @Author fxj
* @Date 2021-07-22
* @param start yyyy-MM-dd
* @param end yyyy-MM-dd
* @return
**/
public static int getYearOfTime(String start, String end) {
int year = 0;
if (Common.isEmpty(start) || Common.isEmpty(end) || start.length() < 10 || end.length() < 10){
return year;
}
String startYear = start.substring(0,4);
String endYear = end.substring(0,4);
if (!Common.isNumber(startYear) || !Common.isNumber(endYear)){
return year;
}
year = Integer.valueOf(endYear).intValue() - Integer.valueOf(startYear).intValue() ;
return year < 0?0:year;
}
}
package com.yifu.cloud.plus.v1.yifu.common.dapr.util;
import com.yifu.cloud.plus.v1.yifu.archives.vo.DispatchCheckVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.DispatchEmpVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
......@@ -52,4 +52,35 @@ public class ArchivesDaprUtil {
}
return res;
}
/**
* @Author fxj
* @Description 获取派单校验需要的档案信息
* @Date 21:18 2022/7/18
* @Param
* @return
**/
public R<TSettleDomainSelectVo> getSettleDomainSelectVoById(String departId){
R<TSettleDomainSelectVo> res = HttpDaprUtil.invokeMethodPost(daprArchivesProperties.getAppUrl(),daprArchivesProperties.getAppId(),"/tsettledomain/getSettleDomainSelectVoById",departId, Map.class, SecurityConstants.FROM_IN);
if (Common.isEmpty(res)){
return R.failed("获取派单校验需要的档案信息失败!");
}
return res;
}
/**
* @Author fxj
* @Description 获取所有客户单位的结算主体信息
* @Date 21:18 2022/7/18
* @Param
* @return
**/
public R<List<TSettleDomainSelectVo>> selectAllSettleDomainSelectVos(){
R<List<TSettleDomainSelectVo>> res = HttpDaprUtil.invokeMethodPost(daprArchivesProperties.getAppUrl(),daprArchivesProperties.getAppId(),"/tsettledomain/getSettleDomainSelectVoById","", Map.class, SecurityConstants.FROM_IN);
if (Common.isEmpty(res)){
return R.failed("获取所有客户单位的结算主体信息失败!");
}
return res;
}
}
......@@ -13,8 +13,8 @@ import org.springframework.boot.context.properties.EnableConfigurationProperties
import java.util.List;
/**
* @Author fxj
* @Date 2022/7/11
* @Author huyc
* @Date 2022-07-18
* @Description
* @Version 1.0
*/
......
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