Merge remote-tracking branch 'origin/main' into main
This commit is contained in:
commit
900832c03c
@ -50,6 +50,7 @@ function createDefaultModel(): Model {
|
||||
return {
|
||||
categoryId: props.categoryId,
|
||||
name: '',
|
||||
typeId: '',
|
||||
status: '0',
|
||||
pricingRule: '',
|
||||
};
|
||||
@ -58,21 +59,23 @@ function createDefaultModel(): Model {
|
||||
type RuleKey = Extract<
|
||||
keyof Model,
|
||||
| 'status'
|
||||
| 'name'
|
||||
| 'typeId'
|
||||
| 'pricingRule'
|
||||
| 'createDept'
|
||||
| 'createBy'
|
||||
| 'createTime'
|
||||
| 'updateBy'
|
||||
| 'updateTime'
|
||||
>;
|
||||
|
||||
const rules: Record<RuleKey, App.Global.FormRule> = {
|
||||
// 添加typeId的字母数字验证规则
|
||||
const typeIdPatternRule = {
|
||||
pattern: /^[a-zA-Z0-9]+$/,
|
||||
message: '业务子类ID只能包含字母和数字',
|
||||
trigger: 'change'
|
||||
};
|
||||
|
||||
const rules: Record<RuleKey, App.Global.FormRule | App.Global.FormRule[]> = {
|
||||
status: createRequiredRule('状态不能为空'),
|
||||
pricingRule: createRequiredRule('计价规则说明不能为空'),
|
||||
createDept: createRequiredRule('创建部门不能为空'),
|
||||
createBy: createRequiredRule('创建人不能为空'),
|
||||
createTime: createRequiredRule('创建时间不能为空'),
|
||||
updateBy: createRequiredRule('更新人不能为空'),
|
||||
updateTime: createRequiredRule('更新时间不能为空')
|
||||
typeId: [createRequiredRule('业务子类类型不能为空'), typeIdPatternRule],
|
||||
name: createRequiredRule('业务子类名称不能为空'),
|
||||
};
|
||||
|
||||
function handleUpdateModelWhenEdit() {
|
||||
@ -134,6 +137,9 @@ watch(visible, () => {
|
||||
<NFormItem label="业务子类名称" path="name">
|
||||
<NInput v-model:value="model.name" placeholder="请输入业务子类名称" />
|
||||
</NFormItem>
|
||||
<NFormItem label="业务子类id" path="typeId">
|
||||
<NInput v-model:value="model.typeId" placeholder="请输入业务子类id" />
|
||||
</NFormItem>
|
||||
<NFormItem label="状态" path="status">
|
||||
<DictRadio v-model:value="model.status" dict-code="sys_normal_disable" />
|
||||
</NFormItem>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<script setup lang="tsx">
|
||||
import {onMounted,ref, watch} from "vue";
|
||||
import { NButton,NDivider } from 'naive-ui';
|
||||
import { NButton,NDivider,NEllipsis } from 'naive-ui';
|
||||
import { fetchBatchDeleteMarket, fetchGetMarketList } from '@/service/api/mps/market';
|
||||
import { fetchGetSubcategorySelect } from '@/service/api/business/subcategory';
|
||||
import { useAppStore } from '@/store/modules/app';
|
||||
@ -262,7 +262,15 @@ const {
|
||||
align: 'center',
|
||||
minWidth: 120,
|
||||
ellipsis: true,
|
||||
resizable: true
|
||||
resizable: true,
|
||||
render: (row) => {
|
||||
if (!row.internetChannel) return '';
|
||||
return (
|
||||
<NEllipsis style="width: 100%;" tooltip={true}>
|
||||
{row.internetChannel}
|
||||
</NEllipsis>
|
||||
);
|
||||
}
|
||||
},
|
||||
{
|
||||
key: 'trafficId',
|
||||
@ -499,7 +507,7 @@ async function getSubcategoryOptions() {
|
||||
if (!error) {
|
||||
subcategoryIdOptions.value = data.map(item => ({
|
||||
label: item.name,
|
||||
value: item.id
|
||||
value: item.typeId
|
||||
}));
|
||||
}
|
||||
endLoading();
|
||||
|
@ -699,10 +699,20 @@ watch(visible, () => {
|
||||
<tbody>
|
||||
<tr v-for="(item, index) in model.magneticCardList" :key="index">
|
||||
<td>
|
||||
<NInput v-model:value="item.oldCardNo" placeholder="请输入老卡号" />
|
||||
<NInputNumber
|
||||
v-model:value="item.oldCardNo"
|
||||
placeholder="请输入老卡号"
|
||||
:show-button="false"
|
||||
:controls="false" style="width: 100%"
|
||||
/>
|
||||
</td>
|
||||
<td>
|
||||
<NInput v-model:value="item.newCardNo" placeholder="请输入新卡号" />
|
||||
<NInputNumber
|
||||
v-model:value="item.newCardNo"
|
||||
placeholder="请输入新卡号"
|
||||
:show-button="false"
|
||||
:controls="false" style="width: 100%"
|
||||
/>
|
||||
</td>
|
||||
<td>
|
||||
<NButton text type="error" @click="removeMagneticCardItem(index)">删除</NButton>
|
||||
@ -747,10 +757,16 @@ watch(visible, () => {
|
||||
<tbody>
|
||||
<tr v-for="(item, index) in model.trafficList || []" :key="index">
|
||||
<td>
|
||||
<NInput v-model:value="item.trafficNo" placeholder="请输入决定书编号" />
|
||||
<NInputNumber
|
||||
v-model:value="item.trafficNo"
|
||||
placeholder="请输入决定书编号"
|
||||
:show-button="false"
|
||||
:controls="false"
|
||||
style="width: 100%"
|
||||
/>
|
||||
</td>
|
||||
<td>
|
||||
<NInputNumber v-model:value="item.trafficAmt" placeholder="请输入处罚金额" style="width: 100%" />
|
||||
<NInputNumber v-model:value="item.trafficAmt" placeholder="请输入处罚金额" :min="0" style="width: 100%" />
|
||||
</td>
|
||||
<td>
|
||||
<NButton text type="error" @click="removeTrafficItem(index)">删除</NButton>
|
||||
|
@ -270,3 +270,6 @@ justauth:
|
||||
client-id: 10**********6
|
||||
client-secret: 1f7d08**********5b7**********29e
|
||||
redirect-uri: ${justauth.address}/social-callback?source=gitea
|
||||
mapstruct-plus :
|
||||
processor :
|
||||
trim-string : true
|
||||
|
@ -139,7 +139,11 @@ public class BusinessSubcategoryController extends BaseController {
|
||||
*/
|
||||
@GetMapping("/selList")
|
||||
public R<List<BusinessSubcategoryVo>> selList() {
|
||||
return R.ok(businessSubcategoryService.selectSelSubcategoryList());
|
||||
BusinessSubcategoryBo bo = new BusinessSubcategoryBo();
|
||||
bo.setStatus("0");
|
||||
List<BusinessSubcategoryVo> list = businessSubcategoryService.queryList(bo);
|
||||
return R.ok(list);
|
||||
// return R.ok(businessSubcategoryService.selectSelSubcategoryList());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -28,21 +28,25 @@ public class BusinessSubcategoryBo extends BaseEntity {
|
||||
/**
|
||||
* 所属大类ID
|
||||
*/
|
||||
@NotNull(message = "所属大类ID不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long categoryId;
|
||||
|
||||
/**
|
||||
* 业务类型ID
|
||||
*/
|
||||
@NotBlank(message = "业务类型ID不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String typeId;
|
||||
|
||||
/**
|
||||
* 业务子类名称
|
||||
*/
|
||||
@NotBlank(message = "业务子类名称不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 业务子类状态(0正常 1停用)
|
||||
*/
|
||||
@NotBlank(message = "业务子类状态不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String status;
|
||||
|
||||
/**
|
||||
|
@ -33,7 +33,7 @@ public class MpsDetailEntry extends TenantEntity {
|
||||
/**
|
||||
* 业务类型id
|
||||
*/
|
||||
private BigDecimal subcategoryId;
|
||||
private String subcategoryId;
|
||||
|
||||
/**
|
||||
* 业务类型名称
|
||||
|
@ -1,15 +1,11 @@
|
||||
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;
|
||||
|
||||
@ -40,7 +36,7 @@ public class MpsMarket extends TenantEntity {
|
||||
/**
|
||||
* 业务类型id
|
||||
*/
|
||||
private Long subcategoryId;
|
||||
private String subcategoryId;
|
||||
|
||||
/**
|
||||
* 业务类型名称
|
||||
|
@ -32,7 +32,7 @@ public class MpsDetailEntryBo extends BaseEntity {
|
||||
* 业务类型id
|
||||
*/
|
||||
@NotNull(message = "业务类型id不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private BigDecimal subcategoryId;
|
||||
private String subcategoryId;
|
||||
|
||||
/**
|
||||
* 业务类型名称
|
||||
|
@ -10,7 +10,7 @@ import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import jakarta.validation.constraints.*;
|
||||
import org.dromara.mps.service.convert.StringToList;
|
||||
import org.dromara.mps.service.convert.StringTrimConverter;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
@ -23,7 +23,7 @@ import java.util.List;
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@AutoMapper(target = MpsMarket.class, reverseConvertGenerate = false)
|
||||
@AutoMapper(target = MpsMarket.class, reverseConvertGenerate = false, uses = StringTrimConverter.class)
|
||||
public class MpsMarketBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
@ -34,8 +34,8 @@ public class MpsMarketBo extends BaseEntity {
|
||||
/**
|
||||
* 业务类型id
|
||||
*/
|
||||
@NotNull(message = "业务类型ID不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long subcategoryId;
|
||||
@NotBlank(message = "业务类型ID不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String subcategoryId;
|
||||
|
||||
/**
|
||||
* 业务类型名称
|
||||
@ -97,6 +97,7 @@ public class MpsMarketBo extends BaseEntity {
|
||||
/**
|
||||
* 客户姓名
|
||||
*/
|
||||
|
||||
private String custName;
|
||||
|
||||
/**
|
||||
|
@ -41,7 +41,7 @@ public class MpsDetailEntryImportVo implements Serializable {
|
||||
* 业务类型id
|
||||
*/
|
||||
@ExcelProperty(value = "业务类型id")
|
||||
private BigDecimal subcategoryId;
|
||||
private String subcategoryId;
|
||||
|
||||
/**
|
||||
* 业务类型名称
|
||||
|
@ -43,7 +43,7 @@ public class MpsDetailEntryVo implements Serializable {
|
||||
* 业务类型id
|
||||
*/
|
||||
@ExcelProperty(value = "业务类型id")
|
||||
private BigDecimal subcategoryId;
|
||||
private String subcategoryId;
|
||||
|
||||
/**
|
||||
* 业务类型名称
|
||||
|
@ -41,7 +41,7 @@ public class MpsMarketImportVo implements Serializable {
|
||||
* 业务类型id
|
||||
*/
|
||||
@ExcelProperty(value = "业务类型id")
|
||||
private Long subcategoryId;
|
||||
private String subcategoryId;
|
||||
|
||||
/**
|
||||
* 业务类型名称
|
||||
|
@ -42,7 +42,7 @@ public class MpsMarketVo implements Serializable {
|
||||
*/
|
||||
@ExcelProperty(value = "业务类型id")
|
||||
@NumberFormat("#")
|
||||
private Long subcategoryId;
|
||||
private String subcategoryId;
|
||||
|
||||
/**
|
||||
* 业务类型名称
|
||||
|
@ -36,7 +36,10 @@ public interface MpsDetailEntryMapper extends BaseMapperPlus<MpsDetailEntry, Mps
|
||||
// @DataColumn(key = "userName", value = "create_by")
|
||||
//})
|
||||
// List<SysUserExportVo> selectMpsDetailEntryExportList(@Param(Constants.WRAPPER) Wrapper<MpsDetailEntry> queryWrapper);
|
||||
|
||||
@DataPermission({
|
||||
@DataColumn(key = "deptName", value = "m.create_dept"),
|
||||
@DataColumn(key = "userName", value = "m.create_by")
|
||||
})
|
||||
@Select({
|
||||
"select " +
|
||||
"c.old_card_no as oldCardNo , c.new_card_no as newCardNo, " +
|
||||
|
@ -1,18 +0,0 @@
|
||||
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+"]";
|
||||
}
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
package org.dromara.mps.service.convert;
|
||||
|
||||
import org.springframework.core.convert.converter.Converter;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
public class StringTrimConverter implements Converter<String, String> {
|
||||
@Override
|
||||
public String convert(String source) {
|
||||
return source != null ? source.trim() : null;
|
||||
}
|
||||
}
|
||||
|
@ -115,7 +115,7 @@ public class MpsDetailEntryServiceImpl implements IMpsDetailEntryService {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<MpsDetailEntry> lqw = Wrappers.lambdaQuery();
|
||||
lqw.orderByAsc(MpsDetailEntry::getDataId);
|
||||
lqw.eq(bo.getSubcategoryId() != null, MpsDetailEntry::getSubcategoryId, bo.getSubcategoryId());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getSubcategoryId()), MpsDetailEntry::getSubcategoryId, bo.getSubcategoryId());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getSubcategoryName()), MpsDetailEntry::getSubcategoryName, bo.getSubcategoryName());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getYxName()), MpsDetailEntry::getYxName, bo.getYxName());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getJbName()), MpsDetailEntry::getJbName, bo.getJbName());
|
||||
|
@ -135,7 +135,7 @@ public class MpsMarketServiceImpl implements IMpsMarketService {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<MpsMarket> lqw = Wrappers.lambdaQuery();
|
||||
lqw.orderByAsc(MpsMarket::getDataId);
|
||||
lqw.eq(bo.getSubcategoryId() != null, MpsMarket::getSubcategoryId, bo.getSubcategoryId());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getSubcategoryId()), MpsMarket::getSubcategoryId, bo.getSubcategoryId());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getSubcategoryName()), MpsMarket::getSubcategoryName, bo.getSubcategoryName());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getYxName()), MpsMarket::getYxName, bo.getYxName());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getJbName()), MpsMarket::getJbName, bo.getJbName());
|
||||
@ -357,21 +357,6 @@ public class MpsMarketServiceImpl implements IMpsMarketService {
|
||||
*/
|
||||
private void validEntityBeforeUpdate(MpsMarket entity){
|
||||
//TODO 做一些数据校验,如唯一约束,非空校验
|
||||
if (StringUtils.isEmpty(entity.getSubcategoryName())) {
|
||||
throw new ServiceException("请填写业务子类名称");
|
||||
}
|
||||
if (null == entity.getSubcategoryId()) {
|
||||
throw new ServiceException("请填写业务子类ID");
|
||||
}
|
||||
if (StringUtils.isEmpty(entity.getJbName())) {
|
||||
throw new ServiceException("请填写经办人员名称");
|
||||
}
|
||||
if (StringUtils.isEmpty(entity.getJbId())) {
|
||||
throw new ServiceException("请填写经办人员ID");
|
||||
}
|
||||
if (entity.getDate() == null) {
|
||||
throw new ServiceException("请填写日期");
|
||||
}
|
||||
switch (entity.getSubcategoryName()) {
|
||||
case "公积金缴纳账户":
|
||||
if (StringUtils.isEmpty(entity.getSurplusAccountName())) {
|
||||
|
Loading…
Reference in New Issue
Block a user