| | |
| | | import com.alibaba.excel.event.AnalysisEventListener; |
| | | import com.alibaba.excel.exception.ExcelDataConvertException; |
| | | import com.consum.base.BaseController; |
| | | import com.consum.base.core.utils.CommonUtil; |
| | | import com.consum.base.core.utils.FinSysTenantUtils; |
| | | import com.consum.base.pojo.FinSysTenantParam; |
| | | import com.consum.base.pojo.FinSysTenantSearchParam; |
| | |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | |
| | | * @Date 2023/7/14 13:59 |
| | | */ |
| | | @RequestMapping("/select/list") |
| | | public ResponseValue allocatedList(FinSysTenantSearchParam param) { |
| | | public ResponseValue allocatedList() { |
| | | FinSysTenantSearchParam param = CommonUtil.getObjFromReq(FinSysTenantSearchParam.class); |
| | | FinSysTenantSearchParam param2 = new FinSysTenantSearchParam(); |
| | | CommonUtil.copyProperties(param, param2); |
| | | param = param2; |
| | | |
| | | FinSysTenantUser sysInfo = getSysInfo(); |
| | | if (sysInfo == null) { |
| | | return ResponseValue.error("登录用户信息不存在"); |
| | |
| | | * @Description 不分页查询 |
| | | */ |
| | | @RequestMapping("/select/allList") |
| | | public ResponseValue allList(FinSysTenantSearchParam param) { |
| | | public ResponseValue allList() { |
| | | FinSysTenantSearchParam param = CommonUtil.getObjFromReq(FinSysTenantSearchParam.class); |
| | | FinSysTenantSearchParam param2 = new FinSysTenantSearchParam(); |
| | | CommonUtil.copyProperties(param, param2); |
| | | param = param2; |
| | | |
| | | StringBuilder whStr = new StringBuilder("where 1=1 and status = 1 and is_delete = 0 "); |
| | | HashMap parameter = new HashMap<>(); |
| | | if (param.getFirstZmS() != null && !param.getFirstZmS().equals("")) { |
| | |
| | | * @date 2023/10/4 |
| | | */ |
| | | @PostMapping("/del") |
| | | public ResponseValue del(@RequestBody FinSysTenantParam param) { |
| | | public ResponseValue del() { |
| | | FinSysTenantParam param = CommonUtil.getObjFromReqBody(FinSysTenantParam.class); |
| | | FinSysTenantParam finSysTenantParam = new FinSysTenantParam(); |
| | | CommonUtil.copyProperties(param, finSysTenantParam); |
| | | param = finSysTenantParam; |
| | | |
| | | if (param.getId() == null) { |
| | | return ResponseValue.error("机构id为空"); |
| | | } |
| | |
| | | * @date 2023/10/4 |
| | | */ |
| | | @PostMapping("/add") |
| | | public ResponseValue add(@RequestBody FinSysTenantParam param) { |
| | | public ResponseValue add() { |
| | | FinSysTenantParam param = CommonUtil.getObjFromReqBody(FinSysTenantParam.class); |
| | | FinSysTenantParam finSysTenantParam = new FinSysTenantParam(); |
| | | CommonUtil.copyProperties(param, finSysTenantParam); |
| | | param = finSysTenantParam; |
| | | |
| | | if (param == null) { |
| | | return ResponseValue.error("参数为空"); |
| | | } |
| | |
| | | * @date 2023/10/6 |
| | | */ |
| | | @PostMapping("/edit") |
| | | public ResponseValue edit(@RequestBody FinSysTenant finSysTenant) { |
| | | Long id = finSysTenant.getId(); |
| | | public ResponseValue edit() { |
| | | FinSysTenant param = CommonUtil.getObjFromReqBody(FinSysTenant.class); |
| | | FinSysTenant finSysTenant = new FinSysTenant(); |
| | | CommonUtil.copyProperties(param, finSysTenant); |
| | | param = finSysTenant; |
| | | |
| | | Long id = param.getId(); |
| | | if (id == null || id.longValue() <= 0) { |
| | | return ResponseValue.error("编辑的机构不存在"); |
| | | } |
| | |
| | | // if (finSysTenant1.getLv() != 1) { |
| | | // return ResponseValue.error("暂无修改权限"); |
| | | // } |
| | | int num = this.finSysTenantService.updateFinSysTenant(finSysTenant, this.getSysInfo()); |
| | | int num = this.finSysTenantService.updateFinSysTenant(param, this.getSysInfo()); |
| | | return num > 0 ? ResponseValue.success(1) : ResponseValue.error("编辑失败!"); |
| | | } |
| | | |