Commit 95f89814 by zhaoyang

新增资产池修改

parent ca9f2333
...@@ -39,7 +39,6 @@ public class AstPoolServiceImpl extends ServiceSupport implements AstPoolService ...@@ -39,7 +39,6 @@ public class AstPoolServiceImpl extends ServiceSupport implements AstPoolService
if(StringUtils.isEmpty(astPoolEntity.getProdNo())){ if(StringUtils.isEmpty(astPoolEntity.getProdNo())){
astPoolEntity.setProdNo(astPoolOprParam.getAstTypeCode()); astPoolEntity.setProdNo(astPoolOprParam.getAstTypeCode());
} }
astPoolEntity.setProdNo(astPoolOprParam.getProdNo());
astPoolEntity.setAstPoolNo(SequenceUtil.genId(IdTypeEnum.AST_POOL_CODE)); astPoolEntity.setAstPoolNo(SequenceUtil.genId(IdTypeEnum.AST_POOL_CODE));
astPoolEntity.setAstPoolName(astPoolOprParam.getAstPoolName()); astPoolEntity.setAstPoolName(astPoolOprParam.getAstPoolName());
VarChecker.checkArgument(astPoolRepository.checkAstPool(astPoolEntity),"资产池名称/资产池编号重复"); VarChecker.checkArgument(astPoolRepository.checkAstPool(astPoolEntity),"资产池名称/资产池编号重复");
......
...@@ -4,12 +4,14 @@ ...@@ -4,12 +4,14 @@
<!-- baseSql option中 select * 会自动替换为 include --> <!-- baseSql option中 select * 会自动替换为 include -->
<sql id="Base_Column_List"> <sql id="Base_Column_List">
ID,AST_POOL_NO,GMT_CREATE,AST_POOL_NAME,AST_TYPE_CODE ID,AST_POOL_NO,GMT_CREATE,AST_POOL_NAME,AST_TYPE_CODE
,PROD_NO
,GMT_MODIFIED ,GMT_MODIFIED
</sql> </sql>
<!-- baseSql option中 select sf.* 会自动替换为 include --> <!-- baseSql option中 select sf.* 会自动替换为 include -->
<sql id="Base_SF_Column_List"> <sql id="Base_SF_Column_List">
sf.ID,sf.AST_POOL_NO,sf.GMT_CREATE,sf.AST_POOL_NAME,sf.AST_TYPE_CODE sf.ID,sf.AST_POOL_NO,sf.GMT_CREATE,sf.AST_POOL_NAME,sf.AST_TYPE_CODE
,PROD_NO
,sf.GMT_MODIFIED ,sf.GMT_MODIFIED
</sql> </sql>
...@@ -21,6 +23,7 @@ ...@@ -21,6 +23,7 @@
,GMT_CREATE ,GMT_CREATE
,AST_POOL_NAME ,AST_POOL_NAME
,AST_TYPE_CODE ,AST_TYPE_CODE
,PROD_NO
,GMT_MODIFIED ,GMT_MODIFIED
)VALUES( )VALUES(
SEQ_ABS_AST_POOL.nextval SEQ_ABS_AST_POOL.nextval
...@@ -28,6 +31,7 @@ ...@@ -28,6 +31,7 @@
, sysdate , sysdate
, #{astPoolName,jdbcType=VARCHAR} , #{astPoolName,jdbcType=VARCHAR}
, #{astTypeCode,jdbcType=VARCHAR} , #{astTypeCode,jdbcType=VARCHAR}
, #{prodNo,jdbcType=VARCHAR}
, sysdate , sysdate
) )
]]> ]]>
...@@ -43,6 +47,7 @@ ...@@ -43,6 +47,7 @@
,GMT_CREATE ,GMT_CREATE
,AST_POOL_NAME ,AST_POOL_NAME
,AST_TYPE_CODE ,AST_TYPE_CODE
,PROD_NO
,GMT_MODIFIED ,GMT_MODIFIED
)VALUES )VALUES
( (
...@@ -51,6 +56,7 @@ ...@@ -51,6 +56,7 @@
, sysdate , sysdate
, #{item.astPoolName,jdbcType=VARCHAR} , #{item.astPoolName,jdbcType=VARCHAR}
, #{item.astTypeCode,jdbcType=VARCHAR} , #{item.astTypeCode,jdbcType=VARCHAR}
, #{item.prodNo,jdbcType=VARCHAR}
, sysdate , sysdate
) )
</foreach> </foreach>
......
...@@ -15,10 +15,12 @@ ...@@ -15,10 +15,12 @@
<sql id="Base_SF_Column_List"> <sql id="Base_SF_Column_List">
sf.ID,sf.AST_POOL_NO,sf.GMT_CREATE,sf.AST_POOL_NAME,sf.AST_TYPE_CODE sf.ID,sf.AST_POOL_NO,sf.GMT_CREATE,sf.AST_POOL_NAME,sf.AST_TYPE_CODE
,PROD_NO
,sf.GMT_MODIFIED ,sf.GMT_MODIFIED
</sql> </sql>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
ID,AST_POOL_NO,GMT_CREATE,AST_POOL_NAME,AST_TYPE_CODE ID,AST_POOL_NO,GMT_CREATE,AST_POOL_NAME,AST_TYPE_CODE
,PROD_NO
,GMT_MODIFIED ,GMT_MODIFIED
</sql> </sql>
...@@ -32,6 +34,7 @@ ...@@ -32,6 +34,7 @@
,GMT_CREATE ,GMT_CREATE
,AST_POOL_NAME ,AST_POOL_NAME
,AST_TYPE_CODE ,AST_TYPE_CODE
,PROD_NO
,GMT_MODIFIED ,GMT_MODIFIED
)VALUES( )VALUES(
SEQ_ABS_AST_POOL.nextval SEQ_ABS_AST_POOL.nextval
...@@ -39,6 +42,7 @@ ...@@ -39,6 +42,7 @@
, sysdate , sysdate
, #{astPoolName,jdbcType=VARCHAR} , #{astPoolName,jdbcType=VARCHAR}
, #{astTypeCode,jdbcType=VARCHAR} , #{astTypeCode,jdbcType=VARCHAR}
, #{prodNo,jdbcType=VARCHAR}
, sysdate , sysdate
) )
]]> ]]>
...@@ -54,6 +58,7 @@ ...@@ -54,6 +58,7 @@
,GMT_CREATE ,GMT_CREATE
,AST_POOL_NAME ,AST_POOL_NAME
,AST_TYPE_CODE ,AST_TYPE_CODE
,PROD_NO
,GMT_MODIFIED ,GMT_MODIFIED
)VALUES )VALUES
( (
...@@ -62,6 +67,7 @@ ...@@ -62,6 +67,7 @@
, sysdate , sysdate
, #{item.astPoolName,jdbcType=VARCHAR} , #{item.astPoolName,jdbcType=VARCHAR}
, #{item.astTypeCode,jdbcType=VARCHAR} , #{item.astTypeCode,jdbcType=VARCHAR}
, #{item.prodNo,jdbcType=VARCHAR}
, sysdate , sysdate
) )
</foreach> </foreach>
......
package com.abssqr.plat.common.facade.param.astPool; package com.abssqr.plat.common.facade.param.astPool;
import com.abssqr.plat.common.facade.base.BaseOprParam; import com.abssqr.plat.common.facade.base.BaseOprParam;
import com.abssqr.plat.common.facade.enums.AstTypeEnum;
import com.abssqr.plat.common.facade.enums.EventCodeEnum; import com.abssqr.plat.common.facade.enums.EventCodeEnum;
import com.abssqr.plat.common.facade.validation.VldEnums;
import com.abssqr.plat.common.facade.validation.VldString; import com.abssqr.plat.common.facade.validation.VldString;
public class AstPoolOprParam extends BaseOprParam{ public class AstPoolOprParam extends BaseOprParam{
@VldString(nullable = false,minLength = 0,maxLength = 30) @VldString(maxLength = 30)
private String astPoolName; private String astPoolName;
@VldString(nullable = false,minLength = 0,maxLength = 30) @VldEnums(enumClass= AstTypeEnum.class,message = "不支持的资产类型")
private String astTypeCode; private String astTypeCode;
@VldString(nullable = false,minLength = 0,maxLength = 30) @VldString(nullable = true,maxLength = 30)
private String prodNo; private String prodNo;
public String getAstPoolName() { public String getAstPoolName() {
......
...@@ -10,9 +10,7 @@ import com.abssqr.plat.common.facade.validation.Valid; ...@@ -10,9 +10,7 @@ import com.abssqr.plat.common.facade.validation.Valid;
import com.general.enhanced.controller.annotation.RestJsonController; import com.general.enhanced.controller.annotation.RestJsonController;
import com.general.system.common.model.BaseResult; import com.general.system.common.model.BaseResult;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
@RestJsonController @RestJsonController
@RequestMapping("astPool") @RequestMapping("astPool")
...@@ -21,15 +19,15 @@ public class AstPoolController { ...@@ -21,15 +19,15 @@ public class AstPoolController {
private AstPoolService astPoolService; private AstPoolService astPoolService;
@PostMapping("add.json") @PostMapping("add.json")
public BaseResult add(@Valid AstPoolOprParam astPoolOprParam){ public BaseResult add(@RequestBody AstPoolOprParam astPoolOprParam){
return BaseResult.success(astPoolService.add(astPoolOprParam)); return BaseResult.success(astPoolService.add(astPoolOprParam));
} }
@PostMapping("page.json") @PostMapping("page.json")
public BasePage<AstPoolVO> page(AstPoolPageQryParam astPoolPageQryParam){ public BasePage<AstPoolVO> page(@RequestBody AstPoolPageQryParam astPoolPageQryParam){
return astPoolService.page(astPoolPageQryParam); return astPoolService.page(astPoolPageQryParam);
} }
@GetMapping("get.json") @GetMapping("get.json")
public AstPoolVO get(String astNo){ public AstPoolVO get(@RequestParam("astNo") String astNo){
return astPoolService.get(astNo); return astPoolService.get(astNo);
} }
......
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