|
|
@ -27,7 +27,7 @@ import com.dayu.daf.core.mp.support.Condition; |
|
|
|
import com.dayu.daf.core.mp.support.Query; |
|
|
|
import com.dayu.daf.core.mp.support.Query; |
|
|
|
import com.dayu.daf.core.tool.api.R; |
|
|
|
import com.dayu.daf.core.tool.api.R; |
|
|
|
import com.dayu.daf.core.tool.utils.Func; |
|
|
|
import com.dayu.daf.core.tool.utils.Func; |
|
|
|
import org.energy.modules.spares.entity.Inbound; |
|
|
|
import org.energy.modules.spares.service.IMaterialService; |
|
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
import org.springframework.web.bind.annotation.RequestParam; |
|
|
|
import org.springframework.web.bind.annotation.RequestParam; |
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
@ -53,6 +53,7 @@ import java.util.List; |
|
|
|
public class OutboundController extends DafController { |
|
|
|
public class OutboundController extends DafController { |
|
|
|
|
|
|
|
|
|
|
|
private IOutboundService outboundService; |
|
|
|
private IOutboundService outboundService; |
|
|
|
|
|
|
|
private IMaterialService materialService; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 详情 |
|
|
|
* 详情 |
|
|
@ -104,6 +105,10 @@ public class OutboundController extends DafController { |
|
|
|
@ApiOperationSupport(order = 5) |
|
|
|
@ApiOperationSupport(order = 5) |
|
|
|
@ApiOperation(value = "修改", notes = "传入outbound") |
|
|
|
@ApiOperation(value = "修改", notes = "传入outbound") |
|
|
|
public R update(@Valid @RequestBody Outbound outbound) { |
|
|
|
public R update(@Valid @RequestBody Outbound outbound) { |
|
|
|
|
|
|
|
if (outbound.getIstatus() == 2) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
materialService.updateNum(outbound.getMaterialNo(), Math.negateExact(outbound.getOutboundCount())); |
|
|
|
|
|
|
|
} |
|
|
|
return R.status(outboundService.updateById(outbound)); |
|
|
|
return R.status(outboundService.updateById(outbound)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|