|
|
@ -32,8 +32,10 @@ import com.epmet.dto.result.CustomerFormResultDTO; |
|
|
|
import com.epmet.dto.result.FormGroupDTO; |
|
|
|
import com.epmet.dto.result.FormItem; |
|
|
|
import com.epmet.entity.IcFormEntity; |
|
|
|
import com.epmet.redis.CustomerFootBarRedis; |
|
|
|
import com.epmet.service.IcFormService; |
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
|
|
|
@ -49,7 +51,8 @@ import java.util.Map; |
|
|
|
*/ |
|
|
|
@Service |
|
|
|
public class IcFormServiceImpl extends BaseServiceImpl<IcFormDao, IcFormEntity> implements IcFormService { |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private CustomerFootBarRedis customerFootBarRedis; |
|
|
|
|
|
|
|
@Override |
|
|
|
public PageData<IcFormDTO> page(Map<String, Object> params) { |
|
|
@ -113,17 +116,19 @@ public class IcFormServiceImpl extends BaseServiceImpl<IcFormDao, IcFormEntity> |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public CustomerFormResultDTO getCustomerForm(CustomerFormQueryDTO formDto) { |
|
|
|
//todo
|
|
|
|
CustomerFormResultDTO customerFormResultDTO = customerFootBarRedis.getCustomerFormResultDTO(formDto.getFormCode(), formDto.getCustomerId()); |
|
|
|
if (null != customerFormResultDTO) { |
|
|
|
return customerFormResultDTO; |
|
|
|
} |
|
|
|
CustomerFormResultDTO resultDTO=baseDao.selectByCode(formDto.getCustomerId(),formDto.getFormCode()); |
|
|
|
if (null == resultDTO) { |
|
|
|
throw new RenException(EpmetErrorCode.CUSTOMER_FORM_NOT_EXITS.getCode(),EpmetErrorCode.CUSTOMER_FORM_NOT_EXITS.getMsg()); |
|
|
|
} |
|
|
|
List<FormItem> itemList=baseDao.selectItemList(resultDTO.getFormId(),formDto.getDynamic()); |
|
|
|
List<FormGroupDTO> groupList=baseDao.selectListGroup(resultDTO.getFormId()); |
|
|
|
|
|
|
|
resultDTO.setItemList(itemList); |
|
|
|
resultDTO.setGroupList(groupList); |
|
|
|
customerFootBarRedis.setCustomerFormResultDTO(formDto.getFormCode(),formDto.getCustomerId(),resultDTO); |
|
|
|
return resultDTO; |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|