| | |
| | | package com.vci.web.controller; |
| | | |
| | | import com.vci.corba.common.PLException; |
| | | import com.vci.corba.omd.data.BusinessObject; |
| | | import com.vci.starter.web.annotation.controller.VciUnCheckRight; |
| | | import com.vci.starter.web.annotation.log.VciBusinessLog; |
| | | import com.vci.starter.web.pagemodel.*; |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | |
| | | } |
| | | |
| | | /** |
| | | * 数据升版,前端使用JSON提交 |
| | | * 数据升版本/次,前端使用JSON提交 |
| | | * @param formDataDTO 表单数据 |
| | | * @return 执行的结果 |
| | | */ |
| | | @PutMapping("/upRevision") |
| | | @VciBusinessLog(operateName = "数据升版",description = "${param.btmname}里的${param.copyFromVersion}") |
| | | public BaseResult<Map<String,Object>> upRevision(@RequestBody FormDataDTO formDataDTO){ |
| | | public BaseResult<Map<String, Object>> upRevision(@RequestBody FormDataDTO formDataDTO) throws PLException { |
| | | return uiDataService.upRevision(formDataDTO); |
| | | } |
| | | |
| | | /** |
| | | * 数据升版本/次,前端使用JSON提交 |
| | | * @param btmname 业务类型的信息 |
| | | * @param oid 业务数据的主键 |
| | | * @param type 1:版次对象;2:版本对象;3:主对象 |
| | | * @return 执行的结果 |
| | | */ |
| | | @DeleteMapping("/deleteBusinessObject") |
| | | public BaseResult deleteBusinessObject(String btmname , String oid, int type) { |
| | | try { |
| | | return uiDataService.deleteBusinessObject(btmname, oid, type); |
| | | }catch (PLException e){ |
| | | BaseResult<Object> objectBaseResult = new BaseResult<>(); |
| | | objectBaseResult.setCode(Integer.parseInt(e.code)); |
| | | objectBaseResult.setMsg(Arrays.toString(e.messages)); |
| | | return objectBaseResult; |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 删除数据 |
| | | * @param deleteDataDTO 删除的数据,需要有oid和ts |
| | | * @return 执行的结果 |