|
|
@ -34,6 +34,9 @@ import org.energy.modules.leger.vo.EquipmentLedgerVO; |
|
|
|
import org.energy.modules.leger.service.IEquipmentLedgerService; |
|
|
|
import org.energy.modules.leger.service.IEquipmentLedgerService; |
|
|
|
import com.dayu.daf.core.boot.ctrl.DafController; |
|
|
|
import com.dayu.daf.core.boot.ctrl.DafController; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import java.util.ArrayList; |
|
|
|
|
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 设备台账编码一览 控制器 |
|
|
|
* 设备台账编码一览 控制器 |
|
|
|
* |
|
|
|
* |
|
|
@ -66,7 +69,6 @@ public class EquipmentLedgerController extends DafController { |
|
|
|
@ApiOperationSupport(order = 2) |
|
|
|
@ApiOperationSupport(order = 2) |
|
|
|
@ApiOperation(value = "分页", notes = "传入equipmentLedger") |
|
|
|
@ApiOperation(value = "分页", notes = "传入equipmentLedger") |
|
|
|
public R<IPage<EquipmentLedger>> list(EquipmentLedger equipmentLedger, Query query) { |
|
|
|
public R<IPage<EquipmentLedger>> list(EquipmentLedger equipmentLedger, Query query) { |
|
|
|
query.setAscs("eq_ledger_code"); |
|
|
|
|
|
|
|
IPage<EquipmentLedger> pages = equipmentLedgerService.page(Condition.getPage(query), Condition.getQueryWrapper(equipmentLedger)); |
|
|
|
IPage<EquipmentLedger> pages = equipmentLedgerService.page(Condition.getPage(query), Condition.getQueryWrapper(equipmentLedger)); |
|
|
|
return R.data(pages); |
|
|
|
return R.data(pages); |
|
|
|
} |
|
|
|
} |
|
|
@ -123,5 +125,37 @@ public class EquipmentLedgerController extends DafController { |
|
|
|
return R.status(equipmentLedgerService.deleteLogic(Func.toLongList(ids))); |
|
|
|
return R.status(equipmentLedgerService.deleteLogic(Func.toLongList(ids))); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* 审核 设备台账编码一览 |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
@PostMapping("/auditing") |
|
|
|
|
|
|
|
@ApiOperationSupport(order = 8) |
|
|
|
|
|
|
|
@ApiOperation(value = "更新", notes = "传入ids") |
|
|
|
|
|
|
|
public R auditing(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { |
|
|
|
|
|
|
|
return this.approve(2,ids); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* 驳回 设备台账编码一览 |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
@PostMapping("/reject") |
|
|
|
|
|
|
|
@ApiOperationSupport(order = 9) |
|
|
|
|
|
|
|
@ApiOperation(value = "更新", notes = "传入ids") |
|
|
|
|
|
|
|
public R reject(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { |
|
|
|
|
|
|
|
return this.approve(3,ids); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* 驳回OR审核 设备台账编码一览 |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
public R approve(Integer status, String ids) { |
|
|
|
|
|
|
|
List<EquipmentLedger> list = new ArrayList<>(); |
|
|
|
|
|
|
|
for (String id : ids.split(",")) { |
|
|
|
|
|
|
|
EquipmentLedger equipmentLedger = new EquipmentLedger(); |
|
|
|
|
|
|
|
equipmentLedger.setId(Integer.parseInt(id)); |
|
|
|
|
|
|
|
equipmentLedger.setCheckStatus(status); |
|
|
|
|
|
|
|
list.add(equipmentLedger); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return R.status(equipmentLedgerService.updateBatchById(list)); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|