| | |
| | | import org.springblade.core.mp.support.Condition; |
| | | import org.springblade.core.mp.support.Query; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.validation.Valid; |
| | | import java.util.ArrayList; |
| | | import java.util.Collection; |
| | | import java.util.List; |
| | |
| | | */ |
| | | @GetMapping("/gridCodeFixedValue") |
| | | @ApiOperationSupport(order = 1) |
| | | @ApiOperation(value = "分页 码段基础信息列表", notes = "CodeFixedValueVO") |
| | | @ApiOperation(value = "固定码段的码值列表", notes = "CodeFixedValueVO") |
| | | public R<IPage<CodeFixedValueVO>> gridCodeFixedValue(CodeFixedValueVO codeFixedValueVO, Query query){ |
| | | return R.data(codeFixedValueService.gridCodeFixedValue(codeFixedValueVO, Condition.getPage(query.setAscs("ordernum")))); |
| | | return R.data(codeFixedValueService.gridCodeFixedValue(codeFixedValueVO, Condition.getPage(query.setAscs("orderNum")))); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @return 删除结果反馈::success:成功,fail:失败 |
| | | */ |
| | | @DeleteMapping( "/deleteData") |
| | | public R delCodeFixedValue(@RequestBody CodeFixedValueDTO codeFixedValueDTO) { |
| | | public R delCodeFixedValue(@Valid @RequestBody CodeFixedValueDTO codeFixedValueDTO) { |
| | | return codeFixedValueService.deleteCodeFixedValue(codeFixedValueDTO); |
| | | } |
| | | |
| | |
| | | @PostMapping("/saveOrder") |
| | | public R batchSave4Order(@RequestBody Map<String,Object> param){ |
| | | JSONArray json = JSONArray.parseArray(String.valueOf(param.get("dtoList"))); |
| | | List<CodeFixedValueDTO> dtoList = new ArrayList<>(); |
| | | List<CodeFixedValueDTO> dtoList = new ArrayList<>(); |
| | | for (int i = 0; i < json.size(); i++) { |
| | | CodeFixedValueDTO codeFixedValueDTO = JSONObject.toJavaObject(JSONObject.parseObject(JSONObject.toJSONString(json.get(i))), CodeFixedValueDTO.class); |
| | | dtoList.add(codeFixedValueDTO); |
| | | } |
| | | String codefixedsecoid = (String) param.get("codeFixedSecOid"); |
| | | VciBaseUtil.alertNotNull(dtoList,"码值对象集合",codefixedsecoid,"固定码段的主键"); |
| | | VciBaseUtil.alertNotNull(codefixedsecoid,"固定码段的主键"); |
| | | if (CollectionUtils.isEmpty(dtoList)){ |
| | | return R.status(codeFixedValueService.batchDeleteBySecOid(codefixedsecoid)); |
| | | } |