| | |
| | | package com.ld.igds.phone35.service.impl; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.ld.igds.constant.RespCodeEnum; |
| | | import com.ld.igds.phone35.constant.Phone35Constant; |
| | | import com.ld.igds.phone35.dto.DtoOrder; |
| | | import com.ld.igds.phone35.dto.Phone35AuthUser; |
| | | import com.ld.igds.phone35.dto.PhoneResponse; |
| | | import com.ld.igds.phone35.mapper.Phone35Mapper; |
| | | import com.ld.igds.phone35.param.Phone35OrderCommonParam; |
| | | import com.ld.igds.phone35.param.Phone35PatrolCommonParam; |
| | | import com.ld.igds.phone35.param.Phone35Request; |
| | | import com.ld.igds.phone35.service.Phone35Service; |
| | | import com.ld.igds.phone35.util.Phone35Util; |
| | | import com.ld.igds.phone35.util.PhoneRespUtil; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 工单记录 |
| | |
| | | */ |
| | | @Service |
| | | public class Phone35ServiceImpl5702 implements Phone35Service { |
| | | |
| | | @Autowired |
| | | private Phone35Util phone35Util; |
| | | @Autowired |
| | | private Phone35Mapper phone35Mapper; |
| | | |
| | | @Override |
| | | public String getInterfaceId() { |
| | | return Phone35Constant.API_PHONE_5702; |
| | |
| | | |
| | | @Override |
| | | public PhoneResponse<Object> execute(Phone35Request<JSONObject> req, Phone35AuthUser phone35AuthUser) throws Exception { |
| | | //转化对象 |
| | | Phone35OrderCommonParam param = JSONObject.parseObject(req.getData().toString(), Phone35OrderCommonParam.class); |
| | | if (null == param) { |
| | | return PhoneRespUtil.error(RespCodeEnum.CODE_1111, "参数有误,请重试!!"); |
| | | } |
| | | //参数验证 |
| | | if (StringUtils.isEmpty(param.getUserName())) { |
| | | return PhoneRespUtil.error(RespCodeEnum.CODE_1111, "参数有误,请重试!!"); |
| | | } |
| | | param.setCompanyId(phone35AuthUser.getCompanyId()); |
| | | List<DtoOrder> list = phone35Mapper.getOrderList(param); |
| | | for (DtoOrder dtoOrder : list) { |
| | | dtoOrder.setDepotName(phone35Util.getDepotName(phone35AuthUser.getCompanyId(), dtoOrder.getDepotId())); |
| | | } |
| | | //todo 工单记录 |
| | | return null; |
| | | return PhoneRespUtil.success(list, req); |
| | | } |
| | | } |