| | |
| | | package com.java110.store.bmo.contract.impl; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.dto.contract.ContractDto; |
| | | import com.java110.dto.contractAttr.ContractAttrDto; |
| | | import com.java110.dto.contractChangePlan.ContractChangePlanDto; |
| | | import com.java110.dto.purchaseApply.PurchaseApplyDto; |
| | | import com.java110.entity.audit.AuditUser; |
| | | import com.java110.intf.common.IContractApplyUserInnerServiceSMO; |
| | | import com.java110.intf.common.IContractChangeUserInnerServiceSMO; |
| | |
| | | import com.java110.store.bmo.contract.IGetContractBMO; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import com.java110.vo.ResultVo; |
| | | import com.java110.vo.api.resourceOrder.ApiResourceOrderDataVo; |
| | | import com.java110.vo.api.resourceOrder.ApiResourceOrderVo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.HttpStatus; |
| | | import org.springframework.http.ResponseEntity; |
| | |
| | | |
| | | @Autowired |
| | | private IContractChangeUserInnerServiceSMO contractChangeUserInnerServiceSMO; |
| | | |
| | | /** |
| | | * @param contractDto |
| | | * @return 订单服务能够接受的报文 |
| | |
| | | |
| | | return responseEntity; |
| | | } |
| | | |
| | | @Override |
| | | public ResponseEntity<String> queryContractChangeTask(AuditUser auditUser) { |
| | | long count = contractChangeUserInnerServiceSMO.getUserTaskCount(auditUser); |
| | | |
| | | List<ContractChangePlanDto> contractChangePlanDtos = null; |
| | | List<ContractChangePlanDto> contractChangePlanDtos = null; |
| | | |
| | | if (count > 0) { |
| | | contractChangePlanDtos = contractChangeUserInnerServiceSMO.getUserTasks(auditUser); |
| | | contractChangePlanDtos = contractChangeUserInnerServiceSMO.getUserTasks(auditUser); |
| | | } else { |
| | | contractChangePlanDtos = new ArrayList<>(); |
| | | } |
| | |
| | | |
| | | long count = contractChangeUserInnerServiceSMO.getUserHistoryTaskCount(auditUser); |
| | | |
| | | List<ContractDto> contractDtos = null; |
| | | List<ContractChangePlanDto> contractChangePlanDtos = null; |
| | | |
| | | if (count > 0) { |
| | | List<ContractChangePlanDto> purchaseApplyDtos = contractChangeUserInnerServiceSMO.getUserHistoryTasks(auditUser); |
| | | contractDtos = BeanConvertUtil.covertBeanList(purchaseApplyDtos, ContractDto.class); |
| | | contractChangePlanDtos = contractChangeUserInnerServiceSMO.getUserHistoryTasks(auditUser); |
| | | } else { |
| | | contractDtos = new ArrayList<>(); |
| | | contractChangePlanDtos = new ArrayList<>(); |
| | | } |
| | | ResultVo resultVo = new ResultVo((int) Math.ceil((double) count / (double) auditUser.getRow()), new Long(count).intValue(), contractDtos); |
| | | ResultVo resultVo = new ResultVo((int) Math.ceil((double) count / (double) auditUser.getRow()), new Long(count).intValue(), contractChangePlanDtos); |
| | | |
| | | ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK); |
| | | |
| | | return responseEntity; |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |