Commit 871e7a92 authored by hongguangwu's avatar hongguangwu

Merge remote-tracking branch 'origin/develop' into develop

parents af2026af 561b68e1
......@@ -234,6 +234,9 @@ public interface CommonConstants {
String RESULT_EMPTY = "获取结果为空";
//错误信息
String ERROR_NO_DOMAIN = "无此实体!";
/**
* @Author fxj
* @Date 2020-03-12 14:48
......@@ -339,4 +342,8 @@ public interface CommonConstants {
* 获取登录用户信息失败
**/
public static final String USER_FAIL = "获取登录用户信息失败!";
public static final int SIXTEEN_INT = 16;
public static final String FIFTEEN = "15";
public static final String NINETEEN = "19";
}
......@@ -116,4 +116,7 @@ public class ExcelAttributeConstants {
public static final String WORKINFO_TYPE = "workinfo_type";
// 项目档案来源
public static final String PROJECT_EMP_SOURCE = "project_emp_source";
//区域字段组合
public static final String DEPARTID_PROVINCE_CITY_TOWN = "departId_province_city_town";
}
......@@ -5,10 +5,8 @@ import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Date;
import java.util.List;
import java.math.BigDecimal;
import java.util.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
......@@ -241,4 +239,63 @@ public class Common {
}
}
public static <T> HashMap<String, T> listToHashMapByKey(List<T> list, String keyPreStr, String filedKey) {
HashMap<String, T> hashMap = new HashMap<String,T>();
Object key = null;
String[] split = null;
if (null != list) {
if (filedKey.indexOf(CommonConstants.DOWN_LINE_CHAR) > CommonConstants.dingleDigitIntArray[0]) {
split = filedKey.split(CommonConstants.DOWN_LINE_STRING);
for (T t : list) {
key= null;
key = getFieldsValue(t, split, key);
hashMap.put(keyPreStr +CommonConstants.DOWN_LINE_STRING+ getStringValByObject(key), t);
}
} else {
for (T t : list) {
key= null;
key = getFieldValueByName(filedKey, t);
hashMap.put(keyPreStr +CommonConstants.DOWN_LINE_STRING+ getStringValByObject(key), t);
}
}
}
return hashMap;
}
/**
* 从实体中获取多个字段的值并已下划线分割
*
* @param t
* @param split
* @return
* @Author fxj
* @Date 2019-09-24
**/
private static <T> Object getFieldsValue(T t, String[] split, Object key) {
int i = 0;
while (i < split.length) {
if (null == key || CommonConstants.EMPTY_STRING.equals(key)) {
key = getFieldValueByName(split[i], t);
} else {
key = key + CommonConstants.DOWN_LINE_STRING + getFieldValueByName(split[i], t);
}
i++;
}
return key;
}
/**
* 如果为空或零 返回true 否则 返回false
* @Author fxj
* @Date 2020-12-29
* @param data
* @return
**/
public static boolean isNullOrZero(BigDecimal data) {
if (null == data ||
BigDecimal.ZERO.compareTo(data) == CommonConstants.ZERO_INT){
return true;
}
return false;
}
}
package com.yifu.cloud.plus.v1.yifu.common.dapr.util;
import com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysArea;
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;
import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprArchivesProperties;
import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprUpmsProperties;
import lombok.extern.log4j.Log4j2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import java.util.List;
/**
* @Author fxj
* @Date 2022/7/11
* @Description
* @Version 1.0
*/
@Log4j2
@EnableConfigurationProperties(DaprUpmsProperties.class)
public class UpmsDaprUtils {
@Autowired
private static DaprUpmsProperties daprUpmsProperties;
/**
* 获取所有区域数据
* @Author huyc
* @Date 2022-07-18
* @return
**/
public static R<List<SysArea>> getAreaListR() {
R<List<SysArea>> areaListR = HttpDaprUtil.invokeMethodPost(daprUpmsProperties.getAppUrl(),daprUpmsProperties.getAppId(),"/area/inner/getSysAreaList","", SysArea.class, SecurityConstants.FROM_IN);
if (Common.isEmpty(areaListR)){
return R.failed("获取所有区域数据失败!");
}
return areaListR;
}
}
dapr.upms.appUrl=http://yifu-upms.qas-mvp.svc.cluster.local:3500/v1.0/invoke/
dapr.upms.appUrl=http://localhost:3500/v1.0/invoke/
dapr.upms.appId=yifu-upms
dapr.upms.appPort=4000
dapr.upms.httpPort=3500
......@@ -6,11 +6,18 @@ dapr.upms.grpcPort=52000
dapr.upms.metricsPort=9094
#\u6D4B\u8BD5\u73AF\u5883
dapr.check.appUrl=http://yifu-check.qas-mvp.svc.cluster.local:3500/v1.0/invoke/
#dapr.check.appUrl=http://yifu-check.qas-mvp.svc.cluster.local:3500/v1.0/invoke/
#\u672C\u5730
#dapr.check.appUrl=http://localhost:3502/v1.0/invoke/
dapr.check.appUrl=http://localhost:3507/v1.0/invoke/
dapr.check.appId=yifu-check
dapr.check.appPort=5022
dapr.check.httpPort=3502
dapr.check.grpcPort=52002
dapr.check.metricsPort=9092
\ No newline at end of file
#dapr.check.appPort=5022
#dapr.check.httpPort=3502
#dapr.check.grpcPort=52002
#dapr.check.metricsPort=9092
dapr.social.appUrl=http://localhost:3509/v1.0/invoke/
dapr.social.appId\uFF1B
dapr.social.appPort=5002
dapr.social.httpPort=3509
dapr.social.grpcPort=52003
dapr.social.metricsPort=9093
\ No newline at end of file
package com.yifu.cloud.plus.v1.yifu.insurances.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;
import java.math.BigDecimal;
import java.util.Date;
/**
* @author licancan
* @description 商险明细表 t_insurance_detail
* @date 2022-07-18 16:20:16
*/
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("t_insurance_detail")
@Tag(name = "商险明细表")
public class TInsuranceDetail extends BaseEntity {
/**
* 主键
*/
@TableId(type = IdType.ASSIGN_ID)
@Schema(description = "主键")
private String id;
/**
* 员工档案id
*/
private String empId;
/**
* 员工姓名
*/
@NotBlank(message = "员工姓名不能为空")
@Length(max = 32, message = "员工姓名不能超过32个字符")
@Schema(description = "员工姓名")
private String empName;
/**
* 员工身份证号
*/
private String empIdcardNo;
/**
* 项目编码
*/
private String deptNo;
/**
* 保险公司名称(冗余字段)
*/
private String insuranceCompanyName;
/**
* 险种主键
*/
private String insuranceTypeId;
/**
* 购买标准
*/
private String buyStandard;
/**
* 保单编号
*/
private String policyNo;
/**
* 保单开始时间
*/
private Date policyStart;
/**
* 保单结束时间
*/
private Date policyEnd;
/**
* 保单生效日期
*/
private Date policyEffect;
/**
* 办理时间
*/
private Date batchDate;
/**
* 结算月
*/
private String settleMonth;
/**
* 发票号
*/
private String invoiceNo;
/**
* 购买类型, 1新增、3批增、4替换
*/
private Integer buyType;
/**
* 商险购买地省名称
*/
private String businessInsuranceProvName;
/**
* 商险购买地市名称
*/
private String businessInsuranceCityName;
/**
* 商险办理省名称
*/
private String businessInsuranceHandleProvName;
/**
* 商险办理城市名称
*/
private String businessInsuranceHandleCityName;
/**
* 结算类型 (1、单独结算 2、合并结算-和工资一起结算)
*/
private String settleType;
/**
* 实际保费
*/
private BigDecimal actualPremium;
/**
* 预估保费
*/
private BigDecimal estimatePremium;
/**
* 差额(实缴-预估)
*/
private BigDecimal settleBalance;
/**
* 投保办理状态 1待办理 2办理中 3已办理 4投保退回 5 已减员
*/
private Integer buyHandleStatus;
/**
* 结算办理状态 1待结算 2结算中 3已结算
*/
private Integer settleHandleStatus;
/**
* 减员状态 1待减员 2减员中3减员退回
*/
private Integer reduceHandleStatus;
/**
* 是否出险 0未出险 1已出险
*/
private Integer isUse;
/**
* 是否有效 0有效 1无效
*/
private Integer isEffect;
/**
* 是否过期 0未过期 1已过期
*/
@Schema(description = "是否过期 0未过期 1已过期")
private Integer isOverdue;
/**
* 是否删除 0未删除/1删除
*/
@Schema(description = "是否删除 0否/1是")
private Integer deleteFlag;
private static final long serialVersionUID = 1L;
}
\ No newline at end of file
package com.yifu.cloud.plus.v1.yifu.insurances.controller;
import com.yifu.cloud.plus.v1.yifu.insurances.service.TInsuranceDetailService;
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.http.HttpHeaders;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
/**
* @author licancan
* @description 针对表【t_insurance_detail(商险明细表)】的数据库操作controller
* @date 2022-07-18 16:38:48
*/
@RestController
@RequiredArgsConstructor
@RequestMapping("/insuranceDetail")
@Tag(name = "商险相关")
@SecurityRequirement(name = HttpHeaders.AUTHORIZATION)
public class TInsuranceDetailController {
@Resource
private TInsuranceDetailService tInsuranceDetailService;
}
package com.yifu.cloud.plus.v1.yifu.insurances.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail;
import org.apache.ibatis.annotations.Mapper;
/**
* @author licancan
* @description 针对表【t_insurance_detail(商险明细表)】的数据库操作Mapper
* @date 2022-07-18 16:20:16
*/
@Mapper
public interface TInsuranceDetailMapper extends BaseMapper<TInsuranceDetail> {
}
package com.yifu.cloud.plus.v1.yifu.insurances.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail;
/**
* @author licancan
* @description 针对表【t_insurance_detail(商险明细表)】的数据库操作Service
* @date 2022-07-18 16:20:16
*/
public interface TInsuranceDetailService extends IService<TInsuranceDetail> {
}
package com.yifu.cloud.plus.v1.yifu.insurances.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail;
import com.yifu.cloud.plus.v1.yifu.insurances.mapper.TInsuranceDetailMapper;
import com.yifu.cloud.plus.v1.yifu.insurances.service.TInsuranceDetailService;
import org.springframework.stereotype.Service;
/**
* @author licancan
* @description 针对表【t_insurance_detail(商险明细表)】的数据库操作Service实现
* @date 2022-07-18 16:20:16
*/
@Service
public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMapper, TInsuranceDetail> implements TInsuranceDetailService {
}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yifu.cloud.plus.v1.yifu.insurances.mapper.TInsuranceDetailMapper">
<resultMap id="BaseResultMap" type="com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail">
<id property="id" column="ID" jdbcType="VARCHAR"/>
<result property="empId" column="EMP_ID" jdbcType="VARCHAR"/>
<result property="empName" column="EMP_NAME" jdbcType="VARCHAR"/>
<result property="empIdcardNo" column="EMP_IDCARD_NO" jdbcType="VARCHAR"/>
<result property="deptNo" column="DEPT_NO" jdbcType="VARCHAR"/>
<result property="insuranceCompanyName" column="INSURANCE_COMPANY_NAME" jdbcType="VARCHAR"/>
<result property="insuranceTypeId" column="INSURANCE_TYPE_ID" jdbcType="VARCHAR"/>
<result property="buyStandard" column="BUY_STANDARD" jdbcType="VARCHAR"/>
<result property="policyNo" column="POLICY_NO" jdbcType="VARCHAR"/>
<result property="policyStart" column="POLICY_START" jdbcType="DATE"/>
<result property="policyEnd" column="POLICY_END" jdbcType="DATE"/>
<result property="policyEffect" column="POLICY_EFFECT" jdbcType="DATE"/>
<result property="batchDate" column="BATCH_DATE" jdbcType="TIMESTAMP"/>
<result property="settleMonth" column="SETTLE_MONTH" jdbcType="VARCHAR"/>
<result property="invoiceNo" column="INVOICE_NO" jdbcType="VARCHAR"/>
<result property="buyType" column="BUY_TYPE" jdbcType="TINYINT"/>
<result property="businessInsuranceProvName" column="BUSINESS_INSURANCE_PROV_NAME" jdbcType="VARCHAR"/>
<result property="businessInsuranceCityName" column="BUSINESS_INSURANCE_CITY_NAME" jdbcType="VARCHAR"/>
<result property="businessInsuranceHandleProvName" column="BUSINESS_INSURANCE_HANDLE_PROV_NAME" jdbcType="VARCHAR"/>
<result property="businessInsuranceHandleCityName" column="BUSINESS_INSURANCE_HANDLE_CITY_NAME" jdbcType="VARCHAR"/>
<result property="settleType" column="SETTLE_TYPE" jdbcType="VARCHAR"/>
<result property="actualPremium" column="ACTUAL_PREMIUM" jdbcType="DECIMAL"/>
<result property="estimatePremium" column="ESTIMATE_PREMIUM" jdbcType="DECIMAL"/>
<result property="settleBalance" column="SETTLE_BALANCE" jdbcType="DECIMAL"/>
<result property="buyHandleStatus" column="BUY_HANDLE_STATUS" jdbcType="TINYINT"/>
<result property="settleHandleStatus" column="SETTLE_HANDLE_STATUS" jdbcType="TINYINT"/>
<result property="reduceHandleStatus" column="REDUCE_HANDLE_STATUS" jdbcType="TINYINT"/>
<result property="isUse" column="IS_USE" jdbcType="TINYINT"/>
<result property="isEffect" column="IS_EFFECT" jdbcType="TINYINT"/>
<result property="isOverdue" column="IS_OVERDUE" jdbcType="TINYINT"/>
<result property="createBy" column="CREATE_BY" jdbcType="VARCHAR"/>
<result property="createName" column="CREATE_NAME" jdbcType="VARCHAR"/>
<result property="createTime" column="CREATE_TIME" jdbcType="TIMESTAMP"/>
<result property="updateBy" column="UPDATE_BY" jdbcType="VARCHAR"/>
<result property="updateTime" column="UPDATE_TIME" jdbcType="TIMESTAMP"/>
<result property="deleteFlag" column="DELETE_FLAG" jdbcType="TINYINT"/>
</resultMap>
<sql id="Base_Column_List">
ID,EMP_ID,EMP_NAME,
EMP_IDCARD_NO,DEPT_NO,INSURANCE_COMPANY_NAME,
INSURANCE_TYPE_ID,BUY_STANDARD,POLICY_NO,
POLICY_START,POLICY_END,POLICY_EFFECT,
BATCH_DATE,SETTLE_MONTH,INVOICE_NO,
BUY_TYPE,BUSINESS_INSURANCE_PROV_NAME,BUSINESS_INSURANCE_CITY_NAME,
BUSINESS_INSURANCE_HANDLE_PROV_NAME,BUSINESS_INSURANCE_HANDLE_CITY_NAME,SETTLE_TYPE,
ACTUAL_PREMIUM,ESTIMATE_PREMIUM,SETTLE_BALANCE,
BUY_HANDLE_STATUS,SETTLE_HANDLE_STATUS,REDUCE_HANDLE_STATUS,
IS_USE,IS_EFFECT,IS_OVERDUE,
CREATE_BY,CREATE_NAME,CREATE_TIME,
UPDATE_BY,UPDATE_TIME,DELETE_FLAG
</sql>
</mapper>
package com.yifu.cloud.plus.v1.yifu.social.constants;
public class PreDispatchConstants {
public static final String NO_PENSION_AREA_ADD = "获取缴纳地数据失败,请检查养老城市或公积金城市名称是否合规!";
public static final String NO_PENSION_AREA_REDUCE = "获取缴纳地数据失败,请检查养老截止城市或公积金截止城市名称是否合规!";
public static final String NO_PENSION_AREA= "请检查派单缴纳地名称是否合规!";
public static final String SOCIAL_START_DATE_ERROR = "社保起缴月份在可补缴月份之前,请确认后操作!";
public static final String NO_SOCIAL_BASE_SET_INFO = "未找到有效的社保基数配置信息(户+缴纳地+起缴时间)!";
public static final String FUND_START_DATE_ERROR = "公积金起缴月份在可补缴月份之前,请确认后操作!";
public static final String NO_FUND_BASE_SET_INFO = "未找到有效的公积金基数配置信息(户+缴纳地+起缴时间)!";
public static final String[] ADD_HEAD_INFO = {"日期","接单分公司","缴费地","客户名称","员工姓名","身份证号",
"联系电话1","联系电话2","入职日期","正式工资","派遣开始日期","派遣结束日期","合同开始日期","合同终止日期",
"试用开始日期","试用结束日期","试用期工资","工作制","合同版本","是否电话通知","实际工作地","备注说明1",
"备注说明2","养老城市","养老基数","养老起缴月","医疗城市","医疗基数","医疗起缴月","工伤城市","工伤基数",
"工伤起缴月","生育城市","生育基数","生育起缴月","失业城市","失业基数","失业起缴月","公积金城市","公积金基数",
"公积金个人比例","公积金企业比例","公积金起缴月","派单分公司","派单客服","小合同名称","唯一号","客户编号","服务类别"};
public static final String[] REDUCE_HEAD_INFO = {"日期","接单分公司","缴费地","客户名称","员工姓名","身份证号",
"离职日期","离职原因","联系电话1","联系电话2","备注说明1","养老城市","养老截止时间","医疗城市","医疗截止时间",
"工伤城市","工伤截止时间","生育城市","生育截止时间","失业城市","失业截止时间","公积金城市","公积金截止时间",
"派单分公司","派单客服","小合同名称","合同类型"};
public static final String HAED_ERROR = "请使用标准模板!";
public static final String POSITION = "服务";
public static final String CONTRACT_NAME = "代理社保";
public static final String DISPATCH_TYPE_ERROR = "派单类型有误,0-派增 1-派减!";
public static final String EMPIDCARD_IS_EMPTY = "身份证不可变更!";
public static final String EXISTS_SAME_EMPIDCARD_ADD = "当月已存在对应身份证的预派单信息!";
public static final String PREDISPATCH_EXCEPTION = "派单异常";
public static final String DISPATCH_ADD_SUCCESS = "派单成功";
public static final String NO_SOCIAL_CAN_REDUCE = "无社保数据可派减,请查看社保派增是否办理成功!";
public static final String NO_FUND_CAN_REDUCE = "无公积金数据可派减,请查看公积金派增是否办理成功!";
public static final String PRESTATUS_ERROR = "‘是否派单’为是且‘预派单状态’为正常未派单才可派单!";
public static final String CITY = "city";
public static final String TOWN = "town";
public static final String SOCIAL_CITY = "social_city";
public static final String SOCIAL_TOWN = "social_town";
public static final String FUND_CITY = "fund_city";
public static final String FUND_TOWN = "fund_town";
public static final String YES_CH = "是";
public static final String NO_CH = "否";
public static final String DATA_CHECK = "数据校验信息:";
public static final String DATA_HANDLE_RESULT = "数据导入结果:";
public static final String DATA_IMPORT_ANALYSIS_ERROR = "数据导入解析失败!";
public static final String IMPORT_PREDISPATCH = "导出预派单";
public static final String NO_SOCIAL_FUND_ADDRESS_ADD = "派增:养老城市和公积金城市不可同时为空,请确认表中有‘养老城市’和‘公积金城市’数据列及数据!";
public static final String NO_SOCIAL_FUND_ADDRESS_REDUCE = "派减:养老城市和公积金城市不可同时为空,请确认表中有‘养老城市’和‘公积金城市’数据列及数据!";
public static final String TEL_NOT_EMPTY = "联系电话1不可为空!";
public static final String TEL_INVALID = "联系电话1无效!";
public static final String GET_AREA_INFO = "获取区域数据失败!";
}
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.social.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog;
import com.yifu.cloud.plus.v1.yifu.social.entity.TPaymentInfo;
import com.yifu.cloud.plus.v1.yifu.social.service.TPaymentInfoService;
import org.springframework.security.access.prepost.PreAuthorize;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.http.HttpHeaders;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* 缴费库
*
* @author huyc
* @date 2022-07-14 18:53:42
*/
@RestController
@RequiredArgsConstructor
@RequestMapping("/tpaymentinfo" )
@Tag(name = "缴费库管理")
@SecurityRequirement(name = HttpHeaders.AUTHORIZATION)
public class TPaymentInfoController {
private final TPaymentInfoService tPaymentInfoService;
/**
* 简单分页查询
* @param page 分页对象
* @param tPaymentInfo 缴费库
* @return
*/
@Operation(summary = "简单分页查询", description = "简单分页查询")
@GetMapping("/page")
public R<IPage<TPaymentInfo>> getTPaymentInfoPage(Page<TPaymentInfo> page, TPaymentInfo tPaymentInfo) {
return new R<>(tPaymentInfoService.getTPaymentInfoPage(page,tPaymentInfo));
}
/**
* 不分页查询
* @param tPaymentInfo 缴费库
* @return
*/
@Operation(summary = "不分页查询", description = "不分页查询")
@PostMapping("/noPage" )
public R<List<TPaymentInfo>> getTPaymentInfoNoPage(@RequestBody TPaymentInfo tPaymentInfo) {
return R.ok(tPaymentInfoService.list(Wrappers.query(tPaymentInfo)));
}
/**
* 通过id查询缴费库
* @param id id
* @return R
*/
@Operation(summary = "通过id查询", description = "通过id查询:hasPermission('social_tpaymentinfo_get')")
@GetMapping("/{id}" )
public R<TPaymentInfo> getById(@PathVariable("id" ) String id) {
return R.ok(tPaymentInfoService.getById(id));
}
/**
* 新增缴费库
* @param tPaymentInfo 缴费库
* @return R
*/
@Operation(summary = "新增缴费库", description = "新增缴费库:hasPermission('social_tpaymentinfo_add')")
@SysLog("新增缴费库" )
@PostMapping
@PreAuthorize("@pms.hasPermission('social_tpaymentinfo_add')" )
public R<Boolean> save(@RequestBody TPaymentInfo tPaymentInfo) {
return R.ok(tPaymentInfoService.save(tPaymentInfo));
}
/**
* 修改缴费库
* @param tPaymentInfo 缴费库
* @return R
*/
@Operation(summary = "修改缴费库", description = "修改缴费库:hasPermission('social_tpaymentinfo_edit')")
@SysLog("修改缴费库" )
@PutMapping
@PreAuthorize("@pms.hasPermission('social_tpaymentinfo_edit')" )
public R<Boolean> updateById(@RequestBody TPaymentInfo tPaymentInfo) {
return R.ok(tPaymentInfoService.updateById(tPaymentInfo));
}
/**
* 通过id删除缴费库
* @param id id
* @return R
*/
@Operation(summary = "通过id删除缴费库", description = "通过id删除缴费库:hasPermission('social_tpaymentinfo_del')")
@SysLog("通过id删除缴费库" )
@DeleteMapping("/{id}" )
@PreAuthorize("@pms.hasPermission('social_tpaymentinfo_del')" )
public R<Boolean> removeById(@PathVariable String id) {
return R.ok(tPaymentInfoService.removeById(id));
}
}
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.social.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog;
import com.yifu.cloud.plus.v1.yifu.social.entity.TPreDispatchInfo;
import com.yifu.cloud.plus.v1.yifu.social.service.TPreDispatchInfoService;
import org.springframework.security.access.prepost.PreAuthorize;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.http.HttpHeaders;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* 预派单记录
*
* @author huyc
* @date 2022-07-14 18:53:42
*/
@RestController
@RequiredArgsConstructor
@RequestMapping("/tpredispatchinfo" )
@Tag(name = "预派单记录管理")
@SecurityRequirement(name = HttpHeaders.AUTHORIZATION)
public class TPreDispatchInfoController {
private final TPreDispatchInfoService tPreDispatchInfoService;
/**
* 简单分页查询
* @param page 分页对象
* @param tPreDispatchInfo 预派单记录
* @return
*/
@Operation(summary = "简单分页查询", description = "简单分页查询")
@GetMapping("/page")
public R<IPage<TPreDispatchInfo>> getTPreDispatchInfoPage(Page<TPreDispatchInfo> page, TPreDispatchInfo tPreDispatchInfo) {
return new R<>(tPreDispatchInfoService.getTPreDispatchInfoPage(page,tPreDispatchInfo));
}
/**
* 不分页查询
* @param tPreDispatchInfo 预派单记录
* @return
*/
@Operation(summary = "不分页查询", description = "不分页查询")
@PostMapping("/noPage" )
public R<List<TPreDispatchInfo>> getTPreDispatchInfoNoPage(@RequestBody TPreDispatchInfo tPreDispatchInfo) {
return R.ok(tPreDispatchInfoService.list(Wrappers.query(tPreDispatchInfo)));
}
/**
* 通过id查询预派单记录
* @param id id
* @return R
*/
@Operation(summary = "通过id查询", description = "通过id查询:hasPermission('social_tpredispatchinfo_get')")
@GetMapping("/{id}" )
@PreAuthorize("@pms.hasPermission('social_tpredispatchinfo_get')" )
public R<TPreDispatchInfo> getById(@PathVariable("id" ) String id) {
return R.ok(tPreDispatchInfoService.getById(id));
}
/**
* 新增预派单记录
* @param tPreDispatchInfo 预派单记录
* @return R
*/
@Operation(summary = "新增预派单记录", description = "新增预派单记录:hasPermission('social_tpredispatchinfo_add')")
@SysLog("新增预派单记录" )
@PostMapping
@PreAuthorize("@pms.hasPermission('social_tpredispatchinfo_add')" )
public R<Boolean> save(@RequestBody TPreDispatchInfo tPreDispatchInfo) {
return R.ok(tPreDispatchInfoService.save(tPreDispatchInfo));
}
/**
* 修改预派单记录
* @param tPreDispatchInfo 预派单记录
* @return R
*/
@Operation(summary = "修改预派单记录", description = "修改预派单记录:hasPermission('social_tpredispatchinfo_edit')")
@SysLog("修改预派单记录" )
@PutMapping
@PreAuthorize("@pms.hasPermission('social_tpredispatchinfo_edit')" )
public R<Boolean> updateById(@RequestBody TPreDispatchInfo tPreDispatchInfo) {
return tPreDispatchInfoService.update(tPreDispatchInfo);
}
/**
* 通过id删除预派单记录
* @param id id
* @return R
*/
@Operation(summary = "通过id删除预派单记录", description = "通过id删除预派单记录:hasPermission('social_tpredispatchinfo_del')")
@SysLog("通过id删除预派单记录" )
@DeleteMapping("/{id}" )
@PreAuthorize("@pms.hasPermission('social_tpredispatchinfo_del')" )
public R<Boolean> removeById(@PathVariable String id) {
return R.ok(tPreDispatchInfoService.removeById(id));
}
/**
* 修改资料是否提交:0 是 1 否
* @Author huyc
* @Date 2022-07-18
* @param ids
* @param status 0 是 1 否
* @return R
*/
@Operation(summary = "修改资料是否提交", description = "修改资料是否提交:status 0 是 1 否(social_tpredispatchinfo_edit)")
@SysLog("修改资料是否提交")
@PostMapping("/modifyDataSubmitStatus")
@PreAuthorize("@pms.hasPermission('social_tpredispatchinfo_edit')")
public R<Boolean> modifyDataSubmitStatus(@RequestParam(value = "ids",required = true)String ids,
@RequestParam(value = "status",required = true)String status) {
return tPreDispatchInfoService.modifyDataSubmitStatus(ids,status);
}
/**
* 清空预派单默认的派单合同信息
* @Author huyc
* @Date 2022-07-18
* @param ids
* @return R
**/
@Operation(summary = "清空预派单默认的派单合同信息", description = "清空预派单默认的派单合同信息(social_tpredispatchinfo_edit)")
@SysLog("清空预派单默认的派单合同信息")
@PostMapping("/clearContractInfo")
@PreAuthorize("@pms.hasPermission('social_tpredispatchinfo_edit')")
public R<Boolean> clearContractInfo(@RequestParam(value = "ids",required = true)String ids) {
return tPreDispatchInfoService.clearContractInfo(ids);
}
/**
* 更新预派单是否派单状态
* @Author huyc
* @Date 2022-07-18
* @param id
* @param dispatchFlag 0 派单 1 不派单
* @param cancelRemark 不派单 时填写
* @return R
**/
@Operation(summary = "更新预派单是否派单状态", description = "更新预派单是否派单状态(social_tpredispatchinfo_edit)")
@SysLog("更新预派单是否派单状态")
@PostMapping("/updateDispatchFlag")
@PreAuthorize("@pms.hasPermission('social_tpredispatchinfo_edit')")
public R<Boolean> updateDispatchFlag(@RequestParam(value = "id",required = true)String id,
@RequestParam(value = "dispatchFlag",required = true)String dispatchFlag,
@RequestParam(value = "cancelRemark",required = false)String cancelRemark) {
return tPreDispatchInfoService.updateDispatchFlag(id,dispatchFlag,cancelRemark);
}
/**
* 单个派单
* @Author huyc
* @Date 2022-07-18
* @param id
* @return R
*/
@Operation(summary = "单个派单:按创建人和ID", description = "单个派单:按创建人和ID")
@PostMapping("/dispatchById")
public R<Boolean> dispatchById(@RequestParam(value = "id",required = true)String id) {
return tPreDispatchInfoService.dispatchById(id);
}
}
......@@ -24,6 +24,8 @@ import com.yifu.cloud.plus.v1.yifu.social.entity.SysBaseSetInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 基数设置表
*
......@@ -39,4 +41,6 @@ public interface SysBaseSetInfoMapper extends BaseMapper<SysBaseSetInfo> {
* @return
*/
IPage<SysBaseSetInfo> getSysBaseSetInfoPage(Page<SysBaseSetInfo> page, @Param("sysBaseSetInfo") SysBaseSetInfo sysBaseSetInfo);
List<SysBaseSetInfo> getAllByEntity(@Param("sysBaseSetInfo")SysBaseSetInfo sysBaseSetInfo);
}
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.social.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.social.entity.TPaymentInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/**
* 缴费库
*
* @author huyc
* @date 2022-07-14 18:53:42
*/
@Mapper
public interface TPaymentInfoMapper extends BaseMapper<TPaymentInfo> {
/**
* 缴费库简单分页查询
* @param tPaymentInfo 缴费库
* @return
*/
IPage<TPaymentInfo> getTPaymentInfoPage(Page<TPaymentInfo> page, @Param("tPaymentInfo") TPaymentInfo tPaymentInfo);
}
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.social.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.social.entity.TPreDispatchInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 预派单记录
*
* @author huyc
* @date 2022-07-14 18:53:42
*/
@Mapper
public interface TPreDispatchInfoMapper extends BaseMapper<TPreDispatchInfo> {
/**
* 预派单记录简单分页查询
* @param tPreDispatchInfo 预派单记录
* @return
*/
IPage<TPreDispatchInfo> getTPreDispatchInfoPage(Page<TPreDispatchInfo> page, @Param("tPreDispatchInfo") TPreDispatchInfo tPreDispatchInfo);
void clearContractInfo(List<String> idList);
void modifyDataSubmitStatus(@Param("idList")List<String> idList, @Param("status")String status);
int updatePreDispatchInfoById(TPreDispatchInfo tPreDispatchInfo);
}
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.social.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.social.entity.TPaymentInfo;
/**
* 缴费库
*
* @author huyc
* @date 2022-07-14 18:53:42
*/
public interface TPaymentInfoService extends IService<TPaymentInfo> {
/**
* 缴费库简单分页查询
* @param tPaymentInfo 缴费库
* @return
*/
IPage<TPaymentInfo> getTPaymentInfoPage(Page<TPaymentInfo> page, TPaymentInfo tPaymentInfo);
}
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.social.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.social.entity.TPreDispatchInfo;
/**
* 预派单记录
*
* @author huyc
* @date 2022-07-14 18:53:42
*/
public interface TPreDispatchInfoService extends IService<TPreDispatchInfo> {
/**
* 预派单记录简单分页查询
* @param tPreDispatchInfo 预派单记录
* @return
*/
IPage<TPreDispatchInfo> getTPreDispatchInfoPage(Page<TPreDispatchInfo> page, TPreDispatchInfo tPreDispatchInfo);
/**
* 修改资料是否提交状态 0 是 1 否
* @Author huyc
* @Date 2022-07-18
* @param ids
* @param status
* @return
**/
R<Boolean> modifyDataSubmitStatus(String ids, String status);
/**
* 清空预派单默认的派单合同信息
* @Author huyc
* @Date 2022-07-18
* @param ids
* @return
**/
R<Boolean> clearContractInfo(String ids);
/**
* 更新预派单是否派单状态
* @Author huyc
* @Date 2022-07-18
* @param id
* @param dispatchFlag
* @param cancelRemark
* @return
**/
R<Boolean> updateDispatchFlag(String id, String dispatchFlag, String cancelRemark);
/**
* 单个派单
* @Author huyc
* @Date 2022-07-18
* @param id
* @return
**/
R<Boolean> dispatchById(String id);
/**
* 修改预派单记录
* @Author huyc
* @Date 2022-07-18
* @return
**/
R update(TPreDispatchInfo tPreDispatchInfo);
}
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.social.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.yifu.social.entity.TPaymentInfo;
import com.yifu.cloud.plus.v1.yifu.social.mapper.TPaymentInfoMapper;
import com.yifu.cloud.plus.v1.yifu.social.service.TPaymentInfoService;
import org.springframework.stereotype.Service;
/**
* 缴费库
*
* @author huyc
* @date 2022-07-14 18:53:42
*/
@Service
public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPaymentInfo> implements TPaymentInfoService {
/**
* 缴费库简单分页查询
* @param tPaymentInfo 缴费库
* @return
*/
@Override
public IPage<TPaymentInfo> getTPaymentInfoPage(Page<TPaymentInfo> page, TPaymentInfo tPaymentInfo){
return baseMapper.getTPaymentInfoPage(page,tPaymentInfo);
}
}
......@@ -82,6 +82,10 @@
<result property="createTime" column="CREATE_TIME"/>
<result property="updateTime" column="UPDATE_TIME"/>
</resultMap>
<sql id="base_column_list">
SELECT
a.*
</sql>
<sql id="Base_Column_List">
a.ID,
a.PROVINCE,
......@@ -330,4 +334,13 @@
</where>
order by a.CREATE_TIME desc
</select>
<!--sysBaseSetInfo简单查询-->
<select id="getAllByEntity" resultMap="sysBaseSetInfoMap">
<include refid="base_column_list"/>
FROM sys_base_set_info a
<where>
1=1
<include refid="sysBaseSetInfo_where"/>
</where>
</select>
</mapper>
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