|
@@ -27,6 +27,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
+import java.math.BigDecimal;
|
|
|
import java.util.Arrays;
|
|
|
import java.util.List;
|
|
|
|
|
@@ -110,4 +111,13 @@ public class SubjectChangeController extends BaseController {
|
|
|
public HttpResponseResult<SubjectChange> cancel(Integer id) throws Exception {
|
|
|
return succeed(subjectChangeService.cancel(id));
|
|
|
}
|
|
|
+
|
|
|
+ @ApiOperation(value = "更新成本差")
|
|
|
+ @PostMapping("/updateCostMargin")
|
|
|
+ @PreAuthorize("@pcs.hasPermissions('subjectChange/updateCostMargin')")
|
|
|
+ @ApiImplicitParams({@ApiImplicitParam(name = "id", value = "id", required = true, dataType = "Integer"),
|
|
|
+ @ApiImplicitParam(name = "costMargin", value = "成本差", required = true, dataType = "BigDecimal")})
|
|
|
+ public HttpResponseResult<SubjectChange> updateCostMargin(Integer id, BigDecimal costMargin) throws Exception {
|
|
|
+ return succeed(subjectChangeService.updateCostMargin(id, costMargin));
|
|
|
+ }
|
|
|
}
|