录入网上支付开通渠道的问题,业务类型搜索简化
This commit is contained in:
parent
2f0a10d5e7
commit
67069b58a9
@ -1,7 +1,6 @@
|
||||
const local: App.I18n.Schema = {
|
||||
mps: {
|
||||
common: '模板',
|
||||
|
||||
zytgr: '智E通个人',
|
||||
zytqy: '智E通企业',
|
||||
zyf: '智e付',
|
||||
@ -446,6 +445,7 @@ const local: App.I18n.Schema = {
|
||||
},
|
||||
status: {
|
||||
required: '请选择状态',
|
||||
invalid: '状态不能为空'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -51,7 +51,7 @@ declare namespace Api {
|
||||
/** 综合收单商户号 */
|
||||
acquiringId: CommonType.IdType;
|
||||
/** 网上支付开通渠道 */
|
||||
internetChannel: string;
|
||||
internetChannel: string[];
|
||||
/** 交警处罚决定书 */
|
||||
trafficId: CommonType.IdType;
|
||||
trafficList: { trafficNo: string; trafficAmt: number }[];
|
||||
|
15
cds-fontend-2025.V1/src/typings/app.d.ts
vendored
15
cds-fontend-2025.V1/src/typings/app.d.ts
vendored
@ -485,6 +485,21 @@ declare namespace App {
|
||||
remark: FormMsg;
|
||||
};
|
||||
};
|
||||
business: {
|
||||
category: {
|
||||
title: string;
|
||||
categoryName: string;
|
||||
parentCategoryName: string;
|
||||
status: string;
|
||||
add: string;
|
||||
refresh: string;
|
||||
form: {
|
||||
categoryName: FormMsg;
|
||||
parentCategoryName: FormMsg;
|
||||
status: FormMsg;
|
||||
};
|
||||
};
|
||||
};
|
||||
login: {
|
||||
common: {
|
||||
loginOrRegister: string;
|
||||
|
@ -57,6 +57,7 @@ const {
|
||||
pageSize: 10,
|
||||
categoryId: null,
|
||||
name: null,
|
||||
status: null,
|
||||
pricingRule: null,
|
||||
params: {}
|
||||
},
|
||||
@ -107,7 +108,7 @@ const {
|
||||
},
|
||||
{
|
||||
key: 'status',
|
||||
title: $t('page.system.user.status'),
|
||||
title: $t('page.business.category.status'),
|
||||
align: 'center',
|
||||
minWidth: 80,
|
||||
resizable: true,
|
||||
|
@ -2,6 +2,7 @@
|
||||
import { ref } from 'vue';
|
||||
import { useNaiveForm } from '@/hooks/common/form';
|
||||
import { $t } from '@/locales';
|
||||
import {useDict} from "@/hooks/business/dict";
|
||||
|
||||
defineOptions({
|
||||
name: 'SubcategorySearch'
|
||||
@ -15,12 +16,14 @@ interface Emits {
|
||||
const emit = defineEmits<Emits>();
|
||||
|
||||
const { formRef, validate, restoreValidation } = useNaiveForm();
|
||||
|
||||
const {options: statusOptions} = useDict('sys_normal_disable');
|
||||
|
||||
const model = defineModel<Api.Business.SubcategorySearchParams>('model', { required: true });
|
||||
|
||||
|
||||
async function reset() {
|
||||
debugger;
|
||||
// Object.assign(model.value.params!, {});
|
||||
Object.assign(model.value.params!, {});
|
||||
await restoreValidation();
|
||||
emit('reset');
|
||||
@ -38,19 +41,22 @@ async function search() {
|
||||
<NCollapseItem :title="$t('common.search')" name="user-search">
|
||||
<NForm ref="formRef" :model="model" label-placement="left" :label-width="100">
|
||||
<NGrid responsive="screen" item-responsive>
|
||||
<NFormItemGi v-if="false" span="24 s:12 m:6" label="所属大类ID" path="categoryId" class="pr-24px">
|
||||
<NInput v-model:value="model.categoryId" placeholder="请输入所属大类ID" />
|
||||
<!-- <NFormItemGi v-if="false" span="24 s:12 m:6" label="所属大类ID" path="categoryId" class="pr-24px">-->
|
||||
<!-- <NInput v-model:value="model.categoryId" placeholder="请输入所属大类ID" />-->
|
||||
<!-- </NFormItemGi>-->
|
||||
<!-- <NFormItemGi span="24 s:12 m:8" label="业务子类ID" path="typeId" class="pr-24px">-->
|
||||
<!-- <NInput v-model:value="model.typeId" placeholder="请输入业务类型ID" />-->
|
||||
<!-- </NFormItemGi>-->
|
||||
<!-- <NFormItemGi span="24 s:12 m:8" label="业务子类名称" path="name" class="pr-24px">-->
|
||||
<!-- <NInput v-model:value="model.name" placeholder="请输入业务子类名称" />-->
|
||||
<!-- </NFormItemGi>-->
|
||||
<NFormItemGi span="24 s:12 m:8" label="状态" path="pricingRule" class="pr-24px">
|
||||
<NSelect v-model:value="model.status" :options="statusOptions" placeholder="请选择状态" />
|
||||
</NFormItemGi>
|
||||
<NFormItemGi span="24 s:12 m:8" label="业务子类ID" path="typeId" class="pr-24px">
|
||||
<NInput v-model:value="model.typeId" placeholder="请输入业务类型ID" />
|
||||
</NFormItemGi>
|
||||
<NFormItemGi span="24 s:12 m:8" label="业务子类名称" path="name" class="pr-24px">
|
||||
<NInput v-model:value="model.name" placeholder="请输入业务子类名称" />
|
||||
</NFormItemGi>
|
||||
<NFormItemGi span="24 s:12 m:8" label="计价规则说明" path="pricingRule" class="pr-24px">
|
||||
<NInput v-model:value="model.pricingRule" placeholder="请输入计价规则说明" />
|
||||
</NFormItemGi>
|
||||
<NFormItemGi span="24" class="pr-24px">
|
||||
<!-- <NFormItemGi span="24 s:12 m:8" label="计价规则说明" path="pricingRule" class="pr-24px">-->
|
||||
<!-- <NInput v-model:value="model.pricingRule" placeholder="请输入计价规则说明" />-->
|
||||
<!-- </NFormItemGi>-->
|
||||
<NFormItemGi span="24 s:12 m:8" class="pr-24px">
|
||||
<NSpace class="w-full" justify="end">
|
||||
<NButton @click="reset">
|
||||
<template #icon>
|
||||
|
@ -401,9 +401,9 @@ const {
|
||||
};
|
||||
|
||||
// 只有当checkType为'9'时才显示编辑按钮
|
||||
if (row.checkFlag !== '9') {
|
||||
return null;
|
||||
}
|
||||
// if (row.checkFlag !== '9') {
|
||||
// return null;
|
||||
// }
|
||||
return (
|
||||
<div class="flex-center gap-8px">
|
||||
{editBtn()}
|
||||
|
@ -73,7 +73,7 @@ function createDefaultModel(): Model {
|
||||
magneticCardList: [],
|
||||
acquiringName: '',
|
||||
acquiringId: '',
|
||||
internetChannel: '',
|
||||
internetChannel: [],
|
||||
trafficId: null,
|
||||
trafficList: [],
|
||||
workplace: '',
|
||||
@ -87,7 +87,7 @@ function createDefaultModel(): Model {
|
||||
};
|
||||
}
|
||||
|
||||
type RuleKey = Extract<keyof Model, 'subcategoryId' | 'jbName' | 'jbId' | 'subcategoryName' | 'date' | 'custPhoneNo' | 'custId' | 'custAcctNo' | 'custType'>;// 添加手机号验证规则
|
||||
type RuleKey = Extract<keyof Model, 'subcategoryId' | 'jbName' | 'jbId' | 'subcategoryName' | 'date' | 'custPhoneNo' | 'custId' | 'custAcctNo' | 'custType'| 'acquiringId' | 'heatingNo' >;// 添加手机号验证规则
|
||||
const phonePatternRule = {
|
||||
pattern: /^1[3-9]\d{9}$/,
|
||||
message: '请输入正确的手机号',
|
||||
@ -108,6 +108,13 @@ const accountPatternRule = {
|
||||
trigger: 'change'
|
||||
};
|
||||
|
||||
// 添加综合收单商户号验证规则
|
||||
const acquiringIdPatternRule = {
|
||||
pattern: /^[a-zA-Z0-9]+$/,
|
||||
message: '综合收单商户号只能包含数字',
|
||||
trigger: 'change'
|
||||
};
|
||||
|
||||
const custTypeRule = computed(() => {
|
||||
// 当业务类型不是"公积金缴纳账户"时,客户类型为必填
|
||||
if (model.subcategoryName !== '公积金缴纳账户') {
|
||||
@ -125,7 +132,8 @@ const rules: Record<RuleKey, App.Global.FormRule | App.Global.FormRule[]> = {
|
||||
custPhoneNo: phonePatternRule,
|
||||
custId: idCardPatternRule,
|
||||
custAcctNo: accountPatternRule,
|
||||
custType: custTypeRule.value
|
||||
custType: custTypeRule.value,
|
||||
acquiringId: acquiringIdPatternRule
|
||||
};
|
||||
|
||||
const showMarketingFields = ref(false);
|
||||
@ -147,6 +155,14 @@ function handleUpdateModelWhenEdit() {
|
||||
trafficAmt: item.trafficAmt !== undefined ? Number(item.trafficAmt) : 0
|
||||
}));
|
||||
}
|
||||
// 处理 rowData,确保 internetChannel 是字符串数组
|
||||
if (typeof props.rowData.internetChannel === 'string') {
|
||||
// 如果是逗号分隔的字符串,转换为数组
|
||||
props.rowData.internetChannel = props.rowData.internetChannel
|
||||
.split(',')
|
||||
.map(item => item.trim())
|
||||
.filter(item => item.length > 0);
|
||||
}
|
||||
Object.assign(model, createDefaultModel(), props.rowData);
|
||||
// 根据是否有营销人员信息决定是否勾选复选框
|
||||
if (model.yxName || model.yxId) {
|
||||
@ -154,35 +170,6 @@ function handleUpdateModelWhenEdit() {
|
||||
} else {
|
||||
showMarketingFields.value = false;
|
||||
}
|
||||
// 特别处理trafficList中的trafficAmt字段,确保是数字类型,并保持响应性
|
||||
// if (props.rowData.trafficList && Array.isArray(props.rowData.trafficList)) {
|
||||
// const processedTrafficList = props.rowData.trafficList.map(item => ({
|
||||
// ...item,
|
||||
// trafficAmt: item.trafficAmt !== undefined ? Number(item.trafficAmt) : 0
|
||||
// }));
|
||||
// // 使用splice方法保持数组的响应性
|
||||
// model.trafficList.splice(0, model.trafficList.length, ...processedTrafficList);
|
||||
// }
|
||||
//
|
||||
// // 特别处理magneticCardList数组,保持响应性
|
||||
// if (props.rowData.magneticCardList && Array.isArray(props.rowData.magneticCardList)) {
|
||||
// // 使用splice方法保持数组的响应性
|
||||
// model.magneticCardList.splice(0, model.magneticCardList.length, ...props.rowData.magneticCardList);
|
||||
// }
|
||||
|
||||
// 特别处理数组字段,确保它们被正确复制
|
||||
// if (props.rowData.magneticCardList) {
|
||||
// model.magneticCardList = JSON.parse(JSON.stringify(props.rowData.magneticCardList));
|
||||
// }
|
||||
//
|
||||
// if (props.rowData.trafficList) {
|
||||
// model.trafficList = JSON.parse(JSON.stringify(props.rowData.trafficList));
|
||||
// // 确保trafficAmt是数字类型
|
||||
// model.trafficList = model.trafficList.map(item => ({
|
||||
// ...item,
|
||||
// trafficAmt: item.trafficAmt !== undefined ? Number(item.trafficAmt) : 0
|
||||
// }));
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -98,6 +98,7 @@ public class BusinessSubcategoryServiceImpl implements IBusinessSubcategoryServi
|
||||
lqw.orderByAsc(BusinessSubcategory::getId);
|
||||
lqw.eq(bo.getCategoryId() != null, BusinessSubcategory::getCategoryId, bo.getCategoryId());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getTypeId()), BusinessSubcategory::getTypeId, bo.getTypeId());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getStatus()), BusinessSubcategory::getStatus, bo.getStatus());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getName()), BusinessSubcategory::getName, bo.getName());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getPricingRule()), BusinessSubcategory::getPricingRule, bo.getPricingRule());
|
||||
return lqw;
|
||||
|
@ -1,9 +1,16 @@
|
||||
package org.dromara.mps.domain;
|
||||
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import io.github.linpeilie.annotations.AutoMapping;
|
||||
import org.dromara.common.tenant.core.TenantEntity;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.dromara.mps.domain.vo.MpsMarketVo;
|
||||
import org.dromara.mps.service.convert.StringToList;
|
||||
import org.mapstruct.Mapping;
|
||||
import org.redisson.client.protocol.convertor.StringToListConvertor;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import java.io.Serial;
|
||||
@ -18,6 +25,7 @@ import java.util.List;
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("mps_market")
|
||||
@AutoMapper(target = MpsMarketVo.class, reverseConvertGenerate = false)
|
||||
public class MpsMarket extends TenantEntity {
|
||||
|
||||
@Serial
|
||||
|
@ -1,6 +1,7 @@
|
||||
package org.dromara.mps.domain.bo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.github.linpeilie.annotations.AutoMapping;
|
||||
import org.dromara.mps.domain.MpsMarket;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
@ -9,6 +10,8 @@ import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import jakarta.validation.constraints.*;
|
||||
import org.dromara.mps.service.convert.StringToList;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@ -127,7 +130,8 @@ public class MpsMarketBo extends BaseEntity {
|
||||
/**
|
||||
* 网上支付开通渠道
|
||||
*/
|
||||
private String internetChannel;
|
||||
@AutoMapping(target = "internetChannel", expression = "java(java.lang.String.join(\",\", source.getInternetChannel()))")
|
||||
private List<String> internetChannel;
|
||||
|
||||
/**
|
||||
* 交警处罚决定书
|
||||
|
@ -6,17 +6,14 @@ import cn.idev.excel.annotation.ExcelIgnore;
|
||||
import cn.idev.excel.annotation.format.DateTimeFormat;
|
||||
import cn.idev.excel.annotation.format.NumberFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.dromara.mps.domain.MpsMarket;
|
||||
import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import cn.idev.excel.annotation.ExcelProperty;
|
||||
import org.dromara.common.excel.annotation.ExcelDictFormat;
|
||||
import org.dromara.common.excel.convert.ExcelDictConvert;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@ -28,7 +25,6 @@ import java.util.List;
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = MpsMarket.class)
|
||||
public class MpsMarketVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
|
@ -0,0 +1,18 @@
|
||||
package org.dromara.mps.service.convert;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Component
|
||||
public class StringToList {
|
||||
public String stringToList(String s) {
|
||||
if (StringUtils.isEmpty(s)) {
|
||||
return "[]";
|
||||
}
|
||||
// String[] list = StringUtils.split(s, ",");
|
||||
return "["+s+"]";
|
||||
}
|
||||
}
|
@ -7,7 +7,6 @@ import com.baomidou.mybatisplus.core.incrementer.IdentifierGenerator;
|
||||
import org.dromara.common.core.utils.MapstructUtils;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
import org.dromara.common.core.exception.ServiceException;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
@ -17,8 +16,6 @@ import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.dromara.mps.domain.MpsMagneticcard;
|
||||
import org.dromara.mps.domain.MpsTraffic;
|
||||
import org.dromara.mps.domain.bo.MpsMagneticcardBo;
|
||||
import org.dromara.mps.domain.bo.MpsTrafficBo;
|
||||
import org.dromara.mps.domain.vo.MpsMagneticcardVo;
|
||||
import org.dromara.mps.domain.vo.MpsTrafficVo;
|
||||
import org.dromara.mps.mapper.MpsMagneticcardMapper;
|
||||
@ -28,10 +25,10 @@ import org.dromara.mps.domain.bo.MpsMarketBo;
|
||||
import org.dromara.mps.domain.vo.MpsMarketVo;
|
||||
import org.dromara.mps.domain.MpsMarket;
|
||||
import org.dromara.mps.mapper.MpsMarketMapper;
|
||||
|
||||
import org.dromara.mps.service.IMpsMarketService;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
@ -50,6 +47,7 @@ public class MpsMarketServiceImpl implements IMpsMarketService {
|
||||
private final MpsMagneticcardMapper magneticcardMapper;
|
||||
private final MpsTrafficMapper TrafficMapper;
|
||||
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void batchInsertOrUpdate(Collection<MpsMarket> list, Boolean isUpdateSupport) {
|
||||
@ -101,6 +99,7 @@ public class MpsMarketServiceImpl implements IMpsMarketService {
|
||||
@Override
|
||||
public TableDataInfo<MpsMarketVo> queryPageList(MpsMarketBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<MpsMarket> lqw = buildQueryWrapper(bo);
|
||||
// PageDTO<MpsMarketVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
Page<MpsMarketVo> result = baseMapper.selectPageMpsMarketList(pageQuery.build(), lqw);
|
||||
result.getRecords().forEach(r -> r.setMagneticCardList(magneticcardMapper.selectVoList(new LambdaQueryWrapper<MpsMagneticcard>().eq(MpsMagneticcard::getMagneticCardId, r.getMagneticCardId()))));
|
||||
result.getRecords().forEach(r -> r.setTrafficList(TrafficMapper.selectVoList(new LambdaQueryWrapper<MpsTraffic>().eq(MpsTraffic::getTrafficId, r.getTrafficId()))));
|
||||
@ -140,7 +139,6 @@ public class MpsMarketServiceImpl implements IMpsMarketService {
|
||||
lqw.eq(bo.getMagneticCardId() != null, MpsMarket::getMagneticCardId, bo.getMagneticCardId());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getAcquiringName()), MpsMarket::getAcquiringName, bo.getAcquiringName());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getAcquiringId()), MpsMarket::getAcquiringId, bo.getAcquiringId());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getInternetChannel()), MpsMarket::getInternetChannel, bo.getInternetChannel());
|
||||
lqw.eq(bo.getTrafficId() != null, MpsMarket::getTrafficId, bo.getTrafficId());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getWorkplace()), MpsMarket::getWorkplace, bo.getWorkplace());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getSurplusAccountName()), MpsMarket::getSurplusAccountName, bo.getSurplusAccountName());
|
||||
@ -161,6 +159,11 @@ public class MpsMarketServiceImpl implements IMpsMarketService {
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(MpsMarketBo bo) {
|
||||
// if (bo.getInternetChannel().size() > 0) {
|
||||
// String internetChannel = String.join(",", bo.getInternetChannel());
|
||||
// bo.setInternetChannel(internetChannel);
|
||||
// }
|
||||
// MpsMarket add = mpsMarketConverter.convert(bo);
|
||||
MpsMarket add = MapstructUtils.convert(bo, MpsMarket.class);
|
||||
validEntityBeforeAdd(add);
|
||||
System.out.println("add:--->"+add);
|
||||
@ -189,20 +192,17 @@ public class MpsMarketServiceImpl implements IMpsMarketService {
|
||||
*/
|
||||
private void validEntityBeforeAdd(MpsMarket entity){
|
||||
//TODO 做一些数据校验,如唯一约束,非空校验
|
||||
if (entity.getSubcategoryName() == null) {
|
||||
throw new ServiceException("请填写子类名称");
|
||||
if (StringUtils.isEmpty(entity.getSubcategoryName())) {
|
||||
throw new ServiceException("请填写业务子类名称");
|
||||
}
|
||||
if (entity.getYxName() == null) {
|
||||
throw new ServiceException("请填写营销名称");
|
||||
if (null == entity.getSubcategoryId()) {
|
||||
throw new ServiceException("请填写业务子类ID");
|
||||
}
|
||||
if (entity.getJbName() == null) {
|
||||
throw new ServiceException("请填写缴别名称");
|
||||
if (StringUtils.isEmpty(entity.getJbName())) {
|
||||
throw new ServiceException("请填写经办人员名称");
|
||||
}
|
||||
if (entity.getYxId() == null) {
|
||||
throw new ServiceException("请填写营销ID");
|
||||
}
|
||||
if (entity.getJbId() == null) {
|
||||
throw new ServiceException("请填写经办ID");
|
||||
if (StringUtils.isEmpty(entity.getJbId())) {
|
||||
throw new ServiceException("请填写经办人员ID");
|
||||
}
|
||||
if (entity.getDate() == null) {
|
||||
throw new ServiceException("请填写日期");
|
||||
@ -232,7 +232,7 @@ public class MpsMarketServiceImpl implements IMpsMarketService {
|
||||
}
|
||||
switch (entity.getSubcategoryName()) {
|
||||
case "公积金缴纳账户":
|
||||
if (entity.getSurplusAccountName() == null) {
|
||||
if (StringUtils.isEmpty(entity.getSurplusAccountName())) {
|
||||
throw new ServiceException("请填写公积金账户名称");
|
||||
}
|
||||
MpsMarket bo = new MpsMarket();
|
||||
@ -311,25 +311,25 @@ public class MpsMarketServiceImpl implements IMpsMarketService {
|
||||
TrafficMapper.insertBatch(entity.getTrafficList());
|
||||
break;
|
||||
case "新增综合收单商户(首月)":
|
||||
if (entity.getAcquiringId() == null) {
|
||||
if (StringUtils.isEmpty(entity.getAcquiringId())) {
|
||||
throw new ServiceException("请填写收单机构ID");
|
||||
}
|
||||
if (entity.getAcquiringName() == null) {
|
||||
if (StringUtils.isEmpty(entity.getAcquiringName())) {
|
||||
throw new ServiceException("请填写收单机构名称");
|
||||
}
|
||||
break;
|
||||
case "网上支付客户":
|
||||
if (entity.getInternetChannel() == null) {
|
||||
if (StringUtils.isEmpty(entity.getInternetChannel())) {
|
||||
throw new ServiceException("请填写网上支付渠道");
|
||||
}
|
||||
break;
|
||||
case "营销职工社保卡":
|
||||
if (entity.getWorkplace() == null) {
|
||||
if (StringUtils.isEmpty(entity.getWorkplace())) {
|
||||
throw new ServiceException("请填写营销职工社保卡工作单位");
|
||||
}
|
||||
break;
|
||||
case "取暖费":
|
||||
if (entity.getHeatingNo() == null) {
|
||||
if (StringUtils.isEmpty(entity.getHeatingNo())) {
|
||||
throw new ServiceException("请填写取暖费编号");
|
||||
}
|
||||
break;
|
||||
@ -344,27 +344,24 @@ public class MpsMarketServiceImpl implements IMpsMarketService {
|
||||
*/
|
||||
private void validEntityBeforeUpdate(MpsMarket entity){
|
||||
//TODO 做一些数据校验,如唯一约束,非空校验
|
||||
if (entity.getSubcategoryName() == null) {
|
||||
throw new ServiceException("请填写子类名称");
|
||||
if (StringUtils.isEmpty(entity.getSubcategoryName())) {
|
||||
throw new ServiceException("请填写业务子类名称");
|
||||
}
|
||||
if (entity.getYxName() == null) {
|
||||
throw new ServiceException("请填写营销名称");
|
||||
if (null == entity.getSubcategoryId()) {
|
||||
throw new ServiceException("请填写业务子类ID");
|
||||
}
|
||||
if (entity.getJbName() == null) {
|
||||
throw new ServiceException("请填写缴别名称");
|
||||
if (StringUtils.isEmpty(entity.getJbName())) {
|
||||
throw new ServiceException("请填写经办人员名称");
|
||||
}
|
||||
if (entity.getYxId() == null) {
|
||||
throw new ServiceException("请填写营销ID");
|
||||
}
|
||||
if (entity.getJbId() == null) {
|
||||
throw new ServiceException("请填写经办ID");
|
||||
if (StringUtils.isEmpty(entity.getJbId())) {
|
||||
throw new ServiceException("请填写经办人员ID");
|
||||
}
|
||||
if (entity.getDate() == null) {
|
||||
throw new ServiceException("请填写日期");
|
||||
}
|
||||
switch (entity.getSubcategoryName()) {
|
||||
case "公积金缴纳账户":
|
||||
if (entity.getSurplusAccountName() == null) {
|
||||
if (StringUtils.isEmpty(entity.getSurplusAccountName())) {
|
||||
throw new ServiceException("请填写公积金账户名称");
|
||||
}
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user