修改费用名称
This commit is contained in:
@ -1,22 +1,12 @@
|
|||||||
package com.xjrsoft.module.mdm.dto;
|
package com.xjrsoft.module.mdm.dto;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
import com.pictc.annotations.datalog.LogField;
|
||||||
|
import com.pictc.annotations.datalog.LogTable;
|
||||||
|
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import java.io.Serializable;
|
|
||||||
|
|
||||||
import java.time.LocalTime;
|
|
||||||
import java.time.LocalDateTime;
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import com.pictc.annotations.datalog.LogTable;
|
|
||||||
import com.pictc.annotations.datalog.LogField;
|
|
||||||
import com.pictc.annotations.datalog.LogJoin;
|
|
||||||
import com.pictc.annotations.datalog.LogJoinColumn;
|
|
||||||
import com.pictc.annotations.datalog.JoinCaseType;
|
|
||||||
import com.pictc.annotations.datalog.JoinType;
|
|
||||||
import com.pictc.annotations.datalog.ValueDirectionType;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,22 +1,12 @@
|
|||||||
package com.xjrsoft.module.mdm.dto;
|
package com.xjrsoft.module.mdm.dto;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
import com.pictc.annotations.datalog.LogField;
|
||||||
|
import com.pictc.annotations.datalog.LogTable;
|
||||||
|
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import java.io.Serializable;
|
|
||||||
|
|
||||||
import java.time.LocalTime;
|
|
||||||
import java.time.LocalDateTime;
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import com.pictc.annotations.datalog.LogTable;
|
|
||||||
import com.pictc.annotations.datalog.LogField;
|
|
||||||
import com.pictc.annotations.datalog.LogJoin;
|
|
||||||
import com.pictc.annotations.datalog.LogJoinColumn;
|
|
||||||
import com.pictc.annotations.datalog.JoinCaseType;
|
|
||||||
import com.pictc.annotations.datalog.JoinType;
|
|
||||||
import com.pictc.annotations.datalog.ValueDirectionType;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -24,7 +24,7 @@ import com.xjrsoft.module.datalog.vo.DataChangeLogVo;
|
|||||||
import com.xjrsoft.module.mdm.dto.LngBFeePageDto;
|
import com.xjrsoft.module.mdm.dto.LngBFeePageDto;
|
||||||
import com.xjrsoft.module.mdm.dto.UpdateLngBFeeDto;
|
import com.xjrsoft.module.mdm.dto.UpdateLngBFeeDto;
|
||||||
import com.xjrsoft.module.mdm.entity.LngBFee;
|
import com.xjrsoft.module.mdm.entity.LngBFee;
|
||||||
import com.xjrsoft.module.mdm.service.IExpenseNameService;
|
import com.xjrsoft.module.mdm.service.IFeeService;
|
||||||
import com.xjrsoft.module.mdm.vo.LngBFeePageVo;
|
import com.xjrsoft.module.mdm.vo.LngBFeePageVo;
|
||||||
import com.xjrsoft.module.mdm.vo.LngBFeeVo;
|
import com.xjrsoft.module.mdm.vo.LngBFeeVo;
|
||||||
|
|
||||||
@ -42,18 +42,18 @@ import lombok.AllArgsConstructor;
|
|||||||
* @Version 1.0
|
* @Version 1.0
|
||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/mdm" + "/expenseName")
|
@RequestMapping("/mdm" + "/fee")
|
||||||
@Api(value = "/mdm" + "/expenseName",tags = "费用名称代码")
|
@Api(value = "/mdm" + "/fee",tags = "费用名称代码")
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public class ExpenseNameController {
|
public class FeeController {
|
||||||
|
|
||||||
|
|
||||||
private final IExpenseNameService expenseNameService;
|
private final IFeeService feeService;
|
||||||
private final DatalogService dataService;
|
private final DatalogService dataService;
|
||||||
|
|
||||||
@GetMapping(value = "/page")
|
@GetMapping(value = "/page")
|
||||||
@ApiOperation(value="LngBFee列表(分页)")
|
@ApiOperation(value="LngBFee列表(分页)")
|
||||||
@SaCheckPermission("expenseName:list")
|
@SaCheckPermission("fee:list")
|
||||||
public R page(@Valid LngBFeePageDto dto){
|
public R page(@Valid LngBFeePageDto dto){
|
||||||
|
|
||||||
LambdaQueryWrapper<LngBFee> queryWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<LngBFee> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
@ -64,16 +64,16 @@ public class ExpenseNameController {
|
|||||||
.like(StrUtil.isNotBlank(dto.getNote()),LngBFee::getNote,dto.getNote())
|
.like(StrUtil.isNotBlank(dto.getNote()),LngBFee::getNote,dto.getNote())
|
||||||
.orderByAsc(LngBFee::getSort,LngBFee::getCode)
|
.orderByAsc(LngBFee::getSort,LngBFee::getCode)
|
||||||
.select(LngBFee.class,x -> VoToColumnUtil.fieldsToColumns(LngBFeePageVo.class).contains(x.getProperty()));
|
.select(LngBFee.class,x -> VoToColumnUtil.fieldsToColumns(LngBFeePageVo.class).contains(x.getProperty()));
|
||||||
IPage<LngBFee> page = expenseNameService.page(ConventPage.getPage(dto), queryWrapper);
|
IPage<LngBFee> page = feeService.page(ConventPage.getPage(dto), queryWrapper);
|
||||||
PageOutput<LngBFeePageVo> pageOutput = ConventPage.getPageOutput(page, LngBFeePageVo.class);
|
PageOutput<LngBFeePageVo> pageOutput = ConventPage.getPageOutput(page, LngBFeePageVo.class);
|
||||||
return R.ok(pageOutput);
|
return R.ok(pageOutput);
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping(value = "/info")
|
@GetMapping(value = "/info")
|
||||||
@ApiOperation(value="根据id查询LngBFee信息")
|
@ApiOperation(value="根据id查询LngBFee信息")
|
||||||
@SaCheckPermission("expenseName:detail")
|
@SaCheckPermission("fee:detail")
|
||||||
public R info(@RequestParam Long id){
|
public R info(@RequestParam Long id){
|
||||||
LngBFee lngBFee = expenseNameService.getById(id);
|
LngBFee lngBFee = feeService.getById(id);
|
||||||
if (lngBFee == null) {
|
if (lngBFee == null) {
|
||||||
return R.error("找不到此数据!");
|
return R.error("找不到此数据!");
|
||||||
}
|
}
|
||||||
@ -83,21 +83,21 @@ public class ExpenseNameController {
|
|||||||
|
|
||||||
@PostMapping
|
@PostMapping
|
||||||
@ApiOperation(value = "新增LngBFee")
|
@ApiOperation(value = "新增LngBFee")
|
||||||
@SaCheckPermission("expenseName:add")
|
@SaCheckPermission("fee:add")
|
||||||
public R add(@Valid @RequestBody UpdateLngBFeeDto dto){
|
public R add(@Valid @RequestBody UpdateLngBFeeDto dto){
|
||||||
return R.ok(expenseNameService.add(dto));
|
return R.ok(feeService.add(dto));
|
||||||
}
|
}
|
||||||
|
|
||||||
@PutMapping
|
@PutMapping
|
||||||
@ApiOperation(value = "修改LngBFee")
|
@ApiOperation(value = "修改LngBFee")
|
||||||
@SaCheckPermission("expenseName:edit")
|
@SaCheckPermission("fee:edit")
|
||||||
public R update(@Valid @RequestBody UpdateLngBFeeDto dto){
|
public R update(@Valid @RequestBody UpdateLngBFeeDto dto){
|
||||||
return R.ok(expenseNameService.update(dto));
|
return R.ok(feeService.update(dto));
|
||||||
}
|
}
|
||||||
|
|
||||||
@DeleteMapping
|
@DeleteMapping
|
||||||
@ApiOperation(value = "删除")
|
@ApiOperation(value = "删除")
|
||||||
@SaCheckPermission("expenseName:delete")
|
@SaCheckPermission("fee:delete")
|
||||||
public R delete(@Valid @RequestBody List<Long> ids){
|
public R delete(@Valid @RequestBody List<Long> ids){
|
||||||
return R.ok(dataService.deleteByIds(UpdateLngBFeeDto.class, ids));
|
return R.ok(dataService.deleteByIds(UpdateLngBFeeDto.class, ids));
|
||||||
|
|
||||||
@ -105,7 +105,7 @@ public class ExpenseNameController {
|
|||||||
|
|
||||||
@GetMapping(value = "/datalog")
|
@GetMapping(value = "/datalog")
|
||||||
@ApiOperation(value="根据id查询LngBFee数据详细日志")
|
@ApiOperation(value="根据id查询LngBFee数据详细日志")
|
||||||
@SaCheckPermission("expenseName:datalog")
|
@SaCheckPermission("fee:datalog")
|
||||||
public R datalog(@RequestParam Long id){
|
public R datalog(@RequestParam Long id){
|
||||||
List<DataChangeLogVo> logs = dataService.findLogsByEntityId(UpdateLngBFeeDto.class,id);
|
List<DataChangeLogVo> logs = dataService.findLogsByEntityId(UpdateLngBFeeDto.class,id);
|
||||||
return R.ok(logs);
|
return R.ok(logs);
|
||||||
@ -113,17 +113,17 @@ public class ExpenseNameController {
|
|||||||
|
|
||||||
@PostMapping("/enable")
|
@PostMapping("/enable")
|
||||||
@ApiOperation(value = "启用")
|
@ApiOperation(value = "启用")
|
||||||
@SaCheckPermission("expenseName:enable")
|
@SaCheckPermission("fee:enable")
|
||||||
public R enable(@Valid @RequestBody List<Long> ids){
|
public R enable(@Valid @RequestBody List<Long> ids){
|
||||||
return R.ok(expenseNameService.enable(ids));
|
return R.ok(feeService.enable(ids));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@PostMapping("/disable")
|
@PostMapping("/disable")
|
||||||
@ApiOperation(value = "禁用")
|
@ApiOperation(value = "禁用")
|
||||||
@SaCheckPermission("expenseName:disable")
|
@SaCheckPermission("fee:disable")
|
||||||
public R disable(@Valid @RequestBody List<Long> ids){
|
public R disable(@Valid @RequestBody List<Long> ids){
|
||||||
return R.ok(expenseNameService.disable(ids));
|
return R.ok(feeService.disable(ids));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -13,7 +13,7 @@ import com.xjrsoft.module.mdm.entity.LngBFee;
|
|||||||
* @Version 1.0
|
* @Version 1.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public interface IExpenseNameService extends IService<LngBFee> {
|
public interface IFeeService extends IService<LngBFee> {
|
||||||
|
|
||||||
Boolean enable(List<Long> ids);
|
Boolean enable(List<Long> ids);
|
||||||
|
|
||||||
@ -19,7 +19,7 @@ import com.xjrsoft.module.mdm.dto.UpdateLngBBankDto;
|
|||||||
import com.xjrsoft.module.mdm.dto.UpdateLngBFeeDto;
|
import com.xjrsoft.module.mdm.dto.UpdateLngBFeeDto;
|
||||||
import com.xjrsoft.module.mdm.entity.LngBFee;
|
import com.xjrsoft.module.mdm.entity.LngBFee;
|
||||||
import com.xjrsoft.module.mdm.mapper.LngBFeeMapper;
|
import com.xjrsoft.module.mdm.mapper.LngBFeeMapper;
|
||||||
import com.xjrsoft.module.mdm.service.IExpenseNameService;
|
import com.xjrsoft.module.mdm.service.IFeeService;
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
|
|
||||||
@ -31,7 +31,7 @@ import lombok.AllArgsConstructor;
|
|||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public class ExpenseNameServiceImpl extends ServiceImpl<LngBFeeMapper, LngBFee> implements IExpenseNameService {
|
public class FeeServiceImpl extends ServiceImpl<LngBFeeMapper, LngBFee> implements IFeeService {
|
||||||
|
|
||||||
private final CommonCallService commonCallService;
|
private final CommonCallService commonCallService;
|
||||||
|
|
||||||
Reference in New Issue
Block a user