Showing
4 changed files
with
26 additions
and
4 deletions
| ... | ... | @@ -5,6 +5,9 @@ import java.math.BigDecimal; |
| 5 | 5 | import com.lframework.starter.common.constants.StringPool; |
| 6 | 6 | import com.lframework.starter.web.core.bo.BaseBo; |
| 7 | 7 | import java.time.LocalDate; |
| 8 | +import com.lframework.starter.web.core.utils.ApplicationUtil; | |
| 9 | +import com.lframework.starter.web.inner.entity.SysDataDicItem; | |
| 10 | +import com.lframework.starter.web.inner.service.system.SysDataDicItemService; | |
| 8 | 11 | import com.lframework.xingyun.sc.entity.Recapitalize; |
| 9 | 12 | import io.swagger.annotations.ApiModelProperty; |
| 10 | 13 | |
| ... | ... | @@ -68,6 +71,9 @@ public class GetRecapitalizeBo extends BaseBo<Recapitalize> { |
| 68 | 71 | @ApiModelProperty("厂别") |
| 69 | 72 | private String factoryType; |
| 70 | 73 | |
| 74 | + @ApiModelProperty("厂别名称") | |
| 75 | + private String factoryTypeName; | |
| 76 | + | |
| 71 | 77 | public GetRecapitalizeBo() { |
| 72 | 78 | |
| 73 | 79 | } |
| ... | ... | @@ -84,6 +90,8 @@ public class GetRecapitalizeBo extends BaseBo<Recapitalize> { |
| 84 | 90 | |
| 85 | 91 | @Override |
| 86 | 92 | protected void afterInit(Recapitalize dto) { |
| 87 | - | |
| 93 | + SysDataDicItemService sysDataDicItemService = ApplicationUtil.getBean(SysDataDicItemService.class); | |
| 94 | + SysDataDicItem dataDicItem = sysDataDicItemService.findByCode("SUPPLIER", dto.getFactoryType()); | |
| 95 | + dto.setFactoryTypeName(dataDicItem == null ? "" : dataDicItem.getName()); | |
| 88 | 96 | } |
| 89 | 97 | } | ... | ... |
| ... | ... | @@ -5,6 +5,9 @@ import java.math.BigDecimal; |
| 5 | 5 | import com.lframework.starter.common.constants.StringPool; |
| 6 | 6 | import com.lframework.starter.web.core.bo.BaseBo; |
| 7 | 7 | import java.time.LocalDate; |
| 8 | +import com.lframework.starter.web.core.utils.ApplicationUtil; | |
| 9 | +import com.lframework.starter.web.inner.entity.SysDataDicItem; | |
| 10 | +import com.lframework.starter.web.inner.service.system.SysDataDicItemService; | |
| 8 | 11 | import com.lframework.xingyun.sc.entity.Recapitalize; |
| 9 | 12 | import io.swagger.annotations.ApiModelProperty; |
| 10 | 13 | |
| ... | ... | @@ -68,6 +71,9 @@ public class QueryRecapitalizeBo extends BaseBo<Recapitalize> { |
| 68 | 71 | @ApiModelProperty("厂别") |
| 69 | 72 | private String factoryType; |
| 70 | 73 | |
| 74 | + @ApiModelProperty("厂别名称") | |
| 75 | + private String factoryTypeName; | |
| 76 | + | |
| 71 | 77 | public QueryRecapitalizeBo() { |
| 72 | 78 | |
| 73 | 79 | } |
| ... | ... | @@ -84,6 +90,8 @@ public class QueryRecapitalizeBo extends BaseBo<Recapitalize> { |
| 84 | 90 | |
| 85 | 91 | @Override |
| 86 | 92 | protected void afterInit(Recapitalize dto) { |
| 87 | - | |
| 93 | + SysDataDicItemService sysDataDicItemService = ApplicationUtil.getBean(SysDataDicItemService.class); | |
| 94 | + SysDataDicItem dataDicItem = sysDataDicItemService.findByCode("SUPPLIER", dto.getFactoryType()); | |
| 95 | + dto.setFactoryTypeName(dataDicItem == null ? "" : dataDicItem.getName()); | |
| 88 | 96 | } |
| 89 | 97 | } | ... | ... |
| ... | ... | @@ -91,7 +91,7 @@ public class RecapitalizeController extends DefaultBaseController { |
| 91 | 91 | @ApiOperation("新增") |
| 92 | 92 | @HasPermission({"account-manage:recoup-funds:add"}) |
| 93 | 93 | @PostMapping |
| 94 | - public InvokeResult<Void> create(@Valid CreateRecapitalizeVo vo) { | |
| 94 | + public InvokeResult<Void> create(@Valid @RequestBody CreateRecapitalizeVo vo) { | |
| 95 | 95 | |
| 96 | 96 | RecapitalizeService.create(vo); |
| 97 | 97 | |
| ... | ... | @@ -104,7 +104,7 @@ public class RecapitalizeController extends DefaultBaseController { |
| 104 | 104 | @ApiOperation("修改") |
| 105 | 105 | @HasPermission({"account-manage:recoup-funds:modify"}) |
| 106 | 106 | @PutMapping |
| 107 | - public InvokeResult<Void> update(@Valid UpdateRecapitalizeVo vo) { | |
| 107 | + public InvokeResult<Void> update(@Valid @RequestBody UpdateRecapitalizeVo vo) { | |
| 108 | 108 | |
| 109 | 109 | RecapitalizeService.update(vo); |
| 110 | 110 | ... | ... |
| ... | ... | @@ -67,6 +67,12 @@ public class Recapitalize extends BaseEntity implements BaseDto { |
| 67 | 67 | private String factoryType; |
| 68 | 68 | |
| 69 | 69 | /** |
| 70 | + * 厂别名称 | |
| 71 | + */ | |
| 72 | + @TableField(exist = false) | |
| 73 | + private String factoryTypeName; | |
| 74 | + | |
| 75 | + /** | |
| 70 | 76 | * 创建人ID |
| 71 | 77 | */ |
| 72 | 78 | @TableField(fill = FieldFill.INSERT) | ... | ... |