Commit 02fe0d79 by 陶湘宇

Merge branch 'develop' of develop-gitlab.youlingrc.com:8timerv2/8timerapiv200 into develop

* 'develop' of develop-gitlab.youlingrc.com:8timerv2/8timerapiv200:
  8小时后台-- 导入保单时,产品id对应返回 添加失败回滚事务
  8小时后台-- 导入保单时,产品id对应返回
  8小时后台-- 保单列表模糊查询、分页
  8小时后台-- 保单列表模糊查询、分页
  8小时后台-- 异常输出记录到日志
  8小时运营后台-- 投保人信息验证 企业列表信息验证 导入信息验证 导入人员信息验证 保单搜索列表更据企业名称查找
  修改空指针BUG
  8小时后台-- 更新配置文件路径
  8小时后台-- 更新配置文件路径
  8小时后台-- 更新配置文件路径
  8小时后台-- 更新的sql
  8小时后台-- 更新查询条件
  8小时后台-- 保单列表按操作时间倒序
  8小时运营后台-- 支付完成页面
  8小时后台-- 快速替换不显示bug
  8小时后台-- 支付完成跳转页面
  8小时后台-- 微信支付路径跳转bug
  8小时后台-- 新增一个保单列表
  8小时后台-- 正式环境的地址
  8小时后台-- 保单增员支付
parents ca8fc9f9 91d0e935
......@@ -197,3 +197,4 @@ ALTER TABLE `insure_product`
ALTER TABLE `insure_policy`
ADD COLUMN `policy_pay_type` int(11) NOT NULL DEFAULT 1 COMMENT '1在线支付 2预付款 3线下支付' AFTER `create_time`,
ADD COLUMN `pay_id` int(11) NULL DEFAULT NULL COMMENT 'insure_pay表的id' AFTER `policy_pay_type`;
This source diff could not be displayed because it is too large. You can view the blob instead.
package cn.timer.api.bean.insure;
import lombok.Data;
/**
* @Description TODO
* @Author wgd
* @Date 2022/5/30 11:01
*/
@Data
public class BatchPayCallBack {
private String order_import_uuid;
private String pay_status;
private String transaction_id;
private String pay_time;
private String pay_money;
private String method;
}
......@@ -73,6 +73,8 @@ public class InsurePay extends Model<InsurePay> {
private String serialNumber;
private String payUrl;
/**
* 设置:id
*/
......
......@@ -11,9 +11,9 @@ import lombok.NoArgsConstructor;
@AllArgsConstructor
@NoArgsConstructor
public class AttendanceAssistant implements Serializable{
private static final long serialVersionUID = -3561517817976805144L;
String name;// 考勤组名称 *
String remarks;// 备注 *
String[] attmachines;// 考勤机
......@@ -28,7 +28,7 @@ public class AttendanceAssistant implements Serializable{
String[] attWeekdaysShifts;// 周工作日班次【固定排班】
String[] attMustPunchData;// 必须打卡的日期【固定排班】
String[] attMustPunchShifid;// 必须打卡的班次id【固定排班】
// String[] attNonPunchData;// 不用打卡的日期【固定排班】
ResttryfixdayDto[] attNonPunchData;
......@@ -51,12 +51,12 @@ public class AttendanceAssistant implements Serializable{
String maxOvertimeTime;// 加班最大时长【自由工时】
String attgroupid;
int overtimeRulesId;//加班id
int fieldpersonnel;//外勤
int restdayclock;//休息日打卡
String PagetransferDate;//页面传输修改日期
String transferDate;//页面传输修改日期
}
......@@ -40,6 +40,8 @@ public class WebSecurityConfig implements WebMvcConfigurer {
.excludePathPatterns("/callBack/policy/payStatus")
.excludePathPatterns("/callBack/policy/payCallBack")
.excludePathPatterns("/callBack/policy/issueCallback")
.excludePathPatterns("/callBack/policy/addpPayCallBack")
.excludePathPatterns("/callBack/policy/batchPayCallback")
.excludePathPatterns("/superLogin/**")
.excludePathPatterns("/actuator/*")
.excludePathPatterns("/doc*")
......
......@@ -9,6 +9,7 @@ import cn.timer.api.bean.insure.InsureApplicant;
import cn.timer.api.bean.qyzx.QyzxEntInfoM;
import cn.timer.api.config.annotation.CurrentUser;
import cn.timer.api.config.annotation.UserBean;
import cn.timer.api.config.exception.CustomException;
import cn.timer.api.dao.insure.InsureApplicantMapper;
import cn.timer.api.dto.insure.InsureDto;
import cn.timer.api.utils.HttpUtils;
......@@ -45,36 +46,49 @@ import org.springframework.web.multipart.MultipartFile;
@Transactional
@RequestMapping(value = "/insureApplicant", produces = {"application/json"})
public class InsureApplicantController {
private static final Logger log = LoggerFactory.getLogger(InsureApplicantController.class);
@PostMapping("/insureApplicationSetting")
@ApiOperation(value = "设置投保人", httpMethod = "POST", notes = "投保申请")
private Result<Object> insureApplicationSetting(@RequestBody InsureApplicant params) {
InsureApplicant insureApplicant = InsureApplicant.builder().build().selectOne(new QueryWrapper<InsureApplicant>().lambda().eq(InsureApplicant::getOrgCode,params.getOrgCode()));
params.setId(insureApplicant.getId());
params.updateById();
return ResultUtil.data(params);
@Transactional(rollbackFor = Exception.class)
public Result<Object> insureApplicationSetting(@RequestBody InsureApplicant params) {
try {
InsureApplicant insureApplicant = InsureApplicant.builder().build().selectOne(new QueryWrapper<InsureApplicant>().lambda().eq(InsureApplicant::getOrgCode, params.getOrgCode()));
params.setId(insureApplicant.getId());
params.updateById();
return ResultUtil.data(params);
} catch (Exception e) {
log.error("设置投保人异常:",e);
throw new CustomException("设置投保人异常");
}
}
@GetMapping("/getApplicantAdmin")
@ApiOperation(value = "获取投保人--运营后台", httpMethod = "GET", notes = "获取投保人")
private Result<Object> getApplicant(@RequestParam("orgCode") Integer orgCode) {
InsureApplicant insureApplicant = InsureApplicant.builder().build().selectOne(new QueryWrapper<InsureApplicant>().lambda().eq(InsureApplicant::getOrgCode,orgCode));
if(insureApplicant==null){
QyzxEntInfoM qyzxEntInfoM=QyzxEntInfoM.builder().id(orgCode).build().selectById();
insureApplicant = getInsureApplicant(qyzxEntInfoM);
insureApplicant.setOrgCode(orgCode);
insureApplicant.insert();
@Transactional(rollbackFor = Exception.class)
public Result<Object> getApplicant(@RequestParam("orgCode") Integer orgCode) {
try {
InsureApplicant insureApplicant = InsureApplicant.builder().build().selectOne(new QueryWrapper<InsureApplicant>().lambda().eq(InsureApplicant::getOrgCode, orgCode));
if (insureApplicant == null) {
QyzxEntInfoM qyzxEntInfoM = QyzxEntInfoM.builder().id(orgCode).build().selectById();
insureApplicant = getInsureApplicant(qyzxEntInfoM);
insureApplicant.setOrgCode(orgCode);
insureApplicant.insert();
}
return ResultUtil.data(insureApplicant);
} catch (Exception e) {
log.error("获取投保人异常:",e);
throw new CustomException("获取投保人异常");
}
return ResultUtil.data(insureApplicant);
}
private InsureApplicant getInsureApplicant(QyzxEntInfoM qyzxEntInfoM) {
InsureApplicant insureApplicant;
insureApplicant=new InsureApplicant();
insureApplicant = new InsureApplicant();
insureApplicant.setApplicantEName(qyzxEntInfoM.getName());
insureApplicant.setApplicantEAddress(qyzxEntInfoM.getWorkAddress());
insureApplicant.setApplicantEContacts(qyzxEntInfoM.getOperName());/*这里为避免联系人为空,默认使用法人*/
insureApplicant.setApplicantEContacts(qyzxEntInfoM.getLinkMan());
insureApplicant.setApplicantEPhone(qyzxEntInfoM.getPhone());/*这里为避免联系人为空,默认使用法人*/
insureApplicant.setApplicantType("2");
insureApplicant.setApplicantENoType("3646");
......@@ -85,15 +99,21 @@ public class InsureApplicantController {
@GetMapping("/getApplicant")
@ApiOperation(value = "获取投保人--8小时", httpMethod = "GET", notes = "获取投保人")
private Result<Object> getApplicant(@CurrentUser UserBean userBean) {
InsureApplicant insureApplicant = InsureApplicant.builder().build().selectOne(new QueryWrapper<InsureApplicant>().lambda().eq(InsureApplicant::getOrgCode,userBean.getOrgCode()));
if(insureApplicant==null){
QyzxEntInfoM qyzxEntInfoM=QyzxEntInfoM.builder().id(userBean.getOrgCode()).build().selectById();
insureApplicant = getInsureApplicant(qyzxEntInfoM);
insureApplicant.setOrgCode(userBean.getOrgCode());
insureApplicant.insert();
@Transactional(rollbackFor = Exception.class)
public Result<Object> getApplicant(@CurrentUser UserBean userBean) {
try {
InsureApplicant insureApplicant = InsureApplicant.builder().build().selectOne(new QueryWrapper<InsureApplicant>().lambda().eq(InsureApplicant::getOrgCode, userBean.getOrgCode()));
if (insureApplicant == null) {
QyzxEntInfoM qyzxEntInfoM = QyzxEntInfoM.builder().id(userBean.getOrgCode()).build().selectById();
insureApplicant = getInsureApplicant(qyzxEntInfoM);
insureApplicant.setOrgCode(userBean.getOrgCode());
insureApplicant.insert();
}
return ResultUtil.data(insureApplicant);
} catch (Exception e) {
log.error("获取投保人异常:",e);
throw new CustomException("获取投保人异常");
}
return ResultUtil.data(insureApplicant);
}
}
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -114,6 +114,7 @@ public class InsureUserController{
policyDto.setCategoryId(categoryId);
List<PolicyDto> list = insureUserMapper.selectPolicyList(policyDto);
String[] rowName = new String[]{"ID", "name", "ID_type", "ID_number", "Scheme_name", "Date_start", "Branch", "Tricycle_frame_number", "benefit_occupation_category"};
/*XSSFWorkbook xssfWorkbook = ExcelUtils.exportExcel("导出人员清单.xlsx", rowName, list);*/
// for ()
// XSSFWorkbook xssfWorkbook = ExcelUtils.exportExcel("导出人员清单.xlsx", rowName, list);
}
}
......@@ -5,6 +5,7 @@ import cn.timer.api.bean.insure.InsureLog;
import cn.timer.api.bean.insure.InsurePolicy;
import cn.timer.api.bean.insure.InsureUser;
import cn.timer.api.bean.yggl.YgglMainEmp;
import cn.timer.api.config.exception.CustomException;
import cn.timer.api.dao.insure.InsurePolicyMapper;
import cn.timer.api.dao.insure.InsureUserMapper;
import cn.timer.api.dao.yggl.YgglMainEmpMapper;
......@@ -15,6 +16,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.transaction.annotation.Transactional;
import java.text.ParseException;
import java.util.Date;
......@@ -36,10 +38,13 @@ public class InsureTaskTiming {
private YgglMainEmpMapper ygglMainEmpMapper;
@Scheduled(cron = "0 0 0 1 * ?")//每月第一天
public void updateInsureStatusTask() throws ParseException {
Date now = DateUtil.date();
/*获取正常的保单*/
List<InsurePolicy> insurePolicyList = InsurePolicy.builder().build().selectList(new QueryWrapper<InsurePolicy>().lambda().eq(InsurePolicy::getStatus, "1").lt(InsurePolicy::getPolicyDateEnd,now));
@Transactional(rollbackFor = Exception.class)
public void updateInsureStatusTask(){
try {
Date now = DateUtil.date();
/*获取正常的保单*/
List<InsurePolicy> insurePolicyList = InsurePolicy.builder().build().selectList(new QueryWrapper<InsurePolicy>().lambda().eq(InsurePolicy::getStatus, "1").lt(InsurePolicy::getPolicyDateEnd, now));
if (insurePolicyList.size() > 0) {
/*获取已经过期保单*/
for (InsurePolicy insurePolicy : insurePolicyList) {
......@@ -48,14 +53,20 @@ public class InsureTaskTiming {
.eq(InsureUser::getInsureStatus, 1));
if (insureUsersList.size() > 0) {
int count = ygglMainEmpMapper.updateInsure(insureUsersList.stream().map(InsureUser::getUserId).toArray(Integer[]::new));
log.info("总共更新员工投保状态", count);
log.info("总共更新员工投保状态:"+count);
int uCount = insureUserMapper.updateInsure(insurePolicyList.stream().map(InsurePolicy::getId).toArray(Integer[]::new));
log.info("总共更新投保人投保状态", uCount);
log.info("总共更新投保人投保状态:"+uCount);
}
insurePolicy.setStatus("3");
insurePolicy.updateById();
InsureLog.builder().type(7)
.createTime(new Date()).requestType(1).returnMsg("保单已到期,自动失效").policyId(insurePolicy.getId()).build().insert();
}
}
log.error("暂无过期保单");
log.error("暂无过期保单");
}catch (Exception e){
e.printStackTrace();
throw new CustomException("保单失效定时器异常");
}
}
}
......@@ -657,10 +657,10 @@ public class QyzxController {
*/
@PostMapping(value = "/companyAdminList")
@ApiOperation(value = "运营后台---企业信息列表", httpMethod = "POST", notes = "")
public Result<Object> companyAdminList(@RequestBody cn.timer.api.utils.Page page) {
public Result<Object> companyAdminList(@RequestBody EntInfoDto entInfoDto) {
Map map = Maps.newHashMap();
List<EntInfoDto> list = Optional.ofNullable(qyzxEntInfoMMapper.companyAdminList(page)).orElse(Lists.newArrayList());
Integer count = qyzxEntInfoMMapper.companyAdminCount();
List<EntInfoDto> list = Optional.ofNullable(qyzxEntInfoMMapper.companyAdminList(entInfoDto)).orElse(Lists.newArrayList());
Integer count = qyzxEntInfoMMapper.companyAdminCount(entInfoDto);
map.put("list",list);
map.put("count",count);
return ResultUtil.data(map);
......
......@@ -210,7 +210,7 @@ public class ZpglServiceImpl implements ZpglService {
messageTemplate = ZpglMessageTemplate.OFFER_ENTRYING;
}
detail = ZpglMessageTemplate.print(messageTemplate, new String[]{
userBean.getQyzxEmpLogin().getUsername(), zpglFail.getFailCause(), zpglRcxxDto.getRemarks(), titleLabel});
userBean.getUserInfo().getName(), zpglFail.getFailCause(), StringUtils.isEmpty(zpglRcxxDto.getRemarks())?"":zpglRcxxDto.getRemarks(), titleLabel});
}
break;
case 10:
......
......@@ -25,9 +25,11 @@ public interface InsurePolicyMapper extends BaseMapper<InsurePolicy> {
PolicyDto getPolicyDetail(@Param("id")Integer id);
Integer totalPolicy(@Param("policy")PolicyDto policyDto);
List<PolicyDto> policyTotalList();
List<InsureUserDto> selectPlansListByorgCode(@Param("orgCode")Integer id);
List<InsureUserDto> selectPolicyListByorgCode(@Param("orgCode")Integer id,@Param("policy")PolicyDto policyDto);
Integer selectPolicyTotalByorgCode(@Param("orgCode")Integer id,@Param("policy")PolicyDto policyDto);
List<InsurePolicy> selectPolicyListByStatus(@Param("date") Date date);
Integer selectPlansTotalByorgCode(@Param("orgCode")Integer id);
}
......@@ -18,9 +18,9 @@ import java.util.Map;
*/
@Repository
public interface QyzxEntInfoMMapper extends BaseMapper<QyzxEntInfoM> {
public List<EntInfoDto> companyAdminList(@Param("page")Page page);
public List<EntInfoDto> companyAdminList(@Param("param")EntInfoDto entInfoDto);
public Integer companyAdminCount();
public Integer companyAdminCount(@Param("param")EntInfoDto entInfoDto);
public List<Map<String,String>> getCompanyList();
......
......@@ -2,6 +2,8 @@ package cn.timer.api.dto.insure;
import lombok.Data;
import java.util.Date;
/**
* @Description TODO
* @Author wgd
......@@ -9,10 +11,13 @@ import lombok.Data;
*/
@Data
public class InsureUserDto {
private Integer id;
private Integer policyId;
private String benefitBasicPlan;
private String benefitOccupationCategory;
private Integer totalUser;
private String[] oldIds;
private String policyNo;
private String name;
private Date updateTime;
}
......@@ -45,4 +45,6 @@ public class PolicyDto {
private Integer policyId;
private Integer applyType;
private String monthD;
private String userName;
private String companyName;
}
package cn.timer.api.dto.qyzx;
import cn.timer.api.utils.Page;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModelProperty;
......@@ -26,4 +27,5 @@ public class EntInfoDto {
private String endTime;
private Integer totlaSpmk;
private Integer totlaCc;
private Page page;
}
......@@ -504,7 +504,7 @@ public class ExcelUtils {
} else if (xssfCell.getCellTypeEnum() == CellType.BOOLEAN) {
return String.valueOf(xssfCell.getBooleanCellValue());
} else {
return xssfCell.getStringCellValue();
return xssfCell.getStringCellValue().trim();
}
}
}
......
......@@ -8,11 +8,15 @@ import java.util.*;
import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream;
import cn.timer.api.config.sftp.SftpConfiguration;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import com.jcraft.jsch.ChannelSftp;
import io.swagger.models.auth.In;
import org.apache.commons.io.FileUtils;
import org.apache.commons.io.IOUtils;
import org.bouncycastle.jce.exception.ExtIOException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import org.springframework.web.multipart.MultipartFile;
......@@ -77,6 +81,11 @@ public class OSSUtil {
@Value("${zip.path}")
private String zipPath;
@Autowired
private SftpConfiguration config;
/**
* 1.创建储存空间 sout控制台輸出 储存空间名
*
......@@ -594,10 +603,10 @@ public class OSSUtil {
String Suffix;
try {
File folder = new File(zipPath);
if(!folder.exists()&& !folder .isDirectory()){
if (!folder.exists() && !folder.isDirectory()) {
folder.mkdirs();
}
fos = new FileOutputStream(zipPath+fileName);
fos = new FileOutputStream(zipPath + fileName);
zos = new ZipOutputStream(fos);
OSS ossClient = new OSSClientBuilder().build(endpoint, accessKeyId, accessKeySecret);
for (String m : urlMap.keySet()) {
......@@ -641,4 +650,68 @@ public class OSSUtil {
}
return fileName;
}
/**
* @Author wgd
* @Description 获取OSS文件字符流
* @Date 2021/12/2 18:06
**/
private Map getOssFileList(Map<String, String> urlMap) throws IOException {
Map<String, InputStream> map = Maps.newHashMap();
BufferedInputStream inputStream;
OSSObject ossObject;
OSS ossClient = new OSSClientBuilder().build(endpoint, accessKeyId, accessKeySecret);
for (String m : urlMap.keySet()) {
ossObject = ossClient.getObject(bucketName, urlMap.get(m));
inputStream = new BufferedInputStream(ossObject.getObjectContent());
String suffix = urlMap.get(m).substring(urlMap.get(m).lastIndexOf("."));
map.put(m + urlMap.get(m), inputStream);
}
ossClient.shutdown();
return map;
}
private Map getFtpFileList(Map<String, String> urlMap) throws IOException {
Map<String, InputStream> map = Maps.newHashMap();
InputStream inputStream;
for (String m : urlMap.keySet()) {
File file = new File(urlMap.get(m));
inputStream = new FileInputStream(file);
map.put(m, inputStream);
}
return map;
}
public String newZip(Map<String, String> ossMap, Map<String, String> ftpMap) throws IOException {
Map<String, InputStream> ossNewMap = getOssFileList(ossMap);
Map<String, InputStream> ftpNewMap = getFtpFileList(ftpMap);
ossNewMap.putAll(ftpNewMap);
DateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmmss");
String fileName = dateFormat.format(new Date()) + ".zip";
FileOutputStream fos = null;
ZipOutputStream zos = null;
InputStream inputStream = null;
for (String m : ossNewMap.keySet()) {
ZipEntry entry = new ZipEntry(m);
try {
zos.putNextEntry(entry);
int nNumber;
byte[] buffer = new byte[4096];
while ((nNumber = ossNewMap.get(m).read(buffer)) > 0) {
zos.write(buffer, 0, nNumber);
}
} catch (IOException e) {
throw new IOException("写入失败");//TODO 应作为自定义异常
} finally {
try {
inputStream.close();
} catch (IOException e) {
throw new IOException("关闭失败");//TODO 应作为自定义异常
}
}
}
return fileName;
}
}
......@@ -107,4 +107,4 @@ public class RemindUtil implements SchedulingConfigurer {
return new Exception().getStackTrace()[0].getMethodName();
}
}
\ No newline at end of file
}
......@@ -282,25 +282,39 @@ youling:
h5:
url: 'http://javays.com'
insure:
#投保
#投保 appid
appid: '1002303100602312445'
#投保 secret
secret: 'acb329868c31d5b3ba03de40dac13dd9'
#投保上传文件
uploadUrl: 'http://sandbox.portal.unistar-ins.com/service/Home/Index/fileUpload'
#投保立即出单
insuredUrl: 'http://sandbox.portal.unistar-ins.com/mall/Home/Index/createQuotePolicy'
#投保请求出单
getPolicyUrl: 'http://sandbox.portal.unistar-ins.com/issuing/Home/Index/index'
#查询保单信息
policyDetail: 'http://sandbox.portal.unistar-ins.com/issuing/Home/Index/policy'
#申请保单
createQuote: 'http://sandbox.portal.unistar-ins.com/mall/Home/Index/createQuote'
#投保支付
toPayUrl: 'http://sandbox.portal.unistar-ins.com/mall/Home/Pay/toPay'
#保全支付
batchToPayUrl: 'http://sandbox.portal.unistar-ins.com/fuli/Home/ImportPay/set_import_pay'
#保全
#保全appid
appidq: '1000115041006006938'
#保全 secret
secretq: '6ba1bf4aa0bd14368c95ff0b9934a17b'
#保全上传文件
uploadUrlq: 'http://sandbox.portal.unistar-ins.com/fuli/Home/Index/file_upload'
#保全申请
batchUrl: 'http://sandbox.portal.unistar-ins.com/fuli/Home/WelfareProduct/batch_declare'
#保全取消支付
cancelPayment: 'http://sandbox.portal.unistar-ins.com/fuli/Home/OrderImport/order_import_set'
# base_api_url
BASE_API_URL: 'http://o49t563035.qicp.vip'
#支付回调
pay_page: 'http://localhost:9527'
......@@ -261,21 +261,42 @@ wxgzh:
encodingAesKey: 'chAbt69dLAtk8HH0oGMuZwHzK2SuhnxZI5Jbzc4nNzX'
insure:
#投保
#投保 appid
appid: '1002209110212305335'
#投保 secret
secret: '1ef7b79471be7f6b5489832c65109f81'
#投保上传文件
uploadUrl: 'https://portal.unistar-ins.com/service/Home/Index/fileUpload'
#投保立即出单
insuredUrl: 'https://portal.unistar-ins.com/mall/Home/Index/createQuotePolicy'
#投保请求出单
getPolicyUrl: 'https://portal.unistar-ins.com/issuing/Home/Index/index'
#申请保单
createQuote: 'https://portal.unistar-ins.com/mall/Home/Index/createQuote'
#投保支付
toPayUrl: 'https://portal.unistar-ins.com/mall/Home/Pay/toPay'
#保全支付
batchToPayUrl: 'https://portal.unistar-ins.com/fuli/Home/ImportPay/set_import_pay'
#查询保单信息
policyDetail: 'https://portal.unistar-ins.com/issuing/Home/Index/policy'
#保全
#保全appid
appidq: '1000711000604326196'
#保全 secret
secretq: 'a2da17a2797c63dff9172df50af9da65'
#保全上传文件
uploadUrlq: 'https://portal.unistar-ins.com/fuli/Home/Index/file_upload'
#保全申请
batchUrl: 'https://portal.unistar-ins.com/fuli/Home/WelfareProduct/batch_declare'
#保全取消支付
cancelPayment: 'https://portal.unistar-ins.com/fuli/Home/OrderImport/order_import_set'
youling:
serverUrl: 'https://www.youlingrc.com'
#h5服务地址
h5:
url: 'http://h5.8timer.cn'
\ No newline at end of file
url: 'http://h5.8timer.cn'
#支付回调
pay_page: 'http://oss.8timer.cn'
......@@ -254,32 +254,43 @@ wxgzh:
encodingAesKey: 'chAbt69dLAtk8HH0oGMuZwHzK2SuhnxZI5Jbzc4nNzX'
insure:
#投保
#投保 appid
appid: '1002303100602312445'
#投保 secret
secret: 'acb329868c31d5b3ba03de40dac13dd9'
#投保上传文件
uploadUrl: 'http://sandbox.portal.unistar-ins.com/service/Home/Index/fileUpload'
#投保立即出单
insuredUrl: 'http://sandbox.portal.unistar-ins.com/mall/Home/Index/createQuotePolicy'
#投保请求出单
getPolicyUrl: 'http://sandbox.portal.unistar-ins.com/issuing/Home/Index/index'
#查询保单信息
policyDetail: 'http://sandbox.portal.unistar-ins.com/issuing/Home/Index/policy'
#申请保单
createQuote: 'http://sandbox.portal.unistar-ins.com/mall/Home/Index/createQuote'
#投保支付
toPayUrl: 'http://sandbox.portal.unistar-ins.com/mall/Home/Pay/toPay'
#保全支付
batchToPayUrl: 'http://sandbox.portal.unistar-ins.com/fuli/Home/ImportPay/set_import_pay'
#保全
#保全appid
appidq: '1000115041006006938'
#保全 secret
secretq: '6ba1bf4aa0bd14368c95ff0b9934a17b'
#保全上传文件
uploadUrlq: 'http://sandbox.portal.unistar-ins.com/fuli/Home/Index/file_upload'
#保全申请
batchUrl: 'http://sandbox.portal.unistar-ins.com/fuli/Home/WelfareProduct/batch_declare'
#保全取消支付
cancelPayment: 'http://sandbox.portal.unistar-ins.com/fuli/Home/OrderImport/order_import_set'
youling:
serverUrl: 'http://227387db45.51vip.biz'
#h5服务地址
h5:
url: 'http://javays.com'
#支付回调
pay_page: 'http://test-insurance-api.youlingrc.com'
spring:
profiles:
active: test
#active: '@environment@'
\ No newline at end of file
active: dev
#active: '@environment@'
......@@ -14,6 +14,7 @@
<result property="payType" column="pay_type"/>
<result property="policyId" column="policy_id"/>
<result property="serialNumber" column="serial_number"/>
<result property="payUrl" column="pay_url"/>
</resultMap>
......
......@@ -268,6 +268,12 @@
<if test="policy.policyDateStart!=null and policy.policyDateStart!=''">
and ip.policy_date_start <![CDATA[ >= ]]> #{policy.policyDateStart}
</if>
<if test="policy.companyName!=null and policy.companyName!=''">
and qy.name like CONCAT('%',#{policy.companyName},'%')
</if>
<if test="policy.policyNo!=null and policy.policyNo!=''">
and ip.policy_no like CONCAT('%',#{policy.policyNo},'%')
</if>
</where>
GROUP BY ip.id
order by ip.create_time desc
......@@ -319,17 +325,17 @@
<select id="policyTotalList" resultType="cn.timer.api.dto.insure.PolicyDto">
SELECT
ip.id as id,
ip.name AS schemeName,
ip.id AS id,
ip.NAME AS schemeName,
ip.type AS type,
count(ipp.id) AS totaPolicy,
count(ipp.org_code) AS totalCompany,
(select count(id) from insure_policy WHERE product_id=ip.id ) AS totaPolicy,
(select count(org_code) from insure_policy WHERE product_id=ip.id) as totalCompany,
count( iu.id ) AS totalUser,
sum(iu.price) as totalPremium,
sum( iu.price ) AS totalPremium,
ipp.update_time AS updateTime
FROM
insure_product ip
LEFT JOIN insure_policy ipp ON ipp.product_id = ip.id
LEFT JOIN insure_policy ipp ON ipp.product_id = ip.id and ipp.`status`=1
LEFT JOIN insure_user iu ON iu.policy_id = ipp.id
WHERE
ip.is_del = 0
......@@ -337,22 +343,38 @@
ip.id
</select>
<select id="selectPlansListByorgCode" resultType="cn.timer.api.dto.insure.InsureUserDto">
<select id="selectPolicyListByorgCode" resultType="cn.timer.api.dto.insure.InsureUserDto">
SELECT
ip.id as policyId,
ip.id as id,
ip.policy_no as policyNo,
iu.benefit_basic_plan as benefitBasicPlan,
iu.benefit_occupation_category as benefitOccupationCategory,
count(iu.id) as totalUser
ir.name,
ip.update_time as updateTime
FROM
insure_policy ip
LEFT JOIN insure_user iu ON iu.policy_id = ip.id
LEFT JOIN insure_product ir on ir.id=ip.product_id
WHERE ip.org_code=#{orgCode}
GROUP BY
ip.id,
iu.benefit_basic_plan,
iu.benefit_occupation_category
<if test="policy.policyNo !=null and policy.policyNo!=''">
and ip.policy_no = #{policy.policyNo}
</if>
order by ip.update_time desc
<if test="policy.page.offset != null and policy.page.totalPage != null">
limit #{policy.page.offset}, #{policy.page.totalPage}
</if>
</select>
<select id="selectPolicyTotalByorgCode" resultType="java.lang.Integer">
SELECT
count(ip.id)
FROM
insure_policy ip
LEFT JOIN insure_product ir on ir.id=ip.product_id
WHERE ip.org_code=#{orgCode}
<if test="policy.policyNo !=null and policy.policyNo!=''">
and ip.policy_no = #{policy.policyNo}
</if>
</select>
<select id="selectPlansTotalByorgCode" resultType="java.lang.Integer">
SELECT
count(ip.id)
......
......@@ -280,7 +280,7 @@
<select id="selectPolicyList" resultType="cn.timer.api.dto.insure.PolicyDto">
select
iu.id,yme.`name`,yme.zj_type,yme.zj_num,iu.policy_no,iu.`status`,io.name as schemeName,iu.policy_date_start,iu.insure_status,
iu.id,yme.`name`,yme.zj_type,yme.zj_num,ip.policy_no,iu.`status`,io.name as schemeName,iu.policy_date_start,iu.insure_status,
iu.policy_date_end,iu.create_time,iu.insured_name,iu.benefit_basic_plan AS benefitBasicPlan,iu.price AS price,
iu.user_id as userId,iu.batch_no as batchNo,iu.benefit_occupation_category as benefitOccupationCategory,
iu.policy_id as policyId,
......@@ -329,6 +329,12 @@
<if test="policyDto.policyDateStart !=null and policyDto.policyDateStart !='' and policyDto.policyDateEnd !=null and policyDto.policyDateEnd !=''">
and iu.create_time BETWEEN #{policyDto.policyDateStart} and #{policyDto.policyDateEnd}
</if>
<if test="policyDto.userName !=null and policyDto.userName !='' ">
and yme.`name` like CONCAT('%',#{policyDto.userName},'%')
</if>
<if test="policyDto.zjNum !=null and policyDto.zjNum !='' ">
and yme.zj_num like CONCAT('%',#{policyDto.zjNum},'%')
</if>
</where>
order by iu.create_time desc
......
......@@ -217,15 +217,37 @@
LEFT JOIN yggl_main_emp yme ON yme.org_code = qeim.id
LEFT JOIN ( SELECT sas.org_code AS oid, count( sas.id ) AS totlaSpmk FROM spmk_approve_summary sas GROUP BY sas.org_code ) AS a ON a.oid = qeim.id
LEFT JOIN ( SELECT cc.organization_id AS oid, count( cc.id ) AS totlaCc FROM cms_content cc GROUP BY cc.organization_id ) AS b ON b.oid = qeim.id
<where>
<if test="param.name != null and param.name !=''">
and qeim.NAME like CONCAT('%',#{param.name},'%')
</if>
<if test="param.linkMan != null and param.linkMan !=''">
and qeim.link_man like CONCAT('%',#{param.linkMan},'%')
</if>
<if test="param.linkManPhone != null and param.linkManPhone !=''">
and qeim.phone like CONCAT('%',#{param.linkManPhone},'%')
</if>
</where>
GROUP BY
qeim.id
<if test="page.offset != null and page.totalPage !=null">
limit #{page.offset},#{page.totalPage}
<if test="param.page.currentPage != null and param.page.totalPage !=null">
limit #{param.page.offset},#{param.page.totalPage}
</if>
</select>
<select id="companyAdminCount" resultType="java.lang.Integer">
select count(qeim.id) from qyzx_ent_info_m qeim
<where>
<if test="param.name != null and param.name !=''">
and qeim.NAME like CONCAT('%',#{param.name},'%')
</if>
<if test="param.linkMan != null and param.linkMan !=''">
and qeim.link_man like CONCAT('%',#{param.linkMan},'%')
</if>
<if test="param.linkManPhone != null and param.linkManPhone !=''">
and qeim.phone like CONCAT('%',#{param.linkManPhone},'%')
</if>
</where>
</select>
<select id ="getCompanyList" resultType="java.util.HashMap">
......
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