|
|
|
|
@ -43,6 +43,7 @@ import org.springframework.http.ResponseEntity; |
|
|
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
|
import org.springframework.web.multipart.MultipartFile; |
|
|
|
|
|
|
|
|
|
import java.math.BigDecimal; |
|
|
|
|
import java.util.ArrayList; |
|
|
|
|
import java.util.List; |
|
|
|
|
import java.util.Map; |
|
|
|
|
@ -163,7 +164,20 @@ public class MaterialQuotaController extends BladeController { |
|
|
|
|
@ApiLog(value = "物料定额修改") |
|
|
|
|
@Operation(summary = "修改一条", description = "传入MaterialQuota Obj") |
|
|
|
|
public R update(@Valid @RequestBody MaterialQuota updateOne) { |
|
|
|
|
return R.status(service.updateById(updateOne)); |
|
|
|
|
if(null == updateOne.getQuota()){ |
|
|
|
|
updateOne.setQuota(new BigDecimal(0)); |
|
|
|
|
} |
|
|
|
|
if(null == updateOne.getSmallBatQuota()){ |
|
|
|
|
updateOne.setSmallBatQuota(new BigDecimal(0)); |
|
|
|
|
} |
|
|
|
|
if(null == updateOne.getBigBatQuota()){ |
|
|
|
|
updateOne.setBigBatQuota(new BigDecimal(0)); |
|
|
|
|
} |
|
|
|
|
if(null == updateOne.getLocalBatQuota()){ |
|
|
|
|
updateOne.setLocalBatQuota(new BigDecimal(0)); |
|
|
|
|
} |
|
|
|
|
service.updateById(updateOne); |
|
|
|
|
return R.status(true); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|