修改科目创建订单默认显示设置
This commit is contained in:
+29
@@ -379,6 +379,35 @@ public class ExpenseAccountApplicationService {
|
|||||||
expenseAccountDO.setUpdateByName(loginUser.getUsername());
|
expenseAccountDO.setUpdateByName(loginUser.getUsername());
|
||||||
return expenseAccountDomainService.update(expenseAccountDO);
|
return expenseAccountDomainService.update(expenseAccountDO);
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 修改创建订单是否固定显示 0-否 1-是
|
||||||
|
* @param expenseAccountDTO
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public boolean changeFixedOrderDisplay(ExpenseAccountDTO expenseAccountDTO) {
|
||||||
|
//获取登录用户信息
|
||||||
|
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||||
|
if (ObjectUtil.isNull(loginUser)) {
|
||||||
|
throw new DigitalLogisticsException(UserError.TIMEOUT);
|
||||||
|
}
|
||||||
|
//根据id修改启用状态停用状态
|
||||||
|
if(expenseAccountDTO.getExpenseAccountId() == null){
|
||||||
|
throw new ServiceException("费用科目id不能为空");
|
||||||
|
}
|
||||||
|
if(expenseAccountDTO.getFixedOrderDisplay() == null){
|
||||||
|
throw new ServiceException("状态不能为空");
|
||||||
|
}
|
||||||
|
if(expenseAccountDTO.getFixedOrderDisplay() != 0 && expenseAccountDTO.getFixedOrderDisplay()!=1){
|
||||||
|
throw new ServiceException("状态错误");
|
||||||
|
}
|
||||||
|
ExpenseAccountDO expenseAccountDO = new ExpenseAccountDO();
|
||||||
|
expenseAccountDO.setExpenseAccountId(expenseAccountDTO.getExpenseAccountId());
|
||||||
|
expenseAccountDO.setFixedOrderDisplay(expenseAccountDTO.getFixedOrderDisplay());
|
||||||
|
expenseAccountDO.setUpdateBy(loginUser.getUserid());
|
||||||
|
expenseAccountDO.setUpdateTime(new Date());
|
||||||
|
expenseAccountDO.setUpdateByName(loginUser.getUsername());
|
||||||
|
return expenseAccountDomainService.update(expenseAccountDO);
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* 根据编码查询费用科目信息
|
* 根据编码查询费用科目信息
|
||||||
*/
|
*/
|
||||||
|
|||||||
+10
-1
@@ -258,7 +258,16 @@ public class ExpenseAccountApi extends BaseController{
|
|||||||
return AjaxResult.error(e.getMessage());
|
return AjaxResult.error(e.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ApiOperation("修改创建订单默认显示设置")
|
||||||
|
@PostMapping("/changeFixedOrderDisplay")
|
||||||
|
public AjaxResult changeFixedOrderDisplay(@RequestBody ExpenseAccountDTO expenseAccountDTO)
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
return toAjax(expenseAccountApplicationService.changeFixedOrderDisplay(expenseAccountDTO));
|
||||||
|
}catch (Exception e){
|
||||||
|
return AjaxResult.error(e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@ApiOperation("根据code获取费用科目")
|
@ApiOperation("根据code获取费用科目")
|
||||||
@GetMapping(value = "/getInfoByCode")
|
@GetMapping(value = "/getInfoByCode")
|
||||||
|
|||||||
Reference in New Issue
Block a user