|
|
|
@ -26,6 +26,8 @@ import com.dayu.daf.core.mp.support.Condition; |
|
|
|
|
import com.dayu.daf.core.mp.support.Query; |
|
|
|
|
import com.dayu.daf.core.tool.api.R; |
|
|
|
|
import com.dayu.daf.core.tool.utils.Func; |
|
|
|
|
import org.energy.modules.leger.service.IInventoryDocumentService; |
|
|
|
|
import org.energy.modules.leger.service.ITechParametersService; |
|
|
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
|
import org.springframework.web.bind.annotation.RequestParam; |
|
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
@ -50,6 +52,8 @@ import java.util.List; |
|
|
|
|
public class EquipmentLedgerController extends DafController { |
|
|
|
|
|
|
|
|
|
private IEquipmentLedgerService equipmentLedgerService; |
|
|
|
|
private IInventoryDocumentService inventoryDocumentService; |
|
|
|
|
private ITechParametersService techParametersService; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 详情 |
|
|
|
@ -122,6 +126,13 @@ public class EquipmentLedgerController extends DafController { |
|
|
|
|
@ApiOperationSupport(order = 7) |
|
|
|
|
@ApiOperation(value = "逻辑删除", notes = "传入ids") |
|
|
|
|
public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { |
|
|
|
|
for (String id : ids.split(",")) { |
|
|
|
|
EquipmentLedger equipmentLedger = new EquipmentLedger(); |
|
|
|
|
equipmentLedger.setId(Integer.parseInt(id)); |
|
|
|
|
EquipmentLedger detail = equipmentLedgerService.getOne(Condition.getQueryWrapper(equipmentLedger)); |
|
|
|
|
inventoryDocumentService.delInventoryDocument(detail.getEqLedgerCode()); |
|
|
|
|
techParametersService.delTechParameters(detail.getEqLedgerCode()); |
|
|
|
|
} |
|
|
|
|
return R.status(equipmentLedgerService.deleteLogic(Func.toLongList(ids))); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|