Commit 7dc0a553 by 王衍超

修改接口;

parent 3be6cca3
......@@ -323,8 +323,9 @@ public class ContractServiceImpl implements ContractService {
@Transactional
@Override
public void completeContract(UUID id) {
// KObject kobject = contractDao.load(id);
//TODO 完成逻辑待完善
KObject contract = contractDao.load(id);
contract.set(ContractConstant.CONTRACT_STATE,ContractStateEnum.COMPLETED.name());
contractDao.update(contract);
}
@Transactional
......
......@@ -8,6 +8,7 @@ import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import com.beecode.bap.workflow.core.BizProcessState;
import com.beecode.inz.basis.team.pojo.ResponseObj;
import com.xyst.dinas.sales.service.SalesPlanService;
import com.xyst.dinas.sales.web.request.SaleaPlanApprove;
......@@ -20,9 +21,14 @@ public class SalesPlanController {
@PostMapping("/salesplan/submit")
public Object submitSalesPlan(@RequestBody String boday) {
//校验数据
public Object submitSalesPlan(@RequestBody SaleaPlanApprove saleaPlanApprove) {
//TODO 校验数据
UUID id = saleaPlanApprove.getId();
Integer approveState = BizProcessState.IN_PROCESS.getValue();
Assert.notNull(id, "The id must not be null");
Assert.notNull(approveState, "The approveState must not be null");
salesPlanService.approveSalesPlanForDaily(id, approveState, null);
return ResponseObj.success();
}
......@@ -33,7 +39,7 @@ public class SalesPlanController {
* @return
*/
@PostMapping("/salesplan/approve")
public Object approveSalesPlan(SaleaPlanApprove saleaPlanApprove) {
public Object approveSalesPlan(@RequestBody SaleaPlanApprove saleaPlanApprove) {
UUID id = saleaPlanApprove.getId();
Integer approveState = saleaPlanApprove.getApproveState();
......@@ -48,7 +54,7 @@ public class SalesPlanController {
* @return
*/
@PostMapping("/salesplan/temp/approve")
public Object approveSalesPlanForTemp(SaleaPlanApprove saleaPlanApprove) {
public Object approveSalesPlanForTemp(@RequestBody SaleaPlanApprove saleaPlanApprove) {
UUID id = saleaPlanApprove.getId();
Integer approveState = saleaPlanApprove.getApproveState();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment